My team is switching to Unity 3D for an upcoming project. I'm tasked with converting our game data system into Unity.
Our existing games use spreadsheet documents (Google Docs) for designers to set values and formulas. This is then exported into an XML doc (and obfuscated) and read in by our game client. I'm trying to figure out a way to accomplish this same thing but solely through Unity. Storing, exposing, and reading data through Unity is pretty straightforward but I'm not sure on supporting formulas.
I realize I can write a custom parser and interpreter which can handle formulas but I'm wondering if there is already a way to do this in Unity.
For example, let's say I have a unit with various stats: Level
, Max HP
, HP
, Damage
, Victory Reward
, etc. That unit may receive a reward after combat which is based on its Level
and remaining HP
. A designer would be able to enter into the Victory Reward
field either a flat value, like 3, or a formula such as "Floor({Level} * ({HP} / {Max HP}))", something like that.
My question is basically, is there an existing solution for handling data with formulas in Unity, via a downloadable asset or something in Unity itself, or is there a simple framework or technology which already can do something like this which can be easily integrated (example: some kind of JSON extension which supports self-referencing other values and basic mathematical/logical operations)?