Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Department of Post-Mortem Communications
Original Poster
#1 Old 16th Feb 2015 at 10:18 AM
Default Adding ObjectTypeFlags2 to an existing object
I just noticed that several overrides that I have, like the @sydsyrious fixes for fountains are actually not compatible with the current version of TS3. The issue is that these overrides use the original object, but in the case of Store items these have been patched by the Store patches, too. The Store patch mainly affects the OBJDand RSLT resource. In order to make the objects compatible with Pets and Seasons they received an additional ObjectTypeFlags2 in OBJD, which is then missing from the override mod.
I seem to be unable, however, to simply add an ObjectTypeFlags2 to any package file with S3PE and make the changes manually in the override mod. Is there a workaround for this?
(This problem, btw, affects all overrides that make changes to the OBJD resource of Store objects (and possibly some base objects, too), like stencil unlockers, fences made recolourable etc. They override the Store patch and therefore these objects miss the behaviour changes for pet interactions or snow piling up in winter.)
Advertisement
Inventor
#2 Old 16th Feb 2015 at 10:49 AM Last edited by Arsil : 16th Feb 2015 at 11:07 AM.
Quote: Originally posted by http://modthesims.info/wiki.php?title=Sims_3:0x319E4F1D
Code:
--if Version >= 0x1a
        DWORD (ObjectTypeFlags2)


You can find the Version field under "CommonBlock" (using Grid on a OBJD)

This wont magically add the new "parameter", I'm afraid (I say this because I don't know
how to do that) it takes hex editing to add that field (not only add it but also update the
lenght of the file?). I hope someone can help you with that if you can't do it yourself.

EDIT: For completeness sake. If the version of your OBJD is higher than 0x1a don't change
it because that will screw the parsing of the file (and anyway it should already have the field
you are interested in), if it's lower of 0x1a you can set it to 0x1a (to be precise, 0x0000001A).
Adding the parsing of the ObjectTypeFlags2 field seems the only thing done by that specific
version code, but be careful that if the previous version was 0 or anyway lower than 0x19
other things/fields may have been added to the parsing of the file/resource and those too must
be added to the OBJD.

Pretty sure I haven't used the right terms, but I hope it makes sense (and that is correct...)

EDIT2: If your purpose is to update or make it work again some OBJD override mods, maybe
an easier approach is to replicate the adjustments made to the "old" version of the OBJD
in the new version of the OBJD (the one that comes with the patches for store items?).
Department of Post-Mortem Communications
Original Poster
#3 Old 16th Feb 2015 at 11:24 AM
Quote: Originally posted by Arsil
You can find the Version field under "CommonBlock" (using Grid on a OBJD)

This wont magically add the new "parameter", I'm afraid (I say this because I don't know
how to do that) it takes hex editing to add that field (not only add it but also update the
lenght of the file?). I hope someone can help you with that if you can't do it yourself.

EDIT: For completeness sake. If the version of your OBJD is higher than 0x1a don't change
it because that will screw the parsing of the file (and anyway it should already have the field
you are interested in), if it's lower of 0x1a you can set it to 0x1a (to be precise, 0x0000001A).
Adding the parsing of the ObjectTypeFlags2 field seems the only thing done by that specific
version code, but be careful that if the previous version was 0 or anyway lower than 0x19
other things/fields may have been added to the parsing of the file/resource and those too must
be added to the OBJD.

Pretty sure I haven't used the right terms, but I hope it makes sense (and that is correct...)
I'm sure you used the right terms, because I didn't understand a single word
Yeah, but hex editing is out of the question, so Path B sounds more viable:

Quote:
EDIT2: If your purpose is to update or make it work again some OBJD override mods, maybe
an easier approach is to replicate the adjustments made to the "old" version of the OBJD
in the new version of the OBJD (the one that comes with the patches for store items?).
I managed to do that with one object where the changes to the OBJD only involved changes to values I could easily set from True to False or vice versa and so I could readd the mod's values to the patched OBJD. But with the next object I encountered a similar problem to the ObjectTypeFlags one. It contains additional entries, especially in the TGI blocks. I guess this is the area where additional stencils are added to the presets. I tried to find tutorials on how people unlocked stencils but my search skills seem to be almost as bad as my modding skills, so I have no clue on what and how to add additional entries in that area, either, and what these actually do.

Hey, maybe you are even nicer than I already think you are and I can show you the files themselves later when I come back from lunch and give me a clue on how to merge both files' properties? :D
Inventor
#4 Old 16th Feb 2015 at 12:11 PM
Of course I'm nicer than you think I am, what were you thinking?


I'm not very good with this kind of modding/hacking myself, but I'll give it a try.
Just give me some background information so I wont have to figure that out.
Department of Post-Mortem Communications
Original Poster
#5 Old 16th Feb 2015 at 12:33 PM Last edited by Don_Babilon : 16th Feb 2015 at 1:37 PM.
OK, I have to correct myself with regard to the specific object I had in mind, because it doesn't contain additions but only changes in the TGIBlocks section. But anyway. The object in question is the Scarab Rejuvenation Bed from the Store. It's broken and HugeLunatic made a fix which also modifies the original OBJD. The Store patch adds several new entries to the OBJD: ObjectTypeFlags2, FloorCutoutDDSIndex, FloorCutoutLevelOffset and FloorCutoutBoundsLength. The ObjectTypeFlags2 contains the relevant changes for Pets and Seasons, like, for example, whether pets can jump on an object or not.
I attached both files so you can see what I mean.
In this case I can probably go through HL's file and take the changes from there and add them to the TGI blocks in the patch file that are also present. But I also have some mods where there are more entries in TGIBlocks than in the original. And this is where I start to become confused because I'm still not overly confident with S3PE to really know how I could add the mod's contents to the original file.

Edit: Now where's the "creeped out" emoticon when you need it?
Edit: Apart from being the Don Babilon of Failed Modding Attempts, this avatar is unfortunately already busy as a Master Thief in Starlight Shores and "caring friend" to the local elderly ladies, but I have to admit that he is indeed rather dashing. I don't even play him actively. He's there as a resident townie.
Attached files:
File Type: zip  Archive.zip (3.8 KB, 7 downloads) - View custom content
Inventor
#6 Old 16th Feb 2015 at 1:54 PM
I repeat, I'm not expert in this kind of things, but here's how I'd deal with this.

I save the preview of the two OBJD (right clicking on the preview area) as .txt files
and then use a program that checks and highlights the differences between the two.

First line and first difference is the Version code, no surprise there.
Then the IID of multiplier, specular and mask in the Material[0] (Material List), in both the
MaterialBlock (complate override) and the TGIBlockList. And so on for the other 2 materials
defined (material entries of the Material List should correspond to the presets of the object).
EDIT: often some fields don't specify explicitly a TGI, but they index an entry in the TGIBlockList,
so you only have to change the TGI of the TGIBlock.
Next difference you'll spot is that the old/mod version of the OBJD misses the ObjectTypeFlags2
and also FloorCutOut* fields and LevelBelowOBJDIndex.
Lastly, a few entries in the general/generic TGIBlockList are different.

So, you save as new package the package with the OBJD with the higher Version, edit the OBJD
with Grid, commit changes, save. Then save again the preview and compare the CombinedVersion
of the OBJD text file with... well, with both the other 2 text files to make sure you did all correctly.

It's a pain in the ass and a very boring task, but should be doable using some care.
I'll do this for you (let me know if I did it correctly and it works in game), for other OBJDs
you can try the same method.
Attached files:
File Type: zip  bedDoubleEgypt2_objd_combined.package.zip (1.9 KB, 18 downloads) - View custom content
Department of Post-Mortem Communications
Original Poster
#7 Old 16th Feb 2015 at 2:12 PM
Hehe, talk about boring: the Store patch contains some 400 OBJD entries and as I have converted almost all of my Store stuff to .package I now have to update that manually and I own a lot of it. I'm still updating the bathtubs (remember that thread?) and have slowly approached those items that received modded changes by others. The fountains are on the list now and the fences will be next (expect another thread soon ) and the most annoying thing about the Store patch is that the names of the files are missing, so it's an absolute PITA to find out what the patch file actually modifies, unless there's a name reference in the patch file hidden somewhere. Not the case with all those RSLT files

But you are awesome. Thanks for having gone through that tedium. I'll get back to you. Lunch is finished and I'm off to work now.
Lab Assistant
#8 Old 16th Feb 2015 at 4:34 PM
Hey Don! Haven't played 3 since July but was curious about this and just opened up an old game....I think I'm up to date...1.67? and all my fountains seem to be working. I tested specifically the IP ones and the frog. So now I'm confused but if there is something I can do let me know. I don't use the launcher so maybe I'm behind in a store update??

Thanks, Syd
Department of Post-Mortem Communications
Original Poster
#9 Old 16th Feb 2015 at 5:13 PM Last edited by Don_Babilon : 16th Feb 2015 at 6:10 PM.
Quote: Originally posted by sydsyrious
Hey Don! Haven't played 3 since July but was curious about this and just opened up an old game....I think I'm up to date...1.67? and all my fountains seem to be working. I tested specifically the IP ones and the frog. So now I'm confused but if there is something I can do let me know. I don't use the launcher so maybe I'm behind in a store update??

Thanks, Syd
The issue is that the fountain fixes override not only the fountains but also the changed OBJD files in the Store patch. So all of those fixes that alter the OBJD resource (I think it's not all of them but yesterday I was checking the Sphinx fountain from the Explorer's Loot set and this one does) nullify the Store patch changes. The fixed fountains themselves work just fine, but they are now missing the entries that determine their behaviour outside when it's snowing, for example. I'll have to check in-game, but I guess they won't gather snow the way they should.
I discovered all of this after I had converted most of my Store to packages and suddenly all bathtubs suffered from the animal-teleporting-off-the-map bug. The fixes for these things are in the ContentPatch.package and all files in Mods/Package will override these.

Edit: In the case of the Sphinx fountain it means that without the patch resources the fountain will gather snow and have snow going under it, because the patch disables the object from gathering snow (ObjectTypeFlags2 0C BlockSnowUnderObjects set to True and 0D DisableObjectSnow set to True). This may, of course be preferable for some, but then there also these new entries FloorCutout... and LevelBelowOBJDIndex, that are missing in the fix, whatever they may do or not do.

Edit: @Arsil. I added your objd resource to the bed and it seems to be fine. I haven't really compared the different resource files with each other, because I'm still looking for a convenient program for doing so. Any recommendations?
Lab Assistant
#10 Old 16th Feb 2015 at 6:43 PM
Ok....that makes sense. I think I've been away from this for too long as it's a little "fuzzy". This made me think though....some of the fountain "fixes" were not actually fixes but I took basically a sculpture object, added a fountain driver and changed/added the rigging to make it a fountain. One example is the frog....this was never intended to be a fountain but many people thought it should be and so I did what I could. So I'm wondering....the store patch updates....do they interfere with the fountain?

Not sure but thanks for bringing this up and hopefully I'll have some time soon to update these or at least look into it.
Department of Post-Mortem Communications
Original Poster
#11 Old 16th Feb 2015 at 7:16 PM
I think it's rather the other way round: whatever is placed in Mods/Packages, i.e. your "fountains", will override anything that is in either DCCache, ContentPatch or the core files. The Frog Fountain changes the OBJK, _RIG and a VPXY resource, and as far as I remember the patch changes none of these in this case. Might have to check the VPXY, but I think I've gone through that already. The only "conflicts" are when OBJD resources have been changed in both the fix and the patch.
The patch contains only a small amount of _RIG and VPXY entries and only one OBJK. But users are not really affected anyway as the game will only read from your fix. They would just miss out on the additional changes in the frog fountain's OBJD entry which is in the patch, though.
It's easy to miss because the changes are only minimal and I've used your fountains for longer than I cared about the patch. They work.
Back to top