jfrazierjr wrote:
Well... one option is to serialize the Monster/PC object as an XML document. Then the end user could provide an XSLT to transform the XML content from one form to another based on the token's internal structure (or some other intermediary structure. This would make it fairly simple for thinks like skills, abilities, to be stored no matter what the target framework's property names are. The powers are the big ugly piece here. Some frameworks store the power directly on the token macro, others store a JSON description of the power on the token inside the macro, others store the JSON description in a token property, and others store a JSON description on a Lib token... I am sure there are other combos I am not thinking of right now.
I'm well away from getting here still, but I think this is a good idea. I'll probably provide some sort of simple XML output as a first step - using serialize as you suggest. People can then take them and run with them for their own frameworks in the short term.
I definitely want to be able to press a button and have it save a Token out of this tool when I'm all done. I suspect that the most likely approach I'll take here is to make myself a new Framework that this tool generates tokens for. As suggested earlier if I write an interface to represent "tokenizable" (!!!) then anyone can come along later and write a class to implement that interface for their own framework.
But this is way in the future!