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] Character sheet generator for Pathfinder

Hi Roll20 community, based on several character generator, i've seen in this forum (credit to everyone), i created one with a certain degree of reuse in mind. Please bear with me, because my javascript knowledge is a little rusty. I started my script with a huge block containing various set of abilities and attributes, followed by some helper methods. Every function should have some comments associated with it. If i missed some, i apologize. It was late in Germany. To allow switching of classes for specific characters, i have added a chat command, which uses the character name and a class to switch to. The usage is "!skill <charName> <charClass> A major drawback is currently the fact, that changes in the abilities are overridden.  I will think on a way to overcome the drawback, for now is has to work this way. Perhaps someone can give me some advice on how to do it properly. And as always, please provide your suggestions or critism Look at my reply for the link to the github gist Happy scripting :-D
This is very cool, I like it - makes creating a character sheet (which is tedious to do manually) nice and easy, and the way you laid this out - looks very easy to edit & modify.  Thumbs up!  
Hi everybody, i've updated my script to retrieve modifiers during the switch of character classes. The links from github is the same, but i looks like the preview is not updated properly. Please look directly on the github gist for the recent version. Happy gaming!!
1372829144
Alex L.
Pro
Sheet Author
First off thanks for writing a very well made script, but would it be possible for you to namespace your global vars? the best way to do this would be to add: var Malikai = Malikai || {}; To the top of your script then make everything Malikai.varNameHere. This is just to stop conflicts with other scripts.
1372852631

Edited 1376300638
Hi Alex, thanks for the advice. I've added the namespace and moved everything into that.
Hi, I've tried to find this, and as this is the first script I'm trying to use, and the most timesaving one, I really hope to make this work. I've added the script to the API-page (though it only says Spinning up new sandbox... below it), and in-game I can't get any reaction. I can't find any command word except !skill charname class but that only changes the class of currently nothing... I've tried to add new names and names I already use. So I do get a response, but I don't know how to create a character sheet. And I've tried many command words. What I called the script, malikai, createcharsheet and more... Could anyone tell me the command word, or how to do it if it's no command word? :-)
Go to your journal tab and click create new character (the top section, not the bottom half-thats for notes you can share with your players). Enter a name and who can view/edit it, then click save along the bottom. It will then create that character and thats what the script listens for, adding all the attributes and abilities when you save it.
Hi Leif, the available chat command is for selecting a class for an existing character (after creating a character as described by Michael) and setting the appropriate class skills.
Aha, now I got it ^^ It was too simple :-D Well, great work! This will make things much faster! Thanks a lot!
Having a wierd problem in a new campaign im making, I copied the api from my last game where it seemed to work fine, but now if I try to duplicate any of the sheets it also duplicates the atrib/abilitie, normally I wouldn't be duplicating stuff but it saves time when im making normal and templated versions of the same monsters.
1373529968

Edited 1376300620
Hi Buddy Christ, Please look at the recent version of the script on github.com, i have fixed certain bugs. Do you create duplicates via the duplicate Button on the character sheet? Best regards, Malikai
So if I was trying to use the compact rolling method instead of the /r method for rolling. What part of your script should I modify? I know next to nothing about Javascript. I've tried to modify the parts that refer to /r (under the assumption: "That's what I want to change." and I ended up breaking it. 
inline roll isn't supported in API yet. Edit: It is supported XD ^^ Fail
1374784861
Alex L.
Pro
Sheet Author
Emile l. said: inline roll isn't supported in API yet. It is now.
Great script. Couple of recommendations: 1) Add an attribute AC_Penalty 2) When creating skills have a -@{AC-Penalty} in there for the following skills: Acrobatics, Climb, Disable Device, Escapse Artist, Fly, Ride, Sleight of Hand, Stealth, Swim. 3) Add a speed attribute
1376236190

Edited 1376236428
Dakcenturi
KS Backer
Have another one Add an attribute Caster-Level Also the Climb skill should be Str based not Dex based.
1376300597

Edited 1376305321
Hi Dak, i've updated the script with your recommendations. But i have to look into some bugs due to refactoring. I will post the new version after i'm finished. Edit: new version available at&nbsp;<a href="https://gist.github.com/mgruel/5834820/raw/392f4553960410cd66a9b09386fdde5b62fd655c/createCharSheet" rel="nofollow">https://gist.github.com/mgruel/5834820/raw/392f4553960410cd66a9b09386fdde5b62fd655c/createCharSheet</a> It is the link to the raw file because of linking constrains with the github gists (displays only the first revision).
Great script! I am not sure what the rules are on this, but I did make a few additions to your script for my game. I added the rest of the pathfinder classes and put in a skill rank option so the players won't need to muck around in the macros. Here's the code if you are interested. Again great job! Sorry about that had some trouble with GitHub there <a href="https://gist.github.com/danhons/4839362881d0960f7a9e" rel="nofollow">https://gist.github.com/danhons/4839362881d0960f7a9e</a>
Hi DM, thanks for you contributions. I had a similar approach for his matter. But i only added three attributes, something like RanksPrimary and RanksSecondary. But i see the benefits of using attributes for each skill. I will integrate your contribution into my code once i'm back from holiday. Thanks again, M
1379890106

Edited 1379898539
When I run Dungeon Master version of this script it is adding the attribute bonus a second time when i set class skills. Can anyone tell me what is up. In other words when I type the chat command to set class skills not only does it +@{Class-Skill-Bonus} but also adds a second&nbsp;+@{Acrobatics-Ranks} Hoping some one can help out thanks.&nbsp; Edit: With much rejoicing and a thanks to codecacademy for helping me learn some basic java I have solved my own problem with this script.. Btw thank you so very much those of you who have worked on scripts and made them public(obviously including&nbsp;Malikai and Dungeon Master. Ok so on line 256 i made a change it orginally looked like this var modifier = actionCommand.replace(currentSkill.name+"\n/r " + malikai.diceType + "+@{" + currentSkill.attribute + "}", ""); I changed it to this var modifier = actionCommand.replace(currentSkill.name+"\n/r " + malikai.diceType + "+@{" + currentSkill.attribute &nbsp;+ "}" + "+@{" + currentSkill.rank +"}", "");
Thank you for catching and fixing the bug I introduced to the script &nbsp;Black War Owl. &nbsp;I noticed that bug a few days after posting my contribution to Malikai's work, but haven't had time to fix it and re-post it. Thanks again from a fellow Java noob lol.
1380914259

Edited 1380959429
Hi everyone, after being on vacation, i will look into your changes and put them into the script. I will post an update once i'm finished. - M Edit: I've updated the script with your suggestions and uploaded it into my new repository at bitbucket. You can view the source via Bitbucket . Please post any further suggestions for this script here or with tickets at bitbucket and i will look into it. - M
Ok I have a question suggestion. I would like to add to each of the Abilities a + that add the max stat from each attribute. My expample will be fore a character named Tad a rogue. So say for acrobatics instead of Acrobatics /r 1d20+@{Dex-Mod}+@{Acrobatics-Ranks}+@{Class-Skill-Bonus}+@{AC-Penalty} there would be the addtional line Acrobatics /r 1d20+@{Dex-Mod}+@{Acrobatics-Ranks}+ @{Tad|Acrobatics-Ranks|max} +@{Class-Skill-Bonus}+@{AC-Penalty} Really not sure how to do this any help would be greatly appreciated.Both the use of the character name and the max attribute put this out of my very limited knowledge of how to add to the script what i want.
1381828738

Edited 1381828791
Hi Owl, if i understand you correct, you want to add the current and the max value for certain attributes (e.g. Stats like Dex or Str). If so, i will look into the docs if it is possible to insert both current and max value of an attribute to the roll. - M
Yup I think you understand me correctly. It can be done in macro's I just dont know how to program it into the script so it shows up as part of the Ability.
1382530088

Edited 1382530329
Hi Owl, i've posted my reply in the other thread. Tell me, if the suggestion is working. I don't know, if i will add this to the script. In our char sheets, we use the max value to hold the total attribute score and the current value to hold the modifier. Example: Con-Mod: 1 / 13 //Malikai
Couldn't you get the modifier by doing something like floor((@Con-10)/2) in a macro, or the equivalent in JS?
Hi Thorsten, i don't know if possible. The current implementation generates dice rolling commands for abilities. If the macros support such formulars, it should be easy to change. - M
1384302425

Edited 1384303453
Any chance of adding multi-classing for purposes of class skills? You could make a !skill2 to add extra skills or alternately be able to !skill with an extra class without the reset. Granted these might require some sort of reset function in case of errors on the user side. Also what about adding something to the in game sheet to display the current class(es)? Another possible addition would be having the class skill bonus not added to the ability macro if there's no ranks in a skill. Not sure if this would be be a pain to write because it would have to check every time the sheet is edited.
Hi Starbuck, i will have a look into the script. Shouldn't be a problem to check for two classes. The command will be something like !skill &lt;name&gt; &lt;class1&gt;,&lt;class2&gt;
I updated the sheet Malikai did, I changed all of the rolls to be inline, and added some attribs and combat macros, you can find it here: <a href="https://app.roll20.net/forum/post/459729/script-pathfinder-character-sheet-generator#post-466361" rel="nofollow">https://app.roll20.net/forum/post/459729/script-pathfinder-character-sheet-generator#post-466361</a>
Hi Mike, i took a brief look at your script. You have incorporated many ideas, which i had in mind recently. If i have time, i merge some parts into my script.
Awesome if you have any new functionality I have not thought of I would love feedback as well. I just started thinking about adding particular feats, and combat maneuvers, but would take some research since I am new to PFRPG. I was a AD&D DM for 20 years, but switched to Pathfinder when I started playing here. Your sheet really was a inspiration to me, Thanks!!
One of my ideas is to create a weapon "database" to provide additional information regarding weapon and item statistics to usage in rolls. But i don't know, how to create and maintain the information.
You should look at my Pathfinder All In One thread: <a href="https://app.roll20.net/forum/post/452995/request-p" rel="nofollow">https://app.roll20.net/forum/post/452995/request-p</a>... I did mention, John did say it is bad form, but could use a journal item to store flat file, or comma delimited info you could query with the API....
1384682919

Edited 1384683019
The risk with that is if you unintentionally opened it and deleted data or what not, it is not controlled. I would not have it assigned to anyone, since it does not require it, and would only update with updates to the data. I think that it would be nice to have objects designed for that.
If users never need to edit it, you can just define those in a script. Since they're static values you don't even need mess with the state object. Equipment = { weapons: { swords: { "long sword": { dmgDie: 8, dmgType: "Slashing", weight: 12, cost:30 }, "short sword": { dmgDie: 6, dmgType: "Slashing", weight: 8, cost:20 }, }, axes: {} daggers: {} } } You could add other Equipment categories, like Shields, Armor, Items, etc. And you can put any relevant stats for the items you want in there like range.