View Single Post
  #15  
Old May 27th, 2007, 04:44 AM
Ballbarian's Avatar

Ballbarian Ballbarian is offline
Colonel
 
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
Ballbarian will become famous soon enough
Default Re: RanDom v2 - Map gen & Semirandomizer... the se

@Gandalf
Great! That will make a perfect addition.

@jutetrea
Sure.
The parameters are:

numPlayers
--> -1 means use DEFAULT_PROVPERPLAYER or provPerPlayer (0=NO START PLACEMENTS), otherwise how many starts are desired.

provPerPlayer
--> -1 means use DEFAULT_PROVPERPLAYER or numPlayers, otherwise this will determine how many starts can be placed dependent on province count.

minNeighCount
--> -1 means use DEFAULT_MINNEIGHCOUNT, otherwise value entered is the minimum neighbor count before a province can be a valid start.

maxSeaStarts
--> -1 means use default of 3. Use this to limit sea start placements.

enforcedSpace
--> -1 means no space enforcement, otherwise value entered enforced. This is the minimum number of provinces between start positions.

Provinces adjacent to start provinces are set off limits to prevent SemiRandom from assigning any specials to those provinces.


As a side note:
I know that there are algorithms out there that would have worked just as well (likely better) than this one, but I came up with it from scratch. Anyhow, keep in mind that it is possible to set numPlayers to "7" only to find that SemiRandom only placed 6 start positions. I added a fidgeter into the algorithm early on to mix up the results a little from run to run which keeps every run on the same map different, but as a result it will not be optimized.

This is also probably a good time to point out that my entire approach to this project from day one was to keep it moving by letting myself be a little sloppy at times. Kind of one hack stacked on top of another to get the end result that I wanted, and then work another idea into it. Time is a serious issue for me, so this (and many other projects) are what I do for fun.
__________________
RanDom v2 - Map gen & Semirandomizer.
Province Editor - Custom province creation made easier.
God Editor - Custom pretender creation made easier.
Map Forge - Map editor
Reply With Quote