This is complicated, but here goes:
The first ship in Tships is on line 0, next ship is line 1, etc., remember that.
It is important that when you add a ship to Tships, you copy it over an existing ship of the same or similar class.
Line 55 is a SS_SH_E_M1. This would be a good place to copy your new carrier to. Now save the file.
There are 2 ways to add the ship to the game. Script it, or mod the galaxy map. I don't script so here's the second method.
On the Tfactories file the first factory is on line 0. It is an Argon shipyard. The shipyards are the first factories listed. The Wharfs are about halfway down the page (SHIPS2).
Find the line number for the shipyard or wharf you wish to add the ship to. The line number is also the subtype. (s=?) in the galaxy xml.
Here is a partial galaxy map for Argon Prime;
<o id="0" t="1" x="1" y="3" r="1" color="4488127" fc="0" fn="0" ff="0">
<o t="2" s="29"/>
<o id="0" t="18" x="-10080000" y="0" z="0" s="2" r="1" gid="2" gx="0" gy="3" gtid="3" a="16384" b="0" g="0"/>
<o id="0" t="18" x="0" y="0" z="-10080000" s="1" r="1" gid="1" gx="1" gy="4" gtid="0" a="32768" b="0" g="0"/>
<o id="0" t="18" x="0" y="0" z="10080000" s="0" r="1" gid="0" gx="1" gy="2" gtid="1" a="0" b="0" g="0"/>
<o id="0" t="18" x="10080000" y="0" z="0" s="3" r="1" gid="3" gx="2" gy="3" gtid="2" a="49152" b="0" g="0"/>
<o t="3" s="4" x="306450724" y="137684307" z="-900789179" color="4295855"/>
<o t="4" x="-467248065" y="100000" z="-97084872" s="18" r="1"/>
<o t="4" x="-266545370" y="100000" z="60373725" s="11" r="1"/>
<o id="0" t="21" x="5772000" y="0" z="-1776000" s="112" a="0" b="0" g="0"/>
<o id="0" t="21" x="5328000" y="0" z="-3108000" s="105" a="0" b="0" g="0"/>
<o id="0" t="21" x="6216000" y="1776000" z="1110000" s="105" a="0" b="0" g="0"/>
<o id="0" t="21" x="6216000" y="0" z="-1554000" s="129" a="0" b="0" g="0"/>
<o id="0" t="6" x="-609840" y="1879080" z="-1617000" s="0" r="1" a="32768" b="0" g="0">
<o t="23" s="7">
<o t="6" s="120"/>
<o t="6" s="136"/>
<o t="7" s="0"/>
<o t="6" s="224"/>
<o t="6" s="184"/>
<o t="6" s="81"/>
<o t="6" s="130"/>
<o t="6" s="146"/>
<o t="7" s="2"/>
<o t="7" s="3"/>
<o t="6" s="147"/>
<o t="6" s="125"/>
<o t="6" s="77"/>
<o t="7" s="5"/>
<o t="7" s="77"/>
<o t="6" s="229"/>
<o t="6" s="30"/>
<o t="6" s="6"/>
<o t="7" s="6"/>
<o t="6" s="214"/>
<o t="6" s="7"/>
<o t="6" s="135"/>
<o t="7" s="55"/>
</o>
<o t="23" s="5">
<o id="0" t="7" s="5" r="1">
</o>
<o id="0" t="7" s="77" r="1">
</o>
<o id="0" t="7" s="77" r="1">
</o>
<o id="0" t="7" s="6" r="1">
</o>
<o id="0" t="7" s="77" r="1">
</o>
<o id="0" t="7" s="6" r="1">
</o>
<o id="0" t="7" s="1" r="1">
</o>
<o id="0" t="7" s="77" r="1">
</o>
<o id="0" t="7" s="77" r="1">
</o>
<o id="0" t="7" s="1" r="1">
</o>
<o id="0" t="7" s="6" r="1">
</o>
<o id="0" t="7" s="77" r="1">
</o>
</o>
</o>
The green numbers at the top are the sector coordinates (if you didn't already know that) The red t=6 means this is a factory, the red s=0, means subtype 0 or line 0 of Tfactories. (or Argon Shipyard)
The t="6" and t="7" items listed below that are the stations and ships for sale at that shipyard. 6's=stations and 7's=ships. Notice <o t="7" s="0"/> This is a ship(t="7") and it is subtype 0, or line 0, (Argon TL the first ship in Tships) The yellow listing is the added carrier (t="7" for ship,s="55" for line 55 0f Tships) Changing the name is a little more complicated, you should post on that.
JFYI:
t=3:sun
t=4:planet
t=18:gate
t=17:asteroid
t=21:nebula
all x, y, z numbers/222=distance from center of sector on meters
I hope this helps

http://www.egosoft.com/x2/forum/viewtopic.php?t=34432