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

Set spell UI position in a spellbook

Level 8
Joined
Nov 20, 2011
Messages
202
Background:

You can add a spell to a spellbook by putting the spell into a dummy spellbook with the same order ID. Afterward, you only need to disable the dummy spellbook and add it to the unit. For more information, see:
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/mysteries-spellbook-33039/

The main issue with this method is that the UI position of the added spell is ignored. So if you have the following abilities (identified by their hotkeys): Q, W, E, R, and you add them in the right order via trigger, the icons will jump to random positions. If your R spell is on the left and the Q one is on the right, this can be really frustrating!

Is there a way to set the spell's position?

The solution is an invisible placeholder dummy spell. As for the base of the dummy spell, you can use anything. This dummy spell will need to be disabled for all players.

Now you can set the spell's position easily. You just need to add the placeholder dummy ability to the dummy spellbook as many times you need it. If your spell should appear in slot 6, just add the placeholder 5 times and then the main ability:
attachment.php


In-game result:
attachment.php



If you try to use slot 12 by moving the Cancel button somewhere else, you will fail because spellbooks are designed for just 11 spells.

So is there a way to use slot 12?

The answer is yes, but it is not a perfect method as you can just use slot 12 if slot 11 is already occupied.

To place your spell in slot 12, you need to configure the spellbook similar to how you would configure it for slot 11. Now you have 2 spellbooks that use slot 11. The spellbook of the ability, which is supposed to appear in slot 12, will be added last.

In-game result:
attachment.php


I hope I could help you!
 

Attachments

  • Tutorial_1.png
    Tutorial_1.png
    91.6 KB · Views: 1,569
  • Tutorial_2.png
    Tutorial_2.png
    114.2 KB · Views: 1,475
  • Tutorial_0.png
    Tutorial_0.png
    1.2 KB · Views: 1,323
Last edited:
Level 16
Joined
Dec 15, 2011
Messages
1,423
I believe this is too simple to be a tutorial.
Also you can simply use button position x / y in the OE to change where your spell is in the menus.

It is simple but nonetheless a neat one. I vote for approval.

Using OE fails if you want to add spells to the spellbook with dynamic positioning. OE only allows for only one single arrangement.
 
Level 8
Joined
Nov 20, 2011
Messages
202
Ofc you are right my english sucks realy hard, i tryed my best and i will try to fix the mistakes i find.

I must admid that the tutorial is realy small, but a solution to this was often asked and never mentioned in any tutorial. So i think there is a usefulness for this.
 
Top