Before we look into the rules of mod writing, we first have to get an idea of what a mod is. In general a mod is nothing else than instructions like "look for this text line(s) in file X" and "replace it with this text line(s)" stored in a single ASCII text file. Mod files have the extension ".mod" and can have any name. The file format looks like HTML or XML (but it is NOT equal). You have several "tags" available which can surround something, just like brackets.
Example
<Mod info> This is a test and does nothing </Mod info>
However there is a big difference to XML and HTML: You are not allowed to write tags like this:
This does not work:
<Mod info>This is a test and does nothing</Mod info>
You have to put a linebreak after and before each tag!
Another thing you have to know is that some tags only allow one line! Please see the tag list for which tags are "multi-line" and which are not.
<Mod info>
This is an example mod to demonstrate the possibilities
of the mod format. Please note that this mod is NOT made to
be applied to anything. It's just an example!
</Mod info>
//////////////////////////////////////////////////////
Outside the brackets you can write what you want! The BoardMod will ignore these lines...
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Currently there is a very important limitation you have to know about: It is only possible to search for complete lines, not for single words! Always keep this in mind when writing your mods. This is very important when you want to search for some lines which start with spaces or tabs. Leaving them out in the <search for> tag will make your mod not working.
Example
<search for> for i := 1 to 10 do begin b := b * z + 1; </search for>
is NOT equal to
<search for> for i := 1 to 10 do begin b * z + 1; </search for>
Another limitation is that empty <replace> tags are not allowed. So for example the code to remove a line does not look like this:
This does not work
<replace> </replace>
or
<replace>
</replace>
Instead use this code
<search for> i := i * i + 1; i := i - 1; </search for>
<replace> i := i * i + 1; </replace>
The reason for this limitation is to keep all steps "undoable". This is required to provide uninstall ability.
The .mod filename should be equal to the mod name (<id> tag) to prevent confusion and to make sure that the filename is unique. In addition there are some additional standarts we use for our mods at YaBB to keep everything "uniform": spaces are replaced by "_" (underscore). If the mod version is not 1.0 then the version should be added to the filename too but without the dots. Do this to avoid problems when people have multiple versions of the mod in the same folder. Look at the example to get an idea of it.
Example
If the modname is "The Great Mod" and its version is "2.55a" then the filename would be "the_great_mod_255a.mod".
If you compress your mod as a .zip file (e.g. if your mod comes with some additional files), you should give your .zip file the same name as the .mod file.
Example
If you pack "the_great_mod_255a.mod", the .zip name would be "the_great_mod_255a.zip".
This is a very important tag, its content will be used in the mod database and people have to identify the mod by this name so please pay attention to it. The general rules are:
Keep the name short but not too short, using up to 5 words is fine. Please give the mod a descriptive name! Names like "MEGA Super Mod by www.xy.com!!!" won't help anyone.
This is THE tag so take yourself some time on this one.
First you should write a short description of the mod. Make it as informative as possible since people normaly only read the first few lines when browsing through the mod list.
After this description a short list of features is a good thing.
If your mod comes with additional files, make sure to mention this and give instructions on how to install the mod completely (what files to upload where, CHMOD, ASCII or Bin...).
If your mod comes with a readme.txt, mention this uppercase. Some people will miss those information otherwise.
Don't forget that this tag does only support one line so only use one. If there are multiple authors then list them with commas. If you release a new version of a mod which you did not originally create, please leave the author tag alone and put your your stuff at the end of the description tag (<Mod info>) instead.
BTW: Never release a new version of a mod which you did not originally create, ask the original author first. Otherwise you may violate his copyright!
Same thing as with the <author> tag: only one line is supported. Leave the author's original address in there and put yours in the description if you are not the original author. Don't use commas here since BoardMod will use this as link.
Tip: You can also put your email address in here if you don't have a webpage.