Oarcinae / FactorioScenarioMultiplayerSpawn

A custom scenario for Factorio which provides each player a unique starting spawn point in a multiplayer game.
MIT License
49 stars 30 forks source link

Incompatability with Orbital Ion Cannon #106

Closed grundyboy34 closed 4 years ago

grundyboy34 commented 4 years ago

When trying to start a game with the Orbital Ion Cannon mod installed, the game states a non-recoverable error has occurred and forces you back to the main menu. It only happens when using this scenario and that mod.

Oarcinae commented 4 years ago

Do you have an error message you can share?

grundyboy34 commented 4 years ago
Error while running event Orbital Ion Cannon::on_player_created (ID 24)
__Orbital Ion Cannon__/control.lua:110: attempt to get length of field '?' (a nil value)
stack traceback:
    __Orbital Ion Cannon__/control.lua:110: in function 'init_GUI'
    __Orbital Ion Cannon__/control.lua:309: in function <__Orbital Ion Cannon__/control.lua:308>
Oarcinae commented 4 years ago

I haven't had time to look into this yet. Did you find any resolution?

grundyboy34 commented 4 years ago

I didn't, I ended up just removing it.

Oarcinae commented 4 years ago

@grundyboy34 So I think I know why this is happening, but I believe it's an issue with the Orbital Ion Cannon mod. If a mod/scenario creates a force during on_init, it doesn't trigger an event. In theory, the OIC mod should check after init, or whenever it is creating a player if the force is new or not.

While I could implement a work around on the scenario side, it has the possibility of introducing some nasty bugs and changes in the current game behavior so it doesn't seem worth it to try and implement a work around.

I'd try filing a bug with the OIC mod author, because any mod/scenario that does what I am doing will cause the same issue most likely.