Rebel Flagship Design

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Rebel Flagship Design

Postby Sleeper Service » Tue Dec 20, 2016 1:17 am

You can give specific flagships an event file that overwrites CEs oxygen shutdown event, yes. The event in question is BOSS_TEXT_3 in events_boss.xml. This will only work if the player places the mod after Captains Edition though, but that might be in order anyway.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Rebel Flagship Design

Postby meklozz » Tue Dec 20, 2016 4:54 pm

Here is the hull image:
https://dl.dropboxusercontent.com/u/18243056/customflagship/drop%20hull.ftl

It's just one file, only slightly modified. I made it a pixel wider so there is some space at the end before it resets over when it goes above 22 hull. It seems to work fine, was 241 px before and is 242 now, so I think it's 11 px per hull point lost either way.

About events, I don't think the flagship can 'surrender' or 'escape' (events triggered by low hull), since it doesn't have a <ship> tag - the thing that calls a ship in events.

But if you want to just add something to an event whether it's CE or not, you should check out the readme_modders.txt file in slipstream, in particular 'advanced xml' tags. It should look something like:
events_boss.xml.append:

Code: Select all

<mod:findName type="event" name="BOSS_TEXT_1">
   <mod-append:status type="limit" target="enemy" system="oxygen" amount="0"/>
</mod:findName>


Just need to make sure it's compatible with whatever else CE does (I don't think you can have two tags that limit enemy systems in the same level of an event (right next to each other), for example, and you also wouldn't want to 'limit' it just for CE to 'clear' it right after). You can go deeper into events with more findName or findLike tags, and if slipstream doesn't find such an event, it just won't do anything. Similarly, you can use it to add other conditions, mostly anything that you can think of, with other tags, without changing the base any.
If you need help with it, just say what exactly you need it to do.

It's possible you don't need any of this and can just do what Sleeper Service says and replace the whole event, but you may end up with some leftovers like CE texts even if a player isn't playing it, or even more parts of the event that would be unusable.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Rebel Flagship Design

Postby meklozz » Tue Dec 20, 2016 10:02 pm

Should be pretty simple. Just add these to the events_boss.xml.append file:

For 1, this:

Code: Select all

<mod:findName type="event" name="BOSS_TEXT_3">
   <mod:findLike type="status">
      <mod:selector target="enemy" system="oxygen"/>
      <mod:removeTag/>
   </mod:findLike>
   <mod-append:status type="limit" target="enemy" system="oxygen" amount="0"/>
</mod:findName>

Should do. It just makes sure there is the limit tag or adds it, shouldn't interfere with augments in any way.

For 2, this:

Code: Select all

<mod:findName type="event" name="BOSS_TEXT_3">
   <mod:findLike type="text">
      <mod:setValue>new text</mod:setValue>
   </mod:findLike>
   <mod:findLike type="status">
      <mod:selector target="enemy" system="oxygen"/>
      <mod:removeTag/>
   </mod:findLike>
</mod:findName>

It's pretty much the same in many ways, you can either remove the three lines around the setValue line if you don't want your own text, or (CE mentions failing life support), you can just change 'new text' to the another (just generic one. I guess) text. If you wanted to replace text only if the user has CE, that could be done, too, though a little differently.

The last one is the same as the first, just change the event name from boss text 3 to 2. If you want both of them, you need to copy it over twice and then only change the event name in one of them (so there is one for each phase).

@edit
Corrected a typo in the second one.

@@edit
Not sure if you know CE flagship also disables drones (or has a chance to? not sure) in phase 3, you can get rid of it like this:

Code: Select all

<mod:findName type="eventList" name="BOSS_3_LIST">
   <mod:findLike>
      <mod:findLike type="status">
         <mod:selector type="limit" target="enemy" system="drones"/>
         <mod:removeTag/>
      </mod:findLike>
   </mod:findLike>
</mod:findName>
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Rebel Flagship Design

Postby meklozz » Tue Dec 20, 2016 11:16 pm

I don't think it's recent, and to be clear I mean the flagship on-board drones in the last stage. They're actually off until the crew is killed, and only then are cleared.

@edit
And, yeah, the second code just removes CE's removal of oxygen. No need to specify the level or anything.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Rebel Flagship Design

Postby meklozz » Tue Dec 20, 2016 11:35 pm

Not 100% sure, but most likely nothing. There are even events in vanilla that disable systems you might not have, including med/clonebays (no ship has both, and there are events that just go for disabling them anyway, then there's slug B), doors (rock B), sensors (many ships).

@edit
Does not giving the flagship an oxygen system make it completely airless from the start of the fight?
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Rebel Flagship Design

Postby meklozz » Wed Dec 21, 2016 12:25 am

No problem.

I don't know where you should make a thread, but after playing through and making that first save I had no problems launching the previous flagships without doing a whole run. You could modify a bomb to do a bunch of real damage (or crew damage and fast cooldown) and pierce shields (zoltan shield bypass, I mean), it should go fast, killing it the moment you want. I'm just gonna play them through normally and enjoy them, though.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Rebel Flagship Design

Postby meklozz » Wed Dec 21, 2016 2:58 pm

Gidoza wrote:
You could modify a bomb to do a bunch of real damage (or crew damage and fast cooldown) and pierce shields (zoltan shield bypass, I mean), it should go fast, killing it the moment you want.


What? I've no idea what this is referring to.


I just meant making an overpowered ship for faster testing, sorry.

Weird about the crashes, maybe try reinstalling/verifying FTL and deleting slipstream backups? Other than that, just see if anyone else gets them, I guess.
User avatar
RAD-82
Posts: 796
Joined: Sat Nov 09, 2013 12:16 am

Re: Rebel Flagship Design

Postby RAD-82 » Thu Dec 22, 2016 3:52 am

Gidoza wrote:Anyways - I noticed last night that one of the ships I tested had a shield bubble that was slightly off and a centring that was slightly off. But they don't all seem to be off in the same way. I find this puzzling. The image for the Flagship is exactly the same in every single case. Why would the centring be any different from one Flagship design to another?

Shield bubble position is based on the room layout, not the ship image.
Image
Junkyard has FTL mods, mostly ships and a few other things.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Rebel Flagship Design

Postby meklozz » Sat Dec 24, 2016 12:42 am

1. I was worried about it, you mean to make it more like vanilla only change the very end (at 22 hull points) go down to the floor? That could work, will see. Some other options could be changing the other graphic (around the start of the hull points) slighty, maybe to make it all a little smoother. Will have to experiment sometime soon.

2. Maybe this can help? http://ftlwiki.com/wiki/Modding_ships That wiki is usually not good, but it has some information in the more technical areas.

3. Normal ships can, I don't know what the issue would be. One thing is that you can see the power when you hack them. If the drone has no actual power in it (as in, there are system bars, but empty), it's possible playing with the maxpower or whatever it's called setting could help. You could also cheat with unique drone versions that take less power.

4. I don't believe it's possible to put crew anywhere there isn't a console for them to spawn at.. That should happen by itself, though? Like it does in vanilla? Is there no console for them to go to in the artillery room, for some reason? If so, which flagship is it on?
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Rebel Flagship Design

Postby meklozz » Sat Dec 24, 2016 2:19 pm

Gidoza wrote:The Artillery rooms all have consoles. And depending on the Flagship type, I've seen a bunch of dudes spawn in empty rooms, only for them all to then move around and go into appropriate spots. I feel like I'm missing something.

Maybe it has something to do with what the room number IDs are? Any specific flagship this is an issue on?