• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to make a recipe item.

Status
Not open for further replies.
Level 9
Joined
Dec 21, 2011
Messages
332
Okay. Here you go:
  • Items
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) has an item of type Claws of Attack +15) Equal to True
      • ((Hero manipulating item) has an item of type Crown of Kings +5) Equal to True
    • Actions
      • Item - Remove (Item carried by (Hero manipulating item) of type Claws of Attack +15)
      • Item - Remove (Item carried by (Hero manipulating item) of type Crown of Kings +5)
      • Hero - Create Mask of Death and give it to (Hero manipulating item)
      • Special Effect - Create a special effect attached to the overhead of (Hero manipulating item) using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
      • Special Effect - Destroy (Last created special effect)
Just change items, to the one you wanted and the special effect too.

EDIT : Added test map.
 

Attachments

  • Recipe.w3x
    8.6 KB · Views: 53
Level 1
Joined
Jun 5, 2008
Messages
151
Okay. Here you go:
  • Items
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) has an item of type Claws of Attack +15) Equal to True
      • ((Hero manipulating item) has an item of type Crown of Kings +5) Equal to True
    • Actions
      • Item - Remove (Item carried by (Hero manipulating item) of type Claws of Attack +15)
      • Item - Remove (Item carried by (Hero manipulating item) of type Crown of Kings +5)
      • Hero - Create Mask of Death and give it to (Hero manipulating item)
      • Special Effect - Create a special effect attached to the overhead of (Hero manipulating item) using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
      • Special Effect - Destroy (Last created special effect)
Just change items, to the one you wanted and the special effect too.

EDIT : Added test map.


Hey I have a question is there any difference(except that your trigger is much shorter) with this one?:


  • First Trigger(need both for 1 item only)
    • Events
      • Unit - HERO 0003 <gen> obtain a item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) is equal to ITEM(1)
          • (Item-type of (Item being manipulated)) is equal to ITEM(2)
          • (Item-type of (Item being manipulated)) is equal to ITEM(3)
    • Actions
      • Set Iloscczesci = (Iloscczesci + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Iloscczesci is higher or equal than 3
          • ((Hero manipulating item) has an item of type ITEM(1)) is equal to YES
          • ((Hero manipulating item) has an item of type ITEM(2)) is equal to YES
          • ((Hero manipulating item) has an item of type ITEM(3)) is equal to YES
        • Then - Actions
          • Item - Remove (Item carried by (Hero manipulating item) of type ITEM(1))
          • Item - Remove (Item carried by (Hero manipulating item) of type ITEM(2))
          • Item - Remove (Item carried by (Hero manipulating item) of type ITEM(3))
          • Hero - Create COMBINED ITEM(1-2-3) and give it to (Hero manipulating item)
        • or else - Actions
  • Second trigger
    • Events
      • Unit - Hero 0003 <gen> Lose a item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) is equal to ITEM(1)
          • (Item-type of (Item being manipulated)) is equal to ITEM(2)
          • (Item-type of (Item being manipulated)) is equal to ITEM(3)
    • Actions
      • Set Iloscczesci = (Iloscczesci - 1)
Those are the triggers I used for a long time and when I see yours I feel like its much better and easier to use, so let me know if there is any difference except that your is just faster to make.
 
Level 9
Joined
Dec 21, 2011
Messages
332
Hey I have a question is there any difference(except that your trigger is much shorter) with this one?:


  • First Trigger(need both for 1 item only)
    • Events
      • Unit - HERO 0003 <gen> obtain a item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) is equal to ITEM(1)
          • (Item-type of (Item being manipulated)) is equal to ITEM(2)
          • (Item-type of (Item being manipulated)) is equal to ITEM(3)
    • Actions
      • Set Iloscczesci = (Iloscczesci + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Iloscczesci is higher or equal than 3
          • ((Hero manipulating item) has an item of type ITEM(1)) is equal to YES
          • ((Hero manipulating item) has an item of type ITEM(2)) is equal to YES
          • ((Hero manipulating item) has an item of type ITEM(3)) is equal to YES
        • Then - Actions
          • Item - Remove (Item carried by (Hero manipulating item) of type ITEM(1))
          • Item - Remove (Item carried by (Hero manipulating item) of type ITEM(2))
          • Item - Remove (Item carried by (Hero manipulating item) of type ITEM(3))
          • Hero - Create COMBINED ITEM(1-2-3) and give it to (Hero manipulating item)
        • or else - Actions
  • Second trigger
    • Events
      • Unit - Hero 0003 <gen> Lose a item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) is equal to ITEM(1)
          • (Item-type of (Item being manipulated)) is equal to ITEM(2)
          • (Item-type of (Item being manipulated)) is equal to ITEM(3)
    • Actions
      • Set Iloscczesci = (Iloscczesci - 1)
Those are the triggers I used for a long time and when I see yours I feel like its much better and easier to use, so let me know if there is any difference except that your is just faster to make.

I think there is no difference when it comes to results, except for the Special Effect to unit to show that you have created an item. Because the X variable checks the number of items held by hero and changes the item being held is = to or greater than 3.
 
Level 1
Joined
Jun 5, 2008
Messages
151
ok thanks, I guess that its better to use this short system instead of this long one :> seriously making like 500 recipes will be much better this way :<
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Dude... using any of the systems above would be crazy. That's not short at all. You have to make a Table SetUp and a an intuitive trigger, so, you just SetUp all you recipes, and use another trigger to retrieve the data from that table, and use it.

This one is A LOT better. take a minute to read the information and you'll get the hang of it.

http://www.hiveworkshop.com/forums/...3261/?prev=status=a&search=Recipe&d=list&r=20
 
Level 1
Joined
Jun 5, 2008
Messages
151
Dude... using any of the systems above would be crazy. That's not short at all. You have to make a Table SetUp and a an intuitive trigger, so, you just SetUp all you recipes, and use another trigger to retrieve the data from that table, and use it.

This one is A LOT better. take a minute to read the information and you'll get the hang of it.

http://www.hiveworkshop.com/forums/...3261/?prev=status=a&search=Recipe&d=list&r=20

thanks, though I dont understand jass, and it seems way more complicated and longer to make :> than 3-5 actions for single recipe :D
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Dude, it's just one single action to create a recipe :) See the example inside the test map provied in the Recipe System link. You just have to Copy/Paste the triggers in that map, and then, in your on map, do something like this:

  • Custom script: call CreateRecipe(Item1, Item2, Item3, Item4, Item5, Item6, ResultingItem)
Done, there's your recipe.

I trully believe that 1 Copy/Paste and 1 Action is better than your 3-5 actions for each recipe.
 
Level 1
Joined
Jun 5, 2008
Messages
151
Dude, it's just one single action to create a recipe :) See the example inside the test map provied in the Recipe System link. You just have to Copy/Paste the triggers in that map, and then, in your on map, do something like this:

  • Custom script: call CreateRecipe(Item1, Item2, Item3, Item4, Item5, Item6, ResultingItem)
Done, there's your recipe.

I trully believe that 1 Copy/Paste and 1 Action is better than your 3-5 actions for each recipe.

oh..I though that I need to edit that JASS and add my items, but then what is "item1,item2" is it item ID?
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Spartipilo is right. Systems are not created in order to be... recreated by users. They are uploaded here for one reason - to get used by people who need them. You need this system in your map. It makes your map work faster and better, while making it look neat. Systems (and other resources) may have a hard-coded core, but they are easy to implement.
To implement the recipe system, you don't have to know Jass, you have to copy-paste. The way you should add recipes HAS TO BE shown by the author of the system, otherwise, the system would have got rejected.
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
Exactly. Item1, Item2, etc., are the item id's.

In the TestMap you'll se a trigger called "Demo" and there it shows how to create 2, 3, 4, 5 and 6 item recipes. I think it's CreateRecipe2, CreateRecipe3, CreateRecipe4, CreateRecipe5, CreateRecipe6. Just check the demo map and read the instructions. It shows you how to use its functions, and be sure that there isn't any better "Generic" system here in Hiveworkshop to work recipes.

It also allows decompose the recipe into it's components, if you want it.

If you get deep into the system and really understand it, you may adjust it to fit your needs, like removing unnecesary things and stuff, by really knowing the code, script, and your whole map work, like if you're never going to use a 4 item recipe, remove that function, but the improvement is nearly undetectable.
 
Level 1
Joined
Jun 5, 2008
Messages
151
Exactly. Item1, Item2, etc., are the item id's.

In the TestMap you'll se a trigger called "Demo" and there it shows how to create 2, 3, 4, 5 and 6 item recipes. I think it's CreateRecipe2, CreateRecipe3, CreateRecipe4, CreateRecipe5, CreateRecipe6. Just check the demo map and read the instructions. It shows you how to use its functions, and be sure that there isn't any better "Generic" system here in Hiveworkshop to work recipes.

It also allows decompose the recipe into it's components, if you want it.

If you get deep into the system and really understand it, you may adjust it to fit your needs, like removing unnecesary things and stuff, by really knowing the code, script, and your whole map work, like if you're never going to use a 4 item recipe, remove that function, but the improvement is nearly undetectable.


Thanks I give both of you +REP for help :)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Whenever you want to do a system, look for it first in the Spell section. There are drop, experience, Inventory, Recipe, Missile, and several other systems.
 
Status
Not open for further replies.
Top