Tomatekh's Historical Religions

Tomatekh's Historical Religions v.24

There's something weird going on with DLC civs. I play with all DLC and only this mod. It seems to me that the game sometimes fails to load Aztec and Australian religious preferences. These civs sometimes have no religious info on leaders' civilopedia pages and I have seen Montezuma founding random religions.

Given that both of them are DLC civs, there must be something related to mod loading process. I noticed that Montezuma gets his religion in civilopedia after loading saved game, no luck for Curtin.
 
Out of pure interest, what would you call the Graeco-Roman religions then?

I found the term Olympianism, I like to use it when playing as Greece and use the lion as icon.

To the modder: Is there a way to include Satanism with the pentagram symbol?
 
Last edited:
Since that argument I've updated the mod with the Greco-Roman denominations, so I doubt the name issue is bothering anyone anymore. The pentagram is something I'd like to potentially include as a new custom icon. At the moment, though, I'm still trying to port the religions from the V version of the mod before I add new custom icons.
 
Last edited:
Anyway, I have an update for the mod, it's ready, I'm just waiting for the DLC before posting it.

In any case, the current version of the mod should work with the game post DLC (Alexander won't prefer Hellenism/Dodekatheon without the update, though), in case I don't see the release right away. However, the mod update won't be compatible with previous saves, so keep that in mind when starting a new game/before you update.
 
If I downloaded some custom Civs and leaders how can I edit them to work with this? For instance I DLed the Iceni mod (I am going to modify that further into a general Celtic civ with leaders representing different tribes), so what do I have to change in order to give Boudicca her preferred religion?
 
Tomatekh updated Tomatekh's Historical Religions with a new update entry:

v. 5

Compatibility update for the Spring Patch/DLC. The update is not compatible with previous version saves.

- Alexander now prefers Hellenism/Dodekatheon; Cyrus, Zorastrianism; Hardrada, Eastern Christianity
- Added SQL triggers to ensure DLC preferences are set regardless of load order
- New Denominations: (Christianity: Arianism, [Protestantism: Lutheranism, Calvinism, Baptist Christianity, Methodism, Pentecostalism]), (Chaldaeanism: Ashurism)
- Caduceus added to the custom icons
- Historical Religions Light: A “light” version of the mod may now be enabled in the configuration file. Doing so prompts the mod to load with only a minimum of new religions (7) to provide representation for the officially included civilizations. @BenZL43
 
Last edited:
If I downloaded some custom Civs and leaders how can I edit them to work with this? For instance I DLed the Iceni mod (I am going to modify that further into a general Celtic civ with leaders representing different tribes), so what do I have to change in order to give Boudicca her preferred religion?

I outline how to add support in the original post. However, it's easiest for the civ author to do so because then they can include a reference for the HR mod to ensure load order. (Although, references don't seem to work 100% with Civ VI because Firaxis). Civ VI is very crash happy if you try to include stuff (like new religions) that don't exist in the database. So, you need to use SQL to check if the religion exists first.

Without being able to add a reference yourself, you can try adding support to, say the Boudicca mod, by first deleting wherever the mod does set a religious preference in their files. Then in one of the mod's sql files, add:

EDIT: See five posts down.

Essentially, when first adding a religion, you check if the HR religion exists. If not, set them to prefer a basic religion; if so, set them to prefer the HR religion. Then you also add a trigger to update that preference to the HR religion if the HR religion mod is loaded after the civ mod (and because of that bypassed the original check). However, I've read that UPDATE isn't entirely reliable in Civ VI :/
 
Last edited:
is there a marker in the mod file that we can remove or change to let us rename the religions? A lot of the symbols are really nice looking but the names rarely if ever fit the civs that I am playing
 
Unfortunately, Firaxis removed the renaming option that was in Civ V (which let you rename any icon even ones with set names).

The closest you could do is set all the religions to be custom icons. However, every religion's name would then be blank (and the AI would found religions without names which is somewhat confusing in the interface) and none of the religions will show up in the civilopedia, so it's not really an ideal solution. If you want to do that, you need to open up the "HR_Religions.sql" file in the mod's Data folder, search for the "RequiresCustomName" column, and then go straight down the file turning every religion's 0 to 1.

Otherwise, there's not much that can be done short of Firaxis re-adding that option to the game or me potentially replacing the entire choose religion popup (which I'd rather not do as it would likely cause compatibility issues with other mods in the future).
 
Getting this in my logs...

[Database] ERROR: cannot modify IconDefinitions because it is a view
[387998.693] [Database]: In Query - UPDATE IconDefinitions SET "Atlas" = ?, "Index" = ? WHERE "Name" = ?;
[387998.693] [Database] ERROR: Database::XMLSerializer (C:/Program Files (x86)/Steam/steamapps/workshop/content/289070/870850597/Data/HR_Religions_Icons.xml): There was an error executing the update statement! See Database.log for details.
[387998.693] [Database]: In XMLSerializer while updating table IconDefinitions from file C:/Program Files (x86)/Steam/steamapps/workshop/content/289070/870850597/Data/HR_Religions_Icons.xml.
[388003.610]
 
Hmm, the patch notes mentioned they changed stuff with the update icon xml.

However, as everything (including the changed icons) were working normally when testing the mod with the DLC, I didn't check.

It's likely that the update statements I needed before are now redundant, so the error can be safely ignored. I'll remove the statements next time I update. Thanks!
 
If I downloaded some custom Civs and leaders how can I edit them to work with this? For instance I DLed the Iceni mod (I am going to modify that further into a general Celtic civ with leaders representing different tribes), so what do I have to change in order to give Boudicca her preferred religion?

I outline how to add support in the original post. However, it's easiest for the civ author to do so because then they can include a reference for the HR mod to ensure load order. (Although, references don't seem to work 100% with Civ VI because Firaxis). Civ VI is very crash happy if you try to include stuff (like new religions) that don't exist in the database. So, you need to use SQL to check if the religion exists first.

Without being able to add a reference yourself, you can try adding support to, say the Boudicca mod, by first deleting wherever the mod does set a religious preference in their files. Then in one of the mod's sql files, add:

INSERT OR REPLACE INTO FavoredReligions
(LeaderType, ReligionType)
SELECT ('LEADER_BOUDICCA'), ('RELIGION_CATHOLICISM')
WHERE NOT EXISTS (SELECT * FROM Religions WHERE ReligionType = 'RELIGION_DRUIDISM');

INSERT OR REPLACE INTO FavoredReligions
(LeaderType, ReligionType)
SELECT ('LEADER_BOUDICCA'), ('RELIGION_DRUIDISM')
WHERE EXISTS (SELECT * FROM Religions WHERE ReligionType = 'RELIGION_DRUIDISM');

CREATE TRIGGER HRLeaderBoudicca
AFTER INSERT ON Religions WHEN 'RELIGION_DRUIDISM' = NEW.ReligionType
BEGIN
UPDATE FavoredReligions
SET ReligionType = 'RELIGION_DRUIDISM'
WHERE LeaderType = 'LEADER_BOUDICCA';
END;

Essentially, when first adding a religion, you check if the HR religion exists. If not, set them to prefer a basic religion; if so, set them to prefer the HR religion. Then you also add a trigger to update that preference to the HR religion if the HR religion mod is loaded after the civ mod (and because of that bypassed the original check). However, I've read that UPDATE isn't entirely reliable in Civ VI :/

Okay, ignore my last post. It seems preferences have gotten a little more complicated and at the moment HR appears to be removing the preferences of mod civs loaded before it. Unfortunately, this means that even a mod civ only using a default religion will need to include support for HR. I'm trying to figure out a more universal solution, but it can currently be worked around by adding triggers.

The original post includes new instructions on how to do this, whether you're the mod maker or someone trying to add support to a mod (just ignore the reference part if it's not your mod).
 
Last edited:
Love this mod but one thing that does annoy me is when the Civ with the preferred religion misses that religion and goes for something completely different, is it possible to implement options so for example if France misses Catholicism it is likely to choose Protestantism rather than Zoroastrianism ? and if not Protestantism than Anglicanism etc...
 
Unfortunately, it's not.

The XML has some cryptic developer comments about setting a second preference based on civilization type (instead of leader type), but every time I've tried to use it, it results in the game crashing. I don't think it was ever properly implemented. Otherwise, I'd need access to a lua event that triggers when a religion is founded, but lua is proving to be clunky and complicated in Civ VI that even if the event existed it might not be possible.
 
First off, I have to say I really LOVE your mod and I also want to say thank you for putting so much time, effort, research, and testing in creating this awesome mod...


Second, I think I need your help, because I have been trying to figure out how to toggle on the denomination pack. I been trying to figure out for the past week, but I have no success in turning them on. This is my first attempt of using configuration files and I have no background in this, and each time I try I get even more fluster and feel like an idiot in not making it work... Q.Q



My Logic:


I open up: HR_Config.sql

* Read the directions

[My understanding 1 is on and 0 is off]

[Stupid Question #1: I am using this file or am I using *Data -> HR_Religions.sql* and

changing the values in there? [If I am using HR_Config.sql then I do not really know

what exactly I am changing in there]

*Have to have HR_CHRISTIAN_DENOMINATIONS set to 1 to be active to activate the others.


I think it is HR_Religion.sql so I look for HR_CHRISTIAN_DENOMINATIONS and change it to 1.


Visual

----

--Christianity Extended

----


DELETE FROM Types WHERE Type = 'RELIGION_ORTHODOXY'

AND EXISTS (SELECT * FROM HR_Denominations WHERE Type = 'HR_CHRISTIAN_DENOMINATIONS' AND Value = 0); {[(<-Change 0 to 1 here.)}]}


DELETE FROM Types WHERE Type = 'RELIGION_PROTESTANTISM'

AND EXISTS (SELECT * FROM HR_Denominations WHERE Type = 'HR_CHRISTIAN_DENOMINATIONS' AND Value = 0); {[(<-Change 0 to 1 here.)}]}


It looks like everything is set to 1 so I thought everything was OK, but nope I was

incorrect.


Just want to first figure out how to turn all of them on first. Then this will lead me to my next stupid question: Is there a way to be selective, like I want Atanodjuwaja Cult, Dodekatheism, Imperial Cult, Mithraism, and Heros Cult, but I want to inactivate Mysteries, Neoplatonism, Numenism? Do I just put 0 for the 1?


Example:

INSERT INTO Types

(Type, Kind)

SELECT ('RELIGION_R4_NUMENISM'), ('KIND_RELIGION')

WHERE EXISTS (SELECT * FROM HR_Denominations WHERE Type = 'HR_GRECO_ROMAN_DENOMINATIONS' AND Value = 1)


{[(<-Change 1 to 0 here.)}]}


AND EXISTS (SELECT * FROM HR_Denominations WHERE Type = 'HR_LIGHT_MODE' AND Value = 0);



Thank you anyone for helping me it is very appreciated!!! J


Last Question: Are you planning on adding Insular Christianity? ^.^


P.S: I even try youtubing this to see if there is a video of how to do this, but no luck…. -.-*** I am visual so I thought maybe a video would help. <-Desperate Idiot
 
You shouldn't touch "HR_Religions.sql". Well you can if you know SQL, but otherwise it's very easy to mess up the mod so it doesn't function entirely :p

So, let's assume you do a fresh install of the mod and everything is as I set it.

Two things to know:
- You will be editing "HR_Config.sql"
- All the denomination packs are set on ("1") by default

So, if you were just looking to enable everything there's no need to edit anything.

A basic rundown on how to edit "HR_Config.sql".

The various lines look this this:

('HR_CHRISTIAN_DENOMINATIONS', 1); -- [0: Christianity <-> 1: Catholicism, Eastern Orthodoxy, Protestantism]

From left to right, it names the pack, lists the on/off boolean, then everything after the em dash is a comment explaining what the boolean does.
So, for this line, the denomination pack "Christian Denominations" is set on ("1"). The comment explains that if set off ("0"), the religion appears in game as "Christianity"; if set on ("1"), the religion appears in game as "Catholicism", "Eastern Orthodoxy", "Protestantism".

In terms of your second question...

At face value you can't actually split up the packs. Which, I know, is somewhat limiting and annoying, but was done because it was the easiest way for me to both implement and maintain such a large number of religions.

However, it's actually not that complicated for someone to customize it a bit. I didn't really intend for users to edit it like this, but it can be done as long as you're careful.

You'd have to edit "HR_Religions.sql" (which I said not to touch :p ). Basically, all the lines you quoted in your post (in "HR_Religions.sql") are checking the values for the the denominations in "HR_Config.sql". So, if you just tell a religion to check for a value that doesn't exist in "HR_Config.sql" (so anything that's not "0" or "1"), the game will skip over it.

So, basically, to remove Neoplatonism:

- Go to the first post in this thread. In the "Adding Support to Modded Civs" section you can find a list of all the religion names and associated file names.
- The first post lists Neoplatonism as: Neoplatonism RELIGION_R3_NEOPLATONISM ('R3'); so the file name is RELIGION_R3_NEOPLATONISM.
- In "HR_Religions.sql" search for "RELIGION_R3_NEOPLATONISM"

You'll get:

INSERT INTO Types
(Type, Kind)
SELECT ('RELIGION_R3_NEOPLATONISM'), ('KIND_RELIGION')
WHERE EXISTS (SELECT * FROM HR_Denominations WHERE Type = 'HR_GRECO_ROMAN_DENOMINATIONS' AND Value = 1)
AND EXISTS (SELECT * FROM HR_Denominations WHERE Type = 'HR_LIGHT_MODE' AND Value = 0);

and later in the file:

INSERT INTO Religions
(ReligionType, Name, IconString, RequiresCustomName, Color)
SELECT ('RELIGION_R3_NEOPLATONISM'), ('LOC_RELIGION_R3_NEOPLATONISM'), ('R3'), 0, ('COLOR_NEOPLATONISM_HR')
WHERE EXISTS (SELECT * FROM HR_Denominations WHERE Type = 'HR_GRECO_ROMAN_DENOMINATIONS' AND Value = 1)
AND EXISTS (SELECT * FROM HR_Denominations WHERE Type = 'HR_LIGHT_MODE' AND Value = 0);

- Note that every religion I add will have two separate entries. It is important that you edit both. The exceptions to the two entry rule are for the 12 religions added by the base game. For various reasons, I would not recommend ever removing the base religions from "HR_Religions.sql". I would also caution against removing religions that are standalone and not part of the denomination packs.

- Both the entries have the line:
EXISTS (SELECT * FROM HR_Denominations WHERE Type = 'HR_GRECO_ROMAN_DENOMINATIONS' AND Value = 1)

Basically, the file adds the religion when HR_GRECO_ROMAN_DENOMINATIONS exists in "HR_Config.sql" and its value is set to 1.

- So, for both of the entries change the value to 2
EXISTS (SELECT * FROM HR_Denominations WHERE Type = 'HR_GRECO_ROMAN_DENOMINATIONS' AND Value = 2)

Since 2 is never used in the configuration file, the mod now skips the entry.

- Two things to note, Civ VI is very crash happy. If you remove a religion that a leader prefers, the game will crash when it tries to find it. I also wouldn't recommend trying to edit "HR_Religions.sql" anymore than changing the two value lines.

And, again, just a reminder that every denomination is set to "1" default. So, there's no need to edit anything if you just want to turn them all on.
 
Last edited:
Top Bottom