[Spell] Help with a Biomancer?

Level 2
Joined
Mar 16, 2010
Messages
17
Hey all! I need some help with an ability I was making for my biomancer hero.

His ultmate, it was supposed to do two things:

If cast on an enemy it would work exactly like Hex, but the target would still be able to attack(melee).

If cast on self it would shapeshift the hero(a mage) into a brawler with a different set of skills.

I tried but I got stuck with the first part, how can I morph an enemy unit?
 
Level 8
Joined
Jan 28, 2016
Messages
486
1) I'm pretty sure Hex is hardcoded to disable attacks. You could try using Leandrotp's SilenceEx but it might be a bit of a stretch to implement. Otherwise you could try using the solution below to morph a target unit but I'm not sure how to make it work (I might have an idea though).

2) You can use a passive transformation to morph your Biomancer instantly when casting on himself. This method is permanent however so create another copy of the morph ability, swap the original units around in the data fields and use that to transform back. :D
 
Level 2
Joined
Mar 16, 2010
Messages
17
So if an enemy is hit he should be silenced and have his model changed?

And if self cast the entire hero should be replaced.



Basically, yes.

I would like to add some other effects such as move speed decrease and such but it is rather easy to implement later.

2) You can use a passive transformation to morph your Biomancer instantly when casting on himself. This method is permanent however so create another copy of the morph ability, swap the original units around in the data fields and use that to transform back. :D

Ehhr, I'm too noob to comprehend what you are suggesting XD

But yeah, it is basically a "morph target unit" that gets a different unit if target on self.
 
Level 8
Joined
Jan 28, 2016
Messages
486
Ran a few tests and managed to get the self-transform to work but I don't know how to change the model of another unit without using a Hex-based ability. :(
 
Level 13
Joined
Jul 1, 2008
Messages
1,314
There would be a quite "labor-intense" workaround for that silencing part of other units, which I would only suggest, if there is no other way and/or only a few target possibilities for this ability. But I am assuming, we are talking about some kind of hero arena?

Anyway, I was thinking of doing everything by hand.
So basically you would have to check for every ability, the target unit could have and then disable it by hand for the respective player, store players and abilities in variables and then enable the abilities again after some time. To indicate this for the given player, just add a placeholder ability to the target unit, which tells the owner, that it has been hidden by this spell. Self-Restricted Tornado Aura is quite cool to add buffs without any other effect. Remove this placeholder again after the reset. Disabling abilities is better then removing and giving back the ability, because disabling does not disturb cooldowns. This affects all units of the player though, so it really depends on your special case, if my suggestion is even possible for you.

I know, this is kind of crazy but at least it would work. Maybe you could also think of only disabling ultimate abilities or abilities of a certain kind in order to minimize the amount of abilities to search for ...

Did you already check out the ability guide(s) mentioned above? There is also a "known buggs" and "wierd" ability guide, maybe there is some nice possibility just waiting to be exploited :)
 
Level 12
Joined
Jan 2, 2016
Messages
973
Well, I'm kind a talking empty-handed here.
Like.. I don't know if my idea would work, since I haven't tested it, but:
Why don't you try to Metamorph the enemy:
make a trigger:
add spell to the unit (metamorphosis), and order the unit to use the skill.
And the model of the transformed version should have no spells.
 
Level 2
Joined
Mar 16, 2010
Messages
17
Thanks for the support guys! But don't worry too much, I'm was just messing around WE to see if I could make a hero concept playable for the sake of illustration. No projects being held by this issue!

About the effect on enemy, Emm, there is no problem to be an actual silence. The core idea of the skill is:

Reduces target's range to melee.
Reduces base move speed.
Reduces stats (or another debuff).
Silences.
And to have the real feeling of a alternate Polymorph: replaces the enemy model with a disgusting creature.

On Self it would make melee and replace your skills.

I don't think metamorphosis related spells will properly work because it requires the base unit and the metamophed counterpart, no?

Since I'm not planning on further development I guess the Metamorphosis could work against the test dummy, but it wouldn't work if anyone copied the hero concept to his/her map.
 
Level 8
Joined
Jan 28, 2016
Messages
486
It sucks though because aside from allowing the hexed units to attack (which is still technically possible), the rest can be achieved without a great deal of effort.

Why don't you try to Metamorph the enemy:
make a trigger:
add spell to the unit (metamorphosis), and order the unit to use the skill.
And the model of the transformed version should have no spells.

Edit: Okay so I went out and tested this. What I did was give a Footman and a Rifleman my custom Bear Form which had the original unit type as Footman and the alternate as Knight with Vampiric Aura. When the Footman casted it, it morphed normally (as expected) however the Rifleman didn't. But there was a catch; the Rifleman gained the aura but it didn't transform! And when casting Bear Form again, it would remove the aura even though the order ID was still "bearform" rather than "unbearform." Casting Bear Form once more added the aura again without morphing.

Now I don't know if this is of any use to anyone but it's one of those oddities of WC3 that might be valuable to someone out there so I thought it'd be worth mentioning. Will be back after some more tests and maybe a test map too.

Edit2: Did some further testing but nothing happened apart from morphing glitches. I also looked into Hex and Polymorph to see if changing the "Data - Morph Units" field to a unit type with an attack would possibly resolve your attack-while-hexed issue; it didn't. The unit was morphed but still suffered from the exact same effects of the default Hex. Seems to be hardcoded that way. :(
 
Last edited:
Level 2
Joined
Mar 16, 2010
Messages
17
Yeah, thanks anyway :/

Last problem :

If I give the enemy unit the morph spell and order him to cast it. It won't work if the unit is stunned right?
 
Level 12
Joined
Jan 2, 2016
Messages
973
probobly not, unless you remove all buffs from the unit before that (or at least all the stuns)

But as Dehua said - Bear form should work as well - it doesn't need to be cast. You just give the skill to the unit, and remove it right after that.
Just keep in mind that you should put the tansformed form under the "Normal form" field.
 
Level 7
Joined
Nov 19, 2015
Messages
283
Have you tried using the Chaos ability. Adding the chaos ability will change the unit model and attacks. Just set a timer to remove it afterwards.

I wouldn't recommend forcing the other unit to use morph as it can mess up other things. eg. If they also have a morph spell
 
Level 2
Joined
Mar 16, 2010
Messages
17
I couldn't do the Bear Form trick :/

I gave the ability to the target of the dummy spell and ordered it to use Bear Form. Nothing happens :/

P.S. I've changed the data values accordingly.
 
Level 8
Joined
Jan 28, 2016
Messages
486
Yeah it's a little tricky to pull off the first time, but once you get it... you get it.

To make it work you need to add then remove the same Bear Form ability from the unit with triggers. Here's the bear minimum for it to work:
  • Bear Form Trick
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Biomancer Ultimate
    • Actions
      • Unit - Add Bear Form (1->2) to (Triggering unit)
      • Unit - Remove Bear Form (1->2) from (Triggering unit)
To transform back, you perform the same actions (add/remove) with the other Bear Form ability.

P.S.: Apologies for the terrible puns! :p
 
Level 2
Joined
Mar 16, 2010
Messages
17
Waaaait... if I do this the unit will turn from 1 to 2 without casting anything? That's why I didn't understand the first time you said! XD

I can tolerate some puns because you know, free help XD

Thanks!
 
Level 8
Joined
Jan 28, 2016
Messages
486
Exactly, no need to order the unit to 'bearform' just add/remove and done. There are a few catches with this technique however, which I'll copy over from the tutorial I posted earlier in the thread:
  1. If the unit is hexed when you try to transform it, the unit will permanently gain some movement speed. (also named the 1.25 bug)
    This can be avoided by simply checking whether the unit is hexed or not before transforming it. (then use whatever method you see fit to make sure it transforms when it stops being hexed)
  2. If the unit you morph to uses animations with a tag (like "alternate"), and the unit is currently idling, it will stay in its base animations (with no tag) until it stops idling.
    This can be avoided by manually adding the tag to the unit.
    • Animation - Add the alternate animation tag to YourUnit
    The following two bugs were found in this blog by this awesome bloke, FightFightFight.
  3. If transformed unit does not have vision over the target of his current order during transformation, the order will be interrupted.
  4. Transforming into a unit with zero base MS this way totally screws ensnare and entangling roots.

    My own note here.
  5. The transformation is permanent; if you need to revert it after X seconds, then you'd need to keep track of it with a timer/periodic event and a hashtable/indexing. Ya know, that sort of thing.
Also this is how I thought fellow members would've reacted to my humor :grin:
2eaa4c004b50a3afe00036d03bc3669a3dbfe92fa8a5320bee236aca3565a5db.jpg
 
Last edited:
Level 2
Joined
Mar 16, 2010
Messages
17
Errr, I still can't do it! And I can't find where I messed up.
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Shapeshift
  • Actions
    • Unit - Add Morphed Enemy to (Triggering unit)
    • Unit - Remove Morphed Enemy from (Triggering unit)
Shapeshift is based on Channel with target unit cast.
Morphed Enemy is based on Bear Form with Normal - Ghoul; Alternate - Abomination.
 
Level 8
Joined
Jan 28, 2016
Messages
486
That WereElf is spot-on with both points. The trigger I wrote up was an example for how to implement the bearform trick only; I probably should've done something like this to make it relevant to the thread.
  • Another example but better!
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shapeshift
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target unit of ability being cast) Equal to (Triggering unit)
        • Then - Actions
          • Unit - Add Bio-Morph (1->2) to (Triggering unit)
          • Unit - Remove Bio-Morph (1->2) from (Triggering unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Ghoul
            • Then - Actions
              • Unit - Add Morphed Enemy (1->2) to (Target unit of ability being cast)
              • Unit - Remove Morphed Enemy (1->2) from (Target unit of ability being cast)
            • Else - Actions
In this example, I simply added a couple of checks to see if the target is also the caster or if it's of unit-type Ghoul; else it won't do anything.
 
Level 2
Joined
Mar 16, 2010
Messages
17
It's working on my hero on self cast and on the enemy, I can't remove the skills from my hero (to give the new ones) and them revert it.

my triggers:


  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to SHAPESHIFT
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Target unit of ability being cast) Equal to (Casting unit)
      • Then - Actions
        • Set MorphedHero = (Casting unit)
        • Unit - Add Morphed Self to (Casting unit)
        • Unit - Remove Morphed Self from (Casting unit)
        • Player - Disable Manta for (Owner of (Casting unit))
        • Player - Disable Puffer Fish for (Owner of (Casting unit))
        • Player - Disable Symbiote for (Owner of (Casting unit))
        • Player - Disable SHAPESHIFT for (Owner of (Casting unit))
      • Else - Actions
        • Unit - Add Morphed Enemy to (Target unit of ability being cast)
        • Unit - Remove Morphed Enemy from (Target unit of ability being cast)
        • Set Enemy_Morphed = (Target unit of ability being cast)
        • Trigger - Turn on Enemy Reversal <gen>
  • Hero Reversal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Return Form
    • Actions
      • Unit - Add Morphed Self Reverse to (Casting unit)
      • Unit - Remove Morphed Self Reverse from (Casting unit)
      • Player - Enable Manta for (Owner of (Casting unit))
      • Player - Enable Puffer Fish for (Owner of (Casting unit))
      • Player - Enable Symbiote for (Owner of (Casting unit))
      • Player - Enable SHAPESHIFT for (Owner of (Casting unit))
 
Level 8
Joined
Jan 28, 2016
Messages
486
Ahk I see. WereElf's answer will work only if the 'new' abilities have the same targeting options, otherwise the targeting options of the 'old' ability will still apply.

Explaination
  • Example 1: Manta and New Manta are both unit-target abilities; they'll work fine.
  • Example 2: Puffer Fish is instant cast but New Puffer Fish is point-targeting; New Puffer Fish will still be instant cast.
Yeah it can get real messy so you'll have to be careful. I'll probably go back and add it to the list.
Meanwhile, WereElf also has the solution to his own post above if the abilities are removed after shape-shifting.


Another possibility is to do something similar to what you did Kike and expand on that. Assuming your okay with the spell being MPI, you could do this:
  1. Save the 'old' ability levels into integer variables as you're morphing.
  2. Disable the 'old' abilities (as you've already done).
  3. Add the 'new' abilities and set them to the corresponding levels.
  4. Remove them when the duration is over and enable the 'old' abilities.
You could also use WaterKnight's trick to disable the all the 'old' abilities in one action instead of each separately.
 
Level 2
Joined
Mar 16, 2010
Messages
17
The Engineering Upgrade didn't work. Looks like a glitch, the spell fails to transform my unit if the transformation has it :/

@Dehua

Yeah, the abilities are very different on cast to do this them. But I'm not working with levels on skills since it is just a test. Every skill has only one level XD

But why when I removed and added the old abilities they didn't show up?
 
Level 12
Joined
Jan 2, 2016
Messages
973
Alright...
There is one last suggestion from me. It's a bit more complicated than the rest, and it may require some jass knowledge, or at least extended triggers knowledge, but it's bound to work:

Make a unit type of the transformation for the enemies (you probobly already have that).
Then when you cast the ability on an enemy unit - hide the unit, create a unit (of the beastial type) on its place, with owner = the owner of the hidden unit.
Do a check - if the owning player of the unit, had it selected (before hiding it) - re-select it for the player.
Add a timed life to the new unit, and either start a timer (if you know jass), either use a "wait" = the timed life of the beast unit - 0.1 seconds.
Link together the hidden unit, with the beast unit. Either trough indexing, either trough a hashtable.

If you want to be able to use this spell on heroes - you also need a DDS:
every time the beast takes damage - set the linked hero's life to the same % as the beast's life.

When the wait/timer is over - if the beast is alive, set the hidden unit's life to the same % as the beast unit, set its location to the beast unit's location, remove the beast unit, unhide the original unit. If the beast is dead - remove the hidden unit from the game.

If you want the beast to have relative HP/armor/damage to the original unit, then I'm sorry, but you'd need bonus mod (or at least you need to re-create parts of it) :p
You don't need many bearform/metamorphosis skills to do this :) It works on all unit types.
 
Level 8
Joined
Jan 28, 2016
Messages
486
Alright so this might be considered as a mini-necro but I wanted to get this all sorted once and for all. With a test map of course!! :D

It took me a while to get it right with the spell triggers, commands, etc. but it involves two partially customised Heroes that morph using 2 different methods; Method 1) The Demon Hunter uses a custom Metamorphosis to morph himself (instant cast) and Method 2) The Keeper uses a combination of a Channel-based ability (unit targeting) with the Bearform trick to morph himself or damage enemy units.

The documentation in the map and in-game should be self-explanatory but for clarification on the problems and solutions with both methods, check the spoiler below. Heads up, it's a bit of a read.

Method 1: Using a transformation ability
This is essentially covered in WereElf's thread but to sum it up:
  • Problem:
    When adding Engineering Upgrade to a transforming unit (Eg: Metamorphosis), abilities that are meant to be replaced are reset and the abilities in the Eng Upgrade data are removed. For instance, if Mana Burn was to become Fan of Knives when morphed, Mana Burn will be removed, set to 0 and reappear in the hero skill tab even when all points are spent; the Eng Upgrade (and hence Fan of Knives) will be removed as well.
  • Solution:
    As stated in the link above, setting Eng Upgrade as 'Permanent' with the Jass function UnitMakeAbilityPermanent() will prevent its removal when morphing.

Method 2: Using a unit-targeting ability and Bearform
In the second method, we're using the Bearform trick to morph a specific unit type (in this case, the caster) when targeted with an ability rather than a self-transformation.
  • Problem:
    When applying this method, the abilities of the alternate Hero (i.e.: the unit you want to transform into) are not added but the unit still morphs (has alternate unit's icon, model, armour, etc.). For example, the Keeper in the test map has Cluster Rockets as one of its initial spells. When the Bearform trick is performed, it should have Flame Strike in its alternate form; instead it still has Custer Rockets.
  • Solution:
    Adding/removing a custom Eng Upgrade with Cluster Rockets-into-Flame Strike will transform the spells back and forth.
  • The Catch:
    There is a critical side-affect to this solution however; the alternate spell retains the initial spell's targeting options (i.e.: Instant, Unit-targeting, Passive) and certain other effects. Therefore turning a passive into a point-targeting active won't work; it will still act as a passive even though the icon, tooltips, etc. are updated. The alternate ability needs to have the same targeting type for it to work properly at all. The only solution to this problem is to set the alternate ability to the Eng Upgrade itself (it won't appear in the command card as it will be disabled) and add the ability you want through triggers. This creates its own issue of the cooldowns of each spell acting independently, unlike when using Eng Upgrade. Unfortunately that's as good as it gets...
Well that's it. This probably won't fit perfectly for your Biomancer hero Kike but for you, and anyone else wondering, this should be a good demonstration of the limits and capabilities of using Engineering Upgrade and Bearform.
 

Attachments

  • [Test] Eng Upgrade & Bearform.w3x
    15.8 KB · Views: 88
Last edited:
Level 2
Joined
Mar 16, 2010
Messages
17
Thank you very much for your colaboration! It's a shame we came up with so many ideas but in the end the limitations of the system made this task too big >.<

Let's just accept Shapeshift was too beautiful for this world xP

See ya!
 
Top