Project Zomboid

Project Zomboid

[BROKEN] Improved Generator Longevity
dtoxic 2022년 11월 8일 오전 10시 52분
Repair past 100%
Allow repair of generator past 100% if more then 100% is selected in sandbox.

The "Fix Generator" code is found i believe in ISFixGenerator.lua

i am doing some test,will post a solution if i manage to find it
dtoxic 님이 마지막으로 수정; 2022년 11월 8일 오전 10시 55분
< >
전체 댓글 9개 중 1~9개 표시 중
GenChadT  [개발자] 2022년 12월 5일 오후 6시 33분 
Thanks @dtoxic. I will credit you if you're able to find a solution
dtoxic 2022년 12월 6일 오전 1시 15분 
I could not find a viable solution to this,i tried everything i could think,but my coding skills are not that good,i think that fixing generator is somehow hard coded into the game,i could not manage to make it work,i have some other things i want to try,will let you know how it goes
GenChadT  [개발자] 2022년 12월 27일 오후 9시 33분 
@dtoxic sounds good my code is FOSS so feel free to use it if you find a solution
GenChadT  [개발자] 2023년 1월 25일 오전 6시 49분 
@dtoxic I was working on a rewrite of several vanilla functions but mod devs on the Discord have informed me that 100 condition is a hard limit set in the untouchable Java code of the game. Unless either of us can come up with a workaround it looks like we're stuck waiting on the devs to update things.
GenChadT  [개발자] 2023년 1월 25일 오전 6시 55분 
I had to rewrite IsFixGenerator and a few other Lua methods including some that govern the context menu as they all did a check for < 100 condition. Even though I could get the repair function to appear in the menu, as soon as I tried to use it, it would revert the generator back to 100 :/
dtoxic 2023년 1월 25일 오후 12시 48분 
yeap,same with me...was banging my head to find a solution but nothing would take,my initial thought that it was somehow hardcoded proved to be correct....well guess it's waiting time till/if this is addressed...anyway thx for looking into it
Angry 2023년 1월 25일 오후 2시 31분 
Is it possible to increase the time it takes for the generator to lose 1% of it's condition? So the generator max condition would always be 100% and the sandbox option, instead of increasing generator condition past 100%, would actually increase the time it takes for the generator to degrade by 1%, thus bypassing the generator hard limit.
dtoxic 2023년 1월 26일 오전 1시 29분 
i think that is tied to "time" so if you can could you check the following,start a sandbox game with time 1h = 1d and then try say 8h = 1d note the date at witch you start the generator and keep it running till it drops say 20% then do the same but with different time scale ,i wont be near my gaming pc for a couple of days so i cant check it for the time being,post your findings here
dtoxic 님이 마지막으로 수정; 2023년 1월 26일 오전 1시 29분
DragonKing 2023년 7월 16일 오전 3시 34분 
Hmm, not sure if this would work, but here goes.

One dumb way I can think working around the 100% limit (1% loss an hour) problem, would be to keep a reference of connected generators and add 1% condition every x.x hours or whatever metric you want to use, to counteract the "loss" if you will. I assume that in theory, it would be a hacky way of implementing a "condition loss override" adjustment so that generators degrade slower.

In theory, if you set it to recover 1% every 2.0 hours, the generator would last about 2x as long, depending on how the timer would work. Ideally each generator would have its own condition managed as an instance, and the timer would be retained between loading a game/server world, but even a global timer should do well enough, as long as the timer is tracked and does not reset.

The closer to 1.0 you go, the longer the generator would last before needing repairs. if it were set to 100.0 hours, it would in effect disable any modification, though I don't see much point in allowing extreme values, then just disable the mod at that point xD

Main issue with that approach is how significant even a small change in values will have on the effect with this approach, making it a bit hard to estimate how long a generator will actually last.
DragonKing 님이 마지막으로 수정; 2023년 7월 16일 오전 3시 36분
< >
전체 댓글 9개 중 1~9개 표시 중
페이지당 표시 개수: 1530 50