Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization

Notices

Reply
 
Thread Tools
Old Nov 14, 2005, 10:51 AM   #1
Skeeve
Chieftain
 
Skeeve's Avatar
 
Join Date: Mar 2004
Posts: 30
Terraforming

Just wondering if anyone knows how I might change the worker unit to be able to alter terrain. (Possibly after achieving a new future tech called Terraforming)

Something like this:
Tundra --> Plains
Plains --> Grassland
Perhaps even to level Mountains to Hills or something.

I'm pretty sure this will involve more than just editing the XML files.
Skeeve is offline   Reply With Quote
Old Nov 17, 2005, 07:16 PM   #2
WildWeazel
Maker of Worlds
 
WildWeazel's Avatar
 
Join Date: Jul 2003
Location: %CIV3%\Conquests\Scenarios\
Posts: 6,689
Images: 11
Wrong forum, questions go in the main C&C forum. I'll ask a mod to move it.
WildWeazel is offline   Reply With Quote
Old Nov 18, 2005, 09:23 AM   #3
McBierle
Chieftain
 
Join Date: Nov 2005
Posts: 32
First add the following to the "CIV4BuildInfos.xml"

Code:
		<BuildInfo>
			<Type>BUILD_TERRAFORM</Type>
			<Description>TXT_KEY_BUILD_TERRAFORM</Description>
			<Help/>
			<PrereqTech>NONE</PrereqTech>
			<iTime>1000</iTime>
			<bKill>0</bKill>
			<ImprovementType>IMPROVEMENT_TERRAFORM</ImprovementType>
			<TerrainType>NONE</TerrainType>   This line is wrong remove it!!!!!
			<RouteType>NONE</RouteType>
			<EntityEvent>ENTEVENT_IRRIGATE</EntityEvent>
			<FeatureStructs/>
			<HotKey>0</HotKey>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<Button>,Art/Interface/Buttons/Builds/grassland,Art/Interface/Buttons/baseterrain_terrainfeatures_atlas.dds,3,1</Button>
		</BuildInfo>
Then this to "CIV4ImprovementInfos.xml"

Code:
		<ImprovementInfo>
			<Type>IMPROVEMENT_TERRAFORM</Type>
			<Description>TXT_KEY_IMPROVEMENT_TERRAFORM</Description>
			<Civilopedia>TXT_KEY_IMPROVEMENT_TERRAFORM_PEDIA</Civilopedia>
			<ArtDefineTag>ART_DEF_TERRAIN_GRASS</ArtDefineTag>
			<YieldChanges/>
			<bHillsMakesValid>0</bHillsMakesValid>
			<bFreshWaterMakesValid>0</bFreshWaterMakesValid>
			<bRiverSideMakesValid>0</bRiverSideMakesValid>
			<bNoFreshWater>0</bNoFreshWater>
			<bRequiresFlatlands>1</bRequiresFlatlands>
			<bRequiresRiverSide>0</bRequiresRiverSide>
			<bRequiresIrrigation>1</bRequiresIrrigation>
			<bCarriesIrrigation>0</bCarriesIrrigation>
			<bRequiresFeature>0</bRequiresFeature>
			<bWater>0</bWater>
			<bGoody>0</bGoody>
			<bPermanent>0</bPermanent>
			<bUseLSystem>1</bUseLSystem>
			<iTilesPerGoody>0</iTilesPerGoody>
			<iGoodyRange>0</iGoodyRange>
			<iUpgradeTime>0</iUpgradeTime>
			<iAirBombDefense>0</iAirBombDefense>
			<iDefenseModifier>0</iDefenseModifier>
			<iPillageGold>0</iPillageGold>
			<TerrainMakesValids>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_PLAINS</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_TUNDRA</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_SNOW</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_DESERT</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
			</TerrainMakesValids>
			<FeatureMakesValids/>
			<ImprovementPillage/>
			<ImprovementUpgrade/>
			<TechYieldChanges/>
			<RouteYieldChanges/>
			<bGraphicalOnly>0</bGraphicalOnly>
		</ImprovementInfo>
and this to the <Builds> Tag in <UnitInfo> of the worker "CIV4UnitInfos.xml"

Code:
<Build>
	<BuildType>BUILD_TERRAFORM</BuildType>
	<bBuild>1</bBuild>
</Build>
and finally open the "CvEventManager.py" and jump to the "def onImprovementBuilt(self, argsList):" part and change this

Code:
def onImprovementBuilt(self, argsList):
		'Improvement Built'
		iImprovement, iX, iY = argsList
		if (not self.__LOG_IMPROVEMENT):
			return
		CvUtil.pyPrint('Improvement %s was built at %d, %d'
			%(PyInfo.ImprovementInfo(iImprovement).getDescription(), iX, iY))
so it looks like that:

Code:
def onImprovementBuilt(self, argsList):
		'Improvement Built'
		iImprovement, iX, iY = argsList
		pPlot = CyMap().plot(iX,iY)
		if(iImprovement == gc.getInfoTypeForString('IMPROVEMENT_TERRAFORM')):
			CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'Terraformed','AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/general/happy_person.dds',ColorTypes(8),iX,iY,False,False)
			nase = pPlot.getTerrainType()
			pPlot.setTerrainType(nase-1, 1, 1)
			pPlot.setImprovementType(-1)
                if (not self.__LOG_IMPROVEMENT):
			return
		CvUtil.pyPrint('Improvement %s was built at %d, %d'
			%(PyInfo.ImprovementInfo(iImprovement).getDescription(), iX, iY))
now workers will be able to terraform flat lands up to grassland.
the order is snow->tundra->desert->plains->grassland
You should add a <PrereqTech>, or it will always be available.
Also you can tweak things, like not beeing able to terraform snow or something...
And of course there should me the links to the descrition und civilopedia texts...

Last edited by McBierle; Nov 30, 2005 at 02:02 PM.
McBierle is offline   Reply With Quote
Old Nov 21, 2005, 06:49 AM   #4
Skeeve
Chieftain
 
Skeeve's Avatar
 
Join Date: Mar 2004
Posts: 30
Wow - Thanks for the detailed reply!

It will be easier than I thought to do - although a bit complex for my understanding. But that's what I thought about Civ3 until I got used to it.

Thanks again
Skeeve is offline   Reply With Quote
Old Nov 30, 2005, 12:33 PM   #5
kandalf
Warlord
 
kandalf's Avatar
 
Join Date: Sep 2005
Posts: 116
nice work! I'm sure it will be included in some futuristic mods at some point.
kandalf is offline   Reply With Quote
Old Nov 30, 2005, 02:03 PM   #6
McBierle
Chieftain
 
Join Date: Nov 2005
Posts: 32
i just edited my post in the first xml file there is a line that should not be there; i marked it....
McBierle is offline   Reply With Quote
Old Nov 30, 2005, 02:21 PM   #7
Chaotic Law
Chieftain
 
Chaotic Law's Avatar
 
Join Date: Nov 2005
Posts: 40
Has anyone successfully aplied this mod??

Just wanted to know if anyone has gotten this mod to work. I am really stuck on how to make the workers change the terrain. Any help??

Chaotic Law

Trying to organize the chaos.
Chaotic Law is offline   Reply With Quote
Old Nov 30, 2005, 04:03 PM   #8
McBierle
Chieftain
 
Join Date: Nov 2005
Posts: 32
responsing to this and the threat above (before this post :-D ), i will try to anser when sober again.
perhaps somebody will dio that before me, if not i'll try.

a short notuice:
1. the xml files define the improvements which are interceptet by the phyton part.
2. the python part defines what to do with that event.
3. ther e is some info of tghe python things used in http:///files/modding/PythonAPI/ lower-left "terrain types" (all that stuff was done by someone who is better than me)
4. forgot
McBierle is offline   Reply With Quote
Old Nov 30, 2005, 11:58 PM   #9
Chaotic Law
Chieftain
 
Chaotic Law's Avatar
 
Join Date: Nov 2005
Posts: 40
Please post what I need to do INGAME...

I just need to know what I need to do ingame to make the workers change the terrain. I think you might be my only hope. Please read this and respond. Thanks again. Keeping my fingers crossed.

Chatic Law

Trying to organize the chaos.
Chaotic Law is offline   Reply With Quote
Old Dec 01, 2005, 12:07 AM   #10
WildWeazel
Maker of Worlds
 
WildWeazel's Avatar
 
Join Date: Jul 2003
Location: %CIV3%\Conquests\Scenarios\
Posts: 6,689
Images: 11
If you have modded the game correctly, all you have to do in-game is click the new terraform button.
WildWeazel is offline   Reply With Quote
Old Dec 02, 2005, 01:09 AM   #11
Chaotic Law
Chieftain
 
Chaotic Law's Avatar
 
Join Date: Nov 2005
Posts: 40
I guess I havent then...

There is no new button that I can see. Has anyone tried this mod and gotten it to work? Anyone?? Anyone check the code to see if its correct?

Chaotic Law

Trying to organize the chaos.
Chaotic Law is offline   Reply With Quote
Old Jan 31, 2006, 10:03 AM   #12
Skeeve
Chieftain
 
Skeeve's Avatar
 
Join Date: Mar 2004
Posts: 30
Quote:
Originally Posted by Chaotic Law
There is no new button that I can see. Has anyone tried this mod and gotten it to work? Anyone?? Anyone check the code to see if its correct?

Chaotic Law

Trying to organize the chaos.
Hi,
I should have tried it by now, but I've been too busy actually playing games instead of modding. I always loved the CIV2 ability for engineers to change the terrain, so I'll give it a shot soon and let you know if I get it to work.

By the way - I don't thing the instructions above tell us how to create a Terraform Button. This might require a little art work in the .dds files and then properly displaying it when the tech becomes available. Just to test it out, however, we can just make a generic button and fine-tune it later.

In the meantime - if anyone else gets Terraforming to work - post it!
Skeeve is offline   Reply With Quote
Old Jan 31, 2006, 10:20 AM   #13
Kael
Deity
 
Kael's Avatar
 
Join Date: May 2002
Location: Ohio
Posts: 17,392
Quote:
Originally Posted by Skeeve
Hi,
I should have tried it by now, but I've been too busy actually playing games instead of modding. I always loved the CIV2 ability for engineers to change the terrain, so I'll give it a shot soon and let you know if I get it to work.

By the way - I don't thing the instructions above tell us how to create a Terraform Button. This might require a little art work in the .dds files and then properly displaying it when the tech becomes available. Just to test it out, however, we can just make a generic button and fine-tune it later.

In the meantime - if anyone else gets Terraforming to work - post it!
I have druid units that upgrade the terrain, elven units that grow forests and a wonder that upgrades all of the terrain in your emprie in my mod. Feel free to check it out.
Kael is offline   Reply With Quote
Old Jan 31, 2006, 01:07 PM   #14
Skeeve
Chieftain
 
Skeeve's Avatar
 
Join Date: Mar 2004
Posts: 30
Quote:
Originally Posted by Kael
I have druid units that upgrade the terrain, elven units that grow forests and a wonder that upgrades all of the terrain in your emprie in my mod. Feel free to check it out.
I certainly will! Thanks very much.
Intriquing wonder that upgrades terrain... sounds like it could be potentially unbalancing - but wow.
Skeeve is offline   Reply With Quote
Old Jan 31, 2006, 02:01 PM   #15
RogerBacon
King
 
Join Date: Nov 2003
Posts: 628
Man, how could you guys have missed this? It was the first mod I downloaded when Civ 4 came out. I also improved it by adding a chance for a random resource to be found on the new square. Be sure to look on page two to see my add-on that adds resource generation.

http://apolyton.net/forums/showthrea...ight=terraform

Roger Bacon
RogerBacon is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Terraforming

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Terraforming HeWhoAtePie Civ4 - Song of the Moon 3 May 24, 2007 04:29 PM
Terraforming? Dasann Civ4 - Creation & Customization 0 Oct 30, 2005 06:43 PM
Terraforming taylorray1 Civ - Ideas & Suggestions 1 Jul 02, 2004 03:43 PM


Advertisement

All times are GMT -6. The time now is 01:31 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR