Giving religions to some civs at start

Craig_Sutter

Deity
Joined
Aug 13, 2002
Messages
2,773
Location
Calgary, Canada
Is there any mod that does this...

I know "into the Renaissance" has civilizations that start the game with designated religions. I've looked at the file and I'm finding myself overwhelmed.

I can't tell if the "ReligionOverview.lau" has extraneous code that is specific to that scenario only or if it is all relevant to the type of mod I wish to create. i.e. can I simply alter the civs listed in the file to suit my purposes or do I need to delete/add code?

I'm looking for more examples of similar code so that I can determine, by comparison, which parts I might find of use for such a mod, and which parts will be of no use since they are too specific for their intended scenarios.

Basically, my mod will have 4 religions, all founded at game start, by four predesignated civilizations. The other civilizations will not have a religion preselected at game start although I may have missionaries placed near some of their capitals (via worldbuilder) at game start.

Has anyone worked on a mod doing this sort of thing?

I'm a lau neophyte so I'm hoping to find very simple examples that I can tailor to my purposes... I'm not certain that "into the Renaissance" is an example of such a simple mod, though.

Thank-you
 
Hello Craig.

What you're looking for is actually in TurnsRemaining.lua, more specifically a function named SetupReligions.
  • First of all it scans players, and for each player scans his cities. Within those loops it tests whether the city is Vatican, Jersualem, etc. When one test passes, it stores the player and city/city plot in LUA variables.
  • Then if founds Christianism and Islam (found pantheons, religions, and enhances them with Game.FoundReligion and such).
  • The next part founds Orthodoxy: it scans all players until it finds Babylon and makes it found Orthodoxy.
  • Then it converts other players' capitals to religions.
  • Then it converts city states to religions.
  • Then it scans players and, for each major civ, establishes diplomatic contacts with their holy city.
  • Finally it stores some variables in the savegame.
 
Back
Top Bottom