Jump to content

Food Issues


l33tmaan

Recommended Posts

I'm confounded with two issues:

Despite using the nutritionPropsWhenInMeal code, my item only uses the values from nutritionPropsByType when I make meals out of it. Even when I copy that bit of code directly from chicken or red meat, it still won't work. What's up with that?

Spoiler

{
	code: "meatnugget",
	
	maxstacksize: 64,
	nutritionPropsWhenInMeal: { 
		satiety: 375, 
		foodcategory: "Protein" 
		},
		
	displaycaseable: true,
		
	shelvable: true
,	
	variantgroups: [
	
		{ code: "meat", states: ["bushmeat", "poultry", "redmeat"]},	
		{ code: "type", states: ["smashed", "raw", "cooked" ] },
	],
	
	shapebytype:	{
		"meatnugget-*-smashed": {base: "item/food/meat/{meat}-smash"},
		"meatnugget-*-raw": {base: "item/food/meat/{meat}-nugget"},
		"meatnugget-*-cooked":   {base: "item/food/meat/{meat}-cooked"},
	},
	textures: {

		"cooked": {base: "game:item/food/meat/cooked" },
		"meat": {base: "game:item/food/meat/raw" },
		"raw": {base: "game:item/food/meat/raw" }

,	},

	creativeinventory: { "general": ["*"], "items": ["*"] },

	nutritionPropsByType: {
		"*-bushmeat-cooked": { satiety: 100, foodcategory: "Protein" },

		"*-poultry-cooked": { satiety: 160, foodcategory: "Protein" },
		"*-redmeat-cooked": { satiety: 220, foodcategory: "Protein" },

	},

	transitionablePropsByType: {

		"*-smashed": [
{
		
			type: "Perish",

			freshHours: { avg: 36 },
	
			transitionHours: { avg: 24 },
	
			transitionedStack: { type: "item", code: "game:rot" },

			transitionRatio: 1

			}

		],

		"*-raw": [
{
		
			type: "Perish",

			freshHours: { avg: 36 },
	
			transitionHours: { avg: 24 },
	
			transitionedStack: { type: "item", code: "game:rot" },

			transitionRatio: 1

			}

		],

		"*-cooked": [{

			type: "Perish",

			freshHours: { avg: 1200 },

			transitionHours: { avg: 360 },

			transitionedStack: { type: "item", code: "game:rot" },

			transitionRatio: 1
		
		}],
	},

	materialDensity: 600,

	guiTransformByType: {

		"*-cooked": {

			rotate: false,
			translation: { x: 0.0, y: 0, z: 0 },

			rotation: { x: 171, y: -122, z: 28 },

			origin: { x: 0.43, y: 0.04, z: 0.53 },

			scale: 7
		},

		"*-raw": {

			rotate: false,
			translation: { x: 0.0, y: 0, z: 0 },

			rotation: { x: 171, y: -122, z: 28 },

			origin: { x: 0.43, y: 0.04, z: 0.53 },

			scale: 7
		},

		"*": {

			rotate: false,

			translation: { x: 0, y: 0, z: 0 },

			rotation: { x: 171, y: -122, z: 33 },
			origin: { x: 0.5, y: 0.04, z: 0.53 },

			scale: 4.5
		}

	},

	fpHandTransform: {

		translation: { x: -0.06, y: 0.36, z: 0.23 },

		rotation: { x: 86, y: -83, z: 24 },

		origin: { x: 0.5, y: 0.1, z: 0.5 },

		scale: 5
	},

	tpHandTransform: {

		translation: { x: 0, y: 0, z: 0 },

		rotation: { x: 5, y: 41, z: -31 },

		origin: { x: 0.23, y: 0, z: 0.13 },

		scale: 1.5	},

	groundTransform: {

		translation: { x: 0, y: 0, z: 0 },

		rotation: { x: 180, y: 33, z: -180 },

		origin: { x: 0.5, y: 0, z: 0.5 },

		scale: 10

	},

	combustiblePropsByType: {

		"meatnugget-*-raw": {

			meltingPoint: 150,

			meltingDuration: 30,

			smeltedRatio: 1,

			smeltingType: "cook",

			smeltedStack: { type: "item", code: "meatnugget-{meat}-cooked" },

			requiresContainer: false

		},
	}
}

 

I've managed to implement my new foods into meals, but for some reason there's nothing in the pot after you finish cooking it! Sure, the actual food's there and you can get it and eat it, but the pot is always empty! I looked at the code for Bushmeat Meals to see if that would help, but it looks pretty similar to my code... so why is there nothing appearing in the pot?

Spoiler

[
  {
    "op": "add",
    "path": "/ingredients/0/validStacks/5",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-bushmeat-smashed",
      "shapeElement": "bowl/meat stew/*"
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/0/validStacks/6",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-bushmeat-raw",
      "shapeElement": "bowl/meat stew/*"
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/0/validStacks/7",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-poultry-smashed",
      "shapeElement": "bowl/meat stew/*"
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/0/validStacks/8",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-poultry-raw",
      "shapeElement": "bowl/meat stew/*"
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/0/validStacks/9",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-redmeat-smashed",
      "shapeElement": "bowl/meat stew/*"
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/0/validStacks/10",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-redmeat-raw",
      "shapeElement": "bowl/meat stew/*"
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/2/validStacks/6",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-bushmeat-smashed",
      "shapeElement": "bowl/red meat/*",
      "textureMapping": [
        "meat",
        "group2"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/2/validStacks/7",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-bushmeat-raw",
      "shapeElement": "bowl/red meat/*",
      "textureMapping": [
        "meat",
        "group2"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/2/validStacks/8",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-poultry-smashed",
      "shapeElement": "bowl/poultry/*",
      "textureMapping": [
        "meat",
        "group3"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/2/validStacks/9",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-poultry-raw",
      "shapeElement": "bowl/poultry/*",
      "textureMapping": [
        "meat",
        "group3"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/2/validStacks/10",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-redmeat-smashed",
      "shapeElement": "bowl/red meat/*",
      "textureMapping": [
        "meat",
        "group2"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/2/validStacks/11",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-redmeat-raw",
      "shapeElement": "bowl/red meat/*",
      "textureMapping": [
        "meat",
        "group2"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/3/validStacks/5",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-bushmeat-smashed",
      "shapeElement": "bowl/red meat/*",
      "textureMapping": [
        "meat",
        "group2"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/3/validStacks/6",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-bushmeat-raw",
      "shapeElement": "bowl/red meat/*",
      "textureMapping": [
        "meat",
        "group2"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/3/validStacks/7",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-poultry-smashed",
      "shapeElement": "bowl/poultry/*",
      "textureMapping": [
        "meat",
        "group3"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/3/validStacks/8",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-poultry-raw",
      "shapeElement": "bowl/poultry/*",
      "textureMapping": [
        "meat",
        "group3"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/3/validStacks/9",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-redmeat-smashed",
      "shapeElement": "bowl/red meat/*",
      "textureMapping": [
        "meat",
        "group2"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  },
  {
    "op": "add",
    "path": "/ingredients/3/validStacks/10",
    "value": {
      "type": "item",
      "code": "expandedfoods:meatnugget-redmeat-raw",
      "shapeElement": "bowl/red meat/*",
      "textureMapping": [
        "meat",
        "group2"
      ]
    },
    "file": "recipes/cooking/meatystew.json"
  }
]

 

The files are meatnugget.json and survival-recipes-cooking-meatystew.json. The former is in the expandedfoods folder while the latter is in the game folder. Any help is appreciated, because this seems like I'm missing something small?

ExpandedFoods.zip

Link to comment
Share on other sites

@l33tmaan What you're trying to implement here is no small feat!

The first part (nutritionPropsWhenInMeal ) is relatively easy to solve.  If you look again at chicken or red meat, you'll notice that it's actually an attribute, so you need to nest it inside attributes, like so:

"attributes": { 
nutritionPropsWhenInMeal: { satiety: 375, foodcategory: "Protein" }
},

The second part though...

Link to comment
Share on other sites

...I'll try and piece some of this together for you as best as I can remember it (hopefully I don't lead you astray, I did this a while ago). 

I also used bushmeat meals as a jumping off point.  Then I looked closely at the texturemapping section of the vanilla pot.json.  I've attached it here for easier reference.  So for my fish soup/stews I patched pot.json, leveraging one of the existing hardcoded texture mappings.  I went with poultry, because it was the location and fishy color I was looking for, so

"value": [ "meat", "group5" ]

Meaning my pot patch was like this (where psfish-pike-raw is the code for my raw pike):

{
        "file": "game:blocktypes/clay/pot",
        "op": "add",
        "path": "/attributesByType/claypot-cooked/textureMapping/psfish-pike-raw",
        "value": [ "meat", "group5" ]
 },

ASIDE: My patch above is in my modid folder (which is ideally where you want it)  - NOT in a game folder - and that's the reason why "file" is prefixed with game:, while the "path" isn't prefixed with my modid (i.e. it's not primitivesurvival:psfish-pike-raw).

I didn't look too closely at your mod, but hopefully this is enough of a clue to get you going!

pot.json

Edited by Spear and Fang
Link to comment
Share on other sites

You're a lifesaver! I operate in Notepad like a fool, so opening the vanilla meat .jsons aren't organized nicely so I missed the attributes part. That fixed it easily.
And I never would have thought to look at the pot! Or at least it would've taken a while. I just added the meats there and it showed up now. Thanks!

Link to comment
Share on other sites

So I went and immediately got myself into more trouble, oops.

I've made a new recipe for the cooking pot - au gratin. The idea is that it uses cheese as a base and you can add vegetables or more cheese to it. 
The good news is that the recipe seems to work - I can toss a bunch of cheese and turnips into a pot and make something out of it. The bad news is that it doesn't actually make it - once the meal finishes cooking my game crashes! 
I don't fully understand what this crash log is trying to tell me, but I guess it's related to how the firepit renders the cooking pot? I tried to keep it simple for now and make it look like vegetable soup, so I could figure out shape and texture stuff later, but, uh... I'm not sure why it's making my game explode. Do I need to do something to pot.json again?

Spoiler

Running on 64 bit Windows with 16 GB RAM 
Version: v1.14.2 (Stable)1/7/2021 3:00:19 PM: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object.
   at Vintagestory.GameContent.MealMeshCache.GenFoodMixMesh(ItemStack[] contentStacks, CookingRecipe recipe, Vec3f foodTranslate)
   at Vintagestory.GameContent.MealMeshCache.GenMealMesh(CookingRecipe forRecipe, ItemStack[] contentStacks, Vec3f foodTranslate)
   at Vintagestory.GameContent.MealMeshCache.GenMealInContainerMesh(Block containerBlock, CookingRecipe forRecipe, ItemStack[] contentStacks, Vec3f foodTranslate)
   at Vintagestory.GameContent.MealMeshCache.GetOrCreateMealInContainerMeshRef(Block containerBlock, CookingRecipe forRecipe, ItemStack[] contentStacks, Vec3f foodTranslate)
   at Vintagestory.GameContent.PotInFirepitRenderer..ctor(ICoreClientAPI capi, ItemStack stack, BlockPos pos, Boolean isInOutputSlot)
   at Vintagestory.GameContent.BlockCookedContainer.GetRendererWhenInFirepit(ItemStack stack, BlockEntityFirepit firepit, Boolean forOutputSlot)
   at Vintagestory.GameContent.BlockEntityFirepit.UpdateRenderer()
   at Vintagestory.GameContent.BlockEntityFirepit.OnSlotModifid(Int32 slotid)
   at Vintagestory.API.Common.Action`1.Invoke(T t1)
   at Vintagestory.API.Common.InventoryBase.DidModifyItemSlot(ItemSlot slot, ItemStack extractedStack)
   at Vintagestory.GameContent.InventorySmelting.DidModifyItemSlot(ItemSlot slot, ItemStack extractedStack)
   at Vintagestory.GameContent.InventorySmelting.FromTreeAttributes(ITreeAttribute tree)
   at Vintagestory.GameContent.BlockEntityFirepit.FromTreeAttributes(ITreeAttribute tree, IWorldAccessor worldForResolving)
   at Vintagestory.Client.NoObf.ClientChunk.AddOrUpdateBlockEntityFromPacket(_KQLWU0ai7AeD1y9USojsUEEHBaK p, ClientMain game)
   at Vintagestory.Client.NoObf.GeneralPacketHandler.HandleBlockEntities(_yYcLwwVgddc6OWOmqOfREe6xnKd packet)
   at Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single deltaTime)
   at _uWwiuXC8cGTH1JnsWiUY9FUaXOo._0WtXQJqGAidcdKMfPHF0OxDIauE(Single )
   at _ydpin5JFjepNgd3JOZRb2z5I5Fg._LvRZFcsDWyPwKLB1F2UK7fQ2N6d(Single )
   at _ydpin5JFjepNgd3JOZRb2z5I5Fg._GO2qaUrk9dl0IceTLiA7P4LcpAB(Single )
   at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(Object sender, FrameEventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at OpenTK.GameWindow.RaiseRenderFrame(Double elapsed, Double& timestamp)
   at OpenTK.GameWindow.DispatchRenderFrame()
   at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   at _Ine8FeGTtDXciSIfaZMHMwCLKGBA._8puLW8J44fiq3A5hthQTfB8WNxc(_SbVlAI6dJIZ4JRt0da0lu23DF14 , String[] )
   at _lErb0L2e9E9htuT2VVnAsXIZqc7A._8puLW8J44fiq3A5hthQTfB8WNxc(ThreadStart )
-------------------------------

Event Log, last 3 entries
==================================
{ TimeGenerated = 12/13/2020 5:19:49 PM, Site = , Source = .NET Runtime, Message = Application: Vintagestory.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0020001, exception address 000007FEFDD9A06D
Stack:
   at System.Environment._Exit(Int32)
   at System.Environment._Exit(Int32)
   at System.Environment.Exit(Int32)
   at _FxoapxPRiV5MwbaFwu9ZjI5uiQu._YAVoZtbV5cwe0WdpbVCDdWZLwKS()
   at Vintagestory.API.Client.GuiElementTextButton.OnMouseUpOnElement(Vintagestory.API.Client.ICoreClientAPI, Vintagestory.API.Client.MouseEvent)
   at Vintagestory.API.Client.GuiElement.OnMouseUp(Vintagestory.API.Client.ICoreClientAPI, Vintagestory.API.Client.MouseEvent)
   at Vintagestory.API.Client.GuiElementTextButton.OnMouseUp(Vintagestory.API.Client.ICoreClientAPI, Vintagestory.API.Client.MouseEvent)
   at Vintagestory.API.Client.GuiComposer.OnMouseUp(Vintagestory.API.Client.MouseEvent)
   at _huHsn0RbJO3ryia0aqdhX6Bb1sS._XMRlElq0Rg6quIIKA3ytPtPW3Jd(Vintagestory.API.Client.MouseEvent)
   at Vintagestory.Client.NoObf.ClientPlatformWindows.Mouse_ButtonUp(System.Object, OpenTK.Input.MouseButtonEventArgs)
   at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   at OpenTK.Platform.Windows.WinGLNative.WindowProcedure(IntPtr, OpenTK.Platform.Windows.WindowMessage, IntPtr, IntPtr)
   at OpenTK.Platform.Windows.Functions.DispatchMessage(OpenTK.Platform.Windows.MSG ByRef)
   at OpenTK.Platform.Windows.Functions.DispatchMessage(OpenTK.Platform.Windows.MSG ByRef)
   at OpenTK.Platform.Windows.WinGLNative.ProcessEvents()
   at OpenTK.GameWindow.Run(Double, Double)
   at _Ine8FeGTtDXciSIfaZMHMwCLKGBA._8puLW8J44fiq3A5hthQTfB8WNxc(_SbVlAI6dJIZ4JRt0da0lu23DF14, System.String[])
   at _lErb0L2e9E9htuT2VVnAsXIZqc7A._8puLW8J44fiq3A5hthQTfB8WNxc(System.Threading.ThreadStart)
   at _Ine8FeGTtDXciSIfaZMHMwCLKGBA._Q94MSQMy7MbChZ1FRrVUB2AgwfL(System.String[])
 }
{ TimeGenerated = 11/23/2020 4:47:54 PM, Site = , Source = .NET Runtime, Message = Application: Vintagestory.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0020001, exception address 000007FEFCD8A06D
Stack:
   at System.Environment._Exit(Int32)
   at System.Environment._Exit(Int32)
   at System.Environment.Exit(Int32)
   at _tbDNSZpN0b4WGkPbXXfou7PhsQl._4FaQHZNbeHKn9WINUsvqvFV8i9T()
   at Vintagestory.API.Client.GuiElementTextButton.OnMouseUpOnElement(Vintagestory.API.Client.ICoreClientAPI, Vintagestory.API.Client.MouseEvent)
   at Vintagestory.API.Client.GuiElement.OnMouseUp(Vintagestory.API.Client.ICoreClientAPI, Vintagestory.API.Client.MouseEvent)
   at Vintagestory.API.Client.GuiElementTextButton.OnMouseUp(Vintagestory.API.Client.ICoreClientAPI, Vintagestory.API.Client.MouseEvent)
   at Vintagestory.API.Client.GuiComposer.OnMouseUp(Vintagestory.API.Client.MouseEvent)
   at _VisI2OeWzgjAMuHLDUPaKaN5Lds._6J0Ioc1Jsh7Nj2siLiS88rTI5Ze(Vintagestory.API.Client.MouseEvent)
   at Vintagestory.Client.NoObf.ClientPlatformWindows.Mouse_ButtonUp(System.Object, OpenTK.Input.MouseButtonEventArgs)
   at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   at OpenTK.Platform.Windows.WinGLNative.WindowProcedure(IntPtr, OpenTK.Platform.Windows.WindowMessage, IntPtr, IntPtr)
   at OpenTK.Platform.Windows.Functions.DispatchMessage(OpenTK.Platform.Windows.MSG ByRef)
   at OpenTK.Platform.Windows.Functions.DispatchMessage(OpenTK.Platform.Windows.MSG ByRef)
   at OpenTK.Platform.Windows.WinGLNative.ProcessEvents()
   at OpenTK.GameWindow.Run(Double, Double)
   at _lYLQLGyldvbDG9rPQyiRVeIqQVp._EEzpApWBQHtHR4iMJabXK2wDvlA(_ex0VSgRAdtsvhANmJHZHaf9ATWt, System.String[])
   at _IcGByoJhapvESnm6vaOawAHbkeU._EEzpApWBQHtHR4iMJabXK2wDvlA(System.Threading.ThreadStart)
   at _lYLQLGyldvbDG9rPQyiRVeIqQVp._k39DsboSFqAvcX2gaWs5Tk5Zl6Q(System.String[])
 }
{ TimeGenerated = 11/22/2020 7:47:17 AM, Site = , Source = .NET Runtime, Message = Application: Vintagestory.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0020001, exception address 000007FEFCD8A06D
Stack:
   at System.Environment._Exit(Int32)
   at System.Environment._Exit(Int32)
   at System.Environment.Exit(Int32)
   at _tbDNSZpN0b4WGkPbXXfou7PhsQl._4FaQHZNbeHKn9WINUsvqvFV8i9T()
   at Vintagestory.API.Client.GuiElementTextButton.OnMouseUpOnElement(Vintagestory.API.Client.ICoreClientAPI, Vintagestory.API.Client.MouseEvent)
   at Vintagestory.API.Client.GuiElement.OnMouseUp(Vintagestory.API.Client.ICoreClientAPI, Vintagestory.API.Client.MouseEvent)
   at Vintagestory.API.Client.GuiElementTextButton.OnMouseUp(Vintagestory.API.Client.ICoreClientAPI, Vintagestory.API.Client.MouseEvent)
   at Vintagestory.API.Client.GuiComposer.OnMouseUp(Vintagestory.API.Client.MouseEvent)
   at _VisI2OeWzgjAMuHLDUPaKaN5Lds._6J0Ioc1Jsh7Nj2siLiS88rTI5Ze(Vintagestory.API.Client.MouseEvent)
   at Vintagestory.Client.NoObf.ClientPlatformWindows.Mouse_ButtonUp(System.Object, OpenTK.Input.MouseButtonEventArgs)
   at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   at OpenTK.Platform.Windows.WinGLNative.WindowProcedure(IntPtr, OpenTK.Platform.Windows.WindowMessage, IntPtr, IntPtr)
   at OpenTK.Platform.Windows.Functions.DispatchMessage(OpenTK.Platform.Windows.MSG ByRef)
   at OpenTK.Platform.Windows.Functions.DispatchMessage(OpenTK.Platform.Windows.MSG ByRef)
   at OpenTK.Platform.Windows.WinGLNative.ProcessEvents()
   at OpenTK.GameWindow.Run(Double, Double)
   at _lYLQLGyldvbDG9rPQyiRVeIqQVp._EEzpApWBQHtHR4iMJabXK2wDvlA(_ex0VSgRAdtsvhANmJHZHaf9ATWt, System.String[])
   at _IcGByoJhapvESnm6vaOawAHbkeU._EEzpApWBQHtHR4iMJabXK2wDvlA(System.Threading.ThreadStart)
   at _lYLQLGyldvbDG9rPQyiRVeIqQVp._k39DsboSFqAvcX2gaWs5Tk5Zl6Q(System.String[])
 }

Here's the file. I've currently got it sitting in assets/survival/recipes/cooking. I'll move it into my .zip file once it's halfway working.

augratin.json

Edited by l33tmaan
Link to comment
Share on other sites

@l33tmaan Now you're going further than I ever did with soup/stew recipes, but since those error messages are all related to missing textures and/or shapes (rendering), I would say that yes you'll need to add all of your new item/block codes to pot.json just like in my example above.

If it was me, I would add them using existing mappings (i.e. this sort of thing "value": [ "meat", "group5" ]) and get them working (even if they look wrong) before trying to tackle your own shapes/textures, because afaik THAT'S when things are going to get difficult. 

Edited by Spear and Fang
Link to comment
Share on other sites

Well, it was working before, but now I've tried moving the code over to a .zip file and I'm having some issues. You can cook the au gratin and it doesn't crash, but... the pot is totally empty. Obviously it was working before, so I think this is some sort of disconnect between the shape .json in my mod and the vanilla pot.json.
I'm not really sure though, so any help is appreciated.

Back up your original pot.json and replace it with this one in order for anything to work. Mine just adds stuff some lines of code, but still. If you try and use cheese and milk to make the au gratin, the pot's empty.

pot.json ExpandedFoods.zip

Link to comment
Share on other sites

There's a lot of stuff going on in your mod it seems.  I followed your instructions but I think I need you to tell me a recipe, or provide a screenshot or something...it's so far removed from what I'm working on now that I'm having trouble wrapping my brain around it.

Edited by Spear and Fang
Link to comment
Share on other sites

Don't worry about it, I actually managed to get it working, more or less. I just had some folders in the wrong place, oops.
I have a new issue though. There's a download link in there, but I more or less ended up with throwing everything into the /game folder instead of the /expandedfoods one. I know I shouldn't do that, but... it works. 😅

EDIT: I guess to explain it, the au gratin is made in a cooking pot with at least 1 portion of cheese (even cottage) and 1 portion of milk. You can add pretty much anything except for fruits and milk to the rest of the recipe. I plan to eventually get it working with the fish from Primitive Survival, too...

Edited by l33tmaan
Link to comment
Share on other sites

I mean if it works, it works.  I was helping someone else with the same thing a while back and they also said they had to use the game folder to make it work.  Personally, I've managed to get all of my stuff out of the game folder and make it work, but I suspect that there's still certain things that will only work in the game folder.

Link to comment
Share on other sites

I've managed to figure that out for my other mods, but I'm fairly sure there's some kind of disconnect between my augratin shape and the changes I had to make to the vanilla pot.json. Once I move that shape out of the game folder, it all falls apart. I tried putting textures into my mod and referring to them in the shape itself, but they still didn't work. 

Link to comment
Share on other sites

Something funky is going on. I have this mod which works fine EXCEPT when I try and patch bowl.json. It makes fish sauce in a barrel, which you can get with a bucket no problem. However, when I try and get it with a bowl, I can get it but not put it back into the bucket, AND the contents of the bowl are empty. The sauce is in there, it's just invisible.
The thing is, if you look in this zip there's a folder called "bowl files" containing the original bowl.json and my version with the fish sauce in it. When I put my version into my files and replace bowl.json, everything works fine! There's something going on with the patch and I'm not sure what it is. 
What am I missing here?

Fish Sauce.zip

EDIT: Oops, forgot to mention that since this is obviously a fish recipe, you need Primitive Survival turned on to make the sauce.

Edited by l33tmaan
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.