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] PlayerCharacters -- List all Player Characters divided by Player for the GM, or all assigned Characters for a Player. Add Characters for GM and Players.

1615434456

Edited 1615588712
The Aaron
Roll20 Production Team
API Scripter
PlayerCharacters v0.1.0 PlayerCharacters provides a list of Characters by Player, as well as the means to add Characters for Players easily. Commands !pcs [--skip-all | --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 controleld 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. --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 Additionally, PlayerCharacters will whisper a list of available characters to a player when they log in to a game. Configuration --config &nbsp;takes option value pairs, separated by | characters. !pcs --config option|value option|value Available Configuration Properties: show-characters-on-login &nbsp;-- Contols 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; 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 Example GM View: Github: <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> 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.
1615434466
The Aaron
Roll20 Production Team
API Scripter
(Updates)
1615434474
The Aaron
Roll20 Production Team
API Scripter
(Other)
1615443070
Gold
Forum Champion
Looks good. I will be testing it later this week/end. Will this work compatibly nicely enough with Message Of The Day also installed/running? !list-pcs --config show-characters-on-login|on&nbsp;&nbsp;
1615443165
The Aaron
Roll20 Production Team
API Scripter
Yup.&nbsp; BTW, all the config options are presented in the help, which makes setting them super easy:
1615468938

Edited 1615504768
The Aaron, Scriptomancer 18th level ! How do you do this, somebody asks a question, ten minutes later you post an elaborate script with help files that does 3x more than the question and waxes your car while it does it. I think it is time for a promotion, The Aaron, God of JavaScript !
1615469231
The Aaron
Roll20 Production Team
API Scripter
Oh noes!&nbsp; Java script please!!!!&nbsp; =D The secret is functional decomposition. =D&nbsp; I have many, many parts already written which I can use to pull together functionality quickly.&nbsp; In this case, I'd been meaning to rewrite that snippet into a script for a while now, and this was just the motivation I needed. =D
1615480822

Edited 1615550644
This is the 100x nicer version of a script i shared before on the roll20 discord (Feb 4th 2021). I have two feature requests: - create the default-token when a player drops it in the avatar field. - optionally automatically extend each charactername with (player displayname) between brackets NotDumpsterFire at that time also listed a massive wishlist, but i am not going to repeat that list here.
1615481153
The Aaron
Roll20 Production Team
API Scripter
Oh, I'd love to see what you put on discord.&nbsp; (I assume that's February 4th?&nbsp; Don't see day/month/year much, so at first I thought it was next month. =D) Default token could only be created if the image they use is in a User library, but that's a nice idea, I'll see what I can do. With the extending of character names, are you taking about renaming their character to have [The Aaron] or similar after the name?&nbsp; That might cause some people problems, and tracking and updating the names of characters when players change their display name might be a pain.&nbsp; Hopefully this isn't confusion over the screenshot I posted.&nbsp; Most of the players had renamed themselves to match their characters, so it looks a bit strange... I'll have to find NDF's wishlist, or maybe I'll just ask him on discord...
1615481708
The Aaron
Roll20 Production Team
API Scripter
Found your post (and NDF's), nice stuff.&nbsp; If you don't mind, I'll roll some of your feature in here as well (the roll20 userid, in particular).&nbsp; I'll try to make it compatible with your system as well.
1615490275
Gold
Forum Champion
This is awesome. Also, I support both of Martijen's requests.&nbsp; (I guess, if it can set the Default Token AND set a bunch of token options, that'd be cool too, although I can &amp; would use Token-Mod to set the token-options otherwise. Just saying if List-PCs script is going to set the "Default Token" yeah it would be nice to have it set with all the bars &amp; nameplate options configured as desired). Including the option to append PLAYER-NAME even if some Characters already wrote their name with player included like Scripto(T'Aaron) would, with this option turned on, would show as Scripto(T'Aaron) Played By The Aaron . Anyway, all sounds good to me, and I plan to use this script as-it-is starting sometime this week, so I'll let you know then if any suggestions.
Yes i was referring to 4th of Feb - me and my silly european date formats. Love it that you like the use of the roll20 userid, we store that so we can copy PCs from a central hub to the games where GMs play with the players. The step from a script that works for me/us to a generic script with all the config and help (not to say all features requested ) that would take me days of coding and days of testing. But you have the experience and confidence to just whip it together. Thanks!&nbsp;
Also please be aware that my version crashes a few time per week with&nbsp; Possible Infinite Loop detected, and i still did not find the reason for that.
1615574564
The Aaron
Roll20 Production Team
API Scripter
After some discussions, I'm going to rename this script to just PlayerCharacters to better fit its expanded functionality.
1615581760
Gold
Forum Champion
The Aaron said: After some discussions, I'm going to rename this script to just PlayerCharacters to better fit its expanded functionality. A couple of related scripts from other script authors are: Welcome Package CreateCharacter The Aaron's is a different approach though, with the foundation of listing out which Characters are assigned already to which Players.&nbsp; The other 2 share the ability to create a Character Sheet and assign to a player, but both of them are geared towards using at the starting day of a new campaign, for new entrants, new group members, primarily.&nbsp; The Aaron's is looking better for managing the stable of Character Sheet assignments overall for the life of the game.
1615582302
The Aaron
Roll20 Production Team
API Scripter
I've got some ideas that fall under the umbrella of "PlayerCharacters" to further solidify it firmly under the new name.&nbsp; =D&nbsp;
1615582732
Andreas J.
Forum Champion
Sheet Author
Translator
The Aaron said: I've got some ideas that fall under the umbrella of "PlayerCharacters" to further solidify it firmly under the new name.&nbsp; =D&nbsp; Renaming it PCManager, and having a short command for it, like !pc ?
1615582811
The Aaron
Roll20 Production Team
API Scripter
I'm going to use: !pcs
1615602119
Gold
Forum Champion
!pcs Power-Coding Scriptomancer Am I still on your Patreon? I cancelled most of my Patreons in the past year, so I'm sending Thanks if not contributions, at this time.
1620405751
Andreas J.
Forum Champion
Sheet Author
Translator
Hm, need to try it out now and see how/if that roll20id autoassign thing works when importing from Character Vault.
This looks great, thanks Aaron! &nbsp;I’m planning on running a death trap dungeon with new PCs being created as needed on the fly, and this seems like it will be perfect to let everyone create their own new PC before their next turn. :D
1621504405

Edited 1621542459
Hello o/ It's really pretty, and love the Idea for Hub all character on the chat when player login ! If you are open for suggestions, i would have some ideas : 1 - Adding a Config Toggle "Public/Private" for Change the default "In Player Journal" Stats From "All Player"(By Default) to "Creator" . (Like that, if on "Public" the behavior of the script remains the same as now, but if it's on "Private", The "In Player Journal" input of the sheet is instead auto filled by the "Creator" for make it private by default.) 2 - Adding an Option to configure a Template to duplicate when creating a new sheet rather than a new blank sheet. ( That second point is for the moment not done by any other Mod . Sometime your system need use of Macro(Abilities) or/and Stats(Attribute) inside the Attribute &amp; Abilities Part of a character. For ease creation it's frequent to Edit a Template where all Abilities and Attribute are Pre-Formated. And like that we just Duplicate the Template for Rename and Assign it to a new player by hand. But if the mod would be able to register the existence of a template and simply duplicate, rename and reassign it to the new player. It's would be mind blowing xD !) [I would know a lot of Fire Emblem, Pokemon or Different Homemade System Lover who would love this mod just for that !] In all case, thank you for this great module ! °u°)/ Edit: Modified the "1" Cause I have forgot some word and inversed other one !
1621533596
The Aaron
Roll20 Production Team
API Scripter
Those are great ideas, I need to work on this script some more and I'll add them to my board!