Surviving Mars

Surviving Mars

[OLD] Tidy Depots
11 kommentarer
Doktor Nik  [ophavsmand] 29. sep. 2021 kl. 15:46 
Thanks ChoGGi, I'll be sure to add this to the next update.
ChoGGi 28. sep. 2021 kl. 19:51 
forgot to mention: easiest way to fix it is to wrap a:
if UICity then
MapForEach("map", "DroneHub", BalanceDepotsInHub)
end

You can also do
local ModName = CurrentModDef.title
instead of
local ModName = "[Tidy Depots Official]"
ChoGGi 28. sep. 2021 kl. 19:46 
[LUA ERROR] HGE::l_GetActiveRealm: realm != nullptr
C:\Steam\steamapps\common\Surviving Mars\CommonLua\Realm.lua(6): global MapForEach
(191): global BalanceDepots

BalanceDepots() has a couple MapForEach which needs a map loaded.
You're calling BalanceDepots() from OnMsg.ApplyModOptions/ModsReloaded. modsreloaded is too early, and apply can be called from main menu (also too early).


also:
--can't be local for OnMsg to call it
function BalanceDepots()

it can be local, but it needs to be declared above the onmsgs, not below them (or it'll be nil to them). local "cascades" down.
Doktor Nik  [ophavsmand] 26. sep. 2021 kl. 14:32 
It's not going to move resources across the map for you. The only thing that can do that is shuttles, which use their own code and override depots anyway. You need to chain your drone hubs to get them to balance across a wider area.
Kai 25. sep. 2021 kl. 19:05 
Anyway, before building a mechanized storage in my actual game, the depots already didn't share with some other depots far away from the main colony. I don't know why...
Doktor Nik  [ophavsmand] 22. sep. 2021 kl. 16:40 
The mechanized storage won't share with the depots. If you want the depots to keep some resources out of storage, you need to set how much to keep.
Kai 22. sep. 2021 kl. 10:34 
Just a curiosity, in my previous games, the storages accumulate a lot, but do not share with depots even if I put them to 0 in desired amount. Maybe it's an incompatibility with other mods?
Doktor Nik  [ophavsmand] 13. sep. 2021 kl. 16:58 
That's very strange, I haven't noticed a problem at 3950 myself. Do you have a save game I can look at?
SuperYXC 11. sep. 2021 kl. 3:41 
When the amount of storage reaches 3950, it will not work and cannot be removed, just like it has disappeared, but the resources are swallowed and cannot be taken out
Doktor Nik  [ophavsmand] 8. sep. 2021 kl. 12:46 
This one should still work, it just needs to be updated. Unfortunately I can't upload an update because the game crashes.

New version is here: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2596833811
Kai 7. sep. 2021 kl. 12:26 
With the new DLC it's outdated.