Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Help] Need some macro help

I'm currently using charsetattr and tokenmod for a couple of macros I'm making and have just about got it done. I'm just stuck on one thing. I need to either setup variables or something like it to get my macro to not be a bunch of drop down clicks. Currently, I have it so a dm or player can give a point to someone/themselves and it updates on their sheet. I also want this to update a token to an image corresponding to the current amount of points they have. I'm using tokenmod to do this by changing the token's image but I can't get this to work without having to have the person manually select the new number(image url). I need it to take the point value they have and subtract it by the amount of points they're gaining/losing (?{player}@hero_points - ?{points}) , then the part I'm stuck on, have that number refer to an image url and tokenid and apply it. Any help would be amazing! 
1656156901
David M.
Pro
API Scripter
I'm assuming this is related to your other posts about hero points, where the rollable table token (RTT) will be on a separate page. You can use the --ids tag to tell token-mod which token to affect. Something like this: !token-mod --ids -N5PZ0y_mgyeemFD2-Qu --set currentside|4  --ignore-selected where "4" above can be an inline roll or query value, and "-N5PZ0y_mgyeemFD2-Qu" will be replaced with the tokenid in question. You can also use a query for the tokenid so that real-world names, etc. can be used. You can find the token ids during setup by selecting the RTT and typing @{selected|token_id} into chat. You will need to make sure the "players can use ids" setting is set to true for token-mod, which can be done with this: !token-mod --config players-can-ids|on Note: the token_id is specific to an instance of the token. If you delete it and make a new copy it will have a new id and your macro will break until corrected. There is a way to use character_id instead of token_id but I'm pretty sure it only works for the current page (or active page if GM) and I think the default token would need to be set up as well. E.g. !token-mod --ids @{charNamePts|character_id} --set currentside|4  --ignore-selected --currentpage