Hi Tony,
I love the asset and have been integrating it into my systems.
Currently I have been trying to integrate RPG style stats into the system and I have come across a hurdle.
I have overridden a lot of function in Faction member (especially EvaluateRumor()) to handle the change and the flexibility of your code has made it quite easy.
I have avoided overriding any other class at the moment.
Now, I feel the need to add more information to TraitDefinition like trait category, and probably a Scriptable Object to hold additional data that can be used in EvaluateRumor or ModifyPersonality.
I feel I have two choices,
1. Update TraitDefinition class
2. Create a TraitDefinitionV2 and Create a new Faction Database and all the following required classes.
Any suggestions that could result in the least amount of change.
TraitDefinition Override
Re: TraitDefinition Override
Hi,
The Rumor class has a customData field that can point to any type of object to hold extra data:
In the upcoming version 1.10.34 (planned for release this week) I'll add the same to TraitDefinition so you can add your own data.
The FactionDatabaseEditor class's methods are virtual. If you want to extend it to draw your extra data, you can make a subclass of FactionDatabase and a subclass of FactionDatabaseEditor that adds extra GUI drawing code to methods such as OnDrawPersonalityTraitDefListElement().
The Rumor class has a customData field that can point to any type of object to hold extra data:
Code: Select all
public object customData = null;
The FactionDatabaseEditor class's methods are virtual. If you want to extend it to draw your extra data, you can make a subclass of FactionDatabase and a subclass of FactionDatabaseEditor that adds extra GUI drawing code to methods such as OnDrawPersonalityTraitDefListElement().
Re: TraitDefinition Override
Thank you Tony.
You're awesome!
Wish you an amazing week.
You're awesome!
Wish you an amazing week.
Re: TraitDefinition Override
The update was delayed a bit (it should be available later this week), but I did have a chance to add this to TraitDefinition:
Note: It's a string so that it can be serialized properly when saving the FactionDatabase. If your custom object is serializable, you can use something like JsonUtility to serialize and deserialize it.
Code: Select all
public string customData = string.Empty;