[Program] Random universe Generator UPDATED V1.5

The place to discuss scripting and game modifications for X³: Reunion.

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

User avatar
Ikaruga
Posts: 376
Joined: Fri, 30. Jan 04, 14:26
x4

Post by Ikaruga »

Hi, I tried the new 1.5 version,

I created a 8 sector universe. Some sectors weren't linked to anything, while others were linked but not linked to the rest of the others. I don't know if I'm clear ...


Then I created a 300 sectors Galaxy, and it looked fine. Didn't have time to play in it yet, but i'll do ASAP.


What does the 1.5 version add ?
If brute force doesn't solve your problems, then you aren't using enough
Madw0lf
Posts: 323
Joined: Fri, 24. Dec 04, 01:53
x3

Post by Madw0lf »

The problem with gate linking is that currently the program only checks for sectors that are straight at each other, like Argon prime to, The Wall, Home of Light, Herrons Nebula, and Red Light (I think?) So if there are no sectors created within straight lines of NSEW but there is a CloudBase SouthEast, there will just be no connection. Only a real problem for very small maps.

As far as what 1.5 adds, Sector race grouping, which means that sectors of similar race will group together to a random extent.

Also more races for sectors (Goner, Yaki, Khaak).

Other than that, just explore and pay reaaaaallly good attention to the names of things on the sector map..... :wink:
User avatar
Ikaruga
Posts: 376
Joined: Fri, 30. Jan 04, 14:26
x4

Post by Ikaruga »

I played a little bit in your universe :

Sectors are beautiful : i saw an entire purple sector, was really cute ;)
They are big ! That 's a good point too.

There seems to be enough factories to have a balanced economy. There are shipyards, equipment docks ...

And many freebie ships, which is nice to see, too !




I noticed a bug : I was in a random "Home of light" and went to a random "Olmackenslat's treaty". I enter the sector, and am immediately warped back to home of light. Maybe a gate which is misplaced ...






WISHLIST :


- more customisation (how many Argon secotrs? How many shipyards? How many free ships ? )

- include a map editor, like the one there is in the Galaxy Editor i gave you the link a few posts ago.

- automatically create a init script, so you don't always start in a buster in argon prime.




Thanks in advance

Keep up the good work ;)
If brute force doesn't solve your problems, then you aren't using enough
Madw0lf
Posts: 323
Joined: Fri, 24. Dec 04, 01:53
x3

Post by Madw0lf »

Im glad youre enjoying it so much! Its absolutely amazing how gorgeous these things can look with no "design" behind them.

The Economy had better be balanced, hehe, spent a good bit of time working on weighting what kind of station would be placed down. :P It also seems youve found the main new feature in the 1.5 release. 8) :D

Hmmm...thats an odd problem, are you sure it isnt due to the old boost straight outta the gate and warp back through issue? If not, could you send me the map file so I can take a look? :)

Some of those features are ones I want to implement in 2.0, there will be alot of customization, but itll be streamlined. The map editor has been mentioned in another thread, and I may look into doing something of the sort eventually, but it probly wont be in 2.0.

Definately want to do an init script or so, got an idea of a starting place to use....just need to learn how to do that. :D
User avatar
Ikaruga
Posts: 376
Joined: Fri, 30. Jan 04, 14:26
x4

Post by Ikaruga »

Definately want to do an init script or so, got an idea of a starting place to use....just need to learn how to do that. Very Happy

It's very easy to do

create a script called galaxy.(your galaxy name).initplayership

Example : galaxy.randomuniverse.initplayership

And in this script, build a ship at a given sector with the stuff you want.
The player will start in this ship, and not always at Argon Prime in a Buster.
8)


Needs to be tested, but I think it's not much harder than that.
If brute force doesn't solve your problems, then you aren't using enough
Madw0lf
Posts: 323
Joined: Fri, 24. Dec 04, 01:53
x3

Post by Madw0lf »

Played with it for like 10-15 minutes yesterday, couldnt make it work. But once I have a cahnce Ill push it some more. :)
Cedric_FP
Posts: 191
Joined: Thu, 13. Apr 06, 17:56
x4

Post by Cedric_FP »

Madwolf, is the feature for adding "periphery" sectors still on track?

Thanks!

Cedric
Madw0lf
Posts: 323
Joined: Fri, 24. Dec 04, 01:53
x3

Post by Madw0lf »

Aye its still planned, not implemented yet but planned.
Madw0lf
Posts: 323
Joined: Fri, 24. Dec 04, 01:53
x3

Post by Madw0lf »

Just thought Id pop in a status update for those interested.

Not much progress has been made as of late, schools been really tight, lotta work for it this semester. Perhaps over winter break I can make some decent progress... :roll:

As well, I attempted to create a custom start the other day, but my X3 install seems to be fubared (again! Next time Im doing two installs! :P) And, again it may be awhile before I can get it reinstalled in order to work on/test a start. :(

Now, Im going to ask for some help here actually (Gasp!!!) Since Im so crunched for time, what I would like is one, maaaaybe two people to do some data entry type stuff for me, basically compiling a good amount of data into a .txt file for usage..PM me if youre interested. :)
smiley
Posts: 1119
Joined: Fri, 16. Jan 04, 16:34
x3tc

Post by smiley »

This is my second attempt at this reply (I thought it work yesterday).

I downloaded this script/mod thingy yesterday (my current game is getting a bit slow).

First I downloaded the v1.5, but noticed that that bundle did not contain the exe files. So I deleted it and downloaded the v1.0 bundle, and then redownloaded the v1.5. Then I reread the readme file to see what I had done wrong. Having sorted that out, I ran the program and managed to find the universe in the game startup window.

Incidentally, when I copied the cat & dat files I renamed them to 11 (rather than 10). Would this make any difference?

Anyway, has anyone else had this problem? I went through a few gates and looked at my universe map. All the sectors (though owned by different races and having completely different layouts) were in exactly the same places as in the vanilla game. The gate connections are different but the map looks exactly the same.

I assumed that when I ran the random universe creator exe file, it had produced a version 1.0 universe, so I moved that file into the v1.5 folder and tried again.

Then something really weird happened. I went through a few gates again hoping the universe map would have sorted itself (but it hadn't). Then in one sector I tried to target a station right in front of me and the game insisted that I wanted to target an asteroid that was some way behind me (roughly -4,295,483m away - and that is a negative number). So I tried toggling through all possible targets. When it got to the station I wanted the game crashed (froze).

Any help/suggestions would be much appreciated.

Anyway, enough of my problems. It's possible I may be able to help you with the grouping of race sectors. A while back I created some random universes of my own (using squared paper, a pencil, some D&D dice and the random number generator on my calculator). I made up some rules (which seemed to change/adapt as I went along) and managed to create some interesting universes with reasonable groupings of sectors for each race. Typically, I can no longer find any of the maps. But with a little thinking, I may be able to dream up the rules again, if you are interested. Bear in mind, the gate connections were the bit that gave me particular problems.

Also, if you are still desperate for a data junkie for your txt file (you did ask a couple of weeks ago), I have some time to spare.

Smiley
If you can keep your head while all around are losing theirs . . . you'll be taller than them.
Madw0lf
Posts: 323
Joined: Fri, 24. Dec 04, 01:53
x3

Post by Madw0lf »

smiley wrote:This is my second attempt at this reply (I thought it work yesterday).

I downloaded this script/mod thingy yesterday (my current game is getting a bit slow).

First I downloaded the v1.5, but noticed that that bundle did not contain the exe files. So I deleted it and downloaded the v1.0 bundle, and then redownloaded the v1.5. Then I reread the readme file to see what I had done wrong. Having sorted that out, I ran the program and managed to find the universe in the game startup window.

Incidentally, when I copied the cat & dat files I renamed them to 11 (rather than 10). Would this make any difference?

Anyway, has anyone else had this problem? I went through a few gates and looked at my universe map. All the sectors (though owned by different races and having completely different layouts) were in exactly the same places as in the vanilla game. The gate connections are different but the map looks exactly the same.

I assumed that when I ran the random universe creator exe file, it had produced a version 1.0 universe, so I moved that file into the v1.5 folder and tried again.

Then something really weird happened. I went through a few gates again hoping the universe map would have sorted itself (but it hadn't). Then in one sector I tried to target a station right in front of me and the game insisted that I wanted to target an asteroid that was some way behind me (roughly -4,295,483m away - and that is a negative number). So I tried toggling through all possible targets. When it got to the station I wanted the game crashed (froze).

Any help/suggestions would be much appreciated.

Anyway, enough of my problems. It's possible I may be able to help you with the grouping of race sectors. A while back I created some random universes of my own (using squared paper, a pencil, some D&D dice and the random number generator on my calculator). I made up some rules (which seemed to change/adapt as I went along) and managed to create some interesting universes with reasonable groupings of sectors for each race. Typically, I can no longer find any of the maps. But with a little thinking, I may be able to dream up the rules again, if you are interested. Bear in mind, the gate connections were the bit that gave me particular problems.

Also, if you are still desperate for a data junkie for your txt file (you did ask a couple of weeks ago), I have some time to spare.

Smiley
Smiley, thanks for the heads up PM. :)

It is odd that theres no .exe in the 1.5 DL....there should be. Suprised noones mentioned it before. But yes, using the one from the V1 pacakage should work just fine, so long as youre using it with all the V1.5 files. :)

The cat/dat files just need to be renamed to the next higher of the last ones in your directory. (ie, if there is a 10.cat, the generator files would be 11.)

The thing is, until version 2.0 rolls around, the generator will not produce sector names for the game. This tends to lead to the galaxy map appearing similar to vanilla. The big thing is the actual sectors are significantly different. (even though it may be called Argon Prime, it looks nothing like the vanilla version) So what youre seeing with the map is perfectly normal. :)

As for the freeze....thats really odd and sounds like its just a game glitch. Could you tell me the name/race of the station? Just to be safe.

While I think I have the race groupings pretty well set....Its always good to see another out look, so Id love to hear what you have to say. :)

And Ill be PMing you soon with details of how you can help me. Thanks alot mate!

:D
smiley
Posts: 1119
Joined: Fri, 16. Jan 04, 16:34
x3tc

Post by smiley »

Okay, a little more on my discoveries in my random universe.

With regards to the weird asteroids - Started a knew random game and found myself in Kingdom End (owned by Kha'ak). Tried to target the east gate and found one of those asteroids. Distance -4294967m, Coords 4294km, 4294km, -4294km. Also, when you turn to see if you can actually approach the asteroid, it always ends up behind you like some freaky little weiner dog.

Took in a couple more sectors and found another of those asteroids in Menalaus Frontier (Paranid). Distance -4294967m Coords -4294km, -4294km, 4294km. Then found another in the same sector. Same distance. Coords 4294km, 4294km, -4294km.

Now I have a query about how you make your random universe. Let's say that I'm in Argon Prime (owned by Kha'ak - nice big sector with just 3 gates N,E,S) and I go through the East Gate. I come out into another sector, owned by the Split with 3 gates N,W,E. When I look at the universe map, I find that it's Tharkas Sun. There's a great big gap on the map, and no little gate connection line between them (cos they're so far apart). Now my question is, if you can take a sector and change it's size, race, layout, number of gates etc, why do you not just use the next sector along (The Wall) rather than using a sector a long way away?

Now having said that, I assume that the big gaps are something that you've done rather than just a bug that I've managed to manufacture. Otherwise, I'm just going to look stupid (again! - I'm used to it).

And another little observation, did you know that when you go back to playing a normal game of X3, all the gates connection lines on the map aren't there anymore? Something you've written has taken them out (not that it matters for the original game, as we've all known the sector map for the last 3 generations of the game).

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

Now here's how I do it (the hard way), which you may or may not want to take any notice of (or just part of).

1 - I work out roughly how big I want my universe (say 20 by 15 sectors). Mark out a grid 22 by 17 (the extra surrounding sectors are useful, and you're going to lose some inner ones anyway).

2 - Using my trusty 20 year old calculator (we did have them in my day) I generate a grid of random numbers. The numbers tend to represent the races 1=Argon, 2=Boron etc. I include Pirate as a seperate race and I'm thinking about Kha'ak too (but the last time I included them they managed to overrun most of the universe (21% of it). But that's a truly random universe for you (and there were no Split sectors at all). So, as for Kha'ak, I either include them and then find some way to reduce their number later on, or leave them out and then find a way to introduce them later on. Oh, and I also include zero to mean 'no sector at all' (this leaves nice little gaps in the map. Groovy.

3 - Have to find some way of getting the numbers into groups so that the races can have their sectors joined together rather than completely spread out. This is the really tedious bit, but it looks nice in the end. Starting at square 1, row 1, look at it and the sectors surrounding it (there will only be 4 squares this time). Which number (race) has more of the squares than any other? Then that race gets the sector. A draw? Then put an 'x' in it and leave it undecided. Do this for the whole grid. You should find that the numbers will have become a little more 'groupy'. And don't forget to put a dash or something where the zeros were to show there is no sector.

4 - How many gates are the in each sector? Using the trusty calculator again, but only taking 1-4 this time, I make another grid but only 20, by 15 this time (the outer sectors may or may not be included - depends if they get a gate leading to them after the next to bits).

5 - Now this is the bit that I'm struggling with. I have tried many methods, none of which really works. My last attempt was with a 17 by 12 map that ended up with 10 completely unconnected little regions. But then smaller maps are more likey to end up with this problem, and corners are the most likely bit to end up isolated (so maybe I need a quick fudge at the end to overcome it).

My current method is to cross out all the empty sector first, then put in connections from all the sectors with 4 gates. My thinking behind this is that you have no choice as to which gates you put in for these sector (unlike a sector with 2 gates) - you just put them all in unless they are next to a missing sector, of course. Next, I check to see if any sectors round the 4s have the required number of gates already (like a 1 next to a 4, or a 2 between two 4s). If you end up with a 1 between two 4s, tough, it becomes a 2. But these sectors are then closed off and no more gates can be joined to them. Then I look at all the 3s which hopefully will be easy to join up to their neighours . . . then whatever is left . . . this is where things start to get a bit undecided. Sometimes it works, sometimes you end up with a load of 3s that have 4 possible gates and you have to use some other criterion to make a choice blah blah blah etc etc etc.

Another thing I've tried is putting in some of those nonstandard connections (across gaps - or East gate to South gate) to get things all connected up.

As I said my last attempt didn't go too well, but I'm still working on it. Maybe I just need to dream up that sneeky cheat to get over this problem.

6 - Assuming you've managed to produce a viable network in part 5, this is the bit where you group the sectors a little more, get rid of those undecided 'x' sectors and maybe introduce some Goners, Yaki, unknown sectors etc.

Using a methodology similar to part 3 you look at each sector again, but only look at the sectors around it that have a gate connection to it. If there are more 2s in that group of sectors than anything else, then race 2 gets the sector, but this time, if there's a draw then the sector stays as it is. Unless, of course it is one of those dreaded 'x's. Then you have to make up some rule to either make it unknown, Goner, Yaki, or something else.

This bit needs some polishing (okay some serious rethinking) to make the ratios reasonable, or you could end up with a pretty wacky universe. But then it is supposed to be random, so it's up to you if you want 33 Xenon sectors or something more handleable.

The problem with a truly random universe (even when you do manage to get one that is all connected up) is that you may end up with a couple of races either very scares or missing, or you may end up with only one connection between the east half of the map and the west half and that connection could be a large area of 7 or more Xenon sectors. Or you could have a nice balanced (boring) universe where everything is easy.

So, take from this whatever you wish. I would recommend parts 1-3, part 4 is probably okay, but the rest needs some serious work and maybe you're better of with what you've already got.

Thinking about it again. Maybe what I need to do is (at stage 5) just connect up all the sectors of similar race, to create race based clumps, and then just refer back to my random number of gates (part 4) to see if any sectors are missing some gates so that those clumps can be connected together. I'll get back to you on that one (if it works).

That's more than enough for now.

Smiley
If you can keep your head while all around are losing theirs . . . you'll be taller than them.
Madw0lf
Posts: 323
Joined: Fri, 24. Dec 04, 01:53
x3

Post by Madw0lf »

With regards to these asteroids, can you get me the .xml map fiile for that universe so I can look into this? (May have some coord max bounds outside of the sector box size)

The sector grouping is exactly how it should be. The way the program works is it runs two sets of random numbers, one between....0 and 20, the other between 0 and 19 (I believe, best I can remeber without looking it up) One random number is the X coordinate of the sector in question, the other is the Y, this means that with any universe < 480 sectors, there will be blank spaces.

The lack of gate connections actually has nothing to do with anything I did...in a way. Theyre due to the 00749.bod file (Generously provided by Unitrader :) ), which boxes out the galaxy map. Unfortunately the game can only recognize so many connections from that file, which means after so many sectors it causes issues (dont know exactly what...) So he created a flat map with all 480 possible boxes but no gate connections to make life a little easier over all.

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

Wow, very indepth way of doing that, from what I see it seems like you do it kinda the way I do, but you may want to consider weighted randomness, will prevent you from having none of/too much of any race. :wink:
smiley
Posts: 1119
Joined: Fri, 16. Jan 04, 16:34
x3tc

Post by smiley »

Okay, how do I send this XML map to you?
If you can keep your head while all around are losing theirs . . . you'll be taller than them.
TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 »

How is the universe map generated? I'm talking about the in game universe map with the boxes and lines showing where gates connect each sector.

I the a piece of software that will generate that from a galaxy map?

Would it be possible to get that software? I trying to make a custom galaxy for my game, and this would be very helpful.
My mods for X3TC & X3AP

Been with the X-series from the beginning. If it happens in the X_Universe I've been there done that several times over.
Madw0lf
Posts: 323
Joined: Fri, 24. Dec 04, 01:53
x3

Post by Madw0lf »

TEKing66 wrote:How is the universe map generated? I'm talking about the in game universe map with the boxes and lines showing where gates connect each sector.

I the a piece of software that will generate that from a galaxy map?

Would it be possible to get that software? I trying to make a custom galaxy for my game, and this would be very helpful.
The universe map youre talking about is just the 00749.bod file mentioned in this thread: http://forum.egosoft.com/viewtopic.php?t=194946

I dont know of the program that was mentioned to generate the file, unfortunately.[/url]
User avatar
DarrenTomlyn
Posts: 205
Joined: Sun, 17. Oct 04, 19:06
x3ap

Post by DarrenTomlyn »

Hi... I've been playing around with this map generator for the past couple of days - and I think it's a great start, but I still have a few issues - (though whether or not it's the map system ot some other mods I have which are causing them I still need to test).

Of Course, the first thing that needs to be done for these maps are that the scanner ranges seriously need a boost - the area over which the stations can spawn is now so massive that it can take hours to find anything, even with a normal triplex scanner. (I've found out how to do that now, so it should be ok).

2nd - for some reason, (related to the 1st), any Nav Sat I dump in the system seem to spawn miles away (up to 300km) from where I told it to drop - which means that trying to find and keep track of things in the sector can be a big problem. (And make a lot of missions pointless, though fixing the first problem will fix this aswell).

3rd - for some reason, (not sure if its the map thats causing this), even if I drop or add an advanced NavSat - it doesn't show all the stations in the sector - (REALLY annoying!) - (will test later to make sure it's definitely the map system/game which is the problem).

Because of the above - generally the only way in-game to make sure you know where all the stations are is to buy the info - which costs money, which you can't get unless you know where stuff is etc. :p

On top of all that - (which can be helped a lot with increased scanner ranges) - for some reason - the 'move to position command' doesn't work - it once sent my ship in the opposite direction! This is also really annoying, but, again, I'll test it to make sure it's the map etc. which is causing it...

Like I said - it's a good start, but need to come with an updated global.txt file for scanner ranges and stuff to make it really playable...
Darren Tomlyn

Tune-writer and fiddle-player,

http://www.gamasutra.com/blogs/DarrenTomlyn/3291/
xTemon
Posts: 996
Joined: Tue, 9. Jan 07, 20:01
x3tc

Post by xTemon »

Couple issues:

1: Don't seem to have a universe.xml after run program; it's nowhere to be found.

2:It doesn't tell you where to find it in the readme :P

I assume it's supposed to end up in the universe generator folder; could this be an issue with Vista?

On a light note; you've made excellent progress with this program since it's inception. I'm very impressed; nice smooth application with no hitches or glitches, unless you count the missing final product :wink:

I see the thread has almost fallen to the depth's; are you still working on this for 2.0? I'd like to test it out when you release it :)

edit: issue resolved; seems Vista security was preventing the file from being generated from within program files. Moved it to desktop and ran it from there; generated a nice clean .xml :)

Nice work :D

edit2: Crashed my game :D Soon as I targeted the south gate of the entry sector :lol: Still needs a bit of work I see :P Regardless; some min./maxing of distances applied to sector positions for objects--gates to close and stations to far--and it will work fine, I'm sure. Always had problems with adding maps myself; so nothing new there, could even be my PC
I'll see if I can't get better results next time :wink:

edit3: 215 sectors this time, (last attempt was 374), and it worked with only a little flickering of my screen from time to time. Still; big sectors--maybe too big--and minimal life - minor modifications for the latter. Personally, I would recommend toning down sector size or giving an option for max sector size if possible; this might make it easier easier on PC's like mine: AMD 64x2 4800+@2.5GHz, M2N-E mainboard, 4 GB RAM@667MHz, 256MB 8500GTS Graphic's card, etc.. *chuckles*

Also, I think minimal life is more a result of spread all over beyond sensor range than anything else.

recap: gates with min./max distance from center of sector, optional sector sizes, asteroids anywhere--makes them harder to find--and stations within bounds of sector defined by gates+ I think that would work well; and of course a repair for the wonky gates issue. Also, could gates facing relative center of sector be workable; flying around to the other side to exit the sector is al ittle odd :P
:headbang: Microsoft
Madw0lf
Posts: 323
Joined: Fri, 24. Dec 04, 01:53
x3

Post by Madw0lf »

Yeah, sorry for the lack of recent updates, this semester of school is being a real pain. :( Cripes this whole year has been...

Ill try to get these issues sorted soon, I really hate that I havent been able to work on this lately. :(

On a side note, I started this whole thing almost exactly one year ago, wow.
User avatar
DarrenTomlyn
Posts: 205
Joined: Sun, 17. Oct 04, 19:06
x3ap

Post by DarrenTomlyn »

Hello again - been playing this game a lot more recently...

I generally use your map generator as a start - then go through the xml file and edit it manually...

The main problem I've found with it - (which is the reason why it's been crashing the moment you try and enter a particular sector - (though OOS seems to be ok?) - is that it likes duplicating sector co-ordinates, and the game doesn't like having 2 'Kingdon Ends' etc.

TBh - I'm basically just trying to create my own 480-sector map atm, though I'm having to figure out what exactly all the stations are - the f218 or R256 doesn't exactly tell you much! (And I'm copying them all form the wares xml file in game, so they'll work properly):

2nd problem - it doesn't create some stations properly - (mainly mines it has to be said) - i.e. they have no product/required resources etc.. Like I said - I'm just copying the files from the wares? template xml file in game... Takes a long time to do a 480 sector map manually though - (but I still find editing the xml directly easier than using the editors!).
Darren Tomlyn

Tune-writer and fiddle-player,

http://www.gamasutra.com/blogs/DarrenTomlyn/3291/

Return to “X³: Reunion - Scripts and Modding”