Several Pantheon Beliefs

trystero49

Prince
Joined
Apr 30, 2012
Messages
515
I'm trying to create a mod where you can choose several pantheon beliefs. I have very little experience with XML and LUA, but I do have experience in reading code and stuff, and I'm decent with logic.

I figure that in order to do this, I'd have to change some of the LUA files. I'm not really sure where to start, but I think I should be starting in the Found Pantheon pop up button, since I assume the UI LUA files specify which functions to run. I guess I have to disable PlayerCannotFoundPantheon() or whatever, or I'd probably have to create a new function entirely.

Does anyone have any insight or advice on this? Thank you.
 
You can definitely add beliefs to "normal" religions. The function is:

Game.EnhanceReligion(iPlayer, eReligion, eBelief4, eBelief5)

I've done this a lot and (as far as I can tell) there is no limit to how many Founder, Follower and Enhancer beliefs you can add. I suspect that you can also add as many Pantheon beliefs as you want to a normal religion, but I have not tested this.

Keep in mind that pantheon beliefs are a separate thing from "pantheon religions". What, you ask, is a pantheon religion??? If you look in Religions.xml, you will see that there is a RELIGION_PANTHEON (ID=0) that comes before RELIGION_BUDDISM (ID = 1). Beliefs are always attached to a religion of some sort. The particular pantheon belief is first attached to the pantheon religion for a player. That pantheon belief is later "picked up" by any religion founded by that player (you can see this if you run: "for i,v in ipairs(Game.GetBeliefsInReligion(eReligion)) do print GameInfo.Beliefs[v].Type end" for a founded religion -- you will always see one pantheon belief; keep in mind that you get a CTD if eReligion is not founded yet). The game then adds additional beliefs to the religion.

Although pantheon is just another religion, it is handled by different Lua methods for founding and for getting/setting beliefs. See this thread. There is a FoundPantheon method that is separate from FoundReligion. I have not looked at the args for FoundPantheon (use a text search program like Windows Grep to find it yourself) but I suspect that it only takes one belief.

There is no "EnhancePantheon" method. You could try Game.EnhanceReligion(iPlayer, eReligion, eBelief4, eBelief5) with eReligion=0. This might work, or it might just give you a CTD. There may be a core dll limitation on the pantheon religion allowing only 1 belief. Even if not, you might then see a problem with the "extra" pantheon beliefs transferring from the pantheon religion to a founded religion. No way to know this except to try.
 
Back
Top Bottom