(Note: sorry about the wall of text, it’s a bit of a brain dump.)
I know several of the active developers are irritated at this point by the repeated attention to this topic, but this is going to keep coming up again, and again, and again: until something is done about it.
Yes there are technical limitations, yes, most suggestions don’t acknowledge those existing. I do not think they are insurmountable though: the implementation only needs to be right. (concessions to technical limitations made.)
I believe the best (possibly only reasonable to implement) way to go about doing this is to plan an on-load differential calculation, and not attempt any out-of-bubble calculation (too many things can happen, it’ll never be perfect till the whole map is in bubble).
important!: don’t run dead or deactivated circuits, power generation or supply needs to be the trigger for processing.
Possible: artificial hard cap on number of items/tiles per circuit. most games have a spawn cap, or other artificial limits, it’s a good safeguard.
ok, differential processing. The idea here is to compress any circuit into states & timestamps on unload, then use an algorithm based on circuit layout, to determine what happened while you were gone. (~song~)
suppose you have a circuit with a diesel generator, a fridge, and a battery. you leave for say, 2 days. (bubble time)(~can’t touch this~)
generator has fuel to run the fridge for 1 day, and overflow power to max out the battery at .7 days. battery runs fridge for .5 days
when you return, the game checks the circuit, empties the fuel and battery, then ages food at 1.5days chilled and 0.5days unchilled
say you come back in .7 days, the battery is topped off, the fridge is chilled, and the generator is at 0.3days of diesel fuel.
as for map generation, and the load of JSON changes… add a new wall type to construction menu: “unpowered wall”? that functions identically to current walls, and add wires to the old construction menu wall.
on std wall generation, a new, seperately tracked item is created. doesn’t matter what it’s called, really. essentially functions like vehicle circuitry.
does nothing on it’s own, but is destroyed when the construction that adds it on that tile is destroyed.
generators as a construction would need to be added, then fridge/oven rework.(basically reskin the vehicle item traits?)
vehicle item integration would be important, but not necessary to begin the process,
the appeal being that groundwork can be laid invisibly, then functionality added when that’s ready.
the only issue is what to do with multi map-tile circuits. that has multiple options, and requires some knowledge of map code behaviour to figure out properly.
lots of planning would be needed, yes it’d be work… but it would be possible, and not require a full JSON rewrite, or merging construction and vehicle code. it also wouldn’t introduce excessive processing requirement, none at all when unloaded, just a bit on load and then what a normal vehicle takes when loaded.