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

[Trigger] oddities behind command card stacking

Status
Not open for further replies.
Level 10
Joined
Oct 5, 2008
Messages
355
hello there,

i wanted, to improve a system of mine, to stack abilities dynamically on the same command card space to arrange the abilities in a nice looking order. For testing purposes, i created the test map in the attachement.

it consists of a blank space in which you can summon a footman. you can stack abilities on his command card by typing:
n: removes the last unit and creates a footman
n1: removes the last unit and creates a fresh knight
a: places abilities a,b,c in that order
b: places abilities b,a,c in that order
c: places abilities c,a,b in that order
a1: places abilities a
b1: placed ability b
c1: places ability c
d1: places ability d
r: removes ability a,b,c

When first adding the abilities, everything works as intendet: the first ability gets placed on the matching space, and every other ability placed afterwords stacks behind it, which is fine.

Now comes a weird part, you remove them all and try to stack them in a different order. What happens is that they get stacked the exact same way they were stacked before, even though you try a different combination.

Well, after removing the last unit and try it on a fresh one of the same type, the same happens. The abilities retain their order from the first try.

this is very pesky for us, and the worst part: the same thing retains itself when you create a new unit type (like a knight) and try a new order.

what is worse: removing one ability (like b) and adding a new replacement (like d) doesnt shove the new ability on b's old place, it will be stacked behind the other abilities. adding ability b again will result in it placed at its old place, puahing d further backwards.

So it seems the stacking rules are independent of the unit and retain for the rest of the game after they were applied the first time on a unit via trigger.

I write this to share my experience with this behaviour and to ask if someone found a consistend way to stack the command card fluently via triggers.
 

Attachments

  • test command card.w3x
    13.1 KB · Views: 20

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
WC3 was not really designed to stack command card icons so I doubt behaviour with that regard was as strongly defined as in StarCraft II. It is possible the inconsistencies or problems you are suffering are a result of internal ordering. Maybe a sorted list is used internally? Or perhaps caching?
 
Level 10
Joined
Oct 5, 2008
Messages
355
You got a point there. They seemed to be aware of the possibility that some people stack them, since there was quite a change in that regard between tft and roc.
In roc, the behaviour was more strict, since the x and y coord where set as absolute minimal. This caused to giving a hero 3 auras and an ultimate leading to one aura and the ultimate to not show on the command card, while still having free spaces.

It could be that exactly this change causes this behaviour, since at one point you need to give an ability a coord on the command card that doesn't fit in line, which requires internal ordering.
It would be interesting then to kbow how this behaves with multiple players.
 
Status
Not open for further replies.
Top