*** Recipe Updates ***
#18
The Eye of Ender has 6 possibilities, if coded right (use a 2x2 grid only). Still, that's too much.

Now that I've seen the code for the parser, I'm inclined to rewrite it from scratch. So we can adjust the recipe syntax to whatever we want.

My personal favorite is this:
Code:
<Line> = <Recipe>#<Comment>
<Recipe> = <Ingredient1> | <Ingredient2> | ... | <IngredientN> | <Result>
<IngredientN> = <ItemID>, <X1> : <Y1>, <X2> : <Y2>, ..., <Xn> : <Yn>
<ItemID> = <ItemType> [^DamageValue]
<Xn>, <Yn> = "1" .. "3", or "*" for any value (-> shapeless)
<Result> = <ItemType> [^DamageValue] [, <Count>]

ItemType may be a number or an item name (resolved through items.ini).

Examples:
Code:
#Eye of Ender:
EnderPearl, *:* | Blaze powder, *:* | EyeOfEnder

#Stone hoe:
Stick, 2:2, 2:3, Cobblestone: 2:1, *:1 | StoneHoe
# The stone ingredient says one stone has to be at 2:1 and one more has to be anywhere in the top row

#Red wool:
Wool, *:* | Dye^1, *:* | Wool^14

#Sticks:
Planks, *:* | Stick, 4

#TNT:
Gunpowder, 1:1, 3:1, 2:2, 3:1, 3:3 | Sand, 2:1, 1:2, 3:2, 2:3 | TNT

Compare with the old definition of TNT:
Code:
3x3,1:1:289:1,3:1:289:1,2:2:289:1,1:3:289:1,3:3:289:1,2:1:12:1,1:2:12:1,3:2:12:1,2:3:12:1@46:1  # -> TNT

The grid size doesn't matter anymore, since the parser will automatically bound the recipe to correct grid size.

Is anyone against this new syntax? Does anyone see any potential flaws? If I rewrote the recipe parser, would anyone be kind enough to rewrite the current recipes.txt to match this format?
Reply
Thanks given by:


Messages In This Thread
*** Recipe Updates *** - by dorkboy - 04-13-2012, 05:38 PM
RE: *** Recipe Updates *** - by NiLSPACE - 04-13-2012, 06:59 PM
RE: *** Recipe Updates *** - by xoft - 04-13-2012, 07:29 PM
RE: *** Recipe Updates *** - by dorkboy - 04-13-2012, 09:10 PM
RE: *** Recipe Updates *** - by FakeTruth - 04-13-2012, 10:04 PM
RE: *** Recipe Updates *** - by xoft - 04-13-2012, 10:22 PM
RE: *** Recipe Updates *** - by NiLSPACE - 04-14-2012, 04:02 AM
RE: *** Recipe Updates *** - by dorkboy - 04-14-2012, 05:24 AM
RE: *** Recipe Updates *** - by xoft - 04-15-2012, 03:26 AM
RE: *** Recipe Updates *** - by dorkboy - 04-17-2012, 10:56 AM
RE: *** Recipe Updates *** - by dorkboy - 04-21-2012, 01:32 PM
RE: *** Recipe Updates *** - by xoft - 04-22-2012, 02:06 AM
RE: *** Recipe Updates *** - by Luksor - 06-03-2012, 07:02 AM
RE: *** Recipe Updates *** - by xoft - 06-03-2012, 05:11 PM
RE: *** Recipe Updates *** - by Luksor - 06-03-2012, 06:13 PM
RE: *** Recipe Updates *** - by xoft - 06-03-2012, 06:46 PM
RE: *** Recipe Updates *** - by Luksor - 06-03-2012, 07:01 PM
RE: *** Recipe Updates *** - by xoft - 06-03-2012, 07:30 PM
RE: *** Recipe Updates *** - by Luksor - 06-03-2012, 07:40 PM
RE: *** Recipe Updates *** - by NiLSPACE - 06-03-2012, 07:36 PM
RE: *** Recipe Updates *** - by xoft - 06-03-2012, 07:48 PM
RE: *** Recipe Updates *** - by NiLSPACE - 06-03-2012, 07:53 PM
RE: *** Recipe Updates *** - by xoft - 06-03-2012, 07:59 PM
RE: *** Recipe Updates *** - by NiLSPACE - 06-03-2012, 08:02 PM
RE: *** Recipe Updates *** - by xoft - 06-03-2012, 08:19 PM
RE: *** Recipe Updates *** - by NiLSPACE - 06-03-2012, 08:32 PM
RE: *** Recipe Updates *** - by Luksor - 06-03-2012, 08:23 PM
RE: *** Recipe Updates *** - by xoft - 06-03-2012, 08:24 PM
RE: *** Recipe Updates *** - by Luksor - 06-03-2012, 08:24 PM
RE: *** Recipe Updates *** - by xoft - 06-03-2012, 08:39 PM
RE: *** Recipe Updates *** - by Luksor - 06-03-2012, 08:42 PM
RE: *** Recipe Updates *** - by NiLSPACE - 06-03-2012, 08:48 PM
RE: *** Recipe Updates *** - by xoft - 06-03-2012, 09:03 PM
RE: *** Recipe Updates *** - by xoft - 06-03-2012, 10:43 PM
RE: *** Recipe Updates *** - by FakeTruth - 06-04-2012, 02:54 AM
RE: *** Recipe Updates *** - by Luksor - 06-04-2012, 05:16 AM
RE: *** Recipe Updates *** - by xoft - 06-04-2012, 05:20 AM
RE: *** Recipe Updates *** - by xoft - 06-04-2012, 06:43 AM
RE: *** Recipe Updates *** - by Taugeshtu - 06-04-2012, 07:00 AM
RE: *** Recipe Updates *** - by FakeTruth - 06-04-2012, 07:40 AM
RE: *** Recipe Updates *** - by xoft - 06-04-2012, 03:32 PM
RE: *** Recipe Updates *** - by xoft - 06-04-2012, 10:40 PM
RE: *** Recipe Updates *** - by xoft - 06-05-2012, 04:45 PM
RE: *** Recipe Updates *** - by Taugeshtu - 06-05-2012, 08:12 PM
RE: *** Recipe Updates *** - by xoft - 06-05-2012, 08:15 PM
RE: *** Recipe Updates *** - by Taugeshtu - 06-05-2012, 08:19 PM
RE: *** Recipe Updates *** - by Taugeshtu - 06-05-2012, 11:19 PM
RE: *** Recipe Updates *** - by xoft - 06-05-2012, 11:50 PM
RE: *** Recipe Updates *** - by xoft - 06-06-2012, 01:31 AM
RE: *** Recipe Updates *** - by Taugeshtu - 06-06-2012, 01:38 AM
RE: *** Recipe Updates *** - by Luksor - 06-07-2012, 05:41 AM
RE: *** Recipe Updates *** - by xoft - 06-07-2012, 06:15 AM
RE: *** Recipe Updates *** - by Taugeshtu - 06-07-2012, 06:33 AM
RE: *** Recipe Updates *** - by NiLSPACE - 06-07-2012, 03:17 PM
RE: *** Recipe Updates *** - by NiLSPACE - 06-11-2012, 01:56 AM
RE: *** Recipe Updates *** - by xoft - 06-11-2012, 03:32 PM
RE: *** Recipe Updates *** - by NiLSPACE - 09-29-2012, 10:08 PM
RE: *** Recipe Updates *** - by xoft - 09-29-2012, 11:39 PM
RE: *** Recipe Updates *** - by NiLSPACE - 09-29-2012, 11:46 PM
RE: *** Recipe Updates *** - by xoft - 09-30-2012, 12:46 AM
RE: *** Recipe Updates *** - by NiLSPACE - 09-30-2012, 12:53 AM
RE: *** Recipe Updates *** - by xoft - 09-30-2012, 01:04 AM
RE: *** Recipe Updates *** - by NiLSPACE - 09-30-2012, 01:11 AM
RE: *** Recipe Updates *** - by NiLSPACE - 11-17-2012, 07:05 AM
RE: *** Recipe Updates *** - by xoft - 11-17-2012, 07:29 PM
RE: *** Recipe Updates *** - by NiLSPACE - 11-17-2012, 07:35 PM
RE: *** Recipe Updates *** - by xoft - 11-17-2012, 08:08 PM
RE: *** Recipe Updates *** - by NiLSPACE - 01-12-2013, 03:12 AM
RE: *** Recipe Updates *** - by NiLSPACE - 07-16-2014, 03:59 AM
RE: *** Recipe Updates *** - by xoft - 07-16-2014, 04:17 AM
RE: *** Recipe Updates *** - by NiLSPACE - 08-02-2014, 08:09 AM



Users browsing this thread: 1 Guest(s)