[Map script]Creation.py for FFH2

Right now that's not adjustable in the script, and it really should be. I'm not sure I'd want a dropdown for that, but a tuning variable would be very helpful with this issue.

The problem with variables vs dropdowns is that they are not compatible in MP, unless you have the exact same values you will get an OOS. So drop downs is what I would prefer.
 
I was reading through the python, specifically the WrapX, I notice this was hard set to false. You evaluate this later in the script regarding how it wraps the map, but when the setting is true the wrapping works but the map still draws a line of mountains, rather than connecting the mass as if it was a continuous section.

Any pointers on how to adjust this?

I never actually designed the map to wrap. Some people have noted that it actually does work, but it's only by accident.
 
Is there any difference between Creation.py and Erebus.py? These two map scripts seem to generate similar results.

Also, is creation.py still in development?
 
When Kael included Creation in FfH it was renamed to Erebus, so the only difference might be the version of the map script that you are playing.

Cephalo, weren't you coding something big/new a few months ago? What was it, if it's already done?
 
Is there any difference between Creation.py and Erebus.py? These two map scripts seem to generate similar results.

Also, is creation.py still in development?

The versions are actually different. I leave this one up because it is compatible with BtS while the Erebus map script is not.
 
Cephalo, weren't you coding something big/new a few months ago? What was it, if it's already done?

It was the FaireWeather map script for Colonization. See sig for a link. I also had another project in the works, but then I got busy with other things and I'm actually taking a break from modding.
 
Is there a way, to force the script to create only one continent, preferably crescent shaped or with internal sea?
 
Hi all

First I want to say thanks to cephalo for this great script. I registered just to say that.

Secon - I have been messing a bit around in the script and added a quick dirty fix to make some small islands:

Add these variables just below SoftenPeakPercent

Code:
SmallIslandLANDPercent = .02
SmallIslandHILLSPercent = .01

Now after the bits of code following #Now for SoftenPeakPercent of peaks, make them hills

add:
Code:
#Make small islands flat land or hills
	#LAND
	for y in range(1,mapSize.MapHeight - 1):
            for x in range(1,mapSize.MapWidth - 1):
                i = GetIndex(x,y)
                if self.plotMap[i] == self.OCEAN:
                    if SmallIslandLANDPercent >= PRand.random():
                        self.plotMap[i] = self.LAND
	#Hills
	for y in range(1,mapSize.MapHeight - 1):
            for x in range(1,mapSize.MapWidth - 1):
                i = GetIndex(x,y)
                if self.plotMap[i] == self.OCEAN:
                    if SmallIslandHILLSPercent >= PRand.random():
                        self.plotMap[i] = self.HILLS

this is clearly not an optimal solution, but it sprinkle a few islands around in the water.
The biggest problem is that each island tend to have jungle on it! which looks kind of silly next to a tundra shore. But that has something to do with Cephalos elaborate climate model.

But it clearly makes ocean exploring way more fun and sometimes a non ocean passage between the continents.

UPDATE:

Ok - I somehow fixed the jungle issue. This change will remove forest/jungle from all one plot islands:

here is the code you'll have to change:
Code:
#forest and jungle
if plot.isWater() == False and terrainMap.terrainMap[i] != terrainMap.DESERT and\
plotMap.plotMap[i] != plotMap.PEAK:

add one more condition, to check if this is an island:
Code:
#forest and jungle
if plot.isWater() == False and terrainMap.terrainMap[i] != terrainMap.DESERT and\
plotMap.plotMap[i] != plotMap.PEAK and not IsPlotSurroundedByOcean(x,y):

This is my first try of python coding :crazyeye: there is probably some more elegant solutions please feel free to comment.
 
I notice in the script, there are "print" statements commented out.
Is there a debugger that can be used?

Also just a python question about declarations and functions.
Do they have to be defined in a particular location?

I personally like them all at the top.
The menu related items, can they be moved to the start of the script, or are they order dependent?
 
I noticed that you use a lot of gc.getInfoTypeForString("NO_X"), where X is BONUS, IMPROVEMENT etc. However NO_X isn't a valid argument for gc.getInfoTypeForString. Instead you can use BonusTypes.NO_BONUS or simply replace it with -1 which is the value for all the NO_X. I guess it doesn't cause big problems the way it is now but a few things might not be the way you wanted them.
 
I noticed that you use a lot of gc.getInfoTypeForString("NO_X"), where X is BONUS, IMPROVEMENT etc. However NO_X isn't a valid argument for gc.getInfoTypeForString. Instead you can use BonusTypes.NO_BONUS or simply replace it with -1 which is the value for all the NO_X. I guess it doesn't cause big problems the way it is now but a few things might not be the way you wanted them.

That's funny. I believe that if you send a bad string it returns -1. So it works accidently. :lol:

It was such a long time ago. I don't remember why I did it that way.
 
I thought it returns 0 but you are correct, it returns -1, so just a cosmetic issue
 
QUick question about the Erebus mapscript in FfH2.

All other maps work fine with that mod, and the Erebus map script does sometimes.....but most of the time the game will just stop responding during the map setup loading screen when using Erebus or ErebusContinent.

Anyone have any idea why?
 
The Erebus script can take a while to create a map, if you are using the version which has Peak Softening from FF and Orbis.

ErebusContinent has the same issue... But makes such awesome maps that I use it anyway. :lol:

Taking a while is an understatement in my experience. If it actually works as I expect, it takes around 50 seconds to create a map.

Most of the time it will just stop responding, and I have actually left it sitting in that state for up to half an hour just to test it.

Basically, if it hasn't created a map within 2 minutes, it isn't going to work. I can not for the life of me work out why it just decides to stop working like that though. Not when every other map I've tried works without fail.
 
OK, basically if I try to lower the percentage of mountains from default, the game will not start at all.

I have to leave everything as it is, otherwise the game will hang on the map setup loading screen.
 
it works fine, it just APPEARS like it freezes. do have patience and it will, indeed, generate a map. ErebusContinent is definitely the best one for FFH.
 
Top Bottom