Page 1 of 1

[0.13] Event defines.events.on_player_created not triggered properly

Posted: Fri Jul 08, 2016 7:14 am
by AyrA
Problem
The Event

Code: Select all

defines.events.on_player_created
is not fired for some players in multiplayer.

Source

DarkSlayerEX has first noticed this: viewtopic.php?f=94&t=17547&p=180881#p179805

Notes

The event is always called for the host player but only rarely for joining players.
The event was properly triggered in 0.12.
It's odd really...

Pretty much almost every time, no one gets any items aside from the host after starting a new world.
Extremely rarely for us(Discovered after lots of testing, and after having initially posted about this issue), 1 other person gets the items alongside the host, but no one else gets anything.

The issue happens regardless of who hosts as well..

I'm wondering if this issue could also be more prevalent when a world is generated in SP first, and then loaded through MP afterwards...

Re: [0.13] Event defines.events.on_player_created not triggered properly

Posted: Fri Jul 08, 2016 7:24 am
by Rseding91
The mod is written incorrectly.

It only subscribes to the event on_init which isn't called except for when world is first created.

That also means it's not save load stable and isn't MP stable.

http://lua-api.factorio.com/0.13.6/LuaB ... ap.on_init