• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Equipment System, Version 2.2a

This is an equipment system I've created 100% of my own. It's 50% GUI and 50% easy JASS. You're able to equip 6 items (Head, Armor, Shield, Weapon, Amulet and Ring items)

Anyway, read the READ ME when you've downloaded the map. I've explained everything there.

This system is 100% MPI (One unit for each player can use it)



UPDATE (Version 1.0 > 1.1)

> I've fixed the JASS thing that Eccho told me.
> I've removed the once per item-type lag stuff, by creating some actions in the "EquipmentSystemInitialization" trigger.

UPDATE (Version 1.1 > 1.2)

> Optimized all GUI code.
> Removed unused code.
> Found some unused variables.
> Removed the greeny icons, by importing a new icon!
> ...and other small things.

UPDATE (Version 1.2 > 1.3)

> Fixed an issue with unequiping items.

UPDATE (Version 1.3 > 2.0)

> You are now able to use twohanded weapons with this system!
JASS:
    set udg_Weapon_TwoHanded[udg_i[3]] = true
or
JASS:
    set udg_Weapon_TwoHanded[udg_i[3]] = false
> Small stuffs fixed and edited.

UPDATE (Version 2.0 > 2.1a)

> The system now saves the current charges left to items in the inventory.
> Reworked Equipment triggers, made them a little shorter.

UPDATE (Version 2.1a > 2.2a)

> When initializing items you'll no longer be needed to use 'A002' as an ability that does nothing, just type: 0 or 'null'.
> The system now supports more abilities to add to each item-class. Head, Armor, Weapon and Shield items now supports 4 abilities instead of 2. Rings and Amulets now supports 6 instead or 4 abilities.


Keywords:
Equipment, System, Equipment System, ES, E, S, Flood, The_Flood, GUI, JASS, Simple,
Contents

Equipment System, By: The Flood (Map)

Reviews
22:52, 11th Apr 2009 Eccho: I would say this might will be useful for some. It works as intended and does not leak, and is perfectly MPI. However, some thing bugs me. *As I mentioned, the green "invalid" icons which shows up, looks horrible...

Moderator

M

Moderator

22:52, 11th Apr 2009
Eccho:

I would say this might will be useful for some. It works as intended and does not leak, and is perfectly MPI. However, some thing bugs me.

*As I mentioned, the green "invalid" icons which shows up, looks horrible. However, I allow you to import them into your map as "BTN" ones even though they are darkened. Make sure to document this as well if you do so.
*The second thing about the system is, that you have to click on the item everytime you want to drop it. It would be nice, if it was added to the backpack instantly, to be honest.
*The third thing is the triggering. You did a good job reducing the lag ingame to nothing, but still, the triggering could be better like I said in my post further down.

But overall, yeah it does lack at the moment, but it is functional in game. Approved.
 
Level 25
Joined
Jun 5, 2008
Messages
2,573
It's not MUI it's MPI, MUI means that an infinite number of units may use something at the same time.
EDIT:
Why is it missing an extenstion?
It also laggs when the equipment starts(click on an item).
You have undefined trigger conditions in several triggers.
Simple inventory system which really needs some kind of improvement.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
In the Jass initialization, as an improvement (basically to do it faster and not create unneccessary triggers, slightly change the triggers:

JASS:
function Trig_Ring_Initialization_Actions takes nothing returns nothing
    set udg_i[6] = ( udg_i[6] + 1 )
    set udg_Ring_IType[udg_i[6]] = 'I00D'
    set udg_Ring_Str_Bonus[udg_i[6]] = 10
    set udg_Ring_Agi_Bonus[udg_i[6]] = 3
    set udg_Ring_Int_Bonus[udg_i[6]] = 5
    set udg_Ring_Ability_1[udg_i[6]] = 'A002'
    set udg_Ring_Ability_2[udg_i[6]] = 'A002'
    set udg_Ring_Ability_3[udg_i[6]] = 'A002'
    set udg_Ring_Ability_4[udg_i[6]] = 'A002'
    // ----------------------------------------
    set udg_TotalRingItems = udg_i[6]
endfunction

//===========================================================================
function InitTrig_Ring_Initialization takes nothing returns nothing
    set gg_trg_Ring_Initialization = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Ring_Initialization, function Trig_Ring_Initialization_Actions )
endfunction

to

JASS:
function InitTrig_Ring_Initialization takes nothing returns nothing
    set udg_i[6] = ( udg_i[6] + 1 )
    set udg_Ring_IType[udg_i[6]] = 'I00D'
    set udg_Ring_Str_Bonus[udg_i[6]] = 10
    set udg_Ring_Agi_Bonus[udg_i[6]] = 3
    set udg_Ring_Int_Bonus[udg_i[6]] = 5
    set udg_Ring_Ability_1[udg_i[6]] = 'A002'
    set udg_Ring_Ability_2[udg_i[6]] = 'A002'
    set udg_Ring_Ability_3[udg_i[6]] = 'A002'
    set udg_Ring_Ability_4[udg_i[6]] = 'A002'
    // ----------------------------------------
    set udg_TotalRingItems = udg_i[6]
endfunction

The lag is once per item that is correct, due to the abilities. Please preload all the abilities by creating a dummy unit upon map init, add all abilities to him, and then remove the unit from the game.

  • -------- Place the unequiped item back in inventory --------
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Item_Normal1[(Player number of (Owner of (Triggering unit)))] Equal to (Item-type of No item)
    • Then - Actions
      • Set UnequipDebug = True
      • Set Item_Normal1[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • Item_Normal2[(Player number of (Owner of (Triggering unit)))] Equal to (Item-type of No item)
          • UnequipDebug Equal to False
    • Then - Actions
      • Set UnequipDebug = True
      • Set Item_Normal2[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
    • Else - Actions
  • //and so on.
It seems rather pointless to check if is "no item" several times. Just place everything under an if condition checking that and then add the other evaluations inside.

Overall, I would actually recommend this system for a Gui user. But please merge as much as possible, and make it as efficient GUI as possible.

Give me a reply/PM/VM when you've done so.
 
In the Jass initialization, as an improvement (basically to do it faster and not create unneccessary triggers, slightly change the triggers:

JASS:
function Trig_Ring_Initialization_Actions takes nothing returns nothing
    set udg_i[6] = ( udg_i[6] + 1 )
    set udg_Ring_IType[udg_i[6]] = 'I00D'
    set udg_Ring_Str_Bonus[udg_i[6]] = 10
    set udg_Ring_Agi_Bonus[udg_i[6]] = 3
    set udg_Ring_Int_Bonus[udg_i[6]] = 5
    set udg_Ring_Ability_1[udg_i[6]] = 'A002'
    set udg_Ring_Ability_2[udg_i[6]] = 'A002'
    set udg_Ring_Ability_3[udg_i[6]] = 'A002'
    set udg_Ring_Ability_4[udg_i[6]] = 'A002'
    // ----------------------------------------
    set udg_TotalRingItems = udg_i[6]
endfunction

//===========================================================================
function InitTrig_Ring_Initialization takes nothing returns nothing
    set gg_trg_Ring_Initialization = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Ring_Initialization, function Trig_Ring_Initialization_Actions )
endfunction

to

JASS:
function InitTrig_Ring_Initialization takes nothing returns nothing
    set udg_i[6] = ( udg_i[6] + 1 )
    set udg_Ring_IType[udg_i[6]] = 'I00D'
    set udg_Ring_Str_Bonus[udg_i[6]] = 10
    set udg_Ring_Agi_Bonus[udg_i[6]] = 3
    set udg_Ring_Int_Bonus[udg_i[6]] = 5
    set udg_Ring_Ability_1[udg_i[6]] = 'A002'
    set udg_Ring_Ability_2[udg_i[6]] = 'A002'
    set udg_Ring_Ability_3[udg_i[6]] = 'A002'
    set udg_Ring_Ability_4[udg_i[6]] = 'A002'
    // ----------------------------------------
    set udg_TotalRingItems = udg_i[6]
endfunction

The lag is once per item that is correct, due to the abilities. Please preload all the abilities by creating a dummy unit upon map init, add all abilities to him, and then remove the unit from the game.

  • -------- Place the unequiped item back in inventory --------
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Item_Normal1[(Player number of (Owner of (Triggering unit)))] Equal to (Item-type of No item)
    • Then - Actions
      • Set UnequipDebug = True
      • Set Item_Normal1[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • Item_Normal2[(Player number of (Owner of (Triggering unit)))] Equal to (Item-type of No item)
          • UnequipDebug Equal to False
    • Then - Actions
      • Set UnequipDebug = True
      • Set Item_Normal2[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item being manipulated))
    • Else - Actions
  • //and so on.
It seems rather pointless to check if is "no item" several times. Just place everything under an if condition checking that and then add the other evaluations inside.

Overall, I would actually recommend this system for a Gui user. But please merge as much as possible, and make it as efficient GUI as possible.

Give me a reply/PM/VM when you've done so.

thx for watching and helping me with the system, I've updated this system now, optimized the JASS stuffs and removed the ingame lag once equiped an item. :)
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
You will need to fix the green icons as well when the game pauses/entering a menu:

Also, if you do not do something about your long GUI triggers, this system will only get a lacking rating. It could be useful if you fix the inefficiency. But you need to fix the green icons for approval first.
 

Attachments

  • green.JPG
    green.JPG
    2.4 KB · Views: 220
You will need to fix the green icons as well when the game pauses/entering a menu:

Also, if you do not do something about your long GUI triggers, this system will only get a lacking rating. It could be useful if you fix the inefficiency. But you need to fix the green icons for approval first.

The green icons is just DISBTN icons that can't be showed as DISBTN once more. Someone that use the system may change the empty item icons to different icons that won't be green. I don't know if I can optimize my long GUI triggers, I'll try optimize them, but I may not be able too.
 

N.O

N.O

Level 6
Joined
Feb 20, 2009
Messages
200
Just wondering, are you sure you didn't take it from XGM? They got the same exact system on there before it was submitted here... anyways goodjob and plus I can't get no proof because links from xgm don't work in hive.
 
Just wondering, are you sure you didn't take it from XGM? They got the same exact system on there before it was submitted here... anyways goodjob and plus I can't get no proof because links from xgm don't work in hive.

I don't even know what XGM are. So, no, I haven't stole anything. I've created this system all of my own.
 
Level 1
Joined
Jan 31, 2009
Messages
6
dude this is tight if you have any other ideas plz reply iv always wanted to try this ty for this so if im right when you pick up these items helment shiled waepon amulet and ring it will show it when picked up
 
Level 3
Joined
Sep 24, 2006
Messages
30
Simpler way:

You can just make the items head = permanent,weapon = artifact etc. and just check if the hero has an item of the class.Its a lot faster and simpler+itll be easier to make loads of items this way
 
Level 7
Joined
Jun 14, 2009
Messages
235
Honestly, its not the greatest system ever. On the other hand, its perfect for my map (VJass doesn't work for some reason).

Question, can I mod the names a little to fit my map

Another Question: Will the system let me add more ability slots (ab1, ab2, ab3? I know how to change it just wondering if youll let me and if it's possible)
 
You can just make the items head = permanent,weapon = artifact etc. and just check if the hero has an item of the class.Its a lot faster and simpler+itll be easier to make loads of items this way

Have you even watch the code? That's the way I've done it. :)

Honestly, its not the greatest system ever. On the other hand, its perfect for my map (VJass doesn't work for some reason).

Question, can I mod the names a little to fit my map

Another Question: Will the system let me add more ability slots (ab1, ab2, ab3? I know how to change it just wondering if youll let me and if it's possible)

Yes, I know it isn't the greatest system, but I think this is one of the best GUI equipment system, but that's my view.

I don't really understand your first question, what do you mean with "mod the names"?

Yes, the system will allow you to add more abilityslots, the amulets and the rings uses 4 at the moment and the other uses 2. I don't really know a maximum limit of how many abilities you can add, but yes, add as many abilityslots you want to and if you meet any problems by adding more abilityslots, tell me, but it shouldn't be any problem. Just check the code. :)
 
Ok this is my equipment menu View attachment 72012
In Pause View attachment 72013
When i equip a helm and a armor View attachment 72014
I try to equip a armor View attachment 72010
But i can't find my armor View attachment 72011

What is this bug :eekani:

Your system is :thumbs_up: but have this "littel" bug

Help me :sad:

About the green icons... It's not a problem with my system, it's warcraft 3. Everyone should use a BTN icon or a PAS, etc, as normal icon. When the game is paused or something else, all icons will change them selfes to DIS icons.
BTN > DISBTN
PAS > DISPAS

get it?

The problem is now that you have DISBTN icons as BTN or PAS icons, whatever, and when you pause your game your DIS icons have nothing to change to. That's why they are green. It's kinda hard to explain.

About your other problem it's hard for me to know... Because you have different equiped items all the time. make sure you have unequiped your current armor to equip another one, future versions may support instant equip. And make sure you got the latest version. Anyway, I'll take a look and see if I find any problems. :) +rep


EDIT: I think I saw something now... I saw that you've changed the position of the equipment slots. I can see that you have an armor slot at the shield slot and the shield slot at the armor slot. This may confuse things for us and not the system. The system is ordered to check what kind of item-type that is equiped nor being unequiped. So I think that you'll have to change a few things. Make sure that you change the

> [Permanent] Items types MUST be Head equiped items.
> [Charged] Items types MUST be Shield equiped items.
> [Power Up] Items types MUST be Weapon equiped items.
> [Artifact] Items types MUST be Armor equiped items.
> [Purchasable] Items types MUST be Amulet equiped items.
> [Campaign] Items types MUST be Ring equiped items
.

to suit your needs so the system knows what to do. In your case, change CHARGED items (Shield) to ARTIFACT items (Armor) and ARTIFACT (Armor) to CHARGED (Shield) and on all your other changes. This should do it, if you still having problems, please tell me =)
 
Level 14
Joined
Jan 16, 2009
Messages
716
I just change this
  • Open Eq Menu
    • Evénements
      • Unité - A unit Utilise un objet
    • Conditions
      • (Item-type of (Item being manipulated)) Egal Ã* Equipment Menu
    • Actions
      • Set InEqMenu[(Player number of (Owner of (Triggering unit)))] = TRUE
      • Set Item_Normal1[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item carried by Hero[(Player number of (Owner of (Triggering unit)))] in slot 1))
      • Set Item_Normal2[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item carried by Hero[(Player number of (Owner of (Triggering unit)))] in slot 2))
      • Set Item_Normal3[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item carried by Hero[(Player number of (Owner of (Triggering unit)))] in slot 3))
      • Set Item_Normal4[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item carried by Hero[(Player number of (Owner of (Triggering unit)))] in slot 4))
      • Set Item_Normal5[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item carried by Hero[(Player number of (Owner of (Triggering unit)))] in slot 5))
      • Set Item_Normal6[(Player number of (Owner of (Triggering unit)))] = (Item-type of (Item carried by Hero[(Player number of (Owner of (Triggering unit)))] in slot 6))
      • For each (Integer B) from 1 to 6, do (Actions)
        • Boucle - Actions
          • Objet - Remove (Item carried by Hero[(Player number of (Owner of (Triggering unit)))] in slot (Integer B))
      • Héros - Create Item_Weapon[(Player number of (Owner of (Triggering unit)))] and give it to Hero[(Player number of (Owner of (Triggering unit)))]
      • Objet - Make (Last created item) Inlâchable
      • Héros - Create Item_Shield[(Player number of (Owner of (Triggering unit)))] and give it to Hero[(Player number of (Owner of (Triggering unit)))]
      • Objet - Make (Last created item) Inlâchable
      • Héros - Create Item_Head[(Player number of (Owner of (Triggering unit)))] and give it to Hero[(Player number of (Owner of (Triggering unit)))]
      • Objet - Make (Last created item) Inlâchable
      • Héros - Create Item_Armor[(Player number of (Owner of (Triggering unit)))] and give it to Hero[(Player number of (Owner of (Triggering unit)))]
      • Objet - Make (Last created item) Inlâchable
      • Héros - Create Item_Ring[(Player number of (Owner of (Triggering unit)))] and give it to Hero[(Player number of (Owner of (Triggering unit)))]
      • Objet - Make (Last created item) Inlâchable
      • Héros - Create Item_Amulet[(Player number of (Owner of (Triggering unit)))] and give it to Hero[(Player number of (Owner of (Triggering unit)))]
      • Objet - Make (Last created item) Inlâchable
      • Set playergroup = (Player group((Owner of (Triggering unit))))
      • Partie - Display to playergroup for 5.00 seconds the text: |cffffcc00Exit the ...
      • Custom script: call DestroyForce(udg_playergroup)
 
Updated this system to version: 2.1a
[Read the changelog about the updates.]


Updated this system to version 2.2a
[Read the changelog about the updates.]




UPDATE (Version 1.0 > 1.1)

> I've fixed the JASS thing that Eccho told me.
> I've removed the once per item-type lag stuff, by creating some actions in the "EquipmentSystemInitialization" trigger.

UPDATE (Version 1.1 > 1.2)

> Optimized all GUI code.
> Removed unused code.
> Found some unused variables.
> Removed the greeny icons, by importing a new icon!
> ...and other small things.

UPDATE (Version 1.2 > 1.3)

> Fixed an issue with unequiping items.

UPDATE (Version 1.3 > 2.0)

> You are now able to use twohanded weapons with this system!
JASS:
    set udg_Weapon_TwoHanded[udg_i[3]] = true
or
JASS:
    set udg_Weapon_TwoHanded[udg_i[3]] = false
> Small stuffs fixed and edited.

UPDATE (Version 2.0 > 2.1a)

> The system now saves the current charges left to items in the inventory.
> Reworked Equipment triggers, made them a little shorter.

UPDATE (Version 2.1a > 2.2a)

> When initializing items you'll no longer be needed to use 'A002' as an ability that does nothing, just type: 0 or 'null'.
> The system now supports more abilities to add to each item-class. Head, Armor, Weapon and Shield items now supports 4 abilities instead of 2. Rings and Amulets now supports 6 instead or 4 abilities.
 
Last edited:
Level 7
Joined
Dec 8, 2008
Messages
243
holy shit. Cut down on the variables, friend. Besides that your lil' system runs lovely as far as I can tell (without stress testing). It'd be nice if the inventory button were an ability button and it'd be nice if items were organised into artefacts, powerups and so forth, but whatever floats your boat. :)
 
holy shit. Cut down on the variables, friend. Besides that your lil' system runs lovely as far as I can tell (without stress testing). It'd be nice if the inventory button were an ability button and it'd be nice if items were organised into artefacts, powerups and so forth, but whatever floats your boat. :)

I know there's alot of variables :eek: But I don't know if I can shut them down abit... And you can easily change the inventory button into an ability :) thanks +rep
 
Level 2
Joined
May 21, 2010
Messages
10
hey, I am getting a little problem here!
when the game starts, my hero does not start with the equipment thing on his inventory, all the 6 slots are empty, and the last one, supposed to have the equipments, is not there!
what should I do?
 
Level 4
Joined
Jun 14, 2010
Messages
68
I tried switching the open and close triggers so that they activate when the unit casts a spell but it doesn't seem to work. All I did was switch the Event and Conditions to the following:
  • Open Eq Menu
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • InEqMenu[(Player number of (Owner of (Triggering unit)))] Equal to False
      • (Ability being cast) Equal to Equipment
    • Actions
  • Close Eq Menu
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • InEqMenu[(Player number of (Owner of (Triggering unit)))] Equal to True
      • (Ability being cast) Equal to Equipment
    • Actions
where Equipment is the ability being cast (it's a clone of your Inventory Spell ability set to be a Unit ability).

The result of this is that, even though the item version still works when given the new ability, the unit version shows the default game message at the end (press esc to go back) but does not actually switch the inventories. Any ideas on how I can make this work?
 
I tried switching the open and close triggers so that they activate when the unit casts a spell but it doesn't seem to work. All I did was switch the Event and Conditions to the following:
  • Open Eq Menu
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • InEqMenu[(Player number of (Owner of (Triggering unit)))] Equal to False
      • (Ability being cast) Equal to Equipment
    • Actions
  • Close Eq Menu
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • InEqMenu[(Player number of (Owner of (Triggering unit)))] Equal to True
      • (Ability being cast) Equal to Equipment
    • Actions
where Equipment is the ability being cast (it's a clone of your Inventory Spell ability set to be a Unit ability).

The result of this is that, even though the item version still works when given the new ability, the unit version shows the default game message at the end (press esc to go back) but does not actually switch the inventories. Any ideas on how I can make this work?

Sorry for the late answer, I hope you found a solution. I've been away with my friends over 2½ week. Well, to your question. Try changing the event to:
  • Events
    • Unit - A unit Starts the effect of an ability
that should make it work, if I understand your problem.
 
Level 4
Joined
Jun 14, 2010
Messages
68
Sorry for the late answer, I hope you found a solution. I've been away with my friends over 2½ week. Well, to your question. Try changing the event to:
  • Events
    • Unit - A unit Starts the effect of an ability
that should make it work, if I understand your problem.

yeah that did it. had a friend figure it out a little after i asked here :xxd:
thanks though
 
Level 4
Joined
Apr 22, 2008
Messages
32
dude WOW this is SO CLOSE to what im looking for...im creating an rpg hopefully good enough to blow wc3 away, message me if you can help customize this a little better for me to fit the game, im more of a GUI System/spell guy, so this 50% makes since and 50% leaves me brain dead when i glance at triggers. I just need a few things changed so hopefully it wouldn't be much...
 
Level 1
Joined
May 3, 2011
Messages
1
Major Problems.

OKAY, I absolutely am relying on this trigger as the inventory system on my PRIVATE map. It will not work, I have assigned the trigger to a hero for player 1, and ALL of the items and abilities needed by the trigger have the EXACT same item ids, but the trigger still will not work. What the crud. Help please? I think I'm attaching the right file (exported triggers) I have narrowed it down, I'm 70% sure it's a problem with how I modified the triggers...

Oh, the exact problem is that the equipment inventory item (that opens the equipped inventory slots) never appears.

:goblin_cry:

Thanks, if anyone can help...
 

Attachments

  • WTF.wtg
    140.7 KB · Views: 67
I'm sorry. I can't help you. I've left warcraft 3 and do not trigger anything anymore. The system is really outdated, I've got an updated version of the system somewhere, but I was to lazy to update it here. So, you should try use another equipment system if this doesn't work. I may help you if you post the trigger you think cause the problem here within ['TRIGGER] tags and I may take a look. Good luck!
 
Level 6
Joined
Apr 20, 2010
Messages
26
anyone have any ideas on how to get it to work with a game cache. When i use the game cache it only saves the inventory and not the equipment menu and i tried giving all the equipment o another unit, going to new map and giving it back but no luck.
 
Top