*** Recipe Updates ***
#31
(06-03-2012, 08:39 PM)xoft Wrote: Luksor, I put the items.ini in. I decided not to delete most of the stuff you deleted, for compatibility reasons. So the lightstonedust stays Smile
OkTongue
Reply
Thanks given by:
#32
creating a map is more difficult than i thougd Sad it confuses me that you say something different then the recipe.txt Sad are there 2 ways??
yay got it Smile the line is 3x3,1:2:339:1,1:3:339:1,1:1:339:1,2:1:339:1,3:1:339:1,3:2:339:1,3:3:339:1,2:3:339:1,2:2:345:1@358:1 #-> Map
Reply
Thanks given by:
#33
I was proposing a new format to replace the current recipes.txt format:
https://forum.cuberite.org/showthread.ph...96#pid3096
Reply
Thanks given by:
#34
I have written a parser for the new grammar, its code is even a bit shorter than the old parser, and I'd say it's much more cleaner, as it's separated into several functions etc.

Now I need to write the recipe matching - get the recipe that represents the current arrangement on the crafting table. This is gonna be a bit more difficult Smile
It seems that the "*:2"-style coords would make the recipe matcher too complicated. I think I'll step down from that feature. So the coord grammar is revised:
Code:
<IngredientN> = <ItemType>, <Coord1>, <Coord2>, ... <CordN>
<CoordN> = <X>:<Y> or *
This means that either full coords must be given, or a single asterisk, meaning "anywhere".

Note that "anywhere" may match already matched items, so the following recipe wouldn't work:
Code:
# Sticks:
Planks, *, * | Stick, 4
# This would match even a single pile of at least 2 planks
Reply
Thanks given by:
#35
I like your recipes syntax much more than the one used right nowTongue

The only difficulty I see with it, is comparing the user input to a recipe with the "*:2"-style coordsTongue Which you already seem to have encountered
Reply
Thanks given by:
#36
I'm leaving on a school trip tomorrow, so i wont be able to work on the recipes until Thursday.
See you later. Wink
Reply
Thanks given by:
#37
I'll keep both recipe formats in for the time being, then. If I manage to finish them at all Smile

FakeTruth, I'm glad you like it. I hope you'll like the parser, too Smile
It seems that I accidentally managed to get even the "*:1" coords working. The only problem with them is if you combine two such definitions in a crossing directions, such as "*:1, 1:*". Then the recipe matcher may be unable to match the recipe to a crafting grid of "1:1, 2:1". But hey, I don't think there's any such recipe Smile
Reply
Thanks given by:
#38
A few details:

Which of the following formats do you think is the best?
Format 1 (as specified earlier):
Code:
<Ingredient1> | <Ingredient2> | ... | <IngredientN> | <Result>
Stick, 2:2, 2:3 | Cobblestone, 2:1, *:1 | StoneHoe

Format 2
Code:
<Result> | <Ingredient1> | <Ingredient2> | ... | <IngredientN>
StoneHoe | Stick, 2:2, 2:3 | Cobblestone, 2:1, *:1

Format 3
Code:
<Ingredient1> + <Ingredient2> + ... + <IngredientN> = <Result>
Stick, 2:2, 2:3 + Cobblestone, 2:1, *:1 = StoneHoe

Format 4
Code:
<Result> = <Ingredient1> + <Ingredient2> + ... + <IngredientN>
StoneHoe = Stick, 2:2, 2:3 + Cobblestone, 2:1, *:1

Or a different one?
Wife says the best format is this one:
Code:
<Result> = <Ingredient1> | <Ingredient2> | ... | <IngredientN>
StoneHoe = Stick, 2:2, 2:3 | Cobblestone, 2:1, *:1
Planks^0, 4 = Log^0, *
She was preferring the + as the divider, until she noticed we're using a * for coords, and it's too close to + visually.
Reply
Thanks given by:
#39
Listen to your wife Smile I like 5 format the most
Reply
Thanks given by:
#40
Smart wifeBig Grin
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)