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

Creating a character sheet from Handout

Hello, In one of my games, I have a list of pre-made characters. To save players having to go through all the characters one by one, I have a handout summarising each character. If possible, I'd like to be able to add a button somewhere (in the handout for example) allowing the player to receive a copy of the pre-made sheet. Is this possible? Thanks to all
1727884767
timmaugh
Pro
API Scripter
If by "receive" you mean give the player controlling rights over the character, that would not be possible without scripts... but if scripts are available, it would be fairly trivial. Is this what you meant?
Ideally, I would duplicate an existing sheet and give this new character sheet to the player that clicked on the button. But, if your alternative can work, it is also ok for me. No problem if I have to use a script but I'm not able to make it ^^'
Good morning, Any idea? Maybe a script already exists for my need? Thank you :)
1728051786
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I can give you a partial workflow, and timmau gh can probably supply the missing piece with a metascript. In your handout, if you have text that says: Claim Bobby the Barbarian Select it and put this (almost complete) macro in as a link. Remember the initial backtick. `!token-mod --set IDs|@{Bobby the Barbarian|character_id} controlledby|PLAYERID) PLAYERID is the part that I hope timmaugh can help with. There is no built-in way for the chat system to return the user ID of the sender. I'm guessing this is trivial with a metascript. Note that this still doesn't make a copy. My suggestion would be to use the Transmogrifier to keep copies in a  Library Campaign . Then you can bring in new fresh ones as needed. A script that makes a duplicate and assigns the dupe to the player would be better, since it would prevent two players choosing the same character, but I don't know of any out of the box script that makes duplicate character journals.
1728053609
timmaugh
Pro
API Scripter
Yeah... getting the player id from a player reference is pretty trivial with the Metascript Toolbox: @(player.timmaugh.player_id) ...but you'd probably also want the character to appear in the journal of the player to whom you assigned the character, and TokenMod won't do that for us, unfortunately. I'm not aware of an extant script that would do what you want, Brandys, but I've begun putting one together. =D
1728055306

Edited 1728056704
timmaugh said: ...but you'd probably also want the character to appear in the journal of the player to whom you assigned the character, and TokenMod won't do that for us, unfortunately. TokenMod has the 'inplayerjournals' action. That with the controlled by using the Metascript to select theplayer ID should look like this: !token-mod --set inplayerjournals|+@(player.timmaugh.player_id) controlledby|+@(player.timmaugh.player_id) Or the whole thing with the piece from KeithCurtis: `!token-mod --set IDs|@{Bobby the Barbarian|character_id} inplayerjournals|+@(player.timmaugh.player_id) controlledby|+@(player.timmaugh.player_id) Assuming I didn't read too quickly and misunderstand what was being asked! EDIT: I think you're going to need to make sure that 'playersCanIDs' is turned on for TokenMod as well.
1728056591
timmaugh
Pro
API Scripter
I don't see that  --inplayerjournals  argument in the TokenMod documentation, Jarren, and I can't get your command line to work. Were you referring to something else, maybe? It would be good if this approach could work, because it could give me a little breathing room to get my script together without having to rush.
1728057003

Edited 1728057181
timmaugh said: I don't see that&nbsp; --inplayerjournals &nbsp;argument in the TokenMod documentation, Jarren, and I can't get your command line to work. Were you referring to something else, maybe? It would be good if this approach could work, because it could give me a little breathing room to get my script together without having to rush. <a href="https://app.roll20.net/forum/post/10800851/api-add-player-to-in-players-journals" rel="nofollow">https://app.roll20.net/forum/post/10800851/api-add-player-to-in-players-journals</a> Reading a little closer I see that two years ago Oosh wrote a modified version 0.8.74 for another player, and TheAaron said he was going to add it into the next version of TokenMod. It looks like that didn't happen. See what I mean about reading too quickly? ;P You'd think I would remember commenting this exact fact a year ago.&nbsp;
1728057098
timmaugh
Pro
API Scripter
Aha! Well maybe I can poke Aaron and get a version out there as a stop gap! Thanks for the reference!
Thank you for all these information. If I understand well, there si no current way to get the "current" id of the player that click on the macro ? Something like player.current.player_id ?
1728064645
timmaugh
Pro
API Scripter
If you're sure their "Speaking As" setting is set to speak as the player: @(speaker.player_id) If you're sure their "Speaking As" setting is set to speak as their character: @(speaker.player) Or, if you're not sure whether they are set to speak as player or their character (in other words, the one you want): @(speaker.player[@(speaker.player_id)]) Like I said the last one is probably the one you want, but showing you the others first helps to explain how the last one is just one of those items shoved into the "default" portion of the other. If you want to use it, you need the Metascript Toolbox installed, and it needs to be used in a bangsy message. If you want to try those commands out in your game, you can put them between a bang and a {&amp;simple}, like this: !@(speaker.player[@(speaker.player_id)]) {&amp;simple}