Page 1 of 1

[Solved]Need Help: Spot the error!

Posted: Mon Oct 01, 2012 1:04 am
by tazardar
Update: Ok I've figured it out.
I just copied every single line, line for line, in to the blueprint.xml and tried running it. The mistake was literally in the LAST line, where instead of <crew amount="x" class="human">, my tool wrote <crew count="x" class="human">. this is almost the ONLY element where FTL does not forgive mistakes. If you make mistakes in the systems, it just ignores the system.

Thanks everyone for your time. This thread is now solved.

Hi,

I just can't figure out why ships created with my Editor make the game crash. I've narrowed it down to the blueprints.xml.append . Could you please take a look at the code and tell my whats wrong with it?

Code: Select all

<shipBlueprint name="PLAYER_SHIP_HARD" layout="kestral" img="kestral">
   <class>Kestrel Cruiser</class>
   <name>The Kestrel</name>
   <desc>This class of ship was decommissioned from Federation service years ago.  After a number of refits and updating this classic ship is ready for battle.</desc>
   <systemList>
      <shields power="2" room="4" start="true" img="room_shields" />
      <weapons power="3" room="10" start="true" img="room_weapons" />
      <pilot power="1" room="0" start="true" img="room_pilot">
         <slot>
            <direction>right</direction>
            <number>0</number>
         </slot>
      </pilot>
      <engines power="2" room="13" start="true" img="room_engines" />
      <medbay power="1" room="5" start="true" img="room_medbay">
         <slot>
            <number>1</number>
         </slot>
      </medbay>
      <oxygen power="1" room="12" start="true" img="room_oxygen" />
      <doors power="1" room="2" start="true" img="room_doors" />
      <sensors power="1" room="3" start="true" img="room_sensors" />
      <drones power="2" room="1" start="false"/>
      <teleporter power="1" room="15"   start="false"/>
      <cloaking power="1" room="8" start="false"/>
   </systemList>
   <weaponSlots>4</weaponSlots>
   <droneSlots>2</droneSlots>
   <weaponList count="2" missiles="8">
      <weapon name="MISSILES_2_PLAYER" />
      <weapon name="LASER_BURST_3" />
   </weaponList>
   <health amount="30" />
   <maxPower amount="8" />
   <crewCount count="3" class="human" />
</shipBlueprint>


It should be the basic Kestrel A with the rooms switched a bit. Thank you for your Help

TAz

Re: Need Help: Spot the error!

Posted: Mon Oct 01, 2012 1:18 am
by Zaffre
In the pilot room, you forgot a forward slash after the final quotation and wrote it like this: "room_pilot" >

When it should be like this: "room_pilot"/>. Also, may I recommend removing the spaces after the terms? For instance, if it was written "room_example" />, you could make it "room_example"/>. Hope this helps.

EDIT: I just noticed you had the same error in the medbay line.

Re: Need Help: Spot the error!

Posted: Mon Oct 01, 2012 1:36 am
by tazardar
In the pilot room, you forgot a forward slash after the final quotation and wrote it like this: "room_pilot" >


That line is opening the tag. the following <slot> elements are child elements of <pilot>. Its the same way in every other (vanilla) ship.

Also, may I recommend removing the spaces after the terms? For instance, if it was written "room_example" />, you could make it "room_example"/>.
.

I've looked in to that, and it works fine if i just copy/paste the original kestrel and put it on the bottom. I can add/remove spaces and even replace the indent chars (tab) with spaces. Still works. In fact, I can't corrupt a copied kestrel to a degree that it produces the same error.

Thanks for your help, though. I appreciate it.