API
Interface
public interface IProgressionPlugin
{
// Create/destroy
ProgressionInstance CreateProgression(string entityId,
LevelingEntry levelingEntry, string progressionId = null);
ProgressionInstance CreateProgressionFromInstance(string entityId,
ProgressionInstanceEntry instanceEntry, string progressionId = null);
bool DestroyProgression(string progressionId);
// Queries
ProgressionInstance GetProgression(string progressionId);
ProgressionInstance GetEntityProgression(string entityId,
string levelingId);
ProgressionInstance GetEntityProgressionByInstance(string entityId,
string progressionInstanceId);
ProgressionInstance[] GetAllEntityProgressions(string entityId);
// XP and leveling
bool AwardExperience(string progressionId, int amount,
string sourceId = null, GameObject source = null);
bool SetLevel(string progressionId, int targetLevel,
GameObject source = null);
// State queries
int GetLevel(string progressionId);
int GetExperience(string progressionId);
int GetExperienceForNextLevel(string progressionId);
float GetLevelProgress(string progressionId);
bool CanLevelUp(string progressionId);
bool HasReachedLevelCap(string progressionId);
// Persistence
void LoadEntityProgressionsFromSave(string entityId);
}Database Entries
LevelingEntry
Field
Type
Description
ProgressionInstanceEntry
Field
Type
Description
LevelUpReward
Field
Type
Description
ProgressionInstance
Field
Type
Description
Events
Event
Key Fields
Description
Commands
Command
Fields
Description
Components
ProgressionEntity
Field
Type
Description
Save Data
Usage
Last updated
Was this helpful?
