• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

Stonneash's item recipe system

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Features:
o - Items don't suddenly appear ,a progress bar appear,and disapear after its full(1 sec ) and the item appear
o - Easy Editing
o - Easy to CNP
o - smooth functions
o - all triggers are made in GUI

______________________________________________
credits:
Stonneash - this system
RetroSexuall - progress bar
______________________________________________
Please Enjoy!

P.S.
please vote, and comment

Keywords:
item, item recipe, recipe, progress, stonneash
Contents

Item Recipe V0.9 beta (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 04:23, 16th Jul 2012 Magtheridon96: I'll just quote my comments in the posts: Don't use the waits. You can remove them entirely and have the system unaffected. Don't store the...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

04:23, 16th Jul 2012
Magtheridon96:

I'll just quote my comments in the posts:


  • Don't use the waits. You can remove them entirely and have the system unaffected.
  • Don't store the effect in a variable, just destroy the last created special effect.
  • You shouldn't use that huge if block to check if the unit has all the items, you should use some other method. Currently, this will only work if all 3 items are in the first three slots.
  • The progress bar is useless because it shows up only when you complete a recipe.
  • You need to make the system in such a way so that the player
    doesn't need to create more than one trigger to create his recipes.
    Something along the lines of:
    • Recipe Init
      • Events
        • Map Initialization
      • Conditions
      • Actions
        • Set RecipeItem1 = Gloves of Haste
        • Set RecipeItem2 = Ring of Health
        • Set RecipeItem3 = Ring of Regeneration
        • Set RecipeResult = Enchanted Gauntlet
        • Trigger - Execute CreateRecipe <gen> (ignoring conditions)
        • -------- ---- --------
        • Set RecipeItem1 = Ring of Protection
        • Set RecipeItem2 = Ring of Health
        • Set RecipeResult = Enchanted Hood
        • Trigger - Execute CreateRecipe <gen> (ignoring conditions)
        • -------- ---- --------
        • Set RecipeItem1 = Ring of Health
        • Set RecipeItem2 = Claws of Attack
        • Set RecipeResult = Power Brace
        • Trigger - Execute CreateRecipe <gen> (ignoring conditions)
 
Please use this in posting triggers:

http://www.hiveworkshop.com/forums/misc.php?do=bbcode#trigger\

You can copy the text of your triggers by right-clicking the icon of the name of the trigger(Ex.[trigger=]Name of your trigger
Events
Conditions
Actions[/trigger]
After right-clicking,you will see this line(Copy triggers as text)then click it then right-click paste to post it.
 
smooth functions

What exactly do you mean?


Tips:
- Don't use the waits. You can remove them entirely and have the system unaffected.
- Don't store the effect in a variable, just destroy the last created special effect.
- You shouldn't use that huge if block to check if the unit has all the items, you should use some other method. Currently, this will only work if all 3 items are in the first three slots.
- The progress bar is useless because it shows up only when you complete a recipe.
 
I did give you some suggestions. :C

Okay, I'll give you some more:

You need to make the system in such a way so that the player doesn't need to create more than one trigger to create his recipes.

Something along the lines of:

  • Recipe Init
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Set RecipeItem1 = Gloves of Haste
      • Set RecipeItem2 = Ring of Health
      • Set RecipeItem3 = Ring of Regeneration
      • Set RecipeResult = Enchanted Gauntlet
      • Trigger - Execute CreateRecipe <gen> (ignoring conditions)
      • -------- ---- --------
      • Set RecipeItem1 = Ring of Protection
      • Set RecipeItem2 = Ring of Health
      • Set RecipeResult = Enchanted Hood
      • Trigger - Execute CreateRecipe <gen> (ignoring conditions)
      • -------- ---- --------
      • Set RecipeItem1 = Ring of Health
      • Set RecipeItem2 = Claws of Attack
      • Set RecipeResult = Power Brace
      • Trigger - Execute CreateRecipe <gen> (ignoring conditions)
Does that look really awesome?

Your system would check all the variables (RecipeItem1, RecipeItem2, RecipeItem3, RecipeItem4, RecipeItem5 and RecipeItem6), or better yet, instead of 6 different variables, make an array called RecipeItem and you would check RecipeItem[1] to RecipeItem[6].

Then, you would put the item types that are given by the user in the RecipeItem array into another array which you will use in your system.

Actually, not 1 array, but 7 arrays:

- RecipeItems1
- RecipeItems2
- RecipeItems3
- RecipeItems4
- RecipeItems5
- RecipeItems6
- RecipeItemResults
- RecipeItemCounts

The first 6 arrays contain the items that make each recipe and the seventh one contains the result item of the recipe. The last one contains the number of items that make each recipe.

CreateRecipe puts the item types in RecipeItem[] into these arrays and figures out the count.

When a unit picks up an item, you should loop from 1 to the number of recipes that are in the map, check if the unit has all the items, and if he does, remove those items and give him an item of type RecipeItemResults[(Integer A)].


To see examples of how people do this, you can search for some good GUI recipe systems.
Here's a really good one: http://www.hiveworkshop.com/forums/spells-569/m-fis-v1-7-a-210505/
 
Top