Are Religion Specific Building Tenets Possible?

MEQ

Chieftain
Joined
Nov 21, 2018
Messages
45
Location
Ireland
Does anyone know code that makes Civs choose certain religious tenets if they found certain religions. Like code that makes each religion founder always choose that religion's historically associated building. For example, Judaism religion founder always chooses Synagogue. Or does religion work like policies, where there's no code that can force Civs into always choosing a certain ideology or social policy tree?
 
There's no way to force the choice of religious beliefs other than directly creating the religion and assigning the "correct" beliefs to it via lua code. Even using the lua method has its issues since in a normal game you cannot predict whether the desired belief will already have been chosen by another religion. And the lua method only works so far as it does when you do not allow the normal game mechanics to result in religions and the beliefs chosen for that religion for that game: as soon as you allow the normal game mechanics to determine when and by whom a religion is founded, you cannot control the beliefs chosen in any way.
 
You can by fairly simple lua methods control who can construct or purchase a given building or unit, however. So long as you fake the game into thinking anyone can construct or purchase the building or unit via the definition of the building or unit in tables <BuildingClasses>, <UnitClasses>, <Buildings>, and <Units>, you can then make your lua code over-ride this and only allow a city following for example Judaism to construct or purchase a building called a "Synagogue" when any city would otherwise be able to construct or purchase the building based on technologies the player has, prerequisite buildings in the same city, etc.

In this case you would not be tying the building to a religious belief as is normally done with religious buildings. This method would also require for all practical purposes that the building would not be purchasable with faith.
 
If you're using a modded DLL (mine, CP, or one based on it) then you can use the events that control adoption of beliefs, otherwise, wot LeeS said
 
Thank you very much LeeS and Whoward69 for answering! :)

It sounds like Civ specific religious tenets could be possible, but way beyond my meager knowledge. I don't know how to create religions and assign beliefs via lua code, or how to use VPs modded DLL's events that control adoption of beliefs. But both those ideas sound great! I can only pull bits of code from other folk's mods or forum posts and frankenstein them together through wild guessing :(. I don't really understand the code, I just kinda guess its purpose.

Would you tell me the lua and DLL code?
 
Back
Top Bottom