Esoterica icon indicating copy to clipboard operation
Esoterica copied to clipboard

Variations and DataSets one-to-one?

Open erincatto opened this issue 3 years ago • 3 comments

It seems these are one-to-one at runtime. Should the data set be embedded in the variation? This might simplify the code.

erincatto avatar Aug 20 '22 22:08 erincatto

It makes sense to keep the dataset separate from the variation as you dont want to be passing the graph definition everywhere you need the dataset. It just exposes more data than needed and can promote people doing nasty things since they have access to the data.

I'm not sure it will really simplify the code as the dataset is a virtual resource that gets generated during the compile step. The only thing that will simplify is I would have one less structure on the runtime side but as I mentioned, that's kinda preferable.

One thing I was thinking about doing was to still keep the dataset structure separate but generate it at the install step rather than actually load it from a resource. Right now loading a graph variation is loading 3 resource (var, def, dataset). I was considering just flattening the dataset into the serialized data for the variation since as you said it's 1-to-1. I'll play with that idea this week :)

BobbyAnguelov avatar Aug 21 '22 19:08 BobbyAnguelov

Sounds reasonable. And yeah, I was also thinking about the number of separate resource loads.

BTW, I really like the design of the variation and how they are visible within the graph editor. I also like how it is an override system with hierarchy.

erincatto avatar Aug 21 '22 20:08 erincatto

One thing that might not be clear and I find really useful is inverting the dataset concept. Where in the default dataset you set up data and then in the derived version, you can clear it if that "archetype" doesnt have that feature. It's a really useful tool for memory optimization.

i.e. You have a grunt that does melee and range, then you might have an enraged grunt with no ranged so you can easily just empty out all the entries under the ranged tree.

That said, there are a lot of usability tools missing from the variation editor in Esoterica atm (bulk clear, etc...)

BobbyAnguelov avatar Aug 22 '22 14:08 BobbyAnguelov

I just pushed some improvements to the variations. Editing should now work a lot better, I fixed a bunch of dumb mistakes and crashes. It seems the variation feature was in a half-finished state. sigh...

Anyways, it's working and roughly tested now! :)

I also moved the dataset to be serialized with the graph variation to remove the pointless resource load.

BobbyAnguelov avatar Aug 22 '22 20:08 BobbyAnguelov