HOW TO: Modify the religions

Ralendil

Augustus
Joined
Feb 6, 2002
Messages
274
Location
Somewhere on earth
Modifications: XML files
File: \Assets\XML\GameInfo\CIV4ReligionInfo.xml
Attachments: christian.jpg (3.2 KB), christianity.jpg (4.8 KB)
Purpose: Explaining how to modify a religion. We won't explain how to add a religion... simply modify it. You can modify several things in the religions, like the bonus given to the holy city, to the religion when it is the state religion, or the bonus of the religion with no religion state. You can give bonus in gold, research or culture. Finally the other thing interresting is the spread that can be modified also.

Well, there's not 100 methods to do that :). Let's explain the file:

Each new religion section is introduced by these tags
Code:
<!-- Religion -->
<Civ4ReligionInfo xmlns="x-schema:CIV4GameInfoSchema.xml">
	<ReligionInfos>
		<ReligionInfo>
and finish by this tags

Code:
		</ReligionInfo>

We will take the Judaism, not cause it is my prefered, cause it is the first one introduced in the file...

  • <Type>RELIGION_JUDAISM</Type>

    Here the valor that will be used by the game to identify the religion. As we don't want to add a religion, it has no real interest here ;).

  • <Description>TXT_KEY_RELIGION_JUDAISM</Description>
    The name of the religion. You can modify it in the file \Assets\XML\Text\CIV4GameTextInfos_Objects.xml

  • <Civilopedia>TXT_KEY_RELIGION_JUDAISM_PEDIA</Civilopedia>
    It refers to the religion description in the civilopedia. You can modify the description in the file \Assets\XML\Text\CIV4GameText_Civilopedia_CivicsReligion.xml

  • <TechPrereq>TECH_MONOTHEISM</TechPrereq>
    The technology needed in order to see the religion established.
    The list of the technologies can be found in this file: \Assets\XML\Technologies\CIV4TechInfos.xml

  • <FreeUnitClass>NONE</FreeUnitClass>
    An unit given to the civilization that discover the religion.
    An exemple of this can be found in the christian section.

    In this section you can see this:
    <FreeUnitClass>UNITCLASS_CHRISTIAN_MISSIONARY</FreeUnitClass>
    This, commands the game to give a christian missionary to the civilization that discovers the christianity.

  • <iSpreadFactor>100</iSpreadFactor>
    The spread factor. To increase the spread of a religion you have to increase this number. Any increase of it will make the spread faster.
  • Code:
    			<GlobalReligionCommerces>
    				<iGlobalReligionCommerce>1</iGlobalReligionCommerce>
    				<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
    				<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
    			</GlobalReligionCommerces>

    Here something interresting. This allow to modify the effect of the religion in global, so when no religion is the religion state. It works like that:
    • First section refer to the bonus in gold
    • The second section refers to the research bonus.
    • the last section refers to the culture bonus.

  • Code:
    			<HolyCityCommerces>
    				<iHolyCityCommerce>0</iHolyCityCommerce>
    				<iHolyCityCommerce>0</iHolyCityCommerce>
    				<iHolyCityCommerce>4</iHolyCityCommerce>
    			</HolyCityCommerces>

    The bonuses for the holy city. It works like for the global bonuses. So gold, research and culture.

  • Code:
    			<StateReligionCommerces>
    				<iStateReligionCommerce>0</iStateReligionCommerce>
    				<iStateReligionCommerce>0</iStateReligionCommerce>
    				<iStateReligionCommerce>1</iStateReligionCommerce>
    			</StateReligionCommerces>

    The bonuses accorded to a city when there's a state religion. It works like for the global bonuses. So gold, research and culture.

  • <Button>Art/Interface/Buttons/Religions/Jewish.dds</Button>

    Here you can define the picture used for the religion in the religion advisor pannel.
    I have attached a picture that show for the christians what picture is it. (christian.jpg (3.2 KB))

  • <TechButton>Art/Interface/Buttons/TechTree/Judaism.dds</TechButton>
    Same as above a picture used for the religion. You can see it in the attachments... (christianity.jpg (4.8 KB))

  • <MovieFile>Art/Movies/Religion/Christianity/Chr_Found.nif</MovieFile>
    <MovieSound>AS2D_BUILD_CHRISTIAN_MOVIE</MovieSound>


    defines the movie used when the religion is discovered. Here, I don't know more...

  • <Sound>AS2D_BUILD_CHRISTIAN</Sound>

    The sound file (don't know too much about the sound in Civ 4 for now :().


Bonus:
Where to find the picture used for the religion on the strat map ?
here: \Assets\Art\interface\buttons\religions\christian_d.dds
I have not played yet with that ;)


Here you have the basis to modify the religions. But it is really the basis... If you search more you can find some mentions about religion in the units infos... We could imagine a mod based on the religions, and that gives several ways to obtain units. (like units require a religion to be built).

I hope this will help some civfans. Please forgive my bad english, I am not english native :).
 
I have added the precision about the spread, as I have conducted several tests about that now...
 
hello

sorry but my english is very bad but
Ralendil
you search more you can find some mentions about religion in the units infos...

to that you talk about with this?

thanks
PD: talk spanish???
 
un poco ^^

perro yo hablo espanol como un alumno ....

Well about the unit that's simple

Let's take the easiest exemple.... the missionary (here I think now you have understood :p).

--------------------[ Open File ]--------------------
\Assets\XML\Units\CIV4UnitInfos.xml

--------------------[ Find ]--------------------

<Class>UNITCLASS_JEWISH_MISSIONARY</Class>

--------------------[ Find under ]--------------------
<PrereqReligion>RELIGION_JUDAISM</PrereqReligion>

here is the line that command the game to allow this unit only if a city has the proper religion.


But you can imagine complicated mods. Like a mod that will allow a free building when you are in theocracy, free building that would permit you to build units for your religion. Exemple Knights for the Christiannity, or another exemple are hashishin for the muslims (i love these soldiers, if you don't know what are hashishin see here ;)) etc...
 
hello again

Ralendil
Like putting 75 to the judaism will make this religion common for every civ that will develop it (the religion spread so quickly than you can't slow it

Well, it is truth that AI considers this that you have put your, is to say once changed to the value the civilizations handled by the AI have begun to adopt the judaismo

in spanish
es verdad que la inteligecia artificial tiene en cuenta esto que has puesto tu, es decir una vez cambiado el valor las civilizaciones manejadas por la inteligencia artificial han empezado a adoptar el judaismo

thanks
 
obv said:
hello again

Ralendil
Like putting 75 to the judaism will make this religion common for every civ that will develop it (the religion spread so quickly than you can't slow it

Well, it is truth that AI considers this that you have put your, is to say once changed to the value the civilizations handled by the AI have begun to adopt the judaismo

in spanish
es verdad que la inteligecia artificial tiene en cuenta esto que has puesto tu, es decir una vez cambiado el valor las civilizaciones manejadas por la inteligencia artificial han empezado a adoptar el judaismo

thanks

not really ;)

I have played some games without any modifications, and I have seen the AI take the most common religion in its civilization.
By exemple, one time I was in difficulty with christiannity that was disturbing my relations with the other civilizations. I have sent 5 missionaries and converted 5 cities to my religion, before they spread their poisonnous religion into all their cities. Mao (it was him) has adopted my religion and since this event has became my ally in all diplomatic battlefields... (like launching wars :)).

This mean if you increase the spread, accorded to what I have seen you will see some religions that spread like hell... for me it is Islamic religion, judaism and Christianity. Well as these religion (with my spread modified) easily conquer all new cities founded you would see more civilization christians, jewish or islamics.
By the way I have made the other religion that spread less than in the vanilla game, and some that I have never seen spread (taoism, i have put a large number, never seen a city taking this religion :D).


By the way, Civilization 4 on these aspects (civic options, religions) remember me Alpha centaury...
 
I don't think for the moment

I test and redo my old mod f Govern and make war.
So I have added a lot, and things are really differents than the vanilla game.

For exemple the religions provide a lot of bonus in my changes, and some are really more usefull than other, but spread really bad :).
But this is balanced by another changes done to the civic options (more malus for the early government for the distance between cities and palace).
So you see, there's a lot of changes in my own files, and I don't talk about the civilizations I have added... like Tibet, the Reich, a russian leader named Stalin etc.. By exemple the Tibet is a new civlization that do a lot of impact in the religion. They are defined in my game as pacifist but with an integral flavor to the religion...

You must see the difference between this forum and the forum that presents the mods. Here we share our poor knowledges (yes that's not really an exploit to find this ;)) with you... that permits to everybody to make his own changes and also that can permit to see mods that uses that.

About the changes, take time to do them, it is not hard.
You can work with the notepad. But respect the first rule of how to mod civilization 4. Do not modify your main files ! Use the CustomAsset folder to test your changes.
And be careful with the changes. The game will show you every syntax error and forbid you to play with a game that has corrupted files, but if you use a correct syntax to enter something not programmed in the game you could see strange results.
By exemple, if you put a valor of "2" in a field where the game wait a binary valor (so "0" or "1")

And if you ask about how to make your own modpack, this is not really the topic, but there's some topics about that. See this sticky: http://forums.civfanatics.com/showthread.php?t=138043

(i am not sure about what you ask :p)
 
When I change the spread factor of early religions (to prevent total domination by the time Christainity and Islam appear) -- it never works. I have values of 300 for the spread factor of Buddhism -- yet by 1 AD 30% of the world is Buudhist. I want it to be able to spread a LITTLE, but not by so much!
 
musides said:
When I change the spread factor of early religions (to prevent total domination by the time Christainity and Islam appear) -- it never works. I have values of 300 for the spread factor of Buddhism -- yet by 1 AD 30% of the world is Buudhist. I want it to be able to spread a LITTLE, but not by so much!


glup :p

something I just figured ^^

the spread is increased if you increase the spread number :(
I have checked a bad file when I have written the precision....

So to have a buddhism that doesn't spread put a valor like 50
And if you want to increase spread of other religions increase it above the 100.

Sorry for the mistake :(
 
Ah, now I understand. Thanks for the clarification! I was wondering why my religion mod wasn't working quite right.
 
Bonus:
Where to find the picture used for the religion on the strat map ?
here: \Assets\Art\interface\buttons\religions\christian_d.dds
I have not played yet with that ;)

Nope. You have to edit assets/res/fonts/gamefont.tag and gamefont_75.tga. Good luck.
 
I believe that
\Assets\Art\interface\buttons\religions\christian_ d.dds
is the missionary "convert" button.
 
I've changed a religion's name in \Assets\XML\Text\CIV4GameTextInfos_Objects.xml as this tutorial says you can do, but it doesn't show up in-game :confused: what am I doing wrong? All I've changed is the name given for the religion in English.
 
abbamouse said:
I believe that
\Assets\Art\interface\buttons\religions\christian_ d.dds
is the missionary "convert" button.

No. It is the "faded out" (i.e. grayed out) religion icon in the religion screen that appears when you can't switch to it yet.
 
Thanks a bunch! I was annoyed that they used real-life religions rather than more "generic" terms. If I'm playing the greek and invent Polytheism I don't want to be a hindu, I want to use the greek pantheon. Now I can change the name of Hinduism to Polytheism or something. Sweet!

Buddhism = Reincarnation
Hinduism = Polytheism
Judaism = Monotheism
Islam = ?
Confucianism = ?
Taoism = ?
Christianity = ?

Oh well, I'll figure something out...
 
Very annoying... I made some changes but they don't seem to take effect. Does a saved game keep the old names for everything, so I would have to start a new game to see the changes I made?
 
cfcsvanberg said:
Very annoying... I made some changes but they don't seem to take effect. Does a saved game keep the old names for everything, so I would have to start a new game to see the changes I made?

I believe so.
 
Back
Top Bottom