• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How-to? Ability tunning: impale/mine/transmute

Status
Not open for further replies.
Hello,

3 questions please:
1) How can I make Mines explode against air units ? I tried without result:
- Changing "Targeted As" to "air, ground" or "ground" in Object Editor.
- Changing unit classification from a trigger (remove air, add ground).​
PS: the expoding ability has allowed target = "air, ground", the "mine exploding" ability has target allowed=<empty>

2) How can I allow players to cast Impale ability on a air unit ? I already tried changing allowed targets to "air, ground" but still have the error message "Must target a ground unit"...

3) In my transmute ability, I have a "max creep level" set to 6. It is ignored for all ennemies that are not of race "creep". I have ~100 ennemy unit types, is there a quicker thing that changing the race of all of them to "creep" one by one in World Editor ?

Thanks in advance if you can help me !
Don't hesitate to ask if you need more informations.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
1) Works fine for me...? I mean the explosion can affect air units too, confirmed. But if you're only talking about the "mine exploding" ability, which detects if there are units nearbies, no, it won't work for air units, it looks hardcoded :(
2) Bugged apparently.
3) Not any way I know, although it isn't hard, it is pretty tedious yes, I feel you. Hope blizzard implements something that will help us with that :D
By the way, those bugs are worth reporting!
[Feedback] Compiled List of Bugs & Issues for 1.30.1+
 
Level 8
Joined
May 21, 2019
Messages
435
1) How can I make Mines explode against air units ? I tried without result:
- Changing "Targeted As" to "air, ground" or "ground" in Object Editor.
- Changing unit classification from a trigger (remove air, add ground).​
PS: the expoding ability has allowed target = "air, ground", the "mine exploding" ability has target allowed=<empty>
You could save the point that the mine is placed on, and run a periodic check for enemy units within range of the point, then detonate the mine if someone comes within range. You can also add an invisible dummy unit and add the "unit comes within range of unit" event to a trigger, then use hashtables to associate the mine with the dummy unit.

2) How can I allow players to cast Impale ability on a air unit ? I already tried changing allowed targets to "air, ground" but still have the error message "Must target a ground unit"...
Oh boy, this one is hell...
This is why I tend to avoid actual flying units, and instead opt for ground units lifted above the ground. They can't fly over things but eh...
The best way that I can think of, is using a dummy Channel ability to allow targeting the air units, then casting an impale at the the location of the dummy ability's target, and then select all air units in the path and throw dummy abilities on them.
If it sounds hard and tedious, that's because it is. :D

3) In my transmute ability, I have a "max creep level" set to 6. It is ignored for all ennemies that are not of race "creep". I have ~100 ennemy unit types, is there a quicker thing that changing the race of all of them to "creep" one by one in World Editor ?
You could try making a trigger that runs whenever transmute BEGINS casting (not at start of effect), and then check the level of the target, and if the level is above 6, you order the casting unit to "Stop". Then you paste out an error message to the player. That'd save you the time.
Also, this system allows you to add more exceptions to the spell, than just the level, if your map has any low level units that you don't want to be targeted by this spell.
3) Not any way I know
Remember when we talked about instances in which you'd wanna use "Begins Casting" instead of "Starts the effect"? This is one of those. :)
 
Last edited:

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
Remember when we talked about instances in which you'd wanna use "Begins Casting" instead of "Starts the effect"? This is one of those. :)
I know, but I was trying to find a way that doesn't have consequences such as: you still can target the unit; you still have to make the error message, if there's already another message displaying then it will be overlaid.
And all this is quite lame because you can't make this match the original error targeting, while you can simply change the race of your desired units to creep, even if 100, it can be done fast.
 
(Deleted, sorry text from a wrong topic got paste here by mistake^^)

while you can simply change the race of your desired units to creep, even if 100, it can be done fast.

Is it mostly free of consequences ? :)
I can imagine things like:
- Some markers appearing on minimap
- Other spells hardcoded for creep race ?
- Abilities against undeads that won't be able to target them
etc...
 
Last edited:

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
Are function names also lost in the last steps of compilation (where the .j becomes a binary files) ?

At first, I could hook the TriggerRegisterXXXXXXEventXXXX, TriggerAddCondition, TriggerAddAction, TriggerExecute, TriggerEval


Is it mostly free of consequences ? :)
I can imagine things like:
- Some markers appearing on minimap
- Other spells hardcoded for creep race ?
- Abilities against undeads that won't be able to target them
etc...
- You mean those green, orange, red circles. Race is mostly a category for organization, but it also affects the building ability (e.g. if you change peasant race to undead, it will build like an undead acolyte), those circles only happen with neutral hostile. So the answer is no.
- Same as above
- Same as above

PS: I didn't really understand what you said first, .j becomes binary files? You can't hook functions anymore?
 
Level 8
Joined
May 21, 2019
Messages
435
I know, but I was trying to find a way that doesn't have consequences such as: you still can target the unit; you still have to make the error message, if there's already another message displaying then it will be overlaid.
And all this is quite lame because you can't make this match the original error targeting, while you can simply change the race of your desired units to creep, even if 100, it can be done fast.
Like OP said, this would mess with race based targeting such as mechanic, undead, living, and ancient.
If he can rule out that as an option, then manually changing 100 creeps is a "cleaner" solution, albeit a fairly time-consuming one.
 
Level 8
Joined
May 21, 2019
Messages
435
- Some markers appearing on minimap
- Other spells hardcoded for creep race ?
- Abilities against undeads that won't be able to target them
etc...
  • No, those are based on Neutral Hostile like Wrda said.
  • I'm not 100% sure about this, but I think that the Wander ability has interactions meant to immitate fleeing patterns from WoW when placed on a creep unit. This is because WoW was originally intended to be a Warcraft 3 mod, but it was ultimately scrapped. That's what I heard anyway, and I have observed this pattern in a map using it. It's fairly poorly coded, so I advice that you just don't use Wander on anything other than Neutral Passive units in the first place.
  • Yeah, changing everything to creeps will mess with race targeted abilities. In general, I tend to avoid those spells entirely, because I think they fit poorly in most RPG maps, but that's just a preference of mine.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
Dude, the race field of a unit has ABSOLUTELY NOTHING to do with unit classifications. You're making this a lot more confusing than it is. Wander ability has nothing to do with creep race. It's literally an ability you can add to any unit with any race on it.
 
Last edited:
1. You can try KABOOM! added into the mines. Make the range pretty small, but the area of effect as desired. It lacks the half damage feature, however. (AFAIR)
2. Not anything easy can be done on it. You can code your own impale for now.
3. Transmute is hard coded this way so it can be used on Frost Wyrm and Mountain Giants (a level 6 and 7 creatures respectively last I remember). Resistant Skin mitigates this ability (but also reduces the effect of others). I can't recall, is it possible to even change object race via triggers now? Might be an option if that is possible.
 
Thanks guys for all the help !!

1. About bombs I'll give up, it's not a drama in my map.
2. About impale, the existing Impale System 1.1c doesn't seem to match my need, and I am too lazy to code a triggered impale myself^^
3. I switched a few units to creep, but I hesitate to switch all the ~100 ennemy unit templates to creep race because of potential side effect...
 
Level 8
Joined
May 21, 2019
Messages
435
Dude, the race field of a unit has ABSOLUTELY NOTHING to do with unit classifications. You're making this a lot more confusing than it is. Wander ability has nothing to do with creep race. It's literally an ability you can add to any unit with any race on it.
When I said "Race" I meant unit classification. Sorry, I get a few things mixed up sometimes.

Actually, the Wander ability has a ton of weird features when used on a specific combination of classifications. Like I said, it was code intended for a WoW project using the WC3 client which ultimately never saw the light of day, but some of the functionality on the Wander ability is still in effect, which makes creeps flee to nearby creeps and pull them into battle. It may sound kinda cool, but it's pretty bad, often they end up just running around in circles while you are fighting another creep nearby.
You could try it for yourself and see. It's really weird.
 
Status
Not open for further replies.
Top