[BtS-MODCOMP] Multi-Bonus Unit Requirement

TheLopez

Deity
Joined
Jan 16, 2006
Messages
2,525
Location
Oregon
Multi-Bonus Unit Requirement Mod
By: TheLopez

Last Updated 08/26/10

Version: v0.3BtS
Patch Compatibility: Beyond the Sword v3.19
MP Compatible: ?
Download Mod v0.3BtS

Description:
This mod changes the behavior of the <PrereqBonuses> tag and adds the
<PrereqOrBonuses> tag that retains the original behavior of the <PrereqBonuses>
tag. Any bonuses added in between the <PrereqBonuses> tag will now be required
to build the unit. One of the bonuses added in between the <PrereqOrBonuses>
tag will now be required to build the unit. An <iBonusAmout> tag has also been
added to allow the specification of how many number of bonuses are required of
a specific type to build the unit.

For instance the updated warrior definition using the new tag and updated tag
looks like:
Code:
      <BonusType>BONUS_STONE</BonusType>
      <PrereqBonuses>
        <PrereqBonus>
          <BonusType>BONUS_FUR</BonusType>
          <iBonusAmount>1</iBonusAmount>
        </PrereqBonus>
        <PrereqBonus>
          <BonusType>BONUS_INCENSE</BonusType>
          <iBonusAmount>1</iBonusAmount>
        </PrereqBonus>
      </PrereqBonuses>
      <PrereqOrBonuses>
        <PrereqOrBonus>
          <BonusType>BONUS_FISH</BonusType>
          <iBonusAmount>1</iBonusAmount>
        </PrereqOrBonus>
        <PrereqOrBonus>
          <BonusType>BONUS_PIG</BonusType>
          <iBonusAmount>1</iBonusAmount>
        </PrereqOrBonus>
        <PrereqOrBonus>
          <BonusType>BONUS_SHEEP</BonusType>
          <iBonusAmount>1</iBonusAmount>
        </PrereqOrBonus>
        <PrereqOrBonus>
          <BonusType>BONUS_RICE</BonusType>
          <iBonusAmount>1</iBonusAmount>
        </PrereqOrBonus>
      </PrereqOrBonuses>

-----Screenshot-----
Spoiler :




-----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 XML files I have added
<!-- Multi-Bonus Unit Requirement Start --> and
<!-- Multi-Bonus Unit Requirement End --> in all of the places where changes
were made. In the SDK files I have added
// < Multi-Bonus Unit Requirement Start > and
// < Multi-Bonus Unit Requirement End > in all of the places where changes
were made.

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

-----v0.3BtS------

- Updated to be compatible with Beyond the Sword v3.19 patch.

- Changed the PrereqOrBonuses and PreqBonuses tags so they will now take in a
value instead of acting like a boolean flag. This requires updating all the
units in the Civ4UnitInfos.xml file to use the new structure. It might be a
pain but it provides a lot more flexability.

Spoiler :

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

- Updated to be compatible with Warlords v2.0.8.0 patch.


-----v0.1w------

- Setup the Multi-Bonus Unit Requirement Mod infrastructure

- Updated the <PrereqBonuses> to be <PrereqOrBonuses> instead

- Added the new <PrereqBonuses> tag that allows for multiple bonuses to be
required for building units.

- Updated the CIV4UnitInfos.xml file so all units that had multiple bonuses
listed in the <PrereqBonuses> now use the <PrereqOrBonuses> tag instead.

- As an example of how to use the new tags the warrior unit has been updated in
the CIV4UnitInfos.xml file so it requires stone, fur, incense and one of the
following: fish, pig, sheep or rice.


-----===Credits & Thanks===-----

- Exavier - Composite Mod - readme.txt format

- Keldath - for suggesting changing the structure to allow specification of
number of bonuses required.
 
This is similar to the vanilla and warlords versions except for this version allows you to specify amounts of bonuses required instead of just indicating that they are required.

Here is the link to the vanilla and warlords version
 
oh sweet! you updated it to amount of bonuses ! awesome!

I will update the multi-bonus building requirements mod to be the same once I finish converting the multi-building unit requirements mod
 
Top Bottom