Platy's Peculiar Pleasant Posh Python

Ok, thanks for your help platy! :king:

I tried what you suggested placing that code in def initFractals(self) in Planets.py , but it crashes during map generation (the python exception before crashing is "no starting plot for player").

I think the terrain types need to be declared inside the loop in Planets.py where it iterates through each planet; but it only sets the plottypes there. It looks like the terrain types are set separately by TerrainGenerator in CvMapGeneratorUtil.py, but I'm not sure how to let this access what planet type was created during the loop in Planets.py. :confused:

I've also tried it an alternate way where I instead add your terrain definitions (the code chunk from iType = CyGame().getSorenRandNum(100, "Choose Planet Type") and below) inside the loop in Planets.py that generates planets, but this is also giving the same crash.
 
Edit:
Nvm, I know why :D
Will do some experiments when home
 
Can someone help me put this in custom assets. I want to use the WB in this mod to edit saves and share those saves with other players, so they can play the game as they are comfortable with whatever is in their custom assets folder.

Taking the stuff out of the assets folder in this mod and adding it to custom assets folder gives a game with no interface during the game. I started with an empty custom assets folder. Am I missing a step somewhere?

Thanks in advance.
 
@Orlanth

I cannot run your script without instant defeat, so I did my experiements in one default Civ IV Map.

Attached is an edited Hemisphere which will still spawn 2 to 6 continents.
Each continent will be either snow + tundra, or desert + plains.
So you can pretty much replace the terrains with your own sets.

What is interesting is that starting plots are not affected.
 

Attachments

Since I cannot run your script, you can run and see if it works.
 

Attachments

Hi. I have an idea that emerged from the game. There is a button which when pressed will show all the sources. It would be very helpful button which, if pressed, showed all the natural wonders. Is such a thing possible? Could you do it, please?
 
Hey platyping, is there a function that activates on an air strike, something like def onairstrike? Or, alternatively, is there a way to make a function that does so? I want to add to the effects of an air strike.

Thanks
 
@hrochland
Ctrl F already does something similar

@Merkava
onSelectionGroupPushMission is activated, but it is not really useful.

@Zlako
Nope
 
Thank you platyping :cool: It now loads and generates the planets as usual without a crash, but gives one python exception during map generation, and then only generates standard terrains without the new "Aquatic" ones.

File Planets line 179 in generateTerrainTypes
File Planets line 432 in generateTerrain

TypeError: generateTerrainAtPlot() takes exactly 3 arguments (4 given)
(I updated your version to use the current XML tag names of the mod as below, but didn't make any other changes to it.)
Spoiler :
self.terrainDesert = [self.gc.getInfoTypeForString("TERRAIN_DESERT"),
self.gc.getInfoTypeForString("TERRAIN_AQUATIC_HOT")]

self.terrainPlains = [self.gc.getInfoTypeForString("TERRAIN_PLAINS"),
self.gc.getInfoTypeForString("TERRAIN_AQUATIC_DRY")]

self.terrainIce = [self.gc.getInfoTypeForString("TERRAIN_SNOW"),
self.gc.getInfoTypeForString("TERRAIN_SNOW")]

self.terrainTundra = [self.gc.getInfoTypeForString("TERRAIN_TUNDRA"),
self.gc.getInfoTypeForString("TERRAIN_AQUATIC_COLD")]

self.terrainGrass = [self.gc.getInfoTypeForString("TERRAIN_GRASS"),
self.gc.getInfoTypeForString("TERRAIN_AQUATIC_FERTILE")]

self.terrainMarsh = [self.gc.getInfoTypeForString("TERRAIN_MARSH"),
self.gc.getInfoTypeForString("TERRAIN_AQUATIC_WET")]
 
Can someone help me put this in custom assets. I want to use the WB in this mod to edit saves and share those saves with other players, so they can play the game as they are comfortable with whatever is in their custom assets folder.

Taking the stuff out of the assets folder in this mod and adding it to custom assets folder gives a game with no interface during the game. I started with an empty custom assets folder. Am I missing a step somewhere?

Thanks in advance.

Here are a screenshot and the python error log for help

Spoiler for screenshot :


edit:nevermind, I got it to work with the newest version of platyworldbuilder and putting those files in the custom assets folder
 
Change
def generateTerrainAtPlot(self,iX,iY):
to
def generateTerrainAtPlot(self,iX,iY, iType):

Similar to the working version in Hemispheres.
 
Fixed Borders

Features:
Inner Layer of 8 Plots will never flip.
The city plot itself not affected, so will still suffer from culture disorder.

Something simple for whoever actually liked this feature.
 
Fixed Borders

Features:
Inner Layer of 8 Plots will never flip.
The city plot itself not affected, so will still suffer from culture disorder.

Something simple for whoever actually liked this feature.

That was the least part of Fixed Borders. It also allowed units to claim neutral territory and keep it. The other part was that no plot would change owner due to culture unless a city was flipped or taken.
 
Anything more than the 8 plots make culture useless.
Which is why I still allow the city itself to suffer from disorder due to culture.
 
@hrochland
Ctrl F already does something similar

I tried it - it's functional, but only in your mod. I am using the old code, which only distributes natural wonders on map. Continues to work with the natural wonders in another way. I tried to put this
PHP:
## Show Natural Wonders with CTRL F ##
			if theKey == int(InputTypes.KB_F) and self.bCtrl:
				NaturalWonders.NaturalWonders().showNaturalWonders()
				return 1
## Show Natural Wonders with CTRL F ##
into my mod, but it does not work. Is possible modify it so that I can use in my mod, please?
 
Frankly speaking, I can't be bothered to look at old versions when the new version is working.
 
Anything more than the 8 plots make culture useless.
Which is why I still allow the city itself to suffer from disorder due to culture.

Yes it was poorly thought out. It was supposed to simulate times of peace with your neighbours and such situations as on this Earth where Singapore does not flip and become Malay or Chicago Canadian.:D
 
I understand. And I can somehow use your new code to only distribute the features and nothing more ... no Bunus for civilization etc - but that worked ctr-f?
 
Well, not sure how you merge the codes, but if what you see after merging is not the same as what you see in the standalone download without merging, then obviously there is something wrong with how you merge.
 
No, I did not exactly put it. I have the old embed code features even from the time when your version was not published. (
However, even so, jjak I wrote, I work with natural wonders in another way. It has to do with the victory, you did for me. I just need to deploy and features throughout the game is very helpful able to look where the other natural wonders :)
 
Top Bottom