Datadriven Help

Hey I am making a custom dota gamemode! I was wondering is there anyway to make a datadriven ability that would give a set amount of gold on an interval? Like maybe a passive that just keeps giving gold, Or a Toggle if it makes it easier... If Any of you can help it will be much Appreciated :D!

Comments

  • //Gold Ability
    "passive_gold_ability_example"
    {
        "ID"                    "7000"                                                      // unique ID number for this ability.  Do not change this once established or it will invalidate collected stats.
        "BaseClass" "ability_datadriven"
        "AbilityTextureName"            "passive_gold_ability_example_icon"
    
        "AbilitySpecial"
        {
            "01"
            {
                    "var_type" "FIELD_INTEGER"
                    "gold_per_interval" "50 100 150 200"
            }
            "02"
            {
                    "var_type" "FIELD_INTEGER"
                    "interval_time" "60 50 40.1 10"     //in seconds
            }
        }
    
        "Modifiers"
        {
            "modifier_custom_gold_example"
            {
                "Passive"   "1"
                "ThinkInterval" "%interval_time"
                "IsHidden"  "0"
                "OnIntervalThink"
                {
                    "GrantXPGold"
                    {
                        "Target"    "CASTER"
                        "XPAmount"  "0"
                        "GoldAmount"    "%gold_per_interval"
                        "ReliableGold"  "1"
                        "SplitEvenly"   "1"
                    }
                }
            }
        }
    }
    
  • shold be somesting like this (i never ised "GrantXPGold" because i always use lua for gold changing)

  • Thank you! You are awesome :)

  • hmmm Just tried it and It Doesn't seem to be giving me any gold

    Here is my Script

    "sponsor" { "BaseClass" "ability_datadriven" "AbilityTextureName" "chen_hand_of_god" "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE" "MaxLevel" "4" "AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_FRIENDLY" "AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO" "AbilitySpecial" { "01" { "var_type" "FIELD_INTEGER" "gold_per_interval" "200 500 800 1000" } "02" { "var_type" "FIELD_INTEGER" "interval_time" "1"
    } }

        "Modifiers"
        {
            "modifier_custom_gold_example"
            {
                "Passive"   "1"
                "ThinkInterval" "%interval_time"
                "IsHidden"  "1"
                "OnIntervalThink"
                {
                    "GrantXPGold"
                    {
                        "Target"    "CASTER"
                        "XPAmount"  "0"
                        "GoldAmount"    "%gold_per_interval"
                        "ReliableGold"  "1"
                        "SplitEvenly"   "1"
                    }
                }
            }
        }
    }