ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

AICLEAN

From ModEnc
Jump to navigation Jump to search

AICLEAN is a kind of house-keeping script for Red Alert 2 and Yuri's Revenge mods, that focuses on removing duplicated code, unnecessary and/or orphaned objects, comments, and allows the merging of 'include' files used by some mod authors. It's meant to be a companion for AICHECK, and can create a good base from which to start modding, or can be used as a cleanup script just prior to releasing a new version of a mod. It is run via a batchfile on Windows, but can be run via commandline directly on Linux, and creates a clean.log file with the results of that examination. On windows the batchfile will automatically launch the clean.log, so make sure to associate log files with your preferred text editor.

Before using AICLEAN, all three INIs, rules(md).ini, art(md).ini, and ai(md).ini, have to be extracted to the game directory, where AICHECK files should also be extracted, with the correct read/write permissions. A copy of the TCL runtimes (version 8.3+) have to be installed, available through Activestate, link below.

To configure AICLEAN to run correctly, and read the right files, the aiclean.tcl will have to be edited to manually set the path for the game, and the specific filenames used by the mod. Pay close attention to the 'ra2dir' example path, TCL doesn't support backslash for path navigation, it uses the UNIX system of forwardslash. There are a few settings and toggles located within the aiclean.tcl that control its behaviour, including one where AI object names can be anonymized. Furthermore there is an external aiclean.cfg file to (optionally) edit, which contains settings specific to rules(md).ini sorting order.

Since AICLEAN is potentially destructive in what it does, there is an option within aiclean.tcl that will either rename the old INI files with a timestamp and generate new ones of the original name, or will create entirely new INI files with '(NEW)' in the name (e.g. rules(NEW).ini). There is no unsafe option.

AICLEAN does have good compatibility with Ares/Phobos, as it doesn't really make judgements about the content, just how it is structured. For error-checking there's AICHECK...

Links