I'm not sure if it was the last patch that borked this, or if it's only more obvious now when doors can have darker textures:
In any case I would like to un-bork this (i.e. make the cutout fit the single tile doors) but I cannot find how/where this is defined. Is it a texture like in previous games? Or something else entirely?
Comments
Reason I ask is that I find it very useful for building to have doors and windows available both as one- and two-tile versions, and right now what I'm doing to make those versions involves copying the entire mesh which might be unnecessary .. seeing as I'm not changing it at all. I would like to find out whether there's a more efficient way to do this.
Look for the resource with type 0x81ca1a10, this is a table with cutout info, and it defines the mappings. For the Base Game there is one single resource that contains all the cutout info for all objects. For the packs (EP01, GP01) they are loose (i.e. one resource per object) which is actually a bug that we may fix that at some point (it's basically an optimization to load less files).
The trick with what you are trying to do is that if you want to replace just one cutout entry in the combined resource the only way I can guarantee it will work (without more investigation) is to override the entire resource which of course is brittle since you are replacing a lot of Maxis-authored data unnecessarily.
Otherwise, you can try to override just one resource that is also defined inside a combined resource. I am not sure it will work though as it will depend on the load order as to which one will win. Note that load order might not be deterministic, although I suspect it is. You might get lucky and it just works, but I can't say for sure off the top of my head.
The table format itself looks fairly straightforward, but I am sure it would help if I provided a BT file. Let me know if you need that and I'll see what I can do.
-SGMS
Not sure if you aren’t misunderstanding what I’m after in my second post, though (the first one is ooooooold and I should perhaps not have resurrected it) – back in December, I was still looking to override the cutouts for existing Maxis doors; meanwhile, I’ve already done that (by finding the actual _IMG resources and overriding those – that works fine, just like any other texture override).
Oh. The tool currently I use to clone doors/windows with (TSRW) adds a cutout _IMG to each CC package (with a unique ID, not as an override); from what you say it sounds like it would be exploiting the bug you mention. If you’re going to fix that, will there still be a way for custom objects to define their own cutouts at all?
Anyway, for those two-tile doors I currently do it would be just fine to be able to reference a different existing cutout instead of having an actual custom one (they tend to be pretty rectangular anyway) -- but is there any reference in the object at all? Or does that 0x81ca1a10 table (which I can’t look at right now, am on the wrong computer) basically tell the game which cutout to use based on ID of the MODL or something? That would certainly also explain why my doors got borked when I tried to remove the cloned mesh and reference the original one instead ..
Do you mean a cutout resource, or some other kind of resource? If it's the latter, a BT would be cool, yes .
ETA, *lightbulb* -- 0x81ca1a10, does that happen to be MTBL? The one that also defines stuff about how the little snapshots for catalogue thumbnails are taken? Then I know what you mean.
I'm curious what you meant by that "just one resource that is also defined inside a combined resource" now ..
Actually a little bit of magic here, first see http://forums.thesims.com/en_US/discussion/878085 which describes the cutout resource format.
In the format, there is a baseFileNameHash. The texture key is derived from this key. Generally the string “_0_0_f” is added to the hash, and is the texture key.
However, if the widthAndMappingFlags indicates multiple textures (i.e. bit 6 is 0) then then it’s slightly different. In this case we add “_x_y_f” where x=level and y=tile. Although it looks to me that this feature is not actually used so you may not run into this case.
To add to the baseFileNameHash, do something like the following (where baseFileNameHash is the initial hash):
An example:
-SGMS
Thanks a lot for that explanation -- that is exactly what I wanted to know, above!