X3:TC Sector names and x3_universe.xml

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

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

Post Reply
Le Roo
Posts: 14
Joined: Mon, 29. Dec 08, 21:35

X3:TC Sector names and x3_universe.xml

Post by Le Roo » Mon, 4. Feb 13, 13:18

Hi I have a question (possibly a stupid one) regarding the x3_universe.xml file. How to I find out what the sector name is for each object id in this file?

I have read Chealec's document on the x3_universe.xml file and this is really good, so I know each sector has an id in this file. I have also found the t file 0001-L044.xml which lists all the sector names, but I can't find a connection between the two files. Is there an easy way of finding which sector name belongs to each id listed in the universe file?

Sorry if this turns out to be a really simple answer :oops:

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Mon, 4. Feb 13, 13:25

the name id is a concatenation of three parts.

Prefix: 102
X Pos: 01 (Example)
Y Pos: 01 (Example)

which would make (102)(01)(01) (1020101) (Kingdom End in Stock)
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

Le Roo
Posts: 14
Joined: Mon, 29. Dec 08, 21:35

Post by Le Roo » Mon, 4. Feb 13, 13:38

Thanks Jack08 for the quick answer. Although, this does prompt me to ask two more questions :)

Is the prefix used to denote anything (race)?

Is the sector id in the x3_universe.xml actually used BY anything else or is it just a unique identifier in the file?

Thanks again...

akari no ryu
Posts: 143
Joined: Sun, 11. Oct 09, 14:32
x4

Post by akari no ryu » Mon, 4. Feb 13, 14:31

Le Roo wrote:Thanks Jack08 for the quick answer. Although, this does prompt me to ask two more questions :)

Is the prefix used to denote anything (race)?

Is the sector id in the x3_universe.xml actually used BY anything else or is it just a unique identifier in the file?

Thanks again...
The 102 matches a t node in the language xml which contains the name of the sector

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Mon, 4. Feb 13, 14:44

Le Roo wrote:Thanks Jack08 for the quick answer. Although, this does prompt me to ask two more questions :)

Is the prefix used to denote anything (race)?

Is the sector id in the x3_universe.xml actually used BY anything else or is it just a unique identifier in the file?

Thanks again...
102 is simply a prefix, something to differentiate them from everything else - and because "0101" is not a valid text ID, as it would be 101.

Im not sure what you mean by sector id? there is no ID part in the definition for a sector in the universe xml, unless i missed something. all my sectors are

Code: Select all

<o f="1" t="1" x="1" y="5" r="2" size="31904500" m="0" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 11740
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar » Mon, 4. Feb 13, 17:06

Sector ID is the 1020101 as explained by Jack08, this ID is used in both the map files (even though its not visible in the xml) as also in MD in case you ever want to alter sectors in that.

Mind also that in the files coordinates start at 1 rather than 0 as ingame, so Kingdom end is 0/0 ingame but the respective coordinate in the map files (and bod) is 01/01.

Also the 102 prefix refers to the sector name string ID where the 103 to the sector description, they go in pairs, so changing a sector ID will change the sector description ID too.

MFG

Ketraar
Image

Le Roo
Posts: 14
Joined: Mon, 29. Dec 08, 21:35

Post by Le Roo » Mon, 4. Feb 13, 17:30

@Jack08

Hmmm, that seems strange here are the first four 'o' elements of my x3_universe.xml:

Code: Select all

	<o id="26" f="4" t="1" x="0" y="0" r="2" size="14000000" m="8101" p="1247631758" qtrade="100" qfight="100" qbuild="100" qthink="100">
	<o id="46" f="4" t="1" x="1" y="0" r="2" size="12500000" m="0" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
	<o id="66" f="4" t="1" x="2" y="0" r="2" size="22500000" m="0" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
	<o id="86" f="4" t="1" x="3" y="0" r="2" size="25000000" m="0" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
As you can see they have an id attribute, so I'm not sure why my file seems to be different. Also, I think the sector entry you posted was Ceo's Buckzoid? My entry in the universe file looks like this:

Code: Select all

	<o id="51" t="1" x="1" y="5" r="1" size="15000000" m="8213" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
so the size and m attributes also look a little different. Maybe I'm looking at the wrong thing - what do you think?


@Ketraar & akari no ryu

Yes, thank you I see now what you mean further down the 0001L044.xml file I see the sector descriptions e.g. for Argon Prime sector name entry is:

Code: Select all

	<t id="1020402">Argon Prime</t>
Sector description is:

Code: Select all

	<t id="1030402">Bathed in the sacred light of the sun 'Sonra'...</t>

User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 11740
Joined: Fri, 21. May 04, 17:15
x4

Post by Ketraar » Mon, 4. Feb 13, 17:46

Le Roo wrote:

Code: Select all

<o id="26" f="4" t="1" x="0" y="0" r="2" size="14000000" m="8101" p="1247631758" qtrade="100" qfight="100" qbuild="100" qthink="100">
	<o id="86" f="4" t="1" x="3" y="0" r="2" size="25000000" m="0" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
This is quite odd as I dont have any of that in my x3_universe.xml. Here how it looks like if I open if using VWD or any text editor

Code: Select all

<o f="4" t="1" x="0" y="0" r="2" size="14000000" m="8101" p="1247631758" qtrade="100" qfight="100" qbuild="100" qthink="100">
Mine is from X3:AP and it looks the same for TC, I wonder where your map file is from, as I dont know if its the same for Reunion.

MFG

Ketraar
Image

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Mon, 4. Feb 13, 17:57

so the size and m attributes also look a little different. Maybe I'm looking at the wrong thing - what do you think?
Don't pay any attention to the size or other values i posted in mine as my universe file totally unique in content. However i have no idea why your sectors have an ID tag. As Ketraar asked, where did you get the file from?
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

Le Roo
Posts: 14
Joined: Mon, 29. Dec 08, 21:35

Post by Le Roo » Mon, 4. Feb 13, 17:59

Yes, very strange - mine is from X3TC - via STEAM. It looks like only the id element is different (additional) to your entry. I have no mods installed. So, maybe someone somewhere knows the answer :)

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Mon, 4. Feb 13, 18:05

Huh, i just pulled up cat 13 from TC and i see the same thing

Code: Select all

<o id="26" f="4" t="1" x="0" y="0" r="2" size="14000000" m="8101" p="1247631758" qtrade="100" qfight="100" qbuild="100" qthink="100">
Odd... I have absolutely no clue what ID is supposed to do, but apparently it doesn't actually need it?
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

User avatar
jack775544
Posts: 1277
Joined: Tue, 13. Dec 11, 08:27
x4

Post by jack775544 » Mon, 4. Feb 13, 22:19

According to this the id tag is just a unique identifier and from what I can tell it isn't required as it is not present in x3debris.
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.

Post Reply

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