[WIP] AMC - Automated Mod Cleaner

Post » Tue Mar 30, 2010 11:51 am

Hello all,

So I was setting up OB the other day (for the nth time where n->oo) and I couldn't get a simple
rig like OOO+MMM+DR+SM+LAME (and a few others) to work without crashing every hour or
so :gun:

Then, I found this thread: http://www.gamesas.com/bgsforums/index.php?showtopic=1004123

The thing is, while I've been modding my game since 2006, I don't really feel confident to clean
other people's mods without breaking something. Since "cleaned" esps aren't really allowed to
be uploaded by 3rd parties for "legal" reasons people without enough modding experience don't
have much luck.

Anyway, that's when the idea hit me; what if there was a utility, kinda like BOSS, that used
a community database to clean mods? I mean, since many people clean their mods and, in
most cases, many people clean the same mod it's a shame that the community isn't be able to
benefit from all that effort.

Anyway, enough ruble, here's what I'm thinking about the procedure flow:

- Modder cleans esp using TES4Edit
- AMC compares cleaned.esp with original.esp and extracts a cleaned_esp data report.
- Modder uploads the report
- Report is merged in the AMC Database
- Mod users use AMC to clean their esp

I can program alright but I only really know engineering program languages so I thought it would
be a good chance to create a useful tool as well as learn c++ a bit better in the process.

For this endeavor I would need:

- Advice on how to extract information from .esps
- How to repack the result into an .esp
- People who "know their stuff" to contribute to the database
- To know if the community is interested at all for such an app so that I won't waste my time for no
reason :flamethrower:

Well, what do ya think?
User avatar
Stat Wrecker
 
Posts: 3511
Joined: Mon Sep 24, 2007 6:14 am

Post » Tue Mar 30, 2010 4:07 pm

Definitely a yes yes, this tool would be invaluable.

:D
User avatar
Add Me
 
Posts: 3486
Joined: Thu Jul 05, 2007 8:21 am

Post » Tue Mar 30, 2010 3:00 pm

this needs to be born and kicking!!
User avatar
Elina
 
Posts: 3411
Joined: Wed Jun 21, 2006 10:09 pm

Post » Tue Mar 30, 2010 2:15 pm

Anyone knows of a utility/method to extract .esp records to a .txt or other readable format?

Could be through a batch process or directly through code (Maybe a subroutine or .exe :P )

Modding gurus I'm waiting for your wisdom :celebration:
User avatar
Nany Smith
 
Posts: 3419
Joined: Sat Mar 17, 2007 5:36 pm

Post » Tue Mar 30, 2010 11:14 am

Look into Wrye Bash's code for record definitions (you'll need an understanding of Python). If you're better at Delphi, I can find TES4EDIT's - I'm sure that ElministerEU wouldn't mind.

PS : Come to think of it, his TES4Dump utility does just that - Dump record info to a text file.
User avatar
Laura Elizabeth
 
Posts: 3454
Joined: Wed Oct 11, 2006 7:34 pm

Post » Tue Mar 30, 2010 11:43 am

Look into Wrye Bash's code for record definitions (you'll need an understanding of Python). If you're better at Delphi, I can find TES4EDIT's - I'm sure that ElministerEU wouldn't mind.

PS : Come to think of it, his TES4Dump utility does just that - Dump record info to a text file.



TES4Dump looks good, I'll look into putting it to use today :hubbahubba:
User avatar
Justin Hankins
 
Posts: 3348
Joined: Fri Oct 26, 2007 12:36 pm

Post » Tue Mar 30, 2010 1:06 pm

Hello all,

So I was setting up OB the other day (for the nth time where n->oo) and I couldn't get a simple
rig like OOO+MMM+DR+SM+LAME (and that's about it) to work without crashing every hour or
so :gun:


None of these mod need to be cleaned(well I'm not sure about DR and SM) but I run all those mod except SM + tons of others and none are cleaned(only ones I cleaned are the official DLCs and some people consider they shouldn't be cleaned).
And I most of the time can play 3-4 hours without crashes(though careful bash patch configuration).

Now a little explanation may be needed as to why mods should or shouldn't be cleaned.
Most of the time when people say cleaning a mod they mean removing records in the mod that are identical to those of its masters.

Why would those records be harmful you might ask? It's simply because a mod tends to believe everything is the way it set it up.

For example let's take 2 mods A and B:
A modifies Records 1,2,3
B loads after A and modifies Record 2, resetting it back to vanilla

Now in the end what you get is:
Record 1: A version
Record 2: B version(vanilla)
Record 3: A version

Now mod A will expect Record 2 to be its version and it being the vanilla version may cause issues like CTDs(really depends on the type of record).
The only problem is mod B might expect Record 2 to be the vanilla version and it being the A version( if you clean mod B ) might cause CTDs too!

Cleaning mods systematically means that you assume that the records reset back to vanilla are unintentional but they might not be.
Wrye Bash offers a solution through its bashed patch by permitting different mods to change different elements of the same Record but it requires careful configuration and a bit of work.
User avatar
lacy lake
 
Posts: 3450
Joined: Sun Dec 31, 2006 12:13 am

Post » Tue Mar 30, 2010 4:25 am

http://www.gamesas.com/bgsforums/index.php?showtopic=1034582
User avatar
Chenae Butler
 
Posts: 3485
Joined: Sat Feb 17, 2007 3:54 pm

Post » Tue Mar 30, 2010 4:26 pm

http://www.gamesas.com/bgsforums/index.php?showtopic=1034582


The nice thing about using TES4Edit to clean mods is that it lets you see exactly what records identical to those in Oblivion.esm have been changed, before you agree to anything. And it's pretty easy to spot a modder that has made these changes unintentionally, because instead of one or two identical records, you get several hundred or even thousands showing up.

Which isn't to say that we could do without another mod cleaner, or one that approaches matters from a different perspective, entirely.
User avatar
Carys
 
Posts: 3369
Joined: Wed Aug 23, 2006 11:15 pm

Post » Tue Mar 30, 2010 4:50 am

heh, I know ooo, mmm, fcom, sm, uop etc. don't need cleaning, I've read the threads :nothanks:

The thing is, I use some other mods (and the DLCs) that DO need cleaning and, since there are experts
on the subject I think it would be great if the community could benefit from their experience
in a more productive way. In the end, it would be more efficient to run a program one time and
upload a file than continuously giving advice in different threads :D

@DarklyDreaming

Apart from the "dirty" entries, which you describe and are pretty easy to get rid of through an automated
procedure, there are also the "wild" entries which can only be deleted by using human judgement.

Anyway, what I am thinking is nothing quite like TES4Edit. My approach is that one would use
TES4Edit to clean a mod, then generate a "cleaning report" with AMC and other people would
then be able to use AMC to clean their respective mod without needing to go through multiple
pages and threads just to learn how they can effectively clean their mods using TES4Edit
themselves :flamethrower: Somewhat similar to BOSS where you don't need to be an expert
to make your load order work.

Since TES4Dump already does a bunch of the work I was planning to do, I will have a working beta
soon mesa thinks :mohawk:
User avatar
Amelia Pritchard
 
Posts: 3445
Joined: Mon Jul 24, 2006 2:40 am

Post » Tue Mar 30, 2010 5:03 pm

@DarklyDreaming

Apart from the "dirty" entries, which you describe and are pretty easy to get rid of through an automated
procedure, there are also the "wild" entries which can only be deleted by using human judgement.

Anyway, what I am thinking is nothing quite like TES4Edit. My approach is that one would use
TES4Edit to clean a mod, then generate a "cleaning report" with AMC and other people would
then be able to use AMC to clean their respective mod without needing to go through multiple
pages and threads just to learn how they can effectively clean their mods using TES4Edit
themselves :flamethrower: Somewhat similar to BOSS where you don't need to be an expert
to make your load order work.

Since TES4Dump already does a bunch of the work I was planning to do, I will have a working beta
soon mesa thinks :mohawk:


Yes I know about wild edits but I was under the impression that you wanted to make a tool to automate their deletion(which is not the case, wasn't fully awake yet I guess :P) and just wanted to point out that it's not necessarily a good idea :).

As for TES4Dump I don't know how it will help you unless you have the source.
I recently coded a partial esm/esp(partial in that it doesn't interpret every single record but it can go through the full file) and it's not complicated but after coding it I discovered this:
http://sourceforge.net/projects/tes4code/files/

It's a library to handle bsa/esm/esp and maybe some other stuff.

It might help you :).
User avatar
Crystal Clarke
 
Posts: 3410
Joined: Mon Dec 11, 2006 5:55 am

Post » Tue Mar 30, 2010 8:46 am

Thanks for the info! :thumbsup:

Now, what I'm thinking is this:

Let's say you have cleaned an .esp -> clean.esp
The batch process would be as follows:

To generate a "clean report":
- Use TES4Dump to generate two text files: dirty_esp.txt and clean_esp.txt
- Use my utility to compare the .txt files. Since cleaning an .esp is about deleting records,
the info needed is which lines contained in dirty.esp are missing in the clean.esp
- Produce a report of which lines should be deleted.

To clean an .esp:
- TES4Dump generates a dirty_esp.txt file.
- My utility scans the dirty_esp.txt file and deletes the appropriate lines based on the
corresponding "clean report", thus creating a clean_esp.txt file.
- Repack the clean_esp.txt file to clean.esp and you're done!

Pretty simple to make really :P

The only thing I'm actually missing is a way to repack the .txt files to .esp. I'll do a little
research on that. Ideas are welcome of course :liplick:
User avatar
dell
 
Posts: 3452
Joined: Sat Mar 24, 2007 2:58 am

Post » Tue Mar 30, 2010 10:42 am

I would be all for contributing towards a comprehensive data base of dirty .esp files!

It's a great idea :)
User avatar
Nicholas
 
Posts: 3454
Joined: Wed Jul 04, 2007 12:05 am

Post » Tue Mar 30, 2010 11:55 am

As for TES4Dump I don't know how it will help you unless you have the source.
I recently coded a partial esm/esp(partial in that it doesn't interpret every single record but it can go through the full file) and it's not complicated but after coding it I discovered this:
http://sourceforge.net/projects/tes4code/files/

It's a library to handle bsa/esm/esp and maybe some other stuff.

It might help you :) .
That's an ancient library ( the one ObEdit uses ) that's also incomplete. Almost all of the TES4File records have been exposed now. Better to use Bash's ( or CBash's ).
User avatar
Sylvia Luciani
 
Posts: 3380
Joined: Sun Feb 11, 2007 2:31 am

Post » Tue Mar 30, 2010 9:53 am

Since "cleaned" esps aren't really allowed to be uploaded by 3rd parties for "legal" reasons people without enough modding experience don't have much luck.


This is one of the biggest problems with the Oblivion community.
User avatar
Tessa Mullins
 
Posts: 3354
Joined: Mon Oct 22, 2007 5:17 am


Return to IV - Oblivion