Mod Developer Tools

From TNG_Wiki
Jump to: navigation, search
Restricted Downloads of Mod Developer Tools are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account Restricted

Ambox notice.png Works only with TNGv10.0.3. Starting with TNGv 1010 the analyzer was included in the next verson (v10.1.0) of Mod Manager. The Syntax checker was dropped because the syntax for the next version of Mod Manager (included with TNGv1010) had changed somewhat and developers were not interested in it.
TNG 10.0.3

Mod Developer Tools
Summary Provides Tools for Mod Manager mod developers
Validation n/a
Mod Updated
Download link
TNG 10.0.3
Download stats Stats for Mod Developer Tools
Author(s) Rick Bisbee
Ken Roy
Homepage Mod Developer Tools (This page )
Mod Support Support for Mod_Developer_Tools
Contact Developer {{{mod_contact}}}
Latest Mod
Min TNG V 10.0.3
Max TNG V 10.0
Files modified
Related Mods


This package contains tools to assist in creating modifications (mods) to TNG features and functionality that use Mod Manager (MM) to install and uninstall them. The tools are intended for developers or testers who are familiar with the process of creating mods, and with Mod Manager syntax.

Mod Developer Tools are integrated into the MM screen and a tab is added to MM for each tool in the package.

Be aware that the language support files for this mod stand alone in the tools folder inside the TNG mods folder. There is no need to insert them into the TNG language files. For more information, see below.


There are currently two utilities included in the package -- a Mod Conflict Analyzer (tab Analyzer) and a Syntax Checker (tab Syntax).


Mod Conflict Analyzer

This tool lists all the TNG and other files on your site that are modified by Mod Manager configuration files in your mods folder. If you select one of these files from the left hand column, the names of all the MM configuration files that affect it are listed in the right column, each with an option to show the specific changes made.

When writing a new mod, the Analyzer will help you determine if your changes are in conflict with changes made by any other mod on your site, irregardless of whether they are installed or not.

The Analyzer is also useful in determining which mods will need to be reinstalled or reworked if you upgrade TNG or other affected files.



The graphic above shows the Analyzer examining TNG file admin_main.php for changes made by two mods: censusplus_v10.0.0.0b.cfg and private_flag_backup_v10.0.0.0.cfg. The second mod file has been expanded to show the target location in admin_main.php, and the code to be inserted there by the mod.

Syntax Check

The mod syntax checker is of greatest assistance during the actual development of a mod. If you have a monitor that allows you to show two pages side-by-side, you can edit the mod file on one, and instantly check the results on the other.

Mod Manager uses a series of tags that act as directives or delimiters, or which hold meta data about the mod. MM configuration files use a certain syntax to express how the developer wants files changed, copied or created. It uses that same syntax to remove the modifications and additions when requested.

In its default state it checks to see that the syntax is correct. If you use the Mod Manager editor to set the option to check everything, it looks at the entire mod configuration file and tests all the tags, files and content. Files are checked for accessibility and target code is check to see if it exists, or if it has already been modified. Problems are displayed on the screen using config file line numbers showing where corrections need to be made.

Because errors are by line number, there is no need to use comments in the mod configuration file to number sections for MM debugging. Mod files can be smaller and cleaner.



The above graphic shows a syntax check on mod admin_header_links_v9.0.0.1.cfg. Since there are no errors in the file, there is not much to see in the result, which shows the file is OK to install.

What Does OK Mean?

Line 5: %target languages/English-UTF8/cust_text.php OK

In line 5, OK means that the file exists and that it can be accessed (written).

Line 8: %location OK

In line 8, OK means the target code was found in the target file and the new code has not yet been inserted. This location is OK to install.

Status: OK

At the end of the listing, this means that the mod checks out OK and should install without problem.

Installing the Tools

To install the Mod Developer Tools, you must have a working installation of TNG v10.0.3 or later.

Download the tools zip-package from the TNGWiki (above), unpack it, and place all of its components (config file and folder) in your mods folder. Then go to your Mod Manager and install it just like any other mod. If it has installed correctly you should see the extra tabs at the top of all the MM pages.

To remove the developer tools, click on the Remove button in the Mod Manager List. If you want to remove it entirely from your system, click on the Delete button to remove the mod configuration file. You will have to manually remove the tools folder inside your mods directory.

Language Support

There are small language support files in the tools folder that you place inside the mods folder when you install the mod. We chose to keep them separate and not to use the mod to insert them into the master TNG language files. It is just easier to maintain them as separate file, buy mostly because it is very difficult to insert text into both ANSI and UTF-8 files from the same mod file -- the mod script can be one or the other character set, but not both. Except for English, the other files were created using Google Translate, fully understanding that some of the language may be stilted. If you would like to correct the files and send them to the author (UTF-8 version), he will include them in future packages.

Help Files

Currently, the help file is in English only. If any users want to translate it and send a copy of the UTF-8 version to the author, he will include ANSI/UTF-8 versions in future packages.

Revision History

Version Date Description
v10.0.3.1 1 Jul 2014
  • First release, available with TNGv10.0.3
v10.0.3.2 25 Aug 2014
  • Removes %parameter tag from syntax checking as it can have an infinite number of arguments separated by colons and/or CRLF


Thanks to Ken Roy for his encouragement, useful suggestions, testing and coding assistance.