[Spell] Custom "Archon" Merge - 'Works' But Bad UI/UX

Kyrbi0

Arena Moderator
Level 37
Joined
Jul 29, 2008
Messages
8,960
So I wanted to design, as simply as possible (i.e. mostly OE, few if any GUI triggers) a basic "Protoss Archon Merge" ability (Basically: select two units of the same kind, click a button, they merge together and, after an 'evolving' period, a new 2nd kind of unit is created. The original units are permanently lost (unless you cancel out of the 'evolving' period), the new unit has resources costs that are taken into account)

And amazingly, it was actually almost as easy as I'd hoped, due to how robust the in-game "Dis/Mount Hippogryph" ability-combo is (the one that mounts Archers to Hippogryphs). Turns out you can "merge" into a building, and a building can "upgrade" into a unit! Crazy. See the attached test map (NOTE: It's made in v1.26)

===

Basically it entirely works but for one issue: bad User Interface/Experience. The resource costs don't appear on the tooltip (like with Destroyer Form) (technically I could put something manually in the tooltip, and probably will, but it won't have the little gold/wood/food symbols)). But much more importantly, if the player has insufficient resources... it just does nothing. No "not enough X" racial voice line, or even any error message at all (which, I suppose, I could simulate with SimError, though someone would have to help me find a copy with Wc3C down...). It just stops at the "mid-step" (the dummy building that upgrades into the final "archon" form; "Voodoo Golem Embryo" in my map), not backing out like my triggers try to do.

Technically, I could live with this. It does basically work, as long as you have enough resources, and doesn't if you don't. BUT, I've learned there's some value in caring about little confusing gameplay experiences like this, and confusing players can be detrimental to overall design.

===

I'm aware of this excellent resource, but like I said I'm trying to do this A) simply & B) by myself. I'm also aware of this thread (I should hope so, I posted in it), and if push comes to shove I can probably retrofit the working map/code at the bottom of that thread to work for me (needs to maintain unit HP & have the intermediary 'evolving' phase), but again, trying to solve this particular problem.

Here's the offending code, so you don't have to download the map:

  • AutoMerge
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Voodoo Golem Embryo
    • Actions
      • Game - Display to (All players) the text: ENTERS
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Player 1 (Red) Current gold) Less than 100
              • (Player 1 (Red) Current lumber) Less than 100
              • ((Player 1 (Red) Food used) + 6) Less than or equal to (Player 1 (Red) Food cap)
        • Then - Actions
          • Unit - Order (Entering unit) to Night Elf Hippogryph Rider - Decouple
        • Else - Actions
          • Unit - Order (Entering unit) to train/upgrade to a Voodoo Golem
===

Thanks in advance.

//EDIT// - Alright I was testing it again & apparently I changed something a while back & forgot to document it, because now it doesn't seem to care about Food Costs at all. Being over in food (default from the start of the map, sans "pointbreak" cheat) doesn't stop the "Archon" from being merged whatsoever.

Criminy.
 

Attachments

  • TEST - Archon Merge.w3x
    17.9 KB · Views: 16
Last edited:
Level 18
Joined
Oct 18, 2008
Messages
883
1626511096933.png

a result of brainstorming with tasyen about putting custom stuff on top of tooltips

sound and error text aren't that hard to do
of course you could just use a dummy transformation/upgrade/charge gold and lumber and then order the units to cast the hidden mount hippogryph after they've paid the cost
 

Attachments

  • Detect_CommandButton.w3x
    20.3 KB · Views: 18

Kyrbi0

Arena Moderator
Level 37
Joined
Jul 29, 2008
Messages
8,960
View attachment 383806
a result of brainstorming with tasyen about putting custom stuff on top of tooltips
Hm, thanks. But what version do I need to open the map in?
//EDIT// - So it doesn't open in v1.26 (which I primarily use). Opened in Reforged, so I won't be able to use it until I finish & port things over. But thanks.

sound and error text aren't that hard to do
"Aren't that hard" for you I suppose, but that's why I'm asking for help : ). Can you point me to where someone has solved that (map/system/code/etc)?

of course you could just use a dummy transformation/upgrade/charge gold and lumber and then order the unit to cast the hidden mount hippogryph after they've paid the cost
hey that's not a bad idea... I've never actually messed with CG/L but I imagine it's pretty straightforward.
//EDIT// - Ok so I just checked & realized the one issue; it doesn't check for Food. I would think a simple trigger checking the food & stopping the spell should work, but (as you'll see in my map) that doesn't quite work out.

Unless I'm doing it wrong?
 
Last edited:
Level 18
Joined
Oct 18, 2008
Messages
883
Hm, thanks. But what version do I need to open the map in?
the latest, I guess? if you mean that you want it to work in older ones, well, it probably won't. I guess you'd have to consult dracolich and his memhax instead.

"Aren't that hard" for you I suppose, but that's why I'm asking for help : ). Can you point me to where someone has solved that (map/system/code/etc)?
something like this will pretty much serve to play the sound
1626543246126.png

if you want it to be able to overlap with itself then you'd need to do a bit more, but I'm not sure how relevant that is.

I've always just used normal text messages for this kind of thing but if you want to mimic the color and location on screen you'd need to experiment a bit to make it match.

DisplayTextToPlayer takes player toPlayer, real x, real y, string message returns nothing

as I understand x and y are supposed to be able to change where it appears on the screen. I assume it will still be pushed upwards by any other messages, so if you want it to match perfectly you'd use a custom textframe instead. if you're in a version that has those.
 

Kyrbi0

Arena Moderator
Level 37
Joined
Jul 29, 2008
Messages
8,960
OK so I checked and while I'm not sure it's backwards (It's [Food Used/Food Cap] on the resource bar, correct?)... I'm not sure what to think anymore.

I had given the "mid-phase" (a building) a Food Cost (same as the final 'Archon' phase), in the hopes that it would catch that when trying to Merge & kick out the regular error message. No luck. I realized the Food Cost was exactly equal to 2 of the "merge-ing" units (3 + 3 = 6), and that the game basically deletes the "merge-ing" units so it makes sense that, if it's fast enough, that the game basically doesn't see it as increasing the Food so it's all good.

Except when I made the two other forms have a higher Food cost (7), it still works, and just goes one higher (even though I'm already past the cap).

I've tried a few other things, as well as including a little debugging trigger to tell me what my Food Used was compared to Food Cap at all times, which "helped"... But it's still letting me make the dang 'Archon' when I don't have enough Food.

It's amazing how simple such a thing can be, and yet be so broken. :<
 
Level 17
Joined
Mar 29, 2020
Messages
1,019
OK so I checked and while I'm not sure it's backwards (It's [Food Used/Food Cap] on the resource bar, correct?)... I'm not sure what to think anymore.

I had given the "mid-phase" (a building) a Food Cost (same as the final 'Archon' phase), in the hopes that it would catch that when trying to Merge & kick out the regular error message. No luck. I realized the Food Cost was exactly equal to 2 of the "merge-ing" units (3 + 3 = 6), and that the game basically deletes the "merge-ing" units so it makes sense that, if it's fast enough, that the game basically doesn't see it as increasing the Food so it's all good.

Except when I made the two other forms have a higher Food cost (7), it still works, and just goes one higher (even though I'm already past the cap).

I've tried a few other things, as well as including a little debugging trigger to tell me what my Food Used was compared to Food Cap at all times, which "helped"... But it's still letting me make the dang 'Archon' when I don't have enough Food.

It's amazing how simple such a thing can be, and yet be so broken. :<


I'm not sure I caught everything flying here, but it seems you found yet another instance where using built in blizzard functions seems simpler but has a lot of hidden surprise setbacks.

I would suggest just triggering the ability from the bottom up, and that will give you much more control over catching the different points and customizing what you want.

this seems pretty similar and may be helpful.

In terms of the UX - once you have the "handles" for all of the events you can just attach an error noise to the unit, and send a yellow (or whatever tickles your fancy) error text to the triggering player. I can attach an example trigger from one of my maps where I did this if that would help.
 

Kyrbi0

Arena Moderator
Level 37
Joined
Jul 29, 2008
Messages
8,960
it's wants "greater" instead of "less" or other way around
Turns out you were totally right, lol. Don't know how I missed that, but now that part of it is working again (stops & gives the natural 'not enough food' error), so thank you.

I'm not sure I caught everything flying here, but it seems you found yet another instance where using built in blizzard functions seems simpler but has a lot of hidden surprise setbacks.

I would suggest just triggering the ability from the bottom up, and that will give you much more control over catching the different points and customizing what you want.

this seems pretty similar and may be helpful.
If I were to go the "trigger it from the ground up" route, I would just use one of the examples I linked in my original post.

In terms of the UX - once you have the "handles" for all of the events you can just attach an error noise to the unit, and send a yellow (or whatever tickles your fancy) error text to the triggering player. I can attach an example trigger from one of my maps where I did this if that would help.
I wouldn't mind seeing it, if you have it handy.

===

However I've realized something important: if I treat it like the Hippogryph Rider (which has exactly 4 Food, a combination of Archer (2) & Hippogryph (2), and is treated as a direct replacement), I don't actually need to worry about the Food cost/cap thing. The game treats it like the same entity & allows you to Mount freely, even when over cap! (I tested & it actually allows you to continue going over cap even (i.e. you make the Hippogryph Rider's Food cost 5, so it increments by 1 every time you merge)).

So I guess I don't need to care about the Food thing as long as I always ensure the "Voodoo Archon" has a Food cost equal to two "Ritualists". :thumbs_up:

(still gotta do the Food/Wood thing but hey)
 
Level 17
Joined
Mar 29, 2020
Messages
1,019
I wouldn't mind seeing it, if you have it handy.

  • Then - Actions
    • Sound - Play Error <gen> at 100.00% volume, attached to (Triggering unit)
    • Custom script: set udg_soundgroup = bj_FORCE_PLAYER[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]
    • Game - Display to soundgroup the text: |cffffff00the druid...
above is the relevant part...

here is the full thing if you need the context

  • otterform
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Otter Form (Channel)
          • (Ability being cast) Equal to Night Elf Form (Channel)
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain pathing at TempPoint of type Walkability is off) Equal to True
        • Then - Actions
          • Sound - Play Error <gen> at 100.00% volume, attached to (Triggering unit)
          • Custom script: set udg_soundgroup = bj_FORCE_PLAYER[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))]
          • Game - Display to soundgroup the text: |cffffff00the druid...
        • Else - Actions
          • Unit Group - Add (Triggering unit) to MorphGroup
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (morphloop <gen> is on) Equal to False
            • Then - Actions
              • Trigger - Turn on morphloop <gen>
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
I made this a while ago and don't really remember the exact process but it looks like I may be leaking a player group...
 
Last edited:
Top