Jump to content

Disabling Grass animation.


Recommended Posts

I've looked around the forum and i couldn't find a single solution for the problem, basically. when the grass in the grass farm is fully grown and it starts rustling. the frame rate drops from 60 to around 45 which affects the performance of other players on my game *when i am the one hosting* tried overriding the animation argument but the grass still rustles. any help would be appreciated?

Link to comment
Share on other sites

I highly doubt it's the fault of the animation. Sounds more like some mod might be checking a lot of things on all workable/pickable entities in the area or something, and you'd need a lot of entities to cause the kind of fps drop you're talking about.

To test if the animations are indeed the culprit, you can override the two functions in the grass-lua which do PushAnimation("idle") and change it to "dead" or something. They are the "ondiseasedfn" and the "onregenfn". Also, since it always starts out spawning with the "idle" animation running, in your postinit you need to also push the "dead" animation. For a test-mod you don't need to worry too much about simply copy/pasting and changing the code, and just completely overriding the original functions. This would just be to test whether the animations are indeed the problem, or if it's something else.

Link to comment
Share on other sites

1 hour ago, Frustal said:

that fixed the issue, thanks a lot!

You're welcome, but it's an astronomically bad idea to fix it that way. Incompatibility rate with other mods is high, and it'll break the game if Klei makes changes to those functions, and all your grass will always look dead.

The best way to fix it, would probably be to make a custom version of the grass idle animation which only has 1 frame in it, and then replace the animation in the AnimState. I don't know how to do that, but I'm sure there are posts about replacing animations somewhere.

Edited by Ultroman
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...