The EXAMPLE_CODE entries in this mod are slightly-modified versions of the code used for my H-Fuel Tanker mod, which I put up on TLR earlier to show people a simplified approach to adding new ships to the various Factions very easily.

Note that each XML script for ships begins with a 000_.  This is because... if we're adding anything NEW to the game and we want our game-balancing or add-on scripts to alter them the same way that they're altering the original FL INIs, we want the add-on scripts to alter the INIs *before* the game-balance scripts.  The 000_name_of_script means that these scripts get executed FIRST.

Here is a description of what each file does:

**************************************************************************

EXAMPLE_CODE_Hfuel_Tanker.xml

This file contains all of the entries needed to make a new ship work, including FLMM-generated DLL entries for InfoCards, etc.  All you need is a custom ship CMP/MAT/SUR and an Icon, and you're all set.  Just do a find-and-replace of "hfuel_tanker" with "whatever_my_ship_nickname_is", change the descriptions (please note, you have to do that TWICE- that second, funky-looking XML below the text description string is the second version of the stats, and needs to be changed as well)... change the stats to whatever, add/subtract Weapon, Turret, Shield, Thruster, whatever entries... and you're done.  

Ok, so it's not the simplest thing ever.  But, compared to how hard this used to be... really, what I've done here *is* better.  Because instead of hand-altering multiple different files, with the risk that one mistake in one of the many files will cause a crash... now you can just view this one file and alter things very, very easily.  Give it a try!

**************************************************************************

EXAMPLE_CODE_Hfuel_Tanker_Faction_Prop.xml

This shows one of several very easy ways to put a new ship into multiple Factions very quickly.  You could also do this with one Faction, by changing the text in the <section> tag to something like "affiliation = li_n_grp", which would then assign your ship ONLY to the Liberty Navy.  Try it... you'll like it!  And once again... no need to include modified SDK files.  Life is good.

**************************************************************************

EXAMPLE_CODE_Hfuel_Tanker_Loadouts.xml

This adds a Loadout (or, you could add more than one) for your new ship to Loadouts.ini.  This leads to the last (very important) file...

**************************************************************************

EXAMPLE_CODE_Hfuel_Tanker_Npcships.xml

This file serves as a kind've "bridge" between the ship, the Loadout, and the Faction.  By altering the entries in this file, you can make this ship show up in high-level Encounters only, low-level Encounters... or anywhere in-between.  And because I've already provided 4 AI models for you to choose from, you can just use one of those- or take one of those and write a new one, and insert it with yet another XML script.