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

New Character Sheet API (hiding new sheets from all players)

1656761556

Edited 1656790154
Zym
Sheet Author
I am using this API you created for my players. However is there a way to set so that the character is not visible to all players and just the player whom character it belongs. Then later I can manually add the option "all players" and it will stay viewed by all players. Community Forums: [Script] AddPlayerCharacter - Simple script for automating adding characters for new players, as well as nice access for existing players. | Roll20: Online virtual tabletop const AddPlayerCharacter = (player) => { let c = createObj('character',{ controlledby: player.id, name: `${player.get('displayname')}'s New Character`, inplayerjournals: (IN_PLAYER_JOURNALS ? 'all' : '') }); return c; }; I'm pretty sure I need to change an input here just I wouldn't know what to command. const AddPlayerCharacter = (player) => { let c = createObj('character',{ controlledby: player.id, name: `${player.get('displayname')}'s New Character`, inplayerjournals: (IN_PLAYER_JOURNALS ? 'displayname' : '') }); return c; }; Is this correct?  I tested it and it works. Just let me know if this is wrong formatting.
You'd want to change this: inplayerjournals: (IN_PLAYER_JOURNALS ? 'all' : '') to this: inplayerjournals: (IN_PLAYER_JOURNALS ? player.id : '')
1656764996
Zym
Sheet Author
Thanks :-)