Weirdness with the da-sr12's data and img files

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
User avatar
5thHorseman
Posts: 1665
Joined: Sat Mar 02, 2013 2:29 am

Weirdness with the da-sr12's data and img files

Post by 5thHorseman »

I've been playing around with the DA-SR 12, and I pretty much have a completed mod. However, the shields and cloak are weird and I can't figure out why.

I'm trying to use the EXACT DA-SR 12 from the game, just with a different starting weapon, some different augments, and a different crew. So, I figured, all I really need in my mod is the blueprints.xml file. And it works. The ship functions as expected with the changes I made.

Except there is no cloak image, and no shield image. Even though if I revert, the old DA-SR 12 has these images.

I dug into the game's data and img directories, and it turns out THERE ARE NO SHIELD OR CLOAK IMAGES for the DA-SR 12. It looks like maybe it (and the Stealth C) uses those of the Stealth A ship, instead. So, my first wonder, why doesn't my modded one use them?

I figured okay, fine. I'll just copy those 2 files over and name them stealth_2_cloak and stealth_2_shield, and all will be well, right? WRONG. It STILL doesn't show a cloak or shield.

I think at this point I just need to name the ship something other than stealth_2 in the blueprints.xml.append file, and then include all the other files that go with it. That's fine, I guess, but it's annoying that my simple elegant little ftl file is now a full blown ship mod that includes with it all the assets from the game :/

Anybody else try something like this and find a better way? Am I putting far too much thought and into this? Or possibly are both of those things true?
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: Weirdness with the da-sr12's data and img files

Post by kartoFlane »

The (unmodded) blueprint for the Stealth B should have tags like <shieldOverride> and <cloakOverride>, if I recall correctly. Those specify the layout from which respective values should be copied.
...I don't exactly remember how SL2 handles these tags, I think it just copies the images when saving, and omits the override tags. So you either need to add the graphics, or add the override tags to your blueprint.
Superluminal2 - a ship editor for FTL
User avatar
5thHorseman
Posts: 1665
Joined: Sat Mar 02, 2013 2:29 am

Re: Weirdness with the da-sr12's data and img files

Post by 5thHorseman »

kartoFlane wrote:The (unmodded) blueprint for the Stealth B should have tags like <shieldOverride> and <cloakOverride>, if I recall correctly. Those specify the layout from which respective values should be copied.
...I don't exactly remember how SL2 handles these tags, I think it just copies the images when saving, and omits the override tags. So you either need to add the graphics, or add the override tags to your blueprint.
Hrm. Not only does the DA-SR 12 not have these tags, but they don't exist on any ships. The only place I see "override" in a non-event-name context is when spawning ships for events, the override is used to give the ship a specific weapon. In particular, those slugs who want to light you on fire, to guarantee they have a fire weapon.

I'll fiddle with it, and see what those do. Thanks for the suggestion!

I actually made a "full" version of my DA-SR 12 for testing and it's ready to release, though I'd love it if I could make it just that one file.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: Weirdness with the da-sr12's data and img files

Post by meklozz »

It seems to me like, normally, the game will load shields and cloak with the same prefix (*_cloak.png) as img="*" (probably) or maybe layout="*". The game does, indeed, reuse them by adding this:

Code: Select all

	<shieldImage>stealth</shieldImage>
	<cloakImage>stealth</cloakImage>
</shipBlueprint>
and similar to ship blueprints. Do you have those?
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: Weirdness with the da-sr12's data and img files

Post by kartoFlane »

Gah, that's what I meant, <shieldImage> and <cloakImage>. It's been a while since I last had to sift through FTL blueprints... >_> Sorry for not being precise originally, I haven't had access to FTL files while writing that post. What meklozz says is exactly correct.
Superluminal2 - a ship editor for FTL
User avatar
5thHorseman
Posts: 1665
Joined: Sat Mar 02, 2013 2:29 am

Re: Weirdness with the da-sr12's data and img files

Post by 5thHorseman »

WOW.

W.O.W.

I have no idea how I missed that. I combed through the file it had to be a dozen times and never saw that. You just fixed everything. Thanks!
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
Post Reply