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

Pathfinder - Import NPCs

I am looking for a way to import NPCs stat blocks from the SRD or other source into the official roll20 character sheet. I found the Companion API script by Scott C. ( <a href="https://app.roll20.net/forum/post/5412440/pf-pathfinder-companion-script-v1-dot-x-for-neceros-sheet/?pagenum=5" rel="nofollow">https://app.roll20.net/forum/post/5412440/pf-pathfinder-companion-script-v1-dot-x-for-neceros-sheet/?pagenum=5</a> ), but from what I've read that only works with the community sheet. Is this the only external NPC tool that exists or am I just not looking hard enough?
1591301503

Edited 1591301710
David Z.
KS Backer
Along this chain of inquire, It'd be great that as a character sheet is proffered, a means of import (and export) of pc/npc data is provided with a sample and a template. Or a doxegen dump.. I just want to know what you're (the parsing bit is) looking for. (Please pardon me as my ignorance is showing.)
I know very little about javascript but from my SQL development days I would assume &nbsp;(strong emphasis) the issue is that every sheet seems to use different naming conventions for the fields. So AC on one sheet might be "ac" and on another "player_ac". And without some additional translation service that is developed to know where these field names intersect there is no way to import/export the data between sheets. All I know is that right now the biggest time sync for me in my campaign is adding NPCs or monsters that aren't already listed in the compendium. And it is just very frustrating having all of the raw data available with no convenient method to migrate it. For some NPCs, I'm pretty sure I spent longer adding the character than the players did fighting it.
1591307057

Edited 1591317344
David Z.
KS Backer
Look, I view the amount of effort and the number of participants in putting this, or any of the character sheets, together to support a clean and enjoyable play environment for the end users.. and I'm impressed. I just want this to be known up front. In the spirit of code reviews, one leaves their ego at the door. ---------- Kyle: What would be great is if the sheet developers used a core data dictionary and extended it as needed, and kept it available on git. I agree, it's the field name inconsistencies/mismatches that is flubbing the import process. While much is done to make the play aspects work, I would greatly appreciate much more coverage of the GM use cases, as you mention in your post above. Streamline what is needed to get the GM's to playable state. BTW,&nbsp; I've looked on the git page for the Community Pathfinder Character Sheet and see the HTML, CCS, and some json.. is there no javascript used ? Without it how is the parsing done for say, the HeroLabs json file? Where is it?*See Edit Note*&nbsp; ---------- I'm just starting off with a group of fellow software engineers (real-time embedded types), and here is an exchange I had.. &nbsp;&nbsp;&nbsp;&nbsp; Rich: "I want to go one record that I HATE the community character sheet." &nbsp;&nbsp;&nbsp;&nbsp; Me: "Rich. I hear you, I get it.&nbsp; You're frustrated. Frankly so am I. These are the constraints as I see them: 1) We're using PCGen to have a consistency of character creation. All players will do this. 2) We need to reproduce, manually or automated, the char. sheet into a Roll20 char. sheet that supports the range of possible characters we create. 3) An automated process will hopefully get us closer to the playable condition with as few tweaks as possible, otherwise we'll have to go through the much larger slog of manually entering the whole thing. 4) Learning any R20 sheet will take some effort and more effort will be needed for the more complex feature set supported. &nbsp;&nbsp;&nbsp;&nbsp;Of course you know that it's not just you, we'll all have to work within the same constraints. If your "HATE" can be focused on finding a solution that works for all of us, our situation will be greatly improved for this game and for any that follow that use Pathfinder. That is what I'm working toward.." &nbsp;&nbsp;&nbsp;&nbsp; Rich: "I've calmed down Dave." ---------- Like I've said, I'm very interested in having this work, for the players and for the GMs.&nbsp; EDIT------------------ Sorry, I was looking here:" <a href="https://github.com/Roll20/roll20-character-sheets/tree/master/Pathfinder%20Community" rel="nofollow">https://github.com/Roll20/roll20-character-sheets/tree/master/Pathfinder%20Community</a> " not here "<a href="https://github.com/Roll20-Pathfinder-Character-Sheet/Roll20-Pathfinder-Character-Sheet" rel="nofollow">https://github.com/Roll20-Pathfinder-Character-Sheet/Roll20-Pathfinder-Character-Sheet</a>" The latter is the one to look at.
1591313079

Edited 1591313219
David Z. said: BTW,&nbsp; I've looked on the git page for the Community Pathfinder Character Sheet and see the HTML, CCS, and some json.. is there no javascript used? Without it how is the parsing done for say, the HeroLabs json file? Where is it? The javascript is included in sheetworkers, which should be at the end of the HTML, in a section that begins with &lt;script type="text/worker"&gt; and ends with &lt;/script&gt; But I do not think there is anything in there for importing. That would have to be done by a separate API script.
I have little to no scripting skill but if there was an effort to put together an import tool to support the official sheet I'd be willing to help with grunt data collection, use cases, playtesting, or any other kind of low-end fault isolation. I wonder though, is the ability to import stat blocks something that can be entirely accomplished through the API, or does the sheet that it's being imported into have to have some inherent functionality that supports that function in the first place?&nbsp;
1591406081

Edited 1591406097
An API script can add or modify any attribute in a character sheet. So if the designer of an import API knows where and how all the character data is stored in the source (output from PC Gen, Herolab, D&amp;DBeyond, etc.), and knows all the attribute names on the Roll20 sheet and how they interact, they could design an API script that could take the source data and import it into the sheet, without any support from the sheet itself. But this points out why import projects like this are difficult: one has to keep up with two separate data structures (that can change) and map between them.
1591457557

Edited 1591457684
David Z.
KS Backer
I've just started looking into this. In the community pathfinder character sheet, HLImport.js is the parser for the json file that gets dropped into the sheet. It's 1400+ lines of code. A json sample file for a 1st level Archanist is 1600+ lines. I does take a lot of effort to code an importer, but can be helped with tools that I'm sure the people writing the code have used to make their life easier (besides lots of iterations with a debugger). A more generic one would be sweet: Char2Import[Source(Pathfinder| Pathfinder2 | D&amp;D5 | CoC | etc)] -&gt; &nbsp; &nbsp; &nbsp; &nbsp; [input filter based on source [[ swipidy swapidy ]] output based on target] -&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Roll20CharSheet[(Pathfinder| Pathfinder2 | D&amp;D5 | CoC | etc)]&nbsp; How's that for a requirements spec. (I kid). (Strange.. the above reminds me of LLVM for some reason.)&nbsp; When a new system comes out, the publisher invariably includes a section on translating older characters into the new system.&nbsp; That would definitely be added functionality.&nbsp; Acknowledged: these comments, while topical, are from the nosebleed seats. I'm just starting in a new domain here. Kudos to all the contributors and years of effort put in.. your work is very apparent. And thanks for the code inline comments, lots of folk (me) are new to javascript.