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

TokenMod - Token image swapping, but without needing to select.

1708306701

Edited 1708306744
As per the wiki: !token-mod --set imgsrc|@{target|token_id} --ids @{selected|token_id} will let me change the image of a selected token to that of the target token. This works, I and I understand why it works. I want to take this a step further. A player's character is named "Winston." Their character has two sheets, however the second sheet, named "WinstonRage" is empty and just serves to be a place to keep their alternative token. My goal was to make a macro which, at the click of a button, changes their token to WinstonRage's token without having to select or target each time the macro is run. !token-mod {{ --set imgsrc@{WinstonRage|character_id} --ids @{Winston|character_id} --current-page --ignore-selected }} I think I might be missing something fundamental here. I appreciate any help. Thank you.
I can't test at the moment but I think you're just missing the separator for the imgsrc portion: imgsrc|@{WinstonRage|character_id} or imgsrc#@{WinstonRage|character_id}
1708332059
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Jeff! Pardon me if I am misunderstanding, but the purpose of the macro is just to switch the token image? But the character sheet stays the same? Is there a reason that a rollable table token is not the solution here? It's a much simpler macro, and there are also scripts such as Faces to make this even easier.
keithcurtis said: Hi Jeff! Pardon me if I am misunderstanding, but the purpose of the macro is just to switch the token image? But the character sheet stays the same? Is there a reason that a rollable table token is not the solution here? It's a much simpler macro, and there are also scripts such as Faces to make this even easier. Ooooh, I hadn't seen that script before. That is perfect for my needs. Thank you!