Rocket control in SA via modding api

Place to post guides, observations, things related to modding that are not mods themselves.
Joserichi
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Nov 15, 2024 9:37 am
Contact:

Rocket control in SA via modding api

Post by Joserichi »

I have been wondering how can you control a rocket with the modding api. There is the event "on_rocket_launch_ordered" but reading the docs I don't see any "destination" or similar either on the rocket or on the silo. Also on the silo there is the launch_rocket method, but it doesn't accept any parameter and just launches the rocket to the same planet it is sent from. Am I missing something very obvious or how does the game handle where a rocket goes?
s6x
Burner Inserter
Burner Inserter
Posts: 13
Joined: Fri Nov 15, 2024 8:22 pm
Contact:

Re: Rocket control in SA via modding api

Post by s6x »

Unfortunately, I don't think you can control that stuff via Lua at the moment.

(Most of the development time for this mod was spent on working around this issue...)
Joserichi
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Nov 15, 2024 9:37 am
Contact:

Re: Rocket control in SA via modding api

Post by Joserichi »

Aw, seems like we were trying to do the same, what a shame. Although I don't know why it needs to be so complicated, seems like it should be basic funcionality that should have been implemented with the expansion and was just left with the "default" fields that existed in the base game.
Vulteran
Burner Inserter
Burner Inserter
Posts: 12
Joined: Tue Aug 23, 2022 3:50 am
Contact:

Re: Rocket control in SA via modding api

Post by Vulteran »

I was also looking into how to specify a destination for a rocket via the api and came up short.

Are there plans to add the ability to set the destination via the lua API in the future?
Post Reply

Return to “Modding discussion”