- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Props/accessories in animations
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Props/accessories in animations
Replies: 6 (Who?), Viewed: 530 times.
#1
1st Apr 2021 at 4:38 AM
Last edited by echoweaver : 1st Apr 2021 at 4:56 PM.
Posts: 978
Thanks: 1928 in 13 Posts
Props/accessories in animations
So, my cat fishing skill is at the stage of high effort for small tweaks. Here's one that bugs me -- the animation for a cat catching a fish uses a generic fish prop. So if your cat catches a toad or a shark, they still walk out of the water with a sardine-sized tail sticking out of their mouth.So I tried (sort of accidentally) to use the actual model of the fish caught with this animation. Unfortunately, those fish seem to have their "attachment point," for lack of a better word, at the mouth. So, the cat's mouth attaches to the fish's mouth, and you get the unfortunate second screenshot I attached.
So, I'm curious -- might there be a way to turn that fish to a proper position for a cat carrying something in its mouth. I'm all right if huge fish are huge. A cat happily trotting out of the water with a tuna four times its size is pretty entertaining .
Code-wise, we're talking about
Code:
for the generic fish and SetModel ("accessoryCatHuntFish")
Code:
for the fish you see when a human catches a fish.
SetModel (fishobject.ModelName)
Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Advertisement
#2
1st Apr 2021 at 12:24 PM
Posts: 3,860
Thanks: 8546 in 67 Posts
Quote: Originally posted by echoweaver
So, my cat fishing skill is at the stage of high effort for small tweaks. Here's one that bugs me -- the animation for a cat catching a fish uses a generic fish prop. So if your cat catches a toad or a shark, they still walk out of the water with a sardine-sized tail sticking out of their mouth. So I tried (sort of accidentally) to use the actual model of the fish caught with this animation. Unfortunately, those fish seem to have their "attachment point," for lack of a better word, at the mouth. So, the cat's mouth attaches to the fish's mouth, and you get the unfortunate second screenshot I attached. So, I'm curious -- might there be a way to turn that fish to a proper position for a cat carrying something in its mouth. I'm all right if huge fish are huge. A cat happily trotting out of the water with a tuna four times its size is pretty entertaining . Code-wise, we're talking about
Code:
for the generic fish and SetModel ("accessoryCatHuntFish")
Code:
for the fish you see when a human catches a fish. I
SetModel (fishobject.ModelName) |
there are two things you can do here:
1. Programmatically turn the positioning.
2. Use the fish's rig (they're all the same) and create a small animation for it/CLIP file. Although it could screw up the IK targets (which is the positioning you're talking about)
So technically you should be able to do something like:
Code:
And so you can also do this with rotation, forward, etc //switch position Vector3 position = Vector3(Add whatever position you'd want it to be ); fishobject.Position = position;
I'm actually writing this away from my home PC so I actually don't know if the Vector3 thing would work so I might edit this later :p
#3
1st Apr 2021 at 5:08 PM
Last edited by echoweaver : 1st Apr 2021 at 5:28 PM.
Posts: 978
Thanks: 1928 in 13 Posts
Well, this gives me stuff to experiment with. Thanks! If you have more insight, I'll be delighted to have it . I don't know how I'd define the vector.
It looks like there a few useful methods here. There's both GetPositionOfSlot AND GetSlotPosition (I need to see what, if any, differences there). Also Get/Set Position and SetRotation. Those sound very promising. There's also GetNearestSlot, which takes a Sim as an input. I'm assuming a "slot" is the right thing here, which might not be true.
I have never attempted to make any animation. I have converted adult animations to child using Blender, but that's about it. I don't know how I'd even get the fish rig. Which doesn't mean I'm not willing to take it on
Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
It looks like there a few useful methods here. There's both GetPositionOfSlot AND GetSlotPosition (I need to see what, if any, differences there). Also Get/Set Position and SetRotation. Those sound very promising. There's also GetNearestSlot, which takes a Sim as an input. I'm assuming a "slot" is the right thing here, which might not be true.
I have never attempted to make any animation. I have converted adult animations to child using Blender, but that's about it. I don't know how I'd even get the fish rig. Which doesn't mean I'm not willing to take it on
Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
#4
2nd Apr 2021 at 1:28 AM
Posts: 978
Thanks: 1928 in 13 Posts
So, if you weren't scared before, here's my most recent attempt to mess around with fish positioning.
The more frightening things is that I think the test worked....
Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
The more frightening things is that I think the test worked....
Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Field Researcher
#5
2nd Apr 2021 at 1:38 AM
Oh nooo
This looks like it's going to be awesome though, nightmare toad aside
This looks like it's going to be awesome though, nightmare toad aside
#6
2nd Apr 2021 at 2:20 PM
Last edited by echoweaver : 2nd Apr 2021 at 2:39 PM.
Reason: Added code example
Posts: 978
Thanks: 1928 in 13 Posts
Well, grump, I guess those test weren't working after all. I've tried a bunch of increasingly extreme position values without meaningful change in the caught fish position.
Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Code:
Fish fish = Fish.CreateFishOfRandomWeight(fishType, Actor.SimDescription); string message = skill.RegisterCaughtPrey(fish, TerrainIsWaterPond); if (fish.CatHuntingComponent != null) { fish.CatHuntingComponent.SetCatcher(Actor); } fish.UpdateVisualState(CatHuntingComponent.CatHuntingModelState.InInventory); fish.SetPosition(fish.Position.x + 500f, fish.Position.z + 100f); // THIS LINE IS THE TEST CODE SetActor("fish", fish); mNumberFishCaught++; if (Actor.Motives.GetValue(CommodityKind.Hunger) <= EWCatFishHere.kEatFishHungerThreshold) { // Notify if cat eats caught fish message += Localization.LocalizeString("Gameplay/Abstracts/ScriptObject/CatFishHere:EatFishTns", Actor, fish.GetLocalizedName(), fish.Weight); Actor.ShowTNSIfSelectable(message, NotificationStyle.kGameMessagePositive); AnimateSim("ExitEat"); fish.Destroy(); Actor.Motives.ChangeValue(CommodityKind.Hunger, EWCatFishHere.kHungerGainFromEating); } else { if (message != "") { // Notify if the fish is interesting (new type or weight record) message += Localization.LocalizeString("Gameplay/Abstracts/ScriptObject/CatFishHere:PutFishInInventoryTns", Actor, fish.GetLocalizedName(), fish.Weight); Actor.ShowTNSIfSelectable(message, NotificationStyle.kGameMessagePositive); } AnimateSim("ExitInventory"); fish.UpdateVisualState(CatHuntingComponent.CatHuntingModelState.InInventory); if (!Actor.Inventory.TryToAdd(fish)) { fish.Destroy(); } }
Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
#7
11th Apr 2021 at 4:21 AM
Posts: 978
Thanks: 1928 in 13 Posts
So this seems like a tutorial in the direction of what it might take to replace the generic fish prop? https://modthesims.info/t/469283
The thing is I'd really like to be able to use the existing fish model, since I'm not going to be able to clone every single fish in the game.
I've only started reading this tutorial to see if it will give me info I can use.
Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
The thing is I'd really like to be able to use the existing fish model, since I'm not going to be able to clone every single fish in the game.
I've only started reading this tutorial to see if it will give me info I can use.
Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Who Posted
|