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 > Civ4 - Project & Mod Development > Civ4 - Fall from Heaven

Notices

Reply
 
Thread Tools
Old Dec 21, 2007, 07:10 AM   #1
TravellingHat
Warlord
 
TravellingHat's Avatar
 
Join Date: Jan 2007
Location: UK
Posts: 225
End of Winter mechanics

A question for the mod team:

If End of Winter is on, will it gradually upgrade any tundra/snow according to its latitude (so extreme northerly/southerly climes will never naturally warm up)? If I have snowy regions on the equator, for example, will they over time become tundra, then plains? Also, does it have any effect on floating ice?

I ask because I'm think of designing a very wintery map which I'd like to gradually warm up, and (if floating ice is affected) quite like the idea of frozen seas that will, in time, thaw out, opening up previously isolated lands.

Edit: also, what determines whether upgraded tiles become plains or grasslands?
__________________
Oh look... I've just made a knight! Shame the enemy has tanks
TravellingHat is offline   Reply With Quote
Old Dec 21, 2007, 07:37 AM   #2
Kael
Deity
 
Kael's Avatar
 
Join Date: May 2002
Location: Ohio
Posts: 17,392
The "Thaw" mechanic is a process that runs as soon as the game starts. Its all right here (from the onGameStart python function in CvEventManager.py):

Code:
if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_THAW):
	iDesert = gc.getInfoTypeForString('TERRAIN_DESERT')
	iGrass = gc.getInfoTypeForString('TERRAIN_GRASS')
	iPlains = gc.getInfoTypeForString('TERRAIN_PLAINS')
	iSnow = gc.getInfoTypeForString('TERRAIN_SNOW')
	iTundra = gc.getInfoTypeForString('TERRAIN_TUNDRA')
	for i in range (CyMap().numPlots()):
		pPlot = CyMap().plotByIndex(i)
		if pPlot.getFeatureType() == -1:
			if pPlot.getImprovementType() == -1:
				if pPlot.isWater() == False:
					iTerrain = pPlot.getTerrainType()
					if iTerrain == iTundra:
						pPlot.setTempTerrainType(iSnow, CyGame().getSorenRandNum(90, "Bob") + 10)
					if iTerrain == iGrass:
						pPlot.setTempTerrainType(iTundra, CyGame().getSorenRandNum(90, "Bob") + 10)
					if iTerrain == iPlains:
						pPlot.setTempTerrainType(iTundra, CyGame().getSorenRandNum(90, "Bob") + 10)
					if iTerrain == iDesert:
						pPlot.setTempTerrainType(iPlains, CyGame().getSorenRandNum(90, "Bob") + 10)
The new SDK function I needed for this to work is setTempTerrainType. It accepts 2 arguements, the new terrain type you want to switch to, and the amount of turns you want it to remain that terrain type.

As you can see from the code, tundra becomes snow, grasslands becomes tundra, plains becomes tundra, desert becomes plains. It doesnt do anything with water plots or plots with features on them (which is why you may notice that forests and jungles are still on grasslands or plains).

For your purpose you need to build your map in its final (warm) state and then let the thaw mechanic freeze it for you.
Kael is offline   Reply With Quote
Old Dec 21, 2007, 07:37 AM   #3
Nikis-Knight
Deity
 
Nikis-Knight's Avatar
 
Join Date: Dec 2005
Location: Orange County, CA
Posts: 5,632
No, it's simpler than what you thought.
For one thing, floating ice is unaffected, so that's out, sorry.
How it works is that is generates a map as normal, then converts each featureless tile one step towards snow, along with giving it a random number between 10 & 100. The number is the turn in which it returns to normal.

So the option works with premade maps without adding any snow or tundra--in fact if you do it will end up like that again. And what determines the final step is whatever the map generator chose them to be to begin with.

However, since tiles with features are unaffected, I think, starting in areas with several flood plains is a bit unbalancing.

edit: Hi, Kael.
__________________
Fall From Heaven II
Nikis-Knight is offline   Reply With Quote
Old Dec 21, 2007, 07:51 AM   #4
TravellingHat
Warlord
 
TravellingHat's Avatar
 
Join Date: Jan 2007
Location: UK
Posts: 225
Ah right - thanks for the quick response guys. So the frozen sea is out then. Oh well, it was a nice idea.
__________________
Oh look... I've just made a knight! Shame the enemy has tanks
TravellingHat is offline   Reply With Quote
Old Dec 21, 2007, 02:22 PM   #5
Arqane
Chieftain
 
Join Date: Aug 2007
Posts: 68
Wouldn't it be fairly simple to add the code so that Ocean/Shore becomes Ice? Same deal, just copy/paste with whatever the string for Ocean and Ice is.
Arqane is offline   Reply With Quote
Old Dec 21, 2007, 04:29 PM   #6
Lasgalen Lothir
Chieftain
 
Join Date: Mar 2007
Posts: 5
I tried using the End of Winter option on your scenario, Nikis-Knight, but it seemed to either break it or cause it to load extremely slowly (like 10-15 minutes before I canceled it out).
Lasgalen Lothir is offline   Reply With Quote
Old Dec 21, 2007, 05:09 PM   #7
Nikis-Knight
Deity
 
Nikis-Knight's Avatar
 
Join Date: Dec 2005
Location: Orange County, CA
Posts: 5,632
It takes long to load, but plays about the same after that. Load it up and read a book for a short while.
__________________
Fall From Heaven II
Nikis-Knight is offline   Reply With Quote
Old Dec 21, 2007, 08:05 PM   #8
Kael
Deity
 
Kael's Avatar
 
Join Date: May 2002
Location: Ohio
Posts: 17,392
Quote:
Originally Posted by Arqane View Post
Wouldn't it be fairly simple to add the code so that Ocean/Shore becomes Ice? Same deal, just copy/paste with whatever the string for Ocean and Ice is.
Its not a technical challenge, just processor cost. Ice isn't a terrain, its a feature. So I couldn't use the existing mechanic, I would need to add a new counter and ability to add temporary features. Since Ice would be the only place we would use that counter it doesnt seem worth it. We have a few ideas for the tempterrain mechanic.

Besides there wouldn't be much game play value in adding the new mechanic since most people aren't out sailing in the first 100 turns anyway. It would be entirely cosmetic, so not really worth the processor.
Kael is offline   Reply With Quote
Old Dec 21, 2007, 08:08 PM   #9
westamastaflash
Lord Commander
 
westamastaflash's Avatar
 
Join Date: Nov 2007
Posts: 904
Quote:
Originally Posted by Kael View Post
Since Ice would be the only place we would use that counter it doesnt seem worth it. We have a few ideas for the tempterrain mechanic.
But what about floodplains? It's a bit unbalancing if someone starts with 3 or 4 floodplains since they don't seem to change with end of winter...
westamastaflash is offline   Reply With Quote
Old Dec 21, 2007, 11:10 PM   #10
vorshlumpf
Emperor
 
vorshlumpf's Avatar
 
Join Date: Dec 2003
Location: Victoria, BC, Canada
Posts: 1,096
I'd like to see ice on land, too. Frozen forests would be neat.

As mentioned, there is a bit of an imbalance right now since some tiles are affected and others aren't.
__________________
- Niilo

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm broken. No other computer games 'do it' for me anymore. I've tried buying some. I've tried downloading others. But no sooner have I started playing them than I'm thinking about this again.

Success is the happy feeling you get between the time you do something and the time you tell a woman what you did. - Dilbert

My Fall from Heaven research thread can be found here.
vorshlumpf is offline   Reply With Quote
Old Dec 23, 2007, 02:33 AM   #11
mdfairch
Chieftain
 
Join Date: Jan 2007
Posts: 42
Quote:
Originally Posted by Kael View Post
Its not a technical challenge, just processor cost. Ice isn't a terrain, its a feature. So I couldn't use the existing mechanic, I would need to add a new counter and ability to add temporary features. Since Ice would be the only place we would use that counter it doesnt seem worth it. We have a few ideas for the tempterrain mechanic.
How does it work in the age of ice scenario? I suppose the body of water being affected there is very small, so it's a rather different case.
mdfairch is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Fall from Heaven > End of Winter mechanics

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
end of winter Neomega Civ4 - Fall from Heaven 1 Jan 01, 2009 05:17 PM
End of Winter iceboy103 Civ4 - Fall from Heaven 1 Sep 19, 2008 03:31 AM
End of winter option Alzara Civ4 - Fall from Heaven 6 Apr 18, 2008 06:10 AM
GOTM 31 Spoiler 3: End Industrial age / end game submitted ainwood Civ3 - Game of the Month 119 Jun 03, 2004 02:13 AM


Advertisement

All times are GMT -6. The time now is 07:36 AM.


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