I would like some advise on how to "Sanitize" a mod, some mods I have downloaded have strref numbers in items, spells,stores, and creatures. If I were only useing one or two mods it would not cause a problem. When you have a larger number of mods, the strref numbers conflict things already loaded, and you get overwrites.
So what I am doing is proofing the mods before loading them. Basicly deleting the strref numbers in items, spells,stores, and creatures and resetting them to (-1) or the genric strref for unknown description said item, dependent on what the tp2 is doing. How I have been doing this using Dltcp setup in a directory containing the data (and contents), override (empty), chiten.key and dialog.tlk of clean install. Pasting the various files out a mod into the empty override then manually editing each one. SLOW! SLOW! There has to be a better way!
I know that Weidu writes the various descriptions to the dialog.tlk went installing, so what I'm tring to do is write Sanitizer mod, cut the files to be cleaned out of whatever mod, paste them into the apropreate folder of the Sanitizer mod, run the setup installing them into the empty override, them paste them back into the mod. Below is the tp2 file I wrote it does not work, here is the debug report, I think I may need some sort of wildcard. eg(~Sanitize/itm/*.itm~) I tried this, and it did work either, produced the same debug result. Can I do this it like this or is the (see below) a better method ?
****************************************************************************
BACKUP ~Sanitize/backup~
AUTHOR ~5th_horseman~
BEGIN ~Sanitize Known Item Descriptions~
COPY ~Sanitize/itm/~ ~override~
SAY NAME1 ~<Not Available>~
SAY UNIDENTIFIED_DESC ~<Not Available>~
BEGIN ~Sanitize Unknown Item Descriptions~
COPY ~Sanitize/itm/~ ~override~
SAY NAME2 ~<Not Available>~
SAY DESC ~<Not Available>~
BEGIN ~Sanitize Spell Descriptions~
COPY ~Sanitize/spl/~ ~override~
SAY NAME1 ~<Not Available>~
SAY UNIDENTIFIED_DESC ~<Not Available>~
BEGIN ~Sanitize Creature Descriptions~
COPY ~Sanitize/cre/~ ~override~
SAY NAME1 ~<Not Available>~
SAY NAME2 ~<Not Available>~
BEGIN ~Sanitize Store Descriptions~
COPY ~Sanitize/sto/~ ~override~
SAY NAME2 ~<Not Available>~
****************************************************************************
[./Chitin.key] loaded, 590551 bytes
[./Chitin.key] 182 BIFFs, 41793 resources
[dialog.tlk] loaded, 8732560 bytes
[dialog.tlk] 74154 string entries
[dialog.tlk] claims to be writeable.
[dialog.tlk] claims to be a regular file.
[WeiDU.log] parsed
[SETUP-SANITIZE.TP2] parsed
This mod has 5 distinct optional components.
To save time, you can choose what to do with them at a high level rather
than being asked about each one.
What should be done with all components that are NOT YET installed?
nstall them, kip them, [A]sk about each one?
Install Component [Sanitize Known Item Descriptions]
[Y]es or [N]o or [Q]uit?
Skipping [Sanitize Known Item Descriptions]
Install Component [Sanitize Unknown Item Descriptions]
[Y]es or [N]o or [Q]uit?
Skipping [Sanitize Unknown Item Descriptions]
Install Component [Sanitize Spell Descriptions]
[Y]es or [N]o or [Q]uit?
Installing [Sanitize Spell Descriptions]
Copying and patching 1 file ...
ERROR: error loading [Sanitize/spl/]
Stopping installation because of error.
ERROR Installing [Sanitize Spell Descriptions], rolling back to previous state
[Sanitize/backup/2/UNSETSTR.2] SET_STRING uninstall info not found
WARNING: [Sanitize/backup/2/UNINSTALL.2] is a 0 byte file
[Sanitize/backup/2/UNINSTALL.2] loaded, 0 bytes
Will uninstall 0 files for [SETUP-SANITIZE.TP2] component 2.
Uninstalled 0 files for [SETUP-SANITIZE.TP2] component 2.
ERROR: Unix.Unix_error(20, "stat", "Sanitize/spl/")
PLEASE email the file SETUP-SANITIZE.DEBUG to 5th_horseman
Install Component [Sanitize Spell Descriptions]
[Y]es or [N]o or [Q]uit? Saving This Log:
WeiDU Timings
TP_Copy 0.000
parsing .tp2 files 0.000
load TLK 0.000
process_action 0.000
loading files 0.000
parsing .log files 0.000
tp2 uninstall 0.000
unmarshal KEY 0.050
unmarshal TLK 0.220
TOTAL 0.270
*******************************************************************************
I have seen mods that alter entire clases of items, in this case class restriction, unfortunitily I do not understand this form of patching as my programming skills are very limited, lets face it best I can is cut/paste something sombody else wrote, or follow detailed instructions. Can this type of patching do the job ? Please note I am using Dltcp and not NI (problems with java would not install) where can I get the required Hex numbers ?
//Long sword (extract from Vic's Mod tp2)
COPY_EXISTING_REGEXP ~.*\.itm~ ~override~
READ_BYTE "0x1c" "type"
WRITE_LONG 0x1e 0x00000000
WRITE_SHORT 0x29 00
WRITE_SHORT 0x2b 00
WRITE_SHORT 0x2d 00
WRITE_SHORT 0x2f 00
IF_EVAL ("%type%" = "0x14")