Resource icon

[BtS] Food Supplies Mod 2016-10-05

This mod adds several new tags that allow the simulation of units needing food.
The tags let you specify how much food a unit starts out with, how much they
consume a turn and how much damage is done to them if they don't have access to
food. In addition there are tags that can be added to units to specift that
they provide food to other units but bewarned when theif food supply is
exhausted the unit will go away. So it would be best to create a new unit
specifically for carrying food.

Several in-game messages have also been added to warn when units are about to
starve, are starving, are about to run out of food and when they run out of
food.

For instance the updated the warrior definition using the new tag and updated
tag looks like:
Code:
      <bConsumesFood>1</bConsumesFood>
      <fFoodConsumptionAmount>1</fFoodConsumptionAmount>
      <iStarvationDamagePercentage>20</iStarvationDamagePercentage>
      <fTotalFoodProvided>4</fTotalFoodProvided>
What this means is that the warrior unit will start out with 4 turns worth of
food, eats food at a rate of 1/turn and will be hurt 20% each turn when they
don't have access to food.

For instance the updated the worker definition using the new tag and updated
tag looks like:
Code:
      <bConsumesFood>0</bConsumesFood>
      <fFoodConsumptionAmount>0</fFoodConsumptionAmount>
      <iStarvationDamagePercentage>0</iStarvationDamagePercentage>
      <bFoodProvider>1</bFoodProvider>
      <fTotalFoodProvided>10</fTotalFoodProvided>
The worker unit does not consume food but instead provides enough food for a
single unit (with a consumption rate of 1/turn) for 10 turns.

Installation Instructions:

1) Unzip this into the "bts_install_folder\Mods\" folder.
2) Open the CivilizationIV.ini configuration file
3) Change the Mod line to read: Mod = Mods\Food Supplies Mod
4) Load the game.
5) Then play as normal.


-----Game Play-----
Spoiler :

- Depending on how Civ4UnitInfos.xml is setup some units will provide food and
some units will consume food

- Notification messages provide key information of when units will begin to
starve and run out of food

- Units can be setup with food to provide your units with food during campaigns
outside of cities

- Units cannot heal when they are starving

- Depending on the configuration units will scavange from the tiles that they
are on instead of consuming their own food supplies (if they have any) or
food provided from other units (if allowed or if there are any in the same
tile).

- Depending on the configuration units will be fed by the city occupying the
same tile as the unit is on.


-----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
<!-- Food Supplies Mod Start --> and
<!-- Food Supplies Mod End --> in all of the places where
changes were made. In the SDK files I have added
// < Food Supplies Mod Start > and
// < Food Supplies Mod End > in all of the places where
changes were made.

As part of the changes to the SDK files I have also exposed several new methods
to python, they are:
bool isUnitsCanStarve() const;
void setUnitsCanStarve(bool bNewValue);
bool isCityResuppliesUnits() const;
void setCityResuppliesUnits(bool bNewValue);
bool isCityFeedsUnits() const;
void setCityFeedsUnits(bool bNewValue);
bool isUnitsProvideFood() const;
void setUnitsProvideFood(bool bNewValue);
bool isTilesFeedUnits() const;
void setTilesFeedUnits(bool bNewValue);

The python included in this mod is only used to set the configurable options
exposed through the SDK. If you don't want to use it just delete the entire
Python directory. Just make sure to set the options up the way you want them
using the methods above.


-----To Do-----

- Add full AI support (v0.4BtS)
- Units scavanging from tiles and the AI cheat should help for now.

- Add game configuration options (v0.4BtS)
- Unit consumes city food production

- Add city produced food consumption by units (v0.4BtS)

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

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

- Added python option configuration infrastructure

Spoiler :

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

- AI is not affected by starvation... this is a temporary fix until AI is fully
functional.

- Added the units can starve game option. This is set to true by default.
Setting this option to false will effectively disable this mod.

- Added the city resupplies units game option. This is set to true by default.
Setting this option to false will make it so units don't get their food supply
replenished by cities (if they have any).

- Added the city feeds units game option. This is set to true by default.
Setting this option to false will make it so units don't get fed by the city
they are at forcing them to use their own supplies or the supplies provided
by another unit.

- Added the units provide food game option. This is set to true by default.
Setting this option to false will make it so units cannot provide food to
other units.

- Added ability for units to feed off of tile food yields

- Added the tiles feed units game option. This is set to true by default.
Setting this option to false will make it so units don't get fed by the tile
they are at forcing them to use their own supplies or the supplies provided
by another unit. If this is set to true units will consume the food yield
from the tile. Once that amount is used up then the remaining units will use
their own supplies or the supplies provided by other units.


-----v0.1BtS------

- Setup the Food Supplies Mod infrastructure

- Added the <bConsumesFood> tag. It indicates if the unit will require food.

- Added the <iFoodConsumptionAmount> tag. It indicates the number of food per
turn that the unit consumes

- Added the <bFoodProvider> tag. It indicates if the unit provides food to
units

- Added the <iTotalFoodProvided> tag. It indicates the total number of food
provided in turns assuming that only one other unit is in the same square
as the food provider unit.

- Added in game messages to notify players when units were going to starve or
run out of food.


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

- Exavier - Composite Mod - readme.txt format
- Doomwyte - for the idea and play testing the mod
Author
TheLopez
Downloads
436
Views
436
First release
Last update
Rating
4.00 star(s) 2 ratings

More resources from TheLopez

Top Bottom