Skip to content
larzm42 edited this page Feb 2, 2015 · 5 revisions

This page describes the basic features of dom4editor and how to create a mod.

Create a Mod

To create a new mod select the "New Mod..." option under the File menu or click the New Mod icon in the toolbar. Then fill in the dialog with a name, description and version number for your mod. When clicking OK, you will be asked for a file name to save the mod in. Thats it! You now have a new mod.

Add Content

You will now see a blank screen like this:

screenshot


You can either modify an existing object in the game or add new content. Let's modify an existing unit. To add modifications click on the Add... button. You will see this dialog:

screenshot


From here you can select the type of object you want to work with. Let's modify an existing monster in the game. So, choose monster from the list. Then you have two choices; Select Monster or New Monster. Select selects an existing monster, New will create a new monster. Leave Select chosen. Now there are two text entry fields to the right of that. When selecting a monster to modify you can either select it by name or id. If you don't remember the specific name or id you can press the Search button to the right of the text field you want to use. Lets select a monster by id so press the search button to the right of the id field. You get a dialog like this:

screenshot


Choose any monster you like from the list and hit OK. The correct field gets filled in and you can hit OK again to add it to your mod. Your object has now been added to the main screen. It will look something like this:

screenshot

Modify Content

As you can see I chose the Serpent Lord to modify. It shows up in the list of objects on the left and the details show up on the right. Every object you add will show up in this list. If the list starts getting long, you can filter what types of objects are displayed by choosing one from the "Show" dropdown. Also, you can search the list for an item by typing a term in the search box.

The details of the object are displayed on the left side of the screen. Most properties have a checkbox, then maybe a text entry or two depending on the property being modified. You will need to consult the modding manual for details on what the different properties control and what values they accept. A number of fields also have a value to the right of them in brackets. This is the default value for that property if you are modding an existing object. If you are creating an existing object there will be no defaults.

So, let's say we want the Serpent Lord to travel faster then it currently does. As you can see, the "mapmove" field has a default value of 2. To change this check the box next to mapmove and enter a new value. Like this:

screenshot


To verify that we have changed the mapmove of the Serpent Lord we can look at the source for our new mod. To see the source for the mod you can either select the "Source" tab at the bottom of the window, or, if you have a large mod and want to jump to a specific place, select an object in the table, right click "Go To Source". You will see source like this:

screenshot


You can make changes directly to the source or switch back to the details view.

Browsing a Mod

dom4editor is also useful for browsing existing mods to see what has changed. Here is an example of a mod loaded into the editor.

screenshot


I have selected the Manual of Water Breathing. As you can see shock resistance has been added to the item as well as the construction level requirement has gone from 4 to 6 (the default value of the construction level is next to the modded value). You can click on the changed object (filtering or searching as needed) to see what has changed and what the default values are.

Other Features

Hover Help

When on the main view hover the cursor over a keyword to be shown help text (from the modding manual) about that command.

screenshot


This can also be done in the text editor.

screenshot

Auto Complete

It's possible while typing in the editor to get autocomplete of keywords. Just press Ctrl-Space and a list of possible options will be shown. You can select from the list to complete the keyword.

screenshot

Syntax Errors

When there is an error in the structure of the mod, the error is underlined in the text editor (with popup help). Also, all errors will be displayed in the Problems view with double click taking you from the error name to the line of code in question. All errors also appear in the Problem View which can be opened from the tool bar.

screenshot