Hugo Qwerty Posted January 28 Posted January 28 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. 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 MadCatFlynn and MichaelWillisHeard 1 1
MadCatFlynn Posted January 29 Posted January 29 This has been troubling me for a while. May I ask which file needs to be edited please?
Hugo Qwerty Posted January 29 Author Posted January 29 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. MadCatFlynn 1
MadCatFlynn Posted January 29 Posted January 29 I just wanted to update that Hugo Qwerty's fix seems to be working with no issues found. Thank you again! Hugo Qwerty 1
madzangels Posted March 7 Posted March 7 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?
wyr3d Posted March 7 Posted March 7 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.
Hugo Qwerty Posted March 7 Author Posted March 7 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.
Franzuu Posted March 7 Posted March 7 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.
madzangels Posted March 12 Posted March 12 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?
Hugo Qwerty Posted March 12 Author Posted March 12 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. madzangels 1
Zambroni Posted March 12 Posted March 12 Maybe this is how Jesus was able to feed 5000 zombies followers with just two fishes. madzangels, MichaelWillisHeard, Kleozis and 1 other 4
madzangels Posted March 12 Posted March 12 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?
Hugo Qwerty Posted March 12 Author Posted March 12 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.
madzangels Posted March 12 Posted March 12 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now