PDA

View Full Version : Adding a new religion



uanime5
05-09-2007, 12:29
New religion
The information on which files to use was provided by Octavius. To add a new religion you need to do the following (since this is pretty straight forward I won't included diagrams).

1) Open descr_religion.txt and add you religion to the list (in this case diabolical), then assign a pip (small icon, which need to go in the ui\pips folder).
2) Open descr_religion_lookup.txt and add your religion to the religion look up.
3) Open text\religions.txt and add your religion to the list.
4) Open world\maps\base\descr_regions.txt and add your religion to the various settlements. However these setting will not take affect unless you delete the map.rwm file in the same folder (thanks to SigniferOne)

To make a faction this new religion open the desc_sm_facton.txt file and change the faction's religion to this new religion.

Religious buildings
As SigniferOne pointed out a religious building is designed to convert to a certain religion only, it does not convert to whatever your factional religion is. Below is the Catholic religious buildings, with the religion highlighted in red.


building temple_catholic
{
convert_to temple_catholic_castle
religion catholic
levels small_church church abbey cathedral huge_cathedral
{
small_church city requires factions { normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, }
{
convert_to 0
capability
{
.
.
.

A new religious building needs to have the religion changed, in the example below it's changed to Latin.


building temple_latin
{
religion latin
levels cathedral
{
cathedral city requires factions { normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, venice, }
{
capability
{
;agent priest 0 requires factions { normans, denmark, scotland, hre, france, england, }
recruit_pool "Armored Clergy" 1 0.4 3 0 requires factions { denmark, }
happiness_bonus bonus 2
religion_level bonus 5
agent_limit priest 2
pope_disapproval 1
pope_approval 1
population_health_bonus bonus 1
}
material wooden
construction 4
cost 6400
settlement_min large_city
upgrades
{
}
}
}
plugins
{
}
}


For more information about adding new buildings see this thread http://www.twcenter.net/forums/showthread.php?t=77577

Sushiman
06-25-2007, 15:13
ok but if i replace heretics with protestants then can i build churches?

Eldgrim
06-28-2007, 13:40
So if we wanted to make a backbone for the 'Pagan' religion already calculated in the game, could we do that? So the player can make a building/unit tree that affects Paganism positively?

uanime5
07-06-2007, 16:35
ok but if i replace heretics with protestants then can i build churches?

You can change the name of the religion Heretic to Protestants by modifying the text\religions.txt like this.


{heretic} Protestant

However this will not allow the heretics to build churchs (these are a building and need to be asigned to a faction). If you alter the descr_sm_factions.txt file so that the religion of one of the Christian factions is heretic then you can build Churches that will promote Protestantism. However since heresy does not unite a faction like other religions it will cause some problems in the settlement. Also the rebels' religion will be Protestant, rather than heretic.


So if we wanted to make a backbone for the 'Pagan' religion already calculated in the game, could we do that? So the player can make a building/unit tree that affects Paganism positively?

You can make buildings that promote paganism. All you need to do is set a faction's religion to pagan and any religious building that they build will promote paganism. If also possible to make non-religious buildings promote paganism (or any other religion) by giving a building in the export_descr_buildings.txt file the 'religion_level bonus' trait (this trait must be followed by a number of the game will crash).


building bullring
{
religion pagan
levels plaza_del_toro
{
plaza_del_toro city requires factions { portugal, spain, }
{
capability
{
recruit_pool "Jinetes" 1 0.5 4 0 requires factions { spain, portugal, }
happiness_bonus bonus 1
religion_level bonus 1
}
material wooden
construction 4
cost 4800
settlement_min city
upgrades
{
}
}
}
plugins
{
}
}

You may want to read the guide on adding a new building to the game.

EDIT 10th August 2007: you need to specify which religion this building will promote or it won't work.

SigniferOne
08-09-2007, 20:00
uanime, I've had some problems with adding new religions. When the campaign loads (normally), if I click on a settlement details, it crashes. Needless to say, priests crash even more. Do you have any experience with this?

alpaca
08-09-2007, 21:13
Did you modify the appropriate files in /text (religions.txt)?

SigniferOne
08-09-2007, 21:45
But isn't it the case that you only need to modify text files if you want to avoid "unlocalized text" strings? I just want to see that it works at all, before adding text to it. Do you think it's critical? it needs to be placed in this tutorial then.

alpaca
08-09-2007, 22:03
No, if you don't edit text files the game crashes.
It's the #1 major source of CTDs for me because I sometimes forget to add some text entry. The game doesn't even throw a warning to the log or anything, it just craps out with an unspecified error.

SigniferOne
08-09-2007, 22:12
Hmm I see wow. Some text errors are handled softly, by "unlocalized text", and others just crap out and you don't know what caused it. Alright I'll edit religions.txt, no biggie. Meantime, we're trying to figure this out also -- if you add a new culture properly, it works and everything's fine, but then if you double-click on it as another culture, it craps out. What do you think?


My thinking is that the text strings that show up when clicking another settlement (e.g. "this settlement can hold out for 10 turns") don't exist for the new culture, hence the crap out. It would be strange for such text strings to be specified by culture but hey, worth a try to fix the ctd. But, get this, I just did a search through all 10 gigs of this game, there is no such string "can hold out" anywhere!



EDIT Wow, Alpaca be thanked, settlement details now show up with my custom religion. The fix for this is so trivial, but completely crashes without it -- need to add "{newreligion} Newreligion" to /text/religions.txt.

SigniferOne
08-10-2007, 00:11
Well I am happy to note that I've been able to disprove two of uanime's bugs with religion; they work as they should. Regions can start with a new religion from more than 0%; you just have to delete map.rwm. Here I create a latin religion (really a latin culture, for our PI mod), competing 50/50 with catholicism, from turn1:
http://img36.picoodle.com/img/img36/9/8/9/t_religion1m_b3630ee.jpg (http://www.picoodle.com/view.php?img=/9/8/9/f_religion1m_b3630ee.jpg&srv=img36)

Also, buildings convert to your religion just fine. As you can see on the bottom, I have a cathedral, which immediately gets to work on converting the populace:
http://img02.picoodle.com/img/img02/9/8/9/t_religion2m_a2f3b21.jpg (http://www.picoodle.com/view.php?img=/9/8/9/f_religion2m_a2f3b21.jpg&srv=img02)


However! There's something you have to change. A religious building is designed to convert to a certain religion only, it does not convert to whatever your factional religion is. Here it says in export_descr_buildings.txt:


building temple_catholic
{
convert_to temple_catholic_castle
religion catholic
levels small_church church abbey cathedral huge_cathedral
{
small_church city requires factions { normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, }
{
convert_to 0
capability
{
.
.
.

You need to create your own building complex, and make it convert to your religion:


building temple_latin
{
religion latin
levels cathedral
{
cathedral city requires factions { normans, denmark, hre, scotland, france, england, hungary, poland, venice, papal_states, portugal, spain, sicily, milan, venice, }
{
capability
{
;agent priest 0 requires factions { normans, denmark, scotland, hre, france, england, }
recruit_pool "Armored Clergy" 1 0.4 3 0 requires factions { denmark, }
happiness_bonus bonus 2
religion_level bonus 5
agent_limit priest 2
pope_disapproval 1
pope_approval 1
population_health_bonus bonus 1
}
material wooden
construction 4
cost 6400
settlement_min large_city
upgrades
{
}
}
}
plugins
{
}
}


Presto, done.

uanime5
08-10-2007, 13:26
SigniferOne technically you have not disproved these bugs (since they can occur) but have solved them. I can't believe I forgot about setting the religion of the religious building, though this does explain why my Diabolical faction's religion was not spreading (it was original heretic, so the building was set to heretic).

I've modified the first post to reflect this and have given you credit.

SigniferOne
08-10-2007, 17:00
SigniferOne technically you have not disproved these bugs (since they can occur) but have solved them. I can't believe I forgot about setting the religion of the religious building, though this does explain why my Diabolical faction's religion was not spreading (it was original heretic, so the building was set to heretic).

I've modified the first post to reflect this and have given you credit.
Cool, thanks for updating. This thread is great for help. Also be sure to add that tidbit about text/religions.txt, because if you don't add the text entry the game just crashes, doesn't warn you about 'unlocalized text'. Also, I guess because you removed all the other errors, you don't think anymore that they exist either?

As for the erroneous pip display, try setting the Diabolical to use the catholic pip, it shows up perfectly that way. I haven't created a new pip yet, but I'd be willing to bet that the error has something to do with incorrect .TGA formatting for the new pip, such as that the bit/rate must be set to 24 pixels, not 16 or 32.


EDIT: sorry, I see you did mention text/religions.txt. You might want to use the same religion throughout all of your post, rename mine to Diabolical or something for clarity's sake, but it's up to you.

alpaca
08-11-2007, 19:26
Did you edit expanded.txt for your new culture?
And the pips do have 32bit (i.e. they have an alpha channel).

uanime5
08-12-2007, 15:05
And the pips do have 32bit (i.e. they have an alpha channel).

The pips are displayed wrongly for my religion even when I rename the premade ones.


Did you edit expanded.txt for your new culture?

This file is not culture specific, but the factions belonging to my new culture are listed.

alpaca
08-13-2007, 11:48
Oh yes, expanded.txt contains the name string for your culture (southern_european, northern_european, middle_eastern, etc.) and it contains any custom armor upgrade strings which appear to be culture-specific, too.

I don't know about the pips really, I didn't add a new religion yet. What happens if you change the link of your religion's pip to an existing one?

uanime5
08-13-2007, 15:15
You're right alpaca, some of the entries do relate to culture. Also adding my new culture to this file prevents the game crashing when I double click on any of the settlements. It also seems that priest are dependent on culture as well, which could explain why my new culture could not recruit priests. Well done alpaca.

Regarding my problem with my religion's symbol when I checked the descr_religions.txt file I found that I had entered the wrong religion for that pip :oops: . Since the game could not find the correct pip it could not display any image.

SigniferOne
08-14-2007, 00:00
I am having a lot of fun adding and changing religions, and it's working really well. Pips are working as they should, etc. What's the established consensus on the maximum religions? 7 including heretic?

There does seem to be an intermittent problem, but I'm investigating further before posting anything.

uanime5
08-14-2007, 12:42
Here are the findings so far:

1) The existing religions in the game are Catholic, Orthodox, Islam, Pagan, and Heretic.

2) It is possible to add another religion. The maximum number of religions has not yet been determined.

3) It's unknown how many religions an enemy settlement can display (so far they can display 6).

SigniferOne
08-14-2007, 18:09
Mine shows 7.

http://img39.picoodle.com/img/img39/9/8/14/f_relm_c4f96f5.jpg


The intermittent problem I spoke about earlier only occurs if you don't mention one of the religions in descr_regions.txt, or something like that. If you keep playing by the rules and doing everything properly, then everything works like a charm.

uanime5
08-15-2007, 13:38
SigniferOne your images of 7 religions does not contain the pagan symbol (pentacle), how many religions have you added?

SigniferOne
08-16-2007, 03:48
However many that you see (seven) is how many are there. I simply removed the pagan religion, and temporarily used the existing pips for my new religions.

Swordsman1219
03-22-2008, 17:48
Where is religion.txt or do you have to create it?

Monkwarrior
03-28-2008, 01:03
Here are the findings so far:

1) The existing religions in the game are Catholic, Orthodox, Islam, Pagan, and Heretic.

2) It is possible to add another religion. The maximum number of religions has not yet been determined.

3) It's unknown how many religions an enemy settlement can display (so far they can display 6).

At the moment I can confirm that 8 religions are possible and they are all displayed in an enemy settlement.

https://i67.photobucket.com/albums/h292/Monkwarrior/ITW_2_M2TW/religions.jpg

:2thumbsup:

Edit: I have confirmed that 9 religions are possible in game.
https://i67.photobucket.com/albums/h292/Monkwarrior/ITW_2_M2TW/religiones2.jpg

Moreover, religious buildings for 8 of them are possible without problems.

miniwally
02-18-2009, 00:03
don't know if people still look at this but is it possible to add a new symbol for a religion?

uanime5
02-28-2009, 03:23
Yes you can add a new symbol. In the descr_religions.txt each faction has a .tga assigned to it. For example the Catholic entry:


religion catholic
{
pip_path ui/pips/pip_catholic.tga
}

Uses the pip_catholic.tga. If you change this file the faction's symbol will change.

miniwally
02-28-2009, 15:32
Yes you can add a new symbol. In the descr_religions.txt each faction has a .tga assigned to it. For example the Catholic entry:


religion catholic
{
pip_path ui/pips/pip_catholic.tga
}

Uses the pip_catholic.tga. If you change this file the faction's symbol will change.

thanks