• 🏆 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!

[Solved] Casting Hidden Spells

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Is there any way to cast a spell (Active) from a unit, that the spell itself is hidden ?

I've tried Spell Book but it requires opening it manually and I don't want it to be like that.

If can, I would like to avoid making the spell iconless - as the spell tooltips would still appear if we hover the mouse to the intended UI coordinates.

TL;DR - A way to cast active spell that is hidden from UI of unit.
 
Last edited:
Level 12
Joined
Jan 2, 2016
Messages
973
How exactly do you want to cast it?
You can give x = 0 and y = -11 (not safe for macs, I always forget the number needed to make it safe for macs), and then activate the spell trough triggers.
However, the icon will act like it has x = 0 and y = 0, so if for some reason the movement icon is removed (for example the unit is a ward, or a structure) - the icon will become visible.
However, according to Wietlol (I haven't bothered trying to test it myself) - you can't use hotkeys to cast it.
However - you should be able to trigger it (I haven't really testet that either, as I only do this trick for passive abilities) :p

EDIT: The mac safe number is -268435456
 
Last edited:
Level 26
Joined
Oct 2, 2011
Messages
2,482
Well, I did it.
It might not be a suitable solution for you though since my way of doing it disables all UI, including tooltips.

If you just disable tooltips however (by making borders and background transparent), and change the abilitys icon to a transaparent one and removes the ability text, it will be as if it wasn't there. You need to disable the green outline that appears when you cast an ability too though.

I use those features in my current project WARDEN.

Otherwise I don't think there is another solution. I have been looking into this a lot myself.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Base your spell on "channel", duplicate each level with options Visible: checked/unchecked.
Regardless if spell is visible on UI or not - you still can use it in triggers. Switch between levels to give user possibility to cast it manually or not.

I forgot to mention that I need to use the default spell in the Object Editor, so no Channel because the spell has a unique mechanic, namely, Mirror Image.

I guess black border it is.

I tried moving the coordinate out of the maximum border of the UI and the game crashed.

EDIT:
Or I could fully trigger the creation of the Mirror Image, takes a lot of work, but still plausible I guess.
 
Level 12
Joined
May 22, 2015
Messages
1,051
I forgot to mention that I need to use the default spell in the Object Editor, so no Channel because the spell has a unique mechanic, namely, Mirror Image.

I guess black border it is.

I tried moving the coordinate out of the maximum border of the UI and the game crashed.

EDIT:
Or I could fully trigger the creation of the Mirror Image, takes a lot of work, but still plausible I guess.

There's a derpy trick you can try out - make a "powerup" item and create and give it to the unit manually with triggers. This forces the unit to cast the spell - however, the spell casts instantly, the unit needs an inventory, you have to make sure to clean dead items (powerups leak, essentially), and I haven't tested this specific ability, so I don't know if it will work.

It's worth a try for the simplicity of it.

I think there is also a target spell that creates an illusion - it's on wand of illusion or something. I haven't tested with that ability, but you might be able to make it work using some triggers and a dummy unit.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Not having problems with creating illusions.

I want the unit to use Mirror Image (as it is part of the spell).

And I know how to use the '852274' Order ID of Wand of Illusion but that is out of the topic because I want the unit to use/cast Mirror Image.
 
Level 26
Joined
Oct 2, 2011
Messages
2,482
Solution, but with a strange hotkey.

1. Create a hero and make sure it is not visible in the UI (Hero - Hide Interface Icon).
2. Set cast point (Art - Animation - Cast Point) for your main unit (the one who is supposed to cast mirror image) to 0.01.
3. Create a trigger for when selecting the hero, your main unit will recieve the mirror image ability, cast it, and then remove it.

This will result in your ability hotkey will be f1, f2 or something though.
 
Level 8
Joined
Jan 28, 2016
Messages
486
Is there any way to cast a spell (Active) from a unit, that the spell itself is hidden ?

I've tried Spell Book but it requires opening it manually and I don't want it to be like that.

If can, I would like to avoid making the spell iconless - as the spell tooltips would still appear if we hover the mouse to the intended UI coordinates.

TL;DR - A way to cast active spell that is hidden from UI of unit.

Your giving us conflicting information. You want a spell that is hidden but at the same time you want it to have an icon with tooltips? o_0

What Zibi had stated was probably on the right track I reckon. Here's how it would work:

Hidden Cast
Create a custom Channel ability that is visible, instant cast and with the Base Order ID as "mirrorimage" and give it to your unit along with the Mirror Image ability. Disable the Mirror Image via triggers (no need for a spellbook) and your done! Each time the custom Channel is cast, it will make the unit cast Mirror Image as well!
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Your giving us conflicting information. You want a spell that is hidden but at the same time you want it to have an icon with tooltips? o_0
I didn't know my English were that bad.

If can, I would like to avoid making the spell iconless
This is a cheap approach for spells to be casted by the unit (while still hiding the spell icon from the Unit's UI) but the tooltips will still appear if we hover the cursor/mouse to the designated coordinate of the spell (based on Object Editor).

What I'm trying to simply say was that, I would like to avoid using this aporoach - if possible.

And btw, I still want the unit to cast the original Mirror Image, instead of triggered ones (Channel) because I want the unique effect of the spell - where when you cast a Mirror Image, a relocation would apply to the caster and whalaa! 2-3 illusions scattered around the original unit.

And that was why, I mentioned this;
EDIT:
Or I could fully trigger the creation of the Mirror Image, takes a lot of work, but still plausible I guess.
I would have to fully trigger it (of course using Channel as base ability and mimic everything based off of Mirror Image spell).
 
Level 8
Joined
Jan 28, 2016
Messages
486
This is a cheap approach for spells to be casted by the unit (while still hiding the spell icon from the Unit's UI) but the tooltips will still appear if we hover the cursor/mouse to the designated coordinate of the spell (based on Object Editor).

What I'm trying to simply say was that, I would like to avoid using this aporoach - if possible.

And btw, I still want the unit to cast the original Mirror Image, instead of triggered ones (Channel) because I want the unique effect of the spell - where when you cast a Mirror Image, a relocation would apply to the caster and whalaa! 2-3 illusions scattered around the original unit.

And that was why, I mentioned this;

I would have to fully trigger it (of course using Channel as base ability and mimic everything based off of Mirror Image spell).

I think we're getting lost in translation. What I proposed will hide your Mirror Image spell and still work when cast with a Channel-based ability that has its Base Order ID changed to "mirrorimage." The tooltip in the Channel ability can be easily edited to display the Mirror Image tooltip and the unit will also do the whole disappear-and-reappear-in-a-random-position-with-illusions thing.

As far as I know, it is impossible to have an active ability hidden from the UI and still be castable without the use of triggers or the Channel ability.
 
Status
Not open for further replies.
Top