Frequently Alphabetized Quandaries

How do I make my damage scale with Strength?

The system manages the value of Attributes, but you are responsible for actually doing things with those values. If you have some class that calculates damage then you can ask the Attributes class for the value of strength and multiply your damage by strength.

int myDmgOutput = (int)(myBaseDamage * myAttributesClass.Get(AttType.Strength));

Want to use the base/start value of their stat instead of their 'leveled and modified' current value?

int myDmgOutput = (int)(myBaseDamage * myAttributesClass.GetBase(AttType.Strength));

How do I extend AgentVitals?

The class is virtual, along with it's methods. Create a new class and inherit from AgentVitals, then use override methods to make them behave differently when called. This protects you from product updates changing the classes and destroying your work.

For best results, also override AgentAttributes.

How do I make more Attributes Types?

As of 1.0.2 [Tools > Cleverous > Attributes > Attributes Configurator]

The configurator can Add, Remove, Reorder and Rename attribute types and automagically update the entire project! Wow!

Please note the verbiage after pressing Save, as changing these data points are non trivial changes to your project! The biggest caveat is that we cannot refactor project code, so if you reference AttType.HealthMax somewhere but renamed it to AttType.HpMax then your Save is not going to compile until you track down those errors everywhere and fix them. Rare fringe case issues with git branch merges not matching the trunk structure but dummy data is used in those cases.

Other than that it's basically magic.

How do I make my characters have Health and Attributes?

Add two components: AgentVitals and AgentAttributes. Using a manager component of your own that implements IAttributeUser on the same GameObject is highly recommended.

How do I support Multiplayer with Mirror?

Partial support is available now, just import Mirror to the project and it will read the compiler directives to enable syncing the Vitals class over the network. We plan to support this more fully in the future.

Can I make my own game by reskinning the demo content?

The Vitals and Attributes system is fully production ready.

The other Character demo content such as castables, input, etc... is not intended for production. It is strictly intended for demonstration purposes. You should look at how this content works and create your own implementation of it.

Conceptually, the demo shows that it is not difficult to build skill systems that interface with Vitals and Attributes. If you need help implementing your own extension systems feel free to reach out for help on our Discord channel.

Why have StrikeNode.cs if AgentVitals.cs is already IDamageable?

This was done to support location based damage, primarily. You can use StrikeNode for very precise damage hitboxes or just use the AgentVitals class instead and use a big capsule collider for the entire character. Using Layers to filter which colliders are affected by navigation and which are affected by damage scans, this combo system becomes very flexible and supports many use cases. Get creative!

If you have questions, feel free to drop by our Discord Channel.

Last updated