Project Zomboid

Project Zomboid

221 평점
Farming Never Rot
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
파일 크기
게시일
업데이트일
138.967 KB
2018년 6월 18일 오전 7시 20분
2021년 12월 22일 오후 4시 44분
변경 사항 4개 ( 보기 )

다운로드 위해 구독하기
Farming Never Rot

설명
Farming Never Rot

About:
After plants fully mature they will not rot. Resets the max growth cycle if the plant is fully mature when checked. Feeling stuck at a your safe house waiting for pixels to grow, no more! Got a lazy friend in multiplayer that won't check crops, you can still be friends with this mod!

This is a quality of life written with the intent for multiplayer. If you are offline and the time is running your crops will not rot. This mod simply circumvents the plants going rotten on the growth cycle after plants reach maturity.

Disease will continue to affect the plants. Plants can still die or recede due to infestation or lack of water.

Nitty Gritty
A simple if statement that limits the growth state to 6, which should be the seed bearing stage.

Previously we just added an if statement into an existing function
Replaces the SFarmingSystem:growPlant basicFarming.growPlant from
/media/lua/server/Farming/SFarmingSystem.lua /media/lua/server/Farming/basicFarming.lua
to add one if statement
if (luaObject.nbOfGrow >6) then
luaObject.nbOfGrow = 6
end

Thanks to star in the comments section to show us a cool way to Monkey patch the function. While it's a hacky way of doing things it fits for this type of mod, which is such a minor change to force a loop, and should allow better compatibility with other mods, if any that modify the core function.

Every plant cycle nbOfGrow is increased by 1, every cycle it will call one of the following methods from the following methods
/media/lua/server/Farming/farming_vegetableconf.lua

farming_vegetableconf.growCarrots
farming_vegetableconf.growBroccoli
farming_vegetableconf.growStrewberries
farming_vegetableconf.growRedRadish
farming_vegetableconf.growTomato
farming_vegetableconf.growPotato
farming_vegetableconf.growCabbage

All of these methods run a unique routine if the nbOfGrow is 6 or less. Otherwise it triggers the planting.state to rotten. So if nbOfGrow is 7 or greater it will turn rotten.

Repackaging Distribution, Adding it to your server mods
Want to merge this into another mod, package it for your server, blah blah blah. Go for it! link backs, credit or a mention is totally appreciated but in absolutely no way necessary. Treat it like GPL software make the world a better place one line of code at a time! Feedback and/or a "hey it's awesome" comment are nifty too.

Compatibility and Testing
Tested with versions from 40.30 to 41.65, multiplayer tests seems to be working ok with Build 41. It's doubtful this will fail until there is a major farming update.

Thanks to the folks at Good Old Dayz[www.thegoodolddayz.com] for setting this up on their server; reports are that it works dandy in a 24/7 multiplayer (build 40), thanks for the invaluable testing!


Workshop ID: 1415491388
Mod ID: FarmingNeverRot
인기 토론 모두 보기(1)
0
2018년 12월 7일 오전 7시 34분
Exception errors on client side. 40.36
Starman
댓글 38
Luth 2023년 7월 6일 오후 12시 37분 
The mod description says it limits the growth state to 6 but according to the wiki, the seed-bearing stage is 7.
king_kong 2023년 1월 20일 오전 8시 50분 
This mod isn't working right anymore, I just ran it in my game with accelerated growth time and I could never get seeds out of it. I found these mods work correctly Farming Without the Rotting and Crops Never Rot .

I like Farming Without the Rotting more because the other mod has a sandbox option that no one understands
Arcturus 2023년 1월 16일 오후 11시 08분 
Does this mod still work?
Doctor Sex 2022년 11월 12일 오전 11시 20분 
i think its deleting seeding phase to plants too
Torkkar 2022년 8월 15일 오후 7시 23분 
ok so after reading the description I gotta ask is this compatible with mod: Mo' Crops
Thee'e Vang 2022년 7월 22일 오전 12시 59분 
41.71?
puerto 2022년 3월 8일 오전 11시 22분 
any news?
Humsas 2022년 1월 23일 오전 7시 46분 
Does not seem to work on hosted server.
Rainoa 2022년 1월 16일 오전 10시 01분 
is it just me or is carrots seed bearing and ready to harvest models flipped?
https://steamproxy.net/sharedfiles/filedetails/?id=2721813524
https://steamproxy.net/sharedfiles/filedetails/?id=2721813368
i wonder if this is base game issue or a mod im using somehow did this?
any idea's if it somehow could be this 1?
Colonel Wolfe 2022년 1월 16일 오전 9시 49분 
This mod does not work, confirmed