[RELz] tes3cmd, a small tool for modifying TES3 plugins

Post » Mon Aug 23, 2010 11:53 pm

I've put out a new version: tes3cmd-0.37g-2010.07.10.7z
http://code.google.com/p/mlox/downloads/list

This experimental version can merge leveled lists with the tes3cmd multipatch command. See tes3cmd help multipatch for details. My algorithm is slightly different from the one used in Wrye Mash.

Use at your own risk, of course, this is a release for people interested in testing new stuff.

Still working on more cleanup, testing and new features ...
User avatar
Phoenix Draven
 
Posts: 3443
Joined: Thu Jun 29, 2006 3:50 am

Post » Mon Aug 23, 2010 10:11 pm

I tried the new version. Leveled list merging works really well.

Thanks!
User avatar
Elina
 
Posts: 3411
Joined: Wed Jun 21, 2006 10:09 pm

Post » Mon Aug 23, 2010 1:26 pm

I tried the new version. Leveled list merging works really well.

Thanks for the feedback.

You'll see minor differences between the tes3cmd leveled list merger and "Mashed Lists.esp". I'll try to write up a full explanation sometime, but basically tes3cmd and Mash handle duplicated items in leveled lists a little differently, tes3cmd tries to preserve the original number of entries a given item may have in the list, while Mash may change the number of entries.

I'm also considering adding variations of the merging algorithm so that no single plugin can "swamp" the leveled list with its own items.
User avatar
April D. F
 
Posts: 3346
Joined: Wed Mar 21, 2007 8:41 pm

Post » Tue Aug 24, 2010 2:17 am

Thanks for the feedback.

You'll see minor differences between the tes3cmd leveled list merger and "Mashed Lists.esp". I'll try to write up a full explanation sometime, but basically tes3cmd and Mash handle duplicated items in leveled lists a little differently, tes3cmd tries to preserve the original number of entries a given item may have in the list, while Mash may change the number of entries.

I'm also considering adding variations of the merging algorithm so that no single plugin can "swamp" the leveled list with its own items.


Yes I saw the difference. Mash merged 30 different LEVI entries and tes3cmd 80. Now the only thing missing is a Merged Objects replacement :)
User avatar
Silencio
 
Posts: 3442
Joined: Sun Mar 18, 2007 11:30 pm

Post » Mon Aug 23, 2010 2:19 pm

Wow, this keeps getting more impressive - can't wait for the final release.
User avatar
Nicole Coucopoulos
 
Posts: 3484
Joined: Fri Feb 23, 2007 4:09 am

Post » Mon Aug 23, 2010 10:55 pm

^^" *cough* So, I may have gotten this mixed up with that new object merger program someone /else/ was making. ^^"
User avatar
Stefanny Cardona
 
Posts: 3352
Joined: Tue Dec 19, 2006 8:08 pm

Post » Mon Aug 23, 2010 10:22 pm

@john.moonsugar

I can see you are working on the Merge Objects function. I wish you good luck with that. I am sure it isn't easy :)
User avatar
phillip crookes
 
Posts: 3420
Joined: Wed Jun 27, 2007 1:39 pm

Post » Tue Aug 24, 2010 12:39 am

I can see you are working on the Merge Objects function. I wish you good luck with that. I am sure it isn't easy :)

Actually, I'm not quite there yet. I've been working on a complete rewrite of the internals, which were a bit scruffy. It's coming along nicely, if I can just make friends with Perl's reference counting. I'll probably do a release based on the rewrite in the near future, and then start working on more features, like merging objects.
User avatar
Sophie Payne
 
Posts: 3377
Joined: Thu Dec 07, 2006 6:49 am

Post » Mon Aug 23, 2010 4:45 pm

Actually, I'm not quite there yet. I've been working on a complete rewrite of the internals, which were a bit scruffy. It's coming along nicely, if I can just make friends with Perl's reference counting. I'll probably do a release based on the rewrite in the near future, and then start working on more features, like merging objects.


It's still a lot of work nonetheless. And yes, Perl can be a little tricky but CPAN alone makes it one of the best scripting languages.
User avatar
Latino HeaT
 
Posts: 3402
Joined: Thu Nov 08, 2007 6:21 pm

Post » Tue Aug 24, 2010 3:19 am

It's still a lot of work nonetheless. And yes, Perl can be a little tricky but CPAN alone makes it one of the best scripting languages.

Oh, I've been a happy user since Perl 4 days, and it's one of my favorite scripting languages because it is generally so flexible and speedy. But let's be honest, reference counting is stone-age. (I may yet rewrite it in Ocaml :))
User avatar
Rudi Carter
 
Posts: 3365
Joined: Fri Sep 01, 2006 11:09 pm

Post » Tue Aug 24, 2010 2:37 am

I've put out a new version: tes3cmd-0.37h-2010.07.22.7z:
http://code.google.com/p/mlox/downloads/list

This new version features a new record parser that is much more flexible under the covers, and it is more complete in terms of translating various fields symbolically, so you see more names instead of numbers that are indexes into some array stashed somewhere you don't know about.

The "multipatch" feature which includes merged leveled lists is looking pretty good. There is also a "fixit" command that cleans all plugins, makes a multipatch, and synchronizes plugin headers to masters.

The "dump" command is handy for converting a plugin to an easy to read text file, which makes some problems easier to figure out.

The "modify" command has been rewritten and is pretty powerful. If anyone has any requests for batch processing of plugins, let me know, and I'll see if I can add how to do it to the documentation. Here's a simple example of how to create a little patch plugin from the current documentation:
# Problem: Aleanne's clothing mods do not have restocking inventory# Solution: create a small patch to change the counts for inventory containers#   to negative numbers so they will be restocking.# Step 0: confirm the problem, showing the non-negative counts:tes3cmd dump --type cont ale_clothing_v?.esp# Step 1: Create the patch file ale_patch.esp containing just the container records:tes3cmd dump --type cont --raw-with-header ale_patch.esp ale_clothing_v?.esp# Step 2: Change all the count fields for the containers in Aleanne's Clothing to -3 (for restocking wares)tes3cmd modify --type cont --run "$R->set({f=>'Count'}, -3)" ale_patch.esp


I've done some testing, but please still consider this alpha until I release the final 0.38 version, which should be stable. Even though tes3cmd does it's best to make sure it always does backups for you and never overwrite things, it's always a good idea to back things up on your own.
User avatar
Scott Clemmons
 
Posts: 3333
Joined: Sun Sep 16, 2007 5:35 pm

Post » Tue Aug 24, 2010 2:40 am

Great!

Thank you for your hard work. This release of tes3cmd looks very promising.

EDIT:

A small error after I used fixit:
Use of uninitialized value $count{"LEVC"} in concatenation (.) or string at script/tes3cmd line 5110.

User avatar
Len swann
 
Posts: 3466
Joined: Mon Jun 18, 2007 5:02 pm

Post » Mon Aug 23, 2010 2:27 pm

A small error after I used fixit:

Thanks for taking the plunge. I hope to make fixit as useful as TESTOOL's "Just Fix It" button, just safer and improved, if possible. The one big thing it's missing is merging objects, but hopefully I'll be able to get around to that sometime (I've actually been saying this for 2 years now, but I really mean it :)). I'm currently planning to put merged objects, a savegame cleaner, and a simple GUI, if possible, in release 0.40. There's still time to get feature requests in for 0.38 though.

The uninitiialzed value warning you got should now be fixed in 0.37i, which I just uploaded. I have strict warnings enabled, at least for these development releases, and in this case the warning just meant there were no leveled creature merges to be done, let me know if you feel that is not correct for your current active plugins.

I also forgot to to mark the plugin modified when cleaning WHGT/AMBI, so that's fixed too in 0.37i too. Oops.

The road goes ever on and on ...
User avatar
Danielle Brown
 
Posts: 3380
Joined: Wed Sep 27, 2006 6:03 am

Post » Mon Aug 23, 2010 6:37 pm

Thanks for taking the plunge. I hope to make fixit as useful as TESTOOL's "Just Fix It" button, just safer and improved, if possible.

It's already better. Nearly every Testool function is bugged.

(I've actually been saying this for 2 years now, but I really mean it :)). I'm currently planning to put merged objects, a savegame cleaner, and a simple GUI, if possible, in release 0.40. There's still time to get feature requests in for 0.38 though.


I am looking forward to it. The only good savegame cleaner is Wrye Mash right now and it's not compatible with Linux. If only fglrx wasn't the worst driver in existence, but this is another story.

The uninitiialzed value warning you got should now be fixed in 0.37i, which I just uploaded. I have strict warnings enabled, at least for these development releases, and in this case the warning just meant there were no leveled creature merges to be done, let me know if you feel that is not correct for your current active plugins.

Thanks. The message vanished and the Leveled Lists are correct as far as I can see.
User avatar
joannARRGH
 
Posts: 3431
Joined: Mon Mar 05, 2007 6:09 am

Post » Tue Aug 24, 2010 2:11 am

two minor "bugs":

Normal users will probably be mostly interested in the "clean", "multipatch",
and "headers --synchronize" commands, which for convenience are all rolled
into the "fixit" command. The other commands, like "dump", "modify", and
"delete" will mostly appeal to modders.

the command is called header not headers.

Also --synchronize doesn't support -R. I need to rename the ~1 files to the original names.
User avatar
JERMAINE VIDAURRI
 
Posts: 3382
Joined: Tue Dec 04, 2007 9:06 am

Post » Mon Aug 23, 2010 3:43 pm

the command is called header not headers.

Thanks, currently fixed in subversion, will be in next release.

Also --synchronize doesn't support -R. I need to rename the ~1 files to the original names.

I'm not sure I'm understanding this one. The "~" files are backups. So if you do "tes3cmd header --synchronize foo.esp", foo.esp is modified and "foo~1.esp" would be the first backup of the original unmodified plugin. If you modify foo.esp again, you'll get a "foo~2.esp" which is a backup of foo.esp from just prior to the modification. You only need to rename "~" files to the original name when you want to undo a modification. This has always been left to the user to do manually, and -R (which is now --replace for the "clean" command) does not do this.

I'll add a better description of how backup files work to the documentation.

I'm also probably going to implement an option so that backups can be automatically stashed away, either in "Data Files/tes3cmd/backups" by default, or in some place chosen by the user.

Let me know if I need to clarify that some more.
User avatar
Kyra
 
Posts: 3365
Joined: Mon Jan 29, 2007 8:24 am

Post » Tue Aug 24, 2010 12:19 am

Thanks, currently fixed in subversion, will be in next release.


I'm not sure I'm understanding this one. The "~" files are backups. So if you do "tes3cmd header --synchronize foo.esp", foo.esp is modified and "foo~1.esp" would be the first backup of the original unmodified plugin. If you modify foo.esp again, you'll get a "foo~2.esp" which is a backup of foo.esp from just prior to the modification. You only need to rename "~" files to the original name when you want to undo a modification. This has always been left to the user to do manually, and -R (which is now --replace for the "clean" command) does not do this.


That's what I also thought. I cleaned TR_Map2.esm, used tes3cmd header --synchronize "TR_Map2.esm" and it's still yellow in Wrye Mash. The backup file had the correct header applied.
User avatar
Anna S
 
Posts: 3408
Joined: Thu Apr 19, 2007 2:13 am

Post » Tue Aug 24, 2010 6:33 am

That's what I also thought. I cleaned TR_Map2.esm, used tes3cmd header --synchronize "TR_Map2.esm" and it's still yellow in Wrye Mash. The backup file had the correct header applied.

If you clean TR_Map2.esm, that would probably decrease it's size a little, and so you would have to do "header --synchronize" on all plugins that depend on TR_Map2.esm, not on TR_Map2.esm itself.

When a plugin is yellow in Mash, it means the size of one of its masters has changed. If TR_Map2.esm itself is yellow, and if "header --synchronize TR_Map2.esm" isn't clearing it, that's a bug in tes3cmd, and I'll look into it.
User avatar
Rachel Eloise Getoutofmyface
 
Posts: 3445
Joined: Mon Oct 09, 2006 5:20 pm

Post » Mon Aug 23, 2010 9:23 pm

Ok, I was wrong. Even the backup file was yellow.

I made a little screenshot:
http://omploader.org/vNTFmOA/header.jpg

tes3cmd pretended to change the size and the size was still incorrect.
User avatar
stephanie eastwood
 
Posts: 3526
Joined: Thu Jun 08, 2006 1:25 pm

Post » Tue Aug 24, 2010 1:24 am

tes3cmd pretended to change the size and the size was still incorrect.

Ah, okay. That's my fault. There was an encoding bug for a few fields in version 0.37i. I fixed it in the version I'm currently working on, so I just uploaded it for you to try if you want: tes3cmd-0.37j-2010.07.25.7z ( http://code.google.com/p/mlox/downloads/list ).
User avatar
Steve Smith
 
Posts: 3540
Joined: Sat Jun 30, 2007 10:47 am

Post » Tue Aug 24, 2010 5:35 am

Ah, okay. That's my fault. There was an encoding bug for a few fields in version 0.37i. I fixed it in the version I'm currently working on, so I just uploaded it for you to try if you want: tes3cmd-0.37j-2010.07.25.7z ( http://code.google.com/p/mlox/downloads/list ).


Thanks! Works fine now. The sizes of the .esm files are now correct.
User avatar
James Smart
 
Posts: 3362
Joined: Sun Nov 04, 2007 7:49 pm

Post » Tue Aug 24, 2010 5:19 am

Thanks! Works fine now. The sizes of the .esm files are now correct.

There's a couple new commands in 0.37j: "active", "resetdates", and "lint" (which is not actually implemented). These things aren't really tested at all, yet, so beware.

Edit: there are probably a few other little problems with 0.37j, as I was sort of in the middle of things, I'll try to get out a more fixed version later today.
User avatar
Danel
 
Posts: 3417
Joined: Tue Feb 27, 2007 8:35 pm

Post » Tue Aug 24, 2010 4:13 am

I have a new version for trial, with now even fewer bugs: tes3cmd-0.37l-2010.07.31.7z
http://code.google.com/p/mlox/downloads/list

I finally got around to implementing a little automated test program, so I should have an easier time of making sure I don't flub things up by breaking one thing when I fix another. But that's boring. This version is the best yet, but I'm still testing. It'll probably be at least another couple of weeks before I release what I think is a truly "stable" release.
User avatar
Mistress trades Melissa
 
Posts: 3464
Joined: Mon Jun 19, 2006 9:28 pm

Post » Mon Aug 23, 2010 9:38 pm

Great! Thanks for your hard work, john.moonsugar. I will try the new version as soon as possible.
User avatar
Erika Ellsworth
 
Posts: 3333
Joined: Sat Jan 06, 2007 5:52 am

Post » Tue Aug 24, 2010 5:51 am

Bug:

I tried to clean "TR_Data.esm" from Tamriel Rebuilt Map 2 and tes3cmd made an error:

CLEANING: "TR_Data.esm" ...
Loaded cached Master: /morrowind.esm
Loaded cached Master: /tribunal.esm
Loaded cached Master: /bloodmoon.esm
Cleaned junk-CELL: bitter coast region (-12, 3)
Cleaned junk-CELL: bitter coast region (-12, 2)
Cleaned junk-CELL: bitter coast region (-12, 1)
Cleaned junk-CELL: bitter coast region (-13, 4)
Cleaned junk-CELL: bitter coast region (-13, 3)
Cleaned junk-CELL: bitter coast region (-13, 2)
Cleaned junk-CELL: bitter coast region (-13, 1)
Cleaned junk-CELL: bitter coast region (-14, 5)
Cleaned junk-CELL: bitter coast region (-14, 4)
Cleaned junk-CELL: bitter coast region (-14, 2)
Cleaned junk-CELL: west gash region (-15, 7)
Cleaned junk-CELL: wilderness (-15, -8)
Cleaned junk-CELL: west gash region (-16, 8)
Cleaned junk-CELL: west gash region (-16, 7)
Output saved in: "TR_Data.esm"
Original backed up to: "/tes3cmd/backups/TR_Data.esm"

Cleaning Stats for "TR_Data.esm":
junk-CELL: 14

CLEANING: "TR_Map1.esm" ...
Loading Master: tr_data.esm
[ERROR (D:/installed games/Morrowind/Data Files/TR_Data.esm): FATAL ERROR (D:/in
stalled games/Morrowind/Data Files/TR_Data.esm): Oops! Don't know how to make ID
for rectype: SSCR
" at script/tes3cmd line 4616


I am sure it didn't before.
User avatar
Lauren Graves
 
Posts: 3343
Joined: Fri Aug 04, 2006 6:03 pm

PreviousNext

Return to III - Morrowind