QUOTE(Wrye @ Apr 20 2007, 11:01 PM) [snapback]9823696[/snapback]
To some degree Mash already does this, to some degree it doesn't. I also suspect that this is a bit more complicated then it seems at first. So to give you an example, suppose that I have three Telvanni texture replacers intalled: A, B and C. Usually you get these with wildly different names, but what I then do (in order to make them group together) is to rename them (i.e., rename their folders in the replacerd directory):
* Telvanni, A
* Telvanni, B
* Telvanni, C
Now, usually what I end up doing is checking just one of these at a time, but it's also perfectly fine to check more than one, in which case, their order that I check them determines their dominance: So If I check: B, then C, then A. Then that's the mod equivalent of B loading first, then C, then A loading last. So A is most dominant, B is least dominant.
Note that this works best when packs are split up. When packs aren't split up, then you can't make one dominant for Telvanni, but sub-dominant for say Imperial style towns. OTOH, it's always possible to mix and match your own packs. Go to replacers folder, copy an existing replacer to your new version, then mix in stuff from other versions as you like. That becomes a new replacer and you use that one instead of the others (maybe with some texture renaming). (E.g., I use this to mix a Hlaalu floor pattern into the outdoor plaza of Vivec cantons.)
I wasn't sure how much Mash did. Although I new it did less then I planned to do.
QUOTE
Now, the problems with automated regex is that some replacer makers are pretty creative -- their new meshes do not necessarily use the standard textures that go with those elements. E.g., the Vivec city texture replacers have problems with some of the sewer elements -- if they try to make them less boring they find that the textures were place upside down into some of the lower level coordior meshes -- so one of the replacers actually has to fix those. Worse is mesh makeer might take a vivec element and use a non-vivec texture with it. This becomes more of a problem with wood and metal strip textures which tend to show up in quite different places (ship panelling, back side of shields, door hardware, armor siding, etc. This makes it hard (possibly impossible) to come up with an automatic way to separate out meshes into distinct architectures.
This is where I swear about the fact the meshes can point to different textures than the originals

, and am embarrassed I had forgotten.
Anyway. How about this sort of thing for meshes:
CODE
for every mesh included in the mod{
Get all the textures the mod uses.
for every texture{
if the texture is included with the mod, make sure it is unique name,
so won't be overwritten by anything else when it is installed.
If the texture isn't included check if the texture exists in the BSA
If the texture exists in the BSA{
extract the texture from the BSA and give it a unique name.
}
}
Reflect changes to the texture names in the mesh.
}
I get the feeling I am missing something. Anyway. I will give it some thought.
Do people think the above would work? I really could do with feedback.
QUOTE
So, in short, I'm saying that this may not be as easy as it first looks, and that Mash (and a little hand tweaking) does more than you might expect. But... I've been wrong before! (I just had a PM exchange with ParasiteX who essentially stumbled on mod de-isolation for Oblivion a year ago -- a possibility that took me until last November to re-discover.) I would however, suggest that you look at several real world texture replacers and see how well your approach works with then before you spend lots of time coding your approach. Otherwise, good luck! An intelligent, automatic replacer mixer would be pretty cool.