[MODCOMP][WARLORDS]Forests

Rod

King
Joined
Sep 22, 2004
Messages
754
Location
Munich / Germany
Plant Forest - Forest Mod

Actually this is my first trial on Modding CivIV and I decided to convert a part of an old vanilla mod (Green Mod) for Warlords.

Aim of this mod :
1)Gives your workers the ability to plant forest after you researched Paper.
2)You can plant leafy tree forest on plains or grassland, even when they have other improvements, these get destroyed (except roads/ railroads).
It takes 30 turns.
3)You can plant needle tree forests on tundra, even when it has another improvement, this one get destroyed (except roads/ railroads).
It takes 45 turns.
4)You can not plant forest on existing forests or jungles.

screenForestMod.JPG

My ModComponent comes with a really enhanced Documentation, so if you want to merge the function into your mods, you simply need the ChangeLog and follow it step by step (copy and paste) .

Credits to : Master Lexx (who created the original code), Sevo (who provided a bugfix)

Kudos to TheLopez whom inspired me to principles of good Documentation thanks to his excellent Documentation.

ChangeLog
Spoiler :

1) Added lines in
\Warlords\Mods\ForestMod\Assets\XML\Terrain\CIV4ImprovementInfos.xml

Code:
[INDENT][INDENT][INDENT]<ImprovementInfo>[/INDENT][/INDENT][/INDENT]
			<Type>IMPROVEMENT_NEW_FOREST</Type>
			<Description>TXT_KEY_IMPROVEMENT_NEW_FOREST</Description>
			<Civilopedia>TXT_KEY_IMPROVEMENT_NEW_FOREST_PEDIA</Civilopedia>
			<ArtDefineTag>ART_DEF_IMPROVEMENT_NEW_FOREST</ArtDefineTag>
			<PrereqNatureYields/>
			<YieldChanges/>
			<bActsAsCity>0</bActsAsCity>
			<bHillsMakesValid>0</bHillsMakesValid>
			<bFreshWaterMakesValid>0</bFreshWaterMakesValid>
			<bRiverSideMakesValid>0</bRiverSideMakesValid>
			<bNoFreshWater>0</bNoFreshWater>
			<bRequiresFlatlands>0</bRequiresFlatlands>
			<bRequiresRiverSide>0</bRequiresRiverSide>
			<bRequiresIrrigation>0</bRequiresIrrigation>
			<bCarriesIrrigation>0</bCarriesIrrigation>
			<bRequiresFeature>0</bRequiresFeature>
			<bWater>0</bWater>
			<bGoody>0</bGoody>
			<bPermanent>0</bPermanent>
			<iTilesPerGoody>0</iTilesPerGoody>
			<iGoodyRange>0</iGoodyRange>
			<iUpgradeTime>0</iUpgradeTime>
			<iAirBombDefense>0</iAirBombDefense>
			<iDefenseModifier>0</iDefenseModifier>
			<iPillageGold>0</iPillageGold>
			<TerrainMakesValids>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_GRASS</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_PLAINS</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
			</TerrainMakesValids>
			<FeatureMakesValids>
				<FeatureMakesValid>
					<FeatureType>FEATURE_JUNGLE</FeatureType>
					<bMakesValid>0</bMakesValid>
				</FeatureMakesValid>
				<FeatureMakesValid>
					<FeatureType>FEATURE_FOREST</FeatureType>
					<bMakesValid>0</bMakesValid>
				</FeatureMakesValid>
			</FeatureMakesValids>
			<ImprovementPillage/>
			<ImprovementUpgrade/>
			<TechYieldChanges/>
			<RouteYieldChanges/>
			<WorldSoundscapeAudioScript>ASSS_FOREST_SELECT_AMB</WorldSoundscapeAudioScript>
			<bGraphicalOnly>0</bGraphicalOnly>
		</ImprovementInfo>
		<ImprovementInfo>
			<Type>IMPROVEMENT_NEW_FORESTW</Type>
			<Description>TXT_KEY_IMPROVEMENT_NEW_FOREST</Description>
			<Civilopedia>TXT_KEY_IMPROVEMENT_NEW_FOREST_PEDIA</Civilopedia>
			<ArtDefineTag>ART_DEF_IMPROVEMENT_NEW_FOREST</ArtDefineTag>
			<PrereqNatureYields/>
			<YieldChanges/>
			<bActsAsCity>0</bActsAsCity>
			<bHillsMakesValid>0</bHillsMakesValid>
			<bFreshWaterMakesValid>0</bFreshWaterMakesValid>
			<bRiverSideMakesValid>0</bRiverSideMakesValid>
			<bNoFreshWater>0</bNoFreshWater>
			<bRequiresFlatlands>0</bRequiresFlatlands>
			<bRequiresRiverSide>0</bRequiresRiverSide>
			<bRequiresIrrigation>0</bRequiresIrrigation>
			<bCarriesIrrigation>0</bCarriesIrrigation>
			<bRequiresFeature>0</bRequiresFeature>
			<bWater>0</bWater>
			<bGoody>0</bGoody>
			<bPermanent>0</bPermanent>
			<iTilesPerGoody>0</iTilesPerGoody>
			<iGoodyRange>0</iGoodyRange>
			<iUpgradeTime>0</iUpgradeTime>
			<iAirBombDefense>0</iAirBombDefense>
			<iDefenseModifier>0</iDefenseModifier>
			<iPillageGold>0</iPillageGold>
			<TerrainMakesValids>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_TUNDRA</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
			</TerrainMakesValids>
			<FeatureMakesValids>
				<FeatureMakesValid>
					<FeatureType>FEATURE_JUNGLE</FeatureType>
					<bMakesValid>0</bMakesValid>
				</FeatureMakesValid>
				<FeatureMakesValid>
					<FeatureType>FEATURE_FOREST</FeatureType>
					<bMakesValid>0</bMakesValid>
				</FeatureMakesValid>
			</FeatureMakesValids>
			<ImprovementPillage/>
			<ImprovementUpgrade/>
			<TechYieldChanges/>
			<RouteYieldChanges/>
			<WorldSoundscapeAudioScript>ASSS_FOREST_SELECT_AMB</WorldSoundscapeAudioScript>
			<bGraphicalOnly>0</bGraphicalOnly>
		</ImprovementInfo>
2) add following lines in :

\Warlords\Mods\ForestMod\Assets\XML\Units\CIV4BuildInfos.xml

Code:
[INDENT][INDENT][INDENT]<BuildInfo>[/INDENT][/INDENT][/INDENT]
			<Type>BUILD_NEW_FOREST</Type>
			<Description>TXT_KEY_BUILD_NEW_FOREST</Description>
			<Help/>
			<PrereqTech>TECH_PAPER</PrereqTech>
			<iTime>3000</iTime>
			<bKill>0</bKill>
			<ImprovementType>IMPROVEMENT_NEW_FOREST</ImprovementType>
			<RouteType>NONE</RouteType>
			<EntityEvent>ENTITY_EVENT_SHOVEL</EntityEvent>
			<FeatureStructs>
				<FeatureStruct>
					<FeatureType>FEATURE_JUNGLE</FeatureType>
					<PrereqTech>TECH_FOREST_TECH</PrereqTech>
					<iTime>0</iTime>
					<iProduction>0</iProduction>
					<bRemove>0</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_FOREST</FeatureType>
					<PrereqTech>TECH_FOREST_TECH</PrereqTech>
					<iTime>0</iTime>
					<iProduction>0</iProduction>
					<bRemove>0</bRemove>
				</FeatureStruct>
			</FeatureStructs>
			<HotKey>KB_S</HotKey>
			<bAltDown>0</bAltDown>
			<bShiftDown>1</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>1</iHotKeyPriority>
			<Button>,Art/Interface/Buttons/TerrainFeatures/Forest.dds,Art/Interface/Buttons/BaseTerrain_TerrainFeatures_Atlas.dds,7,3</Button>
		</BuildInfo>
		<BuildInfo>
			<Type>BUILD_NEW_FORESTW</Type>
			<Description>TXT_KEY_BUILD_NEW_FOREST</Description>
			<Help/>
			<PrereqTech>TECH_PAPER</PrereqTech>
			<iTime>3000</iTime>
			<bKill>0</bKill>
			<ImprovementType>IMPROVEMENT_NEW_FORESTW</ImprovementType>
			<RouteType>NONE</RouteType>
			<EntityEvent>ENTITY_EVENT_SHOVEL</EntityEvent>
			<FeatureStructs>
				<FeatureStruct>
					<FeatureType>FEATURE_JUNGLE</FeatureType>
					<PrereqTech>TECH_FOREST_TECH</PrereqTech>
					<iTime>0</iTime>
					<iProduction>0</iProduction>
					<bRemove>0</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_FOREST</FeatureType>
					<PrereqTech>TECH_FOREST_TECH</PrereqTech>
					<iTime>0</iTime>
					<iProduction>0</iProduction>
					<bRemove>0</bRemove>
				</FeatureStruct>
			</FeatureStructs>
			<HotKey>KB_S</HotKey>
			<bAltDown>0</bAltDown>
			<bShiftDown>1</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>1</iHotKeyPriority>
			<Button>,Art/Interface/Buttons/TerrainFeatures/Forest.dds,Art/Interface/Buttons/BaseTerrain_TerrainFeatures_Atlas.dds,7,3</Button>
		</BuildInfo>

3) Added Lines in

Warlords\Mods\ForestMod\Assets\XML\ArtCIV4ArtDefines_Improvement.xml

Code:
[INDENT][INDENT][INDENT]<ImprovementArtInfo>[/INDENT][/INDENT][/INDENT]
			<Type>ART_DEF_IMPROVEMENT_NEW_FOREST</Type>
			<bExtraAnimations>0</bExtraAnimations>
			<fScale>0.0</fScale>
			<fInterfaceScale>0.0</fInterfaceScale>
			<NIF>Art/Structures/Cities/destroyed_city.nif</NIF>
			<KFM/>
			<Button>,Art/Interface/Buttons/TerrainFeatures/Forest.dds,Art/Interface/Buttons/BaseTerrain_TerrainFeatures_Atlas.dds,3,3</Button>
		</ImprovementArtInfo>

4) Added Lines in
Warlords\Mods\ForestMod\Assets\XML\Units\CIV4UnitInfos.xml
in
<Type>UNIT_WORKER</Type>
and
<Type>UNIT_INDIAN_FAST_WORKER</Type>
search 2 times for
Code:
[INDENT][INDENT][INDENT][INDENT][INDENT][INDENT][INDENT]<Build>[/INDENT][/INDENT][/INDENT][/INDENT][/INDENT][/INDENT][/INDENT]
					<BuildType>BUILD_SCRUB_FALLOUT</BuildType>
					<bBuild>1</bBuild>
				</Build>

Afterwards fill in:

Code:
[INDENT][INDENT][INDENT][INDENT][INDENT][INDENT][INDENT]<Build>[/INDENT][/INDENT][/INDENT][/INDENT][/INDENT][/INDENT][/INDENT]
					<BuildType>BUILD_NEW_FOREST</BuildType>
					<bBuild>1</bBuild>
				</Build>
				<Build>
					<BuildType>BUILD_NEW_FORESTW</BuildType>
					<bBuild>1</bBuild>
				</Build>
5) Added new file

\Warlords\Mods\ForestMod\Assets\XML\Text\ForestMod_GameTextInfos.xml
contains
Code:
<Civ4GameText xmlns="http://www.firaxis.com">
	<TEXT>
		<Tag>TXT_KEY_IMPROVEMENT_NEW_FOREST</Tag>
		<English>Cultivate new forest</English>
		<French>
			<Text>Planter foret nouvelle</Text>
			<Gender>Male</Gender>
			<Plural>0</Plural>
		</French>
		<German>
			<Text>Neuen Wald anpflanzen</Text>
			<Gender>Male</Gender>
			<Plural>0</Plural>
		</German>
		<Italian>
			<Text>Coltivi nuova foresta</Text>
			<Gender>Male</Gender>
			<Plural>0</Plural>
		</Italian>
		<Spanish>
			<Text>Cultive nuevo bosque</Text>
			<Gender>Female</Gender>
			<Plural>0</Plural>
		</Spanish>
	</TEXT>
</Civ4GameText>

6) Added new file

\Warlords\Mods\ForestMod\Assets\XML\Text\ForestMod_GameTextInfos_Objects.xml
contains
Code:
<Civ4GameText xmlns="http://www.firaxis.com">
	<TEXT>
		<Tag>TXT_KEY_BUILD_NEW_FOREST</Tag>
		<English>Cultivate new forest</English>
		<French>Planter foret nouvelle</French>
		<German>Neuen Wald anpflanzen</German>
		<Italian>Coltivi nuova foresta</Italian>
		<Spanish>Cultive nuevo bosque</Spanish>
	</TEXT>
	<TEXT>
		<Tag>TXT_KEY_BUILD_EXPLORETEMPLE</Tag>
		<English>Examine</English>
		<French>Examiner</French>
		<German>Untersuchen</German>
		<Italian>Esaminare</Italian>
		<Spanish>Prueba</Spanish>
	</TEXT>
</Civ4GameText>

7) Added following lines in
\Warlords\Mods\ForestMod\Assets\Python\CvEventManager.py

7.1) added

in the header of file
after
Code:
def __init__(self):

add
Code:
#ForestMod Sevo's Worker Fix 
                self.pPlot_remembered = [-1,""]
after
7.2) in the mainbody
after
Code:
def onBeginPlayerTurn(self, argsList):
		'Called at the beginning of a players turn'
		iGameTurn, iPlayer = argsList

add
Code:
# ForestMod Sevo's Worker Fix - is checking all tiles whether some of them had the forest planted in last turn and then removes improvement
		if (self.pPlot_remembered[0] != -1):
			self.pPlot_remembered[0] += 1
			if (self.pPlot_remembered[0] > 3):
				self.pPlot_remembered[1].setImprovementType(-1)
				self.pPlot_remembered = [-1,""]
				#Forest Mod ends
7.3) in the mainbody
after
Code:
def onImprovementBuilt(self, argsList):
		'Improvement Built'
		iImprovement, iX, iY = argsList


add
Code:
#ForestMod : when improvement finished then remove improvement(delayed) and create a feature		
		pPlot = CyMap().plot(iX,iY)
		if(iImprovement==gc.getInfoTypeForString('IMPROVEMENT_NEW_FOREST')):
			pPlot.setFeatureType(4, 0)
			CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'A new forest has been planted!','AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/TerrainFeatures/Forest.dds',ColorTypes(8),iX,iY,True,True)
			self.pPlot_remembered = [1,pPlot]		
		if(iImprovement==gc.getInfoTypeForString('IMPROVEMENT_NEW_FORESTW')):
			pPlot.setFeatureType(4, 1)
			CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'A new forest has been planted!','AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/TerrainFeatures/Forest.dds',ColorTypes(8),iX,iY,True,True)
			self.pPlot_remembered = [1,pPlot]
			#ForestMod ends
8) Added lines in

Warlords\Mods\ForestMod\Assets\XML\Technologies\CIV4TechInfos.xml

Code:
<TechInfo>
			<Type>TECH_FOREST_TECH</Type>
			<Description>TXT_KEY_TECH_FUTURE_TECH</Description>
			<Civilopedia>TXT_KEY_TECH_FUTURE_TECH_PEDIA</Civilopedia>
			<Help/>
			<Strategy>TXT_KEY_TECH_FUTURE_TECH_STRATEGY</Strategy>
			<Advisor>ADVISOR_SCIENCE</Advisor>
			<iAIWeight>0</iAIWeight>
			<iAITradeModifier>0</iAITradeModifier>
			<iCost>10000</iCost>
			<Era>ERA_FUTURE</Era>
			<FirstFreeUnitClass>NONE</FirstFreeUnitClass>
			<iFeatureProductionModifier>0</iFeatureProductionModifier>
			<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
			<iTradeRoutes>0</iTradeRoutes>
			<iHealth>0</iHealth>
			<iHappiness>0</iHappiness>
			<iFirstFreeTechs>0</iFirstFreeTechs>
			<iAsset>0</iAsset>
			<iPower>0</iPower>
			<bRepeat>0</bRepeat>
			<bTrade>0</bTrade>
			<bDisable>1</bDisable>
			<bGoodyTech>0</bGoodyTech>
			<bExtraWaterSeeFrom>0</bExtraWaterSeeFrom>
			<bMapCentering>0</bMapCentering>
			<bMapVisible>0</bMapVisible>
			<bMapTrading>0</bMapTrading>
			<bTechTrading>0</bTechTrading>
			<bGoldTrading>0</bGoldTrading>
			<bOpenBordersTrading>0</bOpenBordersTrading>
			<bDefensivePactTrading>0</bDefensivePactTrading>
			<bPermanentAllianceTrading>0</bPermanentAllianceTrading>
			<bVassalTrading>0</bVassalTrading>
			<bBridgeBuilding>0</bBridgeBuilding>
			<bIrrigation>0</bIrrigation>
			<bIgnoreIrrigation>0</bIgnoreIrrigation>
			<bWaterWork>0</bWaterWork>
			<iGridX>19</iGridX>
			<iGridY>12</iGridY>
			<DomainExtraMoves/>
			<CommerceFlexible/>
			<TerrainTrades/>
			<Flavors>
				<Flavor>
					<FlavorType>FLAVOR_MILITARY</FlavorType>
					<iFlavor>1</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_RELIGION</FlavorType>
					<iFlavor>1</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_PRODUCTION</FlavorType>
					<iFlavor>1</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_GOLD</FlavorType>
					<iFlavor>1</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_SCIENCE</FlavorType>
					<iFlavor>1</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_CULTURE</FlavorType>
					<iFlavor>1</iFlavor>
				</Flavor>
			</Flavors>
			<OrPreReqs>
				<PrereqTech>TECH_FUTURE_TECH</PrereqTech>
			</OrPreReqs>
			<AndPreReqs>
				<PrereqTech>TECH_FUTURE_TECH</PrereqTech>
			</AndPreReqs>
			<Quote>TXT_KEY_TECH_FUTURE_TECH_QUOTE</Quote>
			<Sound>AS2D_TECH_FUTURE</Sound>
			<SoundMP>AS2D_TECH_MP_FUTURE</SoundMP>
			<Button>,Art/Interface/Buttons/TechTree/Future Tech.dds,Art/Interface/Buttons/TechTree_Atlas.dds,2,4</Button>
		</TechInfo>



and here comes the file itself. As usual you can unpack it in your mod folder :

ForestMod 1.01 for Warlords 2.08
(fixed two bugs and one virus problem)
 
Bugs and To-Do-List

Bugs are fixed so far, but I am open for bug noticed by you.

To-Do-List

Include the SDK changes of gordonthewhale

ForestMod for Vanilla (Version 1.61)
Civilopedia Entries
Polishing (Texts etc)
 
Prospect and Next Version

When I dived into the xml-files I saw it is very easy to have selfupgrading improvements like the cottages, who turn into hamlets, villages and town by themself.

The same we can do with forests. I want to implement a feature that forest are growing from "Young Forest" to "Dense Forest" up to "Old Forest". The major change should be in Defense Modifier (25%,50%,75%), Spreading Rate(4,8,16) and in hammers gained by chopping down (10,20,30)

For this I will need some help so I would ask the other modders to give a short look to the action plan (next post).
I highly appreciate any hint, advice or help from your side. Thank you in advance.
 
Action Plan for next version


It turned out that the whole idea is a much bigger modification than I ever thought. At first I just wanted to play around with some kind of invicible permanent improvements, which are just upgrading themself and whenever they upgrade, they would place a different feature on the plot ....

... this was all bullfeathers. The code is not made for this, no way in XML and Python only....

That means basically following :
The next idea is now to create new tags for features, that are handling the upgrade ...
.. I hope that means I only have to find the code for upgrading improvements, copy it to the features and thats it .. But I suppose that it is not ...

In anyway it means I have to touch the SDK and I wanted to prevent this by all means, so I need the next weeks for making the SDK -Compilation running on my system and to understand every single bit of Kael words on the forum..

So the new action plan is

Downloading SDK - done
Downloading VC++ Toolkit and all necessary compilation tools - done
Try to compile the generic SDK in order to test the VC++ Toolkit - done(29.11.2006)

Furthermore
1) XML Level

1.1) Create new features :

Young Forest, Dense Forest Old Forest
Young Winter Forest, Dense Winter Forest, Old Winter Forest (for tundra)

they differ in chopping time and are upgradable

2) On GFX-Level

I will need new gfx-files for the
Young Forest, Old Forest
Young Winter Forest, Old Winter Forest

I have no ideas about gfx.
I would like to ask the community to help with this.
Can somebode please make such forest-gfx differing in density ??

3) On SDK - Level

3.1) Create new tags for the feature to make upgradable features

(btw if I ever succeed then these upgradable features can provide quite hot possiblities, just imaging really dynamic ice, which is growing and melting ON the plot , opening passages and closing them again)
[it would be a loop of upgrading features]

If I miss any point in this action plan please comment on this.

I really appreciate any contribution especially for the Python Code .... and please be merciful as I am modding in python and xml for the first time and my only other experience was the CivIII-Editor ...
 
Thanks for working on this mod, Rod. Its a great addition to the game. Perhaps there is some way to make Forests more valuable to certain civics, like the Environmentalist Civic, so it produces more culture or happiness. Is that a possibility?
 
wotan321 said:
Thanks for working on this mod, Rod. Its a great addition to the game. Perhaps there is some way to make Forests more valuable to certain civics, like the Environmentalist Civic, so it produces more culture or happiness. Is that a possibility?

Right now it is easy possible, that you may just let lumbermills give boni(food, hammer, commerce), when you choose civic Enviromentalist. Would that solve your problem ?

I mean basically in the stage of Environmentalism all the forest should have a lumbermill in any way , shouldnt they ?
 
BEWARE!!!!!​

:mad: THE ZIP FILE I DOWNLOADED FOR THIS MOD HAD A VIRUS IN IT!!!!!!!! :mad:



I don't know if you did this on purpose or not, Rod... I CERTAINLY hope not... but I suggest you remove this file for download IMMEDIATELY.
 
Hello,

Virus detected and removed, file is clean now, see first post

I am very sorry for this accidence, it turned out that I had a virus who infected zip-files with folders, which I created, but nothing else. Whenever I made a zip of a single file, these zips are clean.
It did not get detected by quick-scan , but only after I ran a full scan on my system.

Thanks a lot to GraveEatr, otherwise I would still run my system with this virus.
 
This is GREAT....have wanted to put the Plant Forest ability in ViSa :)
 
Your idea about forests growing is one I had been thinking about myself.

Whether it's possible in Python or not (which I guess depends on whether an improvement upgrading itself triggers an "improvementBuilt" event), I definitely think that, for this kind of thing, an SDK mod would be better.

You could just do a little mod to add the missing event call into the Python interface, but I think it would be much slicker to go whole hog and implement the feature set you are talking about.

If you need any help with the coding end, I'm interested, but I'm no graphics guy either.
 
Well...

Since that was a mod I was considering, and it seemed easy enough, I just went ahead and did it. I still have one more goal for this (improvements producing resources without the bonus being present) and then I'll post it.
 
My Improvement, Feature, and Resource mod is up. Among other things, it adds XML tags to let features upgrade over time, like Cottages etc. Hope it's what you need!

One thing I'll add in the next version is a randomization of the upgrade progress of features that will upgrade at the beginning of the game. When I tested this version, I just added the tags to make Jungle change to Forest. On one turn of the game, suddenly all the jungles in the world became forest!

I'd love to see the game start out with a smattering of Light Forest, Mature Forest, and Old Growth Forest, each of which gradually grows up to the next. Also, when forests randomly grow, they could start as Light Forest, rather than springing into existence as fully developed Old Growth.

Another, more difficult thing, would be timing the growth to actual years, instead of game turns. There's no reason for trees to grow faster in the modern era!
 
Rod said:
Action Plan for next version
Furthermore
1) XML Level

1.1) Create new features :

Young Forest, Dense Forest Old Forest
Young Winter Forest, Dense Winter Forest, Old Winter Forest (for tundra)

they differ in chopping time and are upgradable

2) On GFX-Level

I will need new gfx-files for the
Young Forest, Old Forest
Young Winter Forest, Old Winter Forest

3) On SDK - Level

3.1) Create new tags for the feature to make upgradable features

I have actually done all of these things, and as soon as I can get it all packed up nice, I'll post it. Maybe tomorrow, I've got work to do for money today.

My new features vary somewhat compared to yours. I have:
Young Forest - no yield bonus, 10% health increase, 10% defense modifier, 100 worker-units to chop, chop-yeild 5, growth 8, 50 turns to mature
Mature Forest - 1 hammer bonus, 25% health increase, 25% defense modifier, 200 worker-units to chop, chop-yield 15, growth 16, 100 turns to old
Old Growth Forest - 1 hammer bonus, 50% health increase, 50% defense modifier, 300worker-units to chop, chop-yield 30, growth 32

The old-growth forest is the same as a "forest", and in fact, its type tag is "FEATURE_FOREST", so that map scripts will place it as the default forest. I gave the other two a non-zero "appears" tag, so that they will appear at random on the map. Obviously, it would be better to have a map script that was aware of them.

The graphics I made are all modifications of the existing game graphics, in the spitir of the Ancient Forest in FFH2. The unfortunate thing is that, apparently, the game engine is hard-coded to do some things only for features named "FEATURE_FOREST" and "FEATURE_JUNGLE", specifically, tiling the graphics and removing trees for roads and improvements. Thus, the old growth forests all look great, but the young and mature forests are the same on every plot and tend to block improvements and goody huts. Also, my young forests just look dorky. I think they would need a more detailed skin, but I'm no skinner, my talents extend to resizing and color adjustment on that front.

I also made a few more changes to the SDK. First, I initialize upgradeable features at a random point on the way to being upgraded, but only while the map script is going. Otherwise, there's a turn where all the young forest from the beginning of the game mature, and it's silly.

Second, I added a "GrowthFeature" tag to FeatureInfo, so that you can specify that when a feature grows, it grows to some other feature. In this case, all three forests make Young Forest.

Do you have any other SDK mods that you're using right now? If not, you can just use my compiled SDK. If you really need to get it to compile for yourself, though, look for me on AIM or Yahoo and maybe I can help you out. See my profile for contact info.
 
We're curenntly having the same problem trying to get some dead forest gfx into the game for the warhammer mod.
Forest and jungle art is referenced in a really weird xml file: CIV4SymbolMeshPaths.xml
Changing anything there doesn't seem to result in anything but errormessages.
Did you already figure out how to get around this problem?
 
I regret to admit I opened that can of worms. :sad:

If you want, I could edit a model of jungle to simulate shrubbery...
hehe, heh...python.
Um.
I'd just use the ferns and some of the bushes for undergrowth and reduce trees in height and reduce canopy density. (of pine trees / birches)

I'd do it with pleasure for a solution to this problem. :)


----
I had an idea for this kind of forests:
-succession and Iversen 'landnam'.

Succession, is what your mod already does: after the iceage, climates shifted lattitudes and trees colonised the new lands.
This colonisation goes in stages, quick spreading trees that love open spaces (birches) these are replaced by (pines).
Piones are again replaced by more desidious trees (Oaks) and finally climax-species (Lindes) fill the land with their dense forests.
(wetlands have their own adapted species)

As soon as man appears in the landscape, some of the bigger trees dissapear as their lifestock eats the young saplings and leaves are harvested as fodder.

also Landnam: a phenomena caused by primitive farming. forest is cleared (using stone axes) and burnt, then for several years the land is farmed untill the soil is no longer fertile.

My proposal is fairly quick spreading forests (disregarding all the species), these fill their entire range in only a few centuries.

Cities working forested tiles clear these tiles after several turns working.
(with agriculture)
A few turns later again the tile fertility is reduced, causing the city to let the fields lie fallow.
Fallow lands are replaced quickly by Young Growth.
This unproductive pattern can be reduced by building farms (requiring crop-rotation or irrigation), builder created farms do not fall fallow.

---
 
Back
Top Bottom