The AIP (Artificial Intelligence Personality) Editor is designed to complement the construction kit in allowing the user to modify the behaviors of the computer-controlled opponents. The "personality" of the opponents is defined in a AIP file (a text file) where various values are set.
The Editor will write out an AIP file to any desired directory. Generally, these files are placed either in a scenario's directory, or in the general "aip" directory of the game.
Not all tags are covered by the editor, and if they are not covered, they will not be written out. This includes AIP files using these tags that are loaded and subsequently saved. For this reason, you should use the editor with caution on any existing file.
Some known areas that the editor currently does not support: transport tags, tactical AI levels, and unit match-ups.
This section will describe the various parts of the editor interface and how they are used.
There is a toolbar at the top of the editor window at all times. This contains buttons for the most high-level tasks, roughly equivalent to the File menu of most programs. The "Exit" button will close the program. The "Load" button will prompt the user for an AIP file and will load it into the editor. It's opposite, the "Save" button will write out an AIP file to the specified directory.
The "Priorities" and "Accounts" buttons are used to switch between the two different editing modes of this editor, described later. The "Units" and "Buildings" buttons will similarly switch between the iconic display of units and building at the right, which is used for various editing tasks.
There is a pair of arrows at the far right, which will allow the user to scroll through the iconic display of units and buildings on the right side of the screen.
In account mode (when the "Accounts" button is selected on the main toolbar), an additional toolbar will be visible at the bottom of the screen. This toolbar is used for the management of accounts and the individual entries in those accounts.
The pair of arrows at the far left is used to scroll through the list of accounts for the current AIP. The "Add" and "Delete" buttons on the left side of the screen are also used to modify the list of accounts; the "Add" button will add a blank account to the end of the list, and the "Delete" button will remove the currently selected account from the list.
On the right, the other "Delete" button is used to delete an individual entry from the currently selected account. When this button is clicked, the cursor changes into the "slash" symbol and if the user then clicks on an entry in the list above, that entry will be removed from the current account. The pair of arrows at the far right is used to scroll through the entry list for the current account.
The far right of the screen displays the units and buildings, which are used in various parts of the editor. Moving the mouse over one of the icons will display the description of that unit or building at the bottom of the screen.
This section will describe the various parts of an AIP file and how the editor manages them.
The "personality" of an AIP is primarily determined by the priority values. These are relative values (most of them, anyway) which are used to determine what tasks the computer-controlled opponent considers most important. "Relative values" means that there are no practical limits to the size of these numbers (although the editor does enforce one), as they are only important in comparison to each other. There are certainly exceptions to this, and a complete breakdown of each fields significance is key to understanding an AIPs behavior; unfortunately, such a discussion is beyond the scope of this document.
Each priority is displayed in its own box ("field") on screen, when the "Priorities" button is selected in the toolbar. Each field is next to a pair of arrows which may be used to modify the value inside. The values can also be modified directly by the user by selecting the text and typing normally.
Each field has its own range and precision, which is an attempt by the designers to guide the user towards values of an appropriate order of magnitude.
When the "Accounts" button is selected in the toolbar, the screen is then divided up into two sections. On the left are the accounts and on the right are the entries. Entries are either units or buildings, and are used to signify what is built when by an AIP. Accounts contain entries, and the editor attempts to represent this relationship in the following way.
Each account box has a unlabeled radio button (a round button) in the upper left portion of the box. If the account is selected, then this button will be highlighted. Only one account can be selected at a time, and clicking the radio button of a different account will de-select the first one. Whatever account is selected, its entries will be displayed in the right half of the screen. New accounts will not have any entries to begin with, and so none will be displayed, but the account is still selected.
Each account has a section marked "%" (percentage) and one marked "Cap", which stands for budget cap. "%" is defined as the percentage of the budge that is allocated to that account, and "Cap" is defined as the maximum amount of credits that can be specified to that account. The buttons marked "Unlimited" specify that that area of the account has no limit, and the fields nearby can be used to specify a precise value for either area. Percentage values entered by the user are normalized by the game (so you can have two accounts which combined use more that 100% of the budget).
Each entry in the current account has a box of information, as well. The unlabeled field on the left that contains a number is the priority of the entry; larger priorities will be built first. Note that the entry list is sorted according to priority. Also, there is a menu where the user selects the build mode of that entry (described elsewhere). The field at the far right is used to specify the value used by the current build mode for that entry.
To add an entry to the currently selected account, drag the icon of a unit or building over to the entry area of the screen. The unit or building will be added to the account and the entry list will be sorted (which is why the unit or building may not necessarily appear where you dropped it).
Beneath each icon for a unit or building, there is an unmarked field that contains a decimal number. This is the force multiplier for that particular unit or building; a value of 1.0 means that the unit is given no special significance by the AIP. If the value is lower than 1.0, that means that the AIP will consider that unit to be less of a threat and will send less forces to an area that contains that unit. If the value is greater than 1.0, the AIP will consider that unit to be more of a threat, and will respond accordingly.
In the same area, for buildings but not units, there is a menu which allows the user to specify what location a particular building is built. These building locations are described elsewhere.
UBE stands for "Units, Buildings, and Environment" and that is what this editor allows the user to modify. Dark Reign uses text files external to the game itself to define the various unit and building types that are used. By modifying the contents of these files, the user can change the capabilities of most everything in the game.
This editor modifies the files "units.txt" and "build.txt", which are contained in the "deftxt" directory of the Dark Reign installation. These files may also be used in various scenarios (for special-case units, for example), and the editor supports that as well. The editor will only overwrite the files that it opens, and does not give the option to save the files to other directories.
For all the things that can be modified by this editor, there are several that can't. Some of these omissions are intentional, because they define the "physics" of the game and are key to defining exactly what some special abilities are. For example, the explosion displayed when a unit morphs is technically editable on a unit-by-unit basis, but should actually be consistent for ALL units.
These "physics" defaults are contained in the "layout.cfg" file at the root of the installation. The truly ambitious user can modify those values as well, but this editor doesn't support it.
The editor has attempted to be as comprehensive as possible, but there are some tags which are not supported (or not fully supported). Any tag that the editor is not aware of will not be written out when the files are saved. Some tags are loaded and written properly, but are not editable. Also, there is no guarantee that, if a value can be set using the editor, the game will run properly will that value set. This means that great caution should be taken. Complete control over the contents of the "units.txt" and "build.txt" files can only be achieved by using a text editor.
The various parts of the editor's interface are described below.
There is a toolbar displayed at the top of the screen at all times. The "Exit" button will close the editor. The "Save" button will save the "units.txt" and "build.txt" files to whatever directory they were opened from (which may not necessarily be the same one, see below). The "Load" button will allow the user to choose a directory from which to load these files -- if either or both files do not exist at the specified location, the missing file(s) will be loaded from the default directory. The "Default" button will load the files from the default directory, and the "Revert" button will copy over the current default files with copies from the original installation and load the new defaults. This can be used to recover from any problems experienced from modifying the default directory files.
The "Units", "Buildings", and "Environment" buttons are used to switch the mode of the editor. The "Add" and "Delete" buttons will add or delete a unit or building (there is no effect while in environment mode). Lastly, the pair of buttons on the far right of the toolbar are used to scroll through the displayed units or buildings.
Units and Building are displayed for their appropriate modes on the right side of the screen. Moving the mouse over an icon will display its description at the bottom of the screen.
This section will describe how to modify the values that the editor displays. A complete description of each and every tag used by the editor is not possible here. Each mode of the editor will display a different box in the left part of the screen. Each box has a number of sections of data, which are represented by the labeled tabs at the top part of each box.
Clicking on a unit or building in the iconic list will display the information for that unit or building. When editing values, the changes made by the user will not be applied until the "Apply" button is clicked in the center lower part of the screen. This means that if a series of modifications are made to a unit and the user selects another unit (or changes modes) before applying changes, then those changes are lost.
|