I keep getting seemingly random server crashes when testing the Ant4Lyf mod, and nothing points to why it's happening. When testing with real players instead of AI, it crashed randomly at around the 17 minute mark. Games with AI crash ranging between 1 minute to the longest I can stay in the game. Is there some way I can find out why this is happening, or is it just Uber and there's nothing I can do about it?
Sometimes you can pick things up from the server output. Find your PA binary. There should be a server one next to it. Get a terminal window there and run ./server --headless When you run PA and start a local game, it should connect to the server and you'll see a bunch of text start scrolling. When the server crashes, look at the last few lines; you can also scan back for any earlier warnings.
You can try looking at the log files to see what might be the cause. I can give you a heads up as to what the cause of the crash was most likely. If a unit such as your leveler has multiple weapons that use the ammo system the server will crash when it dies due to an engine bug that Uber isn't going to fix any time soon. Only solution is to remove the ammo system from one of the weapons.
Is it supposed to immediately crash because I deleted the giant leveler and after the nuke death explosion, the server's fine.
It might require the unit to have fired first, I can't remember what the results of my testing were for sure. I'm not sure that it's the leveler, that was just a guess. Any unit/building with multiple weapons that use the ammo system are cause for problems.
Ammo system is the following lines a weapon.json: "ammo_capacity": number, "ammo_demand": number, "ammo_per_shot": number, "ammo_source": metal or energy It's how we make weapons that fire in volleys.
Vanilla levelers don't use it, so if you are just riffing that, it shouldn't be a problem. Artillary, bombers, and uber cannons use ammo system with energy. Nukes, anti-nukes, and possibly the unit cannon use with the special type factory. Metal ammo also worked last I checked.
I think this was the problem. Thanks @stuart98 The experimental leveler used a uber cannon, but it was assigned to both muzzles.
This post saved me. I was experimenting with giving the SXX anti-orbit abilities and it started crashing for no reason I could understand. I had copied it's main weapon which happened to use the ammo system.