Version 185: * TP2_AUTHOR variable for bigg. * COUNT_2DA_ROWS added for Diamond. * Bunch of devSin changes: * ADD_KIT bugfix. * Un-SET_STRING message removed. * !, &, |, &&, ||, << and >> do just what they do in C. * >>=, <<=, ~, ^^ added. * == works as an equality test for integers. * PATCH_RANDOM_SEED added. * RANDOM_SEED -- if you pass a non-integer it now does a self-init Version 184: * --traify is back to the old behavior for ~~ empty strings. Don't use those! * STRING_MATCHES_REGEXP (= STRING_COMPARE_REGEXP) and STRING_CONTAINS_REGEXP added. * STRING_SET (_RANGE) tra files now take %variables%. * WeiDU TP2 actions like "COMPILE myDir" should no longer lock that directory "forever". * Exponentiation added: a ** b == a^b a ** (b c) == a^(b/c) Version 183: * Fixed a bug with --reinstall and mods with many components. * WRITE_BYTE offset negativeNumber should now work correctly. * --noautoupdatemsg may now actually work. * COMPILE_D_TO_DLG will no longer leave FOO.DLG.DLG lying around. * Minor --traify bugfix involving empty strings with sounds. * ADD_TRANS_ACTION now handles @123 and whatnot. * STRING_SET_RANGE added. Version 182: * EXTEND_*_REGEXP bug fixed. Thanks, bigg. * <<<<<<<< now substitutes variables in the filename. * STRING_SET now takes a list of arguments, which may make things faster if you have a big TRA file and you're using USING. * --ask-every makes WeiDU behave as if ASK_EVERY_COMPONENT were present. * EVALUATE_BUFFER made generic as a patch action and a modifier for strings in patch expressions or assignments. Thus SPRINT indirect = "%y%" SET EVALUATE_BUFFER "%indirect%" = 55 sets y to 55, and so on. This removes the need for EVALUATE_BUFFER as a one-off modifier to EXTEND_TOP, etc. See manual. * optional SET allowed before +=, etc. That SET is required if you want to use EVALUATE_BUFFER on the destination variable name. Version 181: * SET_2DA_ENTRY_LATER won't issue misleading warnings with non-int values. Also respects the required-column-count correctly. * Rastor's ICT2 tutorial added. * You may now put EVALUATE_BUFFER after TP2 EXTEND_* and TP2 variables in the source BAF will be evaluated. * "var += value" is now a valid TP2 patch statement (_not_ an "expression" or "value"). Also -= *= /= |= &=. * --tlk-cmp now compares sound resource names as well as text strings. * --trbify and .TRB files added. Do not use. devSin owes docs. Version 180: * SNPRINT bugfix? * SET_2DA_ENTRY_LATER and SET_2DA_ENTRIES_NOW added. Some subset of { bigg, CamDawg, devSin } will provide documentation later. * SUBCOMPONENT + DESIGNATED bug fixed. Thanks, CamDawg. Version 179: * SNPRINT (like snprintf()) added for string truncation. * INSERT_FILE, WRITE_FILE take variables. * WeiDU should now work when compiled on 64-bit machines. Thanks, fca. * Variable handling bug fixed. Thanks, bigg. * More performance improvements. Thanks, bigg, devSin, Cam, etc. A random "complicated" mod goes from 16 seconds to 10 seconds. * WeiDU return values are now documented. Loosely, 0 = success, non-zero = failure. * Initial support for extracting data paths from Mac baldur.ini files. More help needed. Version 178: * ADD_CRE_ITEM bugfix. Thanks, devSin. * TP2 --reinstall added. Works like --install but only for already-installed components. Auto-selects last-used language if possible. * Some performance enhancements. Turns out that WeiDU was spending quite a bit of time setting and evaluating variables. For example, a mod that crawls over every effect in *.SPL now takes 8.7 seconds instead of 91 seconds. You will probably only see a difference on mods that have non-trivial patch processing (lots of READ_*, WRITE_*, PATCH_IF, etc.). For example, Ascension (all comps, English) shows no improvement, going from 2.58s (warm cache) to 2.92s (warm cache) -- loosely in the noise. Ease-Of-Use (all components, warm cache) improves from 18.3s to 6.12s. For some reason, I was sure that BUT_ONLY_IF_IT_CHANGES was the culprit. In fact, as best as I can measure, BUT_ONLY is free. Anyway, let me know if your mod starts behaving strangely or suddenly takes forever to install (please use wall-clock or OS time to measure this, since WeiDU's "*.DEBUG" reporting changed between this version and the last version so the self-reported numbers can't be compared). Version 177: * LOOKUP_IDS_SYMBOL_OF_INT documentation change. * ADD_CRE_ITEM multi-slot-equip fixed. * READ_SSHORT added. * --toplevel added for emitting DLG top-level states only. Version 176: * D Action APPEND_EARLY added. Works just like APPEND, but the states are added early and can be the target for I_C_T (or whatnot). Please test this and let me know if there are problems. * The TP2 Action APPEND now evaluates variables in the string to be appended. * TP2 EXTEND_TOP and EXTEND_BOTTOM evaluate variables in their filename arguments. * REPLACE_TEXTUALLY now does variable substitution for both arguments. * LOOKUP_IDS_SYMBOL_OF_INT added. * COPY_RANDOM syntax documented. Version 175: * SET_2DA_ENTRY now evaluates WeiDU variables in strings. * ADD_STORE_ITEM now takes variables for the item and "LIMITED"/"UNLIMITED" flags. Thanks, devSin. * INNER_PATCH_FILE added. * READ_STRREF added. * SPRINT added. * COPY ~%variable%~ ~dest~ now works. If you really have a file named %a%, make sure that you either catch it with globbing/regexps or that your TP2 file does not use a variable named "a". * --out, --textout, --textapp, --dout unified to --out (and --append) * (A != B) added for (NOT (A = B)) * Precedence and associativity for values fixed up a bit. Notably, 3*4+5 < 100 + 1 AND myvar = 22 Actually does what you expect: (((3 * 4) + 5) < (100 + 1)) AND (myvar = 22) As many of you noticed, I had the comparisons (<, =, ...) binding too tightly and a bunch of other things (e.g., bitwise ops) all had the same precendence. We now mimic C/C++. Of course, you can stlll put in extra parens if you're paranoid. * Values and Predicates, which used to be separate, are now one big group that contains everything that used to be in either one. Thus myvar = 3 + (FILE_CONTAINS "ROGER.CRE" "CRE") = 4 Results in 1 being assigned to myvar. * The WeiDU grammar is now down to 8 shift/reduce conflicts (from more than one hundred), all of which spring from using "X = 55" as shorthand for "SET X = 55". Loosely, these two situations are ambiguous with only one token of lookahead: COPY ~a~ ~b~ ~c~ = 5 and: COPY ~a~ ~b~ ~c~ ~d~ * WEIDU_ARCH and WEIDU_OS built-in variables added. * WeiDU almost includes free beer for CamDawg, but he was a few minutes too late. Version 174: * APPEND_FILE added. * Segfault involving out-of-order DESIGNATEDs fixed. Thanks, devSin. * "Foo component X not found" message elided. * Globbing now re-enabled by default on OSX (don't know why it was disabled ...). * Added --logapp. * ADD_CRE_ITEM can now take multiple possible item slots. * Added FILE_CONTAINS_EVALUATED, PATCH_PRINT. * Supported: "PATCH_IF foo BEGIN yada END ELSE PATCH_IF bar ..." * SAY_EVALUATED added. * WRITE_BYTE, SAY, etc., now also do bounds-checks. * READ_ASCII takes an optional size argument. * INNER_ACTION and INNER_PATCH added. * You can now specify state numbers for DLG->D on the command line. * INSTALL_BY_DEFAULT component flag added. Version 173: * Added READ_BYTE (etc.) ELSE clause for error handling. * Added --noselfupdatemsg * Massive documenting binge: all command line options are now documented. I would appreciate it if people would check over these. * ADD_KIT tutorial URL changed. * WRITE_*ASCII now takes an option "required size" argument (pads with NULs if you are too small). * Added GLOB explanation. * Added --tlkcmp-strings for al17. Version 172: * If you pass --yes, it will not ask you to press enter at the end. * You may now use ~~~~~ (instead of ~, " or %) to delimit a string. This should hopefully help with traifying TLK files with strings that contain all three of my previous faves. Special thanks to kenteam for his help in finding this bug. Version 171: * SOURCE_SIZE variable now set automatically as well. Version 170: * NO_LOG_RECORD module component flag added. * ";" parse problem with FOR loops fixed. * --debug-value switch added. Good luck, devSin. * WeiDU now does explicit bounds-checks on READ_BYTE/SHORT/LONG/ASCII. Thanks, devSin. * PORTRAIT_SMALL, PORTRAIT_LARGE constants added. * If you pass --uninstall, it will not ask you to enter at the end of the processing. * Empty Action Warning no longer displayed since we don't save empty actions. Version 169: * 0-byte files now handled correctly when uninstalling. * x=5 can be used instead of SET x=5, but DO NOT do "x=y=4" * patch_expression: FOR (x=0; x<5; x=x+1) BEGIN blah blah END * Errors while COMPILEing will now actually abort a tp2 component installation. * ADD_CRE_ITEM tutorial moved to right place. * ALLOW_MISSING / FILE_EXISTS_IN_GAME fixup. * Added Rastor's customization tutorial. * DO Actions that do not contain a letter or a number are removed. * --uninstall now automatically picks the Language based on WeiDU.log (if it exists and is in range, etc.) * You can now inline files with the TP2 Action <<<<<<<< Version 168: * IF and UNLESS now really take regexps, as the docs claim. * REPLACE_TEXTUALLY, REPLACE as well. * WeiDU will copy 0-byte files again. * STRING_SET takes USING. * RANDOM(lb ub) and RANDOM_SEED added. * STRING_COMPARE_CASE added. * DESIGNATED module flag added. Version 167: * Added string concatenation. * Added DECOMPILE_DLG_TO_D and COMPILE_D_TO_DLG. * Added SOURCE_RES and DEST_RES variables. Version 166: * Removed auto () message. Whoops! * "Many Components" + "Subcomponents" = "Skipping Too Much" bug fixed, I hope. * PATCH_IF now works. Thanks: CamDawg, bigg. * Smoketest: --transitive //from bugfix * Smoketest: --full-from does a two-pass printout to catch backward references and get correct //from comments. It is turned on automatically by --transitive. * SirLancelot: --traify-tlk can be combined with --traify# * Added SUB_COMPONENT tutorial by Cam. * I moved to a new laptop, so the "default" WeiDU is now built with cygwin+mingw instead of cygwin+msvc. This shouldn't introduce any problems, but let me know if it does (e.g., with viewing, or slashes and backslashes, or globbing). Version 165: * "ERROR_LOCATING_RESOURCE" error messages will now explain what WeiDU thought it was doing when it was loading that resource. * If WeiDU runs into an error processing a D action it will now tell you which of your D files it was working on. * The "missing THEN causes WeiDU to die" bug should be fixed. It was, in fact, a bug in ocaml's parser. Please try out removing all of your "then"s (or whatever) and let me know if you can encounter the problem now. If you can, send me a test file. * With the help of Idobek and Jason Compton, I believe that I have fixed the FORBID_FILE bug, aka the "Keto Double Interjection" bug. * Also fixed a minor-buglet with the module name printing in WeiDU.log -- if there was an error during the install it would sometimes fail to get the module names and yell about it (although everything worked fine). Now it gets the names and does not yell. * Added igi's auto-update-all. * Idobek/Grim subcomponents added. Version 164: * REQUIRE_PREDICATE evil warning messages suppressed. Thanks, igi and Reaper99. * "Error clearing *.IDS" message, which served no purpose, has been removed. * ADD_TRANS_ACTION added for Darios, Meria, etc. * PATCH_IF added for bigg. * You can use FOO instead of %FOO% to get the value of the variable FOO, so long as it is unambiguous. This work in "patch expressions" only -- in other places (e.g., in WRITE_EVALUATED_ASCII) you still need the %%s. Version 163: * ALLOW_MISSING now actually works for copying files (like it should have!). Thanks, CamDawg. * SET_2DA_ENTRY bug with setting the last entry on a line fixed. Thanks, igi. * Japh's ADD_CRE_ITEM and REMOVE_KNOWN_SPELL patches added. Thanks, Japh. Version 162: * REQUIRE_PREDICATE component flag added. * --autotp command documentation removed since command does not exist. * encrypted IDS and 2DA files now work correctly with COPY_EXISTING. Thanks, igi. * --continue, which continues despite TP2 action errors, was added for Vlad. * --traify now works on %strings%. Thanks, SConrad. * SET_2DA_ENTRY is now dramatically faster (work that used to take 7 seconds now takes 1.4). The patch command also no longer "pretty-prints" the resulting 2da file. * Added Japh's ADD_MAP_NOTE patch command. * Added Japh's ADD_KNOWN_SPELL patch command. You rule, Japh! * Added INTERJECT_COPY_TRANS2. Someone else should document it. Version 161: * AT_INTERACTIVE_EXIT will now work successfully on components that were "temporarily uninstalled" and then "permanently uninstalled" at the user's request. * WeiDU.log now includes component names as comments. Blah. Version 160: * Added COMPILE_BAF_TO_BCS and DECOMPILE_BCS_TO_BAF as "Patch" actions. * Added REPLACE_EVALUATE because Sim wanted it. Version 159: * Special thanks to Avenger for sending me a bunch of PST files so that I could fix more of this stuff. * We can now decompile PST BCS files with point-triggers, like: NearLocation(Myself,[1086.1803],20) * We can now compile PST BAF files with point-triggers. * We can now decompile PST actions like: GlobalSetGlobal("Previous_Area","GLOBAL","Current_Area","GLOBAL") But note that you need "--script-style PST" (or a PST Chitin.key) when decompiling to get this right. * @-100 = "Foo" now actually works. Thanks, Rastor. Version 158: * --script-style and SCRIPT_STYLE added: BG, IWD2, PST. Controls how BAF files are read in and how BAF and BCS files are written out. Generally autodetected. I need someone to send me all of PST's IDS files before I can improve or correct PST support. I would also like an example of a PST _trigger_ that uses a non-zero numbers pair (e.g., [55,66]). * Added --remove-biff. See example above. Don't use it. * %LANGUAGE% variable is now set automatically to the language directory name (e.g., "american" not "American English"). See AT_EXIT above for language-specific README viewing. * Some of WeiDU's "hard-coded" strings (e.g., "[Y]es or [N]o or [Q]uit?") can now be replaced by TRA files. See examples\prompts.tra . Could someone writeup some docs for this? Version 157: * ("foo" STRING_COMPARE "%bar%") evaluates to ZERO if and only if its two arguments are EQUAL (and have the same length) after variable substition. If they are not equal it returns 1 or -1 just like C's strcmp() function. The two arguments must be strings. You may use STR_CMP for STRING_COMPARE. Icelus wanted this. * Updated the documentation on division. 11 / 6 = 1 in WeiDU, not 1.8 or 2 or somesuch. * REPLACE_TRIGGER_TEXT_REGEXP, REPLACE_ACTION_TEXT_REGEXP, REPLACE_ACTION_TEXT_PROCESS_REGEXP. * INSERT_FILE, WRITE_FILE added. * --noautoupdate may actually work now. Version 156: * BUT_ONLY_IF_IT_CHANGES bugfix? Version 155: * Added Gwen's "--transitive" for viewing banters. * Added FORBID_COMPONENT. * REQUIRE_FILE and FORBID_FILE are now handled in a "preprocessing" step. Version 154: * Added BUT_ONLY_IF_IT_CHANGES. * SET_2DA_ENTRY now takes a patchexp. * Fixed a bug where READ patch actions were evaluated out-of-order in some cases. * Note: There is a KNOWN BUG involving --traify crashing on certain CHAIN constructors. Sorry. We're working on it. Version 153: * Bugfix involving ALLOW_MISSING in mod A not being honored when mod B tries to reinstall A's component. * STRING_SET and "forced string references" now uninstall automatically with the standard WeiDU rollback. How many times do I have to tell you guys not to use this feature? Since no one is listening to me in that regard, you can all thank JRM for convincing me to code this up. * If you pass AT_INTERACTIVE_UNINSTALL (and friends) a single argument that is a .TP2 file, WeiDU will enqueue that TP2 file for you and run it when it is done with the current one (and any others you have previously enqueued). This prevents you from having to guess the executable to invoke or whatnot, and is apparently handu for people with voodoo uninstall procedures. Note that you can make it so that A.TP2 calls B.TP2 and B.TP2 calls A.TP2 and the user loops forever. Don't. JRM again. Version 152: * EXTEND_TOP / _BOTTOM now automatically handle target scripts that are not there. Version 151: * CHITIN.KEY.FOO will no longer be found automatically. * Strings can now be %abc% as well as "abc" and ~abc~. This will apparently help with Big5 (Chinese) translations. Version 150: * Biffs made by WeiDU now write out the correct (hopefully) file resource location and tis resource location values. Thanks Avenger and Horrid. * APPLY_BCS_PATCH_OR_COPY added to make Ease easier. * More accurate output on "compiling X files" statements. Version 149: * Auto-update only on win32 ... * Read in triggers with 3 integer parameters from BAF files correctly now. Thanks, Avenger. * EXTEND_TOP, EXTEND_BOTTOM now handle missing arguments more gracefully (assume empty script). Version 148: * Unknown transition strings are now written out as -1, not 0. * --make-biff should no longer make read-only biffs. Thanks, C Bisson. * Added Idobek's WHILE loop and SET_2DA_ENTRY tutorials. Thanks! * Added CamDawg's bitwise operator tutorial. Thanks! * Some Mac niceities by Loriel. * REPLAC_BCS_BLOCK can take BAF file arguments. Idobek is lazy. * TP2 Flag parsing was messed up -- thanks, Idobek. Version 147: * Fred S. Richardson patches: MinGW compiler support, HD0: .INI path support (apparently handy for people with multiple BG2 installs). * WeiDU now supports dialog.tlk of basically arbitrary size. TLK files above 16 megs load more slowly (surprise). Version 146: * ADD_STATE_TRIGGER now takes an optional transition list. CBisson wanted it. * ADD_STORE_ITEM and ADD_GAME_NPC docs added by Japh. * BAND, BOR, BNOT, BXOR, BLSL, BASR, BLSR -- Smoketest's expression bitwise operators added. Version 145: * Better error messages in --tcmp. * First attempt at handling both CHITIN.KEY and chitin.key (unix). Version 144: * Added Fred S. Richardson's ADD_PROJECTILE. Thanks, Fred! * Fixed a bug that was causing "SAY NAME1 ~Foo~" to fail because NAME1 would not be evaluated. Version 143: * WeiDU now requires OCaml 3.07. * WeiDU now reloads KIT.IDS (and all other IDS files) after an ADD_KIT. Version 142: * ADD_KIT now adds to KIT.IDS. * Wow, I somehow left a "failwith foo" in the middle of the trigger list parsing code. Sigh! Thanks, Today's Newbie. Version 141: * --make-biff OSX fix broke --make-biff on all other platforms. Whoops. Fixed. Thanks, C Bisson. * COPY_EXISTING_REGEXP can now take GLOB as a modifier. Apparently everyone wanted this feature. * SOURCE_DIRECTORY, SOURCE_FILESPEC, SOURCE_FILE, DEST_DIRECTORY, DEST_FILESPEC, DEST_FILE are now all set on every single file that is copied. Darious wanted this feature. Version 140: * REQUIRE_COMPONENT bugfix. Thanks, Fred! Version 139: * INTERJECT may now use chain-style epilogues. * --make-biff may well work on OSX. Version 138: * WRITE_EVALUATED_ASCII added. Version 137: * Too many open files bug fixed. * Added some #defines to make xdiff compile more often. * Added Japh's ADD_STORE_ITEM and ADD_GAME_NPC commands. * Auto-Update process creation code now hand-tweaked on win32 platforms for bonus win98 compatibility. Special thanks to Kish for testing. Version 136: * Auto-Update now uses WeiDU versions. Let's try this once more. Version 135: * Fixed (hopefully!) an auto-update bug that was preventing Win98/WinME from using WeiDU. Auto-update has been revamped a bit: after an auto-update WeiDU will quit and you will have to click on Setup-Foo again (there will be a big message telling you to do this). Windows prevents me from doing it for you, sorry. Version 134: * WeiDU auto-updating now works even if the running WeiDU is not the newest WeiDU. However, all WeiDU mods should upgrade to at least 134. Get the word out. * WeiDU.log format changes undone for now ... but they (or the next syntax change) will eventually come back. Compton begged for a reprieve, and he shall have it, but it's hardly permanent. Version 133: * Fixed a problem with --traify FOO.BAF. Thanks, Kismet. * Fixed a problem in --traify-tlk with ~s in strings. * Fixed a problem with --make-tlk and a stack overflow. * Include Japh's STO automating code. * "setup-foo.exe this.tp2" runs "this.tp2" and not "setup-foo.tp2". * Added "component flags" in TP2 files. Version 132: * Added Fred's Cygwin/GCC patch. * Added Fred's BCS-Diff magic. Presumably Fred will continue to bat 1.000 by sending us some documentation. Look for a better multi-romance patch in the future. Version 131: * Fixed a problem with decompiling some IWD2 scripts. Thanks, Avenger. * "THEN" keywords inside CHAINs are now truly optional. * Fixed a problem with --traify and partially tra'd files. Jason here, Jason there. Version 130: * Weimorph changes. * WeiDU.log now includes the component name rather than just the number (when we have that info). This may help the people who seem to be posting that file to boards and whatnot. Notably, it helps me! * Fixed a CHAIN bug involving duplicate labels. Thanks, Grim Squeaker. Version 129: * weimorph fixes: duplicate effects (again), poison, regeneration, biffing, cre-in-name, more "not in dialogue" game crashes, brown bears with crossbows, etc. * Fred Richardson has coded up the REPLACE_BCS_BLOCK_REGEXP tp2 command. Docs to follow. * Fred Richardson's bugfix for REPLACE with WEIGHTs is included. * Massive weimorph changes. Version 128: * We now give an error on multiple JOURNALs per DLG transition. * IWG1 updates for Japh. Version 127: * WeiMorph changes for Japh and the boys. No real WeiDU changes. Version 126: * You may now --traify BAF files. * IDS files are now only loaded once each. * Better handling of actions that take two "concatenation string" arguments, like Torment's IncrementGlobalOnce("Morte_Zombie_1","GLOBAL","Law","GLOBAL",-1) Thanks, Luke Carroll. WeiDU can now compile DMORTE.D from PST. Version 125: * Added the "FILE_MD5 filename md5sum" predicate for Fred Richardson. * Documented the UNINSTALL tp2 action. Don't use it. Version 124: * Fixed a globbing definition problem in the OSX arch stuff. Thanks, Devon. * Added Unix globbing support. Thanks again to Devon Smith. Note that care should be taken to make sure your globbing works on multiple platforms -- try to use lower-case letters, for example. * Fixed a --traify problem with ~male~ ~female~ strings. Thanks, Jason and Bhasbuto. * --traify-tlk will no longer print the female text if it is the same as the male text. * Refactor WeiMorph a bit to make Japh's BG1->BG2 quest a bit easier. Version 123: * Fixed a bug in SAY (actually, offset in general) handling that was causing UNIDENTIFIED_DESC to have the DESC part replaced by its value instead of causing the entire thing to be replaced by its value. Thanks: Timothy Hoffman, Kish and Jason. Version 123: * Added three Japheth tutorials (values, read_byte, make-biff). Thanks! * Fixed a bug where variables were not being substituted properly in COPY destinations. * NOTE! You cannot uninstall correctly from something like: COPY GLOB ~save\**\worldmap.wmp~ ~%SOURCE_DIRECTORY%~ Only the last one will correctly uninstall. This is because WeiDU was not designed with the notion that their might be multiple files with the same name copied to different locations. Coding uninstall support for this would be boring, annoying and error-prone. If you want it, consider coding it up yourself or somehow getting you and your five friends to convince me that the fate of the world hangs in the balance. Version 122: * Added --extract-kits. Use it like this: mkdir kitmod weidu --extract-kits 1 --textout Setup-Kitmod.tp2 --out kitmod It will extract all of the kits (and their weapon and proficiency information and their special abilities ...) with ID >= 1 from KITLIST.2DA. Search the resulting TP2 file and look for "FIX ME" -- if it occurs, WeiDU was not able to find some information (or it was not in the original game) and you should think about providing it. You can run the TP2 file through --traify later if you want. All required resources (ability files, etc.) will be put in the 'kitmod' directory. * Fixed a bug in COPY GLOB that was corrupting the OCAML runtime and causing WeiDU to hang. Version 121: * COPY sets the %SOURCE_DIRECTORY% variable. * --debug-assign flag allows you to watch the values of TP2 variables change. * Fixed a bug where WHILE loops were not processing READ commands. Thanks, Japh. * Added "SET_2DA_ENTRY row col req_col value" as a patch. Someone wanted this. Version 120: * Added "exp ? exp : exp" -- the expression-valued if. * Added "SET variable = exp". * Added "WHILE exp BEGIN patch list END". * Case-insensitivity for actionoverride. * Added GLOB as an option to COPY for Japh. Do not use this non-portable feature. Version 119: * Empty TLK files now get a default entry 0 . Thanks, Talen. * --tlkmerge (and general file loading) bug fixed. Thanks, Dyara. * WeiDU will now notice if dialog.tlk and dialogf.tlk have different lengths and it will do something about it. Thanks, Dyara. Version 118: * Jason's brief transition syntax is now accepted: + optional_trigger + reply_text do_journal_list next * + is now accepted as a synonym for GOTO in a 'next' block. * CHAIN/CHAIN3 blocks can now end with END transition_list * SAY can now take "expressions" for offsets. * You may now put a + after COPY (existing/regexp) to mean "do not make a backup of this file and don't uninstall it later". Do not use this feature. * Noted in the docs that the THEN BEGIN keywords in a state decl * are optional and that the THEN part of a transition is optional. * Massive documentation update to cover new syntax that has been creeping in. * PRINT ~Variable foo is %foo%.~ does what you would expect. Version 117: * --automate NAME1 fix. Thanks, Thorfinn and others. * READ_*, WRITE_*, INSERT_BYTES, DELETE_BYTES, etc., may now all take "expressions" for their offsets and their values (where that makes sense). * BAF files may now use hex values (like 0x34). Version 116: * Various portability fixes by Ras. * Fixed a bug with INTERJECT_COPY_TRANS. Thanks, Elanor. * R, I tried to send you some email and it bounced. Send me some more email with a working address. Version 115: * Better error handling for out-of-range INTERJECT_COPY_TRANS. Thanks, Sim! * Yet another non-Setup-Foo.exe bugfix. This one should allow uninstallation. Thanks, GB. * CHAIN3 conditional fixing. Thanks, Jason. * Added REPLACE_ACTION_TEXT_PROCESS. Good luck, Ras. Version 114: * Fixed a problem with --biff-get and encrypted files. * --trans now looks inside DLG actions (like EraseJournalEntry()) and gives translation strings for them as well. * --biff-name bug with invalid strrefs fixed. Thanks, Sqweek. * Fixed a hideous bug in v113 that was causing WeiDU to overwrite TP2 files with itself. Version 113: * We warn if you add strings but don't specify --tlkout. Thanks, AvengerTeamBG. * Better support for GB's multiple-directory TP2 scheme. However, the only truly supported method is to have all of your TP2 files in the main game directory and run Setup-Foo. * Updated up the CHAIN epilogue in the documented grammar. Version 112: * Allow ! in tokens (but not as the lead character). * --nocomm disables comments in produced BAF files. Thanks, AvengerTeamBG. Version 111: * Added ALWAYS blocks for TP2 files. Version 110: * D-file actions and triggers are now replaced with their converted form. So you can say DO ~EraseJournalEntry(@1000)~ and have it work in the end. Thanks, Triangle. * TP2 logging is now case insensitive. * Added --make-tlk and --traify-tlk command-line arguments. * Extracting from BIFFs will no longer cause WeiDU to segfault if your KEY and BIFF files do not match up. * Fixed a problem with extracting biff resources that was causing COPY_EXISTING "this.cre" to fail. Thanks, Edsel Sabulao. Version 109: * Fixed on BCS decompilation probs. Thanks, Dyara. * --biff-get and BCS decompiling no longer stop after the first error. * --biff-get can now get arbitrarily large files (e.g., AR1000.TIS). I officially *do not care* for at least a few weeks if there is some random file hiding somewhere that WeiDU still cannot extract. Use WinBiff. Version 108: * Allow things like LastSeenBy("foo") in scripts. * Added support for biff creation. Use the --make-biff option and pass it a directory argument. All files in that directory will be made into a buff, CHITIN.KEY will be updated. Version 107: * Fixed a bug where the temp file for a big compressed biff would not be removed if weidu choked because the biff was way too big (or any other reason). * Actually, the entire handling of compressed biffs has been changed. Now we only do on-demand decompression. For example, the time to extract AR0602.WED drops from 9.6 seconds to 0.3 on my machine. No more temporary files at all. * Now faster when something adds a large number of new strings to dialog.tlk. * Fixed our handling of WEIGHTs (again!). Thanks, Dyara. Everyone, let me know if you find any flaws in the new handling. Version 106: * IDENTIFIED_DESC now works as an offset. * Added SOLVED_JOURNAL and UNSOLVED_JOURNAL keywords. Thanks, Avenger. Version 105: * Fix a WEIGHT problem. Thanks, GB. * Added --min and --max which work with --tlkcmp and --string. Fixed a minor bug in --tlkcmp. Thanks Harden Coonor. Version 104: * One last sanity check for auto-update: ensure that when we copy A over B we set B's timestamp to that of A. * You may say "COMPILE ~mymod/big-folder-of-scripts~" and every D or BAF file in that folder will get compiled. This works just like giving COPY a directory. Version 103: * Added ASK_EVERY_COMPONENT TP2 flag for Jason. Put up near AUTO_TRA. Version 102: * Added READ_BYTE, etc. WRITE_BYTE and friends can now use compound expressions (possibly involving variables). See IWD2-Ease. * Added COPY_RANDOM. * Added the --biff-get-rest option, which basically applies --biff-get to all the rest of the command line arguments. Version 101: * Unknown IDS entries (like ToB spells in SoA's SPELL.IDS) now default to 0. This was causing Sola installing problems. Version 100: * Fixed a key path-separator problem. Thanks, Devon. * COMPILE ~foo.baf~ will now uninstall correctly. Thanks, Japh. Version 99: * CHAIN "IF"s are now checked for validity. * Setup-Foo will now copy itself over all older Setup-Bar's in the same directory. * You can now COMPILE and EXTEND BAF files. See Setup-Solaufein.tp2. * BAF files can now take ~String Refs~ and @130 trans refs. Example: DisplayStringHead(Myself,~Flame Arrow~) DisplayString("Sola",@144) Version 98: * Fixed an [ANYONE] problem in BCS->BAF world. Thanks, Dyara. * Fixed a problem where re-installing a mod with an error in the new version would give you "yes/no/uninstall" instead of "yes/no". Thanks, Quitch. Version 97: * Added support for reading in some broken IDW DLG files (they come with out-of-range triggers/actions). * Added support for reading in some broken BCS files (they omit a non-optional action parameter). * ALLOW_MISSING is no longer case sensitive. Thanks, Carl Grenthe. * Fixed a lexer error involving unterminated // comments. Thanks, Moonfruit. * We now handle cd paths like "C:\CD2;E:\Other\CD2". * AUTO_TRA files are now associated only with their (single) associated D files and not with any other files. Thanks, Dyara and Quitch. * Fixed "See(LastSeenBy(Nearest([EVILCUTOFF])))" -> "See(LastSeenBy(Nearest)([EVILCUTOFF]))" problem. Thanks, Dyara. Version 96: * Parse errors and warnings are now logged. * XOR-encrypted 2DA files are now decrypted. Previously only IDS files were decrypted. Version 95: * We now verify D-file transition conditions. They were skipped before. * Invalid actions and trigger lists in D files are now only WARNINGS, as they should have been. * Location information for actions and trigger lists in D files is now much more accurate. Still not perfect, but at least it's on the right line. * BCS->BAF decompilation no longer throws up a bunch of warnings about "this file not found". * Added Japheth's R_C_T tutorial. * In BAF-land, typing things like "SeE(MySelF)" instead of "See(Myself)" is now only a warning. * If you say something like "LastSeenBy()" you are now given an explicit warning to use "LastSeenBy(Myself)" instead. The first one sometimes gets weird treatment by the game engine. * Fixed a case bug in APPENDI. Thanks, Quitch. * We are throwing a surprise 50th birthday party for my mother today. Wish us luck. Version 94: * Fixed a problem with I_C_T reversing transition lists. Thanks for making it perfectly clear, Jason. Version 93: * Fixed a problem with IDS files that have too much whitespace. Version 92: * Fixed a decompiler bug where the wrong trigger (e.g., HaveSpellRES instead of HaveSpell) might be printed. * WeiDU now checks actions and triggers in D files. * Documentation is no longer "too wide" for easy viewing. Thanks to Tapio Kivikkola for pointing this out. * Roland has taken up the "compile WeiDU for Mac users" mantle. Thanks! * Fixed a problem with CHAIN forgetting some actions. Thanks, Quitch. * CHAIN3 now supports weights for its intial condition. Version 91: * WeiDU is now a BAF -> BCS compiler. Just pass BAF files as arguments. BCS files will be created in teh current directory (or use --out). Again, let me know if we mis-compile something. Future work: allowing D-style string references in BAF files, etc. * WeiDU now reads all the .INI files in your game directory and looks for lines of the form CD1:=C:\My\Path. * New Uberchain tutorial by Jason. Version 90: * Fixed a problem where SETUP-FOO didn't work. Version 89: * Added Japeth's tutorials. * --tcmp no longer dies on an invalid file. Thanks, Falk! * WeiDU will now decrypt those annoying encrypted IDS files when extracting them from BIFFs. * WeiDU is now a BCS -> BAF decompiler. Just pass BCS files as arguments. BAF files will be created in the current directory (or you can use --out). I consider NI to be the "reference" decompiler. Let me know if you find a script where WeiDU and NI disagree on something that is not a comment, a MYAREA or an "ar1234". * You can now give WeiDU command-line arguments after seeing the options list. Version 88: * EXTEND_TOP_REGEXP and EXTEND_BOTTOM_REGEXP TP2 actions added. Will the person who wanted this submit some docs? * --automate now handles AREs * You may now say !NUMBER ~Hello~ (or !NUMBER @44 or whatnot) in a D file instead of ~Hello~ to *FORCE* the string ~Hello~ to overwrite whatever was already in strref NUMBER in dialog.tlk * --forceify option added. It behaves like --traify. So you might say: weidu --forceify my.d --dout new.d The created D file will be just like the old one, except that all of the strings in it will become forced strings with their current strref. No, I do not understand why you would want this either. But some people do. Version 87: * Yada yada, more prep to get ready for the tactics mod. Version 86: * Much nicer handling of mods with more than 4 components. * Added the UNINSTALL TP2 action to allow one mod component (say, the archer kit in a new tactics mod) to uninstall another (say, the old version of the archer kit in the sola mod). Version 85: * Fixed a bug where --automate was missing name offsets at 0xC (the identified name for ITMs, etc). Rerun --automate if you use it to make sure you aren't missing anything. * Added some --automate docs based on Rene Heroux's suggestions. Version 83-84: * Fixed a bug in "interject" that was the wrong number of parameters to be passed to "Global()" and was putting triggers (like InParty("Valen")) in the action slot. Sigh! Sigh! Version 82: * Setup-Foo.exe now dies if both Setup-Foo.tp2 and Foo.tp2 are not present. * --automate dir option added. Throw it at a directory of ITM/SPL/CRE files (say, "mymod/itm"), it will spit out a TP2 file for you. Example use: C:\> weidu --automate foo/itm --textapp Setup-Foo.tp2 * Special thanks to Victoria, who will surely be famous at some point. Let me know when you've updated your CHAIN tutorial and I will link to it. Version 81: * CHAIN/CHAIN3 changes: + You may now specify an initial condition, a la: CHAIN IF ~Global("MyValygarBanter","GLOBAL",0)~ THEN BVALYGA foo "Valygar says Hello." END BVALYGA 50 + You may end with "EXIT" instead of "END FILE LABEL". + You may end with "COPY_TRANS FILE LABEL" instead of "END FILE LABEL". * CHAIN/CHAIN3/INTERJECT/I_C_T changes: + You may include DO actions after spoken text: CHAIN BVALYGA foo "I shall smite thee!" DO ~SetGlobal("ValySmite","GLOBAL",1)~ == BVICONI "But not me, rivvil! I am magic resistant." EXIT + If you are a true masochist, you may use DO and IF at the same time here: CHAIN BVALYGA foo "I shall smite thee!" DO ~SetGlobal("ValySmite","GLOBAL",1)~ == BKELDOR IF ~IsValidForPartyDialogue("Keldorn")~ THEN "I shall prevent you from smiting anyone." DO ~SetGlobal("KeldornPreventsSmiting","GLOBAL",1)~ EXIT * Special thanks to "Blue" for making the tutorial that suggested these changes. See examples/chain-banter.d for the tutorial example. Version 80: * Handle empty BCS files in EXTEND_TOP/BOTTOM. Version 79: * The current directory is no longer a search location. Compton wanted this, yell if it messes you up. Version 78: * Fix a small typo noted by Jason Compton that caused all non-TIS files to be loaded incorrectly and all TIS files except the first to be loaded incorrectly. Version 77: * Compressed BIFFs (sometimes called BIFCs) are now supported. Version 76: * Also look in GAME/CDx/Data/ instead of just GAME/Data for BIFFs. Version 75: * TRA files with errors are no longer held open. * TIS files can now be extracted correctly. Special thanks to Ghreyfain for providing enough data files to debug this problem. Turns out that BIFF files store special TIS tables that are used only for TIS resources, so they must be handled as a special case. Version 74: * Pulled COPY_EXISTING_REGEXP out of COPY_EXISTING. Little backwards compat bug, sorry. Version 73: * COPY_EXISTING source files can now take regular expressions. * Fixed a bug where a D file with a parse error would be held open by WeiDU. This bug reported by Quitch. * WeiDU works with Icewind Dale 2. Version 71-72: * New slightly spiffier cross-referenced docs. * SET_STRING can now take @translations. Version 70: * New traify docs by compton. Fixed pizza example. * Unify CHAIN/CHAIN3 docs. * --traify works on TP2 files. Use --dout and --traify# as before. Version 69: * In a state declaration, IF ~StateTrig()~ THEN BEGIN label, the THEN and BEGIN tokens are optional. * In a transition, IF ~TransTrig()~ THEN ..., the THEN token is optional. * Abbreviated .D syntax: INTERJECT_COPY_TRANS can be I_C_T, etc. as per Compton's suggestions. * INTERJECT_COPY_TRANS now does the copy-trans bit on all of the interjections, not just the last one. The copy_trans bit comes above your interjections, so it should still work like it worked before in all cases where it worked before. Sigh. Version 68: * Fixed a bug where saying --uninstall on a mod that had any uninstalled components would put you in an infinite loop. Version 67: * Fixed a bug where temporarily uninstalled components would be handled poorly when you wanted to re-install them, blah, I can't even describe this bug. Anyway, it caused (at least) at lot of errors like "Unix.Stat(solarom/uninstall/1/uninstall.1)" but it didn't seem to actually hurt anything. Still, it marked a conceptual flaw in my understanding of what was going on. * The --tlkcmp command now produces TP2 STRING_SETs with @translation references and a TRA file that fills those in. Version 66: * This time we're really sure about that Quitch bug. :-) See test\quitch\quitch.tp2 for a way of reproducing the failure. It used to die (as Quitch reported) but now it succeeds. If this fixes it, the problem was much worse than I thought: the D-file action list could get "duplicated" (or at least, not deleted) when an error happened. Version 65: * Another attempt at fixing that bug Quitch reported. :-) Version 64: * Fix a bug noticed by Quitch where the internal DLG state was not being cleared after an (un)successful install. This meant that if you had two D files with "BEGIN foo" either in two separate components or in the same component that you tried to re-install it would fail. This could also explain some errors people have been reporting about "multiple install"-like effects. * Complain EARLY if the output dialog.tlk file is read-only or a directory or something. Version 63: * CHAIN replaced by CHAIN3 internall (but you can still use CHAIN). * --traify now emits the TRA things in the same order as they appear in your original D file. This makes --traify slower. Deal. * --traify# option allows you to specify a starting offset for the created translation strings. Version 62: * tlkcmp docs by JC added. * Added "FILE_EXISTS_IN_GAME" predicate, which is true if the file is in EITHER the biffs OR the override directory. * --traify option added. weidu --traify my.d --dout new.d Will make new.d which is just like my.d except that all game strings now reference TRA strings in new.tra. Documentation of this feature will (we hope) be provided by our favorite mind-reading freelance journalist. Version 61: * Added "--tlkcmp-to" and "--tlkcmp-from" for Jason (or something). * Added "ACTION_IF pred THEN BEGIN actions END" as a tp2 action * Added FILE_EXISTS, FILE_SIZE, FILE_CONTAINS, AND, OR, NOT as tp2 predicates. * Added FAIL and PRINT as tp2 actions. Version 60: * Possible paths are no long displayed, since that was confusing users (no, really). * Added the "--biff-name X" option for "--biff-str" and "--biff-type" listings. A typical use would be something like weidu --biff-name 8 --biff-type CRE --biff-str SW1H to print the names of all creatures that have one-handed swords. Version 59: * Registry thing really this time, but if this doesn't fix it I don't know what's going on. Version 58: * Fixed a registry path bug. * Added --transref string to have --trans emit string refs. * Added Compton's new instructcions on COPY_TRANS and INTERJECT. Version 57: * Fixed a bug in the handling of COMPILE-USING TRA files when you do not have a LANGUAGE keyword in your TP2 file. Such TRA files are no longer ignored. I never noticed this myself because all of my mods have LANGUAGEs. Version 56: * Say AT_EXIT "VIEW this" instead of AT_EXIT "notepad this". VIEW at the beginning of a shell command will be replaced by something appropriate for the user/architecture (notepad, mac osx viewer, whatever). * Added INTERJECT_COPY_TRANS, which does just what you would expect if you already understand the tersely-documented INTERJECT and COPY_TRANS actions. :-) Compton, some docs? :-) Version 55: * Added INTERJECT action for even easier banter. Now we are truly meddling with forces we were not meant to know! Muhaha! * Replace whitespace handling in DLG files to avoid messing up CharName("Drizzt Do'Urden",Player1) in state 57 of c6drizz1.dlg. Version 54: * AUTO_TRA bugfix. D files should now really get the matching TRA file. Version 53: * Fix a bug with "--yes" and failed installations. * Added CHAIN3 directive to support branching in chained dialogues. This was recently used in the Improved Ilyich mod -- compare the new compact presentation to what was done for the Eclipse guys. Version 52: * Allow constraints on COPY. You may now say COPY src dst // multiple src-dst pairs OK patch_list constraint_list // "IF", "UNLESS", "IF_SIZE_IS" * IF_SIZE_IS added as a constraint. * See examples/copyif.tp2. Version 51: * Make WeiDU unix friendly for a friend who would like to compile it. * Add a --nogame option for people who would like to test it out but do not have any Infinity Engine games. * Unify slash and backslash handling. Version 50: * Reading from BIFF files of any size is now supported. Note that an individual file within a BIFF must still be <= 16777000 bytes. * More verbose error messages in a few places. Version 49: * Pause the option list. * You can now say STRING_SET ~Hello~ ~Hola Boy~ ~Hola Girl~ [HOLA] to change every ~Hello~ string in DIALOG.TLK to that new one. The old STRING_SET 345 syntax still works. Have fun, Compton. * --biff-get can now take regular expressions * If we die in the middle of a TP2 installation then we uninstall all of the files copied so far, restoring things to the clean pre-attempted-install state. Version 48: * Added --dcmp-to and --dcmp-from options to automatically spit out REPLACE-diffs between DLG files. Version 47: * Added REPLACE_ACTION_TEXT and REPLACE_TRIGGER_TEXT as D actions. Go Jason! Version 46: * Added REPLACE_BCS_BLOCK, INSERT_BYTES and DELETE_BYTES patch actions. * Added --cmp-to and --cmp-from for simple diffing. * Fixed a bug where copying FOO.EXT to folder1 and also folder2 would create incorrect backup information: only folder1\FOO.EXT would get uninstalled. Version 45: * Fixed a bug in REPLACE_TEXTUALLY (etc.) that was causing it to not match a whole bunch of strings. Version 44: * Better handling of syntax changes in TP2 files (when one mod tries to uninstall another). * FORBID_FILE added. Version 43: * ADD_KIT now takes some ToB parameters (High-Level ability abbreviation and starting equipment). The starting equipment was very tricky to get right, since you can't just append a column, you have to explicitly set column X (which may or may not be an append). * Compton's multisay and chain2 tutorial included! Version 42: * Convert / to \ in AT_EXIT-style commands. * Fixed a bug in APPEND_COL that was causing it to never append anything. :-) Version 41: * Added WRITE_ASCII (cf. WRITE_LONG) for writing in BCS script names and ITMs and whatnot. * Fixed MKDIR so that it actually makes directories. * Add AT_INTERACTIVE_UNINSTALL. * Fixed an "tetris uninstall" bug. * We can list all of the effects in a SPL or ITM. Version 40: * WeiDU now keeps a log of all installed WeiDU mods and does the "tetris uninstall" automatically, then puts back all temporarily-uninstalled mods. * Added AT_INTERACTIVE_EXIT so that you can avoid spamming the user with your readme file whenever your mod happens to be randomly uninstalled. Version 39: * Allow patches after EXTEND_TOP, EXTEND_BOTTOM for Michael. * Added MKDIR as a TP2 action. * Added REQUIRE_FILE as a TP2 action. * Added REPLACE_SAY as a D action. * Added REPLACE_STATE_TRIGGER as a D action. * Added SET_WEIGHT as a D action. * ADD_STATE_TRIGGER, ADD_TRANS_TRIGGER and REPLACE_STATE_TRIGGER may now operate on lists of states. Just put the extra states after the trigger. * EXTEND_TOP and EXTEND_BOTTOM may now operate on lists of states. Put the extra states before the transition list. * Perhaps some kind soul could write some docs about these new features? Version 38: * Switch : to / in BIFF path names for Mac-VPC compat. * Added SET_STRING for Ghrey. Version 36-7: * Added REPLACE_TEXTUALLY * Really fix Polish TLK handling this time. When the TLK string length is 0, sometimes the offset is a big negative number. Version 35: * Added ADD_MUSIC * Added %VARIABLES% that are replaced by the kit number or music number from ADD_KIT or ADD_MUSIC. * More robust TLK handling (handle possible error with DIALOG.TLK from Polish version of Ascension?). Version 34: * Fixed a bug in CHAIN where the filename after == would be reported as "not found" even if it was present. Thanks Michael! * Added APPEND_COL as a TP2 option. * Added COPY_EXISTING, WRITE_BYTE, WRITE_SHORT, WRITE_LONG. * Missing TRA files are no longer fatal errors. Having an undefined string reference (e.g., @55) is, however. * Missing files at uninstall-time are no longer fatal errors. * Michael Lyashenko tutorial included. Version 33: * Minor profiling and algorithmic enhancements mean that WeiDU is now at least twice as fast as it was before when compiling D files. The "please be patient" notice is pretty much unnecessary. * Added a cheap menu option because I was getting tired of saying "No" to all three thousand of the options in the Sola mod. Unfortunately, DOS doesn't seem to like color. * Added ADD_KIT as a TP2 option. See mymod.tp2 for details. Version 32: * Added an optional position to EXTEND_{TOP,BOTTOM} in .D files. Version 31: * Fixed a bug where Multi-say states would forget their WEIGHT Version 30: * Really process COPY_TRANS, this time for sure. :-) Version 28: * Really process COPY_TRANS. Sigh. Verison 29: * Really stay silent about saving DLGs. Version 27: * Sort transitions triggers in trans-trig-table order when loading. (under the assumption that transitions run from the bottom up in trans-trig-table order, so we should write them out that way in order to preserve the semantics) * COPY_TRANS processed before all other actions. Version 26: * Handle state trigger weighting. Special thanks to Jason Compton and Ghreyfain for doing the research. * Log OR print "[FOO.DLG] created" but don't do both. * Added AT_UNINSTALL Version 25: * Now delay "successfully installed" until dialog.tlk has been saved. Version 23-24: * Incorporate Jason's README suggestions. Thanks a bundle! * Add support for IWD. * Convert multiple newlines to the right format when compiling and decompiling. Version 22: * Replace [\r\n]+ in raw-text (triggers, actions) with "\r\n". This should help people who were getting doubled new-lines. Version 21: * Search the Registry for the game path * Handle overwriting read-only files Version 14-20: * --biff-get now ignores override/ * After a TP error we reload the translation file, so no more weird strings during install * SETUP-FOO.EXE implies a search for FOO.TP2 * Added COPY_TRANS (thanks, JC) * Added AUTO_TRA (thanks, Quitch) Version 13: * Change TP to TP2 after a reported conflict with the Sola mod. Version 12: * The dawn of recorded history. * Fixed an idempotence problem with the Un-Ininstall algorithm. * Fixed a translation problem with multiple packages in a TP file. * Allow multiple TRA files for one LANGUAGE in a TP file. * Add the AT_EXIT command.