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
Test Subject
Original Poster
#1 Old 15th Nov 2014 at 1:34 AM
Default Emmiting effects in animations
I was experimenting with EA base-game animations and noticed the one where the Sim wipes sweat from their brow. An effect plays at the end, a drop of water falling from their hand. I modified the animation in Blender with Sim Clip Tool and noticed that as long as I used the original animation file as the "Base Clip" in Sim Clip Tool, the stuff from the Grid, including the water effect, is correctly retained.

I've seen Cmo's cigarette mod obviously, but never knew you might be able to emit effects right from the Sim. Would it be possible to take greater control of that? Maybe emit smoke, or other particle effects from the hand to imitate magic in custom interactions? Would it be possible to change the spot where the effect is emitting from? Lasers from the eyes?
Advertisement
Test Subject
Original Poster
#2 Old 15th Nov 2014 at 3:17 AM
I know this will have alot to do with the Grid in S3PE but I just don't have much of an idea where to look for reference. While poking around I discovered the meaning of a few 'Unknown' values in the the Grid. Under the EffectEvent values there are "Unknown 1" and "Unknown 2". They combine to make a hash of the EventName.

Example CLIP: a2o_bathtub_takeBath_spaJets_bathtub

EventName: spaJets
FNV64 hash of "spaJets": 0xA3F62C45C3E8A495
"Unknown02": 0xA3F62C45
"Unknown01": 0xC3E8A495

Thats the eventname, fine. But where's the EffectNameHash coming from? or SlotNameHash? Thanks in advance for any insight.
Inventor
#3 Old 15th Nov 2014 at 8:22 AM Last edited by Arsil : 16th Nov 2014 at 7:28 AM.
I know nothing about it, I'm just speculating.

Since it's the bathtub's animation, I guess the SlotNameHash is one of the joints of the bathtub_rig
(or anyway the _RIG resource of the specific bathtub used in the interaction, they are all in FullBuild0
for the basegame bathtubs) and could be used to specify the position where the special effect takes
place but when I try to open the _RIG with the rig editor of S3PE I got an error so I can't confirm it.
EDIT: or not, see my next post.

The Unknown02 and Unknown01 fields are not always present in a "Events" section of a CLIP,
and even if they are both present they are not always the combined fnv64 hash of the event-name.
Trying to hash "candle_smoke" and "eplincensesmoke" I found out that their hash correspond to the
EffectNameHash. So it seems that sometimes the name of the effect is hashed with FNV32 in
EffectNameHash, sometimes is hashed with FNV64 in the combined Unknown02/01 fields.

I'm sure my grammar was pretty bad there, sorry.

I don't know if this modding corner has been fully explored or is still dark,
I wish you good luck with your laser from the eyes
Test Subject
Original Poster
#4 Old 15th Nov 2014 at 4:59 PM


I set myself up for that one. But I found it rolling through the FullBuild looking for a CLIP with an EffectEvent, I've actually no interest in that rig. I do think I need to learn more about the rig names for the Sims though, I'll check into the Rig editor. I'm probably just going to need to take a base clip with an effect and slowly try to modify stuff. See what I can break.
Inventor
#5 Old 16th Nov 2014 at 7:54 AM
I don't know what I was thinking yesterday when I replied, the SlotNameHash,
as its name suggests, more likely refers to a slot defined in the RSLT of the
bathtub (called bathtub_rig like the _RIG, this also in FullBuild0).

In that RSLT resource (or, again, in the one specific to the bathtub used for the
interaction/animations) there's a section dedicated to special effects that contains
two entries:

SlotName: 0x318A282C
BoneName: 0x0B5A5599
Coordinates: ...

SlotName: 0x318A282C
BoneName: 0xA426BAF6 (this is the one quoted in the CLIP)
Coordinates: ...

Mmm... since the reference is to the BoneName and not to the SlotName
maybe we have to go back to the _RIG again...
EDIT: or slots too have joints/bones, I don't know, I just wanted to play TS3,
how did I get involved in all this?

Maybe even the following section about the inverted kinetics target has to do with
the special effect, but that is really unknown territory for me.
Test Subject
Original Poster
#6 Old 16th Nov 2014 at 5:40 PM
Quote:
or slots too have joints/bones, I don't know, I just wanted to play TS3, how did I get involved in all this?


I feel that! For the moment I've abandoned the Grid and moved to scripting it. I'm experimenting with the calls from StartDripFX() in the Sims3StoreObjects class. So far so OK. But Sim.FXJoints in Visual Studio will give you the FX joint list (slots? ), then you can basically say:
effect = VisualEffect.Create(), effect.ParentTo(sim, joint) and effect.Start()

I assume that if the effect won't play on .Start(), it probably won't play even if hard-coded into the CLIP. Thanks for all your help.
Test Subject
Original Poster
#7 Old 24th Nov 2014 at 8:39 AM


Code:
 internal sealed class mouthSmokeEffect : Interaction<Sim, Sim>
    {
        public static readonly InteractionDefinition Singleton = new Definition();
        protected override bool Run()
        {

            VisualEffect EffectMouth = VisualEffect.Create("ep7BuffSpicyMouthFlame_main");
            EffectMouth.ParentTo(base.Actor, Sim.FXJoints.Head);
            EffectMouth.Start();
            base.Actor.PlaySoloAnimation("a_trait_hotHeaded");           
            return true;
        }
        [DoesntRequireTuning]
        private sealed class Definition : InteractionDefinition<Sim, Sim, mouthSmokeEffect>
        {
            protected override string GetInteractionName(Sim actor, Sim target, InteractionObjectPair interaction)
            {
                return "Scream!";
            }
            protected override bool Test(Sim actor, Sim target, bool IsAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                return actor.SimDescription.IsHuman;
            }
        }
    } 
Inventor
#8 Old 24th Nov 2014 at 10:06 AM
Nice! Good job and thanks for sharing.

Are the two animations (the sim's one and the special effect one) always
synchronized and well matched together while playing or only on some frames?

Have you tried with the "mouth fx joint" like the Zzzz special effect when sims sleep?
Wait, I'll search the exact name...
Code:
mZzz.ParentTo(this.Actor, Sim.ContainmentSlots.Mouth);


In what circumstance and by who is that special effect originally used for?
I don't have Supernaturals and can't figure it out by its name (maybe after
eating some spicy food?).
Test Subject
Original Poster
#9 Old 24th Nov 2014 at 10:23 AM
Quote: Originally posted by Arsil
Are the two animations (the sim's one and the special effect one) always synchronized and well matched together

No, it would be better to play a setup animation, .Start() the effect, then immediately play the main one.

Quote: Originally posted by Arsil
Have you tried with the "mouth fx joint" like the Zzzz special effect when sims sleep?

Hmm... ContainmentSlots instead of FXJoints. Yay, more confusion.

Quote: Originally posted by Arsil
In what circumstance and by who is that special effect originally used for?

CreateEffectsAndPrepForAnimation() in Sims3.Gameplay.ActorSystems.BuffTooSpicy
Inventor
#10 Old 24th Nov 2014 at 10:39 AM
Quote: Originally posted by brando130
CreateEffectsAndPrepForAnimation() in Sims3.Gameplay.ActorSystems.BuffTooSpicy


Hihi, I didn't mean that, my question was more like "in what game[play] circumstance" is that FX used.
Back to top