Thanks! TokenMod is one of my favorite scripts. The biggest problem with "move forward" from TokenMod's perspective is "What is forward?" Sometimes it will be in the "up" direction, sometimes it will be in the "down" direction, and it depends on the graphic, which can't be directly determined by TokenMod. What I could do is take the "forward" direction as an angle offset from up, and assume a 0º offset if it's not specified. Something like: !token-mod --move 10 !token-mod --move 180|10 to move 10 units in the "up" direction for the first and 10 units in the "down" direction for the second. Regarding API scripts, they are completely Event Driven. Most scripts respond to the on('chat:message',...) event, which is then parsed for chat commands (where msg.type==='api' usually). There are other events based on things happening on the tabletop, such as on('change:graphic',...) or on('change:graphic:rotation',...) and the like. Generally, a player (including the gm) will activate a script from the chat or via a macro/ability (which is identical from the script's perspective). One common gotcha for new scripters is that the api receives the result of evaluating the chat message, not what was typed in. For example: !cmd @{selected|token_name} [[2d6]] will send this as msg.content (for Beholder 1 being selected): !cmd Beholder 1 $[[0]] The rest of the data for the roll and such is on the msg object, but you won't know where some things come from (there's no way to know about @{selected|token_name} for example, just the expanded contents). The full msg object for the above looks like this: {
"content": "!cmd Beholder 1 $[[0]]",
"inlinerolls": [
{
"expression": "2d6",
"results": {
"resultType": "sum",
"rolls": [
{
"dice": 2,
"results": [
{
"v": 5
},
{
"v": 2
}
],
"rollid": "-L0oqpuKnKqPi_mj_eKS",
"sides": 6,
"type": "R"
}
],
"total": 7,
"type": "V"
},
"rollid": "-L0oqpuKnKqPi_mj_eKS",
"signature": "641eb1ae7415cf2f954a09aa74108bd94b1ce8f2ff0def6926b7a5ae09a58947deac7395eb84e0dadd62abb2fed3af36316ab809732fa54ed8dd0f897bce5e1a",
"tdseed": 8304631734064763000
}
],
"playerid": "-JS3qKxIUPHLzSbK24ve",
"selected": [
{
"_id": "-L-WpTltXgC_N6RAtk_O",
"_type": "graphic"
}
],
"type": "api",
"who": "The Aaron (GM)"
}
Hope that helps?