.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Utility: RanDom v2.03 - Map gen & Semirandomizer... Updated (http://forum.shrapnelgames.com/showthread.php?t=34826)

Ballbarian February 10th, 2009 12:31 AM

Re: RanDom v2.03 - Map gen & Semirandomizer... Updated
 
Thanks a ton das123! :up::cool::up:

I read through your guide and jotted some very rough notes & thoughts which I will share here:


************************************************** ************************************************** ***********
section: Map details setup
Might be nice to have a few notes on how I come up with appropriate dimensions versus province count. Now what did I do with that formula??? As a general rule, decide on how many provinces you would like and look for an existing map with a similar count and use it's dimensions as a general guide.

Normal Mount check box - when unchecked mountains are impassable and can create choke points within a map. When checked, mountains are provinces themselves (like they were in DomPPP & Dom2).

section: Borders
Map Noise - Adds a speckling effect to the map lands. Increasing this slider increases the speckling. A little can add some texture, too much can get pretty ugly. I usually set this around 15 or less.

section: General Tab
Fiddle Prov% - note that can be set above 100%. The higher the setting, the more time SemiRandom is allowed to try to fill provinces.

Fiddle XP - note: (to clarify) leave unchecked to keep from showing up in the Hall of Fame.

section: Starts Tab
Provinces Per Player - This one is a rather strange and hard to describe critter in how it relates to some of the other settings. Maybe the easiest way to describe it is the following:

DEFAULT_PROVPERPLAYER=20
Priority is:
1. numPlayers
2. provPerPlayer (numPlayers=provCount/provPerPlayer)
3. DEFAULT_PROVPERPLAYER (numPlayers=provCount/20)

So if numPlayers has a value other than -1, then this is the number of player starts that semiRandom will try to place.

If numPlayers is set to -1, and provPerPlayer has a value other than -1, calculate the number of starts to attempt to place by dividing the total province count by the provPerPlayer value. Hmmm. Setting this to zero will surely crash the program. Damn sloppy programmer. :)

If both numPlayers & provPerPlayer are set to -1, then just use the default value of 20 to calculate numPlayers based on the number of provinces on the map.


Lock Player to Nat Cfg checkbox - When this box is checked, changes to a nations sliders (in the nation configuration screen) will adjust the "Desired Num Players" count. Setting a nation to "HUMAN" or "AI" will increase the number of players and changing a nation to "DISABLED" will reduce this value so you don't have to. If you enable a sea nation (like R'lyeh) it will also increment "Max Sea Starts" for you or decrease it if you disable a sea nation. And finally, it will automatically adjust "AI Land Players" & "AI Sea Players" for you as you make changes to the sliders. I highly recommend leaving this box checked.

section: AI Gods Tab
How can you tell which races have .god files?
Ah, sorry. That is not as easy to check as I made it sound.
Unless I have missed a recent patch added nation, all early & mid era nations should have a god (as long as the user has downloaded all of the available god files from the RanDom forum thread) and I believe that with the addition of Stavis_L's god files we have one for every late era nation as well. If you look in your GOD_BIN, you will see that the god file names contain the nation number and which era they belong to. So nation zero (0) is EA Arcoscephale.

************************************************** ************************************************** ***********

I hope that helps to fill in some of the gray areas and thanks again for your wonderful contribution. :)
Two penguins up for you! :penguin: :penguin:

das123 February 10th, 2009 04:25 AM

Re: RanDom v2.03 - Map gen & Semirandomizer... Updated
 
Thanks for the feedback. :)

I'm working my way through it. I've come up with a simple(ish) formula for map dimensions. Essentially if you allow each province a 120 x 120 pixel dimension, you simply multiply the number of provinces by 120 squared to get your total pixels. To make a square map you just take the square root of this total; or you can set an arbitary width - divide the total pixels by this amount to get the height. So the the formula is w x h = p x (120 x 120).

With Fiddle Prov%, is it a logrithmic scale, linear scale, or some other formula. I'm wondering if 100 in the builder is really 50% or some other figure?

I'll post next draft again soon.

das123 February 10th, 2009 05:28 AM

Re: RanDom v2.03 - Map gen & Semirandomizer... Updated
 
1 Attachment(s)
Here's the next draft addressing the items raised...

llamabeast February 10th, 2009 10:02 AM

Re: RanDom v2.03 - Map gen & Semirandomizer... Updated
 
VERY nicely done das123, thanks!! I think I will finally have a go at using this now.

llamabeast February 10th, 2009 10:05 AM

Re: RanDom v2.03 - Map gen & Semirandomizer... Updated
 
Am I correct in understanding that in order to get all the data files, we should look through this thread to find all the available downloads?

Maybe we could compile them all into one single download?

Ballbarian February 10th, 2009 02:41 PM

Re: RanDom v2.03 - Map gen & Semirandomizer... Updated
 
Quote:

Originally Posted by das123 (Post 673564)
Thanks for the feedback. :)

With Fiddle Prov%, is it a logrithmic scale, linear scale, or some other formula. I'm wondering if 100 in the builder is really 50% or some other figure?

Nothing fancy, just a brute force applied via a blunt hammer. :)
Here is the relevant code:
Code:

REM Set fiddleCount (how many provinces to modify)...
fiddleCount=int(((provCount*fiddlePercent)/100))

REM Select random provinces to mark for modification...
fin=false
i=0
attempts=0 REM Saftey to prevent risk of infinite loop...
while (fin=false)
  attempts=attempts+1
  x=int(ran(provCount))+1
  if terFlag(x)=0 then
        if offLimits(x)=1 then
          terFlag(x)=-1
        else
          i=i+1
          terFlag(x)=1
        endif
  endif
  if attempts>=(provCount*(10*fiddlePercent)) then
        PRINT #9 "*** WARNING: ATTEMPTS >= (10xfiddlePercent)xProvCount ***"
        PRINT #9 "Could not select desired number of provinces for modification."
  endif
  if (i>=fiddleCount) or (attempts>=(provCount*(10*fiddlePercent))) then
        fin=true
  endif


Ballbarian February 10th, 2009 02:46 PM

Re: RanDom v2.03 - Map gen & Semirandomizer... Updated
 
Quote:

Originally Posted by llamabeast (Post 673592)
Am I correct in understanding that in order to get all the data files, we should look through this thread to find all the available downloads?

They should all be listed in the first post of this thread with either links to the download or links to the post containing the download.

Quote:

Originally Posted by llamabeast (Post 673592)
Maybe we could compile them all into one single download?

This is actually a fairly high priority. I would be tickled pink if someone put together a compilation before I got to it. :)

das123 February 10th, 2009 03:31 PM

Re: RanDom v2.03 - Map gen & Semirandomizer... Updated
 
Ahhh, so the percentage is the number of times the program will randomly select provinces for changing. As the program can select the same province more than once, 100% is in reality closer to 50% of the provinces being affected. 200% would be statistically about 75% and so on. So it works logarithmically in effect. :)

Jazzepi February 10th, 2009 03:52 PM

Re: RanDom v2.03 - Map gen & Semirandomizer... Updated
 
Is there any way you could create a province generator that would make wrap around maps? :9

Pretty plz?

Jazzepi

llamabeast February 10th, 2009 06:38 PM

Re: RanDom v2.03 - Map gen & Semirandomizer... Updated
 
ParadoxHarbinger made one Jazzepi. The maps it makes are a bit garish, but I understand it works well. I suppose the solution would be some photoshopping (or GIMPing) after they're generated.


All times are GMT -4. The time now is 12:14 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.