Surviving Mars

Surviving Mars

Not enough ratings
[OLD] Tidy Depots
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
409.389 KB
21 May, 2021 @ 8:36am
7 Jun, 2021 @ 2:46pm
6 Change Notes ( view )

Subscribe to download
[OLD] Tidy Depots

Description
Tidy Depots is now deprecated!

Please update to Tidy Depots 2 https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2596833811

Thanks :)
11 Comments
Doktor Nik  [author] 29 Sep, 2021 @ 3:46pm 
Thanks ChoGGi, I'll be sure to add this to the next update.
ChoGGi 28 Sep, 2021 @ 7:51pm 
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 @ 7:46pm 
[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  [author] 26 Sep, 2021 @ 2:32pm 
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 @ 7:05pm 
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  [author] 22 Sep, 2021 @ 4:40pm 
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 @ 10:34am 
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  [author] 13 Sep, 2021 @ 4:58pm 
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 @ 3:41am 
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  [author] 8 Sep, 2021 @ 12:46pm 
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