Assertation Fail

Discuss and distribute tools and methods for modding. Moderator - Grognak
saobie3
Posts: 24
Joined: Tue Jul 12, 2016 3:03 am

Assertation Fail

Postby saobie3 » Tue Jul 12, 2016 3:56 am

Iv been trying to add my own weapon into the game. I got it in and found it didnt work how i wanted and got help to make it work properly. So with that done i patched in the new specs and then proceeded to try adding in another weapon (which previously worked). Now i get assertation failures. Even if i remove every trace of them from the files i still get the 1383 failure, like it corrupted the file. Nothing fixes it excpt patching with Slipstream or wiping the whole local content. Obviously, this also gets rid of any changes i made and im forced to try again and ponder why it didnt work.

To break down what has happend so far:

I modded ftl with mods and slipstream. Everythings fine.
Unpacked it using FTL Unpacker, added in my weapons. Assertation fail on launch.
Wiped all local content.
Unpacked it using FTL Unpacker, added just the first weapon. Worked (except this is where i found it didnt work as intended)
Changed the specs of the first weapon to work like intnded, then added in second weapon. Assertation fail on launch.

The thing is the second weapon used to work too. Ingame its appearence was off so i changed its parameters to match the weapon i copied it from. Every time after that it got assertation fails. What really bothers me is the fact that i get these fails even after clearing out both weapons from the resources and data. I used to do this a few years back and never remember things like this being an issue

Im on the verge of just giving up, its incredibly tedious and aggrivating to deal with. Anyone able to pinpoint whats going on?
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Re: Assertation Fail

Postby NarnKar » Tue Jul 12, 2016 2:29 pm

You should be able to add your weapons into the game using only slipstream mod manager, which handles unpacking/repacking automatically. The fact that you're manually unpacking the resources is a bit odd, to me. Perhaps the assertion failure is because you're adding your weapons twice: first through slipstream, then again through FTL Unpacker? But--then again--you did say you wiped local resources. In any case you should almost never have to unpack dat files yourself.

"i changed its parameters to match the weapon i copied it from" -- if you changed the weapon's animation parameters without changing its spritesheet, the mismatch may cause problems.

You can also try FTL Error Checker here: viewtopic.php?t=17034
saobie3
Posts: 24
Joined: Tue Jul 12, 2016 3:03 am

Re: Assertation Fail

Postby saobie3 » Tue Jul 12, 2016 5:02 pm

To be honest, until someone mentioned it on steam i didnt know you could use slipstream to pack (by making it a "mod"). Ill be doing that from now on xD I made sure to change every part of the animations accordingly, so i was very confused why it happened.

This is also how i always did it, pack/unpack using FTL Unpacker. Honestly i thought thats how everyone did.
saobie3
Posts: 24
Joined: Tue Jul 12, 2016 3:03 am

Re: Assertation Fail

Postby saobie3 » Tue Jul 12, 2016 5:34 pm

Just to be clear, to pack using Slipstream i put whatever i modified (in this case the img file and data file) in a zip, put .append after every script or file i modified, and then put .ftl at the end of the zip file, correct?
User avatar
gentasaurus
Posts: 67
Joined: Mon Jun 27, 2016 1:09 pm

Re: Assertation Fail

Postby gentasaurus » Tue Jul 12, 2016 6:04 pm

That format is correct; however, because of the Slipstream's append functionality, the scripts only need to contain whatever data is different from the original game. If most of the scripts are identical to the original scripts, you can eliminate those parts to keep things organized and more compatible in case another mod overwrites a vanilla aspect. If you're just adding custom weapons, then the scripts in your .ftl file only need to contain your added/modified code.
Image Image ImageImage
saobie3
Posts: 24
Joined: Tue Jul 12, 2016 3:03 am

Re: Assertation Fail

Postby saobie3 » Tue Jul 12, 2016 6:08 pm

So i only ned to add in Animatons, Autoblueprint Blueprint, and the Weapons files? I did just pack the whole thing into a zip file and then put .ftl at the end, and the file isnt read by slipstream when i boot it up. I dont know why

I should be clear that the files im using have already been modded so they also include every other mod in the files iv listed, should i delete that and use a vanilla resource/data file?
User avatar
gentasaurus
Posts: 67
Joined: Mon Jun 27, 2016 1:09 pm

Re: Assertation Fail

Postby gentasaurus » Tue Jul 12, 2016 6:29 pm

The file structure goes like this:

YourMod.ftl
-data (folder)
--blueprints.xml.append
--autoBlueprints.xml.append
--animations.xml.append
-img (folder)
--(whatever graphical resources you have)

The scripts should not contain any code that is not part of your mod. If they contain code from the original game or other mods, it's not a good idea.
Slipstream essentially takes whatever code is in your scripts and copies it into the game's vanilla scripts when it patches. This means you don't need extraneous already-existing code from the game or other mods in your scripts.

edit: for example, here is a file from one of my mods. This is all you need to add a weapon to the game for your blueprints.xml.append file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<weaponBlueprint name="BOMB_CREW">
   <type>BOMB</type>
   <tip>tip_bombs</tip>
   <title>Crew Bomb</title>
   <short>Crew B.</short>
   <desc>Self-teleporting bomb that instantly kills all crew in the room. Can target your own ship.</desc>
   <tooltip>Bomb weapon; requires a missile; kills nearby crewmembers. Can target your own ship.</tooltip>
   <damage>0</damage>
   <sysDamage>0</sysDamage>
   <persDamage>14</persDamage>
   <missiles>1</missiles>
   <shots>1</shots>
   <sp>0</sp>
   <fireChance>0</fireChance>
   <breachChance>0</breachChance>
   <cooldown>20</cooldown>
   <power>3</power>
   <cost>100</cost>
   <bp>4</bp>
   <rarity>0</rarity>
   <image>bomb_crew</image>
   <explosion>explosion_big1_crew</explosion>
   <launchSounds>
      <sound>bombTeleport</sound>
   </launchSounds>
   <hitShipSounds>
      <sound>smallExplosion2</sound>
   </hitShipSounds>
   <weaponArt>bomb_crew</weaponArt>
   <iconImage>bomb_crew</iconImage>
</weaponBlueprint>
Image Image ImageImage
saobie3
Posts: 24
Joined: Tue Jul 12, 2016 3:03 am

Re: Assertation Fail

Postby saobie3 » Tue Jul 12, 2016 6:37 pm

Ah, so in the.. say.. Autoblueprint file, i should just delete everything in there and ONLY have <name>MISSILES_BARRAGE</name> inside right? Since thats all im adding.
saobie3
Posts: 24
Joined: Tue Jul 12, 2016 3:03 am

Re: Assertation Fail

Postby saobie3 » Tue Jul 12, 2016 6:43 pm

So im coming across an issue, it seems to not update the files. I put the weapon on the Torus as a starting weapon so i could test it and gave 28 missiles, and none of those changes were put in, which leads me to believe nothing else was either.

I changed my slipstream to accept zip files, since i probably wont make these mods public. Not sure if thats a factor but im putting it out there. I also have ONLY the modified text in the blueprint, auto, animation files as well
User avatar
gentasaurus
Posts: 67
Joined: Mon Jun 27, 2016 1:09 pm

Re: Assertation Fail

Postby gentasaurus » Tue Jul 12, 2016 6:50 pm

Yes, you're doing it right now, but what is your zip structure? Is it Yourmod.zip with the data folder inside, containing all your scripts?
Also, what operating system are you on? If it's Mac, your zip might not be packing right.

edit: in Slipstream, check your mod and press 'Validate' and see what it says
Image Image ImageImage