According to the documentation here, the “on_rocket_launch_ordered” event is supposed to return the player_index of the player riding the rocket. This worked in version 2.0. However, in the current version 2.1.17, the value “nil” is returned, as can be seen in the attached log file.
Attached are the log file, a save file, and a test mod designed to output the player_index to the console and write it to the log file.
[2.1.17] “on_rocket_launch_ordered” event no longer returns the player_index
[2.1.17] “on_rocket_launch_ordered” event no longer returns the player_index
- Attachments
-
- Test_orlo_player_index_02.zip
- (2.99 MiB) Downloaded 23 times
-
- Test_orlo_player_index_0.1.0.zip
- (1.43 KiB) Downloaded 16 times
-
- factorio-current.log
- (9.33 KiB) Downloaded 18 times
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
Re: [2.1.17] “on_rocket_launch_ordered” event no longer returns the player_index
Are you sure this is working in 2.0? It looks like player_index is not given by on_rocket_launch_ordered since 2.0.22 due to changes done in 121106 (#7126), it is just documentation artifact that it suggests player_index there while it is never provided.
Re: [2.1.17] “on_rocket_launch_ordered” event no longer returns the player_index
I also noticed that in 2.0 it was not working. But it seems fine to add it (even if you could just get it from the rocket entity in the event). This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Re: [2.1.17] “on_rocket_launch_ordered” event no longer returns the player_index
@Rseding91: Thank you.
@boskid: Thanks for pointing out when the feature was removed. I’ve been very busy with my real life. The last time I tested the feature was for the most recent release of my mod, in which I used it. That was with Factorio version 2.0.21. So one version before it was removed. I must have overlooked the note in the changelog for Factorio version 2.0.22; my apologies for that. However, I also didn’t receive any feedback from users of my mod indicating that the feature no longer works.
@boskid: Thanks for pointing out when the feature was removed. I’ve been very busy with my real life. The last time I tested the feature was for the most recent release of my mod, in which I used it. That was with Factorio version 2.0.21. So one version before it was removed. I must have overlooked the note in the changelog for Factorio version 2.0.22; my apologies for that. However, I also didn’t receive any feedback from users of my mod indicating that the feature no longer works.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives

