x2_universe.xml question

The place to discuss scripting and game modifications for X²: The Threat.

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

Post Reply
Cursed Ghost
Posts: 637
Joined: Sat, 2. Oct 04, 22:44
x3tc

x2_universe.xml question

Post by Cursed Ghost » Sat, 10. Jun 23, 02:02

Hi all

Quick question when you are looking at the x2_universe.xml and you look at a sector that has say 2 power plants how do you tell which is alpha and which is beta?

The X2 editor doesn’t really help here since it doesn’t seem to show which is which about the only way I have found to tell is the slow and tedious way that is to open up the game find the relevant sector find the stations in the sector in this case power plants and then make a note of there positions then go back to the editor find the sector from the list open that up then find the stations select one of them then tap the sector button and then see which station is highlighted

Surly there must be a better way to tell which station is which for example

Code: Select all

Kingdom End X2

var icons =
{
  //stations
  shipyard:                       {x: 0, y: 0, z: 0},
  dry_dock:                       {x: 0, y: 0, z: 0},
  equipment_dock:                 {x: 0, y: 0, z: 0},
  trading_station:                {x: 0, y: 0, z: 0},
  solar_power_plant_alpha:        {x: 0, y: 0, z: 0},
  plankton_farm_alpha:            {x: 0, y: 0, z: 0},
  stott_mixery_alpha:             {x: 0, y: 0, z: 0},
  bio_gas_factory_alpha:          {x: 0, y: 0, z: 0},
  bio_gas_factory_beta:           {x: 0, y: 0, z: 0},
  bofu_chemical_lab_alpha:        {x: 0, y: 0, z: 0},
  bofu_chemical_lab_beta:         {x: 0, y: 0, z: 0},
  bofu_chemical_lab_gamma:        {x: 0, y: 0, z: 0},
  ore_mine_alpha:                 {x: 0, y: 0, z: 0},
  ore_mine_beta:                  {x: 0, y: 0, z: 0},
  silicon_mine_alpha:             {x: 0, y: 0, z: 0},
  crystal_fab_alpha:              {x: 0, y: 0, z: 0},
  weapon_component_factory_alpha: {x: 0, y: 0, z: 0},
  shield_production_facility_1mw: {x: 0, y: 0, z: 0},
  gamma_pac_laser_forge:          {x: 0, y: 0, z: 0},
  ion_disruptor_forge:            {x: 0, y: 0, z: 0},

  //asteroids
  asteroid1: {x: 4764480, y: -645120, z:   -45360, type: 'Ore', yield: 2},
  asteroid2: {x: 5103000, y: -482160, z: -2124360, type: 'Ore', yield: 7},
  asteroid3: {x: 2483880, y:  346920, z: -2745120, type: 'Ore', yield: 2},
  asteroid4: {x: 5938800, y:  831600, z: -5007240, type: 'Ore', yield: 1},

  //gates
  east_gate:  {x: 10080000, y: 0, z:         0},
  south_gate: {x:        0, y: 0, z: -10080000},
}; 
As you can see from the code above there are 2 ore mines 3 bofu chemical labs and 2 bio gas factories in Kingdom End in X2 so how do I tell which station is which so that I assign the correct coordinates to each ?

User avatar
Jimmyjamjohnson42
Posts: 55
Joined: Sun, 24. Mar 19, 08:57
x4

Re: x2_universe.xml question

Post by Jimmyjamjohnson42 » Mon, 12. Jun 23, 11:32

is it not the alpha and beta on the end of the stations?
I play X2 a lot, possibly too much.
800 hours and counting :P

User avatar
Zeron-mk7
Posts: 571
Joined: Sat, 23. Feb 08, 12:38
x3

Re: x2_universe.xml question

Post by Zeron-mk7 » Mon, 19. Jun 23, 16:23

Cursed Ghost wrote:
Sat, 10. Jun 23, 02:02
Quick question when you are looking at the x2_universe.xml and you look at a sector that has say 2 power plants how do you tell which is alpha and which is beta?
Into the galaxy map no such definition for the station names index - alpha, beta, ... I'm not sure, maybe that definition add into the game with script engine or game engine, with OBJ files.
Image

Cursed Ghost
Posts: 637
Joined: Sat, 2. Oct 04, 22:44
x3tc

Re: x2_universe.xml question

Post by Cursed Ghost » Wed, 21. Jun 23, 22:48

Into the galaxy map no such definition for the station names index - alpha, beta, ... I'm not sure, maybe that definition add into the game with script engine or game engine, with OBJ files.
I see so if a given sector has several of the same stations say power plants for example then how then does the game determine which is alpha, beta gamma etc there must be some mechanism that determines that, for example opening up the X Tention editor I find this in the t\44001.txt file
// unique ID's for the n'th factory of the same type in one sector this ID will be put immediately after the sector name.
100 "alpha"
101 "beta"
102 "gamma"
103 "delta"
104 "epsilon"
105 "zeta"
106 "eta"
107 "theta"
108 "iota"
109 "kappa"
110 "lambda"
111 "mu"
112 "nu"
113 "xi"
114 "omicron"
115 "pi"
116 "rho"
118 "sigma"
119 "tau"
120 "upsilon"
121 "phi"
122 "chi"
123 "psi"
124 "omega"
Now I’m assuming that the later games in the series use something similar to determine which station is going to have which designation.

So what I need to know is what am I looking for in the x2_universe.xml / x2 editor because the x2_universe.xml contains all the setting for the universe for every sector and every station in those sectors therefore it must also logically include a reference to the appropriate line in the appropriate file which will denote which station should have which designation.

Because when I open t\44001.xml and then do a search for id="2711" for example what its finds is

Code: Select all

<t id="2711">Shield Prod. Facility 1MW</t>
And that matches what I see when I open up the editor click on the Shield Prod. Facility 1MW in kingdom end and then click the third tab and then look at the id presented next to description, the problem is I can’t seem to find anything that references the alpha, beta, gamma etc designations that are displayed in game which is strange because each factory should have one and it should be in the x2_universe.xml file and it should also be displayed somewhere in the x2 editor

if not then how would you create multiple copies of the same type of station in a sector without creating a conflict if you are unable to set which station should have which designation within the editor or within the x2_universe.xml file ?

is the scripting just running a loop and iterating through the stations in a given sector and then just applying the alpha, beta gamma etc designations in sequence each time it loops because that is about the only reason I can think of that it wouldn't be in the x2_universe.xml file as expected.

User avatar
Zeron-mk7
Posts: 571
Joined: Sat, 23. Feb 08, 12:38
x3

Re: x2_universe.xml question

Post by Zeron-mk7 » Tue, 27. Jun 23, 14:40

I asked your question to one very knowledge X2 mod maker in Russian game form and get answer, that most probably that function are defined and worked into the OBJ files.
Image

Post Reply

Return to “X²: The Threat - Scripts and Modding”