[MODCOMP] Favorite Religion

TheLopez

Deity
Joined
Jan 16, 2006
Messages
2,525
Location
Oregon
Favorite Religion
By: TheLopez

Last Update: 11/08/06

Version: v0.2w
Patch Compatibility: Warlords v2.0.8.0
MP Compatible: ?
Download Mod v0.2w

Version: v0.2
Patch Compatibility: v1.61
MP Compatible: ?
Download Mod v0.2

Description:
This mod provides the ability to make some leaders more historically accurate
by helping the AI to pick a particular leader's state religion. This way
Saladin can be hinted to pick Islam as his state religion and Christianity as
Isabella's state religion.


Installation Instructions:

1) Unzip this into the "civ4_install_folder\Mods\" folder.
2) Open the CivilizationIV.ini configuration file
3) Change the Mod line to read: Mod = Mods\Favorite Religion
4) Load the game.
5) Then play as normal.


-----Game Play-----
Spoiler :

- Most leaders have been given a favorite religion, the are:
[TAB]Alexander: [NONE]
[TAB]Asoka: Buddhism
[TAB]Bismarck: Christianity
[TAB]Caesar: [NONE]
[TAB]Catherine: Christianity
[TAB]Cyrus: [NONE]
[TAB]Elizabeth I: Christianity
[TAB]FDR: Christianity
[TAB]Frederick II: Christianity
[TAB]Gandhi: Hinduism
[TAB]Genghis Khan: Taoism
[TAB]George Washington: Christianity
[TAB]Hatshepsut: [NONE]
[TAB]Huayna Capac: [NONE]
[TAB]Isabella: Christianity
[TAB]Ivan: Christianity
[TAB]Kublai Khan: Buddhism
[TAB]Louis XIV: Christianity
[TAB]Mansa Musa: Islam
[TAB]Mao Zedong: Buddhism
[TAB]Montezuma: [NONE]
[TAB]Napoleon: Christianity
[TAB]Qin Shi: Taoism
[TAB]Saladin: Islam
[TAB]Tokugawa: [NONE]
[TAB]Victoria: Christianity


-----Notes to Modmakers-----

If you want to use the Favorite Religion in your mod I have tried to make
things as easy as possible for you. In the XML files I have added
<!-- Favorite Religion Start --> and <!-- Favorite Religion End --> in all of
the places that I have made changes to the original files.

In the SDK files I have added // < Favorite Religion Start > and
// < Favorite Religion End > in all of the places that I have made changes to
the original files.

In the Python files I have added # < Favorite Religion Start > and
# < Favorite Religion End > in all of the places that I have made changes to
the original files.

In order to provide hints to the AI of what a leaders favorite religion is new
tags similar to the favorite civic tags have been added.

Last, several new methods have been exposed to the python layer in the
CvLeaderHeadInfo class in order to allow getting and setting the favorite
religion variables they are:
[TAB]int getFavoriteReligion()
[TAB]int getFavoriteReligionAttitudeChange()
[TAB]int getFavoriteReligionAttitudeDivisor()
[TAB]int getFavoriteReligionAttitudeChangeLimit()

[TAB]void setFavoriteReligion(int iNewValue)
[TAB]void setFavoriteReligionAttitudeChange(int iNewValue)
[TAB]void setFavoriteReligionAttitudeDivisor(int iNewValue)
[TAB]void setFavoriteReligionAttitudeChangeLimit(int iNewValue)

-----Version Information-----

-----v0.2------

- Added the missing text tags:
[TAB]TXT_KEY_MISC_ATTITUDE_FAVORITE_RELIGION
[TAB]TXT_KEY_DENIAL_FAVORITE_RELIGION
Reported by Mexico.

- Moved the favorite religion trade code from the AI_civicTrade method to the
AI_religionTrade method since it was in the wrong place. Reported by Mexico.

- Added the missing DENIAL_FAVORITE_RELIGION entry in the CIV4BasicInfos.xml
file. Reported by Mexico.

Spoiler :

-----v0.1------

- Setup the Favorite Religion Mod infrastructure

- Added the <iFavoriteReligionAttitudeChange>,
<iFavoriteReligionAttitudeDivisor>, <iFavoriteReligionAttitudeChangeLimit> and
<FavoriteReligion> tags including the underlying code support in the SDK.

- Exposed several methods to the python layer through the SDK to allow setting
the new favorite religion variables.

- Updated the CvPediaLeader.py file to display leaders favorite religions.


-----===Credits & Thanks===-----

- Exavier
[TAB]Composite Mod - readme.txt format

- GraveEatr
[TAB]For inspiring me to develop this mod.
[TAB]
 
This is Da Bomb! Great props to you TheLopez and to GraveEatr for inspiring it. :thanx:

This will give so much more functionality to religion mods. :D
 
WONDERFUL, its one of the things I was looking for in the composite!!!!
The Inquisitor that the AI uses is the other...

Thank you!
 
This is going to be one of those "must have" mods, especially for those running mods that alter Religion.

I'd like to thank TheLopez for running with this idea and making it become a reality. Without him this couldn't of been possible. :goodjob:


Downloading now!
 
Can we get some hard info on what these will do

<iFavoriteReligionAttitudeChange>0</iFavoriteReligionAttitudeChange>
<iFavoriteReligionAttitudeDivisor>0</iFavoriteReligionAttitudeDivisor> <iFavoriteReligionAttitudeChangeLimit>0</iFavoriteReligionAttitudeChangeLimit>

I've also started an initiative to get the civ gold leaders mapped out...

Right now we have a master Warlords version with Shinto and Zoroastrianism plus the civs of Portugal, Israel, Cherokee, mapped out and we're discussing it over in my XL thread if you want to pop in.

The Civ Gold thread is in the Civ Gold Forum... I need to wait till Sunday to get a master list of leaders.
 
FYI: I just posted a new version of the Warlords version that contained some issues.
 
Lopez,

May you please elaborate what

<iFavoriteReligionAttitudeChange>1</iFavoriteReligionAttitudeChange>
<iFavoriteReligionAttitudeDivisor>10</iFavoriteReligionAttitudeDivisor>
<iFavoriteReligionAttitudeChangeLimit>1</iFavoriteReligionAttitudeChangeLimit>

means? :D

P.S. The warlords version is lacking <FavoriteReligion>NONE</FavoriteReligion> for Alexander.

Many thanks
Houman
 
Ah, you are a wonderful person! I was just thinking Civ4 needed this (after the fiftieth game where more than half the AI leaders are Buddhists or Hindus just because they researched it before anything else). Great job!

*downloads*
 
Brilliant! I remember i posted a request for excatly this some time ago. Nice to see someone made it.
 
Fantastic work! I've felt (since the beginning) that this was at least one of the biggest flaws of the game. And I've wondered if I should get into modmaking in order to change the way religions work -this is by far a great step in the right direction. I can only say thank you.

This mod does not alter the effects of having one's favorite religion, does it? I was wondering if it would be possible to give a bonus for having one's favorite religion, such as +1 gold for each city with the favorite religion present if it is the state religion, or +1 culture, or just improved religious civic yields? (Theocracy = +3 xp on units, Organized religion = +30%-35% faster building construction, Pacifism = 125% or 150% great people increase, etc.)

Just enthusiastic about your mod here...
 
Hmmm... that is a very interesting idea... Aussie_Lurker, what do you think? I ask aL because he is putting together a very good mod that expands the capabilities of civics.
 
under some conditions, if you want trade with player, which founded nad adopt his favorite religion, you got CTD.

problem is in file CvDLLWidgetData.cpp, in fuction parseTradeItem :

at end of this, you can find:
Code:
		setTradeItem(&item, ((TradeableItems)(widgetDataStruct.m_iData1)), widgetDataStruct.m_iData2);

		eDenial = GET_PLAYER(eWhoFrom).getTradeDenial(eWhoTo, item);

		if (eDenial != NO_DENIAL)
		{
			szTempBuffer.Format(L"%s: " SETCOLR L"%s" ENDCOLR, GET_PLAYER(eWhoDenies).getName(), TEXT_COLOR("COLOR_WARNING_TEXT"), GC.getDenialInfo(eDenial).getDescription());
			szBuffer += (NEWLINE + szTempBuffer);
		}
and when eDenial is DENIAL_FAVORITE_RELIGION, game crashed at GC.getDenialInfo(eDenial).getDescription() - there is missing denial info entry in CIV4BasicInfos.xml (and of course appropriate entry for TXT_KEY_DENIAL_FAVORITE_RELIGION)


and another question: why you test favorite religion in civic trading ? why not in religion part?
 
Hey, I love the mod.. and have included it in my personal mod. I've also replaced Confucianism with Hellenism, so now everyone in the game has a favourite religion! I had to fudge on the Incas and Aztecs and give them Hinduism, but oh well. My question is.. is there a way to make the religious icon appear in the Civilopedia when looking at a leader? I've attached a picture of Asoka to highlight what I mean. It would be cool if a little Buddha was there.
 

Attachments

  • asokabuddhism.JPG
    asokabuddhism.JPG
    36.9 KB · Views: 260
Mexico - Thanks for both bug reports, I will fix the code in both the regular and warlords version. After that I will update the warlords code for the v2.0.8 patch.

Houman - Thanks for the bug report I will fix that for the next release.

Nilmerf - Why should the religion icon be next to the leader?
 
Updated both versions, the Warlords version is now compatible with the v2.0.8.0 patch!!!
 
Top Bottom