- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- How do you add custom poses and/or different facial expressions for custom Magic gnome?
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- How do you add custom poses and/or different facial expressions for custom Magic gnome?
Posts: 3,860
Thanks: 8536 in 67 Posts
Yes those annoying, but somewhat funny magic gnomes! I cloned a magic gnome for reference in S3OC, even a deep clone, but it didn't show me anything like a 'clip' file or something animated related. Am I suppose to look into these FullBuild/deltabuild to find those or are they packed differently?
Also, I actually want it to be able to switch facial expressions, but i'm not so sure how i'm suppose to do that. Here is the project I want to change into a magic gnome: http://greenplumbboblover.tumblr.co...ecret-valentine
Posts: 3,860
Thanks: 8536 in 67 Posts
So I came across these files that didn't come with the cloned version:
But from my knowledge, these are light datas and these placement viewable areas. (Footies?) So these can't be the actual file where the magic gnome would change position. Or does these gnomes work with geostates?
Posts: 997
Thanks: 22090 in 95 Posts
See the xml of a specific gnome for a list of models for each pose category (e.g. divergnome in GameplayData.package)
Posts: 3,860
Thanks: 8536 in 67 Posts
But now there is a next issue, can I extract these VXPY and put them in my own cloned project so I can recall them, edit the script with the names, and how do I add new meshes to the VXPY files?Is it also possible to somehow make the VXPY linked to a texture so it can switch expressions like I want to?
EDIT: Also, S3OC didn't clone the XML file with it, and I'm unable to find it in the Fullbuild/deltabuild packages.
Posts: 997
Thanks: 22090 in 95 Posts
Tuning xml resources (they are in GameplayData.package) are not cloned by S3OC (because they
are not referenced by any resource, they just have an InstanceId which is generated hashing the
fullclassname of the related class).
The VPXY is the resource which contains all references to meshes, LITE, _RIG, RSLT, FTPT and sometimes
a few other resources. The VPXY itself is referenced by the OBJK and of course only one (the default pose)
can be referenced.
You can clone (with renumbering and making sure to use a different random seed every time) the same gnome
a number of times equal to the poses you need (then you have to delete all the extra OBJD and OBJK, keeping
only a couple that will reference the default pose).
You have to check what kind of hashing is used to reference the model (the usual FNV64 or another one)
and then change the InstanceID of your VPXY resources (even the default one, so you'll have to
update the OBJK too) to match the unique names you'll use in the xml (the names in the xml have to be
the hashing keys to generate the IIDs).
To change facial expression with a texture, the first solution that comes to my mind is to use an overlay
texture. The problem is that textures are usually referenced by a complate (a preset, if you prefer),
so it would affect all the poses (because the presets are defined in the OBJD, unless they can also
be defined in the TXTC resources but I don't know mych about them). Usually a mesh who directly
references its texture(s) is the mesh of a non complatable (CASTable, if you prefer) object.
If you only want to change the facial expression of the custom gnome and you are not interested
in changing its pose, you could use material states. Instead of swapping the model, you only swap
the texture used. At that point, maybe you don't even need to use the gnomish code, but you'll still
need a script to take care of the swapping.
Posts: 3,860
Thanks: 8536 in 67 Posts
Posts: 3,860
Thanks: 8536 in 67 Posts
I was wondering if the value of 1.4 is actually the highest setting. Like say I want to chance the value to like 90% likely to happen, am I suppose to use like 1.3 or something? Or do these values go to 10.0 as in 100% chance? Like say the script says that the value is '0.6' does this mean it's a 60% chance? I understand the scripts I just never edited one. >-<
Posts: 997
Thanks: 22090 in 95 Posts
but I've removed the autospawning stuff and everything else related to cats.
Sims3.Gameplay.Objects.Environment.PusheenTheCat is the script name you have to put in the OBJK
The names you see in the xml for the poses (a comma separated list for each pose category)
are the hashing keys for the InstanceId of the VPXY resource.
Note: it doesn't use the classic FNV64 hashing but the FNV24 hashing, so to translate the string
that represent the name of the pose to an InstanceId you have to use, for example, douglasveiga's
tool (see http://modthesims.info/showthread.p...20#post4599020).
Example: MagicGnome --> 0x0000000000AAD39C
Note: I made your custom gnome BG compatible, but just for information, if you have to translate
a key to an InstanceId related to an EP, you have to use the EP related hex code as part of the IID
Example: MagicGnomePetCatSitting --> 0x0000000048CFF20E (48 being the Pets EP code)
EDIT
So, what you have to do is to modify the names of the poses in the xml, make them unique, something
like PusheenTheCatSitting, PusheenTheCatHappy, PusheenTheCatSad, etc
You can leave some of the categories empty ("") if you don't want to make too many poses.
Once you have decided, use these names has FNV24 hashing keys to generate the IID for the VPXY
resource of the related "pose". If you don't know how to correctly modify it, check the tutorial about the
custom plants/ingredients to see how to change both the "external" and the "internal" IID
(in VPXY resources it is in the ChunkEntry[0]). I don't thing it is necessary to also change the IID
of the meshes (MODL and MLOD(s) in this case, just the VPXY should be fine.
PusheenTheCatMagicGnome.package.zip (2.7 KB, 4 downloads) - View custom content | ||||||||||
3338 2016-06-23 18:49 PusheenTheCatMagicGnome.package --------- ------- 3338 1 file |
Posts: 3,860
Thanks: 8536 in 67 Posts
Also, one question. I saw some gnomes share more 'using' parts which this one only has the 'using Sims3.SimIFace;' one but other gnomes seem to use more of these. So say I would take some of the tunable comment from 'magicgnomefrance' do I also need to copy some of the usings? For example, say I want to copy the tunable comment. For example this one:
[Tunable, TunableComment("OBJECT DESIREABILITY: score multiplier for Fridge objects.")]
private static float kDesireForFridge = 1.5f;
(I know I need to adjust it with the XML file too just a script question) Do I need to add the using:
using Sims3.Gameplay.Objects.Appliances;
using Sims3.Gameplay.Objects.CookingObjects;
To the custom script? or can I just leave it as it is? (just before I make other people's game crash)
Posts: 997
Thanks: 22090 in 95 Posts
to write the full name of a class every time.
I don't know how to say this, but you can't just add random things hoping it will work.
That kDesireForFridge is probably related to some code that makes the gnome more likely
to be placed near a fridge. Just focus on the already hard multi meshing part and see if it
works, then you can try to add more stuff.
Posts: 3,860
Thanks: 8536 in 67 Posts
Generate the names with that tool (Must say i'm impressed how helpful this tool is! Thanks for showing it to me ^-^)
Making the models (MLODs and MODLs for each pose?) And add those to the VXPY files,
Edit the KEY file.
And with the custom food creating tutorial, I guess you meant this one?: http://modthesims.info/showthread.php?t=474083
Or the same page of where the tool can be downloaded? (http://modthesims.info/showthread.p...020#post4599020)
Posts: 997
Thanks: 22090 in 95 Posts
- clone twice an existing BG gnome creating 2 new packages, let's call them PusheenHappy.package and PusheenSad.package
- choose 2 names to put in the tuning xml of the gnome (e.g. PusheenTheCatHappy in one pose category and PusheenTheCatSad in another one, leave all the other categories empty: "")
- generate the 2 related IIDs using FNV24 hashing (douglasveiga's tool)
- change the IID of the VPXY resource in PusheenHappy.package using the IID generated with the key PusheenTheCatHappy
- double click on the VPXY resource and set the new Instance ID- update the OBJK to point to the new IID of the VPXY (and make sure it is using Sims3.Gameplay.Objects.Environment.PusheenTheCat as script name)
- (not sure if strictly needed) use Grid to change the "internal" IID of the resource (ChunkEntry[0])
- right click on the OBJK and select "Edit OBJK"- change the IID of the VPXY resource in PusheenSad.package using the IID generated with the key PusheenTheCatSad
- click on the button "TGI Blocks" on the bottom left
- put the new Instance ID in the "Instance" field
- update the OBJK to point to the new IID of the VPXY (well, this is not really needed, because when the work is done this will be deleted along with the OBJD in this package)
- test in game (you can use a debug interaction to force the gnome to change pose)
- once you verified that it works with 2 "poses", you can add new ones or start remeshing them
Posts: 997
Thanks: 22090 in 95 Posts
so, I don't know, do something to be able to notice the difference.
Posts: 3,860
Thanks: 8536 in 67 Posts
Posts: 3,860
Thanks: 8536 in 67 Posts
Ok, I'm an idiot. If the meshes are identical you won't see any difference when the gnome change the pose, so, I don't know, do something to be able to notice the difference. |
Oh no that's allright! I was thinking of changing the mesh so like a happy Pusheen you would have Pusheen's head tilt a but up, and it's tail up. (which is down in a default pose) So it would work. I'm going a bit deeper into the overlay trick since this same trick is used on the Vampire gnome (the colour of the eyes changes with an additive texture, but with the same trick, the overlay one should work the same) So I'll try applying that with the 'happy' pose.
I had some trouble changing the VXPY because it refused me, changing the MLOD Instance but I got that figured out.
Posts: 3,860
Thanks: 8536 in 67 Posts
But! We're close! After I used NRaas's 'Change pose' option, the textures switched. But now the next problem, the game doesn't read the sunshadows and the High LOD anymore. I changed the Instance inside the MLODs and the MODLs. Could that be the case?
Anyways, The script is working perfectly and here have a peek:
So it is possible to have an identical mesh with a different texture with your explanation. You just have to assign the texture to the mesh ^-^
Posts: 997
Thanks: 22090 in 95 Posts
For the texture, maybe you can also use a stencil, I guess it is very similar to an overlay texture,
but I admit I don't know much about these things, I'm sure you know better than me.
Are gnomes not CASTables? If so, then they probably already have the "link" to the texture resource
in their mesh, so it will be very easy to change the facial expression since every mesh
use a different texture and not a common one like objects with presets.
But it seems you already solved this, so why I keep talking about it?
You didn't have to change the IIDs of the meshes. That complicated things.
If you did, now you have to update the references to the MODL and MLOD in the VPXY.
And also the reference to the MLOD(s) in the MODL.
So, if I'm guessing correctly, the shadows and the HighDef mesh don't work because the MODL
references the old IID(s) of the MLOD(s).
To fix it, you have to Grid the MODL and edit the TGI (TypeGroupInstance) in the ChunkEntry[1]
(always check the preview of the resource for confirmation before doing anything to make sure
that you are editing the right thing).
You also have to use Grid again on the MODL, select the "Resources" row and click on the "..."
on the right. You can update the references of the MLODs from there.
As for having 2 objects in the catalog, that's normal.
At the end you will delete the extra OBJDs and OBJKs related to the not default pose
or simply hide them in the catalog:
- select the OBJD and use Grid
- click on the plus (+) sign in "Common Block"
- click on the plus (+) sign in "BuildBuyProductStatusFlags" and put false to ShowInCatalog
I suggest you to not delete them, because you may want to edit/clone them in the future.
So you better update the reference to the VPXY(s) also in the extra OBJK(s).
Until you are done, I suggest you to keep the different "poses" in different packages so
they are easier to manage and edit, only at the end you can put everything in one package
(but even then, keep the original separate packages as backup). GL.
Posts: 3,860
Thanks: 8536 in 67 Posts
You didn't have to change the IIDs of the meshes. That complicated things. If you did, now you have to update the references to the MODL and MLOD in the VPXY. And also the reference to the MLOD(s) in the MODL. So, if I'm guessing correctly, the shadows and the HighDef mesh don't work because the MODL references the old IID(s) of the MLOD(s). To fix it, you have to Grid the MODL and edit the TGI (TypeGroupInstance) in the ChunkEntry[1] (always check the preview of the resource for confirmation before doing anything to make sure that you are editing the right thing). You also have to use Grid again on the MODL, select the "Resources" row and click on the "..." on the right. You can update the references of the MLODs from there. |
Thats the weird thing here, I updated the Instances with that little tool, edited the recourses in all MLOD and MODL but it just only show the MLOD and not the sunshadows. I updated all the instances and they're all the same. Can that be the case? I also updated them with the VXPY Or... wait. The VXPY only asks for the MODL, should I add the highLOD to it too? In the VXPY I mean?
Posts: 997
Thanks: 22090 in 95 Posts
No, if it isn't already there, there's no reason to add it (unless the original object was bugged, but I doubt so).
Posts: 3,860
Thanks: 8536 in 67 Posts
Posts: 3,860
Thanks: 8536 in 67 Posts
Unless I should add the orginal TXTC file and change it's instance, add it to the VXPY (Since some packages do add them to the VXPY but some not) Unless they are suppose to be linked with the MLODS/MODL.
Who Posted
|