Jump to content

Specifying textures and descriptions for meal?


Philtre

Recommended Posts

I'm trying to make a cooking recipe for rice pudding, on the grounds that 1) I want more things to do with milk, and 2) I want to try to learn how to create a mod. :D
 

So far I've managed to start with the porridge recipe and get it to accept milk as an ingredient (see below). I can cook the thing, and get back an edible item with the right nutritional content (for the non-milk ingredients, anyway... I have no idea where to even start with getting it to have a Dairy nutritional value). But it always has the description "unknown" (as in: "contains 1 portion of unknown"), and the food is invisible, even though for now I'm trying to just reuse the games' texture files for porridge. I'm assuming I'm doing something wrong in terms of how to tell the game where to look for textures, etc., but looking at other food-related mods, I'm not sure what. Taking out the "game:" in the shapeElement entries causes the game to crash when using the recipe (with a complaint about missing textures), so it is apparently doing *something* with the texture files... Does anyone have an idea of what I'm doing wrong?

 

{
	code: "pudding",
	perishableProps: {
		freshHours: { avg: 96 },
		transitionHours: { avg: 24 },
		transitionRatio: 1,
		transitionedStack: { type: "item", code: "game:rot" }
	},
	shape: { base: "game:block/food/meal/porridge" },
	ingredients: [
{ 
			code: "game:milk", 
			validStacks: [ 
				{ 
					type: "item", 
					code: "game:milkportion", 
					shapeElement: "game:bowl/milk"
				}
			],
			minQuantity: 1,
			maxQuantity: 1,
			portionSizeLitres: 1,
		},
		{ 
			code: "grainbase", 
			validStacks: [  { type: "item", code: "game:grain-*",  shapeElement: "game:bowl/grain/*" } ],
			minQuantity: 1,
			maxQuantity: 3
		},
		{
			code: "fruit-extra", 
			validStacks: [ { type: "item", code: "game:fruit-*",  shapeElement: "game:bowl/fruit 1/*" } ],
			minQuantity: 0,
			maxQuantity: 1
		},
		{
			code: "fruit-extra-2", 
			validStacks: [ { type: "item", code: "game:fruit-*", shapeElement: "game:bowl/fruit 2/*"  } ],
			minQuantity: 0,
			maxQuantity: 1
		},
		{
			code: "topping", 
			validStacks: [ { type: "item", code: "game:honeyportion",  shapeElement: "game:bowl/topping/*", cookedStack: { type: "item", code: "game:jamhoneyportion" } } ],
			minQuantity: 0,
			maxQuantity: 1,
			portionSizeLitres: 0.2,
		}
	]
}

 

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.