New start documentation?

The place to discuss scripting and game modifications for X4: Foundations.

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

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

New start documentation?

Post by apricotslice »

I'm looking at building my own start.

Is there a list of objects in the game which get used in gamestart files?

Specifically MD ship names and ship fitting names?
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13489
Joined: Sun, 15. Feb 04, 20:12
x4

Re: New start documentation?

Post by euclid »

Hey apricotslice :-)

All game starts are definded in Setup_Gamestarts.xml located in the md folder. I suggest you check that out to get an idea what is used. I'm not aware of any special objects for game starts.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: New start documentation?

Post by apricotslice »

By objects I mean ships and equipment names used in the start md, and anything needed to describe them.

ie. really hard to change a ship in a start, without knowing what other ship names there are.
ghreab
Posts: 96
Joined: Wed, 28. May 14, 21:03
x4

Re: New start documentation?

Post by ghreab »

Look at euclid's "Getting Started" thread pinned toward the top if you have not already.

The .cat files can be unpacked in order to see assets used in the game.

Best guide is going to be looking at an existing modified game start such as the Aspiring Freelancer.
j.harshaw
EGOSOFT
EGOSOFT
Posts: 2205
Joined: Mon, 23. Nov 15, 18:02

Re: New start documentation?

Post by j.harshaw »

apricotslice wrote: Wed, 19. Jun 19, 18:46 By objects I mean ships and equipment names used in the start md, and anything needed to describe them.
Think what you're looking for are shipgroups.xml and ships.xml, both in the libraries directory. We usually create a ship by:

Code: Select all

        <create_ship name="$Frigate" zone="player.zone">
          <select faction="faction.argon" tags="tag.frigate"/>
          <owner exact="faction.player" overridenpc="true"/>
          <loadout>
            <level exact="1.0"/>
          </loadout>
          <pilot>
            <select faction="faction.argon" tags="tag.aipilot"/>
          </pilot>
          <people>
            <fillpercent exact="100"/>
            <person role="marine" weight="100">
              <select race="[race.argon, race.paranid, race.teladi]" tags="tag.marine"/>
            </person>
          </people>
          <drop ref="ship_small_military"/>
          <safepos object="player.ship" max="3km"/>
          <rotation value="player.ship.rotation"/>
        </create_ship>
where

<select faction="faction.argon" tags="tag.frigate"/>

looks for a ship with tag "frigate" for faction Argon. This matches with this entry in ships.xml

Code: Select all

  <ship id="argon_frigate_m" group="arg_frigate_m">
    <category tags="[military, medium, frigate, mission]" faction="[argon, scaleplate, hatikvah, alliance]" size="ship_m"/>
    <pilot>
      <select faction="argon" tags="fighterpilot"/>
    </pilot>
    <drop ref="ship_small_military"/>
    <people ref="argon_military_crew"/>
  </ship>
which points to this entry in shipgroups.xml

Code: Select all

  <group name="arg_frigate_m">
    <select macro="ship_arg_m_frigate_01_a_macro"/>
  </group>
In this way, you could define groups of ships to select from when you want to create a ship.

If you want to specify a particular ship, use the macro. A list of those can be found in index\macros.xml

Or were you after something else entirely?

Big fan of your X3 work, by the way.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Re: New start documentation?

Post by apricotslice »

Thanks.

Its amazing how much I've forgotten, and what I've missed.

The macros folder is something to look in for sure.

Is there any list somewhere which converts frigate into an actual ship type? I see ship names in the game and on the starts, but generic names in the start file. Makes it hard to know if you're specifying the right ship.
j.harshaw
EGOSOFT
EGOSOFT
Posts: 2205
Joined: Mon, 23. Nov 15, 18:02

Re: New start documentation?

Post by j.harshaw »

"frigate" in this case is just a tag. the call from MD looks for an entry in ships.xml with a matching tag. the entry in ships.xml then corresponds to an entry in shipgroups.xml which may contain any number of ship macros, although in this particular case, the shipgroups entry happens to contain only one macro.

EDIT: sorry, that was unclear in the context of what you were asking. ships.xml and shipgroups.xml are the lookup tables for converting tags to ship macros.

Return to “X4: Foundations - Scripts and Modding”