OOTP Developments Forums

OOTP Developments Forums (https://forums.ootpdevelopments.com//index.php)
-   OOTP Mods - Names and Nations (https://forums.ootpdevelopments.com//forumdisplay.php?f=3641)
-   -   WorldGen (for OOTP) - Random World Generator (https://forums.ootpdevelopments.com//showthread.php?t=206059)

davwms 02-12-2011 10:55 PM

WorldGen (for OOTP) - Random World Generator
 
2 Attachment(s)
This is the "next generation" of my "City Name Generator" program.
I finally started making headway on this program. I did a lot of research on how cities and towns are named in the United States. Unfortunately, this means that the program currently only generates "American" city names. I simplified the data files to include just root words, prefixes, suffixes, and names. Most cities and towns were either named after a person or were descriptive of the area. Then they might add a suffix and/or prefix to create the name. This program basically does the same thing, but I still need to work a little more on it.

When it's complete, it will randomly generate fictional nations.txt & cities.txt files.

Current Features:
  • Can randomly create up to 4 nations. (Just to keep it simple for now.)
  • Generates the Country Name and Nationality
  • Generates 400,000 cities within a just a few seconds (Screen freezes momentarily if generating more than that)
  • I have had it successfully generate over a million cities at one time
  • Also, it will be able to generate latitude and longitude for each city, while keeping the nations separated.
  • Does not generate duplicate city names.

Here is a screen shot below and just a sample of the city names that it generates currently. This sample list of 100,000 names was generated in less than 2 seconds. I still want to add to the data files to allow for much more wide spread naming. The generated country names are pretty poor, to be honest, but I believe most people would want to name the countries themselves. This at least gives them something to work with if they want it.

Chicagofan76 02-13-2011 12:25 AM

That is possibly the coolest program i have yet to see for any baseball game not just OOTP...where was it 4 months ago :crying: j/k
congrats.

davwms 02-13-2011 04:23 PM

1 Attachment(s)
Here it is... HERE

I don't have instructions typed up, yet.. but the quick version is this:
1) Download the zip file using the link above. While downloading, backup your OOTP database folder.
2) Decompress the files to a folder of your choice.
3) Launch the program.
4) Make any changes in anyplace you want. Make sure that only numbers are used where there should be only numbers.
5) Click Continue=>
6) in the WorldGen folder you created, there is a folder named 'database'. Copy the two files from here to the OOTP\Database folder.
7) Launch OOTP and create a new fictional league.
8) You may need to go into the setup and select the country for the league.
9) The rest is up to you...

Here's a new updated screen shot..

I want to add country flags.. and some how have it create better country names...

Chicagofan76 02-13-2011 06:32 PM

cool...few minor questions

is there a way to have the nations part become 229 or later vs 1?
the long/lat does that match up with anything in particular?
Oak City,23371,1,Endor,16.66,8.95 the long/lat #'s dont seem to match up with anywhere that I can find how much does that matter for the game?

is there a way aside from doing it manually to create states as well?

but thanks bro u made my job alot easier.

davwms 02-13-2011 07:53 PM

Quote:

Originally Posted by Chicagofan76 (Post 3095197)
is there a way to have the nations part become 229 or later vs 1?

I can try to add that in the next version/update. In my mind I was thinking this was creating a different world altogether, but I should be able to add this option in easy enough.

Quote:

Originally Posted by Chicagofan76 (Post 3095197)
the long/lat does that match up with anything in particular?
Oak City,23371,1,Endor,16.66,8.95 the long/lat #'s don't seem to match up with anywhere that I can find how much does that matter for the game?

Your Oak City would be someplace a little east of Agadez, Nigeria... :-) For simplicity sakes I have it creating the countries based on where the prime meridian and the equator cross, which would be 0,0. That's why I only have it creating 4 countries, too.

I think the only thing that this affects really is how a player might prefer to play closer to home. I'm not sure

Quote:

Originally Posted by Chicagofan76 (Post 3095197)
is there a way aside from doing it manually to create states as well?

I could try to add that in also.. but seeing as the country names I have it generating are so bad, I thought I would just skip the states/provinces part..

Chicagofan76 02-13-2011 09:38 PM

actually the 229 vs 1 isnt that big of a deal I created 10 cities for Gotham which is the state so once I change the 1 to 229 it was fine, but the long.lat still bothered me....Endor is USA USA is 4 correct? which 4 is the default in your program..or did i do something wrong?

davwms 02-13-2011 10:21 PM

Quote:

Originally Posted by Chicagofan76 (Post 3095263)
actually the 229 vs 1 isnt that big of a deal I created 10 cities for Gotham which is the state so once I change the 1 to 229 it was fine, but the long.lat still bothered me....Endor is USA USA is 4 correct? which 4 is the default in your program..or did i do something wrong?

You would have to change the 1 in the cities.txt file as well as the nations.txt file.... USA is 4? Im not sure what you are talking about, I guess.. In the nations.txt file, USA is 226...oh.. you're talking about the region.. which actually doesn't have anything to do with the latitude and longitude. I honestly don't know how it affects the OOTP world.
Region of the world. These are hard-coded in the database, in a six-continent model:
1 = Africa
2 = Asia
3 = Europe
4 = North America
5 = Oceania
6 = South America

Note: The region model is not intended to be 100% accurate. Many smaller nations are grouped in with the closest approximate match.

Are you trying to combine the fictional world and real world? This isn't what I had in mind when creating this thing. I just was looking for an easy and quick way to create a completely fictional world from scratch. If the world is created using this program, the different settings like region, latitude and longitude are fine and work as needed for the game.

If I remember reading about what you were doing correctly, I think you were basically replacing city names with your own city names in the nations.txt file. I didn't want to do all of that work and that's why I wrote this program. :-) If you were to just run this program to create the cities, then rename the ones you wanted to, that would solve the problem you are having now...If you open both files in excel, you could just copy the column with the city names and paste into the corresponding column in the new file.

Chicagofan76 02-13-2011 11:19 PM

ok what affects long and lat? other then players signing with home team?

The way I am doing my EBL is matching each of my cities up with a real city going into the cities.txt copying it and the pasting it into a dummy file so i can edit it then copying that into the schools files and doing those then cutting the copy back into the orig cities file. then i copy and paste for weather also.

I guess what my concern was with the various long/lat was the weather.

I guess tech. i dont need long and lat for my nations...do i?
I was just pretty much making my world reflect how the game is already.

davwms 02-15-2011 07:37 PM

No, you don't need latitude and longitude for your cities.. in fact, I think if you look at the cities.txt file that came with OOTP, you will find some cities that don't have either...

I believe it only affects players preferring teams closer to their home, but I don't even know how much. I really only added it in for anyone who uses the program and wanted to see how close cities were to each other (or they could decide this on their own)

You got me thinking about a couple of other things though, too.. the schools file and the weather info... I have never looked into either of them, yet.

davwms 02-15-2011 08:04 PM

I found this in a post by "clamel"

Quote:

The use of schools.txt
With that fine list of schools.txt in the game why not use it more....

As I understand it is used only to add text to History notes for players, so that he got drafted from this or that school.

What would be great is that it is used when Feeder College and High School teams are created for your Feeder leagues.
Some parameter that creates to top 10-12 college conferences with whatever college teams that playes in them.
High Schools could just be picked whatever.

All the info about schools, NCAA and such are in the file so why not use it better.

So, as I thought, the schools.txt file is just for naming the schools that a player was drafted from when not using feeder leagues...

Chicagofan76 02-15-2011 09:01 PM

Quote:

Originally Posted by davwms (Post 3096030)
I found this in a post by "clamel"



So, as I thought, the schools.txt file is just for naming the schools that a player was drafted from when not using feeder leagues...

I am hoping that in 12 or 13 i can edit the schools that a player came from

But thank you for creating this program I have done 2/3 of my extra planets/nations using your program i just change the names of the cities and sometimes the pop I leave the long/lat alone.

Chicagofan76 02-15-2011 09:04 PM

Quote:

Originally Posted by davwms (Post 3096020)
You got me thinking about a couple of other things though, too.. the schools file and the weather info... I have never looked into either of them, yet.

I am sure u already know non usa school are not in there, and most non north america weather isnt in there....atleast none for mexico..Cuba is, which confused the heck out of me.

A schools generator would be a cool program especially if i can add/edit my txt after i start a new game.

Chicagofan76 02-16-2011 05:01 AM

not sure if it matters, but no matter which setting i use i get the same ethnicities files for each country

233,Alderaan,Alderaan,ALD,Alderaanian,5,0,25,100,0 ,0,0,0,0,0,123,30,716,6,125
234,Adega,Adega,ADE,Adegain,1,0,02,100,0,0,0,0,0,0 ,123,30,716,6,125
235,Bakura,Bakura,BAK,Bakuran,3,1,14,100,0,0,0,0,0 ,0,123,30,716,6,125

Alderaan is UK Adega is italian Bakura is czeck

tylertoo 02-23-2011 10:02 PM

This is great, thanks so much for making it. I'm using it to create a new fictional league. So far, works perfectly.

darkcloud4579 04-09-2011 05:27 PM

Wow. Kudos to you for this!

davwms 04-09-2011 10:45 PM

Thanks! It still needs a little bit of work (weather settings are off, among other things). But I created this program for the purpose of being able to create a fictional United States in as few clicks as possible.. I will have to think about how to set it up to create others and if it should just randomly create them or allow input for setting them up. Of course, allowing for the input makes it tougher on me.. :-)

Charlie Hough 10-16-2011 04:34 AM

Is this compatible with OOTP 12?

By the way, I can't get this to work in Windows either. I'm running Windows vista and installed the archived files, using folder names, to a directory on my desktop. After I change the settings and click 'continue', it says 'Run-time error 75: path not found'.

There is a data folder in the directory with all the CSV files, and the application is in the root directory above it. But it simply doesn't work.

davwms 10-23-2011 10:14 PM

I think it should work with OOTP12, too.. I don't think anything changed as far as the files that this uses/changes.

I just downloaded it again from the link in the original post, saved the files to my desktop, and it works fine. I am running Windows 7, BTW...

If you changed any of the .CSV files make sure that they are still formatted correctly. Also, if you change the names of those files, the program will not run.

If you think all of those are correct and it still doesn't work, try downloading it again.

Sorry for the late response, I missed the post and also somehow overlooked the email that you sent to me.

Charlie Hough 10-24-2011 12:50 AM

Unfortunately, it still doesn't work. I have already downloaded it multiple times and tried again.

Where are you installing the application? It says that I can install it anywhere, and I preserve the archived subfolders when I extract it. But whenever I click 'Continue' after reviewing the settings, it generates the run-time error '76': path not found.

And I haven't changed anything about the files. I have installed it exactly as is.

I'm also curious as to why this would work in OOTP 12 if the game now uses the world_default.xml file rather than the old files for fictional worlds. Does this utility generate a world_default.xml file?

davwms 11-29-2013 10:41 PM

1 Attachment(s)
WorldGen.zip

Trying to upload the file here, I think it's small enough.


All times are GMT -4. The time now is 06:41 AM.

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright © 2020 Out of the Park Developments