Jump to content

Recommended Posts

Posted

Above function doesn't work properly.

1) Each new fillet has the same calories as the original, so it doubles the calories of the output compared to the input.

2) It ignores whether the original fillet was cooked, so a cooked fillet becomes 2 uncooked fillets.

 

I've patched it on my end, feel free to copy my homework.  :-D

 

function Recipe.OnCreate.CutFillet(craftRecipeData, character)
	local items = craftRecipeData:getAllConsumedItems()
	local results = craftRecipeData:getAllCreatedItems()
	local fillet = nil
	for i=0,items:size() - 1 do
		local item = items:get(i)
		if item:getFullType() == "Base.FishFillet" then
			fillet = item
			break
		end
	end
	if fillet then
		local hunger = fillet:getBaseHunger() / 2
		local weight = fillet:getActualWeight() / 2
		local carbs = fillet:getCarbohydrates() / 2
		local lipids = fillet:getLipids() / 2
		local proteins = fillet:getProteins() / 2
		local calories = fillet:getCalories() / 2
		local cooked = fillet:isCooked()

		for j=0,results:size() - 1 do
			local result = results:get(j)	
			result:setBaseHunger(hunger)
			result:setHungChange(hunger)
			result:setActualWeight(weight)
			result:setWeight(weight)
			result:setCustomWeight(true)
			result:setCarbohydrates(carbs)
			result:setLipids(lipids)
			result:setProteins(proteins)
			result:setCalories(calories)
			result:setCooked(cooked)
		end
	end
end

 

Posted
16 minutes ago, MadCatFlynn said:

This has been troubling me for a while. May I ask which file needs to be edited please?


\Steam\steamapps\common\ProjectZomboid\media\lua\server\recipecode.lua, line 596 to 625.

You can just copy and paste my code to replace the entire function.  The change may get reverted in the next update, so you may need to do it again depending on whether the next update fixes this issue or not.

  • 2 weeks later...
  • 3 weeks later...
Posted

Thanks for this, as I can't see calories in my game.... When you first cook a fish and fillet it (so it produces two fillets) aree those FIRST fillets correct? (I assume so)

Are you saying this only applies when you cut that fillet again?

I don't want to cheat the game in anyway as I'm 5 months into a save.  So assuming thee latter only applies, I'll just throw away 2 of the 4 fillets rather than mess with the code.

Hope that makes sense, thanks for any clarification you can provide. 

Oh and this applies to ALL forms of filleting right? Whether it's fish or chickens etc? 

Posted

It's kinda sad that a fix was posted here back in January, and the Devs still failed to include it in multiple updates :/

There should be some way of flagging fixes to better get the devs attention.

Posted
18 minutes ago, wyr3d said:

It's kinda sad that a fix was posted here back in January, and the Devs still failed to include it in multiple updates :/

There should be some way of flagging fixes to better get the devs attention.


image.thumb.png.064629a939c9d71f0a531921cd8c1f03.png

 

 

Posted
1 hour ago, wyr3d said:

It's kinda sad that a fix was posted here back in January, and the Devs still failed to include it in multiple updates :/

There should be some way of flagging fixes to better get the devs attention.

If Indiestone is running things logically and efficiently then it would point to the system being overhauled at a later date in B42.

Posted
On 3/7/2025 at 11:38 AM, wyr3d said:

It's kinda sad that a fix was posted here back in January, and the Devs still failed to include it in multiple updates :/

There should be some way of flagging fixes to better get the devs attention.


Was this fixed in the latest patch does anyone know?

Posted
5 minutes ago, madzangels said:


Was this fixed in the latest patch does anyone know?

 

Half fixed.

 

Fillets now have the same cooked status as the original fillet, but the bigger problem of their calories hasn't been fixed.
 

Posted
1 hour ago, Hugo Qwerty said:

 

Half fixed.

 

Fillets now have the same cooked status as the original fillet, but the bigger problem of their calories hasn't been fixed.
 

 

So does it only happen when halving an existing fillet?

Or does it happen when I first turn a fish into fillets?

 

Posted
20 minutes ago, madzangels said:

 

So does it only happen when halving an existing fillet?

Or does it happen when I first turn a fish into fillets?

 


Slicing a fish into fillets works fine.  Halving a fillet gives two fillets each with the same calories as the original.
 

Posted
18 minutes ago, Hugo Qwerty said:


Slicing a fish into fillets works fine.  Halving a fillet gives two fillets each with the same calories as the original.
 


Ah ok, thank you so much for clarifying - I don't want to feel like I'm cheating so I've just been eating fish without slicing them into fillets, but now I know I can turn them into fillets I can make some dishes :D

  • 2 weeks later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...