buildingrules.xml is a game file which holds all building parameters like resource cost, combat stats and Wonder points received.
For vanilla Rise of Nations, it is located in the \data\ subfolder. With the expansion installed, a new file is used, located in the \data\ of where the expansion is installed to.
Editing the file[]
The file can be edited with any text editor, like Windows' built-in notepad, or a dedicated XML editor such as Notepad++. The file's header holds some information on the parameters (see below).
Warning: Back up the file before editing! Also be aware that in multiplayer games, all users must use the same version of data files, otherwise the session will abort due to loss of synchronization.
Parameters description[]
Note: This list is still incomplete.
Entries beginning with a ☀ are simple copy/paste of the info in the buildingrules.xml file.
NAME - Internal name of the building. Do not change! Edit name in typenames.xml instead.
TYPENAME -
GRAPH - ☀ Lookup name for building graphics, help.xml, etc.
OBJ_MASKS - Upper case letters and numbers used. These are "flags" that determine a building's damage multipliers (defined in balance.xml) or a specific property such as Z (detects stealth/hidden).
Common to both units and buildings.
BUILD_FLAGS - Lower case letters used. These give a building specific properties such as e (can build outside of city radius) or n (not captured when assimilating a city).
Only shared by buildings. Units have different properties for lower case letters.
A list of all available OBJ_MASKS and BUILD_FLAGS is given together with basic explanations in the buildingrules.xml file.
PREQ0/PREQ1/PREQ2 - Research requirements (preq=prerequisites) to construct this building, up to three possible. Possible values are any technology (e.g. Enlightenment Age, Mercenaries or Steel), none, or disable (which will make that building unavailable to all players). For tech names, the default ones need to be used, as defined in the techrules.xml file.
Example: The Shipyard has Barter as PREQ0 and Industrial Age as PREQ1, meaning both need to be researched to update Anchorages to Shipyards. PREQ2 is not defined in this building, thus simply not used.
PREQ0 and PREQ2 are absolute values. If PREQ0>Finance<, you will always need to research the fifth Commerce tech to unlock it.
PREQ1, if a library "color" tech, scales depending on the starting/ending ages of the scenario/game.
FROM - Name of the building this one upgrades from (NAME value of the preceding building).
COST - Base resource cost, multiplied by 10 (BUILD_COST_FACTOR in rules.xml), with a letter to define the type of resource: f=Food, t=Timber, g=Wealth, m=Metal, o=Oil, k=Knowledge).
Example: 5t means the building costs 50 Timber. Two or more resources are possible by using the form 5g/6m/5o (the order doesn't matter).
See also: SUPPORT/SUPPORTVALUE for ramping cost.
SUPPORT/SUPPORTVALUE - Ramping cost for buildings. Additional cost per building when constructing more buildings of the same type. Note this value is not multiplied by 10 (so 2f actually is 2 Food). Make sure to use the same types of resources as for COST.
Only two resources can be ramped per building, adding additional ones (SUPPORT2/SUPPORTVALUE2) will crash the game!
PLUNDER_GOOD - Which type of resource is given to the player that destroys the building.
Amount is determined by PLUNDER value.
PLUNDER - How much of the PLUNDER_GOOD resource is given to the player that destroys the building.
CAT - Used for determining on which of the citizen's three build menus it appears.
E = Economic, M = Military, W = Wonder
JOB_TIME - Base construction time in frames (15 frames = 1 second) for one citizen. E.g., 420 = 28 sec.
HITS - Default hit points, or HP. How much damage the building can sustain before being destroyed.
TOWN_HITS - Legacy value
TO_HIT - Accuracy. Chance to hit the target, in %. Numbers ≥100 mean the shot will always hit the unit and deal damage.
ATTENUATE - Amount of accuracy added or subtracted per tile of distance between attacker and target.
ATTACK - How much damage the building deals per attack. Shown in-game as strength. Does not reflect damage multipliers such as OBJ_MASK or number of projectiles per attack. Minimum damage is always 1.
WONDER_VAL - How many points this building contributes towards the Wonder Victory condition.
RANGE - Minimum and maximum distance the building can fire, in tiles.
SPLASH - Area of effect radius of an attack, in tiles.
SPLASH_PERCENT - How much % of the base damage is transferred onto each consecutive "ring" of tiles.
A building with SPLASH>5< and SPLASH_PERCENT>90< would lose 10% damage per tile away from the projectile's impact location until 50% damage done 5 tiles away from the impact and 0 damage on tiles further away.
AMMO_PER_ATT - How many projectiles are fired per shot. Damage and damage/armor interaction is distributed between projectiles. Mainly for machine guns, air units and ships but also some vehicles, mamelukes and, interestingly, British and Korean unique archers which fire two projectiles per attack sequence.
E.g., a building with ATTACK>33< and AMMO_PER_ATT>6< attacking target X with ARMOR>6< does 5.5 damage per projectile for a total of 33 damage per attack sequence, then target X will subtract 1 damage from each projectile for a total of -6 per attack sequence. In the end 27 damage is applied to target X.
MOST_SHOTS - Max number of "shots"/"arrows" the building can have per attack sequence when garrisoned with infantry. Not distributed between projectiles; each "shot"/"arrow" does full damage and may have multiple projectiles as defined in AMMO_PER_ATT.
BASE_ARROWS - How many full attacks the building gets per attack sequence. Not distributed between projectiles; each "shot"/"arrow" does full damage.
GARRISON_MAX - How many units can be garrisoned in the building. May be increased by researching the Fortification techs at the fort.
See: FORT_GARRISON_UPGRADE and TOWER_GARRISON_UPGRADE in rules.xml
RECHARGE- Delay between two instances of firing. Value is given in frames not seconds, so 15 = 1 sec, 60 = 4 sec, etc.
ARMOR - Amount subtracted, AFTER calculating damage multipliers, from the incoming damage from an attack. The minimum damage sustained is always 1.
X_SIZE - Horizontal (NW to SE) size of the building.
Y_SIZE - Vertical (NE to SW) size of the building.
Changing either X_SIZE, Y_SIZE or both will crash the game.
LOS - Line of Sight, the building's default vision range, in tiles. See also: SCIENCE_LOS.
SCIENCE_LOS - Additional Line of Sight gained with each Science technology researched at the library. By default only used for cities (incl. Forbidden City) and scouting towers (Lookout, stationary AA defenses). Suggested to be used sparingly.
OBSOLETE - Legacy value, but functional.
Value entered must be the NAME value of any technology found in techrules.xml. After researching the specified tech, the building will become unbuildable and its button will disappear from the citizen's build menu.
JUMP - Legacy value
TRIBE_MASK - Determines which nations have access to the building. Each digit "slot", from far left (Persians) to far right (Aztecs), represents a nation. 1 = can build, 0 = cannot.
By default all nations can build all buildings. Except farm for Lakota.
GRID_X - X coordinate (horizontal) for the building on Citizen's lower left panel.
GRID_Y - Y coordinate (vertical) for the building on Citizen's lower left panel.
TEX_ID - ☀ Identifies which icon texture page the building's icon comes from.
TEX_COL - ☀ Location of building's icon on texture page.
TEX_ROW - ☀ Location of building's icon on texture page.
TEX_CLIP - Legacy value
MISERY - Legacy value
BEHIND_HEIGHT - ☀ Based on the height of the building's graphic -> tells graphics engine how far to search for units obscured by the building.
PROJ_SPEED - For buildings that have ranged attacks, how fast the projectile moves. Also affects projectile's arc: slower speeds give higher arcs.
FLY_HIGH - The chance to hit a "high flying" (not attacking, just moving) air unit, in %.
FLY_LOW - The chance to hit a "low flying" (attacking/engaging a target) air unit, in %.