Dota 2 Workshop Tools/Scripting/API/CDOTABaseGameMode.SetCustomXPRequiredToReachNextLevel
< Dota 2 Workshop Tools | Scripting | API
This article has no links to other VDC articles. Please help improve this article by adding links that are relevant to the context within the existing text.
January 2024
January 2024
Note: This page is automatically generated. Any changes may be overwritten
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