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
964
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: 543

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top