FlavourMod 2

Hm, maybe this is the way to go for the boars. Just have to find out how to reskin things then. I don't know much about art though. :/

There is nothing in your code, that would prevent your kelp feature from showing up. Did you check by mouseovering the ocean tiles, if the problem is not "not placing the kelp" but the kelp just "not being visible" to the user?

Since I didn't have your kelp feature availabe I tried to place jungle in the ocean for testing purposes. And surprise, it wasn't visible. Only when I changed the TileArtType tag value of jungle in CIV4ArtDefines_Feature.xml from TILE_ART_TYPE_TREES to TILE_ART_TYPE_HALF_TILING (like ice) or TILE_ART_TYPE_NONE (like oasis and many other features) it showed up on the map.

Two more comments. There are two lines in your code that are probably not working like you intended:

Code:
        for iPlotIndex in range(cymap.numPlots()):
            pPlot = cymap.plotByIndex(iPlotIndex)
            if isValidK(pPlot):
                [COLOR=Red]for i in range(getChanceK(pPlot)):[/COLOR]
                    [COLOR=Blue]if dice.get(100, "FlavourMod: Add Kelp") >= (KELP_ODDS - getChanceK(pPlot)):[/COLOR]
                        pPlot.setFeatureType(GetInfoType("FEATURE_KELP"),0)
        cymap.rebuildGraphics()
The red line I would simply remove. I don't see a reason, why you would want to loop over the number of adjacent kelp tiles to the current plot (which is what getChanceK is returning) there.

The blue line is a bit backwards, if you ask me. If you want a 85 percent chance (like KELP_ODDS is stating) for kelp to spawn modified slightly negatively by the amount of kelp on adjacent plots it should read like this:

Code:
if dice.get(100, "FlavourMod: Add Kelp") [B]<[/B] (KELP_ODDS - getChanceK(pPlot)):
I hope I could help.

Kelp is already TILE_ART_TYPE_NONE. The issue I was having was that it wasn't being placed correctly; Either it didn't show in ocean at all, or it covered it. :lol:

The getChanceK is in because I wanted the kelp to group up, rather than be spread out along the coast... Ideally, I want a forest look, where there is a group of tiles with kelp on it. As a result, I start with a low chance to spawn kelp, and increase that chance for every tile around it that has kelp. Was more important when I had the code for it to spawn on the ocean... It had a very low natural chance, that increased for each tile around it.

The blue line isn't backwards, really... I adapted this from Opera's mapscripts, and the map had the odds that way. It's supposed to be 15%, it's just on the high end of the spectrum rather than the low end. :lol:
 
I changed the blue line in my version because it IS backwards, even though I may have done something similar in the past :p
 
Kelp is already TILE_ART_TYPE_NONE. The issue I was having was that it wasn't being placed correctly; Either it didn't show in ocean at all, or it covered it. :lol:

I suppose Kelp is a part of FF+? I would like to have look.
 
I installed Fall Further Plus and allowed Kelp for Ocean plots. Result: The Kelp showed up on the Ocean as ist should. Lots of Kelp!

First I thought, your problem was a visual one, but now I think I've got it. It's the amount of Kelp, that is spawning, that is bothering you. Right? You think you are only adding a small percentage, if there is other Kelp nearby, but you aren't, you are making the chance a lot higher. The reason is still the red line. Your function getChanceK is working perfectly but you are looping over its result. That's the problem.

If there are 4 other Kelp plots nearby, getChanceK returns 5 and the following happens: Your chance of spawning Kelp is not 15% + 5% = 20% like you might think, it's actually 1 - (1 - 0.2) ^ 5 = 0.67232 ~ 67% because you are trying to place it 5 times on the same plot. And that's because of the for loop. I think, that's not what you intended, is it?

I'm sorry, if that's exactly what you wanted, to make it clumpy as hell and not only a little bit clumpy. :)
 
Is there any way to get Flavour Mod 2 for FfH patch g? The later patches OOS constantly and are completely unplayable in multiplayer.
 
Is there any way to get Flavour Mod 2 for FfH patch g? The later patches OOS constantly and are completely unplayable in multiplayer.

FlavourMod 2.7.6 for Fall from Heaven 0.41g. Here you are.
 

Attachments

Version 2.8.0 changelog:
  • Change: compatibility to Fall from Heaven 0.41j
  • Change: major python code restructuring and improvement
  • Change: simplified the installer
  • Change: reduced marsh terrain probability
  • Change: first AI settler will found not move
  • Add: reindeer and boar resource
  • Change: dwarven boar rider now needs boar not pig resource
  • Change: fyrdwell now also buildable with reindeer
  • Change: guardian now on a mountain (like in vanilla ffh) but beside the best choke point available on the map
Download link in the first post.

There is no standalone FlavourMod SDK option available anymore. You'll find the source code after installing FlavourMod under FlavourMod/SDK in the mods folder.

EDIT: Ooops, did forget to change the ingame version number to 2.8.0. It will display as 2.7.8, but it''s really 2.8.0. Don't worry. And: Except for the Maelstrom and the Guardian of Pristin Pass all the uniques will be placed after the standard FfH method again. I'll add the missing flavour code in one of the next versions.
 
awesome! the only thing I disagree with is elves being able to mount reindeers to make fyrdwells, reindeers are bulky animals very distant from the agile deer the elves would want as a mount ;)

what's the reasoning behind the change in Pristin Pass placement? I kinda liked it being on the chokepoint itself :D
 
[to_xp]Gekko;8608266 said:
awesome! the only thing I disagree with is elves being able to mount reindeers to make fyrdwells, reindeers are bulky animals very distant from the agile deer the elves would want as a mount ;)

You are right, it's probably better to change this. I wouldn't quite say reindeer are bulky but admittedly they lack some grace in comparison. Thinking about the whole subject, I should probably switch the models of deer and reindeer. The stolen FF reindeer are actually more looking like red deer at the moment than the deer itself.

[to_xp]Gekko;8608266 said:
what's the reasoning behind the change in Pristin Pass placement? I kinda liked it being on the chokepoint itself :D

For one thing it's more in line with vanilla FfH and for another thing it allows me to place a stronghold like for example a goblin fort at its feet. That way there is actually something blocking the pristin pass and not just sitting there.
 
Version 2.8.1 changelog:
  • Add: flavourful Unique Feature locations (probably better than before 2.8.0)
  • Add: Goblin Fort actions: Raze it, claim it or enslave the goblins. (TweakMod)
  • Change: replaced the ugly! FfH volcano with the one from Rystic's TweakMod (TweakMod)
  • Change: new Volcanos will cause fire and smoke in their vicinity (TweakMod)
  • Change: Clan of Embers Orcs get +1 :food: from Marsh
  • Change: switched Reindeer and Deer model and added a new Deer resource icon
  • Change: Reindeer tend to appear in groups (similar to Fur resource)
  • Change: Fyrdwell no longer buildable with Reindeer
  • Change: Flavour Start game option enabled by default
  • AI: new found cities overlap less with own and/or team mate city plots
Download link in the first post.

As you can see, I've stolen some stuff from Rystic's FfH TweakMod. I hope he doesn't mind. :scared:

And I'd forgotten to mention it when I was releasing v2.8.0 five days ago: If you want to customize the FlavorMod settings look for the files FM_Settings.py (general settings) and FM_FlavourInfos.py (civ flavour settings) under FlavourMod/Assets/python/pyFM. Theses setting used to be in the file CvFlavourInterface.py. I hope it's even easier to customize FlavourMod's settings now after I've moved away all the irritating code which hadn't anything to do with the settings itself.
 
Well. I just merged the Climate system (from Orbis, which might be the cause), and set the Malakim to have a warmer than normal climate. Everything worked fine (after some fiddling with the python... Order of the 'isDesert' check and the 'isForest' check needed to be reversed. As is, the plot still reads as having a forest after you wipe it, and so is set to have forest.).

The problem occurred when I saved/reloaded. Apparently, after reloading the game no longer noticed the fact that I had a warm climate, and set about reverting all changes. Any idea what went wrong?
 
Well. I just merged the Climate system (from Orbis, which might be the cause), and set the Malakim to have a warmer than normal climate. Everything worked fine (after some fiddling with the python... Order of the 'isDesert' check and the 'isForest' check needed to be reversed. As is, the plot still reads as having a forest after you wipe it, and so is set to have forest.).

The problem occurred when I saved/reloaded. Apparently, after reloading the game no longer noticed the fact that I had a warm climate, and set about reverting all changes. Any idea what went wrong?

Ooops, I have very "bad" news for you, Valkrionn. :)

I've completely rewritten the old ClimateSystem these last days and I'm going to release the new one any time now, probably even today. I'm very happy with the new System. It should make it a lot easier to do what you want to do. I've just had a test game with the Malakim transforming their climate to Arid and it went very well.

The problem you describe has probably something to do with a C++ variable not written correctly to your save game. I would have a look into it, but I don't think it will be necessary any more as soon as 2.8.2 comes out.
 
Ooops, I have very "bad" news for you, Valkrionn. :)

I've completely rewritten the old ClimateSystem these last days and I'm going to release the new one any time now, probably even today. I'm very happy with the new System. It should make it a lot easier to do what you want to do. I've just had a test game with the Malakim transforming their climate to Arid and it went very well.

The problem you describe has probably something to do with a C++ variable not written correctly to your save game. I would have a look into it, but I don't think it will be necessary any more as soon as 2.8.2 comes out.

Well... I suppose I can take that as good news. :lol:

After a (thorough) comparison between your sources and FfH, with my own in another program, I've come to the conclusion that the only thing it could be is the WoC section. Not sure what's wrong with the way I did it (Basically exactly like the hell terrain PlotUp/Down tags), but everything else is exactly the same. :confused:

In any case, I can back out the merge and use the new work. :lol: If you're more familiar with the WoC system FF uses wold you mind including some code that would work with it? I had been planning on waiting to merge until you released the new system (suppose I should have stuck to that plan...), but I need it to implement the White Hand religion. :lol:

Edit: A few questions about the system... How close is it to the chart you had posted a while back? And how easy is it to add a new terrain type to the chart? Need to set at least one value to Wasteland, for the D'tesh. ;)
 
Version 2.8.2 changelog:
  • Add: new climate system based on plot temperature and humidity
  • Change: Renamed the Flavour Start game option to Flavoured World
  • Change: Improved handling of Hell Terrain (codewise)
Download link in the first post.

There is not much in this version which is interesting from a players perspective, but the new climate system could be something big for modders. I'll explain it a bit more in the next post.

There happened a lot under the hood for the Illians because of those changes mentioned above though. That's the reason you should take another look at the screen shots below. Illian controlled territory slowly becomes Frost Climate. But that's nothing for eternity. If they lose their influence it will eventually become the original natural climate after some time again. I know something like this was in FlavourMod before, but like I said, it's done very different now and I don't know if everybody knew about this feature and the insignificance of the temple of the hand in FlavourMod before.
 

Attachments

  • DoM.png
    DoM.png
    276.1 KB · Views: 102
  • before.jpg
    before.jpg
    125.2 KB · Views: 89
  • autumn.jpg
    autumn.jpg
    165.9 KB · Views: 130
  • winter.jpg
    winter.jpg
    186.4 KB · Views: 122
  • frost.jpg
    frost.jpg
    112.4 KB · Views: 129
I'll combine the modders information about the new climate system with the answers to Valkrionns questions.

I had been planning on waiting to merge until you released the new system (suppose I should have stuck to that plan...), but I need it to implement the White Hand religion.

Took me long enough to finally implement it. Hope we get the kinks out fast. A White Hand religion sounds really interesting. At the moment climateforming is a civilization dependent feature only, but it should be easy enough to link it to a religion.

A few questions about the system... How close is it to the chart you had posted a while back? And how easy is it to add a new terrain type to the chart?

I decided the system was to complex with three variables, so I cut it down to two: Temperature and Humidity. Here is the new chart:
attachment.php

The default entries are the start temperatures and humidities I assign to all plots matching the criteria for a certain terrain class before the beginning of a game. Currently each climate matches a particular terrain class, but this doesn't have to be this way. There could be two or more temperate climates for example, with both having the grass terrain class as their typical terrain class.

To add a new climate is easy. You only have to take care there are absolutey no overlappings with other climates. Personally I'm thinking about splitting the Arid climate in two: Cold Arid and Hot Arid. I'll us this as an example further below.

Need to set at least one value to Wasteland, for the D'tesh.

Is Wasteland a kind of Hell Terrain? Or a totally new kind of Terrain?

------------

New XML Files:

1. CIV4TerrainClassInfos.xml:

Here is an example for an entry in there: The default temperature and humidity values I've mentioned already and the natural and hell terrain tag are there to help me keep track of terrains belonging together in an easy way. There is also a new terrain class tag in CIV4TerrainInfos.xml telling each terrain whic terrain class it belongs to.

Code:
	<TerrainClassInfo>	
		<Type>TERRAINCLASS_DESERT</Type>
		<iDefaultTemperature>4</iDefaultTemperature>
		<iDefaultHumidity>0</iDefaultHumidity>
		<NaturalTerrain>TERRAIN_DESERT</NaturalTerrain>
		<HellTerrain>TERRAIN_BURNING_SANDS</HellTerrain>
	</TerrainClassInfo>

The default temperature and humidity values I've mentioned already and the natural and hell terrain tag are there to help me keep track of terrains belonging together in an easy way. There is also a new terrain class tag in CIV4TerrainInfos.xml telling each terrain which terrain class it belongs to.

2. CIV4ClimateZoneInfos.xml:

An entry in there might look like this one for an arid climate:

Code:
	<ClimateZoneInfo>
		<Type>CLIMATEZONE_ARID</Type>
		<Description>TXT_KEY_CLIMATEZONE_ARID</Description>
		<iMaxHumidity>0</iMaxHumidity>
		<TerrainClass>TERRAINCLASS_DESERT</TerrainClass>
	<ClimateZoneInfo>

  • <Type>: unique climate id string
  • <Description>: informal climate name
  • <iMinTemperature>: lower temperature limit for climate (defaults to -&#8734;)
  • <iMaxTemperature>: upper temperature limit for climate (defaults to +&#8734;)
  • <iMinHumidity>: lower humidty limit for climate (defaults to -&#8734;)
  • <iMaxHumidity>: upper limit for climate (defaults to +&#8734;)
  • <bOceanicClimate>: true if climate is valid for water plots only (defaults to false, which means land plots only)
  • <TerrainClass>: the typical terrain class for this climate

If a plot's climate has to change, because the plot's temperature or humidty doesn't match the old climate any more for some reason the plot's terrain will change too, if the new climate, which matches the new temperature and humidity, is linked to another terrain class than the previous climate.

Example: Say you want to split the Arid climate into Cold Arid and Hot Arid. the two new climates should look like this then:

Code:
	<ClimateZoneInfo>
		<Type>CLIMATEZONE_COLD_ARID</Type>
		<Description>TXT_KEY_CLIMATEZONE_COLD_ARID</Description>
                [COLOR="Blue"]<iMaxTemperature>3</iMaxTemperature>[/COLOR]
		<iMaxHumidity>0</iMaxHumidity>
		<TerrainClass>TERRAINCLASS_DESERT</TerrainClass>
	</ClimateZoneInfo>
	<ClimateZoneInfo>
		<Type>CLIMATEZONE_HOT_ARID</Type>
		<Description>TXT_KEY_CLIMATEZONE_HOT_ARID</Description>
                [COLOR="Blue"]<iMinTemperature>4</iMinTemperature>[/COLOR]
		<iMaxHumidity>0</iMaxHumidity>
		<TerrainClass>TERRAINCLASS_DESERT</TerrainClass>
	</ClimateZoneInfo>

Be careful not to create gaps or overlappings between climates. It will break the system. Use a matrix like and draw your plans to be on the save side.


New Tags in other XML files:

1. CIV4TerrainInfos.xml:
  • <TerrainClass>: the Terrain Class this Terrain belongs to
2. CIV4CivilizationInfos.xml:
  • <FormClimateZoneType>: defines which climate the territory of this civ will turn into over time as long as they keep this territory

Global Defines:

TEMPERATURE_THRESHOLD and HUMIDITY_THRESHOLD: define how many turns are necessary to change a plot's temperature and/or humidity by one point on standard speed. Currently set to 10. Scales with game speed.

Python:

There is a function available called onClimateChange which will be called each time a climate changes to another climate in the file CvFlavourInterface.py. I'm using it for transforming the plot features according to the new Climate, but you can essentially use it for anything you want to happen after a climate change.

Things one could do with this: (with and without some more additions)
  • No explicit Terrain changes via spell etc necessary any more. Just change "blindly" the temperature or humidity of a plot and let the climate system decide what we get. Example: Scorch could increase the temperature permanently one point instead of explicitly encoding what happens to which terrain.
  • Other civs besides the Illians climateforming their territory. Malakim to Hot Arid for example. (Valkrionn)
  • A religion changing the climate of a civs territory. (Valkrionn)
  • Dynamically changing polar ice caps or sheets of ice in Illian waters by using the temperatures assigned to ocean plots for this.
  • Slowly bringing back the winter. There is no need to restrict climate changes to owned territory.

Any questions?
 

Attachments

  • ClimateSystem.png
    ClimateSystem.png
    24.7 KB · Views: 345
I'll combine the modders information about the new climate system with the answers to Valkrionns questions.



Took me long enough to finally implement it. Hope we get the kinks out fast. A White Hand religion sounds really interesting. At the moment climateforming is a civilization dependent feature only, but it should be easy enough to link it to a religion.



I decided the system was to complex with three variables, so I cut it down to two: Temperature and Humidity. Here is the new chart:
attachment.php

The default entries are the start temperatures and humidities I assign to all plots matching the criteria for a certain terrain class before the beginning of a game. Currently each climate matches a particular terrain class, but this doesn't have to be this way. There could be two or more temperate climates for example, with both having the grass terrain class as their typical terrain class.

To add a new climate is easy. You only have to take care there are absolutey no overlappings with other climates. Personally I'm thinking about splitting the Arid climate in two: Cold Arid and Hot Arid. I'll us this as an example further below.



Is Wasteland a kind of Hell Terrain? Or a totally new kind of Terrain?

Awesome, will work on merging it now. :goodjob: Hopefully it will go well. :lol:

Wasteland was originally Desert. The D'teshi workers autoterraform terrain they stand on... Problem was that hell (Which really shouldn't bother the D'tesh) lead to a massive wall of flame in your territory. Wastelands were the answer. :lol:
 
Back
Top Bottom