Riley D.
said: This is a neat idea. Two things I'll say: 1) This may not work so well, since the GM Notes field has some formatting that's applied to it whenever you save the Character. So the data in that field could easily get destroyed if you open up the Character and click "save". 2) In addition to the global "state" object being persisted, I'm considering adding a special property on each object that is specifically to be used to store information by API scripts. Do you think it makes more sense to just let people use the sate variable (e.g. state[token.id] = {}) or to have a specific per-object property? Glad that you're diving in! :-)
I just made this as a quick temp workaround, but I will
double check I don't get any errors when saving the roll20 obj from in roll20.
I think a simple hidden text field called apidata or something on every object
would be more than enough storage for what most people need, although it would be nice to have the state to store more global things and a field for each object to store things just relating to it.
I’m just working on a way to let multiple scripts save to the same object
without overriding.