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

Default Token Spawn Echo Knight "controlledby" help.

1642837427

Edited 1642837498
 I'm using the Default Token Spawn/Token Swap trick I found here for my player's Echo Knight PCs. So far everything works great, I get the macro to spawn a token (with puff of smoke), complete with HP, AC and name plate...I just want to be sure that the Plater will have control of said token. this is my current marco: !Spawn {{   --name| LRRR Echo   --offset| 1,0   --bar2| [[14 + @{selected|pb}]]   --bar1| 1   --fx| bomb-smoke    --tokenName| LRRR's Echo   --tokenProps| showname:LRRR's Echo }} This is the Player ID...I think, based off a scriptlet by The Aaron. --controlledby| playerID:MaunUmQ9257DlbeSwCB Pretty sure this line is formatted incorrectly, or just has bad syntax/grammar.   How do I get the token to fall under the summoning player's control? Edit: I get the following error in the Roll20 chat: (From SpawnAPI):  Invalid playerID or displayname (playerID:-MaunUmQ9257DlbeSwCB) in --controlledby statement.)
Just use the players name, make sure they don't change their name in the session at all.  Make sure there isn't some weird unique character either as alot of communities require rules for showing ac and pp in character names and they always use pipes which is precisely the wrong symbol to have showing up in names for api usage lol.  
DM Eddie said: Just use the players name, make sure they don't change their name in the session at all.  Make sure there isn't some weird unique character either as alot of communities require rules for showing ac and pp in character names and they always use pipes which is precisely the wrong symbol to have showing up in names for api usage lol.   Tried that, though I may have something in the way I am formatting the line in the macro wrong. Will update if i figure it out. And thank you!
Using the following format I don't get an error, but will have to wait till my game tonight to see if it resolves the issue.   --controlledby| Shiloh M.
1642847615
Oosh
Sheet Author
API Scripter
I think you just want the ID as the parameter, not the 'playerID:' text: --controlledby|-abcdefg12334456789
Oosh said: I think you just want the ID as the parameter, not the 'playerID:' text: --controlledby|-abcdefg12334456789 That also did not populate an error, so I will work with that and verify that it works at tonight's game. Thank you!
1642965689

Edited 1642965893
The format  --controlledby|-abcdefg12334456789 did not give me any error messages, but it also failed to give the target player control of the Token. I am using the most recent version of the API from github rather than the one-click version.  Edit: found this command for Token Mod by The Aaron that might work:  !token-mod --set controlledby|-?{Player name to remove}. Can I drop a command in a macro from two separate APIs?
1642969227
David M.
Pro
API Scripter
Jeff, so the token spawns and returns no errors, but controlledby is not updated? That is strange. For testing purposes, does --controlledby|all work? Does using the player display name work? The token-mod command would work, but would require the newly spawned token to be selected before running. We should be able to get this resolved in one shot using Spawn. If you like, I can take a look at it if you invite me to your game and temporarily promote me to GM. Just send me a PM. 
1642969431
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I'm not very familiar with the syntax of the Spawn script, but if it follows some other parts of your examples, try: --controlledby| playerID:-MaunUmQ9257DlbeSwCB All Roll20 object IDs start with a dash.
1642969556

Edited 1642970000
David M.
Pro
API Scripter
Should be this, assuming the playerID is correct: --controlledby|-MaunUmQ9257DlbeSwCB EDIT - What's strange is that Jeff reported no error message. When I omit the leading dash from a playerID, I get the expected    Invalid playerID or displayname    error. 
On my way home, too difficult to test on mobile. I'll update 
1642970610
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
David M. said: Should be this, assuming the playerID is correct: --controlledby|-MaunUmQ9257DlbeSwCB EDIT - What's strange is that Jeff reported no error message. When I omit the leading dash from a playerID, I get the expected    Invalid playerID or displayname    error.  Could it come from prefacing it with  "playerID:"?
1642972054
David M.
Pro
API Scripter
Right, no prefaced "playerID". Looks like Jeff tried it that way. Will confirm when he's able to test again.
More details, I originally replaced the one click API with a newer version and have been using that script (from  djmoorehead / roll20-api-scripts  v0.24 ) - not sure how much that will change things. Not sure if the one-click version (0.21) handles the controlledby attribute. This is the Macro I am currently using to summon the echo token: !Spawn {{   --name| LRRREcho   --offset| 1,0   --bar2| [[14 + @{selected|pb}]]   --bar1| 1   --fx| bomb-smoke    --tokenName| LRRR's Echo   --tokenProps| showname:LRRR's Echo, bar_location:overlap_bottom   --controlledby|all }} When I check the token settings, this is what I see: When I used the macro for token mod on the token it added "All Players" to the controlled by field. Questions: I've been running on the assumption that the one-click version does not support "controlledby", am I correct? If I need to install a newer version, which version should I be using?
1642976793
David M.
Pro
API Scripter
Controlledby was enabled in v24. That token setting doesn't look right. The default token is not representing the "LRRREcho" character sheet. Try updating your default token and try again?