Resource icon

Building Resource Converter Mod v0.2 2016-10-05

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:
[TAB]bool isRequiredInputBonus(int iBonus);
[TAB]int getRequiredInputBonusValue(int iBonus);
[TAB]int getRequiredInputBonusCount();
[TAB]bool isBuildingOutputBonus(int iBonus);
[TAB]int getBuildingOutputBonusValues(int iBonus);
[TAB]int getBuildingOutputBonusCount();
[TAB]
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:
<RequiredInputBonuses>
[TAB]<RequiredInputBonus>
[TAB][TAB]<BonusType>BONUS_SALTPETER</BonusType>
[TAB][TAB]<iBonusAmount>2</iBonusAmount>
[TAB]</RequiredInputBonus>
[TAB]<RequiredInputBonus>
[TAB][TAB]<BonusType>BONUS_SULPHUR</BonusType>
[TAB][TAB]<iBonusAmount>1</iBonusAmount>
[TAB]</RequiredInputBonus>
[TAB]<RequiredInputBonus>
[TAB][TAB]<BonusType>BONUS_COAL</BonusType>
[TAB][TAB]<iBonusAmount>1</iBonusAmount>
[TAB]</RequiredInputBonus>
</RequiredInputBonuses>
<BuildingOutputBonuses>
[TAB]<BuildingOutputBonus>
[TAB][TAB]<BonusType>BONUS_GUNPOWDER</BonusType>
[TAB][TAB]<iBonusAmount>1</iBonusAmount>
[TAB]</BuildingOutputBonus>
</BuildingOutputBonuses>

-----Version Information-----

-----v0.2------

- Fixed the issue that prevented manufactured resources from being used as
inputs for other manufactured resources

Spoiler :

-----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
[TAB]Composite Mod - readme.txt format
Author
TheLopez
Downloads
375
Views
375
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from TheLopez

Top Bottom