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

[Script,Update] PlayerCharacters -- Listing Player Characters, Adding new ones, Claiming Imported ones, for Players and GMs

1658610501

Edited 1658964176
The Aaron
Roll20 Production Team
API Scripter
Update v0.1.2 &nbsp;-- Fixed Transmogrifier imports to set in player journals based on local preference. (Thanks&nbsp; James H.&nbsp; &nbsp;) Version 0.1.1 adds support for Imported characters, picking up both Character Vault and Transmogrified characters.&nbsp; &nbsp;If PlayerCharacters is running in both games, characters can be auto assigned to the same player in both games.&nbsp; If coming from Character Vault, Players get the option to claim unclaimed imported characters: GMs can also assign imported characters from a dropdown of players in the game: PlayerCharacters is using the same system as this earlier MigratePlayers script, and is fully compatible with it. Additionally, you can configure if new/claimed/imported characters are in All Player Journals by default, and if you want All Characters and Unclaimed Characters to be shown by default, etc. PlayerCharacters v0.1.1 PlayerCharacters provides a list of Characters by Player, as well as the means to add Characters for Players easily. Commands !pcs [--skip-all | --skip-claim | --show-all | --show-claim | --add-character &lt;Player ID or all&gt; | --name [name] | --help] Lists Characters by Player. --skip-all &nbsp;-- causes the listing to not show characters which have a controlled by of&nbsp; all . Characters with Players explicitly assigned to them in addition to&nbsp; all &nbsp;will still be listed under the explicit Player name. --skip-claim &nbsp;-- causes the listing to not show imported characters which have not been claimed. --show-all &nbsp;-- causes the listing to show characters which have a controlled by of&nbsp; all . --show-claim &nbsp;-- causes the listing to show imported characters which have not been claimed. --add-character &lt;Player ID or all&gt; &nbsp;-- Add a character for the specified player or all players. This command is used via the plus button in the list output. --name [Name] &nbsp;-- Set the name for the new character. This is only used if&nbsp; --add-character &nbsp;is also specified. If no name is specified, a default name based on the Player is used. This command is used via the plus button in the list output. --help &nbsp;-- Shows the Help screen. Description If called by the GM, PlayerCharacters whispers a list of characters divided by player. If called by a player, they will see their own characters as well as characters available to all players. Each character shows the character's avatar, name, and a button to open that character. There is also a green plus button that will add a new character for that player. Pressing it will prompt for a name (you can leave the prompt blank to have a default name assigned). You can list all the characters that players have access to with the following command: !pcs If you want, you can ignore characters with controlled by set to&nbsp; all players . Characters that also have an explicit character assigned will still be shown under that player: !pcs --skip-all You can turn off showing all by default in the settings. If you have that setting turned off, you can show the all player characters with: !pcs --show-all Additionally, PlayerCharacters will whisper a list of available characters to a player when they log in to a game. If you don't want that behavior, you can turn it off in the settings. Imported Characters PlayerCharacters handles imported characters specially. First of all, it looks for the special attribute&nbsp; OwnerRoll20IDs &nbsp;which holds a list of Roll20 User Ids that should own this character. If present, it will convert those to player ids for the current game and assign the character to them. Second, if there is a character that has player ids that are not valid for this game, it adds it to a special list of&nbsp; Unclaimed Imported Characters &nbsp;which players can choose to claim as their own. GMs have the option to assign those unclaimed characters to current players. PlayerCharacters also writes the Roll20 User IDs of all controllers to the special attribute&nbsp; OwnerRoll20IDs &nbsp;so that the characters can be moved to other games and get assigned correctly to the players there. If you want, you can ignore unclaimed imported characters by specifying: !pcs --skip-claim There are also configuration settings to hide unclaimed characters by default. If you have that setting turned on, you can show them temporarily with: !pcs --show-claim Configuration --config &nbsp;takes option value pairs, separated by | characters. !pcs --config option|value option|value Available Configuration Properties: show-characters-on-login &nbsp;-- Controls if players will be shown their characters when they log on. Values:&nbsp; on ,&nbsp; off ,&nbsp; toggle show-characters-delay &nbsp;-- How long to wait before showing players their characters. Value:&nbsp; &lt;number of seconds&gt; show-all-characters &nbsp;-- Sets the default showing behavior for characters assigned to all players. Values:&nbsp; on ,&nbsp; off ,&nbsp; toggle show-unclaimed-characters &nbsp;-- Sets the default showing behavior for imported characters that have not been claimed by players. Values:&nbsp; on ,&nbsp; off ,&nbsp; toggle players-can-add-characters &nbsp;-- Can players add characters for themselves. Values:&nbsp; on ,&nbsp; off ,&nbsp; toggle players-can-add-all-characters &nbsp;-- Can players add characters for All Players. Values:&nbsp; on ,&nbsp; off ,&nbsp; toggle characters-in-player-journals &nbsp;-- Are Player Characters in all Player Journals. Values:&nbsp; on ,&nbsp; off ,&nbsp; toggle Script in Git:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/PlayerCharacters/PlayerCharacters.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/PlayerCharacters/PlayerCharacters.js</a> Old Thread:&nbsp; <a href="https://app.roll20.net/forum/permalink/9888024/" rel="nofollow">https://app.roll20.net/forum/permalink/9888024/</a> Support my work on If you use my scripts, want to contribute, and have the spare bucks to do so , go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free! Disclaimer: This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.
This is awesome, however I'm having difficulties with the Journal part. It is assigning "can be edited" automatically, but is not assigning "in journal" automatically. Is there a way to make this happen?
1658694235
The Aaron
Roll20 Production Team
API Scripter
That's probably an oversight on my part. I'll take a look.&nbsp; For clarity, are you taking about when characters are created, imported, or claimed?
1658964183
The Aaron
Roll20 Production Team
API Scripter
Update v0.1.2 &nbsp;-- Fixed Transmogrifier imports to set in player journals based on local preference. (Thanks&nbsp; James H.&nbsp; &nbsp;)