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 Sep 01, 2010, 06:57 PM   #1
dnewhous
Chieftain
 
Join Date: Oct 2006
Posts: 63
Question Python: Oasis on the Pool of Tears

I want to have the Pool of Tears act as a fresh water source for adjacent tiles, and someone suggested that I use python to give the Pool of Tears the effects of an oasis. But after looking at the issue a little bit, my inference is that unless there is an appropriate function for the Pool of Tears in the API, there is no way to do this without recompiling the game. There isn't any such function being used in the game, and I really doubt a function would be in the API unless it were going to be used. But I wanted to come here and verify my tentative conclusion.
dnewhous is offline   Reply With Quote
Old Sep 01, 2010, 07:49 PM   #2
MagisterCultuum
Great Sage
 
MagisterCultuum's Avatar
 
Join Date: Feb 2007
Location: Kael's head
Posts: 14,060
1. Open up CvEventManager.py
2. Scroll down to the function def onImprovementBuilt(self, argsList):
3. Add these 2 lines of code:
Code:
		if iImprovement == gc.getInfoTypeForString('IMPROVEMENT_POOL_OF_TEARS'):
			pPlot.setFeatureType(gc.getInfoTypeForString('FEATURE_OASIS'),-1)

If hell terrain spreads to the tile the feature will probably be destroyed, but otherwise you're fine. I was about to suggest editing the doHell function in CustomFunctions.py, but then I remembered that that python and the SDK handled terrain changes tend not to line up properly and you'd have to make Oases valid on hell terrains for it to work. You could do that and then made doHell change the feature to something else in hell if you like though.

If you don't want the Pool to have the extra yields of an Oasis, you can give the improvement the opposite yield changes as the feature.
__________________
Economic Left/Right: 0.38
Social Libertarian/Authoritarian: -5.38
http://www.holisticpolitics.org/

MagisterModmod for FfH2 last updated on 4/8/2013 at around 2:30 pm.

You may download the Installer here or the Archive here.

Last edited by MagisterCultuum; Sep 01, 2010 at 07:55 PM.
MagisterCultuum is online now   Reply With Quote
Old Sep 01, 2010, 11:03 PM   #3
dnewhous
Chieftain
 
Join Date: Oct 2006
Posts: 63
The effect is to make the tops of a couple of palm trees stick out of the Pool of Tears. Nothing more.

Thanks for the help, even though it didn't work.

Last edited by dnewhous; Sep 02, 2010 at 08:50 PM.
dnewhous 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 > [BTS] Python: Oasis on the Pool of Tears

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
The Forest of Tears Rex rgis of Ter Civ4 - Stories & Tales 4 Mar 06, 2008 04:52 PM
Tears Llotyhy Civ4 - General Discussions 3 Nov 01, 2005 04:28 PM
can I irrigate near oasis? Micaello Civ3 - General Discussions 1 Jun 16, 2004 06:45 AM
Oasis, what the hell? Salamandre Civ3 - General Discussions 17 Dec 23, 2003 08:50 AM


Advertisement

All times are GMT -6. The time now is 07:02 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