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

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

Post by 3iff » Wed, 18. Mar 09, 16:20

Chris Gi.

Tried editing the nebulae.xml file removing (or commenting) the hull eating lines but the program fails with errors. Don't think it's due to editing mistakes on my part.

Seems like I'll have to live with the program as it is and manually edit out anything I don't want. I'm not able to modify the java code...but I can manage with the stuff it generates.

Thanks for the suggestion anyway.
...locating mandolin strings in the middle of Austin.

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

Post by Chris Gi » Thu, 19. Mar 09, 15:53

I also tried this, but I too get error messages. Too bad this doesn't work. :(
--------------------------------

[ external image ]

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

Post by 3iff » Thu, 19. Mar 09, 16:05

Yeah, strange...as least it confirms it wasn't an error on my part.

It's not really difficult to scan through the galaxy and chop out things I don't like. It's not as if I'm creating dozens of new maps.

Thanks for your efforts!
...locating mandolin strings in the middle of Austin.

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

Post by Orca42 » Fri, 20. Mar 09, 17:19

Hi,

unless you mess with the java code, there is no way to disable nebula creation. (EDIT: A solution may be to alter the x2universe.xslt file; just look for the template element on "nebula" and disable/delete those three lines)
Deleting nebulae with hull damaging effects should disable these, that should work fine. However, the generator will just create other nebulae instead - the number of nebulae in a sector is determined independently from the contents of nebulae.xml. If you delete too many or even all nebulae, the generator might dead-lock.

I might spend some time on the generator over the next days, so I will probably add more switches (including some for nebulae) to the build file since that is the most urgent concern, I guess.

btw, what specific error messages did you get?
So long, and thanks for all the fish.

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

Post by 3iff » Wed, 25. Mar 09, 12:06

I edited xml/nebula.xml to edit the hull eating nebulas with blank lines...like this

<nebula id="47" colour="turquoise" size="1" backgroundColour="!crimson, !red" />
<!-- id 48: extremely large yellow line, skip -->
<!-- id 49: extremely large yellow line, skip -->

where 48 and 49 are hull eaters. Then generate...


Build custom universe
=====================


XUW - X Universe Wizard
Version 0.3
10:53:17,820: Initiating universe...
10:53:18,398: Building sectors...
10:53:18,398: Creating universe of size 10x6 containing 30 sectors
10:53:18,461: Creating gates...
10:53:18,523: Setting up sector inventories...
10:53:18,523: Creating asteroids...
10:53:18,586: Creating stations...
10:53:18,789: Creating docks...
10:53:18,851: Creating sector backgrounds...
10:53:18,867: Creating suns...
10:53:19,757: Creating planets...
10:53:19,773: Creating ships...
10:53:19,773: Creating special objects...
10:53:19,789: Creating nebulae...
10:53:19,804: Error during build:
java.lang.NullPointerException
at xutools.universe.creators.astronomy.NebulaCreator.determineNebulae(Ne
bulaCreator.java:436)
at xuniversewizard.core.XUW.generateUniverse(XUW.java:228)
at xuniversewizard.core.XUW.main(XUW.java:381)
10:53:19,804: Your universe could not be build due to errors!
10:53:19,804: Universe random number seed: -5250429191680400048

Press any key to continue . . .

----------------------------------------

As I only generate a small galaxy (10 * 6 or so) it's no hardship to manually edit the sectors to chop out hull eaters.

If you're adding things, I'd like a feature to change number of stations per sector. I find that small galaxies have insufficient local stations and often there's absolutely no demand for ore/silicon other than stations I build. For such a galaxy, having say 15 stations per sector would make the galaxy more interesting that the average of about 10 stations per sector.

Otherwise, this is a great program. It's more interesting to really explore a new galaxy (having played the original a few dozen times!). I've also added my own custom ships to the code (as per your instructions) and it all works wonderfully. Thanks.
...locating mandolin strings in the middle of Austin.

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

Post by Jonson27 » Fri, 24. Apr 09, 12:10

3iff wrote:As I only generate a small galaxy (10 * 6 or so) it's no hardship to manually edit the sectors to chop out hull eaters.

If you're adding things, I'd like a feature to change number of stations per sector. I find that small galaxies have insufficient local stations and often there's absolutely no demand for ore/silicon other than stations I build. For such a galaxy, having say 15 stations per sector would make the galaxy more interesting that the average of about 10 stations per sector.

Otherwise, this is a great program. It's more interesting to really explore a new galaxy (having played the original a few dozen times!). I've also added my own custom ships to the code (as per your instructions) and it all works wonderfully. Thanks.
It seems to me that he should be able to generate universes that have high demand but not enough supply - to fill your need for ore/silicon eaters. Hopefully he comments about this.

I absolutely agrree that NEW galaxies are interesting! It deffinately gives scouting more value. Make sure you got a good m5! A fast ship with a triplex scanner might be just as good. I hope the universe is interesting though! I hope there's good stuff out there to discover.

Sad news is... I haven't got around to using his universe creator yet. I'm concerned that I won't be able to use it because I have an old version of java (5.0 update 13). I might be able to use his program on another computer and then transfer the files over though. But I'm very busy with my own mod at the moment.

Is it possible for him to add asteroids that will spit out Nvidium sometimes like in x2? Atleast, it's rumored so... I went to a paranid sector and saw Nvidium on a station.. the description says you can find it on large asteroids. That's the kind of thing that I think is fun. Discovery isn't good enough unless you get something for it.
Hello there!! (Jumping up and down)

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

Post by 3iff » Fri, 24. Apr 09, 12:30

In my last small galaxy, I had to manually add a lot of high tech stations to generate demand for resources. This was a game where I had no plans to build my own stations. Even though I'd verified each sector, it was still interesting to explore the new galaxy.

If you have a recent enough java it works fine and generates a working galaxy. Just a bit of work to incorporate it as a mod but I can set it up to start with a custom ship without any problems.
...locating mandolin strings in the middle of Austin.

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

Post by Jonson27 » Fri, 24. Apr 09, 12:35

3iff wrote:In my last small galaxy, I had to manually add a lot of high tech stations to generate demand for resources. This was a game where I had no plans to build my own stations. Even though I'd verified each sector, it was still interesting to explore the new galaxy.

If you have a recent enough java it works fine and generates a working galaxy. Just a bit of work to incorporate it as a mod but I can set it up to start with a custom ship without any problems.
I envision myself as a starship commander, like in star trek, boldly exploring where no man has gone b4... In a titan or similar explorer-worthy craft, appointed by the military to investigate a new gate. There'd be a pre-game where you have to determine how to equip your titan on limited resources. Sort of like a character creation, except you'd be outfitting your ship rather than a character. For example, do you buy more cargo space, better shields, more speed, or better weaponry? There might only be one sector for the pre-game - perhaps all that's needed is an equipment dock. A shipyard might be another option... so you can buy extra ships rather than titan-upgrades. After you're done supplying the titan, then you enter the gate to fullfill your orders. So I do... Except, I can't return and the gate has mysteriously shut off. So now I'm stranded like on giligans island. Just getting by on stray resources that I come upon, just narrowly escaping certain death, unexpectedly finding lost technologies and feirce enemies, etc. There might be a quest to find some lost explorers that had entered the gate previously and had settled an isolated sector in the universe after many jazura of fighting - all you gotta do is find them. They could tell you stories and give you information about the alien races. And cnce you find them, you can further upgrade and/or equip your titan as they'll have built several stations to satisfy their growing population. And there might be alien technologies you can acquire to upgrade your titan as well. There might be a main plot where you have to activate the gate in order to finish the game - any number of possibiliities. I think that kind of plot would work in x2. It's the same ole theme of starting small and working your way up... except that this plot would take that to the extreme. I'd want it to be tough... very tough. Pre-game choices would be very important.

I don't get the feeling that i'm really exploring in vanilla x2. I think that's because it's hard to see myself as an explorer when I'm surrounded by people just like me in the same sector... when I feel like I'm readiing a history book as opposed to writing history! It rarely feels alien.. and I rarely feel like I'm going to find anything exciting. BUT, I have had some fun exploring the paranid sectors for asteroids. Some of the sector descriptions are fun, and the music is really atmospheric. I've also enjoyed some of hte khaak invasions - sometimes they come at just the right time to make things interesting. All too often though there's not enough action or drama. Not enough sinister plots. Very little of my time in x2 has felt new or interesting - i think primarily because there's just not much in x2 that changes or is radically different from other things. It could be that this is because of how I play x2... I tend to stay in well defended sectors building up my factories. BUT.. from my standpoint.. vanilla x2 is too much business and not enough "space-opera" (drama, adventure, etc). I think what's needed is something like this universe creator.. but it needs to introduce interesting things... interesting plots... No matter how good the creator is, if the universe doesn't change while you play it, it'll eventually bore you to death.

You know... I have X - Beyond the Frontier... And the main difference betweeen that and x2 is that you play the roll of an explorer whom is catapulted into an alien universe. In x2 you play the roll of an argon who is trying to rise in the ranks and become a powerfull figure. In x2 you're not exploring an alien world from the standpoint of the character - unless you consider all things that the character doesn't know to be alien (like he doesn't know that there's an argon sector named cloudbase southwest). This is versus not knowing things that aren't known by anyone else.
Hello there!! (Jumping up and down)

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

Post by Orca42 » Sat, 25. Apr 09, 00:23

One of the first ideas actually was to let scouting be more interesting again. Not just the... oh, here we are, 3 suns, must be Akeela ... been there, done that. I think there already is quite a lot to discover.

Nividium asteroids can be found in Unknown and Khaak sectors. Which you also will have to discover first as their entry gates are always offset and hidden. However, be aware of squash mines in Unknown sectors - another thing to discover...
And yes, some demand for Nividium exists, on some Paranid Jewellrys as well as rare pirate stations.
It seems to me that he should be able to generate universes that have high demand but not enough supply - to fill your need for ore/silicon eaters.
The random universes follow (or at least: should follow) the same economic rules as the original one, say the same number of ore/si mines and weapon forges, industries etc. that consume minerals. However, I have only occasionally checked for actual in-game balance... just needs too much time scouting around and there always is some change in demand. Anyway, I probably should think about some build file rules that allow to alter the number of mines, laser forges etc. in general.

Actually, the demand for resources should even be better in small universes as there are a lot of military industries crammed together in a few sectors (every military fab will be created at least once to ensure that all weapons are available). Also remember that in the original universe, the demand for Silicon is quite low and so I kept it that way.
But I can see that not everybody is happy with Egosoft's original economic balancing. ;)


By the way, I hope to launch v0.4 this weekend. It will mainly include a full graphical interface for the generator's parameters along with a lot of new parameters to tweak - total number of parameters is way more than 100 now.
So long, and thanks for all the fish.

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

Post by Orca42 » Sat, 25. Apr 09, 16:12

Okay, here we go:

New Version: XUniverseWizard 0.4

Major changes:
  • Graphical User Interface for editing build values and executing build runs
  • Reworked build file setup; the new setup is not downwardly compatible - you cannot use old build files with the new version!
  • Asteroids configurable via XML file
  • Number of planets in a sector (0-3) changed and now configurable in buildfile
  • checks and fixes universe layout ("floating districts")
  • SVG map uses bezier curves to display connections
  • Flying ships in sectors will be capped to improve game performance
  • Detects and fixes extreme economy setups (heavy industry sectors without food and energy production)
  • Selects a suitable start sector and creates a player start script
  • Introduced minoritie races in sectors (sectors with two races)
  • Hull damaging nebulae will be created only close to large visible nebulae and never close to gates
https://sourceforge.net/projects/xuniversewizard/
So long, and thanks for all the fish.

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

Post by Jonson27 » Sun, 26. Apr 09, 05:22

I love your remarks. Scouting can be very fun and rewarding - in my case ya i was looking for asteroids. But the thing is... this especially adds life for people who've already played x2 - becaus the universe will be completely new. I really like it.

Remember to add a danger element sometimes for explorers. I think that's a given for the khaak/unknown sectors as they'll probably be full of ships. Not sure about other ways to do it - without ruining gameplay.

Are you adding background music to the sectors like in vanilla x2? If so, are you randomly selecting them? I think the music adds atmosphere, but i'll never really understand why music is so important to me. I think not everyone likes the x2 music, but I do.

...........
Orca42 wrote:
  • Detects and fixes extreme economy setups (heavy industry sectors without food and energy production)
  • Selects a suitable start sector and creates a player start script
  • Introduced minoritie races in sectors (sectors with two races)
  • Hull damaging nebulae will be created only close to large visible nebulae and never close to gates
Are you sure you want to necessarily remove extreme economy setups? Ofcourse, this wouldn't necessarily remove the need for player stations - even if you remove the extreme cases.

Nice that you create a player start script - i've never done that b4.

I love that there're minority races!

Too bad there wasn't a special repair mechanism for hull damage nebulae. There should be some kind of defense against it!

...........

Btw, do you know if the java 5.0 update 13 runtime is compatible?? I still use win98 on this machine - i know i know but don't tell me to upgrade. This isn't something i can't get around - there're other machines in this house with win xp and even vista.

It'd be kool if you could post the systme requirements - as in what version of java you will need (as that will probably also tell you what version of windows you need).
Hello there!! (Jumping up and down)

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

Post by Orca42 » Sun, 26. Apr 09, 13:43

Remember to add a danger element sometimes for explorers. I think that's a given for the khaak/unknown sectors as they'll probably be full of ships. Not sure about other ways to do it - without ruining gameplay.
Yes, Khaak sectors contain a lot of ships. Unknown sectors only ocassionally have squash mines. It might be nice to put more dangerous nebulae in Unknown sectors though, I might include that.
Are you adding background music to the sectors like in vanilla x2? If so, are you randomly selecting them? I think the music adds atmosphere, but i'll never really understand why music is so important to me. I think not everyone likes the x2 music, but I do.
I think you are absolutely right about the atmospheric effect. Soundtracks are chosen based on the "style" of a sector, i.e. mining sectors, military sectors etc.
For the sake of "atmosphere" the generator also chooses stuff like background images, nebula and sun colours... for example, Paranid sectors often contain red and orange backgrounds with a distinct black line at the horizon, while Boron sectors are never red coloured. Also note the variety of sector names - a sector name can tell you something about the sector itself - and not just which race it belongs to. E.g. "Red Star" contains a red sun, "CEO's Mines" has a high number of mines, "Infinity" or "Stars of Trinity" are triple star systems.
Are you sure you want to necessarily remove extreme economy setups? Ofcourse, this wouldn't necessarily remove the need for player stations - even if you remove the extreme cases.
Extreme is in the sense of really bad setups - I stumbled across sectors with 2-3 food chains, 3 fabs (crystal, microchips, computer components) and not a single power plant. I don't think that's supposed to be fixed by player stations, it would just be too simple for the player to earn a lot of money here. Plus, it might corrupt the production of some necessary goods (especially the more advanced weapons). But if you don't like it, just deactivate it (switch to advanced mode and have a look at the 'stations' section, there are two parameters somewhere near the end of the list).
Btw, do you know if the java 5.0 update 13 runtime is compatible??
No, Java 6 is necessary to run the generator. I tried to get it down to Java 5, but there are too many incompatiblities with the source code. You will have to use a different machine. The operating system is not important as long as you can run Java 6 on it.
So long, and thanks for all the fish.

User avatar
Lord Dakier
Posts: 3243
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier » Sun, 26. Apr 09, 16:17

So is there any bugs to this or anything?

Can you input fueatures you would like for example maximum number of sectors?

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

Post by Orca42 » Mon, 27. Apr 09, 20:17

There are some stability issues, the generator may freeze when you use extreme settings. For more information, see the release notes coming with the download.
Lord_Dakier wrote: Can you input fueatures you would like for example maximum number of sectors?
Just download and run the generator, you will see... :)
So long, and thanks for all the fish.

User avatar
Lord Dakier
Posts: 3243
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier » Mon, 27. Apr 09, 23:13

Well I downloaded it, I suggest making an install section cause I have no clue as to what I do now.

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

Post by Orca42 » Tue, 28. Apr 09, 20:20

Just double click either start-xuw.bat or xuw-0.4.jar. You need Java 6 to use the generator.

If you want to know how to use the generator's result (build a mod) there is some information in the readme file, but you probably still need to look here in the forums on how to build a proper mod out of it. I know, this is not a nice solution, but so far I cannot generate a mod automatically.
So long, and thanks for all the fish.

User avatar
Lord Dakier
Posts: 3243
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier » Tue, 28. Apr 09, 20:43

I'm kinda lost as to what you mean. Do you mean you do not know how to use the generator and apply a mod for it automatically?

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

Post by Orca42 » Thu, 30. Apr 09, 18:42

Something like that. I haven't yet found a way to automate the mod building. The way I do it is a bit messy, just putting files in the directories (e.g. the player init script) and relying on the X2GalaxyEditor for a mod containing the galaxy map. And to use the in-game map I have to build a 05.cat file of course.
So long, and thanks for all the fish.

User avatar
Lord Dakier
Posts: 3243
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier » Thu, 30. Apr 09, 19:20

Yeah it is a bit too messy for my liking to be honest lol.

Would a installer not work?

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

Post by Jonson27 » Tue, 5. May 09, 18:40

Does the readme explain where to put the files so you can play using them?
Last edited by Jonson27 on Tue, 5. May 09, 18:56, edited 1 time in total.
Hello there!! (Jumping up and down)

Post Reply

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