Building Resource Converter Mod
By: TheLopez
Last Updated 08/20/10
Version: 0.4BtS
Patch Compatibility: Beyond the Sword v3.19
MP Compatible: ?
Download Mod v0.4BtS
Version: v0.3w
Patch Compatibility: Warlords v2.0.8.0
MP Compatible: ?
Download Mod v0.3w
Version: v0.2
Patch Compatibility: v1.61
MP Compatible: ?
Download Mod v0.2
Description:
Adds the ability to specify that a building should take x number of resources
available in a city and output y number of new resources.
I have tried to test the code as best as possible to make sure buildings react
correctly when a resource is added to a city that the building can use.
Please report any inconsistent behavior as soon as you find it so I can fix the
issue and make a new release.
-----Notes to Modmakers-----
If you want to use this mod component in your mod I have tried to make things
as easy as possible for you. In the SDK files I have added
// < Building Resource Converter Start > and
// < Building Resource Converter End > in all of the places where changes
were made.
As part of the changes to the SDK files I have also included two new methods in
the CvBuildingInfo class and exposed them to python they are:
[PRE]
bool isRequiredInputBonus(int iBonus);
int getRequiredInputBonusValue(int iBonus);
int getRequiredInputBonusCount();
bool isBuildingOutputBonus(int iBonus);
int getBuildingOutputBonusValues(int iBonus);
int getBuildingOutputBonusCount();
[/PRE]
Last, I defined new XML tags in the CIV4BuildingsSchema.xml file. Here is an
example of how to use the new tags which need to be added after the
<iNumFreeBonuses>0</iNumFreeBonuses> tag in the building definitions found in
the CIV4BuildingInfos.xml file:
[PRE]
<RequiredInputBonuses>
<RequiredInputBonus>
<BonusType>BONUS_SALTPETER</BonusType>
<iBonusAmount>2</iBonusAmount>
</RequiredInputBonus>
<RequiredInputBonus>
<BonusType>BONUS_SULPHUR</BonusType>
<iBonusAmount>1</iBonusAmount>
</RequiredInputBonus>
<RequiredInputBonus>
<BonusType>BONUS_COAL</BonusType>
<iBonusAmount>1</iBonusAmount>
</RequiredInputBonus>
</RequiredInputBonuses>
<BuildingOutputBonuses>
<BuildingOutputBonus>
<BonusType>BONUS_GUNPOWDER</BonusType>
<iBonusAmount>1</iBonusAmount>
</BuildingOutputBonus>
</BuildingOutputBonuses>
[/PRE]
-----Version Information-----
-----v0.4BtS------
- Updated to be compatible with Beyond the Sword v3.19 patch
-----v0.3w------
- Updated to be compatible with Warlords v2.0.8.0 patch.
-----v0.2------
- Fixed the issue that prevented manufactured resources from being used as
inputs for other manufactured resources
-----v0.1------
- Setup the Building Resource Converter Mod
- Added the code to define the new building input/output bonus tags
- Added the resource processing code to the CvCity class so when a new resource
is "hooked-up" to a city and an active building exists in the city that can
process the new resource the building will start using the resource
- Updated the CIV4BuildingsSchema.xml file to include the new tags defined
through the SDK to the BuildingInfos definition.
-----===Credits & Thanks===-----
- Exavier - Composite Mod - readme.txt format
By: TheLopez
Last Updated 08/20/10
Version: 0.4BtS
Patch Compatibility: Beyond the Sword v3.19
MP Compatible: ?
Download Mod v0.4BtS
Version: v0.3w
Patch Compatibility: Warlords v2.0.8.0
MP Compatible: ?
Download Mod v0.3w
Version: v0.2
Patch Compatibility: v1.61
MP Compatible: ?
Download Mod v0.2
Description:
Adds the ability to specify that a building should take x number of resources
available in a city and output y number of new resources.
I have tried to test the code as best as possible to make sure buildings react
correctly when a resource is added to a city that the building can use.
Please report any inconsistent behavior as soon as you find it so I can fix the
issue and make a new release.
-----Notes to Modmakers-----
If you want to use this mod component in your mod I have tried to make things
as easy as possible for you. In the SDK files I have added
// < Building Resource Converter Start > and
// < Building Resource Converter End > in all of the places where changes
were made.
As part of the changes to the SDK files I have also included two new methods in
the CvBuildingInfo class and exposed them to python they are:
Spoiler :
[PRE]
bool isRequiredInputBonus(int iBonus);
int getRequiredInputBonusValue(int iBonus);
int getRequiredInputBonusCount();
bool isBuildingOutputBonus(int iBonus);
int getBuildingOutputBonusValues(int iBonus);
int getBuildingOutputBonusCount();
[/PRE]
Last, I defined new XML tags in the CIV4BuildingsSchema.xml file. Here is an
example of how to use the new tags which need to be added after the
<iNumFreeBonuses>0</iNumFreeBonuses> tag in the building definitions found in
the CIV4BuildingInfos.xml file:
Spoiler :
[PRE]
<RequiredInputBonuses>
<RequiredInputBonus>
<BonusType>BONUS_SALTPETER</BonusType>
<iBonusAmount>2</iBonusAmount>
</RequiredInputBonus>
<RequiredInputBonus>
<BonusType>BONUS_SULPHUR</BonusType>
<iBonusAmount>1</iBonusAmount>
</RequiredInputBonus>
<RequiredInputBonus>
<BonusType>BONUS_COAL</BonusType>
<iBonusAmount>1</iBonusAmount>
</RequiredInputBonus>
</RequiredInputBonuses>
<BuildingOutputBonuses>
<BuildingOutputBonus>
<BonusType>BONUS_GUNPOWDER</BonusType>
<iBonusAmount>1</iBonusAmount>
</BuildingOutputBonus>
</BuildingOutputBonuses>
[/PRE]
-----Version Information-----
-----v0.4BtS------
- Updated to be compatible with Beyond the Sword v3.19 patch
Spoiler :
-----v0.3w------
- Updated to be compatible with Warlords v2.0.8.0 patch.
-----v0.2------
- Fixed the issue that prevented manufactured resources from being used as
inputs for other manufactured resources
-----v0.1------
- Setup the Building Resource Converter Mod
- Added the code to define the new building input/output bonus tags
- Added the resource processing code to the CvCity class so when a new resource
is "hooked-up" to a city and an active building exists in the city that can
process the new resource the building will start using the resource
- Updated the CIV4BuildingsSchema.xml file to include the new tags defined
through the SDK to the BuildingInfos definition.
-----===Credits & Thanks===-----
- Exavier - Composite Mod - readme.txt format