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

Shipwrecked MUI v1.02

This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
Spell Description :

Proudmoore calls upon the power of the seven seas, dealing damage per 0.5 seconds to a target enemy for 5 seconds. Afterwards, he sends forth furious waves which instantly kills the enemy unit if its health is below 25% and stuns it if not. Proudmoore himself gets stunned if the target enemy dies before sending the final waves.

Importing :

1 - WE > File > Preferences > Check "Automatically create unknown variables while pasting trigger data".
2 - Copy and paste all the custom abilities to your map (main ability plus 5 dummy abilities).
3 - Copy and paste all the dummy units to your map (5 in total).
4 - Give the main ability to the hero you want to use it on.
5 - (Optional) Export shipwrecked.mp3 from the sound editor and import it to your map.
6 - Copy the trigger category named Shipwrecked to your map.
7 - (Optional) Edit the "SW Damage" variable to your liking. Damage dealt is "strength of hero x level of ability" by default.
8 - You may have to manually edit the triggers involved with the object editor because Blizzard.

Video :


Changelog :

- v1.0 : Uploaded.
- v1.01 : Removed leaks.
- v1.02 : Stuns are now working as intended again, was broken in v1.01.

Notes :

Created using WE version 1.32k (6114).

My first MUI ability.
Probably the last one as well.
Contents

Shipwrecked MUI v1.02 (Map)

Reviews
MyPad
SHIPWRECKED!! This spell is quite an oddity compared to the rest of them. The soundtrack that plays upon a successful execution oozes with such personality that helps differentiate it, which plays to its strengths as a blatantly obvious spell. How...

SHIPWRECKED!!


This spell is quite an oddity compared to the rest of them. The soundtrack that plays upon a successful execution oozes with such personality that helps differentiate it, which plays to its strengths as a blatantly obvious spell. How Admiral Proudmoore gets stunned when his target dies before the wave of execution, we will never know.

There's a lot to tackle here, so this will take a while to unpack.

  • Oddly enough, this trigger responds to a spell effect event, which makes the name of the trigger a misnomer.
    I see where you're going with this, but I would suggest making a separate config trigger for all the configurable
    values, which will run on initialization.

  • Building on the point on the name being a misnomer, I suggest renaming this into SW Cast or SW Effect.

    • For each (Integer SWLoop ) from 1 to SWIndex , do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • And - All (Conditions) are true
              • Conditions
                • (SWTarget[SWLoop] is dead) Equal to False
          • Then - Actions
            • Special Effect - Create a special effect attached to the overhead of SWTarget[SWLoop] using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
            • Special Effect - Destroy (Last created special effect)
            • Unit - Set life of SWTarget[SWLoop] to ((Life of SWTarget[SWLoop]) - (Real(SWDamage)))
          • Else - Actions
        • Set Variable Set SWCounter[SWLoop] = (SWCounter[SWLoop] + 0.50)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • SWIndex Equal to 0
          • Then - Actions
            • Trigger - Turn off (This trigger)
          • Else - Actions
    The trigger above will not stop in its current state, since the evaluation of the stopper block (SWIndex == 0) never returns true.
    This is because the loop runs while SWIndex is not 0, and since the loop runs, SWIndex is not 0, hence the stopper block never
    actually running.

    To solve this, just move the stopper block outside the loop.

    • For each (Integer SWLoop ) from 1 to SWIndex , do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • And - All (Conditions) are true
              • Conditions
                • (SWTarget[SWLoop] is dead) Equal to False
          • Then - Actions
            • Special Effect - Create a special effect attached to the overhead of SWTarget[SWLoop] using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
            • Special Effect - Destroy (Last created special effect)
            • Unit - Set life of SWTarget[SWLoop] to ((Life of SWTarget[SWLoop]) - (Real(SWDamage)))
          • Else - Actions
        • Set Variable Set SWCounter[SWLoop] = (SWCounter[SWLoop] + 0.50)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • SWIndex Equal to 0
      • Then - Actions
        • Trigger - Turn off (This trigger)
      • Else - Actions

  • Also, the path to the special effect must be considered as a configurable value, so to the config trigger it goes.

    • For each (Integer SWLoop ) from 1 to SWIndex , do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • And - All (Conditions) are true
              • Conditions
                • (SWTarget[SWLoop] is dead) Equal to True
                • SWLevel Equal to 1
          • Then - Actions
            • Unit - Create 1 Dummy 1 (Shipwrecked) for (Owner of SWCaster[SWLoop]) at SWCasterLoc[SWLoop] facing SWCasterLoc[SWLoop]
            • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
            • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt . SWCaster[SWLoop]
            • Custom script: call RemoveLocation(udg_SWCasterLoc[udg_SWLoop])
            • Trigger - Run SW_Reset <gen> (ignoring conditions)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • And - All (Conditions) are true
                  • Conditions
                    • (SWTarget[SWLoop] is dead) Equal to True
                    • SWLevel Equal to 2
              • Then - Actions
                • Unit - Create 1 Dummy 2 (Shipwrecked) for (Owner of SWCaster[SWLoop]) at SWCasterLoc[SWLoop] facing SWCasterLoc[SWLoop]
                • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt . SWCaster[SWLoop]
                • Custom script: call RemoveLocation(udg_SWCasterLoc[udg_SWLoop])
                • Trigger - Run SW_Reset <gen> (ignoring conditions)
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • And - All (Conditions) are true
                      • Conditions
                        • (SWTarget[SWLoop] is dead) Equal to True
                        • SWLevel Equal to 3
                  • Then - Actions
                    • Unit - Create 1 Dummy 3 (Shipwrecked) for (Owner of SWCaster[SWLoop]) at SWCasterLoc[SWLoop] facing SWCasterLoc[SWLoop]
                    • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                    • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt . SWCaster[SWLoop]
                    • Custom script: call RemoveLocation(udg_SWCasterLoc[udg_SWLoop])
                    • Trigger - Run SW_Reset <gen> (ignoring conditions)
                  • Else - Actions
    Cascading the trigger actions to this extent is unsettling to see. There's simply a lot of repetition going on that can be simplified.

  • The conditions for checking whether the target is dead is performed N times at the worst case scenario (with N being the maximum level of the ability in question). Maintaining this trigger with possibly different levels would be a nightmare for most users.

  • Further examination on the object data suggests that the dummies themselves are not unique to each other at all. Using the same type of dummy would be recommended here, since they are visually indistinguishable. Likewise, the dummy abilities given to each dummy type can be simplified from N abilities with 1 level to 1 dummy ability with N levels. Since the level of the caster's ability is easily accessible at this point (even without storing it to a global array), it would be convenient for one to relay that information in adjusting the level of the dummy ability for the dummy caster. That way, the user can cut back on the number of resources to export from this spell.

  • Upon revisiting the trigger, it seems like this trigger will not stop at all. It is recommended to disable the periodic triggers when no instances are present.

  • This trigger has a similar tick rate with SW Running 2. Perhaps the trigger can be executed directly from SW Running 2?

  • As pointed out by a user beforehand, the spell is leaking a lot of points at the moment the waves come out. This is caused
    by the following function:

    • Unit - Create 1 Lethal Wave Dummy (Shipwrecked) for Player 1 (Red) at (SWTargetLoc[SWLoop] offset by (450.00, 0)) facing SWTargetLoc[SWLoop]
    Each time the offset by function is called, it generates a location handle separate from the base location handle which in this case is SWTargetLoc[SWLoop]. Since this generated location handle is not stored in a variable, the generated location handle is subsequently
    inaccessible to the coder and will result in a memory leak. There are at least 4 instances of invoking the offset function, so with multiple
    casters and a lot of time, this will eat up quite a hefty amount of RAM on the local machine.

  • The trigger actions cascade once again. Similar to the remark made at SW Running 2, the same thing must be done here, with minor adjustments.

  • Oddly enough, playing a sound while it is already playing causes the sound to cut off in later versions.

Summary:

There are a lot of issues to be addressed before this spell can be approved. In particular, SW Running 2 and SW Running 3 contained most of these issues, as these triggers are not quite optimized for heavy MUI usage.

Aesthetics aside, the amount of problems the spell currently has is concerning, and they would have to be addressed first.
For now, this spell is Awaiting Update.
 
Top