Sid Meier's Civilization V

Sid Meier's Civilization V

Not enough ratings
Religions Grant Buildings [snippet for mod makers]
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
2.690 KB
13 Jun, 2014 @ 7:41am
30 Jul, 2014 @ 3:44pm
3 Change Notes ( view )

Subscribe to download
Religions Grant Buildings [snippet for mod makers]

In 1 collection by Machiavelli
Machiavelli's snippets for mod makers
6 items
Description
For mod makers.

What it does
This mod contains code that defines a new XML tables. By adding entries to these tables mod makers can have Religions (not beliefs) grant buildings in cities.

Religion_FreeBuildingClass: <ReligionType, BuildingClass>
When this religion becomes the majority in a city, the city will be granted this building. If the religion stops being the majority the building is removed.

If an end-user is playing with multiple mods that use this snippet it will work properly.

Compatibility
This code is compatible with Gods & Kings, and Brave New World.

How to incorporate into your mod
Copy the "Religions grant buildings" directory and all its contents to your mod. Have the XML file update the database (via the Action tab) and set the LUA file as an "InGameUIAddin" (via the Content tab).

Make sure the XML files from this snippet that create the table update the database before any files attempt to add entries into the tables for this snippet.

How to use
Add entries to one of the tables: Religion_FreeBuildingClass.

These buildings should have cost=-1, nukeImmune=true and ConquestProb=100.

How it works
The code hook into GameEvent.CityConvertsReligion which fires whenever follower count changes. The code determines the city's current majority religion (if any) and adds and removes buildings as necessary.

CivFanatics Download[forums.civfanatics.com]
4 Comments
Dewmeister 29 Dec, 2014 @ 8:36pm 
these comments sound like sarcasm to me
Civitar 3 Nov, 2014 @ 4:50am 
thank you for this snippet machiavelli, i'm using it in Warhammer Fantasy Battles. since religions are a very important part of warhammer this is very much appreciated.
lopapo96 2 Aug, 2014 @ 5:36pm 
Woah! Thank you very much for explaining that!
Viregel 2 Aug, 2014 @ 12:49pm 
This looks incredibly useful. For something. :P Thanks!