Custom Public Map woes

phalzyr

Warlord
Joined
Nov 3, 2005
Messages
137
Location
Illinois, USA
First my map so you can see waht I am asking...right click savetargetas...

http://209.174.48.134/downloads/David_Hub.py

I altered the hub map to have more choices, like plains/desert percent and ice percent in both hub and player regions. I also made the Solid option more solid (perfect square) and left slightly solid soemwhere in between it and pressed. I was going to have the option to completely have no land bridges which I ahd working first but it stopped working before I made any changes...

Is it just me or is their python map generation code a bit glitchy?... Her is some thing I done:

1. First tried to put an if around the lan bridge creation code since it does nothing more than make ocean plots into land plots it should be simply bypassed..... Locks up at initialization

2. Though I didn't see any relevant code in the for loop I decided to move my if statement to the actuall line that makes it LAND..... Map with only land....

Code:
3. Change the if to say LAND ELSE OCEAN.... Locks up at init...

if myvalue <= 3:
	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_LAND
else:
	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_OCEAN

and I tried the opposit order...

if myvalue == 4:
   	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_OCEAN
else:
	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_LAND

4. OK... Lets just go back to orginal and just simply change LAND to OCEAN so no matter what you pick it';; create ocean instead of land plots....LOCK UP at init...

5. Interesting...OK so that code is very very picky I'll just alter the spoke values so it only draws small distances.... LOCK up at init... OK only in center area.... LOCK up at init...

6. Several other things that ended up in either land only maps or lock up at init...

anyone else play with the public maps any? I also had other portions of the code not like simple if, even if they didn't change much...And YES I worded my ifs correctly and all...and tested before and after change so I made sure it worked before change making a 4 plot land bridge for my NONE option...

ARRRGG Anyone have any thoughts?
 
BTw, the map linked above works accept the mentioned option, so if you want it...

edit.. oh and one more thing I also made the (9 player option with 1 per) nineth person on center previously neutral area :)
 
At your #3.. What's "LAND ELSE OCEAN" supposed to mean? Don't you mean "LAND OR OCEAN"?
 
Junuxx said:
At your #3.. What's "LAND ELSE OCEAN" supposed to mean? Don't you mean "LAND OR OCEAN"?

If you were a programmer or been messing with the code alot you'd of understood...or maybe not what I meant was a statement something this:
Code:
if myvalue <= 3:
	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_LAND
else:
	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_OCEAN

and I tried the opposit order...

if myvalue == 4:
   	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_OCEAN
else:
	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_LAND
 
Oh, that's ok. The way you said it made me think you had a test like

if (LAND ELSE OCEAN)

which seemed a bit off to me.
 
:) I was trying not to get too cody in my post, I figured if I said I did it correctly that would be enough :D I didn't want to make a super long post with everything I did... but maybe I should of... I guess I should say I didn't use the name myvalue and I defined the one I did use gloablly and make it equal to the cusstom option...as is done with other variables in my code that worked...and that it would lock up if I choose "NONE" but not with 1plot and others for the isthmus... What I found ?disturbing? is that simply changing
Code:
self.wholeworldPlotTypes[i] = PlotTypes.PLOT_LAND
to
self.wholeworldPlotTypes[i] = PlotTypes.PLOT_OCEAN
locked it up, I even put a 3 instead of PlotTypes.PLOT_OCEAN since that is the value that it stands for just in case it was locking up due to the value not being assigned... btw 0 is for mountains, 1 for hills, 2 for land, 3 for ocean. I put in 0 and they were all mountain and immpassable but the spoke length went way to far into the palyer territory... I even put self.wholeworldPlotTypes = self.wholeworldPlotTypes thus not changing value but it still locked up. with how it work it should be all oceans anyway and skipping this code shouldn't effect a thing. There is nothing in that part of code used elswhere and it shouldn't care what types are present or not when combining the fractals... errrr unfornately this isn't the only change I made that caused issues, I made far simplier ones that made it becaome an all land map. One of which was changing it so grasslands not plains was the default for center area also.... Oddly enough adding tundra/ice to the player areas didn't cause an issue... It just doesn't make sense...
 
Junuxx: BTW does your map generating work better than there python coding? Could it do all that I was trying to do with my change to hub? Other than the resource thing and such I've seen mentioned how to do it elsewhere, but once that is included could it create a hub type map without spokes and as customizaable as I mad this map...? :D
 
Well, there's a few methods missing to have Atlas efficiently place such hubs and land bridges, but adding more templates, like hub, is on the to do list (not exactly on top though). When it's added, it will, of course, be completely customizable.
 
phalzyr said:
First my map so you can see waht I am asking...right click savetargetas...

http://209.174.48.134/downloads/David_Hub.py

I altered the hub map to have more choices, like plains/desert percent and ice percent in both hub and player regions. I also made the Solid option more solid (perfect square) and left slightly solid soemwhere in between it and pressed. I was going to have the option to completely have no land bridges which I ahd working first but it stopped working before I made any changes...

Is it just me or is their python map generation code a bit glitchy?... Her is some thing I done:

1. First tried to put an if around the lan bridge creation code since it does nothing more than make ocean plots into land plots it should be simply bypassed..... Locks up at initialization

2. Though I didn't see any relevant code in the for loop I decided to move my if statement to the actuall line that makes it LAND..... Map with only land....

Code:
3. Change the if to say LAND ELSE OCEAN.... Locks up at init...

if myvalue <= 3:
	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_LAND
else:
	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_OCEAN

and I tried the opposit order...

if myvalue == 4:
   	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_OCEAN
else:
	self.wholeworldPlotTypes[i] = PlotTypes.PLOT_LAND

4. OK... Lets just go back to orginal and just simply change LAND to OCEAN so no matter what you pick it';; create ocean instead of land plots....LOCK UP at init...

5. Interesting...OK so that code is very very picky I'll just alter the spoke values so it only draws small distances.... LOCK up at init... OK only in center area.... LOCK up at init...

6. Several other things that ended up in either land only maps or lock up at init...

anyone else play with the public maps any? I also had other portions of the code not like simple if, even if they didn't change much...And YES I worded my ifs correctly and all...and tested before and after change so I made sure it worked before change making a 4 plot land bridge for my NONE option...

ARRRGG Anyone have any thoughts?

Ive been tinkerin with the code a little. The Hub Map ie MultiLayered Fractal Map which means the map is generated on region by region basis. Youll most likely have to go through each region and change the appropriate percentages.
 
dlordmagic said:
Ive been tinkerin with the code a little. The Hub Map ie MultiLayered Fractal Map which means the map is generated on region by region basis. Youll most likely have to go through each region and change the appropriate percentages.

Actually I got all percantage crap working perfectly.

The land bridges is a totally seperate deal though. If you take out the land bridge creation the map generation locks up for no reason. I looked at code and as far as I can tell it does nothing but change OCEAN squares into LAND Squares via a giant loop process for each region... (if it is within the specified AREA it gets change to a land plot) I have had success with making those moutnains instead of land, I've also had hills work, it is just when I change it to water... (Yes land is different from mountains/hills)...

Looking at the coding in this python itself I see no reason for it. Looking in the util python I see no reason for it, maybe I just need to look closer at the python util scripting, but by the time it gets to that code it sholdn't care whether it is land or ocean just generate the darn thing...

Like I also said if I make other slight changes in specific locations it also has disatrous effects, and it has nothing to do with my coding itself :D. It is just certain aspects of the coding is picky. why can I add tundra/Ice to the player regions but not grasslands to the neutral area? There are many things I tried to do with this and other maps that simply makes the generator freak out. Hopefully Firaxis can fix this in next patch unless they meant it to only allow public maps that they created... I guess I could try recoding my own stuff rather than using their utils but.. That a bit too much work for me...And it still might be code inside there exe that causes it...
 
Back
Top Bottom