- Joined
- Jul 19, 2008
- Messages
- 37
Items
What are Items?
Items are basically objects according to wikipedia. Actually, it means this: Item, entry
in a list, or one object in a collection of objects. It's like that. Items are things
that are dropped from creeps, which help you to survive longer or fight better.
The Item Editor
The Item Editor is a part of the Object Editor which allows you to create new items or edit
existing items.
This will explain the context of the Item Editor Itself.
Abilities - Abilities
This is first and foremost what the item actually does. What it gives you and what's in it
that can make you stronger. Remember that items can only have 4 abilities and 1 maximum
active ability.
Art - Button Position (X)
Art - Button Position (Y)
This is where the item will be located when you buy it. Not in the inventory but in the
shop. This graph will show you the button positions in X,Y form.

Art - Interface Icon
This is the icon of your item. The picture of your item. This is like the signature of the
item. 2 items of the same icon usually means 2 icons of the same type or 2 different items
with different icons which can cause confusion.
Art - Model Used
This is the model of your item. No, not the model where you pick it up and it shows the item being held by the unit.
Art - Scaling Value
How big your model is.
Art - Selection Size - Editor
This size of the selection circle BUT only in the World Editor.
Art - Tinting Color
As usual the color of the model. Some models cannot be colored.
Combat - Armor Type
This is basically the sound of the item when someone attacks it.
Stats - Actively Used
This is checked when one of the abilities includes one active spell like Blink, Command,
etc.. Uncheck this when your using Spellbooks in your item.
Stats - Can be dropped
This is usually True but when you want an item to not be dropped use this. This is used in
DotA's Divine Rapier and Aegis of the Immortal (I think).
Stats - Can Be Sold By Merchants
Usually True. This is used for Quest items so whatever you do it cannot be sold.
Stats - Can Be Sold To Merchants
This is like "Can be Sold". True usually unless you like it to be Unique and cannot
be sold even for 1,000,000 Gold like DotA's Divine Rapier.
Stats - Classification
It's like the groupings of the items. If you want to group them like Rare items go to
Campaign Class, Normal Items go to Misc Class, etc...
Stats - Cooldown Group
Not sure. But i think this is the stacking group of the items like the order strings in
Abilities.
Stats - Drop When Carrier Dies
It's in the title. If you die, the item will be dropped to the ground, free for anyone to
pick it up.
Stats - Gold Cost
How much the item would cost in Gold.
Stats - Hit Points
How much life does it have. If you want it to be "Cannot be destroyed", the you might
as well set his to 500,000.
Stats - Ignore Cooldown
Even though the ability has a cooldown, it will be set to 0 when this is True. Almost 100%
of the time, it's False.
Stats - Include as Random Choice
If True, then this item will be included if you put a "Random Item" item on the map.
Stats - Level (Unclassified)
Stats - Level
THIS IS NOT THE REQUIED LEVEL OF YOUR ITEM!!! It is just merely a
grading system for the item. e.g. Level 1 items for Normal, Level 2 items for Magical,
etc... The only difference between the 2 is Unclassified can go up to 10 and Classified can
only go up to 8. I think this cannot be changed in the Gameplay Constants.
Stats - Lumber Cost
How much the item would cost in Lumber.
Stats - Number of Charges
This is used to set how many times an active item can be used. Example: If set to 2, then
the item can only cast Blink (for example) for 2 times. Set this to 0 for Unlimited
Charges.
Stats - Perishable
Again, not 100% sure. I think this applies to "Cannot be destroyed" and "Can Be
Sold To Merchants". Set this to True for Indestructible Items.
Stats - Priority
Stats - Stock Maximum
The maximum stock of an item. It's the number below the item when it's at a shop.
Stats - Stock Replenish Interval
This is the time in which when you buy an item, this is the time to regain 1 stock. The
interval only works it's magic when it is NOT equal to the Stock Maximum of the item.
Example: In DotA, every item replenishes 1 stock in 3 seconds when you buy one.
Stats - Stock Start Delay
This is the time (begins in the start of the game) where all items become available.
Example: In DotA, the heroes have a Stock Start Delay of 15 seconds which means that you
have to wait 15 seconds to pick a hero.
Stats - Use Automatically When Acquired
When you pick up an item (if set to True), it uses the item automatically. Usually
used in Runes.
Stats - Valid Target for Transformation
Techtree - Requirements
Add units/buildings/researches to this value if you want an item to have requirements.
Example: In normal melee games, all races require the level 3 main base to get an orb.
Techtree - Requirements - Levels
Needs a value above if you want it to require (for example), Level 3 Moon Glaive. Add
the Upgrade Moon Glaive on the value above and add to this value 3.
Text - Description
This is the text or description when you click an item which is still on the ground.
Text - Hotkey
The Hotkey of the item in the shop.
Text - Name
The name of the item.
Text - Tooltip - Basic
This is the text on the top that says "Purchase". Example: Purchase Boots of Speed
Text - Tooltip - Extended
The main description of the item in the inventory. This basically tells you what the item
does and some Descriptions of it or some Histories perhaps.
How do I create a custom Item?
4 Choices:
Then edit the abilities, icons, models and descriptions and viola, you have your own custom item.- Click File - New Custom Item
- Click the Treasure Box Icon on the upper Toolbar
- Right-Click on the Item and select New Custom Item
- Press Ctrl+Shift+N
Some neat Tips and Tricks about Items.
Recipes
Some or maybe many people know what recipes are. But for those who do not know them yet, they are 2 or more items that needs each other in order to make 1 stronger item.
How to make recipies
Step 1: Creating the Item
Create 3 or 2 versions of the item, 1 for the shop, 1 for the scroll (for me, this is optional) and 1 for the item itself.
Step 2: Replacing the Item(This can be skipped if you do not want the scroll)
Do this trigger: This trigger basically replaces the one that you buy on the shop and replaces it with the scroll.
-
Items Scroll
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item being manipulated)) Equal to |CFF91C877Boots of Haste (Shop)|r
-
-
Then - Actions
-
Item - Remove (Item being manipulated)
-
Hero - Create |CFF91C877Boots of Haste (Scroll Recipe)|r and give it to (Hero manipulating item)
-
-
Else - Actions
-
-
-
Step 3: Combining the Item
This trigger combines the said items into a more stronger version of the item. In this trigger, it combines the Boots of Speed and the Gloves of Haste into a Boots of Haste.
-
Item Combine
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to |CFFFDC689Boots of Speed|r
-
(Item-type of (Item being manipulated)) Equal to |CFFFDC689Gloves of Haste|r
-
(Item-type of (Item being manipulated)) Equal to |CFF91C877Boots of Haste Recipe|r
-
-
-
((Hero manipulating item) has an item of type |CFFFDC689Boots of Speed|r) Equal to True
-
((Hero manipulating item) has an item of type |CFFFDC689Gloves of Haste|r) Equal to True
-
((Hero manipulating item) has an item of type |CFF91C877Boots of Haste (Scroll Recipe)|r) Equal to True
-
-
Actions
-
Set Item[1] = |CFFFDC689Boots of Speed|r
-
Set Item[2] = |CFFFDC689Gloves of Haste|r
-
Set Item[3] = |CFF91C877Boots of Haste (Scroll Recipe)|r
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
For each (Integer B) from 1 to 3, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to Item[(Integer B)]
-
-
Then - Actions
-
Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
-
-
Else - Actions
-
-
-
-
-
-
Special Effect - Create a special effect attached to the origin of (Hero manipulating item) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Hero - Create |CFF91C877Boots of Haste|r and give it to (Hero manipulating item)
-
-
Random Drops
For those who are wondering what this is, its a system that when you kill an enemy, it will have a chance to drop an item. This is very simple. Just do this trigger:
-
Chance
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(Owner of (Killing unit)) Not equal to Neutral Hostile
-
(Owner of (Triggering unit)) Equal to Neutral Hostile
-
(Random integer number between 1 and 1000000) Less than or equal to (Hero level of (Killing unit))
-
-
Actions
-
Set TempPoint = (Position of (Triggering unit))
-
Item - Create |CFF82CA9CSoulstone|r at (Position of (Triggering unit)) [COLOR="Green"]// You can have any item here[/COLOR]
-
Custom script: call RemoveLocation(udg_TempPoint)
-
-
Level Restrictions
Many people has asked on how to do this. So I will teach you. Like the upper tips, its a very simple trigger:
-
Required Level
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
Actions
-
-------- ---- ---- ---- ---- ---- ---- ---- REQUIRED LEVEL 2 ---- ---- ---- ---- ---- ---- ---- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Hero manipulating item) is A Hero) Equal to True
-
(Level of (Hero manipulating item)) Less than 2
-
Or - Any (Conditions) are true
-
(Item-type of (Item being manipulated)) Equal to |CFF91C877Ring of Regeneration|r
-
(Item-type of (Item being manipulated)) Equal to |CFF91C877Periapt of Vitality|r
-
(Item-type of (Item being manipulated)) Equal to |CFF91C877Pendant of Energy|r
-
(Item-type of (Item being manipulated)) Equal to |CFF91C877Mask of Death|r
-
(Item-type of (Item being manipulated)) Equal to |CFFFDC689Staff of Wisdom|r
-
(Item-type of (Item being manipulated)) Equal to |CFFFDC689Gloves of Speed|r
-
(Item-type of (Item being manipulated)) Equal to |CFFFDC689Axe of Power|r
-
-
-
Then - Actions
-
Hero - Drop (Item being manipulated) from (Hero manipulating item)
-
Floating Text - Create floating text that reads (Required level of + ((Name of (Item being manipulated)) + is 2)) above (Hero manipulating item) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 2.50 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
Floating Text - Set the velocity of (Last created floating text) to 90.00 towards 90.00 degrees
-
-
Else - Actions
-
-
-
Spell Books
A very nice way to make items have more than 4 abilities, BUT only one active one in 2 easy steps.
If you put an active ability in an item that has the spell book, it will not use the ability instead it will display you the spell book.
How to Combine Charges
If you want to combine 2 1 charge potions or just stack multiple charges on 1 item, simply copy the code below. To change the maximum number of charges, change the value of MAXIMUM on the code. This does not require vJASS.
JASS:
function Trig_Combine_Items_Conditions takes nothing returns boolean
return GetItemCharges(GetManipulatedItem()) > 0
endfunction
function Trig_Combine_Items_Actions takes nothing returns nothing
local integer ITEMCOUNT
local integer ITEMLOOP
local integer CHARGES
local integer MAXIMUM
local item NEWITEM
local unit OURUNIT
set MAXIMUM = 100
set ITEMCOUNT = 0
set ITEMLOOP = 0
set CHARGES = 0
set NEWITEM = GetManipulatedItem()
set OURUNIT = GetManipulatingUnit()
loop
exitwhen ITEMLOOP > 6
if ((GetItemTypeId(NEWITEM)) == (GetItemTypeId(UnitItemInSlot(OURUNIT, ITEMLOOP-1)))) then
if ((GetItemCharges(UnitItemInSlot(OURUNIT, ITEMLOOP-1)) + GetItemCharges(NEWITEM)) <= MAXIMUM) then
if not ( (UnitItemInSlot(OURUNIT, ITEMLOOP-1)) == (NEWITEM)) then
set CHARGES = (GetItemCharges(UnitItemInSlot(OURUNIT, ITEMLOOP-1))) + GetItemCharges(NEWITEM)
call SetItemCharges( UnitItemInSlot(OURUNIT, ITEMLOOP-1), CHARGES )
call RemoveItem( NEWITEM )
set ITEMLOOP=7
endif
endif
endif
if ITEMLOOP < 7 then
set ITEMLOOP = ITEMLOOP + 1
endif
endloop
endfunction
//===========================================================================
function InitTrig_Combine_Charges takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( t, Condition( function Trig_Combine_Items_Conditions ) )
call TriggerAddAction( t, function Trig_Combine_Items_Actions )
endfunction
How to have Spell Books into your items
Step 1: Creating the Spell Book
Create a custom Spell Book ability, located under the category Abilities - Special - Items - Spellbook. After that, put in the wanted abilities into the spell book and set the Data - Maximum Spells to how many abilities you have inside the Spellbook. After creating, put the spell book in the item and set the Stats - Actively Used to False
Step 2: Disabling the Spell Book
I know what you're saying, "Disable the spellbook wtf?!" Yeah, its needed so you whatever you will do, cannot use the spellbook. It's simple really, once you put the spell book in the item do this in a trigger:
-
Disable Spellbooks
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set PlayerGroup = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)))
-
Player Group - Pick every player in PlayerGroup and do (Actions)
-
Loop - Actions
-
Player - Disable Spell Book for (Picked player)
-
-------- Disable other spell books here --------
-
-
-
Custom script: call DestroyForce(udg_PlayerGroup)
-
-
TADA!!! Your done!!!
Even if you have spellbooks in your items, you can only have 1 active ability
Well that's all about items that I know!
Please go easy on me, this is my first tutorial..
PLEASE post comments and feedbacks. It is greatly appreciated!!!:thup::thup:
~XeNiM666
Last edited by a moderator: