X2_Universe.xml questions
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
X2_Universe.xml questions
I went sector creating today and came up with some questions....
I know that x and y are the galactic coordinates but the rest is a little fuzzy.
1) I'm assuming that the color entry is the light color given off by the light source...can anyone explain the number entry itself?
2) Is there an entry that links to a sector name?
3) All of these are in the first line of a sector entry and was wondering if anyone could explain what id, t, r, fc, ff, fn, and m are for.
4) On the second line right after the sector header (?) are 't' and 's'....anyone know what these would do?
I know that x and y are the galactic coordinates but the rest is a little fuzzy.
1) I'm assuming that the color entry is the light color given off by the light source...can anyone explain the number entry itself?
2) Is there an entry that links to a sector name?
3) All of these are in the first line of a sector entry and was wondering if anyone could explain what id, t, r, fc, ff, fn, and m are for.
4) On the second line right after the sector header (?) are 't' and 's'....anyone know what these would do?
Kryptyk,
I can answer some of your questions....
1) Dunno!
2) To look up the sector name add 1 to each of the x and y co-ords i.e. Kingdom end (0,0) becomes (1,1), make them two digits each (01,01)
and then format them as 102YX where Y and X are the x and y co-ordinates. i.e. Kingdom end becomes 1020101 (rolks drift 1020102 etc).
This can then be looked up in the xml file in the \t directory (440001.xml for english language) under page id 7.
3) id=??
fc, ff, fn, ????
r = race id
t = type of object - 1 = sector, 6 = factory 5= dock etc...
Also....
s = sub type of that object, the item within the appropriate text file (type directory).
e.g.
<o t="11" s="0" /> = Energy cells...
Why?
type 11 = TWareE.txt
subtype = 0 The first full entry in this file (entry 0) is energy cells.
4) I don't know what that first line in a sector is for however t and s are described above.
HTH
LS
I can answer some of your questions....
1) Dunno!
2) To look up the sector name add 1 to each of the x and y co-ords i.e. Kingdom end (0,0) becomes (1,1), make them two digits each (01,01)
and then format them as 102YX where Y and X are the x and y co-ordinates. i.e. Kingdom end becomes 1020101 (rolks drift 1020102 etc).
This can then be looked up in the xml file in the \t directory (440001.xml for english language) under page id 7.
3) id=??
fc, ff, fn, ????
r = race id
t = type of object - 1 = sector, 6 = factory 5= dock etc...
Also....
s = sub type of that object, the item within the appropriate text file (type directory).
e.g.
<o t="11" s="0" /> = Energy cells...
Why?
type 11 = TWareE.txt
subtype = 0 The first full entry in this file (entry 0) is energy cells.
4) I don't know what that first line in a sector is for however t and s are described above.
HTH
LS
WOOOOOHOOOOOOOOO......NAMING EXPLAINED!!!!!LordSuch wrote:Kryptyk,
I can answer some of your questions....
1) Dunno!
2) To look up the sector name add 1 to each of the x and y co-ords i.e. Kingdom end (0,0) becomes (1,1), make them two digits each (01,01)
and then format them as 102YX where Y and X are the x and y co-ordinates. i.e. Kingdom end becomes 1020101 (rolks drift 1020102 etc).
This can then be looked up in the xml file in the \t directory (440001.xml for english language) under page id 7.
3) id=??
fc, ff, fn, ????
r = race id
t = type of object - 1 = sector, 6 = factory 5= dock etc...
Also....
s = sub type of that object, the item within the appropriate text file (type directory).
e.g.
<o t="11" s="0" /> = Energy cells...
Why?
type 11 = TWareE.txt
subtype = 0 The first full entry in this file (entry 0) is energy cells.
4) I don't know what that first line in a sector is for however t and s are described above.
HTH
LS
You don't know how long that info was bothering me. Thank You!!!
I would PM you a beer but it might short out the server......
Yeah that is a pretty obscure link....I never would of thought of that.LordSuch wrote:I'm glad it helped.....
I have spent most of today researching exactly the same information....
Working out that the s="XX" number was the (zero based) line number into the T files took me ages......
As you've sent me a virtual beer, I'll refil my glass!
I know you couldn't answer the first question about the color number...but do you have any theories on how it works?
I don't know what the colour does, however by the looks of things it is an RGB quantity - convert the number to hex and you see a nice set of three bytes....
However it could be stored in reverse order or some such, I would recommend changing it to a pure colour and seeing what you get i.e. 0000FF - if things are blue then it is RGB, if they're red then maybe its stored as BGR...
LS
However it could be stored in reverse order or some such, I would recommend changing it to a pure colour and seeing what you get i.e. 0000FF - if things are blue then it is RGB, if they're red then maybe its stored as BGR...
LS
will try that...thanksLordSuch wrote:I don't know what the colour does, however by the looks of things it is an RGB quantity - convert the number to hex and you see a nice set of three bytes....
However it could be stored in reverse order or some such, I would recommend changing it to a pure colour and seeing what you get i.e. 0000FF - if things are blue then it is RGB, if they're red then maybe its stored as BGR...
LS
the RGB numbers are as follows... something of similar sorts. you'll see as you tinker with it.
The numbers range from 0 - 255.
0 black
..
50 lighter
..
150 brighter
..
255 white
play with the varying differences between the 3. it will combine the different colors, affecting in true colors.
per say..
R: 100
G: 0
B: 100
Would give off a slightly dark purplish color.
R: 185
G: 150
B: 100
Would give off a slightly yellow/orange type mixture.
Check out custom palette colors.. For instance, Paint in Windows under Accessories, you can select a "custom" color.. using that window, you can pick up different coloring variations, as if reads RGB values in hex numbers, 0 -255.
Hope this helps.
thecwby
The numbers range from 0 - 255.
0 black
..
50 lighter
..
150 brighter
..
255 white
play with the varying differences between the 3. it will combine the different colors, affecting in true colors.
per say..
R: 100
G: 0
B: 100
Would give off a slightly dark purplish color.
R: 185
G: 150
B: 100
Would give off a slightly yellow/orange type mixture.
Check out custom palette colors.. For instance, Paint in Windows under Accessories, you can select a "custom" color.. using that window, you can pick up different coloring variations, as if reads RGB values in hex numbers, 0 -255.
Hope this helps.
thecwby
@thecwby
Thanks for the info but the color number for the sector is a lot bigger than any combo of 255.....and that's where I'm stumped.
Example: Kingdom End color = 2313738 which gives everything in that sector the dark greenish color. I was thinking maybe it was R=23 G=137 B=38 but I don't think that would look right.
Thanks for the info but the color number for the sector is a lot bigger than any combo of 255.....and that's where I'm stumped.
Example: Kingdom End color = 2313738 which gives everything in that sector the dark greenish color. I was thinking maybe it was R=23 G=137 B=38 but I don't think that would look right.
- Storm_Front
- Posts: 1021
- Joined: Mon, 15. Dec 03, 05:27
A:r=80 g=165 b=85
Cut:1016
F:r=0 g=0 b=0 n=1km f=12km
Boron
If you look at the sector map in the Galaxy Editor you with see something like the above inthe lower left corner.
The first line is the color of the sun. This is editable in the sector map using r/R,g/G,f/F. This is also represented be the # after "color" on the xml. I don't understand the coding, but since it can be changed in the editor I don't really care.
The second line above is the background color. It can be edited in the editor using the v key. It's also on the second line in the xml. I believe only the last 2 or 3 digits show up.
The third line refers to sector fog. Queens Space is a good place to see this. r,g and b are the fog color edited with the h/H, j/J, and k/K keys from the sector map. n is the near fog distance f is the far fog distance.
These 3 things color of fog, near fog, and far fog are your fc, fn, and ff on the first line of the xml.
The forth line "Boron" refers to utterly stupid and senseless creatures with little use in the galaxy.
Cut:1016
F:r=0 g=0 b=0 n=1km f=12km
Boron
If you look at the sector map in the Galaxy Editor you with see something like the above inthe lower left corner.
The first line is the color of the sun. This is editable in the sector map using r/R,g/G,f/F. This is also represented be the # after "color" on the xml. I don't understand the coding, but since it can be changed in the editor I don't really care.
The second line above is the background color. It can be edited in the editor using the v key. It's also on the second line in the xml. I believe only the last 2 or 3 digits show up.
The third line refers to sector fog. Queens Space is a good place to see this. r,g and b are the fog color edited with the h/H, j/J, and k/K keys from the sector map. n is the near fog distance f is the far fog distance.
These 3 things color of fog, near fog, and far fog are your fc, fn, and ff on the first line of the xml.
The forth line "Boron" refers to utterly stupid and senseless creatures with little use in the galaxy.
@Storm_Front
I didn't know what the Cut number was in the sector map...that's good info
Well in the XML file I figured out the color number. This works for sun color and sector color.
All Blue = 255 (R=0 G=0 B=255)
All Green = 65280 (R=0 G=255 B=0)
All Red = 16711680 (R=255 G=0 B=0)
White = 16777215 (R=255 G=255 B=255)
I tried to find out how the game was getting the numbers so I did a little calculating and found that 255(all blue) + 65280(all green) + 16711680(all red) = 16777215(all white)
Apparently just using all green and no blue gives the blue value a 256 instead of zero which means 255(all green) * 256(no blue) = 65280
Now I can edit sector and sun color manually in the XML file without opening the editor.
Almost have all the entries in the x2_universe.xml file figured out.
I didn't know what the Cut number was in the sector map...that's good info
Well in the XML file I figured out the color number. This works for sun color and sector color.
All Blue = 255 (R=0 G=0 B=255)
All Green = 65280 (R=0 G=255 B=0)
All Red = 16711680 (R=255 G=0 B=0)
White = 16777215 (R=255 G=255 B=255)
I tried to find out how the game was getting the numbers so I did a little calculating and found that 255(all blue) + 65280(all green) + 16711680(all red) = 16777215(all white)
Apparently just using all green and no blue gives the blue value a 256 instead of zero which means 255(all green) * 256(no blue) = 65280
Now I can edit sector and sun color manually in the XML file without opening the editor.
Almost have all the entries in the x2_universe.xml file figured out.
- Storm_Front
- Posts: 1021
- Joined: Mon, 15. Dec 03, 05:27
It's the right one...just unpack it with the "x2tool -unpack x2_universe.pck x2_universe.xml" commandRedjack wrote:If you don't mind me asking, where can I find the X2_Universe.xml file? x2tool.exe finds a file of that name in 02.dat, but it's not the right one. It's only 7KB and doesn't have any universe data in it.