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

[Help] Can't find a script I used before.

1456102852
AliceSteel
Sheet Author
API Scripter
A while back I DMed a campaign created by a friend that then had Pro access and had a script that allowed players to create their own character sheets using the command !charsheet. I'm now attempting to find that script for the DM of a game I'm playing in and the friend that had created my campaign no longer has Pro access so I can't even just copy-paste the script from there. Would anyone happen to either know where I can find that script again or know how to write the script from scratch? On a less related note does anyone know how to adjust a token's size from a macro/ability?
1456103746

Edited 1456103854
The Aaron
Pro
API Scripter
I threw this together for you: on('ready',function(){ &nbsp; "use strict"; &nbsp; on('chat:message',function(msg){ &nbsp; &nbsp; var player,character; &nbsp; &nbsp; if('api' === msg.type && msg.content.match(/^!(makesheet|charsheet)/) ){ &nbsp; &nbsp; &nbsp; &nbsp; player=getObj('player',msg.playerid); &nbsp; &nbsp; &nbsp; &nbsp; if(player){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; character=createObj('character',{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name: 'Sheet for '+player.get('displayname'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; controlledby: (playerIsGM(msg.playerid) ? '' : msg.playerid) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sendChat('','/w "'+player.get('displayname')+'" Created a sheet for you: &lt;a href="<a href="http://journal.roll20.net/character/'+character.id+" rel="nofollow">http://journal.roll20.net/character/'+character.id+</a>'" style="color:blue;text-decoration:underline;"&gt;Sheet for '+player.get('displayname')+'&lt;/a&gt;'); &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; } &nbsp; }); }); !makesheet or !charsheet will create a character for the player issuing the command, assign them control of it, and whisper them a message with a link to the sheet. &nbsp;For a gm, it does not assign them control but does create the character and whisper the link. For sizing a token, you can use&nbsp; TokenMod : !token-mod --set width|[[70* &lt;TILES&gt; ]] height|[[70* &lt;TILES&gt; ]] Just replace &lt;TILES&gt; with the size you want. &nbsp;Or possibly a roll query: !token-mod --set width|[[70*?{Size|1,2,3,4,5,6,7,8,9,10}]] height|[[70*?{Size}]]
1456181333
AliceSteel
Sheet Author
API Scripter
That script doesn't seem to actually create the sheet. It sends a message saying it's made one but the sheet doesn't appear in the list.
1456196796

Edited 1456196828
[Deleted]
Sheet Author
API Scripter
/* Begin Character Sheet Auto Creator */ var Charsheet = Charsheet || {}; on('chat:message', function (msg) { // Exit if not an api command if (msg.type != "api") { return; } if (msg.content.indexOf('!charsheet') != -1) { Charsheet.Generate(msg); } }); Charsheet.Generate = function (msg) { var player = msg.who; var character_name = msg.who + Date.now(); var character = createObj('character', { gmnotes: 'Player: ' + player + '&lt;br&gt;Generated by script Charsheet.js', archived: false, inplayerjournals: msg.playerid, controlledby: msg.playerid }); /* Create attributes */ createObj('attribute', { name: 'player_name', current: player, _characterid: character.id }); createObj('attribute', { name: 'name', current: character_name, _characterid: character.id }) sendChat(player, "/me created a character named \"" + character_name + "\"!"); }; if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } /* End Character Sheet Auto Creator */ I got this code from <a href="http://www.reddit.com/user/lowdownfool" rel="nofollow">www.reddit.com/user/lowdownfool</a>
1456197486
[Deleted]
Sheet Author
API Scripter
I wanted to find the original thread I heard about this script back on Reddit; <a href="https://www.reddit.com/r/Roll20/comments/3nqi1z/is" rel="nofollow">https://www.reddit.com/r/Roll20/comments/3nqi1z/is</a>... Due to finding this, I found the GitHub link as well <a href="https://github.com/kevinsearle/charsheet/tree/mast" rel="nofollow">https://github.com/kevinsearle/charsheet/tree/mast</a>...
1456215001
AliceSteel
Sheet Author
API Scripter
So THAT'S where I found it before! Oh hey, and you're even the OP from that thread back then. Thanks for that mate! PS: I'm /u/GamerGoddessDin over there BTW.
1456237343
[Deleted]
Sheet Author
API Scripter
It isn't the best script as the character sheet it creates has a 100% blank name so some folks new to using it miss where it created it. Also originally it put the sheet with everyone able to view, but the person that typed the command in control, I changed both to the same person. I would prefer to posted the name+date as the temp character name and that it had "created by !charsheet" in the story section, but I haven't bothered to fix that yet. I am glad I was able to help find the script you wanted.