On Room Editing: questions...

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
kinorunner
Posts: 15
Joined: Wed Dec 26, 2012 4:52 pm

On Room Editing: questions...

Post by kinorunner »

To figure out how to manually create and modify rooms layout ( only ), without any Editor, I tried a very basic experiment:

- I assumed that:
1- mantiscruiser.xml
2- mantis cruiser.txt
3- the part regarding the mantis in blueprints.xml

were ALL the files I had to edit in order to modify rooms layout ( for the mantis cruiser in this case );

- I took 1 and 2 from, say, jelly cruiser ship, and data of the jelly cruiser ship in 3;

- copypasted those jelly cruiser stuff to replace the mantis corresponding data.

The result should have been to have the jelly in place of the mantis, simply; instead the mantis has been replaced with a chaotic rooms layout and danger icons- no go.

So: are there other files involved in the matter? Or maybe there are some place-sensitive values I have not recognized? Or finally there's a hard-coded layout for ships that I can't edit?
Thanks as always for the attention...
User avatar
Kieve
Posts: 944
Joined: Tue Sep 18, 2012 2:21 pm

Re: On Room Editing: questions...

Post by Kieve »

There's an extensive breakdown of ship configuration on the wiki here. I recently updated it to include the naming conventions on ship .PNG's and their .XML files as well.

The short version is,
-ship.txt determines room layout, graphical offsets (for screen centering), and shield ellipse
*Shield ellipse is by radius, so generally a little more than half your ship.png's height/width, respectively. Use the offset values to get it centered up on irregularly-shaped vessels

-ship.xml determines weapon mount position and movement, gib position and movement, and base image size
*The last one allows for scaling, though FTL's graphics are generally on a 1:1 pixel ratio. You may find this useful for scaling down hyper-detailed ships, however.

-blueprints.xml <shipblueprint> is the nitty-gritty one that tells you what the loadout is, what the crew is, which rooms (by ID#) have which systems, and what their starting power is / if the ship starts with them at all...
There is one key point not related to gameplay data however, and that's in the initial <shipblueprint ...> tag.
<shipBlueprint name="PLAYER_SHIP_HARD" layout="kestral" img="kestral">
-Layout="" is the name of the .TXT and .XML files. Thus above, "kestral.txt" and "kestral.xml"
-img="" is the base name of the ship image files. Thus, "kestral_base.png", "kestral_gib1.png" and so forth.
It's not shown in the wiki, but there are two other tags sometimes included, just before the </shipblueprint> closing tag.

<shieldImage>kestral</shieldImage> -sets a particular shield image for the ship. Useful for custom sizes/shapes/colors. Image should be (ship)_shields1.png

<cloakImage>kestral</cloakImage> -specific cloaked image. Generally not needed but can be applied to "force" a specific cloaking graphic, if leaving it out isn't working. Image is (ship)_cloak.png

So if all you were looking to do is copy the room layout of the Slug ship to the Mantis, you'd want to copy over most of the data from the jelly_cruiser.txt - except the Ellipse values - and the <systemlist> data from the jelly_cruiser's blueprints.xml. Copying jelly_cruiser.xml would have a strictly graphical effect and would only serve to mess up your mantis' weapon mounts and gibs.
kinorunner
Posts: 15
Joined: Wed Dec 26, 2012 4:52 pm

Re: On Room Editing: questions...

Post by kinorunner »

@ Kieve:

Great! I'll study your Wiki now that I know it's there. Hope I'll find the way to the layout editing...thanks again.

But, by the way, I keep wondering why of all that mess I had - I merely copied one ship on another. The values you highlighted above, they were untouched, simply copied from one place to another where they should work, right?
So, why doesn't work?
User avatar
Kieve
Posts: 944
Joined: Tue Sep 18, 2012 2:21 pm

Re: On Room Editing: questions...

Post by Kieve »

It's not "my" wiki, per se, I just updated a few things that were left blank or out of date.

As to your error, it's hard to tell without seeing it, but:
-Chaotic room layout would suggest some room IDs were messed up or not properly accounted for. In particular, the Mantis Cruiser has 18 rooms (ID:0-17) whereas the Slug cruiser only has 15 (ID:0-14)

Code: Select all

	<systemList>
		<pilot power="1" room="7" start="true"/>
		<doors power="1" room="14" start="true"/>
		<sensors power="1" room="17" start="false"/>
		<oxygen power="1" room="4" start="true" img="room_oxygen_3"/>
		<shields power="2" room="16" start="true"/>
		<engines power="2" room="10" start="true"/>
		<weapons power="1" room="13" start="true" img="room_weapons_3"/>
		<drones power="2" room="0" start="false" img="room_drones_3"/>
		<medbay power="1" room="2" start="true"/>
		<teleporter power="1" room="1" start="true"/>
		<cloaking power="1" room="5" start="false" img="room_cloaking_2"/>
	</systemList>
The Mantis blueprints were trying to put systems into rooms that didn't exist.
As an aside, the "img" tag on some of those is used for the .PNG's in img\ships\interior, to determine the sprites used in certain rooms, which is probably where your broken graphics were coming from (the "Danger" icon).
Post Reply