Jump to content

Photo

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


  • This topic is locked This topic is locked
209 replies to this topic

#181
fable2

fable2
  • Members
  • PipPipPipPip
  • Master
  • Joined: 18-May 04
  • 7996 posts

Could be MS-DOS and filenames with spaces in. What about:

tes3cmd clean "balm*.esp"
Although I'm not sure if that'd pick up the wildcard :unsure:


Same thing, unfortunately. Nice try, though.

Maybe just

tes3cmd clean *.esp
;)


If that worked, it would grab everything (210+ mods) in the directory. And there are at least some that probably shouldn't be cleaned.

Plus, it really should work on a per .esp basis. It does for most users. The odd thing is, it sees the file in question. It just doesn't recognize it as being an active plugin. Not sure why.

Edited by fable2, 17 May 2011 - 06:51 PM.


#182
Pinkertonius

Pinkertonius
  • Members
  • Adept
  • Joined: 03-February 06
  • 307 posts

Same thing, unfortunately. Nice try, though.



If that worked, it would grab everything (210+ mods) in the directory. And there are at least some that probably shouldn't be cleaned.

Plus, it really should work on a per .esp basis. It does for most users. The odd thing is, it sees the file in question. It just doesn't recognize it as being an active plugin. Not sure why.


I always get this error when the ESM file isn't in the Data directory. I checked and Balmora Council Club requires Morrowind, Tribunal and Bloodmoon (checked via Enchanted Editor). It worked for me, but it's not very dirty.

CLEANING: "E:\Morrowind Mods\BalmoraCouncilClub\Balmora Council Club.esp" ...
Loaded cached Master: <DATADIR>/morrowind.esm
Loaded cached Master: <DATADIR>/tribunal.esm
Loaded cached Master: <DATADIR>/bloodmoon.esm
 Cleaned junk-CELL: molag mar region (12, -4)
 Cleaned junk-CELL: molag mar region (12, -5)
 Cleaned junk-CELL: molag mar region (11, -4)
 Cleaned duplicate object instance (Ex_DE_ship_cabindoor FRMR: 32796) from CELL: ebonheart (2, -13)
 Cleaned redundant AMBI,WHGT from CELL: balmora, guild of mages
 Cleaned redundant AMBI,WHGT from CELL: solstheim, gandrung caverns
Output saved in: "E:\Morrowind Mods\BalmoraCouncilClub\Clean_Balmora Council Club.esp"
Original unaltered: "E:\Morrowind Mods\BalmoraCouncilClub\Balmora Council Club.esp"

Cleaning Stats for "E:\Morrowind Mods\BalmoraCouncilClub\Balmora Council Club.esp":
       duplicate object instance:     1
                       junk-CELL:     3
             redundant CELL.AMBI:     2
             redundant CELL.WHGT:     2


#183
fable2

fable2
  • Members
  • PipPipPipPip
  • Master
  • Joined: 18-May 04
  • 7996 posts

I always get this error when the ESM file isn't in the Data directory. I checked and Balmora Council Club requires Morrowind, Tribunal and Bloodmoon (checked via Enchanted Editor). It worked for me, but it's not very dirty.


Regrettably, I've already got all three ESM files for the game in the data directory. (Wrye Mash would require them there, in any case.) Great idea, though. Honestly wish that was it.

EDIT: An odd thought, but--does everybody use C: drive for the game? I'm using E:. Logically, that should not be in the code to check for plugins, but still, when all else fails...

Edited by fable2, 17 May 2011 - 08:16 PM.


#184
Pinkertonius

Pinkertonius
  • Members
  • Adept
  • Joined: 03-February 06
  • 307 posts

Regrettably, I've already got all three ESM files for the game in the data directory. (Wrye Mash would require them there, in any case.) Great idea, though. Honestly wish that was it.

EDIT: An odd thought, but--does everybody use C: drive for the game? I'm using E:. Logically, that should not be in the code to check for plugins, but still, when all else fails...


I don't use Mash when cleaning mods so maybe that could be a cause as to why it worked for me and not you. You might want to go in and delete the cache files (data directory then tes3cmd directory). Tes3cmd will regenerate the ESM cache files. Then try again.

I don't actually use the C: Drive. I use the E: drive also (have 3 different Morrowind installs there).

EDIT: fixed tragic grammer error

Edited by Pinkertonius, 17 May 2011 - 08:47 PM.


#185
fable2

fable2
  • Members
  • PipPipPipPip
  • Master
  • Joined: 18-May 04
  • 7996 posts

I don't use Mash when cleaning mods so maybe that could be a cause as to why it worked for me and not you. You might want to go in and delete the cache files (data directory then tes3cmd directory). Tes3cmd will regenerate the ESM cache files. Then try again.


I don't use Wrye Mash to clean files--just to clean the saved game, coordinate it with the master mod list, and generate Mashed Lists.esp.

Perhaps it's something in the way the tes3cmd code deals with XP. I'm out of ideas. I'm willing to consider greater pentagram rituals and the summoning of Bill Gates, at this point. :shakehead:

Edited by fable2, 17 May 2011 - 09:28 PM.


#186
Pinkertonius

Pinkertonius
  • Members
  • Adept
  • Joined: 03-February 06
  • 307 posts

I don't use Wrye Mash to clean files--just to clean the saved game, coordinate it with the master mod list, and generate Mashed Lists.esp.

Perhaps it's something in the way the tes3cmd code deals with XP. I'm out of ideas. I'm willing to consider greater pentagram rituals and the summoning of Bill Gates, at this point. :shakehead:


Have you tried using ......tes3cmd clean "Balmora Council Club.esp" ?

option 2: I use a simple bat file that I created. Then I drag and drop on top of a shortcut on the desktop that points to the bat file...but another modder took that idea and exploded it 100 fold into an amazing super-tes3cmd bat file with complete instructions...

see this thread here for more details

Edited by Pinkertonius, 17 May 2011 - 11:59 PM.


#187
fable2

fable2
  • Members
  • PipPipPipPip
  • Master
  • Joined: 18-May 04
  • 7996 posts

Have you tried using ......tes3cmd clean "Balmora Council Club.esp" ?


First thing I tried. The report line is the same in all instances:

CLEANING: "Balmora Council Club.esp" ...
Loading master: morrowind.esm
ERROR: Balmora Council Club.esp: FATAL ERROR: Balmora Council Club.esp: no plugin<s> specified!
" at script/tes3cmd line 4702

So it sees the ESP, but it says it isn't a plugin. Or perhaps it means it isn't an active plugin. Can't tell.

option 2: I use a simple bat file that I created. Then I drag and drop on top of a shortcut on the desktop that points to the bat file...but another modder took that idea and exploded it 100 fold into an amazing super-tes3cmd bat file with complete instructions...

see this thread here for more details


Got the batch file working--thanks for suggesting that--but the response is, well, strange. I'm still getting the "no plugin<s> specified! at script/tes3cmd line 4702," then the program states that it is cleaning the mod, then concludes by saying it was not modified. Now I know there are dirty references in that ESP, so I tried several others with some dirty references. It's not cleaning. The way I figure it, the program states it can't find the plugin, and then reverts to the batch file, which states that the cleaning is taking place.

Edited by fable2, 18 May 2011 - 10:40 AM.


#188
fable2

fable2
  • Members
  • PipPipPipPip
  • Master
  • Joined: 18-May 04
  • 7996 posts
It appears the problem was an old mis-install issue: a data files subdirectory in the data files subdirectory, used once, and never removed. Seems it saw that data files/data files, and balked at accepting any plugins under data files as real. Might need a check for that, at some point. Once it was deleted, the tes3cmd batchfile worked perfectly.

Now, it's only a matter of assessing which mods are "safe" to clean.

Edited by fable2, 22 May 2011 - 08:44 PM.


#189
Psymon

Psymon
  • Members
  • PipPipPipPipPip
  • Patriarch
  • Joined: 11-November 08
  • 12448 posts
  • Location:California
Did you get the latest batch file in the other thread.

Working good for me, but have not tried to clean that esp.

#190
fable2

fable2
  • Members
  • PipPipPipPip
  • Master
  • Joined: 18-May 04
  • 7996 posts

Did you get the latest batch file in the other thread.

Working good for me, but have not tried to clean that esp.


Yes, I'm using it. Just tried it out on the supposedly clean Clean Lost Artifacts of Morrowind, which is known to be pretty dirty. And was.

#191
neildarkstar

neildarkstar
  • Members
  • PipPip
  • Disciple
  • Joined: 03-April 09
  • 1756 posts
I've cleaned a couple of my mods using the batch file and TES3CMD v0.37, and have had no problems... so far. :)

This is actually a terrific tool. I've had it one day, and I already love it. I've only noticed one oddity... My BAK files are timestamped for 9:50am 5/23/2011, but it's just now 9pm 5/22/2011. I have achieved time travel. I'm also wondering why I get two BAK files for one use with two different version numbers... Does it back up both before and after?

#192
zappatized

zappatized
  • Members
  • Layman
  • Joined: 07-March 12
  • 9 posts
Are there circumstances in which I would not want to delete records that tes3cmd diff reports as equal to one of the bethesda masters? I'm talking about after I've already cleaned the mod with tes3cmd. Records such as DIAL, INFO, LTEX?

#193
abot

abot
  • Members
  • PipPipPip
  • Diviner
  • Joined: 04-August 04
  • 4803 posts

DIAL, INFO

If you think duplication of original (usually found with tes3lint) is intentional, better keep it. I think exact duplication is 99% not intentional. If intentional, you could copy the modified original dialog entry to a new one (with new generated ID) and then clean the original change from CS details or other tools.
Spoiler
LTEX: these seem to have to be duplicated for landmass/textures changes to work, so better keep them
[EDIT]fixed a extra "not", typos

Edited by abot, 08 April 2012 - 09:05 AM.


#194
zappatized

zappatized
  • Members
  • Layman
  • Joined: 07-March 12
  • 9 posts
What should I look for in the record that would indicate that it is there intentionally? For example, the Bloodmoon.esm having [DUP-INF] records? (after cleaning it with tes3cmd, skipping the 'evil' GMSTs)
[Edit] Another example: tes3cmd diff shows your waterlife esm has two records equal to morrowind and tribunal: DIAL - attack, DIAL - hit. tes3lint lists these two as [OVR-REC] against tribunal.esm. Is there something that I as the end-user could check to certify that you meant to place these records in your plugin? Or is it necessary to simply decide to err on the side of caution?

Edited by zappatized, 08 April 2012 - 08:19 PM.


#195
abot

abot
  • Members
  • PipPipPip
  • Diviner
  • Joined: 04-August 04
  • 4803 posts

What should I look for in the record that would indicate that it is there intentionally? For example, the Bloodmoon.esm having [DUP-INF] records? (after cleaning it with tes3cmd, skipping the 'evil' GMSTs)

If by "cleaning it" you mean you have cleaned Bloodmoon.esm , I'd never touch Bethesda's .esms (except, perhaps, changing their timestamp keeping relative order, but better avoid it). They are far from perfect, but they are referenced by every other mod so....

Is there something that I as the end-user could check to certify that you meant to place these records in your plugin? Or is it necessary to simply decide to err on the side of caution?

It is often complex to judge, probably something more for seasoned modders than average users . I'd stay on the side of caution if you are unsure.
tes3lint gives probably more complete/useful info to judge dialog than tes3cmd, anyway you should always consider these and other tools just as hints to where to look in the construction set, dialog is a complex thing. If you are checking a .esm for instance, you should file\copy to .esp using Mash (so you can see changes starred/edit things in CS) and look at the hinted by other tools dialog lines from the CS, where you can see complete dialog changes (text, conditions, result...) and judge. This way for instance you could find that dialog info is identical, but dialog result scripting commands differ (this is typical for voice/greeting events).
Basically, you should check dialog lines hinted by tools as having same info ID as standard Bethesda's. If nothing (no text, no conditions, no dialog result...) is different from Bethesda's same info line, there are good chances this is a modder glitch (changed original dialog without knowing it's not good practice. Or changed it without realizing it e.g. copied dialog line, but modified original line below instead of copied line). If in doubt and if modder is active, ask, often you may help fixing glitches.
For instance, something I just noticed that should probably be cleaned from the CS details in next (if ever) version of waterlife.esm could be the "Traitors to the %Faction must die." dialog info with id=22580190852053612072, something probably slipped from old SOD compatibility check, should cause no harm as it is under journal section, while original Bethesda's id is under greeting section, but should probably be cleaned nonetheless.
[EDIT]topic replaced with greeting, typos

Edited by abot, 09 April 2012 - 08:49 AM.


#196
Era Scarecrow

Era Scarecrow
  • Members
  • Pip
  • Curate
  • Joined: 15-October 10
  • 611 posts
Well not that it matters, but I think I had found well over 200 duplicate ID entries for dialog in the original Morrowind.esm file (Oddly they refer to similar quests). I'm also finding a number of lands were duplicated too, however certain single quotes are confused using extended ascii, I'll investigate it in more depth a little later.

#197
john.moonsugar

john.moonsugar
  • Members
  • PipPipPip
  • Diviner
  • Joined: 10-April 08
  • 4183 posts
There may be a new version of tes3cmd coming out in a month or ...

I found a new record type in the savegame files which I hadn't seen before: "PROJ", which is for projectiles currently in flight while the save was being made. Whoo, crazy.

I've fixed a coupte bugs. And I'm probably going to add a bell or a whiste too. And I might even catch up on this thread.

#198
Pinkertonius

Pinkertonius
  • Members
  • Adept
  • Joined: 03-February 06
  • 307 posts
JM, you might consider reading this thread. Don't let the title fool you. I've been "pimping" your program for a long time so I'm thrilled your updating it.

#199
john.moonsugar

john.moonsugar
  • Members
  • PipPipPip
  • Diviner
  • Joined: 10-April 08
  • 4183 posts

JM, you might consider reading this thread.


Thanks! I'll put that in my "in" box.

#200
PAO_KILO

PAO_KILO
  • Members
  • Pip
  • Curate
  • Joined: 14-December 06
  • 922 posts
  • Location:São Paulo, Brasil
Repost from another thread..



is it safe to use "multipatch --cellnames --fogbug --merge-lists --summons-persist" in place of Wrye Mash's Merged Lists? should i just use "multipatch --merge-lists" ?

#201
john.moonsugar

john.moonsugar
  • Members
  • PipPipPip
  • Diviner
  • Joined: 10-April 08
  • 4183 posts

is it safe to use "multipatch --cellnames --fogbug --merge-lists --summons-persist" in place of Wrye Mash's Merged Lists? should i just use "multipatch --merge-lists" ?


I use "tes3cmd multipatch" (which does all options by default) and I no longer use Mash for leveled lists. I think it's safe and generates correct leveled lists.

#202
PAO_KILO

PAO_KILO
  • Members
  • Pip
  • Curate
  • Joined: 14-December 06
  • 922 posts
  • Location:São Paulo, Brasil

I use "tes3cmd multipatch" (which does all options by default) and I no longer use Mash for leveled lists. I think it's safe and generates correct leveled lists.


wont --fogbug conflict with mods like TLM?

what about cellnames?

#203
john.moonsugar

john.moonsugar
  • Members
  • PipPipPip
  • Diviner
  • Joined: 10-April 08
  • 4183 posts

wont --fogbug conflict with mods like TLM?


Not to my knowledge. It should be a pretty safe thing to do. But it's really only necessary if your graphics card is affected by the bug.

what about cellnames?


Should be safe.

Multipatch does not change any of your plugins. It makes a new one, so you can deactivate it if you find it causes a problem. I don't think it will, but if you report it, I can take a look.

#204
PAO_KILO

PAO_KILO
  • Members
  • Pip
  • Curate
  • Joined: 14-December 06
  • 922 posts
  • Location:São Paulo, Brasil
Tank you very much, one last question if it isn't too much bother :biggrin:

trying to merge objects with TESTool is a bit troublesome, some large mods make it crash, is there a way to create a merge objects in tes3cmd?

#205
john.moonsugar

john.moonsugar
  • Members
  • PipPipPip
  • Diviner
  • Joined: 10-April 08
  • 4183 posts

trying to merge objects with TESTool is a bit troublesome, some large mods make it crash, is there a way to create a merge objects in tes3cmd?


Not yet.

#206
Dragon32

Dragon32
  • Members
  • PipPipPipPip
  • Master
  • Joined: 01-September 04
  • 8385 posts
  • Location:Norwich, UK
OK, idea for a new function time.

Not sure how familiar you are with TES4Edit by ElminsterAU.

One of its automated mod cleaning tools is the "Undelete and Disable References" function. I wonder if it would be possible to implement this with the TES3 plugin format...

I will say that most of my understanding of TES4Edit comes from Fallout3 Training Manual for FO3Edit by Miax. That appears to be pretty similar to the Oblivion version though.

Anyway. The idea is that where a mod has Deleted a reference the Deletion is changed to Disabling the reference instead. This means that when another mod loads and tries to amend the Deleted reference there isn't errors like:

Object reference "in_c_door_arched"
missing in master file.

As the FO3 guide has it:

The next step in the cleaning process is to Undelete and Disable References from the mod being cleaned. The, “Undelete and Disable References” function scans through the mod and the master files it depends upon, looking for any records that you may have
deleted by accident. If it finds some, it will un-delete them and then set the reference to, “disabled” so that it will never be seen in-game nor affect your mod.
This ensures that if another mod tweaks/changes the item you deleted, that the item will still be in the files (just disabled), and thus won’t cause Fallout3 to crash. If your mod file loads with the item deleted and another mod tries to change it, Fallout3 will crash!

Which sounds similar to the Morrowind situation.

As I understand the way the data is stored in the plugin (looking at a plugin in Enchanted Editor) a Deleted reference has a FRMR, NAME and DELE subrecords and that's it. Messing around in Enchanted Editor I can't see a subrecord type available which would obviously Disable the reference so it could be that that bit of the plugin data structure just isn't known for TES3 plugins.

One thing I haven't done is to start up a new game, Disable a reference, create a save and look at the save in EE. Maybe that would give some information. Hmmm, and then trying Set Delete 1 on the same reference and comparing the two saves...

Forgive any glaring errors in the above due to my hazy understanding about the tes3 plugin format. Hopefully what I've described makes sense

#207
john.moonsugar

john.moonsugar
  • Members
  • PipPipPip
  • Diviner
  • Joined: 10-April 08
  • 4183 posts

One of its automated mod cleaning tools is the "Undelete and Disable References" function. I wonder if it would be possible to implement this with the TES3 plugin format...


Sounds like an interesting idea. I will take a look at it.

I hope to be done with Arktwend by the end of this month. I mostly just need to do more testing as I'm mostly not fixing any more. Mostly.

Then, a new version of tes3cmd will come out soon. I've fixed a couple bugs and done a small bit of enhancing as I've been using it to clobber Arktwend into submission.

So, I'll try to get to this pretty soon.

Edited by john.moonsugar, 12 July 2012 - 10:18 PM.


#208
Dragon32

Dragon32
  • Members
  • PipPipPipPip
  • Master
  • Joined: 01-September 04
  • 8385 posts
  • Location:Norwich, UK

<snip>
One thing I haven't done is to start up a new game, Disable a reference, create a save and look at the save in EE. Maybe that would give some information. Hmmm, and then trying Set Delete 1 on the same reference and comparing the two saves...
<snip>

Well that didn't help. Checking with a diff tool revealed loads of differences between saves immediately before and after disabling an object. I could find the info using a hex editor but it really was meaningless to me. Enchanted Editor didn't help either so I guess the information isn't in its plugin definition information. Best of luck with it!

Edited by Dragon32, 12 July 2012 - 07:08 PM.


#209
john.moonsugar

john.moonsugar
  • Members
  • PipPipPip
  • Diviner
  • Joined: 10-April 08
  • 4183 posts

Well that didn't help. Checking with a diff tool revealed loads of differences between saves immediately before and after disabling an object. I could find the info using a hex editor but it really was meaningless to me. Enchanted Editor didn't help either so I guess the information isn't in its plugin definition information. Best of luck with it!


You should use tes3cmd :smile:

I went to a cell that has a unique item. Disabled it, did a quicksave, renamed the quicksave to "disabled.ess", then enabled the thingy, and did another quicksave. Then I invoked tes3cmd:

% tes3cmd dump --instance-match hasedoki disabled.ess quiksave.ess

Plugin: disabled.ess
Record: CELL "old ship, captain's cabin" Flags:0x0000 ()
  NAME: Name:Old Ship, Captain's Cabin
  DATA: (Interior) Fog_Density:1.00  Flags:0x0019 ()
  WHGT: Water_Height:0.00
  NAM8: [UNKNOWN_DATA: len:36
	hex:0000a1040000010000000000000000000000000000000000000000000000000000000000
	str:]
*FRMR: ObjIdx:986  MastIdx:0
  NAME: Name:staff_hasedoki_unique
  ND3D: [UNKNOWN_BYTE: 0xa0 (-96)]
  ZNAM: [UNKNOWN_BYTE: 0x00 (0)]
  DATA: X:158.14  Y:-61.24  Z:-118.85  X_Angle:0.00  Y_Angle:0.00  Z_Angle:-3.14

Plugin: quiksave.ess
Record: CELL "old ship, captain's cabin" Flags:0x0000 ()
  NAME: Name:Old Ship, Captain's Cabin
  DATA: (Interior) Fog_Density:1.00  Flags:0x0019 ()
  WHGT: Water_Height:0.00
  NAM8: [UNKNOWN_DATA: len:36
	hex:0000a1040000010000000000000000000000000000000000000000000000000000000000
	str:]
*FRMR: ObjIdx:986  MastIdx:0
  NAME: Name:staff_hasedoki_unique
  ND3D: [UNKNOWN_BYTE: 0x00 (0)]
  DATA: X:158.14  Y:-61.24  Z:-118.85  X_Angle:0.00  Y_Angle:0.00  Z_Angle:-3.14

So, it looks like it has to do with the ND3D and/or ZNAM fields. Dumping the entire quicksave to text:

tes3cmd dump quicksave.ess > quicksave.txt

and it looks like it is simply the addition of the ZNAM field that is what marks an object instance in a cell as "Disabled".

But I could be wrong. Will look more later.

#210
Rohugh

Rohugh
  • Moderators
  • Cuddly Bear
  • Joined: 12-August 05
  • 81867 posts
  • Location:Andalucía, España
Post limit.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users