[RELz] tes3cmd, a tool for editing TES3 plugins, and much mo

Post » Sun Aug 25, 2013 9:36 pm


What does that mean? If it means replacing all objects of a certain kind in the gameworld, I can do that with the CS already.
User avatar
Ben sutton
 
Posts: 3427
Joined: Sun Jun 10, 2007 4:01 am

Post » Sun Aug 25, 2013 9:23 am

The replacer in tes3cmd is more dynamic than the one built into the CS. The CS will replace all references in the master files in addition to the references in the specific plugin you may have loaded. tes3cmd allows you to separate the two by only making changes to the .esp, ignoring its master files. At least, that's what I have used it for. There may be other uses/features.

edit: grammar
User avatar
Reanan-Marie Olsen
 
Posts: 3386
Joined: Thu Mar 01, 2007 6:12 am

Post » Sun Aug 25, 2013 7:25 am

Adding to what Melchior said, it can also search and replace using partial ID ( meaning you can replace all items starting with ID, say "furn_xxx" ) and in multiple specific cells.
User avatar
jadie kell
 
Posts: 3497
Joined: Sat Jul 29, 2006 3:54 pm

Post » Sun Aug 25, 2013 11:50 am

Just curious, has anyone discovered a way to merge NPC inventory changes between two mods, yet?
User avatar
Ally Chimienti
 
Posts: 3409
Joined: Fri Jan 19, 2007 6:53 am

Post » Sun Aug 25, 2013 8:24 pm

I think I have a interesting tes3cmd script to share, no guarantee but it should help fixing annoying quests having the "quest finished" attribute not set (usually pre-Tribunal engine quests, but not only), they tend to clutter the Journal forever.
If someone is craz brave enough to experiment with a test setup and see what happens, it would be great

Morrowind\Data Files\fix_quest.pl perl script
Spoiler

# save this code to file: "fix_quest.pl"# run with command line:# tes3cmd modify --program-file fix_quest.pl myplugin.espuse strict;sub main {	my($tr) = @_; # tr = the record	my $ok = 0;	my $subtype = '';	my $last_tsr = '';	if (defined $CURRENT_DIAL) {		if ($CURRENT_DIAL =~ /^Journal/i) {			if ($tr->rectype eq 'INFO') { # only interested in INFO records				$ok = 0;				$last_tsr = '';				foreach my $tsr (@{$tr->{SL}}) { # tsr = the sub-record					$subtype = $tsr->subtype;					if ( $ok == 0 ) {						if ($subtype eq 'NNAM') {							if (defined $tsr->{next_id}) {								if (!$tsr->{next_id} > 0) {									#found empty next id									#print "\r\nfound empty next id\r\n";									$ok = 1;								}							}						}					}					elsif ( $ok == 1 ) {						if ($subtype eq 'DATA') {							#print "\r\nfound subtype DATA\r\n";							if (defined $tsr->{disposition}) {  # JournalIndex stored as disposition								#print "\r\nfound defined journal index\r\n";								if ($tsr->{disposition} >= 0) {									#found valid journal index									#print "\r\nfound valid journal index\r\n";									$ok = 2;								}							}						}					}					elsif ( $ok == 2 ) {						if ($subtype eq 'NAME') {							if (defined $tsr->{response}) {								#print "\r\nfound response\r\n";								if ( length($tsr->{response}) > 1) {									#found meaningful response									#print "\r\nfound meaningful response\r\n";									$last_tsr = $tsr;									$ok = 3;								}							}						}					}					elsif ( $ok == 3 ) {						if ( $subtype eq 'QSTF') {							#found valid quest finished marker, no need to process							#print "\r\nfound valid quest finished marker, no need to process\r\n";							$ok = 0;						}					}				}				if ( $ok == 3 ) {					$tr->append( INFO::QSTF->new({quest_finished=>1}) );					$tr->{_modified_} = 1; # tell tes3cmd we modified the record					# print "\r\n ".$last_tsr->{name}."\r\n";				}			}		}	}}


Morrowind\Data Files\tes3cmd_quest_finish_all.bat file to call Morrowind\Data Files\tes3cmd.exe.
A backup of changed files is saved in the Morrowind\Data Files\backup\ folder to revert back if needed
Spoiler
md backuptes3cmd.exe modify  --backup-dir ./backup --hide-backups --program-file fix_quest.pl --ignore-plugin "Morrowind.esm" --ignore-plugin "Tribunal.esm" --ignore-plugin "Bloodmoon.esm" *.es? > out.txtpauseout.txt


sample of my Morrowind\Data Files\out.txt changes log
Spoiler
MODIFIED RECORD:
Record: INFO "22416145552302315956" (Journal:_dwrv) Flags:0x0000 ()
INAM: ID:22416145552302315956
PNAM: Prev_ID:27166271003036611537
NNAM: Next_ID:
DATA: JournalIndex:20
NAME: Response:
I've jammed the machine which controls the water level and now the water has gone down.
QSTF: Quest_Finished
MODIFIED RECORD:
Record: INFO "2073414596726229945" (Journal:_kuli) Flags:0x0000 ()
INAM: ID:2073414596726229945
PNAM: Prev_ID:17823748599827764
NNAM: Next_ID:
DATA: JournalIndex:50
NAME: Response: Kuli thanked me for clearing his house of the magic bone.
QSTF: Quest_Finished
MODIFIED RECORD:
Record: INFO "463018767144864329" (Journal:_tg) Flags:0x0000 ()
INAM: ID:463018767144864329
PNAM: Prev_ID:163003496957530890
NNAM: Next_ID:
DATA: JournalIndex:100
NAME: Response: I failed the mission by killing Geki.
QSTF: Quest_Finished
MODIFIED RECORD:
Record: INFO "12321486282323194" (Journal:_gs) Flags:0x0000 ()
INAM: ID:12321486282323194
PNAM: Prev_ID:173034615153481647
NNAM: Next_ID:
DATA: JournalIndex:21
NAME: Response:
Johnny's movement seems to be effected by this chamber as well.
QSTF: Quest_Finished
Output saved in: "UG2PhaseC_v07b.esp"
Original backed up to: "./backup/UG2PhaseC_v07b.esp"


http://abitoftaste.altervista.org/morrowind/file/tes3cmd_modify_examples.zip
[EDIT]forum admins, the editor is really annoying, it screws code each time you update, please disable automatic replacement of symbols in code/spoiler updating
User avatar
victoria gillis
 
Posts: 3329
Joined: Wed Jan 10, 2007 7:50 pm

Post » Sun Aug 25, 2013 3:44 pm

the only workaround for this I know of is to edit my posts in say notepad, copy it all, select all in the actual post edit box and delete it, and then paste in the new edited post.
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am

Post » Sun Aug 25, 2013 7:11 pm

I've collected lots of mods over the years and figure I probably ought to clean them (please don't throw anything, just lazy). Reading the tes3cmd wiki, I had the following question. Does tes3cmd require a working MW game folder in order to run it or would a duplicate of just the "Data Files" folder with the various mods suffice?

Also, does tes3cmd have a feature to compress the cleaned mod (including whatever files it may have) so as to use it in tandem with Wrye Mash? Although I'm lazy about the cleaning, I regularly use WM with all the mods I use in my game.

User avatar
JR Cash
 
Posts: 3441
Joined: Tue Oct 02, 2007 12:59 pm

Previous

Return to III - Morrowind