FANDOM


unitrules.xml is a game file which holds all unit parameters, like resource cost, combat stats, speed. Within the file, some unreleased content can be found as well, such as the Roman Tank Killer unique unit.

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 Edit

The file can be edited with any text editor, like Windows' built-in notepad, or a dedicated XML editor. 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 Edit

Note: This list is still incomplete.

COST - Base resource cost x10, with a letter to define the type of resource: f=Food, t=Timber, g=wealth, m=Metal, o=Oil, k=Knowledge). Example: 2f means the unit costs 20 Food. Two resources are possible by using the form 5g/6m (the order doesn't matter). See also SUPPORT.

SUPPORT - Additional unit cost per unit when building more units of the same type. Note this value is given as x1, not x10 (so 2f actually is 2 Food). Make sure to use the same types of resources as for COST. Formatting is the same as with COST, but with support added. See also parameter PROGRESSION on how ramping cost should be calculated for this unit

PROGRESSION - Determines how the Ramping Cost is calculated. There are four possible values (0-3), though only 0 and 3 of them are ever used

  • 0 = Ramp linearly based on # of units of the same type. By default used for all civilian units, support/special units, artillery, and aircraft.
  • 1 = Ramp linearly based on # of units of the group (e.g. "Barracks Units"). By default not used at all.
  • 2 = Ramp progressively based on # of units of the same type. By default not used at all.
  • 3 = Ramp progressively based on # of units of group. By default, used for most units trained at the Barracks, Stable/Auto Plant and Dock.

JOB_TIME - Base production time in frames (15 frames = 1 second). However, because of rules.xml, the actual base production time is 1.2x of this value.

PREQ0/PREQ1/PREQ2 - Research requirements (preq=prerequisites) to built this unit, up to three possible. Possible values are the name of an age (e.g. Enlightenment Age), a library tech (e.g., Mercenaries for Military Military 1), or none. For tech names, the default ones need to be used, as defined in techrules.xml. Example: The Horse Archer has Classical Age as PREQ0 and Mercenaries as PREQ1, meaning both need to be researched to be able to built Horse Archers. PREQ2 is not defined in this unit, thus simply not used.

LOS - Line of Sight, the units default vision range, in tiles. See also SCIENCE_LOS.

SCIENCE_LOS - Additional Line of Sight gained with each Science Science technology researched at the library. By default only used for Scouts and scouting towers (Lookout, stationary AA defenses). Suggested to be used sparingly.

FROM - Name of the unit this one upgrades from (NAME value of the preceding unit).

JUMP - Name of the unit this one upgrades to (NAME value of the succeeding unit).

GRAFT - Name of the unit this one replaces (NAME value of the replaced unit). Used with unique units, which replace regular ones.

POP - The amount of Population points this unit takes up. By default this is 2 for all artillery units and most ships, and 1 for all other units.

WHERE - Production site of this unit.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.