System Diablo II Item Set Triggers

Z

Zerotech

Guest
Ever wondered if you wish you can create Item Sets and apply additional powers when you collect a group of items of a category like how Diablo II plays?

Look no further than here.

I will show you an example of 2 trigger codes that are required to activate and deactivate the Item Set Triggers

Activate Item Set Powers

Code:
Activate Item Set Powers
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Triggering unit) has an item of type Knight's Sword) Equal to True
        ((Triggering unit) has an item of type Knight's Helmet) Equal to True
        ((Triggering unit) has an item of type Knight's Shield) Equal to True
        ((Triggering unit) has an item of type Knight's Armor) Equal to True
        ((Triggering unit) has an item of type Knight's Battle Gloves) Equal to True
        ((Triggering unit) has an item of type Knight's Walking Boots) Equal to True
    Actions
        Unit - Add Armor Bonus (+30) to (Triggering unit)
        Unit - Add Damage Bonus (+30) to (Triggering unit)
        Unit - Add Hero Stats Bonus (+20 All Stats) to (Triggering unit)
        Game - Display to (All players) for 5.00 seconds the text: You have obtained a...

Deactivate Item Set Powers

Code:
Deactivate Item Set Powers
    Events
        Unit - A unit Loses an item
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Item-type of (Item being manipulated)) Equal to Knight's Sword
                (Item-type of (Item being manipulated)) Equal to Knight's Helmet
                (Item-type of (Item being manipulated)) Equal to Knight's Shield
                (Item-type of (Item being manipulated)) Equal to Knight's Armor
                (Item-type of (Item being manipulated)) Equal to Knight's Battle Gloves
                (Item-type of (Item being manipulated)) Equal to Knight's Walking Boots
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Knight's Sword
                And - All (Conditions) are true
                    Conditions
                        ((Triggering unit) has an item of type Knight's Helmet) Equal to True
                        ((Triggering unit) has an item of type Knight's Shield) Equal to True
                        ((Triggering unit) has an item of type Knight's Armor) Equal to True
                        ((Triggering unit) has an item of type Knight's Battle Gloves) Equal to True
                        ((Triggering unit) has an item of type Knight's Walking Boots) Equal to True
            Then - Actions
                Unit - Remove Armor Bonus (+30) from (Triggering unit)
                Unit - Remove Damage Bonus (+30) from (Triggering unit)
                Unit - Remove Hero Stats Bonus (+20 All Stats) from (Triggering unit)
                Game - Display to (All players) for 5.00 seconds the text: You have removed Kn...
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Knight's Helmet
                And - All (Conditions) are true
                    Conditions
                        ((Triggering unit) has an item of type Knight's Sword) Equal to True
                        ((Triggering unit) has an item of type Knight's Shield) Equal to True
                        ((Triggering unit) has an item of type Knight's Armor) Equal to True
                        ((Triggering unit) has an item of type Knight's Battle Gloves) Equal to True
                        ((Triggering unit) has an item of type Knight's Walking Boots) Equal to True
            Then - Actions
                Unit - Remove Armor Bonus (+30) from (Triggering unit)
                Unit - Remove Damage Bonus (+30) from (Triggering unit)
                Unit - Remove Hero Stats Bonus (+20 All Stats) from (Triggering unit)
                Game - Display to (All players) for 5.00 seconds the text: You have removed Kn...
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Knight's Shield
                And - All (Conditions) are true
                    Conditions
                        ((Triggering unit) has an item of type Knight's Sword) Equal to True
                        ((Triggering unit) has an item of type Knight's Helmet) Equal to True
                        ((Triggering unit) has an item of type Knight's Armor) Equal to True
                        ((Triggering unit) has an item of type Knight's Battle Gloves) Equal to True
                        ((Triggering unit) has an item of type Knight's Walking Boots) Equal to True
            Then - Actions
                Unit - Remove Armor Bonus (+30) from (Triggering unit)
                Unit - Remove Damage Bonus (+30) from (Triggering unit)
                Unit - Remove Hero Stats Bonus (+20 All Stats) from (Triggering unit)
                Game - Display to (All players) for 5.00 seconds the text: You have removed Kn...
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Knight's Armor
                And - All (Conditions) are true
                    Conditions
                        ((Triggering unit) has an item of type Knight's Sword) Equal to True
                        ((Triggering unit) has an item of type Knight's Helmet) Equal to True
                        ((Triggering unit) has an item of type Knight's Shield) Equal to True
                        ((Triggering unit) has an item of type Knight's Battle Gloves) Equal to True
                        ((Triggering unit) has an item of type Knight's Walking Boots) Equal to True
            Then - Actions
                Unit - Remove Armor Bonus (+30) from (Triggering unit)
                Unit - Remove Damage Bonus (+30) from (Triggering unit)
                Unit - Remove Hero Stats Bonus (+20 All Stats) from (Triggering unit)
                Game - Display to (All players) for 5.00 seconds the text: You have removed Kn...
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Knight's Battle Gloves
                And - All (Conditions) are true
                    Conditions
                        ((Triggering unit) has an item of type Knight's Sword) Equal to True
                        ((Triggering unit) has an item of type Knight's Helmet) Equal to True
                        ((Triggering unit) has an item of type Knight's Shield) Equal to True
                        ((Triggering unit) has an item of type Knight's Armor) Equal to True
                        ((Triggering unit) has an item of type Knight's Walking Boots) Equal to True
            Then - Actions
                Unit - Remove Armor Bonus (+30) from (Triggering unit)
                Unit - Remove Damage Bonus (+30) from (Triggering unit)
                Unit - Remove Hero Stats Bonus (+20 All Stats) from (Triggering unit)
                Game - Display to (All players) for 5.00 seconds the text: You have removed Kn...
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Knight's Walking Boots
                And - All (Conditions) are true
                    Conditions
                        ((Triggering unit) has an item of type Knight's Sword) Equal to True
                        ((Triggering unit) has an item of type Knight's Helmet) Equal to True
                        ((Triggering unit) has an item of type Knight's Shield) Equal to True
                        ((Triggering unit) has an item of type Knight's Armor) Equal to True
                        ((Triggering unit) has an item of type Knight's Battle Gloves) Equal to True
            Then - Actions
                Unit - Remove Armor Bonus (+30) from (Triggering unit)
                Unit - Remove Damage Bonus (+30) from (Triggering unit)
                Unit - Remove Hero Stats Bonus (+20 All Stats) from (Triggering unit)
                Game - Display to (All players) for 5.00 seconds the text: You have removed Kn...
            Else - Actions

I will provide you a working test map so you can see for yourself how it's done to mappers who wish to enhance their quality of their projects.

I do encourage some feedback if it's possible so you can post your thoughts here.
 

Attachments

  • Diablo II Item Set Triggers v1.w3x
    17.5 KB · Views: 314

Void

New Member
Reaction score
16
This is more of a mere example that should go to Free Trigger Code section, instead of the Tutorial section.

Renamed.

If you hadn't noticed, it's all three now (or did you reply before they changed it?)
 
Z

Zerotech

Guest
I wasn't sure if I was supposed to post it here or the Free Trigger section, you can redirect the thread whether you think it's appropriate. Anyways I probably make some adjustments mainly description enhancements and possibly add Hero Level requirements in order for the hero to carry the item.

However I could take it one step further and try to fully replicate the Diablo II feeling with weapon duration by adding an integer counter doing this every time you attack with an eqquipped weapon it subtracts an integer value by one and when it reaches to 0 the item(s) equipped will break but that would take some time to find a suitable code to perform the triggers correctly.
 
Reaction score
149
I was refering to the thread name [Tutorial], so I changed it into [System]

Also, you might want to improve the second trigger, something like:

Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Level of Armor Bonus (+30) for (Triggering unit)) Equal to 1
        (Level of Damage Bonus (+30) for (Triggering unit)) Equal to 1
        (Level of Hero Stats Bonus (+20 All Stats) for (Triggering unit)) Equal to 1
    Then - Actions
        Unit - Remove Armor Bonus (+30) from (Triggering unit)
        Unit - Remove Damage Bonus (+30) from (Triggering unit)
        Unit - Remove Hero Stats Bonus (+20 All Stats) from (Triggering unit)
        Game - Display to (Player group(tempPlayer)) the text: (You have removed the  + (Name of (Item being manipulated)))
    Else - Actions
Would'nt this be more efficient?
 
Z

Zerotech

Guest
Thanks for the suggestions I was planning to modify the tooltips for each weapon to be better described I have decided that I'll probably have to redesign the map just for creeping so I can further enhance the map triggers design.

I was refering to the thread name [Tutorial], so I changed it into [System]

Also, you might want to improve the second trigger, something like:

Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Level of Armor Bonus (+30) for (Triggering unit)) Equal to 1
        (Level of Damage Bonus (+30) for (Triggering unit)) Equal to 1
        (Level of Hero Stats Bonus (+20 All Stats) for (Triggering unit)) Equal to 1
    Then - Actions
        Unit - Remove Armor Bonus (+30) from (Triggering unit)
        Unit - Remove Damage Bonus (+30) from (Triggering unit)
        Unit - Remove Hero Stats Bonus (+20 All Stats) from (Triggering unit)
        Game - Display to (Player group(tempPlayer)) the text: (You have removed the  + (Name of (Item being manipulated)))
    Else - Actions
Would'nt this be more efficient?

I guess the code does look more efficient i would have to set an integer variable by the looks of it I could also think that a boolean expression variable (true/false statement) may also work as well but i haven't made any confirmations about it. About the naming of this thread yeah sorry I thought the title Tutorial would have been more appropriate but i guess is a game system event rather than a 'how to' for the majority of the map community.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top