Robot Army


Manufacture and deploy automated robot soldiers to attack your foes and defend your factory!

1 year, 10 months ago
0.13 - 1.1
30.2K

b Crash when switching units to enemy force

5 years ago

RA 0.4.0
Factorio 0.17.28
Used Creative mod to switch some bitter spawners and some droids to enemy force with the modification tool.

The mod Robot Army caused a non-recoverable error.
Please report this error to the mod author.

Error while running event robotarmy::on_tick (ID 0)
LuaUnitGroup::add_member: Attempted to add an entity of force enemy to a unit group of force player
stack traceback:
robotarmy/robolib/Squad.lua:670: in function 'validateSquadIntegrity'
robotarmy/robolib/Squad.lua:384: in function 'squadStillExists'
robotarmy/robolib/SquadControl.lua:11: in function 'updateSquad'
robotarmy/robolib/eventhandlers.lua:33: in function 'processSquadUpdatesForTick'
robotarmy/robolib/eventhandlers.lua:336: in function 'tickForces'
robotarmy/robolib/eventhandlers.lua:428: in function <robotarmy/robolib/eventhandlers.lua:425>
stack traceback:
[C]: in function 'add_member'
robotarmy/robolib/Squad.lua:670: in function 'validateSquadIntegrity'
robotarmy/robolib/Squad.lua:384: in function 'squadStillExists'
robotarmy/robolib/SquadControl.lua:11: in function 'updateSquad'
robotarmy/robolib/eventhandlers.lua:33: in function 'processSquadUpdatesForTick'
robotarmy/robolib/eventhandlers.lua:336: in function 'tickForces'
robotarmy/robolib/eventhandlers.lua:428: in function <robotarmy/robolib/eventhandlers.lua:425>

5 years ago

well, my mod isn't really intended to be used that way, it's going to break things. It's best to change the player's force, or have the droid assembler spawned to the correct force from the time it is created, and then make the droids.

5 years ago

if you change player force to enemy, then build the droids/assemblers etc, then change players' force back to 'player', you will be okay, I think.

5 years ago

I accidentally selected some droids, it wasn't my intention.
The mod shouldn't crash regardless. If it's tricky to fix perfectly then just despawn the droids or don't accept them into a squad of a different force or something.

5 years ago

yeah, i'll have to do something. it's a corner case/unusual usage causing the crash, it's a complicated mod so it's easy to miss stuff like this. Thanks for the bug report Qon! You are a valued, and long-term user of the mod. I remember you ;)

5 years ago
(updated 5 years ago)

Yeah, I'm glad I'm not writing this mod :D
Most of my saves are creative mod worlds where I design huge blueprints with no enemies. But it's so fun seeing the bots run around and plundering the natives.

<3
The 0.17 changes have really changed the balance of the mod though, but that's a topic for another thread.

5 years ago

Yeah, turns out the Acid projectiles of the worms/biters and the 'per tick' damage they do is extremely overpowered, and like Klonan had to do in his "Total Automization" RTS mod, I will be disabling the on-tick damage to help balance out the droids vs the biters.

I have lots of planned improvements for Robot Army, including better integration with Klonan's Unit Control mod, but the assemblers will just act as chests now and spawn whatever is the first available droid in the chest rather than changing recipes or whatever. Means I can remove the "dummy" unit items which I was using to trigger spawns with before.

I will let the Unit Control mod handle patrolling and selection of units, and I will be removing the guard station.

The droid assemblers will spawn and control only one squad, of controllable size, hunt radius, and if they hunt or defend (with adjustable defend radius).

The droid settings module can be linked to a single droid assembler to set all these options on a per-assembler basis.

The 'unit group' API usage will be completely gutted and removed, and squads will now just be clusters of single units controlled and managed directly by the mod. This actually makes things a lot cleaner, there was a lot of back end code just to maintain the stupid unit groups which would break up all the time.

By commanding units individually (but clustered into squads, for each assembler) this actually makes the flying units work properly - they can path over water and walls etc and not be so shit ;)

5 years ago

Sounds great! Looking forward to it :)

New response