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

[PF] Pathfinder Companion Script v1.X for Neceros sheet

1502804553

Edited 1502805100
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi all, It's been a long time in development, but version 1.0 of the Pathfinder Companion Script is finally ready to be released into the wild. We haven't found any new bugs for a couple weeks, so it is pretty stable. Without further ado: Companion API Script v1.0 The Pathfinder Companion Script automates many of the day to day tasks of setting up, playing in, and running a pathfinder game. The script is designed for the Neceros Pathfinder Sheet for Roll20. Below is the quick reference guide. For more in depth information on what the script can do, how to use it, and upcoming features read the  user's manual on google drive. Sheet compatibility: v1.6X  Neceros Pathfinder Sheet Most up to date version of the code available on  my branch of the repository . Configuration Options Automatically create token actions for macro menus: Enabling this will automatically create the indicated abilities for all PCs and NPCs as they are created or made into NPCs. Enabling the setting adds a menu where you can specify what menus should be created for all characters categorized by PC or NPC. Automatic Resource Tracking: Will create handling for automatically tracking ammo for weapons and spell, ability, and item usages. Automatically handle HP changes: Enabling this will autodeduct damage from temporary hp before affecting HP. It will also prevent healing from occurring beyond the max HP of a character. Maintain PC default tokens: Enabling this option will bring up a table to set what attribute (by case insensitive name) each bar should link to and whether that bar should be visible to players or not. Having this option turned on will also update the default token of a character whenever there is a change made to that character (excluding movement and var value/max changes). NOTE: With this setting enabled, setting a token to represent a character will update the bar links and values to be synced appropriately. This will not be reflected in the token setup pop-up until you reload the menu. Exit the menu by hitting "CANCEL" (NOT "APPLY") and your token will be set as the default token for that character and setup as per the settings in the config menu. Apply Condition/Buff statusmarkers: Enabling this will apply the appropriate statusmarker to all tokens representing the buffed/conditioned character if that character is controlled by at least one player. You can designate statusmarkers to use for buffs on a per character basis by using the !pfc --buffstatus command while you have a single token selected or by passing a single character id after (e.g. !pfc --buffstatus|@{Jord Strongbow|character_id} . NOTE this setting will not work correctly unless Maintain PC default tokens is enabled Current macro setup, auto attribute handling and command syntax: Automatic Attribute Handling HP & Temp HP: If this option is enabled in the config menu health deducted from a character's HP will be deducted from their temp hp first before being applied to their HP. Note this will not work with API applied HP changes (other than those caused by this script). Macro Setup Weapons: Weapons can be setup to track ammo usage (according to # of attacks used, including usage of manyshot), other item usage, spell usage, ability usage, and custom attribute usage. Ammo Tracking: Setting the ammo field of a weapon to anything besides 1 tells the script that that weapon uses ammo. The script willgenerate the following field in the macro text of the weapon: ||ammo=?{Name of Ammunition Item}|| . After the first time you answer this query, it will be replaced with your response.You can also manually put a different query in here to be prompted for what ammunition to use with each attack routine. Spell or Ability Tracking: If a weapon is linked to a spell or ability (that has uses), an additional roll template field will be added to the macro that will display a button to outputthe spell card as well as buttons to increment, decrement, or custom adjust the number of spells used. Spells: A field similar to that for weapons linked to a spell will be added to all spells. Abilities: A field similar to that for weapons linked to an ability will be added to all abilities that have uses. custom attribute: Entering %%What you named the custom attribute%% into the description field (notes field for weapons) will cause the script to put a field similar to the spell or ability to allow you to adjust the quantity of it. This will only be created for those custom attributes that have a current/max comparison. This can also be used to add fields for spells,abilities, or items without having to directly edit the macro text. Command syntax Item tracking: !pfc --resource,item=Item Name,current=max OR +/-X OR X,max=+/-X OR X|characterid|characterid|... Ability tracking: !pfc --resource,ability=Ability Name,current=max OR +/-X OR X|characterid|characterid|... Spell tracking: !pfc --resource,spell=Spell Name,current=max OR +/-X OR X|characterid|characterid|... Custom Attribute tracking: !pfc --resource,note=Custom Attribute Name,current=max OR +/-X OR X|characterid|characterid|... Whisper Adjusting: !pfc --whisper,npc=public/private/swap,pc=public/private/swap,stats=public/private/swap|characerid|characterid|... Access the Config Menu: !pfc --config Apply/Remove Buffs Conditions: !pfc --apply,condition=all or part of a condtion name,buff=all or part of a buff name that has already been setup on the character,remove/swap|characterid|characterid|... Import Statblock: !pfc --parse|characterid|characterid|characterid| OR !pfc --parse|{{statblock NEWCREATURE statblock NEW CREATURE ...}} Copy your statblock (pure text only - copy into a text editor first to clean off formatting) into the gmnotes of a fresh character or directly via chat, and then run the command. I have only tested the parser on pfsrd statblocks (and not many of those) so far, and hope to overcome the issues preventing multiple statblocks from being imported at once, as well as hopefully eventually allowing statblocks to be imported from chat. Buff statusmarker wizard: !pfc --buffstatus|characterid The characterid is optional if you have a token representing a character selected. The command only works on a single character; having more than one token selected or passing more than one character id will only act on the first character in the list (this is unpredictable when using selected tokens).
1502804855
The Aaron
Pro
API Scripter
Awesome Scott!  I know you've been working hard on that!  It almost makes me want to try playing Pathfinder. =D
1502805186

Edited 1502805216
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Heh, yeah, it was a little  more involved than I thought it would be, and I thought it was going to be pretty complex :) Also - Do it! Come to the dark side, we have cookies ;)
1502840936
vÍnce
Pro
Sheet Author
This is just awesome Scott. Great job!  PFC is a must install.
Scott, dude... Wow. Thank you so much for this!!!
This script is awesome, I do have a question though, is it possible to make npc's not get a default token but maintain automation on setting bars correctly, so one can have a variety of different looking tokens all tied to the same sheet? Currently if I set a sheet on a npc token (sheet isn't in anyone's control), other token(s) change to the new token.
1503171768

Edited 1503172009
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This should only happen if you have a bar set to link to the sheet. If it is a mook (aka no bar is linked to any attribute on the sheet) then it shouldn't propagate changes to all other tokens. This means that there are essentially three types of characters as far as PFC is concerned: Player characters: Sheet is controlled by someone (note, this means anyone including the gm) and the token has a bar linked to the sheet (Important/Named) NPCs: Sheet isn't controlled by anyone, but at least one bar is linked to an attribute Mooks: Sheet isn't controlled by anyone, the token does represent a character, but there are no bars linked to an attribute. And, ok there is a fourth technically. Random tokens: Tokens that don't represent any character.
1503176371
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
While I was on my way to my RL game, I realized what you were probably actually asking. To do multiple tokens for the same character, use the  rollable tokens feature of rollable tables.
1503176473

Edited 1503176826
Edit: rollable tokens worked, thanks. Well here's what I do. A imported npc sheet with no default token or linked to any player in anyway Adding a token that isn't tied to anything either on the map Immediately after representing the sheet in the pic 1 it looks like this Adding a new unlinked token And what happens immediately after i represent the sheet in first pic with second token (no need to even save changes)
I can't get it to load up the character from PC Gen statblocks. It keeps saying Character for statblock 1 imported. I use the command !pfc --parse|@{Djerl Morghun|character_id} and it won't load him. I've got the token on the board with a picture, his name in the name, and the statblock loaded in the GM notes. I switched the ranged and melee lines in offense. I pulled it straight from the .TXT file in PC GEN. Name: Djerl Morghun Race: Human (Varisian) Player: Jimmy Dick Classes: Ranger1 Hit Points: 13 Experience: 0 / 1300 Alignment: Chaotic Good Vision: Speed: Walk 30 ft. Languages: Common, Varisian Stat Score Mod STR 14 (+2) DEX 18 (+4) CON 14 (+2) INT 10 (+0) WIS 12 (+1) CHA 8 (-1) -------------------------- Skills -------------------------- Skill Total Rnk Stat Msc Acrobatics 2 0.0 4 -2 Appraise 0 0.0 0 0 Artistry 0 0.0 0 0 Bluff -1 0.0 -1 0 Climb 0 0.0 2 -2 Craft (Untrained) 0 0.0 0 0 Diplomacy -1 0.0 -1 0 Disguise -1 0.0 -1 0 Escape Artist 2 0.0 4 -2 Fly 2 0.0 4 -2 Handle Animal 3 1.0 -1 3 Heal 1 0.0 1 0 Intimidate -1 0.0 -1 0 Knowledge (Nature) 4 1.0 0 3 Perception 5 1.0 1 3 Perform (Untrained) -1 0.0 -1 0 Ride 6 1.0 4 1 Sense Motive 1 0.0 1 0 Stealth 6 1.0 4 1 Survival 5 1.0 1 3 Survival (Follow or identify tracks) 6 1.0 1 4 Swim 4 1.0 2 1 -------------------------- Feats --------------------------- Point-Blank Shot You are especially accurate when making ranged attacks against close target. Precise Shot -------------------- Special Abilities --------------------- <name>Bonus Feat</name> <description>Humans select one extra feat at 1st level.</description> <type>RACIALTRAITS.SPECIALQUALITY.HUMANRACIALTRAIT.HUMANRACIALDEFAULT.BONUS FEAT</type> <associated></associated> <count>0</count> <aspect></aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Inc. - Core Rulebook, p.27</source> </special_quality> <name>Humanoid (Goblinoid) (Ex)</name> <description>You gain a +2 bonus on Bluff, Knowledge, Perception, Sense Motive, and Survival checks when using these skills against goblinoids. Likewise, you get a +2 bonus on weapon attack and damage rolls against such creatures. You may make Knowledge Skill checks untrained to identify such creatures.</description> <type>RANGERCLASSFEATURES.FAVOREDENEMY.SPECIALATTACK.EXTRAORDINARY.ATTACKOPTION</type> <associated></associated> <count>0</count> <aspect>Ability Benefit: +2, CombatBonus: You gain a +2 bonus on Attack rolls and Damage rolls against goblinoids., SkillBonus: You gain a +2 bonus on Bluff, Knowledge, Perception, Sense Motive, and Survival checks against goblinoids.</aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Inc. - Core Rulebook, p.64</source> </special_quality> <name>Indomitable Faith</name> <description>You were born in a region where your faith was not popular, but you still have never abandoned it. Your constant struggle to maintain your own faith has bolstered your drive. You gain a +1 trait bonus on Will saves.</description> <type>TRAIT.BASICTRAIT.FAITHTRAIT</type> <associated></associated> <count>0</count> <aspect></aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Publishing - Ultimate Campaign</source> </special_quality> <name>Magical Knack (Ranger)</name> <description>You were raised, either wholly or in part, by a magical creature, either after it found you abandoned in the woods or because your parents often left you in the care of a magical minion. This constant exposure to magic has made its mysteries easy for you to understand, even when you turn your mind to other devotions and tasks. Your caster level in Ranger gains a +2 trait bonus as long as this bonus doesn't raise your caster level above your current Hit Dice.</description> <type>TRAIT.BASICTRAIT.MAGICTRAIT</type> <associated>Ranger</associated> <count>1</count> <aspect></aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Inc. - Advanced Player's Guide, p.329</source> </special_quality> <name>Meticulous</name> <description>You plan and prepare everything in detail, and aren't good at improvising when things don't go as planned. You take a -2 penalty on skill checks for skills with which you're untrained.</description> <type>DRAWBACK</type> <associated></associated> <count>0</count> <aspect></aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Publishing - Ultimate Campaign, p.65</source> </special_quality> <name>No Racial Subtype</name> <description>You have chosen no racial subtype.</description> <type>UNIVERSAL SUBTYPE</type> <associated></associated> <count>0</count> <aspect></aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Inc. - Advanced Race Guide</source> </special_quality> <name>Ranger</name> <description></description> <type></type> <associated></associated> <count>0</count> <aspect></aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Inc. - Advanced Player's Guide</source> </special_quality> <name>Reactionary</name> <description>You were bullied often as a child, but never quite developed an offensive response. Instead, you became adept at anticipating sudden attacks and reacting to danger quickly. You gain a +2 trait bonus on Initiative checks.</description> <type>TRAIT.BASICTRAIT.COMBATTRAIT</type> <associated></associated> <count>0</count> <aspect></aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Inc. - Advanced Player's Guide, p.328</source> </special_quality> <name>Skilled</name> <description>Humans gain an additional skill rank at first level and one additional rank whenever they gain a level.</description> <type>RACIALTRAITS.SPECIALQUALITY.HUMANRACIALTRAIT.HUMANRACIALDEFAULT.SKILLED</type> <associated></associated> <count>0</count> <aspect></aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Inc. - Core Rulebook, p.27</source> </special_quality> <name>Track (Ex)</name> <description>You gain +1 to Survival checks made to follow tracks.</description> <type>RANGERCLASSFEATURES.SPECIALQUALITY.EXTRAORDINARY</type> <associated></associated> <count>0</count> <aspect>Ability Benefit: +1</aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Inc. - Core Rulebook, p.64</source> </special_quality> <name>Wild Empathy</name> <description></description> <type>RANGERCLASSFEATURES.WILD EMPATHY</type> <associated></associated> <count>0</count> <aspect></aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Inc. - Core Rulebook</source> </special_quality> <name>Wild Empathy (Ex)</name> <description>You can improve the attitude of an animal. This ability functions just like Diplomacy check made to improve the attitude of a person. You roll 1d20+0 to determine the Wild Empathy check result. The typical domestic animal has a starting attitude of indifferent, while wild animals are usually unfriendly. To use Wild Empathy, you and the animal must be within 30 feet of one another under normal circumstances. Generally, influencing an animal in this way takes 1 minute, but as with influencing people, it might take more or less time. You can use this ability to influence a magical beast with an Intelligence score of 1 or 2, but you take a -4 penalty on the check.</description> <type>SPECIALQUALITY.EXTRAORDINARY.DRUIDCLASSFEATURES.RANGERCLASSFEATURES</type> <associated></associated> <count>0</count> <aspect>Ability Benefit: +0</aspect> <auto>F</auto> <hidden>F</hidden> <virtual>F</virtual> <category>Special Ability</category> <source>Paizo Inc. - Core Rulebook, p.50/64</source> </special_quality> </special_qualities> ------------------------ Templates ------------------------- -------------------------- Combat -------------------------- Total / Touch / Flat Footed AC: 18 / 14 / 14 Initiative: +6 BAB: +1 Ranged tohit: +5 Melee tohit: +3 Fortitude: +4 Reflex: +6 Will: +2 Unarmed attack: to hit: +3 damage: 1d3+2 critical: 20/x2 Greatsword: to hit: +3 damage: 2d6+3 critical: 19-20/x2 Dagger: to hit: +3 damage: 1d4+2 critical: 19-20/x2 Dagger (Thrown): to hit: +5 damage: 1d4 critical: 19-20/x2 range: 10 ft. Longbow: to hit: +5 damage: 1d8 critical: 20/x3 range: 100 ft. --------------------- Special Abilities -------------------- ------------------------- Equipment ------------------------ Name QTY LBS Outfit (Peasant's) 1 2lbs Chain Shirt 1 25lbs Arrows (20) 1 3lbs Rope (Silk/50 ft) 1 5lbs Special: 4 hp, DC 24 Strength check to burst Flint and Steel 1 0lbs Waterskin (Filled) 1 4lbs Elven Trail Rations 1 1lbs Backpack (2 lbs.) Pouch (Belt) (0.5 lbs.) Longbow (3 lbs.) Total weight carried: 57.5 lbs. Current load: Light Encumbrance Light: 58 Medium: 116 Heavy: 175 --------------------------- Magic -------------------------- Ranger Spells ------------------------ Description ----------------------- Height: 6' 0" Weight: 190 lbs. Gender: Male Eyes: Brown Hair: Black,Long Skin: White Dominant Hand: Right Quirks: , Speech style: Quotable: Full Description Background Campaign Logs I really would like to know what I'm doing wrong with this import before I keep banging my head trying to import from a PFS session statblock.
1503195506

Edited 1503195546
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Xathos, Sorry, I've never used PCGen myself, but apparently it has a statblock export function that will give you an output like this: SORCERER CR 3 XP 0 Male adulthood dwarf sorcerer 3 N Medium humanoid (dwarf) Init +1; Senses darkvision 60 ft., Perception +0 DEFENSE AC 11, touch 11, flat-footed 10 (+1 Dex) hp 15 (3d4+3) Fort +2, Ref +2, Will +4 OFFENSE Speed 20 ft. Ranged crossbow, light +2 (1d8/19-20) Melee quarterstaff (two handed) +2 ((two handed) 1d6+1) Known Sorcerer Spells (CL 3rd 1st (6/day)—color spray (DC 13), magic missile, shield 0 (at will)—daze (DC 12), detect magic, mage hand, prestidigitation, ray of frost STATISTICS Str 12, Dex 12, Con 12, Int 12, Wis 12, Cha 14 Base Atk +1; Grp 2 Feats Quicken Spell, Simple Weapon Proficiency, Still Spell Skills Concentration +7 , Diplomacy +4 , Scry +3 , Spellcraft +7 , Swim -1 Languages Common, Dwarven SQ dwarf racial traits, summon familiar Gear crossbow, light, quarterstaff, backpack SPECIAL ABILITIES +1 racial bonus on attack rolls against orcs and goblinoids +1 racial bonus on attack rolls against orcs and goblinoids +2 racial bonus on Appraise checks that are related to stone or metal items. +2 racial bonus on Appraise checks that are related to stone or metal items. +2 racial bonus on Craft checks that are related to stone or metal. +2 racial bonus on Craft checks that are related to stone or metal. +4 dodge bonus against giants. +4 dodge bonus against giants. Darkvision (Ex) Range 60; Darkvision is the extraordinary ability to see with no light source at all, out to a range specified for the creature. Darkvision is black and white only (colors cannot be discerned). It does not allow characters to see anything that they could not see otherwise-invisible objects are still invisible, and illusions are still visible as what they seem to be. Likewise, darkvision subjects a creature to gaze attacks normally. The presence of light does not spoil darkvision. Darkvision Dwarves can see in the dark up to 60 feet. Darkvision is black and white only, but it is otherwise like normal sight, and dwarves can function just fine with no light at all. Dwarf Racial Traits +1 racial bonus on attack rolls against orcs and goblinoids. +4 dodge bonus against giants. +2 racial bonus on Appraise checks that are related to stone or metal items. +2 racial bonus on Craft checks that are related to stone or metal. Stability +4 bonus on ability checks made to resist being bull rushed or tripped when standing on the ground (but not when climbing, flying, riding, or otherwise not standing firmly on the ground). Stonecunning This ability grants a dwarf a +2 racial bonus on Search checks to notice unusual stonework, such as sliding walls, stonework traps, new construction (even when built to match the old), unsafe stone surfaces, shaky stone ceilings, and the like. Something that isn't stone but that is disguised as stone also counts as unusual stonework. A dwarf who merely comes within 10 feet of unusual stonework can make a Search check as if he were actively searching, and a dwarf can use the Search skill to find stonework traps as a rogue can. A dwarf can also intuit depth, sensing his approximate depth underground as naturally as a human can sense which way is up. Summon Familiar The statblock you posted is not formatted correctly, and so the parser can't handle it. EDIT: Note that this PCGen statblock still needs the edits outlined in the statblock import section of the manual.
I have yet to find it give a statblock like that.
1503199487

Edited 1503199573
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Daniel L. said: Edit: rollable tokens worked, thanks. Great., sorry for the confusion @Xathos, I'll look into it and see if I can get a set of directions for getting the proper statblock.
1503238267
vÍnce
Pro
Sheet Author
Xathos said: I have yet to find it give a statblock like that. See if this helps <a href="http://imgur.com/a/SYgV6" rel="nofollow">http://imgur.com/a/SYgV6</a>
1503238786

Edited 1503241418
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks Vince EDIT: This information has been added to the Manual.
What exactly is the Damage/Effect listener, and how does one use it? I noticed it's not in the user manual.
1503334950

Edited 1503334979
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The damage/effect listener didn't make it in to v1.0. I left it in the config menu didn't I? I'll have to take that out of there till it's actually in.
Yeah, it's still in here... unless I need to update?
1503339935

Edited 1503340646
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Nope, I apparently just forgot to remove the config option. It's not actually active at the moment. It is a feature that will be coming though. When it does go live, the script will parse sheet roll template output and calculate the damage done, what type it is (Fire, bludgeon, slash, etc) as well as any other conditions/buffs that need to be applied. The script will then output a chat menu where you can select the target and it will then apply the damage to that token/character taking resistances, immunities, and DR into account. Also part of the listener package is that you will be able to create AOE patterns (circle, cone, line or cube) &nbsp;and have the effects applied to all tokens in the area. This will also work with healing and buffs. In the case of buffs, it will copy the buff from the caster's sheet and create it on the target's sheet. As I said though, it is not ready for primetime though.
Well, I tried and tried and tried to do this and had no success. Then I began to wonder if I had to do it with the name all in capital letters. Oddly enough, that seems to have mattered.
1503421371
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, that shouldn't have, but I'll check the regex for it and make sure.
1503429072
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Xathos, Could you PM me the statblock that is generated for the character in question? Want to do some testing with it. Scott
Scott, I sent the block. I got that straight off of PC Gen using the method Vince linked.
1503435604
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks a lot, I'll put it through the editing and then see what's going on. I'm honestly surprised I haven't been barraged with more parser errors, knock on wood.
I just took Natalya Vancaskerkin from Shards of Sin in the Shattered Star AP and used the PC Gen stat block format (edited) in Notepad to create a statblock for her. I left the name in the statblock as I typed it here and use that same style when I parsed it in Roll20. Came out fine. I did notice that the INIT comes up with the reverse of the INIT in the statblock. Hers is supposed to be +3. For some reason it is putting in the same figure, but negative in the MISC box. I wouldn't have figured it out except I clicked the show more fields box for that section and there was a -3 in the MISC box. Once I cleared that, her INIT was correct. I haven't experimented with what to put in the Tactics section. More accurately, how I should enter it in the format so it goes into the Notes section of the sheet. I think that's the biggest thing now with PFS stuff. I'm not sure if I can just use a straight PFS statblock and run it through Notepad or not.
I think the name thing is because for Djerl the statblock has it as DJERL MORGHUN and I was typing in Djerl Morghun.
As far as the PCGen statblocks go, it's possible to create a custom output template to be more in line with your parser rather than having to edit each time you export something.&nbsp; This is what I did for my PCGen importer.&nbsp; I'm interested in using this script for a RotRL game I've been running, so maybe I'll cook something up and post it here.
1503502679
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks Norman, that'd be awesome
I was playing around with the script (I'm loving it so far, haven't had a game with it yet though), and I tried enabling the status markers.&nbsp; Seems whenever I add a condition to someone (through the script or manually) the script crashes.&nbsp; Are there any gotchas I should be looking out for with that?
1503585082
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, that shouldn't be happening. Can you post the error message that is generated? And importantly, is the error message output to chat, so the sandbox is still active, or does it crash the sandbox?
It crashes the sandbox: SyntaxError: Unexpected token &lt; in JSON at position 3583 SyntaxError: Unexpected token &lt; in JSON at position 3583 at JSON.parse (&lt;anonymous&gt;) at characters.(anonymous function).get (apiscript.js:2956:56) at /home/node/d20-api-server/api.js:717:7 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Rd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400 at S (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:57:1015)
1503604973
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
hmmm, ok, that's an error I was not expecting to see. Norman, do you have any other scripts installed? I'm asking so that I can try to parse the error's position better, not because I think there is a conflict going on. Thanks, Scott
Sorry, been in and out of work today!&nbsp; The only other script I have installed is my PCGen importing script.&nbsp; It's inactive unless given a command (I forget, I think it's something like !pcgenimport or something).&nbsp; Other than that, the PCs I was testing on were originally from a pretty old version of the character sheet (although we've updated as the sheet has been updated).&nbsp; It's possible that there are some pretty old antiquated attributes if that could cause something like this (Not that I think it's something like that, just spitballing ideas without looking at where it broke in the code :P).
1503627843
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, ok. Can you deactivate PCGen import, and then trigger the error again? I just need an accurate line number to trace the error.
I disabled the other script, unfortunately it still crashed when applying a condition: For reference, the error message generated was: SyntaxError: Unexpected token &lt; in JSON at position 3583 SyntaxError: Unexpected token &lt; in JSON at position 3583 at JSON.parse (&lt;anonymous&gt;) at characters.(anonymous function).get (apiscript.js:2791:56) at /home/node/d20-api-server/api.js:717:7 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Rd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400 at S (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:57:1015)
1503631978
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, I expected it to. I know it's not a conflict between the two scripts, I just needed the actual PFC line number that is throwing the error. Ok it looks like I missed a place that needed a try{}catch{} loop. The problem is that there is something funky in your token or default token for the character in question. Does this happen for every token and/or character?
It happens to everything I've tried, but this has been an inactive game for a while, so a lot of the characters probably have wonky old deprecated attributes from previous versions of the character sheets if that matters.&nbsp; I'll try importing a new character and trying it out when I get home.
1503633193
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, it shouldn't be anything with the character itself. the JSON.parse is on the defaulttoken info, not the character itself. Could you transfer one of the character's it has happened in into the Pathfinder beta campaign? I'll grab it from there and do some troubleshooting.
I'll look into doing that (unsure what the Pathfinder beta campaign is), I tried importing something quick through a statblock and got some errors, so I used my pcgen script with another character to try something newer.&nbsp; When I try to set a condition through your chat GUI on this guy, nothing happens.&nbsp; If I manually set a condition I get an error return in chat: Unexpected token &lt; in JSON at position 22512SyntaxError: Unexpected token &lt; in JSON at position 22512 at JSON.parse ()
1503636716
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
hmm, ok, something funky is going on. Is the pcgen script updated to work with the attributes in the current version of the sheet? Also, the&nbsp; Pathfinder Beta Campaign is where you can see what the next update to the sheet will look like and is how we collect problem characters for troubleshooting. You can use the character vault to transfer a character in and post here with the name of the character. I'll then import it to my Scriptorium and see what's going on.
Nah, my import script doesn't have the latest latest attributes (I haven't worked on it in a couple months), but they're recent enough where everything seems to work as far as I can tell when I import.&nbsp; I went ahead and threw one of the characters that was causing me problems in the beta server.&nbsp; The character name is "Madrigal Glassthane". On a side note I checked out the output sheet for PCGen, and all of the changes needed to make it compatible with your stuff are super trivial.&nbsp; It only took a second to fix the things listed in the documentation (although I still haven't been able to get parsing to work yet, but that is 100% on me at the moment, it'll be something for me to do tomorrow xD)
1503637514

Edited 1503637740
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
shoot me the pcgen statblock you're trying to import and I'll take a look at it. The PCGEN import functionality is the least tested aspect of the script, so It wouldn't surprise me if there's something that the parser misses in more complex statblocks. EDIT: Also, I'll take a look at all this over the weekend.
Scott, Did you do testing with PFS statblocks from PFS scenarios? That's my next target is getting those to load via the pfc script.
1503686281
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I did not do those specifically as I don't have any of the modules, but they should be in the same format as the PRD,so should work, although text from a PDF can be messy.
1503858251

Edited 1503858826
So I've got one more question for you!&nbsp; Ammunition tracking works great, it decrements the ammo as needed fine.&nbsp; It mentions in the user manual though that it should also display the amount of ammunition remaining, and notify if there was not enough.&nbsp; That's the part I'm missing.&nbsp; Is this something I need to add manually to the macro?&nbsp; Or is it something the script does automatically (It doesn't seem to be currently doing it). EDIT:&nbsp; While I'm at it, I have a second one more question!&nbsp; In the status control menu (--statuscontrol), are the amount of buffs displayed limited to 4?&nbsp; I haven't been able to get it to display more than that. EDIT2:&nbsp; Nvm about that edit, it was some weirdness that came from me in my adventure to delete some nonsense in the GM Field of some PCs tokens ;)
1503858764

Edited 1503858837
vÍnce
Pro
Sheet Author
You should be seeing a post in chat from pfc right immediately after a resource has been used.&nbsp; It includes the current amounts and the ability to reset, add/remove more resources of the tracked item.&nbsp; I haven't noticed a status limit... I would have to test for that.
1503858845
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hey Norman, The number of buffs shouldn't be limited, it iterates through all your buffs and then displays them with formatting based on their status. For the ammo tracking, can you post a screen cap of what the chat output looks like after ammo tracking has activated and of the equipment item the weapon is linked to?
Hey guys, sorry I was hoping my edits got through before you saw that, the Buff problem was me being stupid and jumping the gun &gt;.&lt; I think the screenshots below show my problem with the ammo tracking though. Note that the Arrow item decrements properly.&nbsp; Sorry it took so long to get these up, for some reason the forums were refusing to post them.
1503860045
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
hmm, can you post a screencap of the item on the sheet?
Sure thing!&nbsp; Here you go.
1503860730
vÍnce
Pro
Sheet Author
Do you also have ammo filled in on your bow attack?