Preventing Religion Founding

I suppose you could just do it by brute force and loop over all the other teams to see if anyone else has that tech yet; if somebody does, then these guys aren't the first.

However, I don't think you need to worry about part 3. You could have doHolyCity and doHolyCityTech always return True so the SDK never founds a religion. Then do all the holy-city-checking and religion-founding yourself in onTechAcquired and never bother with who was first.
 
Techs are stored on teams. Loop all the players. For each player, get the team. Ask the team if it has the technology.
 
gc.getGame().isReligionFounded(ReligionType eIndex)

I think that should tell you if anyone else has founded the religion, and if you have previously blocked the founding of the religion, then this will return False.
 
gc.getGame().isReligionFounded(ReligionType eIndex)

I think that should tell you if anyone else has founded the religion, and if you have previously blocked the founding of the religion, then this will return False.

Last night I thought about this long and hard and came to the conclusion that if you have selectable religions, this snippit would not achieve my goal. What was most important was whether or not the tech had been founded, not the religion. So I went with Dresden's idea, which worked beautifully.

I used a brute force method to check all non-active players to see if a specific tech had previously been discovered. If the active user did not have a holy city, then a selectable religion could be founded from the list of remaining religions. Now I have to make a final decision if the specific tech should be Montheism or Code of Laws. I'm leaning towards Code of Laws, as I don't want this tech to be too early or too late in the game.

I want to thank all of you for your helpful ideas. :thanx: You are truly gifted coders.

Sincerely,

Orion Veteran :cool:
 
I hate to bring up a dead horse but this is the closest I have found to what i am trying to do. What started out as trying to prevent a religion altogether I decided I wanted to add a step to found a religion like the God of Old scenario. I am trying to emulate what they do in the God of Old scenario in BTS. You'd think I'd be able to figure that out but after a bit of figureing out, I have discovered it will take a bit of Python work and well I don't think i have it in me to decipher it right now. I was hoping to get some help. I am not looking to do exactly what is done on religions on that scenario, I posted about it and it can probably explain better. Someone led me here and I am just trying ot get everything together. Any help would be appreciated.

http://forums.civfanatics.com/showthread.php?t=300889

Any help anyone can provide would be greatly appreciated. I was trying to do it through XML and discovered PYTHON was required. please help. Sorry my post is so poorly worded I am exhausted.
 
What would happen if you just removed all xml entries of Religiouns and the image files. Would you just get tons of bugs/crashes?

I believe so, because there are many python functions that refer to the religious entries in xml. Many of the mods out there also refer to same xml. I think the game would become un-playable.
 
Top Bottom