Rise of nations изменить файл rules

Обновлено: 05.07.2024

unitrules.xml is a game file which holds all unit parameters like resource cost, combat stats and speed.

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 unitrules.xml file.

NAME - Internal name of the unit. Do not change! Edit name in typenames.xml instead.

GRAPH - ☀ External lookup name of unit, used to find entries in unit_graphics.xml, help.xml, and so forth.

TYPENAME - ☀ Display name of unit (lookup via typenames.xml for foreign language localization).

OBJ_MASK - Upper case letters and numbers used. These are "flags" that determine the unit's damage multipliers (defined in balance.xml) or a specific property such as Z (detects stealth/hidden).

Common to both units and buildings.

FLAGS - Lower case letters used. These give the unit specific properties or behaviours such as o (hidden unit) or v (can fire while moving).

Only shared by units. Buildings have different properties for lower case letters.

A list of all available OBJ_MASK and FLAGS is given together with basic explanations in the unitrules.xml file.

WHERE - Production site of this unit. E.g., barracks, factory, etc.

ATTACK - How much damage the unit deals per attack, divided by the number of sub-units per unit. Shown in-game as strength. Does not reflect damage multipliers such as OBJ_MASK or number of projectiles per attack per unit. Minimum damage is always 1.

HITS - Default hit points, or HP. How much damage the unit can sustain before being destroyed.

MOVES - Speed of the unit. Modified by UNIT_MOVE_SPEED in rules.xml.

COST - Base resource cost, multiplied by 10 (UNIT_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: 2f means the unit costs 20 Food. Two or more resources are possible by using the form 5g/6m/5o (the order doesn't matter).

See also: SUPPORT for ramping cost.

SUPPORT - Additional unit cost per unit when building more units 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. Formatting is the same as with COST, but with support added.

Only two resources can be ramped per unit. The game simply ignores all but the first two resources.

See also: PROGRESSION below on how ramping cost should be calculated for this unit.

JOB_TIME - Base production time in frames (15 frames = 1 second). E.g., 225 = 15 sec. 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 any technology (e.g. Enlightenment Age, Mercenaries or Steel), or none. For tech names, the default ones need to be used, as defined in the techrules.xml file.

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.

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 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 and alternative variant units such as the different tanks and fighter planes, which replace the standard ones.

RANGE - Minimum and maximum distance the unit can fire, in tiles.

LOS - Line of Sight, the unit'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 Scouts and scouting towers (Lookout, stationary AA defenses). Suggested to be used sparingly.

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.

DOMAIN - Whether the unit is a land, sea or air unit.

ATTENUATE - Amount of accuracy added or subtracted per tile of distance between attacker and target.

A unit with TO_HIT>100< and ATTENUATE>-10< would mean 100% accuracy at 0 range, 90% at 1 tile distance, 80% at 2 tile distance, etc. Apparently also depends on target unit's TARGET_SIZE.

CAT - Mainly for AI and unit formations.

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

SPLASH - Area of effect radius of an attack, in tiles.

A unit 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 unit 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.

Note that sometimes changing this value can be incompatible with a unit's specified firing animations as specified in unit_graphics.xml. For most units this isn't an issue, but in some cases (e.g. the Brig) it can cause an incorrect number of attacks to occur if the animations do not support the specified AMMO_PER_ATT value.

TURN_SPEED - How fast the unit can turn to face a different direction. Higher numbers mean faster turn speed. Does not apply to stopped Foot and Mounted units which turn instantly (FLAGS>b<). Modified by UNIT_TURN_SPEED and UNIT_PACK_TURN_BONUS (for pack/unpack units) in rules.xml.

PROJ_SPEED - For units that have range, how fast the projectile moves. Also affects projectile's arc: slower speeds give higher arcs.

CARRY_SIZE - Legacy value

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.

RESEARCH_PREMIUM_TIME - The research time of the unit is its JOB_TIME multiplied by this value.

RESEARCH_PREMIUM_COST - The research cost of the unit is its COST multiplied by this value.

JOB_EXTRA_TIME - Ramping cost for JOB_TIME when building more units of the same type. With each unit created this fraction of JOB_TIME will be added to the next unit. E.g., 1/10tsx = 10% extra time.

MANA - The amount of Mana the unit has. For generals, scouts, airplanes, etc.

TRIBE_MASK - Determines which nations have access to the unit. Each digit "slot", from far left (Persians) to far right (Aztecs), represents a nation. 1 = can build, 0 = cannot.

CARRY - Legacy value

GUY_SPACING - Horizontal distance between individual sub-units in a 3-soldier single unit.

X_SPACING - Horizontal distance from other units in a formation.

Y_SPACING - Vertical distance from other units in a formation.

CIRCLE_RADIUS - How large the circle drawn is around a selected unit, in tiles.

BLOCK_RADIUS - How large the unit is for purposes of collision with other units, in tiles.

TARGET_SIZE - Area around the unit in which it will be considered "hit" if a projectile lands there, in tiles.

UBER_SIZE - How many individual sub-units the unit is made of. 3 for most infantry, 1 for most other units.

CREW_SIZE - How many individual "crew members" the unit has. Mainly for siege units.

GRID_X - X coordinate (horizontal) for the unit on its creation building's lower left panel.

GRID_Y - Y coordinate (vertical) for the unit on its creation building's lower left panel.

UPGRADE - Legacy value

Константин Козлов

Константин Козлов

Серый Малой

карту надо новую.что бы не СССР А РОССИЯ,Украина,Белорусь и так далее современную кароче..

Максим Ковалёв

DELETED

огромная катра мира, было интересно в холодную войну на такой сыграть :)))

Максим Ковалёв

DELETED

Максим Ковалёв

неужели нет специалистов ,кто может сделать такую карту?:)

Сергей Громов

Наталья Овчинникова

Знаешь что я добавил бы я бы добавил чтобы в редакторе карт можно было делать своих героев и создовать задания и делать свои видеоролики а также можно просто удалить игру это шутка

Алексей Шквиря

Алексей Батонов

Как сделать так, чтобы конченой эпохой тоже можно было поставить древность? (играть только в древности)
Как нас скрине уже пробовал

Kirill Kiryiuha

Не могу сохранить редактор в игре пишет что не может записать что делать подскажите ? Создаю новую карту сам и не получается (((

Михаил Романов

Константин, а изменить бонусы нации? Я пробывала в рулес изменить германии на одну военку технологии. Не получилась((

Ваня Шквиря

Юрий Тимиров

Кто-нибудь знает, можно ли найти или сделать увеличенные карты?

Ваня Шквиря

Здравствуйте насчет прошлых записей, я решил их удалить и можно сказать так, все заново сделать но более качественнее.

Ваня Шквиря

Ну вот теперь и он. Сутки прошли не зря и добавление пришло.
1)Добавлены генералы из кампаний.
2)Пофиксены баги и недочеты.

Новые юниты у наций. 1)Американцы - Добавлен Хамви и Броненосец. Приобрести Хамви можно в конюшнях. Приобрести Броненосец можно в Доки. 2)Британцы - Убран Мушкетеры, Добавлен Красные Пиджаки. Приобрести Красные Пиджаки можно в Бараках. 3)Германцы - Убран Снайперы, Копьеносцы и Варвары, Добавлен Лучники Варваров, Копьеносец Варваров и Фаланга Варваров. Приобрести ЛКФ Варваров можно в Бараках. 4)Голландцы - Добавлен Бандейрант и Элитный Бандейратн. Приобрести Бандейрант и Элитный Бандейрант можно в Бараках. 5)Греки - Добавлен Греческие Наёмники и Юнкерс. Приобрести Греческие Наёмники и Юнкерс можно в Бараках. 6)Испанцы - Убран Драгун и Карабинер, Добавлен Конкистадор и Элита Конкистадоров. Приобрести Конкистадор и ЭК можно в Конюшнях. 7)Русские - Убран Атакующая Подлодка, Добавлен Ядерная Подлодка. Приобрести Ядерная Подлодка можно в Доки. 8)Французы - Добавлен Имперская Гвардия. Приобрести Имперская Гвардия можно в Бараках.


Где взять: Устанавливается вместе с игрой
Возможности: 80% игровых
Сложность освоения: Средняя
Документация: Отсутствует
Конница монголов бесчисленное количество раз раздавлена танками. Танки сметены европейскими легионами, а легионеров разгромили египтяне. Все миссии Rise of Nations пройдены? Можно ждать аддона, а можно запустить редактор и создать новые миссии самому.
Мы предлагаем второй вариант.

Интерфейс
Если театр начинается с вешалки, то знакомство с игровым редактором — с интерфейса. Все внимание на скриншот.
1. Панель инструментов. Здесь располагаются основные инструменты для создания карты.
2. Меню настроек выбранного инструмента.
3. Миникарта.
4. Меню выбора игрока.
5. Экран редактирования.

Основы ландшафтного дизайна
Прежде чем приступить непосредственно к созданию карты, необходимо упомянуть про одну неприятную особенность редактора — нормально поменять размер уже созданного уровня невозможно. Поэтому определитесь с размером уровня заранее.

- Интерфейс редактора

Чтобы сделать заготовку для карты, нужно воспользоваться генератором карт. Зайдите на закладку Map и укажите: тип местности (Map Style), количество наций на уровне (Nations) и размер карты (Map Size) в условных единицах. Нажмите на кнопкуGenerate Map. Редактор сгенерирует карту. Перейдите на закладку Terrainи удалите все объекты на карте, нажав кнопу Remove All.
Изменим текстуру поверхности. Менять текстуры можно лишь на всей карте. Нельзя засадить пол-уровня лесами, а вторую половину засыпать песком. Свои тайлы подгружать тоже не разрешается, только выбирать из списка. Зайдите на закладку Terrain и выберите из раскрывающегося списка тип текстуры. Редактор сам произведет замену.
Чтобы создать рельеф, на закладке Terrain нажмите на кнопку Adjust Height. Теперь в окне редактирования нажмите и удерживайте правую/левую кнопку мыши для повышения/понижения уровня земной поверхности.
Добавим на карту реки, горы, океаны. Для этого в основной редактор встроен мощный и удобный 2D-редактор. Он представляет собой отдельное окно, с условным изображением карты сверху. Все объекты отображаются в виде условных значков. Для активации двумерного редактора на закладке Terrain нажмите на кнопку Edit Land. Выбрав один из инструментов (добавляющий на карту реки или горы), приступайте к прокладке водных маршрутов и горных гряд (делается это при помощи левой кнопки мыши).

Дела сценарные
Когда на карте расставлены основные объекты, нужно задать стартовые параметры для игроков.

Перейдите на закладку Nations. На ней можно задать начальные условия игры для выбранной нации. Рассмотрим подробнее опции меню. Нажмите на кнопку Leader Name, чтобы изменить имя лидера нации. В поле Nationможно сменить нацию игрока. Для этого просто выберите любую другую из списка. В поле Color разрешено переопределить цвет игрока. В Control— кто управляет нацией, игрок или компьютер. Если нацией управляет компьютер, в поле Difficulty надо указать уровень искусственного интеллекта (AI).

В списке, который расположен рядом с меню Options, кликните в раскрывающемся меню по опции Resources. Здесь надо задать количество ресурсов, которое будет доступно в начале игры.
Теперь выберите из раскрывающегося списка пункт Library Research, в котором установите, какие пункты будут открыты в Библиотеке в начале игры. И, наконец, в пункте AI Setting можно поиграться с настройками AI. Значения параметров не совсем очевидны, поэтому разберем их по отдельности.
Production AI — включает/отключает запрет AI на производство и сбор ресурсов. Компьютер вообще не будет заниматься сбором ресурсов и производством. Обойдется тем, что дано в начале миссии.
Unit AI — включает/отключает контроль над юнитами со стороны AI. То есть компьютер не будет управлять своими войсками, его юниты будут просто стоять на месте. Но если вы их атакуете, то отстреливаться они смогут.
Combat AI — включает/отключает контроль AI над боевой активностью юнитов. Войска противника не будут атаковать ваших бойцов.


Are you itching to insert crazy death robots into your game? then this guide is meant for you!

Are you itching to insert teddy bears and crazy death robots into your game? or are you just peeved that BHG left a whole load of inconsistencies and ahistorical bull in your game? well then, this guide is meant for you!

Modding a unit in Rise of Nations looks more difficult than it really seems. To be honest, the only issue involved may be in creating the renders and the tedium in the coding required, but overall it is actually a very fast process, and sometimes rewarding as well.

This guide tries to go step by step in designing a model from scratch, from the creating of the graphics required for a new unit all the way to getting it to work in the game. We will first explain how graphics are created, and then go on to inserting the model into the game itself.

To work with RoN, the following are required:

  • 3ds Max 5.1, with Character Studio 3.4, and the Big Huge Exporter plugin (plugin only works for Win XP, 3ds Max 5.1 works with Windows XP and Windows 7 only - issues with certificate access have been found with Windows 10) OR
  • Blender (preferred version: latest) with Ryder25's BH3/BHA exporter plugin.

Unless mentioned, this tutorial will assume that the reader has chosen to install 3ds Max 5.1, for reasons that will be made clear below.

Contents

HOW DO GRAPHICS IN RISE OF NATIONS WORK?

WHAT FILES GOVERN A UNIT'S APPEARANCE?

This is determined by the following:
- a .bh3 model. This is the model for the sprite as it appears in your game, and will be stored in your /art folder;
- .bha files, which governs unit animation, ie how the unit moves and so forth, which goes into the /art folder too;
- a .tga file, which if not properly inserted causes the unit to appear white. This also goes into the same folder as above; and
- entries in the unit_graphics.xml file under your/data folder.

BUT HOW ON EARTH DO I GET IT TO WORK?

There are several files which govern how a unit functions:
- unitrules.xml, under your /data folder, will govern a unit's attributes, ie attack, movement speed, hitpoints, as well as graphics; and
- craftrules.xml and balance.xml will govern the abilities of your unit.
-anim_graphics.xml governs animations. Custom animations must be recorded here otherwise they won't work.
- unit_graphics.xml determines the appearance and movements of the unit, and
- typenames.xml and help.xml govern infobox data and the unit's name as it should appear in-game.

Of these, however, we must pay utmost attention when modifying any .xml files in Rise of Nations - faulty coding at the least will leave units inoperable, and at worst crash your entire game. For this reason we strongly discourage overwriting any source files in ./data or ./art unless it is necessary, and to use FirstObject XML Editor to edit any .xml files.

HOW MANY CUSTOM UNITS CAN I INSERT INTO RISE OF NATIONS?

Sadly, the answer is none, because in reality the number of units is determined by the number of entries for each unit in Rise of Nations in the unitrules.xml file (for convenience, we will call each area where you can insert data for a new unit as a "slot"). Each slot is demarcated by the tagging <UNIT>. </UNIT> with the statistics of the unit (ie name, type, tactical parameters, etc) located within this tag. You can only create new units by "cannibalising" existing slots. In theory, there are roughly about 150 available unit slots to cannibalse.

ENOUGH BABBLING! JUST SHOW ME HOW TO DO IT!

Let's use an example from Age of Darkness.

Suppose that I want to insert a new unit that I want to call "Panzerfaust", a custom infantryman which can fire rockets and is represented by two different sprites. How do I go about this? the answer is simple:

Graphics

The first thing I do is to get out the graphics for two different sprites. Generally, in Rise of Nations a unit by default needs at least 1 .tga file, and 1 .bh3 file (the model itself) as well as accompanying .bha files that govern the animation. For the purposes of this tutorial, we will have 1 .bh3 file, pfaust.bh3 and 2 .tga files, d_m44.tga and d_m45.tga.

The .bh3 and .bha files for Rise of Nations can only be created if you have 3ds Max 5.1 and the Big Huge Exporter plugin produced by BHG. We will not cover this, there are many tutorials elsewhere on how to create your own 3d models using this program.

Meanwhile, on to sprites. You must be asking, why do we need to create two sets of .tga files if we are just creating only one unit? this is because although I am only creating one unit, I want this unit to have a varied appearance, hence the need for two .bh3 files - one for each sprite. The bh3 files however are not enough on their own, so I must also have .tga files which form the "skin" of the unit.

Panzerfaust 1.jpg

In this screenshot, you can see what the .tga files look like when opened up in GIMP2.8.1 Remember that to create unit colour areas, you need to render parts of the model semi-transparent.

Rise of Nations when in operation "wraps" the texture of the tga around the model as determined by the bh3 file. If we opened up the unit model file in 3ds Max and then used, say, d_m44.tga file as its skin, this is what it would look like:

Pfaust2.jpg

With these files ready, I will now put the .bh3 files into the ./art folder of my project directory, ./mods/Age of Darkness/art/Inf folder.

Читайте также: