- Joined
- Mar 24, 2007
- Messages
- 20
Item Bonding
+
=
This Tutorial is to teach everyone out there making a hero based map that wants something like the troll tribe system of creating awesome items from a set of crap items...
First what you will need is a basic understanding of what you want to do, a basic understanding of triggers, and plenty of patience...
To begin lets just say you want to make Item 3 from item 1 and item 2...
You want when a unit picks up an item to check if you have item 1 and item 2 in slots one and 2 the event is simple, the condition looks long but its also very simple you have to use a condition at the bottom called And from 3-7 times without charges and from 5-11 times with charges, its allot of ands i know but once u have put the ands down u just need to enter the a boolean condition in preferably the last or first slot saying that triggering unit is a hero or if your using a skill an ability confirmation and/or a unit type comparison.
Now that u have got down to finished the starts of the and u need to fill in the spaces basicaly all u need to put in is a item type condition in each and checking that triggering unit has item 1 in slot 1 and item 2 in slot 2(2 conditions for uncharged items).
Finished that now the action u need to remove the items in item slot 1 and item slot 2 just with Item - Remove (item carried by (triggering unit) in slot 1) then a hero action to give the item to the triggering unit...
The trigger should look like this...
Charge Bonding
Now working with charges, lets say that Item 1 requires 2 charges and Item 3 requires 2...
Lazy Bonding
All of the triggers above require you to put items in the right order now what if you want the person to have them in any order they want, but just require the items(I suggest you only do this if you don't want to fuse many items and you use a spell to fuse them with...). The Trigger would go a little something like this.
You can also make one trigger do every single item combination, lets say you want to make a trigger that makes item 2 and 3 into item 1 and item 1 and 3 into item 2 you would need to make something like this...
Stacking System
For the Charges Triggers you may need a item stacking system, that can easily be created with simple GUI, you will need to create a looping trigger for all slots 1-6, when a unit acquires an item. If you don't know how to use Integer A or Looping actions you should just use this trigger if you do how ever I suggest that you create a way of limiting the amount of charges to your liking(the max amount of charges for every single item is 5)(a nice way of making the item charges be easy to be manipulated is to change the 5 to be the level of the item(Implemented in the test map)).
A few things that I suggest...
- that you should label carefully each item being crafted and what it requires above the If/Then/Else Multipull Functions(if you are using them) it will save you allot of time...
- make a ability that makes the item not just when a unit picks up an item...
- make sure that you have ample help on how to make the items to help out noobs on your map...
- give as much rep as possible to V2.
This tutorial might not explain how to make them but i find that i learn better with visuals than words and i hope you do aswell, so open up the map and toy around with it and whatever.
- V2. Dropping on a house near you...
This Tutorial is to teach everyone out there making a hero based map that wants something like the troll tribe system of creating awesome items from a set of crap items...
First what you will need is a basic understanding of what you want to do, a basic understanding of triggers, and plenty of patience...
To begin lets just say you want to make Item 3 from item 1 and item 2...
You want when a unit picks up an item to check if you have item 1 and item 2 in slots one and 2 the event is simple, the condition looks long but its also very simple you have to use a condition at the bottom called And from 3-7 times without charges and from 5-11 times with charges, its allot of ands i know but once u have put the ands down u just need to enter the a boolean condition in preferably the last or first slot saying that triggering unit is a hero or if your using a skill an ability confirmation and/or a unit type comparison.
Now that u have got down to finished the starts of the and u need to fill in the spaces basicaly all u need to put in is a item type condition in each and checking that triggering unit has item 1 in slot 1 and item 2 in slot 2(2 conditions for uncharged items).
Finished that now the action u need to remove the items in item slot 1 and item slot 2 just with Item - Remove (item carried by (triggering unit) in slot 1) then a hero action to give the item to the triggering unit...
The trigger should look like this...
- Event
- Unit - A unit Acquires an item
- Condition
- ((Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Item 1) and (((Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Item 2) and (((Triggering unit) is A Hero) Equal to True)))
- Action
- Item - Remove (Item carried by (Triggering unit) in slot 1)
- Item - Remove (Item carried by (Triggering unit) in slot 2)
- Hero - Create Item 3 and give it to (Triggering unit)
Charge Bonding
Now working with charges, lets say that Item 1 requires 2 charges and Item 3 requires 2...
- Event
- Unit - A unit Acquires an item
- Condition
- ((Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Item 1) and (((Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Item 2) and (((Charges remaining in (Item carried by (Triggering unit) in slot 1)) Greater than or equal to 2) and (((Charges remaining in (Item carried by (Triggering unit) in slot 2))
- Action
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot 1) to ((Charges remaining in (Item carried by (Triggering unit) in slot 1)) - 2)
- If ((Charges remaining in (Item carried by (Triggering unit) in slot 1)) Equal to 0) then do (Item - Remove (Item carried by (Triggering unit) in slot 1)) else do (Do nothing)
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot 2) to ((Charges remaining in (Item carried by (Triggering unit) in slot 2)) - 2)
- If ((Charges remaining in (Item carried by (Triggering unit) in slot 2)) Equal to 0) then do (Item - Remove (Item carried by (Triggering unit) in slot 2)) else do (Do nothing)
- Hero - Create Item 3 and give it to (Triggering unit)
Lazy Bonding
All of the triggers above require you to put items in the right order now what if you want the person to have them in any order they want, but just require the items(I suggest you only do this if you don't want to fuse many items and you use a spell to fuse them with...). The Trigger would go a little something like this.
- Event
- Unit - A unit Acquires an item(I do suggest you use a different event)
- Condition
- ((Item-type of (Item carried by (Triggering unit) of type Item 1)) Equal to Item 1) and (((Item-type of (Item carried by (Triggering unit) of type Item 2)) Equal to Item 2) and (((Charges remaining in (Item carried by (Triggering unit) of type Item 1)) Greater than or equal to 2) and (((Charges remaining in (Item carried by (Triggering unit) of type Item 1) Greater than or equal to 2)
- Action
- Item - Set charges remaining in (Item carried by (Triggering unit) of type Item 1) to ((Charges remaining in (Item carried by (Triggering unit) of type Item 1)) - 2)
- If ((Charges remaining in (Item carried by (Triggering unit) of type Item 1)) Equal to 0) then do (Item - Remove (Item carried by (Triggering unit) of type Item 1)) else do (Do nothing)
- Item - Set charges remaining in (Item carried by (Triggering unit) of type Item 2) to ((Charges remaining in (Item carried by (Triggering unit) of type Item 2)) - 2)
- If ((Charges remaining in (Item carried by (Triggering unit) of type Item 2)) Equal to 0) then do (Item - Remove (Item carried by (Triggering unit) of type Item 2)) else do (Do nothing)
- Hero - Create Item 3 and give it to (Triggering unit)
You can also make one trigger do every single item combination, lets say you want to make a trigger that makes item 2 and 3 into item 1 and item 1 and 3 into item 2 you would need to make something like this...
- Event
- Unit - A unit Acquires an item
- Condition(leave blank unless you only want a certain type of unit to bond)
- Action
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (((((Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Item 2) and ((Charges remaining in (Item carried by (Triggering unit) in slot 1)) Greater than or equal to 1)) and ((((Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Item 3)) and ((Charges remaining in (Item carried by (Triggering unit) in slot 2)) Greater than or equal to 1))
-
Then - Actions
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot 1) to ((Charges remaining in (Item carried by (Triggering unit) in slot 1)) - 1)
- If ((Charges remaining in (Item carried by (Triggering unit) in slot 1)) Equal to 0) then do (Item - Remove (Item carried by (Triggering unit) in slot 1)) else do (Do nothing)
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot 2) to ((Charges remaining in (Item carried by (Triggering unit) in slot 2)) - 1)
- If ((Charges remaining in (Item carried by (Triggering unit) in slot 2)) Equal to 0) then do (Item - Remove (Item carried by (Triggering unit) in slot 2)) else do (Do nothing)
- Hero - Create Item 1 and give it to (Triggering unit)
-
Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (((((Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Item 1) and ((Charges remaining in (Item carried by (Triggering unit) in slot 1)) Greater than or equal to 1)) and ((((Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Item 3)) and ((Charges remaining in (Item carried by (Triggering unit) in slot 2)) Greater than or equal to 1))
-
Then - Actions
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot 1) to ((Charges remaining in (Item carried by (Triggering unit) in slot 1)) - 1)
- If ((Charges remaining in (Item carried by (Triggering unit) in slot 1)) Equal to 0) then do (Item - Remove (Item carried by (Triggering unit) in slot 1)) else do (Do nothing)
- Item - Set charges remaining in (Item carried by (Triggering unit) in slot 2) to ((Charges remaining in (Item carried by (Triggering unit) in slot 2)) - 1)
- If ((Charges remaining in (Item carried by (Triggering unit) in slot 2)) Equal to 0) then do (Item - Remove (Item carried by (Triggering unit) in slot 2)) else do (Do nothing)
- Hero - Create Item 2 and give it to (Triggering unit)
- Else - Actions
-
If - Conditions
Stacking System
For the Charges Triggers you may need a item stacking system, that can easily be created with simple GUI, you will need to create a looping trigger for all slots 1-6, when a unit acquires an item. If you don't know how to use Integer A or Looping actions you should just use this trigger if you do how ever I suggest that you create a way of limiting the amount of charges to your liking(the max amount of charges for every single item is 5)(a nice way of making the item charges be easy to be manipulated is to change the 5 to be the level of the item(Implemented in the test map)).
- Events
- Unit - A unit Acquires an item
- Conditions
- (Charges remaining in (Item being manipulated)) Not equal to 0
- Actions
- For each (Integer A) from 1 to 6, 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-type of (Item being manipulated))
- (Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) Less than 5 in slot (Integer A)))
- (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item being manipulated))) Greater than 5
- Then - Actions
- Item - Set charges remaining in (Item being manipulated) to (((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item being manipulated))) - 5
- Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A)) to 5
- Else - Actions
- Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A)) to ((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item being manipulated)))
- Item - Remove (Item being manipulated)
- Else - Actions
- Do nothing
A few things that I suggest...
- that you should label carefully each item being crafted and what it requires above the If/Then/Else Multipull Functions(if you are using them) it will save you allot of time...
- make a ability that makes the item not just when a unit picks up an item...
- make sure that you have ample help on how to make the items to help out noobs on your map...
- give as much rep as possible to V2.
This tutorial might not explain how to make them but i find that i learn better with visuals than words and i hope you do aswell, so open up the map and toy around with it and whatever.
- V2. Dropping on a house near you...
Attachments
Last edited: