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.
#Make scepter ability work by default
1 messages · Page 1 of 1 (latest)
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"
}
}
}
}
why just give it a scepter modifier
I want to upgrade other ability with scepter
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.
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

brainstorm:make a custom scepter to upgrade your custom ability
Yeah, that's what I was thinking, even tho sounds like a lot of pain, thanks!
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
xd, my game crashed when I tried
player.GetAssignedHero().AddNewModifier(undefined, undefined, "modifier_earthshaker_enchant_totem_leap", {});
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
quite unintuitive, but looks like the modifier works, will try to work around it somehow
a little unrelated quiestion. Where can I find list of keys accepted by {}, on ModDota it says: The fields between {} are Very specific. For that particular modifier, I took the values from this magic list, but this isn't the only way of acquiring them, as this list is very incomplete. magic list is link to 404 and I couldn't find this list in d2vpkr or on valve dev website
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
you know, this made me thinking. there's a property called MODIFIER_PROPERTY_SCEPTER, which supposedly grants scepter effect.
perhaps you can try use this modifier, and check if the parameters has a specific ability handle. if so, perhaps you can filter out to give scepter only to a specific ability
it's not like that, it doesnt even call the callback (GetModifierScepter
if you declare it in DeclareFunctions, it is, a scepter
I didnt notice the last line, dont know why he cant give scepter on spawn, maybe a hero has multiple abilities with scepter upgrades?
MODIFIER_PROPERTY_SCEPTER works in a same way as vanilla aghanim scepter except it does not enable abilities that have GrantedByScepter kv.
The modifier property is called MODIFIER_PROPERTY_IS_SCEPTER.