EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
Galaxy Editor And Maps
Post new topic Reply to topic Goto page 1, 2, 3, 4  Next
View previous topic :: View next topic
Author Message
PaperDog





Joined: 02 Dec 2008

Location: USA

PostPosted: Wed, 10. Dec 08, 01:16    Post subject: Galaxy Editor And Maps Reply with quote Print

Galaxy Editor: I got a decent handle on placing/ moving objects around and setting their properties, but I'll be danged if I can figure out how to save the new maps I created. (That would be hours out of my busy life , which I'll never get back...) Evil or Very Mad

I searched this forum with a fine tooth comb and can't find any reference.

Can ya help ?

Thanks


_________________
PaperDog
Back to top
View user's profile Send private message
X420TokeAlot



MEDALMEDALMEDAL

Joined: 10 Dec 2006



PostPosted: Wed, 10. Dec 08, 08:28    Post subject: saving map in galaxy editor Reply with quote Print

Hey there PaperDog....

To save your custom map...
open the galaxy editor
Then open the galaxy edit mode(shift enter)

at the top of the menu there is a setting called Set galaxy file name..
change the name to your own map name....
then export galaxy
and your map will be saved in the maps directory in TC.

hope this helps a bit

cheers


_________________
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Chealec



MEDALMEDAL

Joined: 20 Aug 2006
Posts: 1209 on topic

Thank you for registering your game
modified
PostPosted: Thu, 11. Dec 08, 00:05    Post subject: Deconstruction x3_universe.xml Reply with quote Print

I've started deconstructing the x3_universe.xml file so that, should I fancy it I can rip out all the asteroid data or plonk in new sectors for a mod. I had a hard time finding a thread about this - so I figured I'd make one.

-- edit --

I've now compiled everything into a PDF - see:
this post on the next page

-- end edit --

It'll probably be in several posts since Heroes is about to start on Beeb3 so I'm out of here at that point in time Wink

To begin with - everything in the xml file is an "Object", I'm guessing that's what they had in mind when they named the xml Element "<o>".

What determines the type of object is the 't' attribute, for instance t="1" is a sector and t="17" is an asteroid.

For this first bit, I'll just deconstruct a "Sector object"...

--------------------------------------------------------------------------
Note: the "base" scale for all measurements seems to be 2 millimetres!
Therefore - size="22500000" in kilometres is 22500000/500000 = 45

First we have the "object" - which seems to be denoted by the xml <o> Element
The attributes of the <o> Element vary depending on it's type, the "t" attribute

So initial deconstruction seems to imply that

<o id="29" t="1" ... ></o>

is a sector (type 1) with an id of 29

Let's look at Argon Prime...

<o id="49" f="4" t="1" x="1" y="3" r="1" size="22500000" m="8100" p="189451753" qtrade="100" qfight="100" qbuild="100" qthink="100">


This is an deconstruction of the Argon Prime Object Element

id = "49" - this is the object's unique id

f="4" - seems to denote a "core" sector

x="1" - is the 'x' index of the sector - this is based on a zero index so 1 is actually the second row or sectors from the left

y="3" - is the 'y' index of the sector - again this is based on a zero index, but y is "down" rather than up - sector 0, 0 for instance is "Kingdoms End"

r="1" - is the 'race' - see below:

size="22500000" - this is to do with the gate distance on the map, it seems to be a measure of radius... the gate distance is, however a diametre so you need to multiply by 2. This gives you 2*(22500000/500000) = 90km BINGO! However, when displayed this is always rounded to the nearest 5km.

m="8100" - this is the music track - Argon prime is 08100.mp3 - 0 seems to be some kind of default - maybe loaded from a director file or the game binary?

p="189451753" - this is the population, a figure of -1 seems to be some kind of default - maybe loaded from a director file or the game binary? A figure of -2 will display "unknown" (used in "unknown sectors")

qtrade="100" - I would guess this denotes the frequency of "trade" missions (or Quests to explain the 'q')

qfight="100" - ditto for "fight" quests

qbuild="100" - ditto for "build" quests

qthink="100" - ditto for "think" quests


Races, as far as I can figure it:
1 => argon
2 => boron
3 => split
4 => paranid
5 => teladi
6 => xenon
7 => kha'ak
8 => pirates
9 => goner
10 => n/a
11 => n/a
12 => unclaimed (ship)
13 => n/a
14 => unknown (sector|beacon)
15 => n/a
16 => n/a
17 => Terran (ATF)
18 => Terran (USC)
19 => Yaki
20 => n/a
...

n/a may be reserved - possibly used for corporations - but these values, such as r="10" don't actually appear anywhere in the x3_universe.xml file at the moment


_________________


... old skool


Last edited by Chealec on Tue, 16. Dec 08, 21:44; edited 1 time in total
Back to top
View user's profile Send private message
exogenesis



MEDALMEDALMEDAL

Joined: 09 Sep 2007
Posts: 1082 on topic
Location: UK
Thank you for registering your game
PostPosted: Thu, 11. Dec 08, 01:09    Post subject: Reply with quote Print

Some race ID's are uniquely associated with some ships, rather than sectors/installations

10 is 'UFO', seemingly used for meaning 'Player' sometimes,
11 is 'TerraCorp' (X3:R, not still in TC?)
12 is Yaki (but meaning X3:R 'Plot Yaki')
14 is used for an actual UFO ship variant in TC ('LifeForm')


Be interested if you come across the sector's 'Sun % intensity'

Back to top
View user's profile Send private message
Chealec



MEDALMEDAL

Joined: 20 Aug 2006
Posts: 1209 on topic

Thank you for registering your game
PostPosted: Thu, 11. Dec 08, 01:31    Post subject: Reply with quote Print

I think some things have changed in TC - since there are several corporations now and each corporation is associated with a race...

For instance the Terracorp HQ is now:
<o id="6054" t="5" s="SS_DOCK_CORP_1" x="1250000" y="2031250" z="625000" r="1" a="32768" b="0" g="0"></o>

This implies that whilst the station belongs to CORP_1 (Terracorp) the race that it's associated with is the Argon (r="1").

Maybe the n/a values in the "gaps" would be more properly described as deprecated rather than reserved.

... I've not worked out what the a, b and g attributes stand for yet though - there's a possibility that they're texture effects - since the "signs" (SS_SPECIAL_SIGNn) seem to also have a v attribute. I'm thinking these might be something like:

Alpha, Brightness, Gamma and Video - but I'm only guessing at the moment.

[EDIT]
I _think_ I might be on to something with the suns...

It looks as though t="3" is the sun...
<o t="3" s="3" ... color="14483420"/> <!-- kingdom end -->

Now, IF there is a value with 's' (no matter what it is) that sector will have a 'suns' value of 150%. However, if s="0" then the sector will have a suns value of 100%.

The one exception (I've found so far) being Akeela's Beacon which actually has 4 "sun" type objects:

<!-- akeela's beacon -->
<o t="3" s="0" ... color="2631720"/>
<o t="3" s="0" ... color="0"/>
<o t="3" s="0" ... color="10850715"/>
<o t="3" s="0" ... color="11837610"/>

Each of those sun objects has an s value of 0 which means, in theory, the sector _should_ have 4 suns each with a value of 100, giving a total value of 400... which is right, that's what Akeela's Beacon has.

I've not tried it yet, but I'm guessing that if I fly through Akeela's Beacon I should see 3 solar effects - the 4th being invisible (or black) since it has a colour value of 0.

However, this is only a theory at this point in time, I've only checked it with a dozen sectors so far... I'll take a closer look tomorrow.


_________________


... old skool
Back to top
View user's profile Send private message
PaperDog





Joined: 02 Dec 2008

Location: USA

PostPosted: Thu, 11. Dec 08, 05:00    Post subject: Reply with quote Print

Actually I had figured that might be the case and had even tried it before posting my question. To my dismay, I now discovered that the Maps directory was missing (I got the SW from Steam) . So when I had attempted the export map feature, I got a normal audio bleep but didn't realize it hadn't saved the file.
I'll just create the map subdirectory on the TC directory and then retry.

Much thanks.
Smile


_________________
PaperDog
Back to top
View user's profile Send private message
DeadlyDa



MEDAL

Joined: 05 Jan 2004
Posts: 1858 on topic
Location: Wellington, New Zealand
Thank you for registering your game
PostPosted: Thu, 11. Dec 08, 05:26    Post subject: Reply with quote Print

There are three ways you can re-size sectors:

1. You can use a text editor and the info in Chealec's post ( http://forum.egosoft.com/viewtopic.php?t=227624 )
2. You can use doubleshadow's X3 Editor to move the gates waaaay out
3. You can use the internal X3 Galaxy Editor as per X420TokeAlot's post

Finally, if you're feeling a bit crazy...there was a program developed during the X2 era that was specifically designed to expand sectors by a set amount. I used to use it as the first step in creating an expanded universe for my old X2 mods (SSG). Once I had expanded things, I'd go back with an editor to tweak & tune each sector.

I still have the program, and just ran a test. I took the current x3_universe.xml file and renamed it to x2_universe, fired up the program and told it to expand things by a factor of 2...and it still works! For example, in Argon Prime the gates were twice as far from the center of the sector as before, and the stations were shifted outward as well.

However it is not a mature & stable tool, it knows nothing of the new X3R and X3TC objects (assuming it cares, and doesn't simply move "objects")...and as a modder I would never use the output as a "final" product.

Finally, while I have the program, I don't feel comfortable sharing it with others. I don't remember who the author was, and do not have their permission to distribute it. However the thread(s) may very well still exist over in the X2 forums (along with a fair bit of info on the composition of the universe file).

Hope this helps...


_________________

- Also check out the DDTC Forums, and the X-Wiki
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
DeadlyDa



MEDAL

Joined: 05 Jan 2004
Posts: 1858 on topic
Location: Wellington, New Zealand
Thank you for registering your game
PostPosted: Thu, 11. Dec 08, 05:33    Post subject: Reply with quote Print

This was a "hot topic" during the early days of X2 modding, and there is still a fair bit of useful information floating around over there. You might try using "extra search" on the X2 scripting & modding forums.

There was (is) a program developed during the X2 era that was specifically designed to expand sectors and their contents by a set amount. I used it as the first step in creating an expanded universe for my old X2 mods (SSG). Once I had expanded things, I went back in with an editor and tweaked each sector.

I still have the program, and just ran a test. I took the current x3_universe.xml file and renamed it to x2_universe, fired up the program and told it to expand things by a factor of 2...and it still works! For example, in Argon Prime the gates were twice as far from the center of the sector as before, and the stations were shifted outward as well.

However it is not a mature & stable tool, it knows nothing of the new X3R and X3TC objects (assuming it cares, and doesn't simply move "objects")...and as a modder I would never use the output as a "final" product.

Still...if you are going to go through the trouble of digging out the secrets of the x3_universe.xml file, it might be fun to create an updated version of this tool.


_________________

- Also check out the DDTC Forums, and the X-Wiki
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
jlehtone
Moderator (Script&Mod)
Moderator (Script&Mod)

MEDALMEDALMEDAL

Joined: 23 Apr 2005
Posts: 16453 on topic
Location: GalNet BBS
Thank you for registering your game
PostPosted: Thu, 11. Dec 08, 08:46    Post subject: Reply with quote Print

I hope you do not mind a bit of merging (since both threads were on the same "map"). And as added salt to the wound, the Tutorials sticky is pointing to Chealec's comment (even though he is not the only contributor here). Wink

Back to top
View user's profile Send private message
exogenesis



MEDALMEDALMEDAL

Joined: 09 Sep 2007
Posts: 1082 on topic
Location: UK
Thank you for registering your game
PostPosted: Thu, 11. Dec 08, 10:34    Post subject: Reply with quote Print

Chealec wrote:
It looks as though t="3" is the sun...
<o t="3" s="3" ... color="14483420"/> <!-- kingdom end -->

Now, IF there is a value with 's' (no matter what it is) that sector will have a 'suns' value of 150%. However, if s="0" then the sector will have a suns value of 100%.

The one exception (I've found so far) being Akeela's Beacon which actually has 4 "sun" type objects:

<!-- akeela's beacon -->
<o t="3" s="0" ... color="2631720"/>
<o t="3" s="0" ... color="0"/>
<o t="3" s="0" ... color="10850715"/>
<o t="3" s="0" ... color="11837610"/>

Each of those sun objects has an s value of 0 which means, in theory, the sector _should_ have 4 suns each with a value of 100, giving a total value of 400... which is right, that's what Akeela's Beacon has.


Good observation & deductive reasoning, well done!

I wonder what an s value of >0 actually means for the t=3 sun item.

Back to top
View user's profile Send private message
Chealec



MEDALMEDAL

Joined: 20 Aug 2006
Posts: 1209 on topic

Thank you for registering your game
PostPosted: Thu, 11. Dec 08, 14:23    Post subject: Reply with quote Print

's', generally speaking, seems to refer to a "sub-type" - so for instance with the Terracorp HQ I used as an example earlier:

't' = 5 is a shipyard if I remember rightly (I'm at work atm, on lunch so I've not got the xml file in front of me) and 's' refers to the specific type of shipyard - i.e. the Terracorp HQ.

With Suns I would guess that the 's' value refers to the kind of environmental effect employed by that sun. There's probably some kind of "sun type" array or database in the game somewhere that looks a bit like:

+--------------+----------------+-------------------+----
| type | effect | brightness | ...
+--------------+----------------+-------------------+----
| 1 | effect_x | 100 |
| 2 | effect_y | 150 |
| 3 | effect_z | 150 |

...

and so on


_________________


... old skool
Back to top
View user's profile Send private message
exogenesis



MEDALMEDALMEDAL

Joined: 09 Sep 2007
Posts: 1082 on topic
Location: UK
Thank you for registering your game
PostPosted: Thu, 11. Dec 08, 21:00    Post subject: Reply with quote Print

Yes, types\TSuns.txt has a list of different coloured suns, but all the rest of the params are the same.
I think your initial method for 'sun%' looks good.

Back to top
View user's profile Send private message
Chealec



MEDALMEDAL

Joined: 20 Aug 2006
Posts: 1209 on topic

Thank you for registering your game
PostPosted: Thu, 11. Dec 08, 22:07    Post subject: Reply with quote Print

You're right - it looks as though the sun brightness % is in that file...

If you divide 98304 by 65536 (the only value that changes in column J) you'll see that the result is 1.5.

Therefore I'd assume that brightness 100% = 65536 and by tweaking the value (by multiples or parts thereof of 65536) you should be able to increase or decrease the sun intensity.

For example:
-1;0;0;0;0.001;-1;884;0;5;98304;0;0;0;0;0;-100000;0;0;SS_SUN_6;

If you change that to:
-1;0;0;0;0.001;-1;884;0;5;131072;0;0;0;0;0;-100000;0;0;SS_SUN_6;

That _should_ increase the intensity of all sun types s=6 (or SS_SUN_6) to 200% brightness.


_________________


... old skool
Back to top
View user's profile Send private message
Chealec



MEDALMEDAL

Joined: 20 Aug 2006
Posts: 1209 on topic

Thank you for registering your game
modified
PostPosted: Thu, 11. Dec 08, 22:44    Post subject: Reply with quote Print

Oki - here's the blurb on decoding suns... I am writing this all up into an ODF document whilst I'm going, so when it's done I'll dump the whole thing out to a PDF.

------------------------------------------------
T3: Suns <o t=”3” ...>

Suns have 6 attributes; the x, y and z values are the three dimensional co-ordinates that denote the position of the sun. These figures are generally pretty enormous so that the sun (light source) is positioned outside the navigable area of the sector.

t is the “type” and is always 3

s is a sub-type which refers to the index in types\TSuns.pck

x is the 'x' position of the sun (light source)

y is the 'y' position of the sun

z is the 'z' position of the sun

color I would guess this is an RGB colour index of some sort.

There are 228 suns in total.

The “types\TSuns.pck” resides in 03.cat and is a comma separated values file (ok, technically semi-colon separated values file) so if you extract it and rename it to “TSuns.csv” you should be able to open it in Excel or OpenOffice Calc.


_________________


... old skool


Last edited by Chealec on Sat, 13. Dec 08, 18:35; edited 1 time in total
Back to top
View user's profile Send private message
Chealec



MEDALMEDAL

Joined: 20 Aug 2006
Posts: 1209 on topic

Thank you for registering your game
PostPosted: Thu, 11. Dec 08, 23:12    Post subject: Reply with quote Print

Quote:

Still...if you are going to go through the trouble of digging out the secrets of the x3_universe.xml file, it might be fun to create an updated version of this tool.


I might have a crack at knocking one up in Java since that's got pretty good XML support these days... and I could do with some kind of an excuse for polishing up on my Java skills (I'm a web developer by trade and it's been a really, really long time since I wrote anything that didn't output to (X)HTML) - I'd not hold your breath though, my Java skills are a bit basic (and very rusty) at the moment Wink

I still miss "proper" method overloading when I'm coding in PHP though.


_________________


... old skool
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3, 4  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Wed, 23. Jul 14, 09:39

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2009
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.49159 seconds, sql queries = 74