Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetCustomXPRequiredToReachNextLevel
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search

Function Description
void SetCustomXPRequiredToReachNextLevel(handle hTable)
Allows definition of a table of hero XP values.
Parameters
Type | Name | Description |
---|---|---|
handle | hTable | No Description Set |
Examples
The following example demonstrates the SetCustomXPRequiredToReachNextLevel function inside addon_game_mode.lua
function CAddonTemplateGameMode:InitGameMode()
local mode = GameRules:GetGameModeEntity()
XP_PER_LEVEL_TABLE = {
0, -- 1
200, -- 2
500, -- 3
900, -- 4
1400, -- 5
2000, -- 6
2640, -- 7
3300, -- 8
3980, -- 9
4680, -- 10
5400, -- 11
6140, -- 12
7340, -- 13
8565, -- 14
9815, -- 15
11090, -- 16
12390, -- 17
13715, -- 18
15115, -- 19
16605, -- 20
18205, -- 21
20105, -- 22
22305, -- 23
24805, -- 24
27500 -- 25
}
mode:SetCustomXPRequiredToReachNextLevel(XP_PER_LEVEL_TABLE)
end