Page 1 of 1

[2.0.48] launch_rocket can fail to launch rocket

Posted: Mon May 12, 2025 2:23 pm
by thesixthroc
Two bugs with launch_rocket are observed in the mod https://mods.factorio.com/mod/Planet-Hopper:

* In the attached save, launch_rocket fails to launch the player and returns false. The documentation is not exactly clear on when false will be obtained, but the player is standing near the rocket and prepared for launch as they normally are in Space Age.
* If the Planet-Hoppers mod is adjusted to remove the second argument to launch_rocket (character) in control.lua, the game experiences a hardcrash on launch (logfile attached.)

In both cases the launch_rocket destination field is set as follows:

Code: Select all

{
    type = defines.cargo_destination.surface,
    surface = game.surfaces[destination_name],
}

Re: [2.0.48] Failures of launch_rocket

Posted: Mon May 12, 2025 2:36 pm
by Genhis
Regarding your second issue, the crash when omitting the second argument of `launch_rocket()` is already fixed for 2.0.49.

Re: [2.0.48] Two issues with launch_rocket

Posted: Mon May 12, 2025 2:51 pm
by thesixthroc
Thanks.

Attached is the mod Planet-Hoppers 3.0.0 since I have just removed that release from the Portal.

Re: [2.0.48] Rocket fails to launch with launch_rocket

Posted: Tue May 13, 2025 11:03 am
by Genhis
In 2.0.48/49, you can launch players only to space platforms which are in orbit of their surface. I will keep this in bug reports.

Re: [2.0.48] launch_rocket can fail to launch rocket

Posted: Thu May 22, 2025 3:53 pm
by Rseding91
I've changed launch_rocket to allow launching a character to any destination for the next release.