How to change your stat constant values

With the latest update, Valve introduced an API call to adjust the amount of modifier property you get per level.

It can be called like this

GameRules:GetGameModeEntity():SetCustomAttributeDerivedStatValue(DOTA_ATTRIBUTE_STRENGTH_DAMAGE, 5)

which will make Strength heroes gain 5 damage per point of strength.

The different values for the first constant are as follows

DOTA_ATTRIBUTE_STRENGTH_DAMAGE,
DOTA_ATTRIBUTE_STRENGTH_HP,
DOTA_ATTRIBUTE_STRENGTH_HP_REGEN_PERCENT,
DOTA_ATTRIBUTE_STRENGTH_STATUS_RESISTANCE_PERCENT,
DOTA_ATTRIBUTE_AGILITY_DAMAGE,
DOTA_ATTRIBUTE_AGILITY_ARMOR,
DOTA_ATTRIBUTE_AGILITY_ATTACK_SPEED,
DOTA_ATTRIBUTE_AGILITY_MOVE_SPEED_PERCENT,
DOTA_ATTRIBUTE_INTELLIGENCE_DAMAGE,
DOTA_ATTRIBUTE_INTELLIGENCE_MANA,
DOTA_ATTRIBUTE_INTELLIGENCE_MANA_REGEN_PERCENT,
DOTA_ATTRIBUTE_INTELLIGENCE_SPELL_AMP_PERCENT,
DOTA_ATTRIBUTE_INTELLIGENCE_MAGIC_RESISTANCE_PERCENT

MAKE CUSTOM GAMES GREAT AGAIN

Finished-
kv checker - https://arhowk.github.io
panorama video series - https://moddota.com/forums/discussion/2021/inclusive-panorama-tutorial-quest-box

My pet project This Cursed World/Crestfallen (name pending)
https://moddota.com/forums/discussion/986/this-cursed-world-rpg#latest

Comments

  • THEY LISTENED

  • this is noob question but which file do i put this?

  • Posts: 151

    @username you could technically put it anywhere really, but it should go in your addon_game_mode.lua or wherever you are initializing your mod from.

    its worth noting that the percentage based attributes take percents as inputs. so you use 0.01 for 1%