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 -- Set Name with spaces

Can anyone tell me why this isn't working? !token-mod --set name|?{Enter Your Player Name|No Name} It only sets it to the first word of the name entered, like "No" with the default value. I tried Double and Single Quotes, but it didn't work at all then. Please help!!!
1601693124
The Aaron
Roll20 Production Team
API Scripter
Quotes should work: !token-mod --set name|"?{Enter Your Player Name|No Name}" If they aren't, be sure they're not the fancy sort. 
I guess I was putting the quotes in the wrong place before.  It's working now. - Thanks Aaron. ?{Player_Name|No Name} !token-mod --set name|"?{Player_Name}" !setattr --sel --NAME|?{Player_Name}
My script above changes the Token Name and the Name Attribute on the Character Sheet. But, how can I change this name in a macro?
1601700847

Edited 1601700901
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try  !setattr --sel --character_name|?{Player_Name}
keithcurtis said: Try  !setattr --sel --character_name|?{Player_Name} That's what it is because if I do  @{selected|character_name}  it retrieves the name I am trying to change (not the Name attribute of the character sheet).  I guess !setattr doesn't work with character_name because it appears to be a kind of pseudo-attribute. In my Pathfinder 2e game, the Name attribute on the character sheet is linked to the character_name somehow.  I wish there was a way to do that with the HarnMaster character sheet as well because that is the behavior I want. Oh Well!!!
1601760509
Gold
Forum Champion
The Aaron said: Quotes should work: !token-mod --set name|"?{Enter Your Player Name|No Name}" If they aren't, be sure they're not the fancy sort.  That's what I use! Took me a while to figure that out! For a while I was typing names like "The Blacksmith" and the nameplate would come out saying just "The".