XUniverseWizard - Random universe generator

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

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

Orca42
Posts: 27
Joined: Sat, 8. Nov 08, 01:57

XUniverseWizard - Random universe generator

Post by Orca42 » Sat, 15. Nov 08, 15:06

Hi,

although X2 is quite old, I have spent the last weeks on developing a universe generator engine for it. The aim is to create universes from scratch that do fit well into the gameplay. Sector layout, races, stations etc. should be well balanced. I'm using some of the files from XeHonk's editor, many thanks for that.

I just released an alpha version of the generator as an Open Source project, hosted on sourceforge. To use it, you need Java 6.

To download, follow this link:
http://sourceforge.net/projects/xuniversewizard/
Just download xuniversewizard-0.1-bin.zip. (the other archive contains the source code)
If you just want to have a quick overview, simply run the "build_default.bat". The program will create an X2 compatible galaxy map "output-x2galaxy.xml", that you can either open with XeHonk's editor or load in the in-game editor.

Currently, the universes created will be playable only with some restrictions. For instance, there are no ships in the sectors, no equipment docks, no shipyards and some other stuff is missing too, see below for more details.

Features already implemented:
  • Various settings for the generator engine, contained in an XML build file, like universe size, race balancing, pirate sectors, number of asteroids etc. More information how to alter the generator settings can be found here: http://xuniversewizard.wiki.sourceforge ... figuration
  • Creates Sectors of all races, including Xenon, Khaak and Unknown as well as gates to connect them
  • Creates stations in each sector (except Xenon, Khaak, Unknown). The stations will be created in a way that overall gameplay will be balenced!
  • Creates asteroids, planets and suns and sets sector background images
Planned features for future versions:
  • Creating shipyards and equip docks
  • Creating free ships in the sectors
  • Generating content for Xenon, Khaak and Unknown sectors
  • Nebulae, sector names, soundtracks and various other details
  • Support for X3: Reunion
There are some minor issues in the alpha version, for more details see the release notes ioncluded in the download archive.

Since this was designed as an Open Source project, everybody should feel invited to participate! You will need coding abilities in Java and/or XSLT. Just send me a message if you are interested. :)

The source code is available for download on the project homepage. You may also access the SVN. The main topic that I would like to have someone supporting me is the design for X3 or even X3 TC. Since my hardware is quite old, I most certainly am not able to do the translation of the engine for the newer games.

Feedback much appreciated!
So long, and thanks for all the fish.

User avatar
Zeron-mk7
Posts: 516
Joined: Sat, 23. Feb 08, 13:38

Post by Zeron-mk7 » Wed, 19. Nov 08, 09:01

I have question, ok generating costum map, but what with 00749.BOD file, without 00749.BOD file new sectors dont show in game, every time you generating costum map you also need for this costum map 00749.BOD file to see in game new sectors.

Orca42
Posts: 27
Joined: Sat, 8. Nov 08, 01:57

Post by Orca42 » Thu, 20. Nov 08, 14:48

Currently I'm using a bod file that shows all sectors in a very simple way.
For future versions of the generator, there might be a feature that the sector map will be created along with the galaxy.xml.
So long, and thanks for all the fish.

Orca42
Posts: 27
Joined: Sat, 8. Nov 08, 01:57

Post by Orca42 » Mon, 1. Dec 08, 20:31

New release: XUniverseWizard 0.2

https://sourceforge.net/projects/xuniversewizard/

The generated universes will now have enough features to be playable in a serious way. Shipyards will be created and offer a various, but balanced range of stations for the player to buy. The gate network was heavily improved, fragmented universes should only occur in rare cases.

List of changes:
  • Improved gate network
  • Creates shipyards, equipment docks and piers
  • Creates free ships in sectors
  • Full support for Xenon and Khaak sectors, including Xenon shipyards
  • Suns will not be blocked by planets
  • Added more TS ships to trading stations
So long, and thanks for all the fish.

Jonson27
Posts: 153
Joined: Thu, 3. Jun 04, 14:08

Post by Jonson27 » Tue, 2. Dec 08, 04:10

This is an interesting script/mod! Love the idea behind it.

What drove you to do this? YOu know much about perlin noise?

Code: Select all

Suns will not be blocked by planets.
What does that mean?
Hello there!! (Jumping up and down)

Orca42
Posts: 27
Joined: Sat, 8. Nov 08, 01:57

Post by Orca42 » Tue, 2. Dec 08, 12:07

Well, I know about perlin noise, but I did not use that for the generator. Mainly it was just that creating a full, well-balanced universe by hand would take several weeks and is still most of the time rather stupid work, so I decided to spend some more time on writing an automated generator that produces billions of different universes...

In version 0.1, there was a chance that suns and planets were created in the same direction, seen from the center of the sector. So you could have a planet sitting "in front" of a sun (actually, X2 will display the sun anyway, but it still lokks bad).

There is also a small but rather important thing missing in v0.2, as there is no Goner Temple with jumpdrives and insurances to buy.
So long, and thanks for all the fish.

Jonson27
Posts: 153
Joined: Thu, 3. Jun 04, 14:08

Post by Jonson27 » Wed, 3. Dec 08, 12:39

Orca42 wrote:Well, I know about perlin noise, but I did not use that for the generator. Mainly it was just that creating a full, well-balanced universe by hand would take several weeks and is still most of the time rather stupid work, so I decided to spend some more time on writing an automated generator that produces billions of different universes...

In version 0.1, there was a chance that suns and planets were created in the same direction, seen from the center of the sector. So you could have a planet sitting "in front" of a sun (actually, X2 will display the sun anyway, but it still lokks bad).

There is also a small but rather important thing missing in v0.2, as there is no Goner Temple with jumpdrives and insurances to buy.
Jumpdrives? Who needs em.

I went behind a planet. It was dark and lonely. It had a lot of "atmosphere" until I could see that the sun shows through the planet. That's lame! I wouldn't care if there were a few sectors where the sun is blocked - it might make it feel different than others with the sun.

And I think it's someting cool that you're doing this. I agree that the generating a universe is a lot easier than doing it by hand. The problem is you'll take more time making the gererator than it would have taken had you done it by hand. On the "other hand", you'll save time for others :)

Orca42
Posts: 27
Joined: Sat, 8. Nov 08, 01:57

Post by Orca42 » Fri, 12. Dec 08, 23:11

New release: XUniverseWizard 0.2.1

https://sourceforge.net/projects/xuniversewizard/

List of changes:
  • sectors will have names and soundtracks
  • different types of planets and suns will be created, matching the sector's style
  • added Goner Temple and TerraCorp HQ
So long, and thanks for all the fish.

Orca42
Posts: 27
Joined: Sat, 8. Nov 08, 01:57

Post by Orca42 » Tue, 13. Jan 09, 22:26

XUniverseWizard 0.3

https://sourceforge.net/projects/xuniversewizard/

List of changes:
  • Nebulae in sectors
  • Suns and nebulae have proper colours
  • Generates an in-game map file (xxx00749.txt)
  • Generates printable map files (.svg, Scalable Vector Graphics, German and English)
  • Improved pirate sector economy; more industry and better food production
  • Creates some Nividium asteroids
  • Gates to Unknown and Khaak sectors as well as some pirate bases will be shrouded by nebulae and large asteroids
  • Stations will keep more distance to gates
  • Every race will own at least one sector, even in small universes
  • Automatic checks whether Xenon/Khaak/Unknown sectors split the universe
  • Additional gates between neighbouring sectors decrease detours
  • Generic sector names, allowing universes with maximum number of sectors
  • Guaranteed minimal distance between multi-star sectors
  • New build file options
  • Command line option to generate sector statistics (.csv table)
  • Bugfix: Bad sector connections caused the game to freeze
  • Bugfix: Equipment docks contained wrong merchandise
  • Bugfix: Some weapon forges had wrong race preferences
You can view and print the .svg galaxy map using Firefox or any other browser (except IE...). There are two files, the one with a 44 in it is in English language.

The in-game galaxy map is still a flat version, although the generator supports some 3D variations. I could not figure out yet how to set object rotations properly.
So long, and thanks for all the fish.

Jonson27
Posts: 153
Joined: Thu, 3. Jun 04, 14:08

Post by Jonson27 » Fri, 23. Jan 09, 12:37

Wow. You been busy much? :)

The stations have supply ships yet? Any trading going on? I'm not trying to be pushy, just curious. You know what you're doing, and it's fun to watch what happens.
Hello there!! (Jumping up and down)

Orca42
Posts: 27
Joined: Sat, 8. Nov 08, 01:57

Post by Orca42 » Sat, 24. Jan 09, 14:17

Of course do all stations have supply ships and trading works fine.
So long, and thanks for all the fish.

User avatar
3iff
Posts: 1085
Joined: Thu, 23. Oct 03, 09:52

Post by 3iff » Fri, 13. Mar 09, 16:10

Hi,

Trying this and it looks good.

One request. How do I create a new galaxy without nebulas? My PC isn't up to running well with them in (stripped them out of my custom galaxy). I've read the guide but there's no switch to exclude nebula creation.

Can you help?

Thanks.
...locating mandolin strings in the middle of Austin.

User avatar
3iff
Posts: 1085
Joined: Thu, 23. Oct 03, 09:52

Post by 3iff » Wed, 18. Mar 09, 10:07

Spent the weekend trying a new random galaxy...fantastic! A few teething troubles getting it to work and some manual editing to incorporate some custom ships but it's really great exploring a new galaxy.

I'm going to have to experiment a bit now I can get it to work. Actually, the nebulas aren't too bad, except for the hull eating ones which I hate. I'll have to edit those out manually.

Thanks.
...locating mandolin strings in the middle of Austin.

User avatar
Chris Gi
Posts: 959
Joined: Wed, 20. Sep 06, 09:57

Post by Chris Gi » Wed, 18. Mar 09, 12:59

@3iff:

I haven't tested this thing, but I had a look at the xml-files. It seems if you edit the file xml/Nebulae.xml and comment or delete all lines with the 'effects="hulldamage"' tag, you won't get any of these.

I too don't know of any swith to exclude nebulae creation. But at least you could try my suggestion - I'm pretty sure it works, because Orca skipped the asteroid field nebulae this way.
--------------------------------

Image

User avatar
3iff
Posts: 1085
Joined: Thu, 23. Oct 03, 09:52

Post by 3iff » Wed, 18. Mar 09, 14:22

Thanks, I'll give that a try...I've generated a mini-map (9 by 7) successfully...with a combination of this program and Xehonks editor, I have a nividium asteroid of 86 (yes, 86)...

Just for testing purposes of course.

I had a quick look at the other files but didn't get far as I've only been on it a few days.
...locating mandolin strings in the middle of Austin.

Post Reply

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