kyranf / robotarmyfactorio

A mod to add robot troop units and perhaps associated support buildings and items to produce and control them.
MIT License
35 stars 12 forks source link

Crash on PvP #101

Closed Damgam closed 7 years ago

Damgam commented 7 years ago

http://i.imgur.com/72ajDIT.png happen when you try to start match on PvP scenario

kyranf commented 7 years ago

What other mods are on? What scenario is it? Did it happen when only player 1 was in the game or when player 2 joined? 

-------- Original message -------- From: Damgam notifications@github.com Date: 29/04/2017 12:50 (GMT+00:00) To: kyranf/robotarmyfactorio robotarmyfactorio@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [kyranf/robotarmyfactorio] Crash on PvP (#101)

http://i.imgur.com/72ajDIT.png

happen when you try to start match on PvP scenario

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kyranf/robotarmyfactorio","title":"kyranf/robotarmyfactorio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kyranf/robotarmyfactorio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Crash on PvP (#101)"}],"action":{"name":"View Issue","url":"https://github.com/kyranf/robotarmyfactorio/issues/101"}}}

Damgam commented 7 years ago

only Robot Army and Creative Mode. when you start PvP scenario you have "lobby" map. when you set everything you click "start" and then battle map appear... it's creating new forces at this moment... we were 2 on the map and this happened when i clicked "start" to generate battle map (i guess it's something with forces)

kyranf commented 7 years ago

@Damgam thanks, i'm probably missing some new tables that should be instantiated during the "on_force_created" event but are being missed, and then later when all forces are iterated through to check for tick updates, the force doesn't have a tick table yet.

kyranf commented 7 years ago

I was able to reproduce it instantly by using: /c game.create_force("test_force")

while playing, it's definitely some missing code in the on_force_created event which should be making some of the new tables but clearly isn't.

kyranf commented 7 years ago

Turns out it was the handleForceCreated event handler was running but the input (the new force object) wasn't being used properly, so all the code after that (which was fine) was not doing what it was meant to!

kyranf commented 7 years ago

Fixed in Unstable branch, please download the branch and name your mod folder 0.3.1 and everything should be good. I'm working on other patches for the other new issue with the Position error in the base Factorio lua lib.

Damgam commented 7 years ago

Thanks :)

kyranf commented 7 years ago

appears fixed, no more bugs reports related to this since.