I recently got into modding FTL, as it seemed fairly easy to do. But when I started looking into how the game handles spawning enemy ships, that's where I started getting confused. I saw commands like
but when I look at the blueprints and autoBlueprints XMLs, neither one matches up with what I found in the event XMLs. I want to set up an event where the game loads up a Rebel Rigger with a custom skin, but I can't seem to figure out how I'm supposed to do that. I'm new to modding, so I don't know everything there is to know quite yet.
My ultimate question is simply this: how do I tell the game to load a certain ship? How can I define new ships? How can I tell the game to load a ship with a different skin (e.g. Rebel Rigger with the pirate skin)?
Any help you could provide would be appreciated; even the trusty search button gave me nothing useful.
The somewhat convoluted answer, near as I've been able to figure, is that "ship load" calls are made to autoBlueprints, where they pull from a defined list. In your example,
The "SHIPS_" appears to be implied by the [ship load] command. From there, the list picks one of the defined blueprints - MANTIS_SCOUT, _FIGHTER, or _BOMBER, which can all be found in the autoBlueprints file.
Kieve wrote:The somewhat convoluted answer, near as I've been able to figure, is that "ship load" calls are made to autoBlueprints, where they pull from a defined list. In your example,
The "SHIPS_" appears to be implied by the [ship load] command. From there, the list picks one of the defined blueprints - MANTIS_SCOUT, _FIGHTER, or _BOMBER, which can all be found in the autoBlueprints file.
That makes sense, but it doesn't explain that even then, the names don't quite match up. "MANTIS_FIGHT" isn't in the list you pulled up; I see MANTIS_FIGHTER, but not MANTIS_FIGHT, and that's what has me confused.
See how it references back to auto_blueprint="SHIPS_MANTIS"? Actually, amend my earlier statement slightly as the SHIPS_ part clearly isn't implied at all, it's stated right there (my mistake for not checking more thoroughly).
Events were never my strongest point. :\ That being said, you should find everything you need between the events_ships.xml and autoBlueprints.
See how it references back to auto_blueprint="SHIPS_MANTIS"? Actually, amend my earlier statement slightly as the SHIPS_ part clearly isn't implied at all, it's stated right there (my mistake for not checking more thoroughly).
Events were never my strongest point. :\ That being said, you should find everything you need between the events_ships.xml and autoBlueprints.
Ahh, that makes sense! I didn't think to look in events_ships. Thanks! I'll post back if I encounter any more problems.
1.Ship load does not, as it might suggests, load any ships or ship blueprints. It just loads a ship event from ship_events.xml.
2. The ship event . You going to have to create one of these for your custom ship. You can check exiting ones to see how they work. The sub components like <destroyed> all act like normal events. You can put almost everything there that you can also put into normal events. So ship events give you a lot of control about how the enemies behave in combat and what follows. After a while you might realize that you can do great things with that. This is where the magic happens!
The ship event usually still don't call ship blueprints itself. They choose random ship from a ship list in auto_blueprints.xml. You have to create a list that contains only your custom ship blueprint to have the event spawn your ship. Putting the ship blueprint directly into the ship event without going through a ship list might also work, but I never tried that.
3. The ship list can contain multiple ship blueprints or just one. The whole system might seem a little complicated at first glance, but makes a lot of sense if you keep in mind that FTL was designed to randomize enemies as much as possible. It also makes it very easy to add new enemies to all kinds of certain events, via ading them to the vanilla ship lists.