Resource icon

[BtS] Building Resource Converter Mod 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:
     bool isRequiredInputBonus(int iBonus);
     int getRequiredInputBonusValue(int iBonus);
     int getRequiredInputBonusCount();
     bool isBuildingOutputBonus(int iBonus);
     int getBuildingOutputBonusValues(int iBonus);
     int getBuildingOutputBonusCount();
     
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>
     <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>

-----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.2w------

- Updated all code to be compatible with Warlords v2.0.0.0


-----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
Author
TheLopez
Downloads
461
Views
461
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from TheLopez

Back
Top Bottom