DISCLAIMER: Use at your own risk! I won't be responsible for any time lost!
Just unzip the package in the directory of your choice. Note that the working directory is the directory in which you extract the package. It is recommended that you import maps from this directory and save layouts to this directory.
mGen is used to import a map in a form that can be used to manipulate it. This form is called a "layout". The layout contains a preview of the map, as well as any Regions defined. Rules are executed on export within these Regions (the Regions delimit where textures and objects are placed). Layouts can be saved and later retrieved.
A Rule Tree is in the bottom-left corner, which shows which Rules have been defined. In the top left corner is the Rule Property window, which shows the properties of the selected Rule.
A note on coordinates: Morrowind uses "logical" coordinates. The map you are importing probably uses "world" coordinates (i.e. meters/feet). For this reason, you will probably have to tweak the import settings until the map looks like you want it to. It is highly recommended that you make sure that you determine the appropriate import settings for your map by trial and error before adding any objects/rules. Try some settings, export, view in TES, and repeat until you find the correct settings, then save with those settings.
Choose "File->New Layout" or "File->Import Map". Both do the same thing.
The Import Settings dialog will appear. Note that these settings cannot be changed after a map is loaded!
Click Import to import the map.
Click Save to save the current Layout.
Several tools can be used to add "Regions" to the map. These Regions act as delimiters for applying rules. Rules are only applied on or within the region defined by a Region.
A Region can be a line, a rectangle, an ellipse, or other types. It will first appear with a white border. A white border means that the Region does not have a rule assigned to it.
To assign a rule, select a Region by clicking on it and double-click on a rule in the rule window. If you click on a sub-rule, the parent rule will be assigned. The Region should turn red when assigned.
If you click on assigned (red) Regions, the corresponding rule should show up as selected in the rule tree (so you can find out which rule is assigned).
Z-Order is important for texture sub-rules. The bottommost Region is applied first, then the next, etc. "Lower" texture sub-rules are obscured by "Higher" sub-rules. To change the Z-Order of a Region, use the "bring forward" "move to back" etc. controls.
There are three basic types of Rules: Top-Level Rules, Texture Sub-Rules and Object Sub-Rules.
Top-Level Rules are basically placeholders for sub-rules. Note: NAME YOUR RULES WITH A UNIQUE NAME. Otherwise, when loading a layout, some objects may not be assigned to the right rule. The only value that can be changed in the Rule Properties window is the name of the rule.
Texture Sub-Rules define which textures are applied under which condition. Only the texture name can be changed (the texture value will be automatically updated), and the condition (See Rule Reference). Note that Region Z-Order is important for texture sub-rules.
Object Sub-Rules define which objects are applied under which condition. All properties may be changed, except the "value" field, which is automatically updated.
Rule Tree Context Menu
This menu can be used to manipulate Rules and sub-rules (note: there is no way at this time to change the order of the rules)
To change rule properties, select the rule or sub-rule. The Properties window will reflect the current values. Values may be edited, and set by pressing the "Set" button.
Rule properties
When a map is exported, the map points within each Region are evaluated against the sub-rule conditions. If the condition resolves to TRUE, that point will have a texture or object placed there. A condition recognizes the following keywords:
- NodeSlope: the slope in degrees of the map point being evaluated. May be negative
- NodeAbsSlope: the absolute slope in degrees of the map point being evaluated.
- NodeHeight: the height of the map point being evaluated, in logical values.
- RandomPercent: a random number between 1-100
The following operators are recognized:
- LT (lesser than, synonym: <)
- LE (lesser or equal, synonym: <=)
- EQ (equal, synonym: ==)
- NE (not equal, synonym: !=, <>)
- GE (greater or equal, synonym: >=)
- GT (greater than, synonym: >)
Expressions can be joined with AND (synonym: &&) and OR (synonym: ||)
Paranthesis should be used to define each expression.
Example:
INCORRECT: NodeAbsSlope LT 50 AND NodeHeight LT 500
CORRECT: (NodeAbsSlope LT 50) AND (NodeHeight LT 500)
The default condition is 1 (true, always apply)
Select File->Export Map
Choose the file name to Export to
The Export Settings dialog will appear: