[Docn] Director Start.xml

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
apricotslice
Posts: 13630
Joined: Sun, 16. May 04, 13:01

Post by apricotslice » Wed, 24. Dec 08, 00:55

Renewing 2 questions :

Code example for a ship within a ship.

Code example for adding a station to a sector, with products and upgrades.

(EG if adding an EQ, then how do you add the upgrades and have them work, since when you script in an EQ, it doesnt function properly. Question : Can this be done now ?)

User avatar
Seathal
Posts: 843
Joined: Thu, 5. Jun 08, 23:03

[XML Code - Doubts] L\true\gamestarts.xml and director\start.xml

Post by Seathal » Mon, 5. Jan 09, 01:12

I'd like to create a custom start (not the default one) but somehting like the others (USC Commander, Terran Defender, Argon Patriot, Tormented Teladi...) but with my own design and conditions. Can this be made? Where are the "startup options" files located, if such exist? How can they be modified?

Thanks!
Last edited by Seathal on Mon, 5. Jan 09, 04:22, edited 2 times in total.

User avatar
Seathal
Posts: 843
Joined: Thu, 5. Jun 08, 23:03

Post by Seathal » Mon, 5. Jan 09, 02:52

Concerning this topic. I'm trying to custom my own game start but I can't, by no means open the 03 file (there are two of them; .DAT and the other appears as "Security catalog") I can see its contents with X3TC Editor but cannot manipulate or change their names or anything (I also see that the start.xml is not start.pck).

Can somebody please tell me how one can modify those files?

Thanks.

User avatar
apricotslice
Posts: 13630
Joined: Sun, 16. May 04, 13:01

Post by apricotslice » Mon, 5. Jan 09, 03:08

You also need the modmanager program, to extract everything from the cat/dat.

User avatar
Observe
Posts: 2628
Joined: Fri, 30. Dec 05, 18:47

Post by Observe » Mon, 5. Jan 09, 03:23

Fortunately in TC you have full control over game starts. You will want to look at two files in particular:

L\true\gamestarts.xml
director\start.xml

By examining those two files, you will see what you need to do. :wink:

User avatar
Seathal
Posts: 843
Joined: Thu, 5. Jun 08, 23:03

Post by Seathal » Mon, 5. Jan 09, 04:02

Hmm many thanks.

I have a small problem, I want to add a new start (ATF Officer):

I added this to starts:

Code: Select all

      
</documentation>
      <action>
        <do_choose>
          <do_when value="{player.age}" min="20">
            <do_choose>
              <do_when value="{player.gamestart}" exact="101" comment="Terran Defender">
                <set_value name="Terran Plot" exact="1"/>
                <set_value name="HUB Plot" exact="1"/>
                <set_value name="HQ Plot" exact="1"/>
              </do_when>

              <do_when value="{player.gamestart}" exact="102" comment="USC Commander">
                <set_value name="Terran Plot" exact="1"/>
                <set_value name="HUB Plot" exact="1"/>
                <set_value name="HQ Plot" exact="1"/>
              </do_when>
              
              <do_when value="{player.gamestart}" exact="103" comment="ATF Officer">
                <set_value name="Terran Plot" exact="1"/>
                <set_value name="HUB Plot" exact="1"/>
                <set_value name="HQ Plot" exact="1"/>
              </do_when>

              <do_when value="{player.gamestart}" exact="104" comment="Argon Patriot">
                <set_value name="Ter.......

(...)

.......lue name="Terran Plot" exact="1"/>
                <set_value name="HUB Plot" exact="1"/>
                <set_value name="HQ Plot" exact="1"/>
              </do_when>

              <do_when value="{player.gamestart}" exact="103" comment="ATF Officer">
                <reward_player>
                  <money exact="1000"/>
                  <notoriety>
                    <relation race="argon" operation="set" exact="neutral-8"/>
                    <relation race="boron" operation="set" exact="neutral-11"/>
                    <relation race="paranid" operation="set" exact="foe-2"/>
                    <relation race="split" operation="set" exact="foe-5"/>
                    <relation race="teladi" operation="set" exact="neutral-5"/>
                    <relation race="goner" operation="set" exact="neutral+5"/>
                    <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="{lookup.notoriety@notop2}"/>
                    <relation race="terran" operation="set" exact="neutral" mutual="1"/>
                    <relation race="yaki" operation="set" exact="enemy" mutual="1"/>
                  </notoriety>
                  <equipment>
                    <ware typename="SS_SHIELD_A" exact="5"/>
                    <ware typename="SS_LASER_EMP" exact="2"/>
                    <ware typename="SS_WARE_BOOST" exact="1"/>
                    <ware typename="SS_WARE_SCANNER2" exact="1"/>
                    <ware typename="SS_MISSILE_POLTERGEIST" exact="3"/>
                    <ware typename="SS_WARE_TECH213" exact="({player.ship.equipment.SS_WARE_TECH213.maxcount}/5)*4" 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="{player.ship.equipment.SS_WARE_TECH246.maxcount}/4+1" comment="Rudder Optomisation"/>
                    <ware typename="SS_WARE_TECH251" exact="{player.ship.equipment.SS_WARE_TECH251.maxcount}/3+1" comment="Cargo Bay Extension"/>
                  </equipment>
                </reward_player>
                <set_value name="ATF Notoriety" exact="{lookup.notoriety@notop2}"/>
                <set_value name="Terran Plot" exact="1"/>
                <set_value name="HUB Plot" exact="1"/>
                <set_value name="HQ Plot" exact="1"/>
              </do_when>

              <do_when value="{player.gamestart}" exact="104" comment="Argon Patriot">
                <reward_player>
                  <money min="1800" max="2000"/>
                  <notoriety> (........................)
And this to gamestarts:

Code: Select all

  <!-- Terran Defender -->
  <gamestart id="101" name="{1900,2001}" description="{1900,2101}" difficulty="{1900,2201}" image="start08" plot="1">
    <player name="{1900,2301}" species="{1900,2401}" gender="{1900,2501}" age="{1900,2601}"/>
    <!-- Uranus -->
    <sector x="10" y="1"/>
    <ship typename="SS_SH_USC_M4"/>
  </gamestart>
  <!-- USC Commander -->
  <gamestart id="102" name="{1900,2002}" description="{1900,2102}" difficulty="{1900,2202}" image="start01" plot="1" requirements="6">
    <player name="{1900,2302}" species="{1900,2402}" gender="{1900,2502}" age="{1900,2602}"/>
    <!-- Uranus -->
    <sector x="10" y="1"/>
    <ship typename="SS_SH_USC_M3"/>
  </gamestart>
    <!-- ATF Officer -->
  <gamestart id="103" name="{1900,2002}" description="{1900,2102}" difficulty="{1900,2202}" image="start01" plot="1">
    <player name="{1900,2302}" species="{1900,2402}" gender="{1900,2502}" age="{1900,2602}"/>
    <!-- Uranus -->
    <sector x="10" y="1"/>
    <ship typename="SS_SH_TR_M5"/>
  </gamestart>

  <!-- SPARE SLOT FOR ALTERNATIVE TERRAN START -->


  <!-- STANDARD AVAILABLE STARTS -->
I "Added" them int he correct places with the correct names (renamed the originals) with X3 ModManager. But nothing happens, at least no visible change when I get the "New Game" menu in X3TC.

Anybody knows what can be failing?

User avatar
Seathal
Posts: 843
Joined: Thu, 5. Jun 08, 23:03

Post by Seathal » Mon, 5. Jan 09, 04:23

apricotslice wrote:You also need the modmanager program, to extract everything from the cat/dat.
Oh well that was silly. THanks!

jlehtone
Posts: 17092
Joined: Sat, 23. Apr 05, 21:42

Post by jlehtone » Mon, 5. Jan 09, 15:04

Seathal wrote:I have a small problem, I want to add a new start (ATF Officer) ...
1. I'd say it will be more beneficial in the long run if we can gather solutions to "starts modding" related problems in one thread. Hence the merge.


2. Not being familiar with the topic, I can only ask a trivial question:
Does modification of existing start work for you?
* If modding a start fails too, that could relate to whether game sees the right files. Perhaps.

IIRC, UniTrader added a start which was defined in separate file, rather than in 'start.xml', and enenra knew a list of files in Director folder that needs to be updated for the game to see the new file. But that is different from appending to the existing 'start.xml'.

And another silly question:
Some starts require the Registry to have a flag set. You have all bits on, have you? Or sure that the added start has same 'unlock' requirements as the (unlocked) template?

User avatar
Seathal
Posts: 843
Joined: Thu, 5. Jun 08, 23:03

Post by Seathal » Mon, 5. Jan 09, 18:12

jlehtone wrote:
Seathal wrote:I have a small problem, I want to add a new start (ATF Officer) ...
1. I'd say it will be more beneficial in the long run if we can gather solutions to "starts modding" related problems in one thread. Hence the merge.


2. Not being familiar with the topic, I can only ask a trivial question:
Does modification of existing start work for you?
* If modding a start fails too, that could relate to whether game sees the right files. Perhaps.

IIRC, UniTrader added a start which was defined in separate file, rather than in 'start.xml', and enenra knew a list of files in Director folder that needs to be updated for the game to see the new file. But that is different from appending to the existing 'start.xml'.

And another silly question:
Some starts require the Registry to have a flag set. You have all bits on, have you? Or sure that the added start has same 'unlock' requirements as the (unlocked) template?
- Gonna try modifying an existing gamestart, but I'd like to eventually make it independent withotu modifying anything else [EDIT] It doens't seem to work at all. Could the error be that I have to change something else besides those two files to load the changes up to the game?

- Yes, the requirments are none. Like Terran Defender.

User avatar
Seathal
Posts: 843
Joined: Thu, 5. Jun 08, 23:03

Post by Seathal » Mon, 5. Jan 09, 18:56

Okay. I checked the Text Resource Editor and foudn the text files that define the menu game starts, so I added mine. File is 3519 for 0001-L044.pck

I added an file with the ID 2003 as "ATF Agent" and a 2103 with the description, set those two numbers in gamestarts and start

Still. It doens't appear in the X3TC menu...
Any help?

User avatar
apricotslice
Posts: 13630
Joined: Sun, 16. May 04, 13:01

Post by apricotslice » Tue, 6. Jan 09, 02:01

Now that seems to be a problem, since modder language files are not loaded until the game actually starts.

Meaning that you would have to modify 0001 for the descriptions to appear in the new start area. And thats a nono.

I havent tried this yet, its on my list of things to do, so cant offer anything at this point.

User avatar
Observe
Posts: 2628
Joined: Fri, 30. Dec 05, 18:47

Post by Observe » Tue, 6. Jan 09, 03:40

FYI: Here is the gamestart we've been using for Transcend mod:

Click for full size
Image

I only show here as demonstration that simple modification of the two files involved work fine. You'll also notice use of a custom image for the character in this gamestart.

Although rather busy with the mod atm, I will do my best to keep an eye on this thread periodically in case I may be of help in your efforts.

User avatar
Seathal
Posts: 843
Joined: Thu, 5. Jun 08, 23:03

Post by Seathal » Tue, 6. Jan 09, 21:01

*looks at the image* ooooh I wanna. I jsut don't get what's failing. I think it's that the game doens't recognize the changes on the files.... I don't know.

User avatar
Seathal
Posts: 843
Joined: Thu, 5. Jun 08, 23:03

Post by Seathal » Sat, 10. Jan 09, 00:55

Has anyone solved this? I still can't get it to show in the game. Observe; what did you do esactly? Just mod those two files? Is that it? If so I don't really know what am I missing.

User avatar
apricotslice
Posts: 13630
Joined: Sun, 16. May 04, 13:01

Post by apricotslice » Sat, 10. Jan 09, 01:10

Send me the files you changed and I'll have a look.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”