On ModularBot, we can find
// Called by the host's player creation code
public void Activate(Player p)
{
// Bot logic is not allowed to affect world state, and can only act by issuing orders
// These orders are recorded in the replay, so bots shouldn't be enabled during replays
if (p.World.IsReplay)
return;
IsEnabled = true;
});
......
}
void ITick.Tick(Actor self)
{
if (!IsEnabled || self.World.IsLoadingGameSave)
return;
using (new PerfSample("bot_tick"))
{
Sync.RunUnsynced(Game.Settings.Debug.SyncCheckBotModuleCode, world, () =>
{
foreach (var t in tickModules)
if (t.IsTraitEnabled())
t.BotTick(this);
});
}
});
......
}
which means BotTick can only run when:
- game is not a replay
- game is not on loading save game
- related bot trait must be enabled
so when AutoDeployManager running on a game that cannot satisfy those (it use BotTick), it loses the ability to consume entries add by AutoDeployer that binded on actors, so the entries expands and eat away many RAM when the replay is long enough.
I think you may need a way to stop AutoDeployer send entry to AutoDeployManager when BotTick is not working, especially for replay and loading save game.
On
ModularBot, we can findwhich means
BotTickcan only run when:so when
AutoDeployManagerrunning on a game that cannot satisfy those (it useBotTick), it loses the ability to consume entries add byAutoDeployerthat binded on actors, so the entries expands and eat away many RAM when the replay is long enough.I think you may need a way to stop
AutoDeployersend entry toAutoDeployManagerwhenBotTickis not working, especially for replay and loading save game.