Tomatekh's Historical Religion Mods

Database triggers; they are my new friend, and soon, they can be yours too :)

Code:
--Visigoths
DELETE FROM Civilization_Religions WHERE CivilizationType = 'CIVILIZATION_VISIGOTHS_MOD';
INSERT INTO Civilization_Religions 
		        (CivilizationType,	ReligionType)
SELECT		Type,			('RELIGION_FORN_SIDR')
FROM Civilizations WHERE Type = 'CIVILIZATION_VISIGOTHS_MOD'; 

CREATE TRIGGER CivilizationVisigoths
AFTER INSERT ON Civilizations WHEN 'CIVILIZATION_VISIGOTHS_MOD' = NEW.Type
BEGIN
	INSERT INTO Leader_Flavors
			(LeaderType,					ReligionType)
	VALUES	('CIVILIZATION_VISIGOTHS_MOD',	'RELIGION_FORN_SIDR');
END;
	
		
--Sumer
DELETE FROM Civilization_Religions WHERE CivilizationType = 'CIVILIZATION_AKKADIAN_MOD';
INSERT INTO Civilization_Religions 
			(CivilizationType,	ReligionType)
SELECT		Type,			('RELIGION_CHALDEANISM')
FROM Civilizations WHERE Type = 'CIVILIZATION_AKKADIAN_MOD'; 

CREATE TRIGGER CivilizationSumer
AFTER INSERT ON Civilizations WHEN 'CIVILIZATION_AKKADIAN_MOD' = NEW.Type
BEGIN
	INSERT INTO Leader_Flavors
			(LeaderType,					ReligionType)
	VALUES	('CIVILIZATION_AKKADIAN_MOD',	'RELIGION_CHALDEANISM');
END;	

--Benin
DELETE FROM Civilization_Religions WHERE CivilizationType = 'CIVILIZATION_BENIN_MOD';
INSERT INTO Civilization_Religions 
			(CivilizationType,	ReligionType)
SELECT		Type,			('RELIGION_ITAN')
FROM Civilizations WHERE Type = 'CIVILIZATION_BENIN_MOD'; 

CREATE TRIGGER CivilizationBenin
AFTER INSERT ON Civilizations WHEN 'CIVILIZATION_BENIN_MOD' = NEW.Type
BEGIN
	INSERT INTO Leader_Flavors
			(LeaderType,					ReligionType)
	VALUES	('CIVILIZATION_BENIN_MOD',	'RELIGION_ITAN');
END;	

--Garamantes
DELETE FROM Civilization_Religions WHERE CivilizationType = 'CIVILIZATION_ANCIENT_LIBYA_MOD';
INSERT INTO Civilization_Religions 
			(CivilizationType,	ReligionType)
SELECT		Type,			('RELIGION_PESEDJET')
FROM Civilizations WHERE Type = 'CIVILIZATION_ANCIENT_LIBYA_MOD'; 

CREATE TRIGGER CivilizationGaramantes
AFTER INSERT ON Civilizations WHEN 'CIVILIZATION_ANCIENT_LIBYA_MOD' = NEW.Type
BEGIN
	INSERT INTO Leader_Flavors
			(LeaderType,					ReligionType)
	VALUES	('CIVILIZATION_ANCIENT_LIBYA_MOD',	'RELIGION_PESEDJET');
END;	

--Garamantes
DELETE FROM Civilization_Religions WHERE CivilizationType = 'CIVILIZATION_HITTITE_MOD';
INSERT INTO Civilization_Religions 
			(CivilizationType,	ReligionType)
SELECT		Type,			('RELIGION_LIIM_DINGERMES')
FROM Civilizations WHERE Type = 'CIVILIZATION_HITTITE_MOD'; 

CREATE TRIGGER CivilizationHittites
AFTER INSERT ON Civilizations WHEN 'CIVILIZATION_HITTITE_MOD' = NEW.Type
BEGIN
	INSERT INTO Leader_Flavors
			(LeaderType,					ReligionType)
	VALUES	('CIVILIZATION_HITTITE_MOD',	'RELIGION_LIIM_DINGERMES');
END;	

--Harrapa
DELETE FROM Civilization_Religions WHERE CivilizationType = 'CIVILIZATION_HARAPPA_MOD';
INSERT INTO Civilization_Religions 
			(CivilizationType,	ReligionType)
SELECT		Type,			('RELIGION_AKATTU')
FROM Civilizations WHERE Type = 'CIVILIZATION_HARAPPA_MOD'; 

CREATE TRIGGER CivilizationHarappa
AFTER INSERT ON Civilizations WHEN 'CIVILIZATION_HARAPPA_MOD' = NEW.Type
BEGIN
	INSERT INTO Leader_Flavors
			(LeaderType,					ReligionType)
	VALUES	('CIVILIZATION_HARAPPA_MOD',	'RELIGION_AKATTU');
END;

Why must the formatting come out looking so terrible? :sad:

The INSERT statement will update any Civilizations loaded into the database before Historical Religions, whilst the trigger will catch any added after. Takes a bit more effort and time, but much more compatible, and stops those nasty database errors when a user doesn't have the civ in question enabled:

Spoiler :

Code:
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_VISIGOTHS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_AKKADIAN_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_TIMURIDS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_KIEVAN_RUS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_BENIN_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_ANCIENT_LIBYA_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_HITTITE_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_MALI_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_HARAPPA_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_CHAMPA_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_SIOUX_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_NORTE_CHICO" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_KONGO_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_NAZCA" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_PHOENICIA" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_SAMI" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_BUCCANEER" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_QULLANA" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_TIWANAKU" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_MAPUCHE" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_TUPI" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_MUISCA" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_INUIT" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_NORWAY" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_HAIDA_MOD_LS" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_UKRAINE_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_SIOUX_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_PHOENICIA_MOD_LS" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_ASHANTI_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_GALLIA_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_TAHITI_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_ZIMBABWE_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_OLMEC_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_LITHUANIA_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_BULGARIA_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_NUMIDIA_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_HITTITE_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_CHEROKEE_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_ROMANIA_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_SCYTHIA_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_SPARTA_LS_MOD" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_ABORIGINAL" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_LITHUANIA" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_UYGHUR" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_MITANNI" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_ICENI" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_CORNWALL" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_IRELAND" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_PICTS" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_WALES" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_SELEUCID" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_SABA" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_NABATAEA" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_KILWA" does not exist in Civilizations
[61447.796] Invalid Reference on Civilization_Religions.CivilizationType - "CIVILIZATION_OMAN" does not exist in Civilizations


Although you could be using UPDATE instead of DELETE >> INSERT

In summary; convert to the one true code: SQL :p
 
First thing: I really love these mods. They add a lot to the game that I appreciate.

Second thing: I'm running Historical Religions and Christianity Merge (among many other mods, mostly just civs), but Christianity Merge doesn't seem to be working? How do I check/fix the issue?
 
Fair enough. Thanks a ton for the awesome mods!
 
@Tomatekh: I'm currently working on a modpack which will include (among other things) new beliefs designed specifically for Forn Siðr. Would you mind if I use the code and icons from your mod to allow Forn Siðr as a stand-alone religious choice? Thank you!
 
Bunch of stuff:

Meospotamian Denominations (Historical Religions)
This mod works either stand-alone or as an add-on to my Historical Religions mods. It adds three historical religions related ancient Mesopotamia: Chaldaenism, Ashurism, Napir-tuniis.

Greco-Roman Denominations (Historical Religions)
This mod works either stand-alone or as an add-on to my Historical Religions mods. It adds six historical religions related to the Greco-Roman world: Dodekatheism, Numenism, Imperial Cult, Mithraism, Neoplatonism, Heros Karabazmos.

Egyptian Denominations (Historical Religions)
This mod works either stand-alone or as an add-on to my Historical Religions mods. It adds three historical religions related to ancient Egypt: Pesedjet, Atenism, Amanaiism.

Historical Religions Complete (BNW or GK)
The Historical Religions mod and all the denomination packs in one download. Adds 85 historical religions.

~~~

1. All of my previous religion mods have been updated. For the most part there were no gameplay changes, but the mods have been fully converted from XML to SQL in order to ensure compatibility (and fix some bugs) across my Historical Religion mods. You will need to update to the latest version; however, these new versions are not compatible with old saves. If you need the previous version to continue a save, a link is at the bottom of the mod description on their Steam Workshop page.

2. In addition to the new packs above, Satsana Phi added to the main mod. Inuit and Aborigine religions have new icons. Touched up, re-positioned some of the other icons.

3. Added support for more mod civs. I believe the full list is now: Tomatekh, Leugi (Patria grande), Pouakai & Sukritact (More Civs), JFD, Hiram (Forgotten Civs), LastSword, TPangolin (Colonialist Legacy), Engarde, Trystero49, AgressiveWimp, TarcisioCM, Viregel, DJSHenniger, Han. Keep in mind, a lot of those authors only had 1 or 2 civs that would actually use a religion from my mod.

Technical Info:
Code:
6010e6f6-918e-48b8-9332-d60783bd8fb5  (Historical Religions Complete)

5139dcb2-e318-4fe7-a58c-68a59b8339db  (Mesopotamian Denominations)
1b456011-7882-4f02-8184-5421e6a2b3fb  (Egyptian Denominations)
a8a3f188-f98e-4ba2-91bf-76af49cb0a6d  (Greco-Roman Denominations)

Code:
Hellenism (Greco-Roman):	RELIGION_HELLENISM
	w/ Greco-Roman Denominations mod:
		Dodekatheism:		RELIGION_HELLENISM
		Numenism:		RELIGION_NUMENISM
		Imperial Cult:		RELIGION_IMPERIAL_CULT
		Mithraism:		RELIGION_MITHRAISM
		Neoplatonism:		RELIGION_NEOPLATONISM
		Heros Karabazmos:	RELIGION_HEROS_KARABAZMOS

Hermeticism			RELIGION_HERMETICISM

Pesedjet (Egypt):		RELIGION_PESEDJET
	w/ Egyptian Denominations mod:
		Pesedjet:		RELIGION_PESEDJET
		Atenism:		RELIGION_ATENISM
		Amanaiism (Berber):	RELIGION_AMANAIISM	

Chaldeanism (Mesopotamia):	RELIGION_CHALDEANISM
	w/ Mesopotamian Denominations mod:
		Chaldaenism (Babylon):	RELIGION_CHALDEANISM
		Ashurism (Assyria):	RELIGION_ASHURISM
		Napir-tuniis (Elam):	RELIGION_NAPIRTUNIIS
 
If you use several of my mods, I now suggest just downloading the Complete version and commenting out the religions you don’t want to use instead of downloading all the individual packs.

In the mod files, open up the “HistoricalReligionsMasterReligion.sql” file in the SQL folder with Notepad or a similar program (the formatting is relatively maintained from Modbuddy) and scroll past all the delete entries.

Simply add two dashes (--) in front of a religion you want to remove, or remove the two dashes to add them back in.

There is no need to also update the religion preference file (unless you want edit what I set them to). All the preferences are now tiered in the SQL, so as long as you don’t remove one of the 11 original religions from G&K, even if you comment out a civ’s preferred religion they will still have one or more backup preferences programmed.

The non denomination versions are also present in the Complete version. For example the Buddhism entries read like this:

--('RELIGION_BUDDHISM',
------
('RELIGION_BUDDHISM',
('RELIGION_MAHAYANA',
('RELIGION_VAJRAYANA',

The first one that's commented out by default reads "Buddhism" in game, while the active one reads "Theravada". Simply un-comment the first Buddhism entry and comment out the following three to not use the Buddhist denomination pack, etc..

There is an “empty” xml file set to load last in the mods. You can use this to add additional xml edits to the mod if you don’t know how to edit the SQL. Keep in mind this won’t ignore any SQL triggers programmed to fire after the mod loads, so you may have to erase the corresponding entry in the SQL first to ensure something takes effect in the XML.
 
Yay! It's awesome now. I cannot stand waiting to see it complete.
 
Yay! It's awesome now. I cannot stand waiting to see it complete.

It's not complete complete yet. I'm still working on a few New World packs for Mesoamerica, the Andes, and Polynesia, and African diaspora stuff (so I'll update the Complete version when they're done). I just figured now that using all the packs means using 9 different mods, some people might appreciate a single download.
 
I choose rodnovery/slavianism or pastafarianism from Strange Religions xD.
 
Is there a reason why some religions are commented out of the complete versions?

If I included the religion in the file it's complete (name, icon, pedia, even programmed preferences if applicable), regardless of if the religion is activated or not.

If I commented it out by default is because of a combination of:

- Intended religion I wasn't fully happy with the icon or other art/text asset.
- Religion from an unfinished denomination pack I didn't want to release separately yet.
- Religion I made for someone's mod but don't intend to include in the packs.
- Religion I originally intended to include but since changed by mind.

Depending on the reason the religion may or may not be implemented in a future version (or even still be in the files with the next update).

However, as I said, they're all fully implemented. So you can un-comment them and use them no problem without any further edits.
 
I'm a little surprised the Sumerian denomination didn't make the cut for the meso pack.
 
Top Bottom