Steel
Software Engineer
- Reaction score
- 109
Disclaimer: This is not meant for use by novice map makers. This system makes virtual equipment very easy, but there are some steps of implementation that basic map makers must know in order to use this system. Some basic knowledge is how to import other systems (Such as BonusMod) and modifying RAW ID's based on your map's data.
I am not responsible for making this system work in your map!
Changelog
Version 1.0.6:
-Fixed map to work with latest Warcraft III patch.
Version 1.0.5:
-Moved from bonusMod to Bonus (By Cohadar)
-Made the map use some of the systems from my RPG Framework. This is due to ease of use and simplification on cleanup.
-Object Editor Data can now be created through a trigger using the external ObjectMerger. This will greatly speed up the time it takes to implement this system in a map.
Version 1.0.4a:
Note: There is some bug that is causing things to lock up the map at certain situations. This isn't a full version release, just the release of ability features on items. Version B will hopefully fix the problem.
-System now allows items to have custom abilities. See FAQ below for more information
-Created custom player library for tracking of a player's units easier. This system functions independently of the Item System.
Version 1.0.3:
-System now handles addition of classes by function calls, configuration of global variables
-System has many more advanced functions for creating classes
-Complexity of many functions optimized for efficiency
-Item Creation can now support special abilities and movement speed
-Added in public functions to display multiboard at the user's whim. This is useful for people who wish to use multiple multiboards
Version 1.0.2:
-System can now handle dropping any number of items
-System maxs out at 37 slots (Maxes at 37 since the Multiboard cannot expand further)
-Row 9 on multiboard now properly displays icon
-Row for Total values now properly disables icon
Version 1.0.1:
-Structs data now properly saved
-User can now name the equipment slots how they wish
Ex: A user can make 10 "Finger" slots if they want
-User can now add any number of equipment slots they wish
Ex: A user can name a slot "Eyelash" if they so desire
Version 1.0.0:
-Initial Release
FAQ
Q: What is this?
A: This is a map that allows an extensive addition to the current item system belonging to the Warcraft III game. There have been systems like this before but I wanted people to have a look at mine and see how it works.
Q: What does this do?
A: It extends the basic 6 item slots of our unit and allows for multiple equipment slots such as a helm, accessory, boots, and such.
Q: Can you add more slots?
A: The system is completely modular, you can add and create whatever you want. The system is hardcapped at 37 since the multiboard cannot extend that far and frankly any more than that you should be slapped.
Q: (1.0.1) Can the system support multiple slots of the same type?
A: Yes, so long as the slot names are EXACTLY the same. The demo map includes 2 slots titled "Accessory" to show how this works. If you attempt to equip an item with the slot title "Accessory" the system cycles through all the slots created initially by the system for a slot called "Accessory". The system will check the first slot it comes accross, in our example, slot 5. If slot 5 has nothing there, it will use that slot. If slot 5 has something there, the system will recognize this and search for another slot named "Accessory", if no other slot is found, you cannot equip the item.
In the example, we call AddSlot in the order of the 5th and 6th calls to the function. This means if we create an item with the ItemCreation_CreateCustomItem, the slot variable must be either 5 or 6, it does not have to be slot 5 only.
Q: (1.0.1) How do I figure out the slot number now to create items?!
A: Very simple, if you call AddSlot 3 times, you will have 3 slots. You add them by calling the following
call AddSlot("Helm")
call AddSlot("Chest")
call AddSlot("Gloves")
Now to create an item for the helm slot, this was the FIRST call to AddSlot, so all items that you want put into the helm slot, are slot 1...call ItemCreation_CreateCustomItem('I000', 1....
If you wanted to create a pair of gloves, gloves are the [bTHIRD[/b] call to AddSlot, so they are slot 3....call ItemCreation_CreateCustomItem('I000', 3....
Q: (1.0.4a) How do you create custom item abilities?
A: There is an advanced user function for creating items that has more features than the normal function. Take a look at this example:
This function creates an item like normal. I00B is the item, 8 is the slot, 2h is the type, etc etc...continuing to the 3 for armor, 10 for hp, 50 for mana. The A021 is the custom ability to be added to the unit. The 0 is to indicate movespeed increase which is currently disable due to some glitches. Finally the last is the icon for the multiboard like normal.
The A021 in this example is the Blizzard spell, it will show up on the hero like normal. If you want to hide a passive ability use the spellbook / disable trick to work that out, or modify the ability any other way you wish. I may change how this works because it uses icons and slots on the player's unit which can be rather annoying for active abilities.
Requirements
Editor
-vJASS
Systems (Included in the map)
-ABC (By Cohadar)
-Dialogs (By Cohadar)
-BonusMod (Emjlr3's version)
How To Use
Preface: This system is designed for a single hero unit of a player. Ex. A RPG where the player has only 1 unit they control primarily. The system requires that unit to be stored into the unit array Hero. This needs to be done because the system references that unit numerous times and that is based upon the player's index.
If you look at the Select Hero trigger in the Demo category, you can understand how this works.
Setup!
Aside from getting bonusMod established in your map there are two rawIDs that are required. The first is the ability to drop items, that is the rawID of the ability you create. The second is the dummy ability that is on each and every item to equip.
Functions
Look below for details on how to use these functions
1)
2)
3)
4)
5)
6)
7)
8)
9)
Explanations
1/2) This may look like garbage but lets take a look at what we're passing in:
- I004 is the item's raw ID value
- 4 is the slot we're using (A list of usable slots can be found in the map)
- "e" is passed in to tell the system to equip. (There are only 4 different types used, "e" for normal items, "1h" for one handed items, "2h" for two handed items and "s" for shields (This can also be used for offhand items)
- 16383 tells our system all classes in the system may use the item. This is actually a complex formula...I've included a spreadsheet that will calculate the value for you: http://dl.getdropbox.com/u/517800/Item System.xls
Say for example we have 4 Heroes.
Hero 1 is assigned 1
Hero 2 is assigned 2
Hero 3 is assigned 4
Hero 4 is assigned 8
Now, say we want an item Heroes 1,2 and 4 can use...add their values! 1+2+8 = 11. 11 would be the value to let those 3 use that item and EXCLUDE Hero 3.
- 3 the level requirement
- 15 Strength Requirement
- 10 Agility Requirement
- 5 Intelligence Requirement
- 2 Bonus Strength
- 0 Agility Bonus
- 0 Intelligence Bonus
- 0 Damage Bonus
- 9 Armor Bonus
- 20 HP Bonus
- 20 MP Bonus
- "ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed.blp" this is the icon associate with the item for multiboard display
Look at the GUI trigger in the Item_System category for more examples.
2) This is the same as above but 2 more values are passed. The first you can see is 'A022' this tells the system to give the unit that special ability. In my demo map the 'A022' is a Spellbook that has an ability inside it that is hidden so the user gains the ability and does not gain visibility of it.
The second additional value passed into the function is an increase to the unit's movement speed.
3) To add a class to the system all you have to do is pass in the unit's rawID. Maximum number of classes you can add is 16. You should never need any more than that unless you are making an AOS.
Look at the GUI trigger in the Item_System category for more examples.
4) This is the same as above but it takes in a boolean. Passing in true means you want to allow the unit you're passing in to dual wield weapons.
5) This function allows you to add any type of slot you want to the system. You can have absolutely anything you want, 10 finger slots, leggings, eyelash, whatever. Simply just call this function with the string you want. If you want multiple slots of the same type you must use the EXACT same string name (NOTE: System is case sensitive). The system can only create 37 item slots, this limitation is hardcoded because the multiboard can only display a certain number of rows properly.
6) Initially creates the multiboards for all players to allow the display of our equipment
7) Forces ALL players to view their equipment multiboard
8) Displays the equipment multiboard for the Player's ID you pass in to the function (Note, Player ID values start at the array base of ZERO (0))
9) Displays the equipment multiboard for the Player you pass in to the function
Look at the GUI trigger in the Item_System category for more examples.
System Error Reference Guide
System Error 100: The item you are referencing is not in the database
System Error 101: Attempting to add more than the maximum number of classes allowed.
System Error 102: Attempting to add more than the maximum number of slots allowed.
System Error 103: ItemSlotCheck - "2h" string found in second available slot
System Error 104: Attempting to display ItemSystem Multiboard of invalid player
Screenshot
Download Virtual Inventory 1.0.0
Download Virtual Inventory 1.0.1
Download Virtual Inventory 1.0.2
Download Virtual Inventory 1.0.3
Download Virtual Inventory 1.0.4a
Download Virtual Inventory 1.0.5
Download Virtual Inventory 1.0.6
I am not responsible for making this system work in your map!
Changelog
Version 1.0.6:
-Fixed map to work with latest Warcraft III patch.
Version 1.0.5:
-Moved from bonusMod to Bonus (By Cohadar)
-Made the map use some of the systems from my RPG Framework. This is due to ease of use and simplification on cleanup.
-Object Editor Data can now be created through a trigger using the external ObjectMerger. This will greatly speed up the time it takes to implement this system in a map.
Version 1.0.4a:
Note: There is some bug that is causing things to lock up the map at certain situations. This isn't a full version release, just the release of ability features on items. Version B will hopefully fix the problem.
-System now allows items to have custom abilities. See FAQ below for more information
-Created custom player library for tracking of a player's units easier. This system functions independently of the Item System.
Version 1.0.3:
-System now handles addition of classes by function calls, configuration of global variables
-System has many more advanced functions for creating classes
-Complexity of many functions optimized for efficiency
-Item Creation can now support special abilities and movement speed
-Added in public functions to display multiboard at the user's whim. This is useful for people who wish to use multiple multiboards
Version 1.0.2:
-System can now handle dropping any number of items
-System maxs out at 37 slots (Maxes at 37 since the Multiboard cannot expand further)
-Row 9 on multiboard now properly displays icon
-Row for Total values now properly disables icon
Version 1.0.1:
-Structs data now properly saved
-User can now name the equipment slots how they wish
Ex: A user can make 10 "Finger" slots if they want
-User can now add any number of equipment slots they wish
Ex: A user can name a slot "Eyelash" if they so desire
Version 1.0.0:
-Initial Release
FAQ
Q: What is this?
A: This is a map that allows an extensive addition to the current item system belonging to the Warcraft III game. There have been systems like this before but I wanted people to have a look at mine and see how it works.
Q: What does this do?
A: It extends the basic 6 item slots of our unit and allows for multiple equipment slots such as a helm, accessory, boots, and such.
Q: Can you add more slots?
A: The system is completely modular, you can add and create whatever you want. The system is hardcapped at 37 since the multiboard cannot extend that far and frankly any more than that you should be slapped.
Q: (1.0.1) Can the system support multiple slots of the same type?
A: Yes, so long as the slot names are EXACTLY the same. The demo map includes 2 slots titled "Accessory" to show how this works. If you attempt to equip an item with the slot title "Accessory" the system cycles through all the slots created initially by the system for a slot called "Accessory". The system will check the first slot it comes accross, in our example, slot 5. If slot 5 has nothing there, it will use that slot. If slot 5 has something there, the system will recognize this and search for another slot named "Accessory", if no other slot is found, you cannot equip the item.
In the example, we call AddSlot in the order of the 5th and 6th calls to the function. This means if we create an item with the ItemCreation_CreateCustomItem, the slot variable must be either 5 or 6, it does not have to be slot 5 only.
Q: (1.0.1) How do I figure out the slot number now to create items?!
A: Very simple, if you call AddSlot 3 times, you will have 3 slots. You add them by calling the following
call AddSlot("Helm")
call AddSlot("Chest")
call AddSlot("Gloves")
Now to create an item for the helm slot, this was the FIRST call to AddSlot, so all items that you want put into the helm slot, are slot 1...call ItemCreation_CreateCustomItem('I000', 1....
If you wanted to create a pair of gloves, gloves are the [bTHIRD[/b] call to AddSlot, so they are slot 3....call ItemCreation_CreateCustomItem('I000', 3....
Q: (1.0.4a) How do you create custom item abilities?
A: There is an advanced user function for creating items that has more features than the normal function. Take a look at this example:
JASS:
call ItemCreation_CreateCustomItemAdvanced(039;I00B039;,8,"2h",16383,1,10,17,38,0,0,0,0,3,10,50, 039;A021039;, 0, "ReplaceableTextures\\CommandButtons\\BTNBrilliance.blp")
This function creates an item like normal. I00B is the item, 8 is the slot, 2h is the type, etc etc...continuing to the 3 for armor, 10 for hp, 50 for mana. The A021 is the custom ability to be added to the unit. The 0 is to indicate movespeed increase which is currently disable due to some glitches. Finally the last is the icon for the multiboard like normal.
The A021 in this example is the Blizzard spell, it will show up on the hero like normal. If you want to hide a passive ability use the spellbook / disable trick to work that out, or modify the ability any other way you wish. I may change how this works because it uses icons and slots on the player's unit which can be rather annoying for active abilities.
Requirements
Editor
-vJASS
Systems (Included in the map)
-ABC (By Cohadar)
-Dialogs (By Cohadar)
-BonusMod (Emjlr3's version)
How To Use
Preface: This system is designed for a single hero unit of a player. Ex. A RPG where the player has only 1 unit they control primarily. The system requires that unit to be stored into the unit array Hero. This needs to be done because the system references that unit numerous times and that is based upon the player's index.
If you look at the Select Hero trigger in the Demo category, you can understand how this works.
Setup!
Aside from getting bonusMod established in your map there are two rawIDs that are required. The first is the ability to drop items, that is the rawID of the ability you create. The second is the dummy ability that is on each and every item to equip.
Functions
Look below for details on how to use these functions
1)
Trigger:
- Custom script: call ItemCreation_CreateCustomItem('I004',4,"e", 16383,3,15,10,5,2,0,0,0,9,20,20, "ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed.blp")
JASS:
2)
Trigger:
- Custom script: call ItemCreation_CreateCustomItemAdvanced('I003',11,"e",16383,1,0,0,0,1,1,1,1,1,1,1,'A01Y', 0, "ReplaceableTextures\\CommandButtons\\BTNNatureTouchGrow.blp")
JASS:
public function CreateCustomItemAdvanced takes integer id, integer slot, string itype, integer who, integer level, integer str_r, integer agi_r,integer int_r, integer str, integer agi, integer int, integer dmg, integer armor, integer hp, integer mp, integer abilityid, integer movespeed, string model returns nothing
3)
Trigger:
- Custom script: call ItemSystem_AddClass('Hamg')
4)
Trigger:
- Custom script: call ItemSystem_AddClassAdvanced('Hpal')
5)
Trigger:
- Custom script: call ItemSystem_AddSlot("Accessory")
6)
Trigger:
- Custom script: call Multiboard_ItemSystem_Create()
7)
Trigger:
- Custom script: call Multiboard_ItemSystem_DisplayAll()
8)
Trigger:
- Custom script: call Multiboard_ItemSystem_DisplayByInt(0)
9)
Trigger:
- Custom script: call Multiboard_ItemSystem_DisplayByPlayer(Player(3))
Explanations
1/2) This may look like garbage but lets take a look at what we're passing in:
- I004 is the item's raw ID value
- 4 is the slot we're using (A list of usable slots can be found in the map)
- "e" is passed in to tell the system to equip. (There are only 4 different types used, "e" for normal items, "1h" for one handed items, "2h" for two handed items and "s" for shields (This can also be used for offhand items)
- 16383 tells our system all classes in the system may use the item. This is actually a complex formula...I've included a spreadsheet that will calculate the value for you: http://dl.getdropbox.com/u/517800/Item System.xls
Say for example we have 4 Heroes.
Hero 1 is assigned 1
Hero 2 is assigned 2
Hero 3 is assigned 4
Hero 4 is assigned 8
Now, say we want an item Heroes 1,2 and 4 can use...add their values! 1+2+8 = 11. 11 would be the value to let those 3 use that item and EXCLUDE Hero 3.
- 3 the level requirement
- 15 Strength Requirement
- 10 Agility Requirement
- 5 Intelligence Requirement
- 2 Bonus Strength
- 0 Agility Bonus
- 0 Intelligence Bonus
- 0 Damage Bonus
- 9 Armor Bonus
- 20 HP Bonus
- 20 MP Bonus
- "ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed.blp" this is the icon associate with the item for multiboard display
Look at the GUI trigger in the Item_System category for more examples.
2) This is the same as above but 2 more values are passed. The first you can see is 'A022' this tells the system to give the unit that special ability. In my demo map the 'A022' is a Spellbook that has an ability inside it that is hidden so the user gains the ability and does not gain visibility of it.
The second additional value passed into the function is an increase to the unit's movement speed.
3) To add a class to the system all you have to do is pass in the unit's rawID. Maximum number of classes you can add is 16. You should never need any more than that unless you are making an AOS.
Look at the GUI trigger in the Item_System category for more examples.
4) This is the same as above but it takes in a boolean. Passing in true means you want to allow the unit you're passing in to dual wield weapons.
5) This function allows you to add any type of slot you want to the system. You can have absolutely anything you want, 10 finger slots, leggings, eyelash, whatever. Simply just call this function with the string you want. If you want multiple slots of the same type you must use the EXACT same string name (NOTE: System is case sensitive). The system can only create 37 item slots, this limitation is hardcoded because the multiboard can only display a certain number of rows properly.
6) Initially creates the multiboards for all players to allow the display of our equipment
7) Forces ALL players to view their equipment multiboard
8) Displays the equipment multiboard for the Player's ID you pass in to the function (Note, Player ID values start at the array base of ZERO (0))
9) Displays the equipment multiboard for the Player you pass in to the function
Look at the GUI trigger in the Item_System category for more examples.
System Error Reference Guide
System Error 100: The item you are referencing is not in the database
System Error 101: Attempting to add more than the maximum number of classes allowed.
System Error 102: Attempting to add more than the maximum number of slots allowed.
System Error 103: ItemSlotCheck - "2h" string found in second available slot
System Error 104: Attempting to display ItemSystem Multiboard of invalid player
Screenshot
Download Virtual Inventory 1.0.0
Download Virtual Inventory 1.0.1
Download Virtual Inventory 1.0.2
Download Virtual Inventory 1.0.3
Download Virtual Inventory 1.0.4a
Download Virtual Inventory 1.0.5
Download Virtual Inventory 1.0.6