Welcome to EDU-matic. It is a tool that automatically generates a balanced export_descr_unit file for RTW or M2TW and their expansions) mod based on a fairly limited amount of customisable variables and attributes. The basic principles upon which EDU-matic is built are the following:
The central element of a unit is the soldier. This generic, unarmed and unarmoured soldier has certain stats. A number of global variables/rules are also defined, that form the basic structure of the balance system.
Then, the basic elements are defined. Unit classes, categories, weapons, projectiles, armours, shields, engines, mounts and so on. Each one of those elements is set to affect various unit-stats, called "attributes" (eg a melee weapon might affect attack, charge, defence, cost). These core elements can have multiple values as options (eg melee weapon might be dagger, shortsword, or longsword), and each one of these options might have a different value for the element's attributes. All these elements, attributes and values are collectively called the "core data".
Example: "Shortsword, Attack 4, Charge 2, Defence 1, Cost 20", is a definition for the "Shortsword" option of the "Melee weapon" core data element.
A unit is essentially the sum of a combination of all the aforementioned core data options. Which means, in order to describe a unit, you need to provide its name, its quality class, its weapon, its armour type, its shield type, its mount and generally choose for it a value for each available core data element. That combination of those core data element values is called a "unit definition".
Example: "My Unit, low quality, shortsword, small wooden shield, steel cap, padded leather vest, leather boots, unarmoured horse.", is a unit definition for the unit "My Unit".
In order to calculate a unit's stats, the tool reads its definition, breaks it down into its various elements, finds the relevant core data each element is associated with, and feeds all that into a function.
Therefore, what a user mainly needs to do is provide EDU-matic with the core data elements and then define which of those describe each unit. Getting unit stats from those becomes then a rather simple process. The EDU generation can be broken down in 7 steps: 1. Defining core data, 2. Defining units, 3. Checking for errors, 4. Generating data, 5. Manually Editing data (optional), 6. Formatting data, 7. Generating EDU
Below follows a description of each step.