This version features compatibility with BGEE's tlks and localised biffs. To achieve this, one of the corner stones of WeiDU has been turned inside out and upside down, broken down and built back up. Hopefully nothing was lost in the process.
Beta location.
How it works:
Firstly, --tlkin, --tlkout and their f-versions are kind of, sort of deprecated. I can't think of a legitimate use-case and it's easy to shoot yourself in the foot with them. They (mostly) remain functional, however.
WeiDU has the notion of standard tlks. On the old editions, these are ./dialog.tlk and optionally ./dialogf.tlk. On the EEs, these are every lang/X/dialog.tlk and lang/X/dialogf.tlk for which lang/X/dialog.tlk exists. If --tlkin is not given, WeiDU only considers the standard tlks. If --tlkin is given, that tlk is considered, as well. The considered tlks are all checked for regularness and writeability.
WeiDU has the notion of active tlks. On the old editions, these are ./dialog.tlk and optionally ./dialogf.tlk, or the tlks from --tlkin. On the EEs, if --use-lang was given, WeiDU uses the tlks in that directory as the active tlks. Otherwise, WeiDU checks the EE's user directory [1] for the file weidu.conf. If this file exists, WeiDU attempts to read the path to the active tlk from it. If --tlkin or --ftlkin was given, these are instead used as the active tlk. Otherwise, or if no path was obtained from weidu.conf, if WeiDU is not running interactively, WeiDU fails with an error. If WeiDU is running interactively, the user is prompted to select the active TLKs as one of the first steps of the installation (after choosing mod language, before being prompted about the readme). If --use-lang was given or the user was prompted for which tlks to use, the file weidu.conf is saved with the result.
During mod installation, strings are read from the active tlks and the uninstallation information for each component includes the path to the active tlk, even if --tlkout refers to another tlk. This means that you can redirect the output to another location with --tlkout, but there are --tlkouts for which WeiDU can't uninstall the changes. Using --tlkout will not screw up your input tlk on uninstallation.
When components are uninstalled, strings are uninstalled to the path in the uninstallation information, even if these paths refer to a tlk other than the currently active one. If tlk path uninstallation information is missing and its the old editions, WeiDU will uninstall strings from the active tlks (./dialog.tlk and ./dialogf.tlk). If its the EEs, the user will be asked which X in lang/X/ for which tlks should be loaded and strings uninstalled from.
If any of non-active tlks were changed, these tlks are written to disk. If the active tlk was changed and --tlkout was not given, the contents of the active tlk is written to its regular path. If --tlkout was given, the contents of the active tlk is written to that path instead.
This beta should be backwards compatible with both hardlinks to dialog.tlk (though the link is no longer necessary and will not be used) and batch files that give --tlkin and --tlkout (though both --tlkin and --tlkout are now unnecessary).
I'm also looking for feedback for the following two prompts:
WeiDU asks which language the user wants to install to:
"This game is available in multiple languages. WeiDU will install mods to a single of those languages. Mods will be available for that language and that language alone. If you switch to another language, you need to reinstall your mods.
Choose which language you wish to install this mod to. Your choice will be saved and reused in the future. This choice is saved to the file weidu.conf, located among your other user files."
WeiDU asks which language the mod should be uninstalled from:
"This game is available in multiple languages, but WeiDU does not know which language to uninstall this mod from.
Choose which language this mod should be uninstalled from. This should be the same as the language you installed the mod to. Your choice will be used until WeiDU exits but will not be remembered."
Do they make sense and are they understandable? Can they be improved upon? If you show them to your computer-illiterate friend, does he or she stand an outside chance of divining the meaning of these arcane symbols?
On the EEs, WeiDU will additionally load biffs from the selected lang/X/data folder, or from lang/en_us/data if there are no biffs in lang/X/data.
This beta does not fix the lexer warnings from using regexps in BAF and possibly D files, but the plan is to fix that before the stable version.
I haven't heard from Nifft lately, so I don't have an OS X build.
1. On Windows and OS X, this is the directory where the EE's save directory is located. On Linux, this is the EE's root game directory (because I don't have Wine installed, or the inclination to get BGEE working under Wine).