[HELP] Custom Mod Not Working

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
dogglez7777
Posts: 9
Joined: Fri Apr 11, 2014 1:31 am

[HELP] Custom Mod Not Working

Post by dogglez7777 »

I created a custom mod with the tutorial that can be found here: http://www.ftlgame.com/forum/viewtopic.php?f=12&t=17122. I haven't done anything with the images, just pasted in all the laser images (because I'm a lazy bum :P ) and have only done the code. I haven't actually done anything with the animations.xml.append, however I'm not sure if I have to do anything with that. On to the main point, though. SMM gives me this error when I run it through the 'Validate' function:
Results

@ OP_WEAPONS.ftl:
---------------

~ This mod doesn't append. It clobbers.


FTL itself can tolerate lots of XML typos and still run. But malformed XML may break tools that do proper parsing, and it hinders the development of new tools.

Since v1.2, Slipstream will try to parse XML while patching: first strictly, then failing over to a sloppy parser. The sloppy parser will tolerate similar errors, at the risk of unforseen behavior, so satisfying the strict parser is advised.
And this is the code for my mod: (blueprints.xml.append)

Code: Select all

<weaponBlueprint name="LASER_RAPID_1">  <!-- #essential -->
       <type>LASER</type>        <!-- #essential -->
       <title>"Spock" Advanced Laser Cannon</title>          <!-- #essential -->
       <short>Spock Laser</short>                          <!-- #essential -->
       <desc>Incredibly impressive weapon, firing ten shots doing 4 damage each.</desc>                         <!-- #essential -->
       <tooltip>Ten shots, four damage per shot.</tooltip>          <!-- #essential -->
       <damage>4</damage>
       <ion>4</ion>
       <sysDamage>10</sysDamage>
       <persDamage>75</persDamage>
       <shots>10</shots>                      <!-- #essential if its a Laser weapon-->
       <sp>5</sp>                          
       <fireChance>10</fireChance>
       <breachChance>10</breachChance>
       <speed>10</speed>
       <cooldown>1</cooldown>                        <!-- #essential -->
       <power>1</power>                                    <!-- #essential -->
       <cost>20</cost>                                        <!-- #essential -->
       <bp>2</bp>
       <rarity>1</rarity>                                         <!-- #essential -->
       <image>laser_light1</image>                       <!-- #essential -->
       <launchSounds>                                           <!-- #essential -->
          <sound>lightLaser1</sound>
          <sound>lightLaser2</sound>
          <sound>lightLaser3</sound>
       </launchSounds>
       <hitShipSounds>                                      <!-- #essential -->
          <sound>hitHull2</sound>
          <sound>hitHull3</sound>
       </hitShipSounds>
       <hitShieldSounds>                                  <!-- #essential -->
          <sound>hitShield1</sound>
          <sound>hitShield2</sound>
          <sound>hitShield3</sound>
       </hitShieldSounds>
       <missSounds>                                        <!-- #essential -->
          <sound>miss</sound>
       </missSounds>
       <weaponArt>laser_burst_1</weaponArt>      <!-- #essential -->
    </weaponBlueprint>
    <!-- THE KESTREL -->
    <!-- LAYOUT = DEFAULT -->
    <!-- SHIP ID = 0 -->  
    <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>
          <pilot power="1" room="0" start="true" img="room_pilot">
             <slot>
                <direction>right</direction>
                <number>0</number>
             </slot>
          </pilot>
          <doors power="1" room="2" start="true" img="room_doors"/>
          <sensors power="1" room="3" start="true" img="room_sensors"/>
          <medbay power="1" room="4" start="true" img="room_medbay">
             <slot>
                <number>1</number>
             </slot>
          </medbay>
          <oxygen power="1"  room="13" start="true" img="room_oxygen"/>
          <shields power="2" room="5" start="true" img="room_shields"/>
          <engines power="2" room="14" start="true" img="room_engines"/>
          <weapons power="3" room="10" start="true" img="room_weapons"/>
          <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="LASER_RAPID_1"/>
          <weapon name="LASER_RAPID_1"/>
          <weapon name="LASER_RAPID_1"/>
          <weapon name="LASER_RAPID_1"/>
       </weaponList>
       <health amount="30"/>
       <maxPower amount ="8"/>
       <crewCount amount = "3" class="human"/>
    </shipBlueprint>
Have I done anything wrong and how can I fix it? :D
User avatar
RAD-82
Posts: 795
Joined: Sat Nov 09, 2013 12:16 am

Re: [HELP] Custom Mod Not Working

Post by RAD-82 »

Considering this is about modding, you should've posted it in the Mod Development section. edit: Somebody moved it. :lol:
dogglez7777 wrote:just pasted in all the laser images
This looks like your 'clobbering' problem, which isn't actually a problem. You are just copying over the original images with your duplicates. Despite your topic title saying Custom Mod Not Working, your post doesn't say anything about actually trying to run it, just that you hit the Validate button. It sounds like it should work as is, although you are using a Kestrel blueprint from before Advanced Edition, so it will be missing the new systems.
Image
Junkyard has FTL mods, mostly ships and a few other things.
dogglez7777
Posts: 9
Joined: Fri Apr 11, 2014 1:31 am

Re: [HELP] Custom Mod Not Working

Post by dogglez7777 »

RAD-82 wrote:Considering this is about modding, you should've posted it in the Mod Development section. edit: Somebody moved it. :lol:
dogglez7777 wrote:just pasted in all the laser images
This looks like your 'clobbering' problem, which isn't actually a problem. You are just copying over the original images with your duplicates. Despite your topic title saying Custom Mod Not Working, your post doesn't say anything about actually trying to run it, just that you hit the Validate button. It sounds like it should work as is, although you are using a Kestrel blueprint from before Advanced Edition, so it will be missing the new systems.
:oops: I should have tried to run it... God, I'm an idiot. Oh well, I guess this should have been expected considering this is my first mod. Haha, thanks for the clarification about that not being a real problem.
dogglez7777
Posts: 9
Joined: Fri Apr 11, 2014 1:31 am

Re: [HELP] Custom Mod Not Working

Post by dogglez7777 »

I have run it several times, and I set the rarity to be 1(lowest value) and have visited 30+ shops. Haven't found it at all, never had it drop. Still says it clobbers...

Maybe someone could help me and tell me what I need to change with the code? Or post the correct sections of code? If someone is willing to do that it'd be a great help.
Speaking of code, this is the animations.xml.append code:

Code: Select all

<animSheet name="laser_spockcannon" w="192" h="60" fw="16" fh="60">weapons/laser1_strip12.png</animSheet>
<weaponAnim name="laser_spockcannon"><weaponAnim name="laser_spockcannon">
   <sheet>laser_spockcannon</sheet>
   <desc length="12" x="0" y="0"/>
   <chargedFrame>5</chargedFrame>
   <fireFrame>8</fireFrame>
   <firePoint  x="10" y="16"/>
   <mountPoint x="2" y="44"/>
</weaponAnim>
<weaponAnim name="laser_spockcannon">
   <sheet>laser_spockcannon</sheet>
   <desc length="12" x="0" y="0"/>
   <chargedFrame>5</chargedFrame>
   <fireFrame>8</fireFrame>
   <firePoint  x="10" y="16"/>
   <mountPoint x="2" y="44"/>
</weaponAnim>
And likewise, the new modified data.xml.append:

Code: Select all

    <weaponBlueprint name="LASER_RAPID_1">  <!-- #essential -->
       <type>LASER</type>        <!-- #essential -->
       <title>"Spock" Advanced Laser Cannon</title>          <!-- #essential -->
       <short>Spock Laser</short>                          <!-- #essential -->
       <desc>Incredibly impressive weapon, firing ten shots doing 4 damage each.</desc>                         <!-- #essential -->
       <tooltip>Ten shots, four damage per shot.</tooltip>          <!-- #essential -->
       <damage>4</damage>
	   <ion>4</ion>
	   <sysDamage>10</sysDamage>
	   <persDamage>75</persDamage>
       <shots>10</shots>                      <!-- #essential if its a Laser weapon-->
       <sp>5</sp>                           
       <fireChance>10</fireChance>
       <breachChance>10</breachChance>
	   <speed>10</speed>
       <cooldown>1</cooldown>                        <!-- #essential -->
       <power>1</power>                                    <!-- #essential -->
       <cost>20</cost>                                        <!-- #essential -->
       <bp>2</bp>
       <rarity>1</rarity>                                         <!-- #essential -->
       <image>laser_spock1</image>                       <!-- #essential -->
       <launchSounds>                                           <!-- #essential -->
          <sound>lightLaser1</sound>
          <sound>lightLaser2</sound>
          <sound>lightLaser3</sound>
       </launchSounds>
       <hitShipSounds>                                      <!-- #essential -->
          <sound>hitHull2</sound>
          <sound>hitHull3</sound>
       </hitShipSounds>
       <hitShieldSounds>                                  <!-- #essential -->
          <sound>hitShield1</sound>
          <sound>hitShield2</sound>
          <sound>hitShield3</sound>
       </hitShieldSounds>
       <missSounds>                                        <!-- #essential -->
          <sound>miss</sound>
       </missSounds>
       <weaponArt>laser_spockcannon</weaponArt><!-- #essential -->
    </weaponBlueprint>
I'm glad we have a supportive community. Always nice to have people willing to help :)

...oh yeah, if you were wondering why it is called the 'Spock' Advanced Laser Cannon is that I was going for something similar to the Vulcan...and since Spock is..well, a Vulcan, why not?
User avatar
RAD-82
Posts: 795
Joined: Sat Nov 09, 2013 12:16 am

Re: [HELP] Custom Mod Not Working

Post by RAD-82 »

Your animations.xml.append code is a mess. It starts out fine with the <animSheet>, but then your <weaponAnim> is messed up. I don't know if you copied it into the post wrong. I'll clean it up since all I have to do is delete stuff. Actually, it is missing the animation for laser_spock1, so I'll add that in using the normal laser graphic.

Code: Select all

    <animSheet name="laser_spockcannon" w="192" h="60" fw="16" fh="60">weapons/laser1_strip12.png</animSheet>
    <weaponAnim name="laser_spockcannon">
       <sheet>laser_spockcannon</sheet>
       <desc length="12" x="0" y="0"/>
       <chargedFrame>5</chargedFrame>
       <fireFrame>8</fireFrame>
       <firePoint  x="10" y="16"/>
       <mountPoint x="2" y="44"/>
    </weaponAnim>

<animSheet name="laser_spock1" w="200" h="20" fw="50" fh="20">weapons/laser_light_strip4.png</animSheet>

<anim name="laser_spock1">
	<sheet>laser_spock1</sheet>
	<desc length="4" x="0" y="0"/>
	<time>0.5</time>
</anim>
As for your next set of code, it looks fine, except you are saying it is from data.xml.append. That file doesn't exist. It should be in blueprints.xml.append. I don't know if you misspoke, or actually tried to use the wrong filename.

If it still says you are clobbering, then you are still replacing a file.
Image
Junkyard has FTL mods, mostly ships and a few other things.
dogglez7777
Posts: 9
Joined: Fri Apr 11, 2014 1:31 am

Re: [HELP] Custom Mod Not Working

Post by dogglez7777 »

RAD-82 wrote:Your animations.xml.append code is a mess. It starts out fine with the <animSheet>, but then your <weaponAnim> is messed up. I don't know if you copied it into the post wrong. I'll clean it up since all I have to do is delete stuff. Actually, it is missing the animation for laser_spock1, so I'll add that in using the normal laser graphic.

Code: Select all

    <animSheet name="laser_spockcannon" w="192" h="60" fw="16" fh="60">weapons/laser1_strip12.png</animSheet>
    <weaponAnim name="laser_spockcannon">
       <sheet>laser_spockcannon</sheet>
       <desc length="12" x="0" y="0"/>
       <chargedFrame>5</chargedFrame>
       <fireFrame>8</fireFrame>
       <firePoint  x="10" y="16"/>
       <mountPoint x="2" y="44"/>
    </weaponAnim>

<animSheet name="laser_spock1" w="200" h="20" fw="50" fh="20">weapons/laser_light_strip4.png</animSheet>

<anim name="laser_spock1">
	<sheet>laser_spock1</sheet>
	<desc length="4" x="0" y="0"/>
	<time>0.5</time>
</anim>
As for your next set of code, it looks fine, except you are saying it is from data.xml.append. That file doesn't exist. It should be in blueprints.xml.append. I don't know if you misspoke, or actually tried to use the wrong filename.

If it still says you are clobbering, then you are still replacing a file.
Haha, yeah, I misspoke. But wow, thanks man :) That helped a lot.
Post Reply