-
Notifications
You must be signed in to change notification settings - Fork 4
Integration & Compatibility
In this section there will be explanations of the classes, events and examples available for you to integrate your mod with LevelUP
- OnExperienceIncrease
-
Player receive experience,
amountis a reference you can modify it to increase or decrease the quantity received - OnExperienceSubIncrease
-
Player receive sub experience,
amountis a reference you can modify it to increase or decrease the quantity received - OnExperienceReduced
-
Player losed experience,
amountis a reference you can modify it to increase or decrease the quantity received - OnLevelUp
-
Player leveled up
- GetExperience
-
Returns the player experience from a level type
- GetSubExperience
-
Returns the player sub experience from a level type and sub level type
- IncreaseExperience
-
Increase a player experience from a level type and action or amount
- IncreaseSubExperience
-
Increase a player experience from a level type, sub level type and amount
You can access all levelup calculation by using the class LevelUP.Configuration
Force reduce all experience
public override void StartServerSide(ICoreServerAPI api)
{
LevelUP.ExperienceEvents.OnExperienceIncrease += LevelUPOnExperienceIncreased;
}
private void LevelUPOnExperienceIncreased(IPlayer player, string type, ref ulong amount)
{
amount = (ulong)Math.Round(amount * 0.5);
}