Alright, I've re-and-re-and-re-read the wiki, forum posts, etc. Got a good feel of where maptool is right now (whoa, some nice things happening with the onTokenMove() stuff... I agree, we'll have to work something like the Drag&Drop teleport pads in).
So, I'm going to re-do the GM and Player's Character Sheets, as well as the token.property structure (to allow total drag&drop, so staying away from Campaign Properties and 'Token Types'... although I'll probably make my own type property to re-create the function).
So, first up, let me sketch out the token property structure. I saw else-where that property names support dot.syntax, so we'll be using that. The format will be "ed3.*.*", and I'll try to only go 3 (maybe 4) levels deep with the naming.
Code:
[H: id = getSelected()]
[H: attributes = "dex,str,tou,per,wil,cha"]
[H: dexStep = 6]
[H: strStep = 5]
[H: touStep = 6]
[H: perStep = 5]
[H: wilStep = 6]
[H: chaStep = 5]
[H, FOREACH(attr, attributes), CODE: {
[H: varName = attr+"Step"]
[H: varValue = eval(varName)]
[H: setProperty("ed3."+attr+".step", varValue, id)]
}]
[R, FOREACH(attr, attributes, "<br>"): getProperty("ed3."+attr+".step", id)]
That seemed to work when I ran it. Cool.
Hopefully, this convention and some documentation on property names will allow anyone who desires to write their own macros an easy way to hook them in. As a note, most properties that represent a Step will also have a corresponding Mod(ification) property, just to store data on the token. Such as "ed3.dex.step" & "ed3.dex.mod"... both of which would be used in the calculation of "ed3.init.step", and then there would be an additional "ed3.init.mod" on top of that to modify the Init on the fly.
As such, the properties as seen on the character sheet will probably be a variable that calculates, say:
Code:
[H: dexStep = getProperty(ed3.dex.step) + getProperty(ed3.dex.mod)]
I'm going to try to keep token properties for data storage, and use UDFs to call static data. So, the Rank of talents would be stored on a token, but the references to the base Attribute used, or if it costs Karma or Strain will be on the library token.
In this way, you should be able to write a macro to grab the "ed3.disciplinetalents" and "ed3.othertalents" arrays, cycle through them to find "Flame Arrow" (noting which Index in which Array it's at), using that index to go to "ed3.disciplinetalents.[index]" or "ed3.othertalents.[index]", and using the json Object there' Keys to grab the "Rank" and then add it to the base Attr, and roll the final Step to determine a Result.
And this macro would be droppable onto any character that had Flame Arrow, and it would work!
So, a beginning list of Properties would look like:
ed3.dex.value
ed3.dex.step
ed3.dex.mod
ed3.init
ed3.mod
etc
Still kinda working on the exact Token property structure. Also working on structuring the GM tables to store in properties on the Lib token....