[SCRIPT] Make a flat map 00749.bod out of your Universe

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

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

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

[SCRIPT] Make a flat map 00749.bod out of your Universe

Post by Litcube » Thu, 8. Oct 09, 00:19

From the original thread:

For X3 Terran Conflict

Sick of navagating around the universe map's spaghetti? Rather it be flat and easy to navigate?

Does this look better?

[ external image ]

(or this?)
http://members.shaw.ca/litcube/X3/FlatMap2.jpg

This is a pretty small niche, here, but for those of you who make your own Universe maps, add sectors, or change gates, and want an easy way to make that 00749.bod file, running this script will make one for you.

Note that all sectors have to have been placed, and gates connected for this to function correctly. So Add Sector and Connect With Gates before you run this.

It'll be flat and gridded, but will create all sectors and gate lines, exactly like my Litcube's Flat Map.

The resulting file is in a 8112.txt log file in your MyDocuments\X3TC folder. Just rename it to 00749.bod, and throw it in the last .CAT or your mod file to function.

Included are a T file and a script. The script reads from the T file, so ensure it's placed in the correct directory.


http://members.shaw.ca/Litcube/X3/MakeA ... latMap.zip
Last edited by Litcube on Thu, 29. Apr 10, 05:55, edited 3 times in total.

User avatar
ScRaT_GER
Posts: 1962
Joined: Tue, 8. Jan 08, 18:19
x3tc

Post by ScRaT_GER » Thu, 8. Oct 09, 00:51

Cool thing - thanks!
Will be useful, when creating a custom map.

Greetings,
ScRaT

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13092
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer » Thu, 8. Oct 09, 00:56

Seems like a useful place to put this info. There was always a hard coded limit to the amount of different components, or whatever you call them, in this file. Something around 1000.

As of 2.5, it's been increased to ~4000. That's a lot of gates!
Come watch me on Twitch where I occasionally play several of the X games

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Thu, 8. Oct 09, 01:01

I remember someone claiming that back in the X3 Reunion Days. I might call myself a 00749 expert, if I could be permitted to toot my own horn for a moment.

I remember the XTM team leaving out certain gate lines because they felt there was a limit of 999. I added them myself, and experienced no problems. I counted them, and they all showed. I reported it, and the implemented my changes.

Also, did you know, there's a text error in the vanilla 00749? "emove" is added in several places, erroneously.

Good info, Xenon_Slayer! Thank you.

User avatar
Elffin
Posts: 371
Joined: Wed, 18. May 05, 22:34
x3tc

Post by Elffin » Thu, 8. Oct 09, 01:03

So if I start form scratch using Observe's 'unconnected; 00749 max file which I have converted to a 00749 bod file..
Create my universe using galaxy editor and connect gates using the internal galaxy editor... save map.

Then if I run this script it will provide the missing 'links' needed in my bod file?

(hope you understand what I mean - I'm exhausted today!!!!)

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Thu, 8. Oct 09, 01:08

You don't have to start with any 00749.bod. The bod file and the Universe Map are completely unrelated to each other.

The only time the 00749.bod file looks up any info in the map:

a) A line will "exist" in the viewable screen if there exists in the map a gate connecting to sectors that matches the bod file.

a) When said gate is "known" by the player (i.e. the gate itself)


You can start with no bod file. The script I wrote is completely independant of the bod, and reads all data from the existing Universe from which it is run. It makes a new 00749.bod from scratch.

User avatar
Elffin
Posts: 371
Joined: Wed, 18. May 05, 22:34
x3tc

Post by Elffin » Thu, 8. Oct 09, 01:20

Yes - Got it ... This is a great script btw...

The only reason why I was asking since I've been told its easier to edit and connect gates using the internal editor (hence why I need to use an edited bod file for implementing gates in new sectors) then your script can be used to create required bod file.

Or am I missing something simple here?

Thanks litcube

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Thu, 8. Oct 09, 01:25

I think you might be missing something.

A .bod file is only a... is only a "picture", if you will. It stores no information about how gates should be connected. Just a picture of what they look like.

Consider it a minimap. The map itself is the stuff with the data, and how it works. The minimap is just a picture, or representation of the data in the map.

All gates should be connected via the galaxy editor (or xml file, if you're a nerd). The galaxy editor does not make the 00749.bod file. The .bod is just a picture, which Egosoft didn't implement in the galaxy editor.

User avatar
Elffin
Posts: 371
Joined: Wed, 18. May 05, 22:34
x3tc

Post by Elffin » Thu, 8. Oct 09, 02:43

Thanks Licube...

I don't think I'm explaining myself clearly..sorry :oops:

I've made a custom universe using Observe's file.(hope he doesn't mind me linking a pic to it here). - the bod file is based on this.

[ external image ]

thats the 00749bod file in 3ds which is now converted to as my bod file which allows me 'see' my 'new' galaxy which I created in doubleshadow's galaxy map editor. Without this file my new sectors would not appear in the internal galaxy editor. So My intention is to use this using the game's internal galaxy to editor to add and connect gates and save the xml file.

Consequently.. This bod file doesn't have connections, so can I assume that your script will produce a complete 'bod file' if all my gates have been place correctly in the saved xml file?

Sorry for the confusion - and thanks again!

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Thu, 8. Oct 09, 04:11

The answer is yes, your assumption is correct.

User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie » Thu, 8. Oct 09, 10:11

Xenon_Slayer wrote:As of 2.5, it's been increased to ~4000. That's a lot of gates!
interesting :)
I remember the XTM team leaving out certain gate lines because they felt there was a limit of 999. I added them myself, and experienced no problems. I counted them, and they all showed. I reported it, and the implemented my changes.
yeah though it seemed to work in game the side effect was that the game crashed on exit ^^

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

Post by apricotslice » Fri, 9. Oct 09, 03:39

If you dont mind me asking a related question.......

Is there any way of updating the main map with sectors that have been added to the game by mission director ?

Most notably, I'm thinking of the Aldrin sectors. At the moment, the only way to add them is by doing the plot, but for people past the plots, we really want them as a standard set of sectors on the main map now.

Is it possible to output from the game the current sectors so that the map gets updated and can therefore be used in mods ?

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Fri, 9. Oct 09, 04:27

Hrm. By add sectors, do you mean to the picture of the map (00749.bod file) or the actual game Universe (x3_universe.xml)?

You can't add sectors to the x3_universe once the game has started. Has to happen in the galaxy editor or xml editing. You can change the 00749.bod file anytime you'd like.

The Aldrin sector, and the Terran sectors are actually already there in your non-plot game. The missions don't add these sectors, they just reveal them.

Aldrin is X=13 y=10. Try setting it to known via the script editor (object commands), and see what happens.

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

Post by apricotslice » Fri, 9. Oct 09, 04:32

Yes I meant the X3_Universe.xml.

So they are already there, just not visible ? Does that include all the gates and stations ?

If you toggle the see all sectors in the cheat menu, you see the sectors, but they do not contain any of the gates and stations. Its the gates and stations I really want to see in the map. So far, no one has done a MD to just add them in without the plot.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Fri, 9. Oct 09, 04:34

The stations are there. The jobs, the rock, that creepy clown that always hangs out by the bar, everything is there as you remember. Just not revealed.

Cycrow's cheats migh reveal the sectors, but the individual objects within those sectors might have not been set to "known" status.

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

Post by apricotslice » Fri, 9. Oct 09, 04:37

Is the known status available in the X3Editor's Galaxy editor ?

I've used it a few times, but dont recall any such flag.


Edit :

I'm in the galaxy editor now.

Only Aldrin is listed. None of the other 4 sectors are included in the map, which is what I thought. So its not a matter of not being 'known', they are not there.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Fri, 9. Oct 09, 05:31

You're not importing the right patch objects.

use the "Import Sector" command in the galaxy editor. You'll see it then. It's reading it from an .xml.

Also, the "set to known" is a script command.

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

Post by apricotslice » Fri, 9. Oct 09, 05:34

What editor are you talking about ? I'm using the editor in X3Editor. There is no import command as far as I can see.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Fri, 9. Oct 09, 05:41

X3 Editor is for Reunion, isn't it? The Galaxy Editor is the one that comes with X3 Terran Conflict and is built into the game.

Anyway, the objects are stored in an xml file for these new sectors. Here's an example of what's found in the x3_universe_2.0:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<universe>
	


New Terran sector is here...

	</o>
	<o t="1" x="15" y="9" r="18" size="17500000" m="0" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
		<o t="2" s="22" neb="0" stars="0"/>
		<o t="3" s="7" x="-768819163" y="1161508795" z="103516610" color="15779960"/>
	</o>

Other new sectors...

	<o t="1" x="13" y="10" r="18" size="150000000" m="8506" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
		<o t="2" s="65" neb="0" stars="0"/>
		<o f="1" t="6" s="SS_FAC_LC_EEMPC" x="49859539" y="6317200" z="49684543" r="18" a="32768" b="0" g="0">
		</o>
	</o>
	<o t="1" x="14" y="10" r="18" size="15000000" m="0" p="-1" qtrade="100" qfight="100" qbuild="100" qthink="100">
		<o t="2" s="65" neb="0" stars="0"/>
		<o t="3" s="7" x="528877806" y="-163155840" z="1396518889" color="15779960"/>
		<o t="3" s="7" x="-1152962339" y="686703915" z="381113613" color="15779960"/>
		<o f="1" t="4" s="127" x="180282975" y="88194904" z="-175913342" color="0" fn="0"/>
		<o f="1" t="4" s="53" x="-42021607" y="-320466784" z="-124590103" color="0" fn="0"/>
		<o f="1" t="6" s="SS_FAC_LC_3" x="-1553500" y="-802500" z="12042500" r="18" a="32768" b="0" g="0">
		</o>
		<o f="1" t="6" s="SS_FAC_LC_5" x="7704500" y="3776500" z="9454500" r="18" a="32768" b="0" g="0">
		</o>
		<o f="1" t="6" s="SS_FAC_LC_EEMPC" x="1553500" y="834000" z="-4463000" r="18" a="32768" b="0" g="0">
		</o>
		<o f="1" t="5" s="SS_DOCK_TR_SUPPLY_1" x="-2416000" y="3921500" z="2439500" r="18" a="32768" b="4096" g="1024">
		</o>
	</o>

etc. etc.

		</o>
	</o>
</universe>
This, my friend, is not the mission director. It is a map file.

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

Post by apricotslice » Fri, 9. Oct 09, 05:47

X3Editor was ported to TC before the game was released.

I've not used the in game galaxy editor before.

So to create a new one, I import the x3_universe and x3_universe_2.0 files, and then save the result ?

Edit :

Done that. The sectors are there, but there are no gates and no shipyard. Are they only stored in the MD file ?

Post Reply

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