#Make scepter ability work by default

1 messages · Page 1 of 1 (latest)

glossy terrace
#

I want to make some heroes aghanim abilities work by default.
For example earthshaker_enchant_totem.
After looking thru it's ability kv file I figured leaping can't be overridden to work by default, but I can't see other ways of doing it.
As I've read many times before, to make something work in dota I have to rewrite it from scratch, is this the case as well?
Giving scepter on spawn won't work in my case.

#

In case you wonder, I did try overriding all "RequiresScepter" values of ability, it didn't work as expected:
scripts/npc/npc_abilities_override.txt:

"DOTAAbilities"
{
    "Version"        "1"
    "earthshaker_enchant_totem"
    {
        "AbilityValues"
        {
            "distance_scepter"            
            {
                "RequiresScepter"        "0"
            }
            "scepter_cleave_pct"
            {
                "RequiresScepter"        "0"
            }
            "scepter_cleave_starting_width"
            {
                "RequiresScepter"        "0"
            }
            "scepter_cleave_ending_width"
            {
                "RequiresScepter"        "0"
            }
            "scepter_cleave_distance"
            {
                "RequiresScepter"        "0"
            }
        }
    }
}
prisma silo
#

why just give it a scepter modifier

glossy terrace
#

I want to upgrade other ability with scepter

foggy barn
#

So the way Valve coded the leaping behavior is by making the hero check for HasScepter(). If it returns true, it allows leaping. Otherwise, it doesn't. The KV is not part of that logic, but only defines the values. This is mostly used to determine when tooltips are shown.

glossy terrace
#

Quite unfortunate. So I have to reimplement the ability itself, or make some painintheass moves with scepter for shaker so it will upgrade other abilities after custom event, or something like that

prisma silo
#

brainstorm:make a custom scepter to upgrade your custom ability

glossy terrace
#

Yeah, that's what I was thinking, even tho sounds like a lot of pain, thanks!

glass pilot
#

just give shaker the scepter modifier

#

all it does is activate the ability 🤷

#

its a lot easier to handle your own 'scepter' abilities with a special custom modifier than fuck with valve's shit

#

luckily, this only applies ot older scepter abilities, nowadays valve uses "special_bonus_scepter" to modulate scepter stuff

glossy terrace
#

xd, my game crashed when I tried
player.GetAssignedHero().AddNewModifier(undefined, undefined, "modifier_earthshaker_enchant_totem_leap", {});

glass pilot
#

you need to assign caster at the very least

#

and if you have the ability you should also always assign it

#

pretty sure the modifier requires parameters to be passed to it

glossy terrace
#

quite unintuitive, but looks like the modifier works, will try to work around it somehow

glossy terrace
foggy barn
#

you can't. What we know is based on Valve's examples and modifiers they used in their custom games, because they pass those keys.

#

You generally can assume the only key that is guaranteed is duration: X

#

And some have some predefined ones, like modifier_knockback

#

Besides, you almost never need those keys as values generally are taken from the ability KVs

devout saffron
prisma silo
ebon lintel
simple laurel
#

The modifier property is called MODIFIER_PROPERTY_IS_SCEPTER.