TC/director/start.xml
TC/L/true/gamestarts.xml
AP Note : These have changed for AP :
TC/addon/director/start.xml
TC/addon/types/gamestarts.xml
Both are xml files like scripts, and require an xml editor to edit them.
Gamestart.xml contains the text you see on the New Game Menu, the sector you start in and the starting ship.
Start.xml contains all the rest of the information for the start, including ship fittings, sectors visible, extra ships, race ranks, plot activation and starting credits.
Conventional scripting methodology has that all text must be included in a text file. However, this does not work for starts. Any text references not in 0001-L???.txt are ignored on game startup. So it is necessary to hardcode the text into both files when creating a new start.
You can modify the existing start files for changing the setup of your starting ship, adding extra ships, adding or changing whatever fitout you want in them.
You can add completely new starts.
You need to know the ID's of everything you put in.
I could not find a way to put a ship inside a ship, although I did try. It just seemed to ignore the embedded ship.
I wasnt too impressed with where the ships were placed, (right next to the starting ship, whereever they fit in the sector), but they did get put in.
Example of gamestart.xml from the AMS Mod.
Code: Select all
<!-- Apricot Mapping Service -->
<gamestart id="125" name="Apricot Mapping Service" description="The AMS has fallen on hard times, but unlike some, you are still CEO of a viable corporation with a small fleet to command and some unique technical innovations. You are a friend to most. Time to rebuild." difficulty="Easy" image="start125" plot="1">
<player name="John -Apricot- Slice" species="Argon" gender="Male" age="48"/>
<!-- Argon Prime -->
<sector x="1" y="3"/>
<ship typename="APRICOT_GUNBUS"/>
</gamestart>
Part 1.
AP Note : This section of code has been removed. The plots are now embedded at the top of the code for part 2.
Code: Select all
<do_when value="{player.gamestart}" exact="125" comment="Apricot Mapping Service">
<set_value name="Terran Link Plot" exact="1"/>
<set_value name="HUB Plot" exact="1"/>
<set_value name="HQ Plot" exact="1"/>
</do_when>
Code: Select all
<do_when value="{player.gamestart}" exact="125" comment="Apricot Mapping Service">
<reward_player>
<money min="18000" max="20000"/>
<notoriety>
<relation race="argon" operation="set" exact="max"/>
<relation race="boron" operation="set" exact="max"/>
<relation race="paranid" operation="set" exact="max"/>
<relation race="split" operation="set" exact="max"/>
<relation race="teladi" operation="set" exact="max"/>
<relation race="goner" operation="set" exact="max"/>
<relation race="pirate" operation="set" exact="enemy"/>
<relation race="khaak" operation="set" exact="min" mutual="1"/>
<relation race="xenon" operation="set" exact="min" mutual="1"/>
<relation race="atf" operation="set" exact="friend"/>
<relation race="terran" operation="set" exact="friend" mutual="1"/>
<relation race="yaki" operation="set" exact="foe" mutual="1"/>
</notoriety>
<equipment>
<ware typename="SS_SHIELD_F" exact="10"/>
<ware typename="SS_LASER_APRICOT1" exact="11"/>
<ware typename="SS_LASER_APRICOT2" exact="11"/>
<ware typename="SS_LASER_REPAIR" exact="1"/>
<ware typename="SS_LASER_TUG" exact="1"/>
<ware typename="SS_LASER_MINING" exact="1"/>
<ware typename="SS_WARE_BOOST" exact="1"/>
<ware typename="SS_WARE_SCANNER2" exact="1" comment="Duplex Scanner"/>
<ware typename="SS_WARE_SCANNER3" exact="1"/>
<ware typename="SS_WARE_TECH213" exact="85" comment="Engine Tunings"/>
<ware typename="SS_WARE_TECH231" exact="1" comment="SETA"/>
<ware typename="SS_WARE_TECH242" exact="1" comment="Video Enhancement Goggles"/>
<ware typename="SS_WARE_TECH246" exact="35" comment="Rudder Optomisation"/>
<ware typename="SS_WARE_TECH251" exact="0" comment="Cargo Bay Extension"/>
<ware typename="SS_WARE_TECH209" exact="20" comment="Salvage Insurance"/>
<ware typename="SS_WARE_TECH226" exact="1"/>
<ware typename="SS_WARE_TECH216" exact="1"/>
<ware typename="SS_WARE_TECH221" exact="1"/>
<ware typename="SS_WARE_TECH241" exact="1"/>
<ware typename="SS_WARE_TECH275" exact="1"/>
<ware typename="SS_WARE_TECH276" exact="1"/>
<ware typename="SS_WARE_TECH277" exact="1"/>
<ware typename="SS_WARE_L_A" exact="1"/>
<ware typename="SS_WARE_L_P" exact="1"/>
<ware typename="SS_WARE_L_T" exact="1"/>
<ware typename="SS_WARE_L_B" exact="1"/>
<ware typename="SS_WARE_L_S" exact="1"/>
<ware typename="SS_WARE_BEAMING" exact="1"/>
<ware typename="SS_WARE_BESTBUY" exact="1"/>
<ware typename="SS_WARE_BESTSELL" exact="1"/>
<ware typename="SS_WARE_BIOSCANNER" exact="1"/>
<ware typename="SS_WARE_CARGOSHIELD" exact="1"/>
<ware typename="SS_WARE_FIREWALL" exact="1"/>
<ware typename="SS_WARE_HULLPOLARIZE" exact="1"/>
<ware typename="SS_WARE_LIFESUPPORT" exact="1"/>
<ware typename="SS_WARE_ORECOLLECTOR" exact="1"/>
<ware typename="SS_WARE_SENTRY" exact="1"/>
<ware typename="SS_WARE_SW_CARRIER" exact="1"/>
<ware typename="SS_WARE_SW_EXPLORER" exact="1"/>
<ware typename="SS_WARE_SW_FIGHT_1" exact="1"/>
<ware typename="SS_WARE_SW_FIGHT_2" exact="1"/>
<ware typename="SS_WARE_SW_NAV_1" exact="1"/>
<ware typename="SS_WARE_SW_NEW13" exact="1"/>
<ware typename="SS_WARE_SW_NEW17" exact="1"/>
<ware typename="SS_WARE_SW_NEW2" exact="1"/>
<ware typename="SS_WARE_SW_PATROL_1" exact="1"/>
<ware typename="SS_WARE_SW_SPECIAL_1" exact="1"/>
<ware typename="SS_WARE_SW_SUPPLY_1" exact="1"/>
<ware typename="SS_WARE_SW_TRADE_1" exact="1"/>
<ware typename="SS_WARE_SW_TRADE_2" exact="1"/>
<ware typename="SS_WARE_UNFOCUS_JUMP" exact="1"/>
<ware typename="SS_WARE_WARPING" exact="1"/>
</equipment>
<cargo>
<ware typename="SS_WARE_ENERGY" exact="3000"/>
<ware typename="SS_WARE_DUMMY23" exact="1"/>
<ware typename="SS_WARE_DUMMY26" exact="1"/>
<ware typename="SS_WARE_DUMMY30" exact="1"/>
</cargo>
<map>
<sector x="0" y="0"/>
<sector x="0" y="1"/>
<sector x="0" y="2"/>
<sector x="0" y="3"/>
<sector x="0" y="4"/>
<sector x="0" y="5"/>
<sector x="0" y="6"/>
</map>
</reward_player>
<create_ship race="player" typename="APRICOT_CAMEL">
<equipment>
<ware typename="SS_SHIELD_F" exact="10"/>
<ware typename="SS_LASER_APRICOT1" exact="11"/>
<ware typename="SS_LASER_APRICOT2" exact="11"/>
<ware typename="SS_LASER_REPAIR" exact="1"/>
<ware typename="SS_LASER_TUG" exact="1"/>
<ware typename="SS_LASER_MINING" exact="1"/>
<ware typename="SS_WARE_BOOST" exact="1"/>
<ware typename="SS_WARE_SCANNER2" exact="1" comment="Duplex Scanner"/>
<ware typename="SS_WARE_SCANNER3" exact="1"/>
<ware typename="SS_WARE_TECH213" exact="113" comment="Engine Tunings"/>
<ware typename="SS_WARE_TECH231" exact="1" comment="SETA"/>
<ware typename="SS_WARE_TECH242" exact="1" comment="Video Enhancement Goggles"/>
<ware typename="SS_WARE_TECH246" exact="35" comment="Rudder Optomisation"/>
<ware typename="SS_WARE_TECH226" exact="1"/>
<ware typename="SS_WARE_TECH216" exact="1"/>
<ware typename="SS_WARE_TECH221" exact="1"/>
<ware typename="SS_WARE_TECH241" exact="1"/>
<ware typename="SS_WARE_TECH275" exact="1"/>
<ware typename="SS_WARE_TECH276" exact="1"/>
<ware typename="SS_WARE_TECH277" exact="1"/>
<ware typename="SS_WARE_L_A" exact="1"/>
<ware typename="SS_WARE_L_P" exact="1"/>
<ware typename="SS_WARE_L_T" exact="1"/>
<ware typename="SS_WARE_L_B" exact="1"/>
<ware typename="SS_WARE_L_S" exact="1"/>
<ware typename="SS_WARE_BEAMING" exact="1"/>
<ware typename="SS_WARE_BESTBUY" exact="1"/>
<ware typename="SS_WARE_BESTSELL" exact="1"/>
<ware typename="SS_WARE_BIOSCANNER" exact="1"/>
<ware typename="SS_WARE_CARGOSHIELD" exact="1"/>
<ware typename="SS_WARE_FIREWALL" exact="1"/>
<ware typename="SS_WARE_HULLPOLARIZE" exact="1"/>
<ware typename="SS_WARE_LIFESUPPORT" exact="1"/>
<ware typename="SS_WARE_ORECOLLECTOR" exact="1"/>
<ware typename="SS_WARE_SENTRY" exact="1"/>
<ware typename="SS_WARE_SW_CARRIER" exact="1"/>
<ware typename="SS_WARE_SW_EXPLORER" exact="1"/>
<ware typename="SS_WARE_SW_FIGHT_1" exact="1"/>
<ware typename="SS_WARE_SW_FIGHT_2" exact="1"/>
<ware typename="SS_WARE_SW_NAV_1" exact="1"/>
<ware typename="SS_WARE_SW_NEW13" exact="1"/>
<ware typename="SS_WARE_SW_NEW17" exact="1"/>
<ware typename="SS_WARE_SW_NEW2" exact="1"/>
<ware typename="SS_WARE_SW_PATROL_1" exact="1"/>
<ware typename="SS_WARE_SW_SPECIAL_1" exact="1"/>
<ware typename="SS_WARE_SW_SUPPLY_1" exact="1"/>
<ware typename="SS_WARE_SW_TRADE_1" exact="1"/>
<ware typename="SS_WARE_SW_TRADE_2" exact="1"/>
<ware typename="SS_WARE_UNFOCUS_JUMP" exact="1"/>
<ware typename="SS_WARE_WARPING" exact="1"/>
</equipment>
<cargo>
<ware typename="SS_WARE_ENERGY" exact="3000"/>
<ware typename="SS_WARE_DUMMY23" exact="1"/>
<ware typename="SS_WARE_DUMMY26" exact="1"/>
<ware typename="SS_WARE_DUMMY30" exact="1"/>
</cargo>
</create_ship>
</reward_player>
<set_value name="ATF Notoriety" exact="{lookup.notoriety@notop1}"/>
<set_value name="Terran Link Plot" exact="1"/>
<set_value name="HUB Plot" exact="1"/>
<set_value name="HQ Plot" exact="1"/>
</do_when>
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
<documentation>
<author name="Stu Austin" alias="Stu Austin" contact="http://www.egosoft.com" />
<content reference="Factory" name="Factory" description="Simple 'factory' template" />
<version number="1.0" date="3-24-2008" status="development" />
</documentation>
<cues>
<cue name="create_wheat1">
<condition>
<check_all>
<check_value value="{player.gamestart}" exact="107" comment="The exact equals to gamestart number."/>
<check_age value="{player.age}" min="60s" />
</check_all>
</condition>
<action>
<do_all>
<load_text fileid="7005"/>
<find_sector x="1" y="3" name="argonprime" comment="Finds Argon Prime and assigns a name which can be used later" />
<create_station name="this.Wheatfarm" typename="SS_FAC_R214_1" class="factory" textid="5900">
<position x="10km" y="10km" z="10km" comment="position of the factory in the spawned sector"/>
<sector sector="argonprime"/>
</create_station>
<set_owner object="this.Wheatfarm" race="argon"/>
<add_equipment object="this.Wheatfarm">
<ware typename="SS_SHIELD_E" exact="15" comment="15x1mj shield"/>
</add_equipment>
<set_shield object="this.Wheatfarm" exact="90"/>
<add_resources object="this.Wheatfarm">
<ware exact="25000" typename="SS_WARE_ENERGY"/>
</add_resources>
<complete_cue cue="create_wheat1"/>
</do_all>
</action>
</cue>
</cues>
</director>
Additional comments - July 2009.
WARNING : If you make the start.xml file too big, it may not execute on lower end or memory limited computers. I particularly found this when also adding a lot of stations and ships to the game using multiple setup.... scripts. Its like the computer makes a list of things to do, and start.xml and your setup scripts are well down the list, and if the computer runs out of resources, the start.xml just doesnt get done.
To get around this, if your start.xml is going to be large, then only have a single setup script, that checks for a global variable on starting the first time, and because it doesnt exist yet, it does nothing except turn the global variable on. After the first load of a save game, the setup finds the global variable exists, so calls your scripts for what you want created in the game. It then sets the global variable to something that says its completed, and all other times the game is started, it should find the task complete and so not run anything else. I recommend you include hotkey creation at the same time.
When adding a new gamestart, consult the list in the sticky thread of modding documentation for already used start numbers. Then submit your gamestart number to be added to that list.
Please do not duplicate other peoples gamestart numbers or egosofts, as at some time in the future, it may be feasable to make a false patch that includes all of them.
Updates for AP :
There are several significant changes to starts in AP.
Within start.xml, the section I call Part 1, has been removed. The plots information is now embedded at the top of each start, in the Part 2 area.
gamestarts.xml has moved location. It is now in the types folder.