A curated forum for compatible and maintained mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
l3lessed wrote: ↑Tue Sep 28, 2021 9:39 pm
I'm so tempted to add a health property to their attached script and allow players to kill animals, because why not. Guess should focus on more important stuff first though. me and my ADD tendencies.
Speaking of feature creep, how involved would it be to add ragdolls? (Hypothetically speaking of course)
So far I was unable to add any animations to the base mod since I'm working on other things, though I also have 0 idea how to approach it. If there's anything I need to alter on the models, give me a heads up.
I'll be uploading the pig and dog with the rest of their animations sometime today.
That answers my question. I'm going to try to setup a proper animation controller for one of the prefab models and see if I can get the animation going.
According to all documentation, you need to add the animator controller component to the prefab, and then setup the controller for the model and its animations. The controller handles the transition between animations for the devs, so they don't need to have as much animation knowledge to ensure animations flow together properly. It also provides an easy object for the script itself to grab and use to control the animations.
I'm going to work on it some today between doing all my billing and other stuff. I don't imagine it would be to hard to get setup for a single tail swipe animation. We aren't talking about a complicated human body and animation system here, so I imagine it is easier.
Speaking of feature creep, how involved would it be to add ragdolls?
(Hypothetically speaking of course)
Hmm, honestly don't know. Would need to research this some. It may be simple as grabbing the proper object/component and flipping a property switch or it may be very complex. Without ragdoll, we could still have a decent death animation used, if someone can make it, for killing the animals.
Speaking of feature creep, how involved would it be to add ragdolls?
(Hypothetically speaking of course)
Hmm, honestly don't know. Would need to research this some. It may be simple as grabbing the proper object/component and flipping a property switch or it may be very complex. Without ragdoll, we could still have a decent death animation used, if someone can make it, for killing the animals.
Death animations are notoriously tedious to make look good, at least on a short notice. (though nothing prevents us to just update the models with better animations down the line either way) xD I've only done them for the enemy models so far.
If we go that route gimme a boop and I'll mention whenever I update the fbx-es with them.
Also, I might need to do a small material tweak, nothing special or big, just that each model uses its own.
Also, I might need to do a small material tweak, nothing special or big, just that each model uses its own.
Okay, maybe this is what is causing the texture randomization not working bug for models with more than one skinned mesh renderer. Maybe it is only looping through one of them because they are all sharing a material? I don't know, just a guess.
I'm going to sort out this bug before I move on to animations actually. Can you let me know when you update them to each have their own material so I can see if this affects the script at all? Maybe I'll try some tricks script side to see if I can check if this is the issue.
Didn't know that about death animations, but it makes sense because of how dynamic going into a death really is in life.
Also, I might need to do a small material tweak, nothing special or big, just that each model uses its own.
Okay, maybe this is what is causing the texture randomization not working bug for models with more than one skinned mesh renderer. Maybe it is only looping through one of them because they are all sharing a material? I don't know, just a guess.
I'm going to sort out this bug before I move on to animations actually. Can you let me know when you update them to each have their own material so I can see if this affects the script at all? Maybe I'll try some tricks script side to see if I can check if this is the issue.
Didn't know that about death animations, but it makes sense because of how dynamic going into a death really is in life.
New materials have been uploaded in the asset folder! Let's hope the issue is as simple as stated here.
Also no worries, I could spruce something up for the animations if the ragdolls won't work out lol.
Jay_H wrote: ↑Thu Sep 30, 2021 6:04 pm
Yes, death animations are very difficult to arrange properly. Just take this example to see how bad it looks when it's not implemented well
Animations are in. The animated controllers you attached allowed me to grab the animations and play them.
One small side note. You need to set the animations to legacy format because of how the engine is reading and importing them. Once you do this. it is an easy .GetComponent<Animation>() to pull it from the prefab it is embedded in and played. https://docs.unity3d.com/Manual/FBXImporter-Rig.html
Outside the bug with getting the script to attach to prefabs with multiple sub-models and meshes, I think I have the base features going for this mod which are these three things:
Dynamically Generated Varied Animal Skins: You will find in the streaming texture folder, a folder for this mod. Within that folder, you will find a sub-folder for each animal type. Within this folder is stored custom extra textures for said animal. There are already a number provided, but if you want to add any, merely create the new png texture, save it, drop it into the proper animal folder, and reload the game. It will get queued into the texture array to be pulled randomly.
Animated Models: Animations and their controller have been added and scripted into the horse model; all others will be added over the next few days of development. I will create a needed animation list for all models based on the behaviors I'm scripting in, and hopefully you amazing modelers/animators can start pumping them out.
Free Roaming Animals: I have built a simple roaming routine. The animal will be assigned a set bounding distance that keeps them from wondering outside its confines. The animal will then begin shooting out pahtfinding hit rays at random intervals and distances, looking for a valid spot to move to within the bounds. Once found, it will rotate and begin walk towards the target to simulate free roaming animals. This will be improved over time with more dynamic behaviors, like checking for water, roads, or other animals/npcs and avoiding them. Over time, this should build into a full follower pathfinding system that could be used to train and have these animals or anyone follow you around the world.
I'm going to start moving this to another thread, so it is easier to tract the script side issues and requests for the mod. I don't want to deluge this thread with things about the scripts or features.
Well, until I sort out what is happening with the ImportComponent issue, I have instituted a work around in the master script. Like I did in the minimap mod, it will scan the location for all flats and find any flat with an attached animation (all the animal models) and then detect if they are needing a script attached or not, and attaches it if so.
This is also why I'm pretty sure there isn't an issue with my script. It can be attached manually through script code, and the horses script runs without an issue.
The animals look much better and natural with their differing textures and animations going. I'll try to share a video some time today of it.
Did you say you have walk animations ready to drop into the prefabs and animation controller? Also, could we get a laying down animation for all the animals, so I can put it in for making the roaming seem to have a purpose and natural progression. I want to get them looped between a roaming behavior, a grazing behavior, and a resting/lying down behavior in first release. This will help heavily with immersion.