I need to build a script to calculate damage based on variables in both the selected and targeted token, but it will require an amount of if/then statements that I can't do with macros. I've got some scripting experience, but I'm struggling with the syntax. obj.selected pulls up an array of objects, and I can't figure out how to select just one (or just the first one). And the documentation doesn't show how you can retrieve the list of attributes from a character ID anyway. I can't find a sample script with enough commenting to figure out what's going on. Could someone put together or point me at a script that retrieves a specific attribute from a selected token's represented character, and a targeted token's represented character? Something with decent comments would be preferred. I feel like I could get the rest of the way if I just had a 'this is how you access the attribute', as after that I just have to evaluate and output to chat. I should be able to figure the rest out from there. Does anyone have a script handy that I can use as an example? Thank you for any help you can offer.