[Spell] Is this all possible?

Status
Not open for further replies.
Level 3
Joined
Mar 4, 2018
Messages
29
Hey. I'm a big fan of adventures where you control a squad of heroes yourself, not with other players and not with armies and bases, a bit like some dungeon maps in the WC3 campaigns. I seem to only find multiplayer ones however. Either way, I'm looking to create something like it myself, with various characters of mine as the heroes.

Opening the editor I realized I might not have looked at a world editor since SC: BW and within a few minutes it became clear just how much you can seemingly edit. And yet, I find myself immediately stuck with my first step, designing the abilities for my first hero. So I'm going to list some ability concepts that I can't seem to create or expect I will have problems when I attempt later, and I'd love to know if they're at all possible and if so, where I might look for inspiration.

1) Aura that shifts between increasing the magic damage (or int, I'm sure I can make spells scale with either) of allies and lowering that of enemies, swapping every 5 seconds. The strength is both a static amount per level and a % of the generating hero's own intellect/magic damage.
1b) If the aura is clicked, the current effect will last another 10 seconds, and then toggle as usual while the effect lock is on cooldown.
1c) Through a talent, the effect of activating the aura becomes that it grants both effects until toggled, but drains the user's mana. No longer any cooldown on activating the double effect.
1d) Through another talent, the aura also lowers mana costs for allies or increases them for enemies, but only for spells that are flagged as being "magic based" (it would affect a fireball but not a backstab, even if they both cost mana).

2) Ability whose power varies based on the int ratio between the caster and the target. I'm pretty sure I could look at Sanity's Eclipse from DotA here, but it's context for the next one:
2b) Through a talent, the caster is treated as having +x% intellect when using this ability.

3) Spell Steal (like the Spellbreaker ability) that, through a talent, has a chance to multicast the stolen spell based on the int ratio between the stealer and the original caster (not the target it's stolen from)
3b) Talent that causes the caster to deal bonus damage on their next attack proportional to the cost of the stolen spell

With these problems solved, and then probably a dozen more that I don't yet know about, I believe I could get as far as creating one whole to-be-rebalanced-fifty-times hero!
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
1) Aura that shifts between increasing the magic damage (or int, I'm sure I can make spells scale with either) of allies and lowering that of enemies, swapping every 5 seconds. The strength is both a static amount per level and a % of the generating hero's own intellect/magic damage.
All abilities of every unit would need to be triggered but yes it is possible then. Triggering a lot of abilities can be a lot of work.

Might be possible using 1.29 natives and a damage detection system to modify spell damage of non-triggered abilities. If this is always accurate is questionable.
1b) If the aura is clicked, the current effect will last another 10 seconds, and then toggle as usual while the effect lock is on cooldown.
Also possible, but makes the coding more complex.
1c) Through a talent, the effect of activating the aura becomes that it grants both effects until toggled, but drains the user's mana. No longer any cooldown on activating the double effect.
Not sure what you mean by "talent" since WC3 does not have any such mechanics. Maybe you mean a talent system, in which case that would need to be fully triggered as well.

Yes it is possible. Might be easier to swap the ability for another ability with different data behind it so that the cooldown works properly.
1d) Through another talent, the aura also lowers mana costs for allies or increases them for enemies, but only for spells that are flagged as being "magic based" (it would affect a fireball but not a backstab, even if they both cost mana).
Might be vaguely possible in 1.29 thanks to new natives. Impossible in 1.28.5. Impossible to fully MUI in 1.29 due to the natives working on all abilities for a player. If one unit is effected the cost might have to effect all units in the map depending how 1.29 natives work so might be impossible how you want it.

Which abilities it effects can be hard coded in some form of data structure.
2) Ability whose power varies based on the int ratio between the caster and the target. I'm pretty sure I could look at Sanity's Eclipse from DotA here, but it's context for the next one:
Fairly easy to trigger. Might have to add checks in case it targets non-heroes.
2b) Through a talent, the caster is treated as having +x% intellect when using this ability.
Again a fairly simple trigger. Possibly a conditional would work.
3) Spell Steal (like the Spellbreaker ability) that, through a talent, has a chance to multicast the stolen spell based on the int ratio between the stealer and the original caster (not the target it's stolen from)
Not easily possible as far as I am aware. Might be possible with some extremely complex systems to detect spell steal and stuff. Results still might not be perfect.
3b) Talent that causes the caster to deal bonus damage on their next attack proportional to the cost of the stolen spell
If one can detect spell steal should be fairly simple. Probably needs 1.29. Again I would recommend staying away from such effects.
 
Level 3
Joined
Mar 4, 2018
Messages
29
Hey, thanks. Yeah, I meant a talent system a bit like in HotS, where every now and then you get a few options to improve or add twists to your basic spells.
All abilities of every unit would need to be triggered but yes it is possible then. Triggering a lot of abilities can be a lot of work.
Does this mean that I cannot actually create an aura that does something even as simple as +5 int allies, -5 int enemies, but rather it is a dummy effect that is checked for any time someone casts a spell, and only then modifies the int used to calculate the spell's effects, and you don't even see the int modification in your stats?

I think of SC: BW's editor and tell myself I understand what you mean by trigger and this should be the correct interpretation, then I look at all the strings and buttons in WE and tell myself I actually have no idea :p
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Does this mean that I cannot actually create an aura that does something even as simple as +5 int allies, -5 int enemies, but rather it is a dummy effect that is checked for any time someone casts a spell, and only then modifies the int used to calculate the spell's effects, and you don't even see the int modification in your stats?
Creating an aura to add or remove stats is simple. Modifying spell damage is not. Int does not modify spell damage. Only hero units have int and it is always visible.
 
Level 3
Joined
Mar 4, 2018
Messages
29
Ah yeah. I had a look at a map that used int scaling for spells and the triggers that made it work seemed straightfoward enough that I could handle them (if unit takes damage from spell x, make it also take damage based on caster's int). But I'm looking at quite the headache for non-hero units then. I assume there's no way of letting anyone have more than 3 heroes, so I can't just make every random creep a really weak hero.

Perhaps if the aura only affected allies, giving them int and resistance to magic and spell damage, I would be achieving a comparable effect with way less hassle? I don't intend to put non-heroes on Team Good anyway.
 
Level 3
Joined
Mar 4, 2018
Messages
29
Oh, but that doesn't sound like it should be a problem, I'll just respawn creeps and let bosses stay dead. Would anything else about it be? Am I setting myself up for some big headaches by littering my map with enemy heroes?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Am I setting myself up for some big headaches by littering my map with enemy heroes?
They might interact with EXP gain and be subject to gaining levels unless experience gain is disabled for them. Otherwise I do not see a problem as maps like Heroes and Empires 2 used a similar approach and were stable enough.
 
Level 12
Joined
May 22, 2015
Messages
1,051
I think the bonus spell damage aura should be possible but will require a lot of infrastructure.

Basically, you will need to have a damage detection system that can distinguish magic from physical damage. Then, when a unit deals magic damage, you would check for the aura's buff. If they have it, you would have to search in a radius around that unit to find the hero providing the aura. If 2 heroes have the aura I guess you will use the higher intelligence value or the closer hero. From there, it should be possible to add damage based on the hero's intelligence.
 
Level 3
Joined
Mar 4, 2018
Messages
29
If the aura simply adds (or in enemies' case, removes) int and I trigger all spells to deal extra damage based on int, it shouldn't be tricky, right? I mean, I want spells to scale with something anyway, so I gotta do that regardless.

As I said I saw a map with triggers like: If unit takes damage from spell x, make it also take spell damage based on caster's int multiplied by some coefficient.

That being said, I'm quite stumped for designing this aura (new to JASS and quite an inexperienced programmer), so I would appreciate it if someone could recommend a map I could use for inspiration.

P.S. There wouldn't be two of these auras, not on the same team anyway.
 
Level 12
Joined
May 22, 2015
Messages
1,051
If the aura simply adds (or in enemies' case, removes) int and I trigger all spells to deal extra damage based on int, it shouldn't be tricky, right? I mean, I want spells to scale with something anyway, so I gotta do that regardless.

As I said I saw a map with triggers like: If unit takes damage from spell x, make it also take spell damage based on caster's int multiplied by some coefficient.

That being said, I'm quite stumped for designing this aura (new to JASS and quite an inexperienced programmer), so I would appreciate it if someone could recommend a map I could use for inspiration.

P.S. There wouldn't be two of these auras, not on the same team anyway.
The aura, unfortunately, is not that basic. There's no aura that I know of that modifies hero stats. You will have to code your own aura that adds or removes the stats as they enter the AOE of the aura. I think a periodic trigger that adds the stats to new heroes that come into range and removes stats to heroes that are no longer in range will do the trick.

On thing about making all units into heroes is their names. Heroes have randomly chosen names. I think it starts to add roman numerals to the end if you make more than the total number of names you give each unit. This might not be that bad, though. However, I think also it will be giving hero death notifications all the time unless only the enemies have a lot of units to control. I think it is possible to stop these alerts but I've never done that myself.
 
Level 3
Joined
Mar 4, 2018
Messages
29
Good points about names and death notifications. I think spamming heroes might allow for easier interaction, if I make abilities scale with an attribute (which seems really easy to do) rather than say having a damage reduction aura that I'll have to code to also interact with abilities. If unit uses BIG ATAK while affected by SMALLER ATAK AURA, make BIG ATAK deal 10% less damage.

It doesn't really pay off unless I spam heroes though, which means allied NPC's - pretty much anyone who fights - would be heroes too and I'd get death notifications about town guards and random goons dying, unless this can indeed be disabled. As for the names, it seems I can spam a hero type's name list with Random Goon and it doesn't complain that each name has to be unique. It's slow to keep adding that item to the list, but I guess there's a faster way. Would there be a problem with this, say a cap on the name list or slowing the map down because complicated coding reasons, anything?
 
One can disable death alerts, big minimap point and icons for each hero specific, inside Object Editor.

hide hero Alerts.jpg

 
Status
Not open for further replies.
Top