Religions mod

This forum has been archived. Please use the new modding forum. If you need to retrieve a thread from here, contact BattleGoat.

Moderators: Balthagor, BattleGoat

Post Reply
Clubfoot55
Warrant Officer
Posts: 48
Joined: Apr 10 2014
Human: Yes

Religions mod

Post by Clubfoot55 »

I'd like some help creating a religion mod. I have absolutely no idea what I'm doing.

Now, before you get the wrong idea, I don't mean having the religious percentages listed in the state department like they were in 2020. By a religion mod, I mean taking the majority religion for each region and making that the sovereign country. For example, Madrid would be in the Christian or Catholic region. Major religions such as Islam, (maybe divided Sunni and Shia), Buddhism, Hinduism, Catholicism, Protestantism, Orthodoxy, and atheism should all be represented. Relations between all would probably be cold or hostile, and all theistic would have 100% CB on atheism.

I should probably ask people not to angrily comment stuff about religion. This mod is simply that; a mod.
vahadar
Colonel
Posts: 257
Joined: May 19 2010
Human: Yes

Re: Religions mod

Post by vahadar »

Unfortunatly i dont think you can use the ingame religions as conditions for a mod, because there is simply no testing condition for this at the moment (http://www.supremewiki.com/node/308).
That would be possible if the devs would create a new condition check, based on the religion % or state religion for each country, as those can be defined in the .CVP file (regional data file for all countries).

So far the game treat religion as pure statistic, not even reflected on game UI in SR Ultimate.

Here is a few things you can explore, i'm also giving a solution in the "quote" display.

first some usefull links you need to read to understand the following :
about events : http://www.supremewiki.com/node/305
about event condition : http://www.supremewiki.com/node/308
about editing countries in .CVP : http://www.supremewiki.com/node/50

Simple solution but long to make : using event 14 to set relationship between countries to do what you want to achieve (countries friendly if same religion, antagonism if different or theocracy). You would have to do it for each countries, setting their mutual relationship according to their religion. But it would be a long job, because you would need to set relations between every single countries and the rest of the world.
For evil country a faster way: change their world integrity in the .CVP or trough event 35 if you want bad relationship between this country and the rest of the world.

You can also explore other ideas, like using the sphere system. Sphere would represent religion, but you would need to modify the way the game is using the sphere system by adjusting the influence and influenceval values in the .CVP for each countries so they dont slide too much from their original influence (religion). But this wont really allow you to represent correctly religions i guess since relations are linear (extreme end of the sphere being hostile to each other). No real need to change the sphere leader with event 75 if the sphere shifting is almost inexistant.
Event 35 (Influence change) could also be interesting if you want to shift a country diplomacy based on previous religious events you define, or you can use event 53 with a regular check for every countries to readjust their position in the sphere based on their religion.

One event can also push a leadership to "fanatism", check event 30 in the wiki, but i'm not quite sure if it would really work, since this event is mainly used to set the leader portrait from the pool according the race and religion (http://www.bgforums.com/forums/viewtopic.php?t=23199). I guess you could set this event for a range of "fanatic" countries at start.
Lasty, borrowing from an idea i am using for my current wip mod you could do this :
But it is insane modding work (in time).

-you create a specific unit per religion (unit with 0 speed, high stealth, high defense, 0 spotting, 0 attack).
-you place those religion units in some specific impassible ground hex in antartica. Use event 10 to create the unit in the x,y location of that hex, or do it editing countries Orbats, with all countries with the same religion in the same hex (all catholic countries would have the same unit in the same hex, and so on for other religions in different hexes). Repeat for all country. This is huge work :) I dont know which one is longer, events or orbats, probably the same.
-make the game test those hex to define the religion of a country (if unit present), using event 45, and the condition is the 20th one : Regional Hex test looking for the specific unit id for a said religion. You need to run the test for all religions for one country checking if the unit for a religion is present in one of the hexes.
-launch whatever events you want based on this test (like relationship change with countries that have same or different religion because same or different units).
-repeat this test with every single country in the world, with a timer for a regular check to adjust relations.

This is only usefull if you want dynamic events based on religion, otherwise you should stick to setting relationship between countries through the .CSV or events at start.

The following is just for information, but useless at the moment :

You can check religion for each country (when specified, it is not for some countries) in the .CVP file of any scenario or campaign you create, next to the religionstate entry, and for detailed stats if present under the &&REGIONRELIGIONS line.


The num code for each religion :
0:No Religion
1:Roman Catholic
2:Jewish
3:Buddhist
4:Protestant
5:Sunni Muslim
6:Shia Muslim
7:Other Christian
8:Sikh
9:Hindu
10:Indigenous
11:Other

You can set a religion to a country just by putting tthe religion number right after religionstate

ex :
religionstate 3
to set buddhism as state religion

Setting the percentage is done under &&REGIONRELIGIONS with decimals, total must be equal to 1

ex :
&&REGIONRELIGIONS 2197 (this is id number of the country, here it is vietnam dead nation in 1936 campaign)
0, 0.095,
1, 0.065,
3, 0.79,
4, 0.01,
5, 0.01,
10, 0.03,

This means 9.5% of people with no religion, 6.5% of catholic, 79% of buddhist, 1% of protestant, 1% of sunni and 3% of indigenous
Clubfoot55
Warrant Officer
Posts: 48
Joined: Apr 10 2014
Human: Yes

Re: Religions mod

Post by Clubfoot55 »

vahadar wrote:Unfortunatly i dont think you can use the ingame religions as conditions for a mod, because there is simply no testing condition for this at the moment (http://www.supremewiki.com/node/308).
That would be possible if the devs would create a new condition check, based on the religion % or state religion for each country, as those can be defined in the .CVP file (regional data file for all countries).

So far the game treat religion as pure statistic, not even reflected on game UI in SR Ultimate.

Here is a few things you can explore, i'm also giving a solution in the "quote" display.

first some usefull links you need to read to understand the following :
about events : http://www.supremewiki.com/node/305
about event condition : http://www.supremewiki.com/node/308
about editing countries in .CVP : http://www.supremewiki.com/node/50

Simple solution but long to make : using event 14 to set relationship between countries to do what you want to achieve (countries friendly if same religion, antagonism if different or theocracy). You would have to do it for each countries, setting their mutual relationship according to their religion. But it would be a long job, because you would need to set relations between every single countries and the rest of the world.
For evil country a faster way: change their world integrity in the .CVP or trough event 35 if you want bad relationship between this country and the rest of the world.

You can also explore other ideas, like using the sphere system. Sphere would represent religion, but you would need to modify the way the game is using the sphere system by adjusting the influence and influenceval values in the .CVP for each countries so they dont slide too much from their original influence (religion). But this wont really allow you to represent correctly religions i guess since relations are linear (extreme end of the sphere being hostile to each other). No real need to change the sphere leader with event 75 if the sphere shifting is almost inexistant.
Event 35 (Influence change) could also be interesting if you want to shift a country diplomacy based on previous religious events you define, or you can use event 53 with a regular check for every countries to readjust their position in the sphere based on their religion.

One event can also push a leadership to "fanatism", check event 30 in the wiki, but i'm not quite sure if it would really work, since this event is mainly used to set the leader portrait from the pool according the race and religion (http://www.bgforums.com/forums/viewtopic.php?t=23199). I guess you could set this event for a range of "fanatic" countries at start.
Lasty, borrowing from an idea i am using for my current wip mod you could do this :
But it is insane modding work (in time).

-you create a specific unit per religion (unit with 0 speed, high stealth, high defense, 0 spotting, 0 attack).
-you place those religion units in some specific impassible ground hex in antartica. Use event 10 to create the unit in the x,y location of that hex, or do it editing countries Orbats, with all countries with the same religion in the same hex (all catholic countries would have the same unit in the same hex, and so on for other religions in different hexes). Repeat for all country. This is huge work :) I dont know which one is longer, events or orbats, probably the same.
-make the game test those hex to define the religion of a country (if unit present), using event 45, and the condition is the 20th one : Regional Hex test looking for the specific unit id for a said religion. You need to run the test for all religions for one country checking if the unit for a religion is present in one of the hexes.
-launch whatever events you want based on this test (like relationship change with countries that have same or different religion because same or different units).
-repeat this test with every single country in the world, with a timer for a regular check to adjust relations.

This is only usefull if you want dynamic events based on religion, otherwise you should stick to setting relationship between countries through the .CSV or events at start.

The following is just for information, but useless at the moment :

You can check religion for each country (when specified, it is not for some countries) in the .CVP file of any scenario or campaign you create, next to the religionstate entry, and for detailed stats if present under the &&REGIONRELIGIONS line.


The num code for each religion :
0:No Religion
1:Roman Catholic
2:Jewish
3:Buddhist
4:Protestant
5:Sunni Muslim
6:Shia Muslim
7:Other Christian
8:Sikh
9:Hindu
10:Indigenous
11:Other

You can set a religion to a country just by putting tthe religion number right after religionstate

ex :
religionstate 3
to set buddhism as state religion

Setting the percentage is done under &&REGIONRELIGIONS with decimals, total must be equal to 1

ex :
&&REGIONRELIGIONS 2197 (this is id number of the country, here it is vietnam dead nation in 1936 campaign)
0, 0.095,
1, 0.065,
3, 0.79,
4, 0.01,
5, 0.01,
10, 0.03,

This means 9.5% of people with no religion, 6.5% of catholic, 79% of buddhist, 1% of protestant, 1% of sunni and 3% of indigenous
Thank you for all the instructional stuff. But I think you might misunderstand the what I meant based on part of what you said. I mean just groups regions together under the name of a religion, for example make a nation named Catholic and look up what nations are mainly Catholic. Then put those nations/ provinces into the nation called Catholic.
Anyway, the links you posted were helpful, I'll probably be able to make the mod.
Thanks!
vahadar
Colonel
Posts: 257
Joined: May 19 2010
Human: Yes

Re: Religions mod

Post by vahadar »

Ah ok ;) So yes indeed it is even easier actually.

In the .CVP file, you can create a new country (or modify an existing country) to suit your needs. That new country would regroup any country you want to include in.

The mechanics of the game already works like that, a nation can be made combining other existing nations. And it is very easy to do so.

In the .CVP file, check the grouping line &&GROUPING
for most countries it is empty,
for some you see one or more numbers, it refers to the id of countries this country is made from.

For exemple in the SR1936.CVP file (in the /MAPS game folder) if i want to create Vietnam, i would do it combining North and South Vietnam.

If you check in that file, it is indeed done like this, Vietnam (country id 2197) is made from North and South Vietnam, respectively id 2102 and 2114
And it is shown like this :

&&GROUPING 2197
2102,
2114,

With this in mind, you can create any new country, combining single countries or countries which are already made from a group of countries.

Exemple :

Indochina (id 2189) is made from : Cambodia (2104), Laos (2105) and Vietnam (2197), the last being already made of South and North Vietnam

And so on if you check for exemple South Pacific country (id 1000)....

But the grouping for one country is limited to 32 items, so in order to group more than 32 countries, you need to create subgroups of countries that you will combine in the final country.

Well you have the picture now ;) Then you just need to set relationship between those new religious countries you made.
When editing or creating a country, dont forget also to create new entries or rename a country you modified in the .REGIONINCL file of your scenario/campaign, and eventually edit the localized langage files (in /LOCALIZE folder) the latest having priority over the display for country names to the .CVP file.

Last thing, about loyalty and regions. If you want to merge loyalty, you can use event 40 for this (with a eventtime and eventtimewind of 0 to apply at game start, without specifying dbregion for the area you want to make loyal to the new country, i will let you read about it in detail in the wiki to see how to write that event correctly : http://www.supremewiki.com/node/305)
There is also the masterdata line for a country in the .CVP, i suppose it is intended to do the same thing, but i havent been able to use it myself correctly, maybe someone can help you more with this ( http://www.supremewiki.com/node/50 masterdata : makes this "group" override regional data for all regions grouped in)

There is one specific tutorial about modding country around, you should find it easily through search.

The wiki is also helpfull, and entries about SR 2020 and Cold War are also valid for SR Ultimate, when not specified differently in the last.
http://www.supremewiki.com/node/207
http://www.supremewiki.com/node/42
http://www.supremewiki.com/node/306
Clubfoot55
Warrant Officer
Posts: 48
Joined: Apr 10 2014
Human: Yes

Re: Religions mod

Post by Clubfoot55 »

vahadar wrote:Ah ok ;) So yes indeed it is even easier actually.

In the .CVP file, you can create a new country (or modify an existing country) to suit your needs. That new country would regroup any country you want to include in.

The mechanics of the game already works like that, a nation can be made combining other existing nations. And it is very easy to do so.

In the .CVP file, check the grouping line &&GROUPING
for most countries it is empty,
for some you see one or more numbers, it refers to the id of countries this country is made from.

For exemple in the SR1936.CVP file (in the /MAPS game folder) if i want to create Vietnam, i would do it combining North and South Vietnam.

If you check in that file, it is indeed done like this, Vietnam (country id 2197) is made from North and South Vietnam, respectively id 2102 and 2114
And it is shown like this :

&&GROUPING 2197
2102,
2114,

With this in mind, you can create any new country, combining single countries or countries which are already made from a group of countries.

Exemple :

Indochina (id 2189) is made from : Cambodia (2104), Laos (2105) and Vietnam (2197), the last being already made of South and North Vietnam

And so on if you check for exemple South Pacific country (id 1000)....

But the grouping for one country is limited to 32 items, so in order to group more than 32 countries, you need to create subgroups of countries that you will combine in the final country.

Well you have the picture now ;) Then you just need to set relationship between those new religious countries you made.
When editing or creating a country, dont forget also to create new entries or rename a country you modified in the .REGIONINCL file of your scenario/campaign, and eventually edit the localized langage files (in /LOCALIZE folder) the latest having priority over the display for country names to the .CVP file.

Last thing, about loyalty and regions. If you want to merge loyalty, you can use event 40 for this (with a eventtime and eventtimewind of 0 to apply at game start, without specifying dbregion for the area you want to make loyal to the new country, i will let you read about it in detail in the wiki to see how to write that event correctly : http://www.supremewiki.com/node/305)
There is also the masterdata line for a country in the .CVP, i suppose it is intended to do the same thing, but i havent been able to use it myself correctly, maybe someone can help you more with this ( http://www.supremewiki.com/node/50 masterdata : makes this "group" override regional data for all regions grouped in)

There is one specific tutorial about modding country around, you should find it easily through search.

The wiki is also helpfull, and entries about SR 2020 and Cold War are also valid for SR Ultimate, when not specified differently in the last.
http://www.supremewiki.com/node/207
http://www.supremewiki.com/node/42
http://www.supremewiki.com/node/306
Thank you. I'll get to work on it as soon as I get home. :D
vahadar
Colonel
Posts: 257
Joined: May 19 2010
Human: Yes

Re: Religions mod

Post by vahadar »

One last thing, since you also want to add provinces that might have different religion than parent country.

This can only be done through events using Battlezones (BZ) transfer (event 43) and/or Hex transfer (event 44) and/or eventually Loyalty annex (event 72).

For example, if i want to put South Thailand in the Muslim faith, i could use event 43 for Thailand to transfer all hex owned in Thailand/malaya border within the Kulim BZ to the big muslim country, and to adjust with event 44 removing some unwanted hex that were also transfered.
It would be faster than to specify all hex you want to transfer one by one.
Post Reply

Return to “Modding SRUltimate”