Tips for animating an AI that does a lot of things

I’m working on some AI NPCs that do many different things (over a network, too). For example, they are idle, walk, swim, wait, pray, talk, dance, build, fight, etc etc.

Does anyone have any advice on how to set this up nicely/properly? For example, if the NPC is walking, it will smoothly transition into swimming or talking or dancing. If it is dancing, it could smoothly transition into fighting or back to walking, etc etc.

Do I use a state machine with booleans to trigger the anims and a few dozen sloppy connections coming from the AIs idle or walking animations?
Do I make a ton of unique blends for each possible scenario and then add them to a montage somehow?

Any way I can think of it seems a little sloppy and probably difficult to work with and replicate. Any advice?

I would just use mostly the locomotion state machine. Using montages of course gives you more control by using slots for upper/lower body transitions. The combination of both the state machine and montages is probably what you will want to do which takes more time but will give you the best control. Epic’s tutorial series about montages goes through most of what you are talking about and would be a great reference for building out your AI’s anim-graph.

You have probably already watched this, but here ya go, videos 7-20 cover most of the stuff.

Thanks so much. Yeah those tutorials are how I got started with this. I have a state machine but it just looks so unruly and there are weird issues sometimes with replication. It looks like the image I attached below. Everything is triggered pretty much by booleans in BT tasks. There are still around a dozen more states to add off the idle/run state. I don’t even know if they’ll fit. Am I way off track?
Thanks again!