whoward69
DLL Minion
I'm having some trouble with the ReligionCanHaveBelief gameevent, which only ever returns -1 for the playerID and -1 for the religionID.
From installing a simple print listener on both PlayerCanHaveBelief and ReligionCanHaveBelief, and then giving player 0 (human) and player 1 (ai) enough faith to found a pantheon, found a religion and then enhance that religion, the sequence is what I'd expect
Code:
[I]abridged[/I]
Beliefs available for player 0 founding a pantheon
[19874.542] MyLuaChanges: PlayerCanHaveBelief(0, 0)
[19874.636] MyLuaChanges: PlayerCanHaveBelief(0, 68)
Beliefs available for player 1 founding a pantheon
[19871.048] MyLuaChanges: PlayerCanHaveBelief(1, 0)
[19871.142] MyLuaChanges: PlayerCanHaveBelief(1, 68)
Beliefs available for player 0 to found a religion
[19953.666] MyLuaChanges: ReligionCanHaveBelief(0, -1, 27)
[19985.646] MyLuaChanges: ReligionCanHaveBelief(0, -1, 53)
NOTE: we get -1 here as the player has yet to choose a religion, this is the internal test to see if there are still available beliefs for the religion
Player 0 UI calls for founding a religion
[19997.424] MyLuaChanges: ReligionCanHaveBelief(-1, -1, 27)
[20002.947] MyLuaChanges: ReligionCanHaveBelief(-1, -1, 53)
NOTE: we get -1 for the player as the UI does not pass the new parameters, so for a player of -1 you need to use Game.GetActivePlayer()
NOTE: we get a religion of -1 here as the UI does not pass the new parameters, if you need the religion you'll need to mod the chose religion popup standard lua file
Beliefs available for player 1 to found a religion
[20054.131] MyLuaChanges: ReligionCanHaveBelief(1, -1, 27)
[20054.224] MyLuaChanges: ReligionCanHaveBelief(1, -1, 53)
NOTE: we get -1 here as the player has yet to choose a religion, this is the internal test to see if there are still available beliefs for the religion
Beliefs for player 1's religion
[20054.224] MyLuaChanges: ReligionCanHaveBelief(1, 2, 7)
[20054.349] MyLuaChanges: ReligionCanHaveBelief(1, 2, 55)
Beliefs available for player 0 to enhance with
[20133.723] MyLuaChanges: ReligionCanHaveBelief(0, 10, 25)
[20144.128] MyLuaChanges: ReligionCanHaveBelief(0, 10, 53)
Player 0 UI calls for enhancing a religion
[20144.190] MyLuaChanges: ReligionCanHaveBelief(-1, -1, 7)
[20144.221] MyLuaChanges: ReligionCanHaveBelief(-1, -1, 53)
NOTE: we get -1 for the player as the UI does not pass the new parameters, so for a player of -1 you need to use Game.GetActivePlayer()
NOTE: we get a religion of -1 here as the UI does not pass the new parameters, if you need the religion you'll need to mod the chose religion popup standard lua file
Beliefs available for player 1 to enhance with
[20175.656] MyLuaChanges: ReligionCanHaveBelief(1, 2, 25)
[20175.827] MyLuaChanges: ReligionCanHaveBelief(1, 2, 39)