System Artificial's Recipe System

Artificial

Without Intelligence
Reaction score
326
That's a result of this:
JASS:
//          - When used on an recipe added via the charged recipe thingy
//            the ingredient items won't recieve the amount of items they
//            had when the result was made, but the default amount of charges.
 

Artificial

Without Intelligence
Reaction score
326
DotA's recipe system isn't that weird from what I know. The finest thing in it is that it allows an item type to be used multiple times in a recipe, which is something this system (and many others) allows as well. :p
 

Nexor

...
Reaction score
74
but dota is using items that are used when picked up(like runes, so you can pick them up when your inventory is full)
 

Romek

Super Moderator
Reaction score
963
but dota is using items that are used when picked up(like runes, so you can pick them up when your inventory is full)
That's nothing to do with recipes.
Wc3 has runes in the actual game itself.
Play through the campaign. The very first mission has about 20 of them.

DotA didn't make Wc3.
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
but dota is using items that are used when picked up(like runes, so you can pick them up when your inventory is full)

there still a "smart" order when you ordered a hero to pick up item, even his inventory is full.
And it's nothing VERY special, it just checks recipes with the item in the ground and the items in inventory (so there are 7 items to check)

I have made a demo map, check it out.
I modify the Game Interface so there is no "Inventory is full" error message, you should display it by yourself.

And there is one problem, I don't know how to queue a unit's order by trigger :(, anyone know this ?

@Artificial, sorry for modifying your system.

EDIT: removes unnecessary debugs
Fixed a bug that allows 1 item to "self combine" when a recipe has several items of the same type as ingredients. :(
 

Attachments

  • [System] Modified RecipeSYS.w3x
    24.9 KB · Views: 532

Andrewgosu

The Silent Pandaren Helper
Reaction score
715
One of the most fluent and elaborate recipe systems out there.

Resource approved.


P.S I took the liberty to clean the thread of bumps and double posts.

Andrewgosu
 

DruiD-Mk

New Member
Reaction score
0
Hey guys I am quite new here.. Mm. I am making maps for some time but i never used triggers so i need a little help so that I can add my recipes...
I tried to use this system and I can't enable the trigger..
It says:
Line 217: Expected a function name
What should I do ? Please help me out.

Btw on my map i just made a custom script like this:
call AddRecipe('evtl', 'lhst', 0, 0, 0, 0, 'ward')
 

brc

New Member
Reaction score
1
I was just wondering how do i make it so that only heroes can combine items because in my map units and buildings all have an inventory. Also if i take out the disassembling and disabling a recipe part of the trigger, will it get messed up? Thanks and +rep Artificial!
 

Artificial

Without Intelligence
Reaction score
326
> how do i make it so that only heroes can combine items
Set AUTO_COMBINE to false and then create this trigger:
Trigger:
  • Combine
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Triggering unit) is A hero) Equal to True
    • Actions
      • Custom script: call RecipeSYS_Combine(GetManipulatedItem(), GetTriggerUnit())


> if i take out the disassembling and disabling a recipe part of the trigger
If you don't want to use those, then you can just not use them anywhere. They aren't called unless you call them somewhere in your code yourself, so there isn't any need to remove them. Eg. if you only have the example trigger shown in the first post (the GUI one), the players won't be able to disassemble/disable recipes.

But anyway, removing the disassembling functions shouldn't do any harm, but removing the 'enabled' member from the struct will cause some syntax errors, so you'd need to edit the system's code in several other places, too (IIRC).
 

RaiJin

New Member
Reaction score
40
what if u just want to combine 2 items?

JASS:
call AddRecipe('B000', 'B001', 0, 0, 0, RESULT)


what do i set the other values too...
 

Artificial

Without Intelligence
Reaction score
326
JASS:

//      If you want the recipe to require less than 6 items, just give
//      zeros as ingredient arguments.

So you'd use
JASS:
call AddRecipe('B000', 'B001', 0, 0, 0, 0, RESULT)

(just had to add one zero there).
 

pdhc

New Member
Reaction score
0
can someone explain how to convert the code from vJASS to JASS using NewGen? thanks
 

Expelliarmus

Where to change the sig?
Reaction score
48
can someone explain how to convert the code from vJASS to JASS using NewGen? thanks
I don't think there is a button for that...
You will need to do it manually, however some features of vJass (eg Structs) are harder to 'convert'.
 

A.Dominion

New Member
Reaction score
0
how to make it compatible with Bag system?

for example you carry bag in you inventory that stock item, so in the end you have more than 6 items carried by yourself...:)

is it possible to check all item carried (even in the bags) to create recipe, and if so is it possible to create recipe with more than 6 items?
i guess that would also pose problem with compatibility between the jass code in the bag system and in you code...

but well just asking and maybe giving new ideas on things to implement (like a system combining: recip, bag, and stacking charge) :eek:

well your system look pretty cool so if i manage to use newgen i might use your system, unless i can make an easier one myself that isn't as customizable as yours but would be matching just the need of my map..:shades:
 

Chao

Setting sail for fail in the sea of lame.
Reaction score
63
I think I made a big mistake.

I'm attempting to import your Recipe System, but cut all of my custom items from the same mould; thus, the rawcode for nearly all of my items is the exact same. Is there a way I can input the Ingredient variable to apply my items?

Danke!
 

Artificial

Without Intelligence
Reaction score
326
@A.Dominion
I guess it would be possible to also check from the bags, but that really depends on the bag system. The reason I didn't make this compatible with bag systems was that I didn't come up with any way that'd work with any given bag system, as I believe they work rather differently. ;p

@Chao
Multiple items cannot have the same rawcode, even if they were based on the same item. When you take the rawcode, you take the four first chars. The custom items' rawcodes in the object editor are like this:base where 'this' is the rawcode of the item itself and 'base' is the rawcode of the base item.

For example when I created a custom item based on Runed Bracers (brac), the rawcode shown in the object editor was I000:brac. The I000 part was the item's rawcode.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top