- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Adding ObjectTypeFlags2 to an existing object
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Adding ObjectTypeFlags2 to an existing object
Replies: 10 (Who?), Viewed: 1100 times.
#1
16th Feb 2015 at 10:18 AM
Posts: 6,839
Thanks: 1343 in 7 Posts
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
#2
16th Feb 2015 at 10:49 AM
Last edited by Arsil : 16th Feb 2015 at 11:07 AM.
Posts: 997
Thanks: 22102 in 95 Posts
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?).
#3
16th Feb 2015 at 11:24 AM
Posts: 6,839
Thanks: 1343 in 7 Posts
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...) |
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?). |
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
#4
16th Feb 2015 at 12:11 PM
Posts: 997
Thanks: 22102 in 95 Posts
Of course I'm nicer than you think I am, what were you thinking?
I'd also like to use your sim/avatar as anchorman for an "All News" custom TV channel.
I just became creepy, didn't I? The thing is that even if we don't know each other well,
I find you likable, polite, very competent about TS3 and, last but not least, your avatar
is awesome, so I think he'll make a good journalist :P
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.
I'd also like to use your sim/avatar as anchorman for an "All News" custom TV channel.
I just became creepy, didn't I? The thing is that even if we don't know each other well,
I find you likable, polite, very competent about TS3 and, last but not least, your avatar
is awesome, so I think he'll make a good journalist :P
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.
#5
16th Feb 2015 at 12:33 PM
Last edited by Don_Babilon : 16th Feb 2015 at 1:37 PM.
Posts: 6,839
Thanks: 1343 in 7 Posts
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.
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:
Archive.zip (3.8 KB, 7 downloads) - View custom content | ||||||||||||||
2069 02-16-2015 07:02 bedDoubleEgypt2_objd_frommod.package 2049 02-15-2015 13:13 bedDoubleEgypt2_objd_frompatch.package --------- ------- 4118 2 files |
#6
16th Feb 2015 at 1:54 PM
Posts: 997
Thanks: 22102 in 95 Posts
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.
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:
bedDoubleEgypt2_objd_combined.package.zip (1.9 KB, 18 downloads) - View custom content | ||||||||||
2079 02-16-2015 14:52 bedDoubleEgypt2_objd_combined.package --------- ------- 2079 1 file |
#7
16th Feb 2015 at 2:12 PM
Posts: 6,839
Thanks: 1343 in 7 Posts
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.
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.
#8
16th Feb 2015 at 4:34 PM
Posts: 216
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
Thanks, Syd
#9
16th Feb 2015 at 5:13 PM
Last edited by Don_Babilon : 16th Feb 2015 at 6:10 PM.
Posts: 6,839
Thanks: 1343 in 7 Posts
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 |
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?
#10
16th Feb 2015 at 6:43 PM
Posts: 216
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.
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.
#11
16th Feb 2015 at 7:16 PM
Posts: 6,839
Thanks: 1343 in 7 Posts
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.
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.
Who Posted
|