Project Zomboid

Project Zomboid

[BROKEN] Improved Generator Longevity
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分
< >
1-9 / 9 のコメントを表示
GenChadT  [開発者] 2022年12月5日 18時33分 
Thanks @dtoxic. I will credit you if you're able to find a solution
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日 21時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日 14時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.
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分
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分
< >
1-9 / 9 のコメントを表示
ページ毎: 1530 50