Apr. 2-8: Varying NPCs

Jon: Howdy!

This past week, we decided to upgrade to the latest version of Unity (5.6) and like most updates, issues have popped up. Nevertheless, we are getting through them and we have also noticed a few fixes as a result of the update too! (They’ll be at the bottom under bug fixes section.)


NPC Types & Dialog Variation

Aside from updating the project, I spent most of my time setting up some differing NPC types. In the demo, I had only begun the avatar system and just figured out how I was going to go about setting up variations of NPCs. I did not want to make prefabs for every single variation, as there would be way too much overlap in components, and it would certainly be a pain to change any value on a component that they shared. My solution is the creation of ScriptableObjects that I call Decorators. The Decorators simply apply or perform a specific set of instructions (e.g. set avatar hair color,  give & equip sword, etc.) onto the base instanced NPC prefab via a middle-man script (MonoBehaviour). In other words, the middle-man script spawns the instance and applies the Decorators, setting up the instance.

Each NPC-type, for example an Alchemist, will appear in different clothing than a standard villager. They will also be more likely to give you information related to what they do, such as potions and alchemy for an Alchemist.

I began making an Alchemist, Smithy, Merchant, and Guard. They’ll each have a high chance of saying some different things more related to what they are and will have different attributes and equipment as well.

Unfortunately, I have also replaced the chicken merchants with actual merchants. They will be missed… For now. 🙂


Weapons: Next Texture Iterations

Broom, broom!

Andrew has been going back through some of the weapons & polishing up their appearances. The broom, for one, had a noticeable crease at the bottom (the frilly end) which has been smoothed/merged into one mesh & material.


Misc Improvements
  • Revive effect and enhancement sparkles will follow you, even as you ragdoll. Previously, they would stop following you once you went ragdoll.
  • Ragdoll recovery is now delayed if any of the ragdoll limbs’ velocities exceed a certain value.
  • Setup necks to detect collision, adding a collider. Previously, there was a slight gap between the head and torso where collisions could pass through…
  • Setup ragdoll character joint for the head to connect to the neck now. This causes some funnier head flopping when ragdolling.
  • Randomized equipment in containers now have varied condition values. They’re not always in mint condition.
  • NPCs play a talk animation when talking now.

Bug Fixes
  • The 5.6 update seems to have fixed the lefty attack animation bug. Lefties can now rejoice, once again!
  • Crouching or rolling through water no longer emits crazy sounds and particles. Previously, it seemed as though the scaling of colliders, e.g. crouching collider scaling, would cause constant trigger enter and exit events to occur.

Have a great weekend!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s