View Full Version : [Mod Component]Policies grant buildings


Machiavelli24
May 30, 2012, 08:55 PM
Mod name: Policies grant buildings

Description:
This mod provides a simple, flexible, extensible way in xml (no additional lua required) for any Social Policy to grant any buildings, including new buildings that can not be constructed.

By adding rows in the new Policy_FreeBuildingClass you can create Social Policies that grant Specialists or let food be kept between population growth.
<Table name="Policy_FreeBuildingClass">
<Column name="PolicyType" reference="Policies(Type)" type="text"/>
<Column name="BuildingClassType" reference="BuildingClasses(Type)" type="text"/>
<Column name="IsRemovedWhenPolicyBlocked" type="boolean" default="true"/>
</Table>

This mod does not alter any existing files (with the sole exception of adding an 'Unbuildable_pb' column to the Buildings table) ensuring it will not require a manual merge to work with your mod.

The mod's xml folder contains 'Policy_FreeBuildingClassExample.xml' which has examples of what can be done.

Machiavelli24
Jun 02, 2012, 01:06 AM
I've extended the functionality of this mod. There is now a BuildingInCapitalOnly column in the table. By setting this boolean true or false you can control if you want the building to be given to all cities or only one. This is useful, for example, if you wanted to make a social policy that used the Building_SpecialistYieldChanges table to give all engineers +2 hammers. Since entries Building_SpecialistYieldChanges effects engineers in every city using the BuildingInCapitalOnly will ensure that engineers only get +2 hammers once.

The table format is now:
<Table name="Policy_FreeBuildingClass">
<Column name="PolicyType" reference="Policies(Type)" type="text"/>
<Column name="BuildingClassType" reference="BuildingClasses(Type)" type="text"/>
<Column name="IsRemovedWhenPolicyBlocked" type="boolean" default="true"/>
<Column name="BuildingInCapitalOnly" type="boolean" default="false"/>
</Table>

Example: Make Freedom grant +10% Culture in every city.

First create a building with "BuildingClass_MyFreedom" that has <CultureRateModifier>10</CultureRateModifier>. This building should also have NeverCapture="true" NukeImmune="true" and Unbuildable_pb="true".

Then create an xml file with:
<Policy_FreeBuildingClass>
<Row>
<PolicyType>POLICY_FREEDOM</PolicyType>
<BuildingClassType>BuildingClass_MyFreedom</BuildingClassType>
</Row>
</Policy_FreeBuildingClass>

JA_Lamb
Dec 03, 2012, 05:09 PM
Hi, big bump. Where does one download this please?

kaspergm
Dec 07, 2012, 02:17 PM
Hi, big bump. Where does one download this please?
The Mod is downloadable via Steam. Search for 'Policies grant buildings'.

kaspergm
Dec 07, 2012, 02:21 PM
I have a question for the creator of the Mod: You have an example of how to make a policy grant a building in every city. Is it possible to make it create a building in only a limited number of cities, i.e. 4 cities, similar to how Legalism grants you only in your first 4 cities?

3335d
Dec 07, 2012, 06:29 PM
The Mod is downloadable via Steam. Search for 'Policies grant buildings'.

Could you please download it and re-upload it to CivFanatics (giving credit to the original author of course) for easier access than the horrendously bugged Workshop?

kaspergm
Dec 09, 2012, 03:25 AM
Could you please download it and re-upload it to CivFanatics (giving credit to the original author of course) for easier access than the horrendously bugged Workshop?
I think you will now find it here (http://forums.civfanatics.com/downloads.php?do=file&id=20500).

JA_Lamb
Dec 21, 2012, 05:01 PM
Thank you, you're kind.