Civ4GoodyInfo: Difference between revisions
m (Reverted edits by 79.120.193.53 (Talk) to last version by Deanej) |
|||
Line 8: | Line 8: | ||
==Tags== | ==Tags== | ||
===Headers=== | |||
These tags typically bracket other tags, sometimes the entire file, and are generally used to specify more than one piece of data. | |||
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0" | |||
|- | |||
! style="background:#efefef;" | Tag Name | |||
! style="background:#efefef;" | Description | |||
|- | |||
!GoodyInfos | |||
|This tag begins and ends the entire file. | |||
|- | |||
!GoodyInfo | |||
|This begins and ends the information for each goody hut option type. All of the attributes for each goody hut result are contained within. | |||
|} | |||
===Text=== | ===Text=== |
Revision as of 13:29, 6 July 2010
The Civ4GoodyInfo file controls the potential results for exploring a goody hut. Possibilities include spawning barbarians, receiving a free technology, or gaining an extra warrior.
All tags must be opened and closed; the first is the "open", the second the "close" tag. If nothing goes inside a "list tag", then it should just be the opening tag with a "/" before the closing bracket. The following tables contain all available tags, as well as their purpose and accepted values.
This page is missing information. Do not remove this notice until it is complete.
Tags
Headers
These tags typically bracket other tags, sometimes the entire file, and are generally used to specify more than one piece of data.
Tag Name | Description |
---|---|
GoodyInfos | This tag begins and ends the entire file. |
GoodyInfo | This begins and ends the information for each goody hut option type. All of the attributes for each goody hut result are contained within. |
Text
Tag Name | Description |
---|---|
Type | The name of the goody hut result type used internally by the game. |
Description | A reference to an entry in the Civ4GameTextInfos text file which contains the text displayed on-screen when this result is achieved (e.g. "The villagers are hostile!"). |
Sound | This is a reference to an entry in the Audio2DScripts file which declares the sound played when this goody hut result is received. |
UnitClass | Gives a free unit of the specified unit class. For example, UNITCLASS_SETTLER or UNITCLASS_WARRIOR. |
BarbarianClass | Defines the class of barbarian units spawned. Default is UNITCLASS_WARRIOR. |
Integers
All of these tags have a numerical value. Though it sometimes can be negative, it usually is not.
Tag Name | Description |
---|---|
iGold | Unknown. The default is 20, for both GOODY_LOW_GOLD and GOODY_HIGH_GOLD. Affects the grant of free gold. |
iGoldRand1 | Unknown. GOODY_LOW_GOLD has a value of 21, and GOODY_HIGH_GOLD has a value of 51. Used to determine the exact amount of free gold. |
iGoldRand2 | Unknown. GOODY_LOW_GOLD has a value of 21, and GOODY_HIGH_GOLD has a value of 51. Used to determine the exact amount of free gold. |
iMapOffset | Unknown exactly. Presumably affects the center tile of the region that is revealed (e.g. the map is not always directly located on top of the goody hut). |
iMapRange | The distance within which tiles may become visible. |
iMapProb | The percentage chance that each tile in the specified region of the fog of war will become visible. Default is 80. |
iExperience | The amount of free experience points given to the unit. |
iHealing | Assumed to be the percentage of a unit's damage that is healed by the goody hut. |
iDamagePrereq | Assumed to be the amount that a unit must be damaged to possibly attain the iHealing bonus, expressed as a percent. For example, the default value of 60 for the healing option presumably means that a unit must be at 40 HP or lower to receive this result. |
iBarbarianUnitProb | The probability percentage that each of the 8 surrounding tiles will generate a barbarian unit. |
iMinBarbarians | The minimum number of barbarians that will be spawned for this option. This prevents the unlikely scenario of no tiles generating a barbarian unit as per the iBarbarianUnitProb tag. |
Boolean
All of these can either be 1 (on, or true) or 0 (off, or false). Be careful, as you can wind up with a double-negative, which the game will interpret as "True".
Tag Name | Description |
---|---|
bTech | If 1, gives the player a free eligible technology (here, eligible means that some advanced technologies are not receivable). |
bBad | If 1, this means that the result is unfavorable to the player. |
Example
In the following example of code, please note that there is a specific order of all of the tags. You must list the tags in this order for the game to properly interpret your file.
<GoodyInfos> <GoodyInfo> <Type>GOODY_LOW_GOLD</Type> <Description>TXT_KEY_GOODY_GOLD</Description> <Sound>AS2D_GOODY_GOLD</Sound> <iGold>20</iGold> <iGoldRand1>21</iGoldRand1> <iGoldRand2>21</iGoldRand2> <iMapOffset>0</iMapOffset> <iMapRange>0</iMapRange> <iMapProb>0</iMapProb> <iExperience>0</iExperience> <iHealing>0</iHealing> <iDamagePrereq>0</iDamagePrereq> <bTech>0</bTech> <bBad>0</bBad> <UnitClass>NONE</UnitClass> <BarbarianClass>NONE</BarbarianClass> <iBarbarianUnitProb>0</iBarbarianUnitProb> <iMinBarbarians>0</iMinBarbarians> </GoodyInfo> </GoodyInfos>