Once upon a time, in a galaxy far, far away, Duplicants played an emotion animation when receiving certain effects. Such as "Sore Back", "Soggy Feet", "Sopping Wet", "Soiled Suit", "Popped Eardrums", etc.
But some time ago, these animations no longer played. After U43 update, if I remember correctly.
Currently, it looks like this:
But it should look like this:
I found the reason why the animations aren't playing. More precisely, a combination of several reasons. Let's talk about it.
Look at the Klei.AI.EffectInstance.RegisterEmote method.
These are two methods, almost identical, both need to be fixed.
The NegativeInfinity parameter value here means that the Reactable object will expire immediately. And the animation won't play. Should replace NegativeInfinity with some reasonable value, maybe 5f or 10f seconds.
Look at the RadiationMonitor.CheckRadiationLevel method. Here, too, should replace NegativeInfinity with some reasonable value.
Let's walk through the execution flow.
ReactionMonitor.Instance.AddSelfEmoteReactable calls ReactionMonitor.Instance.CanReact first.
It calls Klei.AI.Emote.IsValidForController. And this is the only place where Klei.AI.Emote.IsValidForController is called.
Look at the Klei.AI.Emote.IsValidForController method. There are three problems here.
1. This block of code at the beginning will always return false. Because the animController doesn't yet contain the required animation. Because the ApplyAnimOverrides / AddAnimOverrides hasn't been called yet. This block of code should be rethought or removed entirely.
2. I hope the screenshot explains everything clearly.
3. Should use kanimFileData.GetAnim(...).hash instead of kanimFileData.GetAnim(...).id here.
hash is a HashedString created based on anim.name
id is a HashedString created based on animFile.name + "." + anim.name
Using id for equality here will always return false.
Therefore, due to these three problems, the Klei.AI.Emote.IsValidForController method will always return false, the Reactable object won't be created at all, and the animation won't play.
Load the attached file, watch Catalina, and make sure that the emotion animations don't play when receiving effects.
-
3
-
2
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now