Randomized Flagship modding help

Discuss and distribute tools and methods for modding. Moderator - Grognak
Boomboofer
Posts: 14
Joined: Fri Dec 06, 2013 12:52 pm

Randomized Flagship modding help

Postby Boomboofer » Mon Dec 23, 2013 11:54 pm

Hello FTL modders!
I think FTL has really great replay value due to it's randomness. In fact, pretty much the only thing that isn't random is the final boss, which I think is a good thing for anyone still learning to beat him, but becomes kind of a boring part of the game once you're good enough and have beaten him enough times.

So I had the bright idea that the Boss should also be made more random, but wasn't able to do it. I tried to randomize three things:
1. The weapons. I think it would be great if the boss could have, instead of one of each artillery weapon like now, 0-4 pieces of each weapon, with a total of 4 weapons. So the 4 weapons would be randomly chosen amongst the Triple Ion Cannon, Heavy Triple Burst Laser, Triple Leto Missile Launcher and Boss Beam Weapon.
2. The drones on 2nd stage. It would add a lot of variety if the Boss could use, instead of the old Attack Drone I, Beam Drone, Boarding Drone and Defense Drone I, any drone in the game, possibly including the Boss version of Attack Drone II, which only uses 2 power and the Missile Drone and Ion Drone, which can be found from the games files, but never made it to the game. Also, Hull Repair Drone and System Repair Drone could be excluded. The drones would be chosen randomly among these, so that they would consume 8 power in total, the same way the Rebel Riggers choose their drones randomly.
3. The crew. Even though non-human crew wouldn't be lore-friendly, it would still add variety and would force the player to decide differently depending on if the Flagship would be filled with mantis and rockmen or engi and zoltans. I don't think crystals should be included though.

I tried to implement these ideas to the game by modding the data.dat file, but for some reason couldn't get the drones to work, could only add more crew and had no success with the weapons either. This is my first time trying to mod anything, but I feel that I'm getting nowhere. I think that some, if not all, of these functions I want would be needed to be hard coded into the game, but I think at least the drones should be doable. Could any of you more experienced modders out there help me with this? It would be greatly appreciated.
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Randomized Flagship modding help

Postby Sleeper Service » Tue Dec 24, 2013 12:23 am

Hey there Boomboofer

Welcome to the forum and the modding community. Modding the flagship has been attempted by a few people before, but the boss fight seems to be hard coded in most of it's aspects, so this might not work out as you hope.

Boomboofer wrote:1. The weapons. I think it would be great if the boss could have, instead of one of each artillery weapon like now, 0-4 pieces of each weapon, with a total of 4 weapons. So the 4 weapons would be randomly chosen amongst the Triple Ion Cannon, Heavy Triple Burst Laser, Triple Leto Missile Launcher and Boss Beam Weapon.


Test runs for Captain's Edition have shown that the boss seems to be unable to properly use weapons on it's normal, non-artillery weapon mounts. Some test with weapons forced on it in the ship blueprints had some pretty strange results: The boss seemed to be able to fire the weapon (soundeffect is played) but no projectiles appeared. There might be some hard coding inhibiting the boss from properly firing anything else than it's artillery.

Boomboofer wrote:2. The drones on 2nd stage. It would add a lot of variety if the Boss could use, instead of the old Attack Drone I, Beam Drone, Boarding Drone and Defense Drone I, any drone in the game, possibly including the Boss version of Attack Drone II, which only uses 2 power and the Missile Drone and Ion Drone, which can be found from the games files, but never made it to the game. Also, Hull Repair Drone and System Repair Drone could be excluded. The drones would be chosen randomly among these, so that they would consume 8 power in total, the same way the Rebel Riggers choose their drones randomly.


There is no entry in the xml that controls which drones are spawned in the drone surge. It might be possible to change the drone types used in the surge by overriding "COMBAT" and "COMBAT_BEAM" with another drone type, but that has not been tested yet. Would still be far away from randomization.

Giving the boss a random list of it's actual drone system also seems not to work and just leaves the boss with no drones at all. The boss seems to be unable to draw from random lists.
Boomboofer
Posts: 14
Joined: Fri Dec 06, 2013 12:52 pm

Re: Randomized Flagship modding help

Postby Boomboofer » Tue Dec 24, 2013 11:53 am

Hi Sleeper Service! Thanks for answering.
Could it be that the Boss is unable to draw anything from a list because it's been placed in the blueprints.xml instead of autoBlueprints.xml like the other enemy ships, which ARE able to draw from lists? None of the player ships in the blueprints.xml draw from lists either. I tried to place the Boss files in the blueprints.xml instead and surprisingly, the Boss worked just fine. However, it still seems to be unable to draw from a list, which I find odd now that it's in the autoBlueprints file.

Would it be possible to change the hard-code since this really isn't a complicated change I'm trying to do?

Alternatively, would it be possible to overwrite the whole Boss?

And by the drones I meant the regular drones, not the surge ones.
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Randomized Flagship modding help

Postby Sleeper Service » Tue Dec 24, 2013 12:19 pm

Boomboofer wrote:Could it be that the Boss is unable to draw anything from a list because it's been placed in the blueprints.xml instead of autoBlueprints.xml like the other enemy ships, which ARE able to draw from lists?


Possible, but if you don't place the modified boss files in the place where the originals are (blueprints.xml) than they wont override and your changes won't take effect anyway. Anything that not controlled by the xmls is kind of off limits for modding right now. The various incarnations of FTL Overdrive try to eventually change that.

Boomboofer wrote:Alternatively, would it be possible to overwrite the whole Boss?


Well kind of, by overriding it's ship files and its blueprints. But very little can actually be changed this way.

What can be changed (no guaranty, just what has been tested):
- Appearance and stats of the boss artillery weapons
- Fixed drones (non-surge) in phase two
- Boss augs (can be added and take effect)
- Crew apparently, wasn't aware of that before. Would be interested to see how that behaves between the phases.
- Text and events of the boss spawn events
- Boss ship layout, although crew path finding seems to be bugged
- Boss systems and system levels, boss does not scale with level though, it will always have its start system power and never upgrade by itself like random enemies do
ikeelyou300
Posts: 101
Joined: Tue Dec 03, 2013 2:46 am

Re: Randomized Flagship modding help

Postby ikeelyou300 » Mon Dec 30, 2013 1:01 pm

How can you change the crew on the flagship?!!!

Did you just add in the lines that determine crew from other ship blueprints?

What I've been trying to do to diversify the boss is mainly determined by events. I also really liked Sleeper service's idea of the fight taking place near a hazard or the flagship using a random combat aug like a radiation projector against you. Not much can change for the final boss so Ive settled for that for now.

It's not possible to use the "ship load" function when the flagship is already there is it... That's the only way you could have a whole different flagship.
English Narwhal
Posts: 402
Joined: Tue Dec 03, 2013 9:12 pm

Re: Randomized Flagship modding help

Postby English Narwhal » Mon Jan 06, 2014 4:35 am

As far as I can tell, the flagship is not only cheaty, attempting to work with it using normal coding methods is as easy as trying to negotiate with a brick wall.
In the end, I have concluded that the easiest way to get randomization other than with crew is to remove the current flagship and write up some new ship code.
Please note that I'm not very good with FTL, but this is what I have understood.
Image
Boomboofer
Posts: 14
Joined: Fri Dec 06, 2013 12:52 pm

Re: Randomized Flagship modding help

Postby Boomboofer » Thu Jan 09, 2014 10:02 pm

ikeelyou300 wrote:How can you change the crew on the flagship?!!!

Did you just add in the lines that determine crew from other ship blueprints?


Yes, just add that line to boss's file blueprints.xml and it will add the appropriate amount of crew. For example:
<crewCount amount = "3" class="mantis"/>
Unfortunately putting in a negative amount of humans doesn't reduce the existing crew.