Ok I Need The Big Brains Here!

ok so I have the inventory save data like this 0:3:1 (Slot:Id:Amount) Slots 99 100 101 102 103 104 105 106 107 are for crafting
I want to give recipes simply basically for wood into planks I don’t want to hardcode every slot has a wood and every other slot doesn’t so how would I send that through?
My only thought is to hardcode as I said but there must be a better way

Some Big Brain I can think of (@JR01, @John_Shrekinson, @ManiacPumpkin, @CodeAlpaca)

4 Likes

first, ty for calling me a “Big Brain” even though I’ve only been using flowlab for about 3 months.

Does this work?

  • If only one slot has an item and that item is wood, make wood planks (made using filters, etc). (EDIT: rereading this, this sounds really dumb and is what you’re asking a work around for)

  • Ray Cast can also be used maybe to detect objects and their placement. (not sure how this would work yet)

  • Another thing is maybe you can have an object on the crafting table with proximity, if only wood is detected make wood planks if not, anything else can be made. Those are some rough ideas and I have no idea what your code looks like so idk. These may also be hardcoded so not sure if it even helps.

Again, I’ve only been using flowlab for 3 months, so that means I just have less experience with different types of games so maybe someone else will have better ideas than me (JR01 is good with lists, I think, so he might have a good idea). If I think of anything else I’ll tell you. :llama:

EDIT: I just realized this, but is it just multiple sprites and different items depending on the object number? If so I think all my ideas except the first one won’t work.

2 Likes

what object has the code in it?

1 Like

yeah so the other thing I need is crafting a crafting table because its 4 planks in a square how do i easily detect that in the 3x3 grid?

inventory item in the item detector bundle near the bottom
Edit: I’m going to add the crafting code in another area but that doesn’t matter rn

The only thing I can think of currently is just a ton of logic gates. I’m trying to find another way but my mind is just blanking rn

1 Like

maybe something with Text Compare might work.

for example,

WoodWood-WoodWood---- that would be wood in slots 1,2,4,5. If it contains WoodWood-WoodWood should work for any slot, meaning to make a crafting table.

If slot wood is in slot 5,6,8,9, then have a text compare with every other item (or every letter besides W, O, D). If the other text compare has an output of “Yes” then turn it off. I’ll send a screenshot in a sec

( - represents the slot being empty)

2 Likes

@cailem02

I think this should work. It avoids all the logic gates and different filters. While this will need to be done for every item it’s the easiest thing I could think of. Hope this helps, if it doesn’t work tell me what it is and I’ll try to fix it.

Importable

{“data”:{“behavior”:{“v”:“2”,“nodes”:[{“inputCount”:2,“outputCount”:2,“name”:“Text Compare”,“behaviorType”:“logic.data.TextCompare”,“x”:2340,“y”:-32,“group”:“a87435aae8604940”,“id”:“be1de16bf696ce49”,“notes”:“Looking for WoodWood-WoodWood\nSet to B contains A”,“n_o”:1,“hsv”:“WoodWood-WoodWood”,“mode”:3},{“inputCount”:5,“outputCount”:2,“name”:“Text”,“behaviorType”:“logic.data.TextBlock”,“x”:2160,“y”:-32,“group”:“a87435aae8604940”,“id”:“be23c4c655bc5246”,“notes”:“Inputs need a slight delay so order does not get mixed up.”,“n_o”:1,“startVal”:""},{“inputCount”:3,“outputCount”:1,“name”:“Switch”,“behaviorType”:“logic.logic.Switch”,“x”:2520,“y”:-32,“group”:“a87435aae8604940”,“id”:“be26af7dfcf4f44b”,"_startVal":0,“dataType”:1},{“inputCount”:1,“outputCount”:1,“name”:“To Number”,“behaviorType”:“logic.data.ToNumber”,“x”:2610,“y”:-128,“group”:“a87435aae8604940”,“id”:“be270a87e3b3c34e”,“notes”:“Goes to whatever it needs to”,“n_o”:1},{“inputCount”:2,“outputCount”:2,“name”:“Text Compare”,“behaviorType”:“logic.data.TextCompare”,“x”:2340,“y”:128,“group”:“a87435aae8604940”,“id”:“be270eeac9b1214d”,“notes”:“every letter besides W, O, D. Set to B contains A”,“n_o”:1,“hsv”:“abcefghijklmnpqrstuvxyz”,“mode”:3},{“inputCount”:1,“outputCount”:1,“name”:“To Number”,“behaviorType”:“logic.data.ToNumber”,“x”:2520,“y”:96,“group”:“a87435aae8604940”,“id”:“be284ac37e848c41”},{“inputCount”:1,“outputCount”:1,“name”:“To Number”,“behaviorType”:“logic.data.ToNumber”,“x”:2520,“y”:160,“group”:“a87435aae8604940”,“id”:“be2866240d698b4c”}],“links”:[{“input_id”:“be1de16bf696ce49i1”,“output_id”:“be23c4c655bc5246o0”},{“input_id”:“be26af7dfcf4f44bi2”,“output_id”:“be1de16bf696ce49o0”},{“input_id”:“be270eeac9b1214di1”,“output_id”:“be23c4c655bc5246o0”},{“input_id”:“be26af7dfcf4f44bi0”,“output_id”:“be284ac37e848c41o0”},{“input_id”:“be26af7dfcf4f44bi1”,“output_id”:“be2866240d698b4co0”},{“input_id”:“be270a87e3b3c34ei0”,“output_id”:“be26af7dfcf4f44bo0”},{“input_id”:“be270a87e3b3c34ei0”,“output_id”:“be26af7dfcf4f44bo0”},{“input_id”:“be270eeac9b1214di1”,“output_id”:“be23c4c655bc5246o0”},{“input_id”:“be284ac37e848c41i0”,“output_id”:“be270eeac9b1214do0”},{“input_id”:“be2866240d698b4ci0”,“output_id”:“be270eeac9b1214do1”},{“input_id”:“be284ac37e848c41i0”,“output_id”:“be270eeac9b1214do0”},{“input_id”:“be26af7dfcf4f44bi0”,“output_id”:“be284ac37e848c41o0”},{“input_id”:“be2866240d698b4ci0”,“output_id”:“be270eeac9b1214do1”},{“input_id”:“be26af7dfcf4f44bi1”,“output_id”:“be2866240d698b4co0”}]}}}

2 Likes

The best way to do this is to figure out what is each slot, using maybe text, and decoding it through there.

@CodeAlpaca THANK YOU I’ll give this a shot immediately
also, I could use the Id so I don’t have to go through the pain of setting 0 to cobblestone 1 to…

1 Like

Thank you for calling me a Big Brain, even though I don’t think I’ve earned that title yet (except when it comes to 2D pixel gun combat).


Maybe you could “hardcode” it so that only the slots with the items in it are coded? I’m not sure I haven’t learned or used these text behaviors yet.

Also I’m sorry about this it brings me just as much pain as any of you! : /

1 Like

it won’t let me import it?

1 Like

THANK YOU ALL!!! Using the text compare a contains b and a check to see how many slots are filled I can do every recipe with ease!!!

1 Like

You’re welcome (hopefully I helped)!

1 Like

your comment actually made me think of something when you said “hardcode” so yeah actually XD

1 Like

oh ok wow I didn’t know that

Np, glad I could help, when someone calls me a big brain I have to go all out and prove it. I made it towards the right of your code, so if you zoom out you should see it.

3 Likes

My pixel gun combat is superior

2 Likes