Sid Meier's Civilization V

Sid Meier's Civilization V

评价数不足
Religions Grant Buildings [snippet for mod makers]
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
2.690 KB
2014 年 6 月 13 日 上午 7:41
2014 年 7 月 30 日 下午 3:44
3 项改动说明 ( 查看 )

订阅以下载
Religions Grant Buildings [snippet for mod makers]

在 Machiavelli 的 1 个合集中
Machiavelli's snippets for mod makers
6 件物品
描述
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 条留言
Dewmeister 2014 年 12 月 29 日 下午 8:36 
these comments sound like sarcasm to me
Civitar 2014 年 11 月 3 日 上午 4:50 
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 2014 年 8 月 2 日 下午 5:36 
Woah! Thank you very much for explaining that!
Viregel 2014 年 8 月 2 日 下午 12:49 
This looks incredibly useful. For something. :P Thanks!