PF statblock importer

Discussion concerning lmarkus' campaign framework for D&D3.x and Pathfinder.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice, lmarkus001

Forum rules
Discussion regarding lmarkus001's framework only. Other posts deleted without notice! :)
Post Reply
User avatar
Cosworth
Cave Troll
Posts: 31
Joined: Thu Nov 19, 2009 1:17 pm
Location: Denmark
Contact:

PF statblock importer

Post by Cosworth »

This macro takes a pathfinder formatted statblock and updates the selected token with stats, skills etc.

Prerequites: Pathfinder framework v1.3.b61r1 or higher

Use: Select a fresh token and click the macro. Paste a pathfinder type statblock into the dialog. The chat window will show which stats have been updated.

Not handled:
- knowledge & craft skills
- most special qualities
- special abilities

Known issues:
An en dash used as a minus sign will confuse maptool and result in "–1" being shown as "–10"
sample statblock
Giant Frog CR 1
XP 400
N Medium Animal
Init +1; Senses low-light vision, scent; Perception +3
Defenses
AC 12, touch 11, flat-footed 11 (+1 Dex, +1 natural)
hp 15 (2d8+6)
Fort +6, Ref +6, Will -1
Offense
Speed 30 ft., swim 30 ft.
Melee bite +3 (1d6+2 plus grab) or
tongue +3 (grab)
Space 5 ft.; Reach 5 ft. (15 ft. with tongue)
Special Attacks adhesive tongue, pull (tongue, 5 feet), swallow
whole (1d4 bludgeoning damage, AC 10, 2 hp)
Statis tics
Str 15, Dex 13, Con 16, Int 1, Wis 9, Cha 6
Base Atk +1; CMB +3 (+7 grabbing with tongue); CMD 14
Feats Lightning Reflexes
Skills Acrobatics +9 (+13 jumping), Perception +3, Stealth +5, Swim
+10; Racial Modifiers +4 on Acrobatics (+8 jumping), +4 on Stealth
Attachments
Statblock2Token1_6.mtmacro
v1.6
(5.17 KiB) Downloaded 852 times
Statblock2Token.mtmacro
v1.5
(4.99 KiB) Downloaded 362 times
Last edited by Cosworth on Sun Feb 07, 2010 3:21 pm, edited 8 times in total.

User avatar
Cosworth
Cave Troll
Posts: 31
Joined: Thu Nov 19, 2009 1:17 pm
Location: Denmark
Contact:

Re: PF statblock importer

Post by Cosworth »

a quick update.
change in v1.3:
- all framework feats are understood now
- TokenPropertyType set to Pathfinder per default
- robustness improved
- DR, SR & Reach is read now although DR only partially implemented.

User avatar
galneweinhaw
Dragon
Posts: 481
Joined: Tue Jan 02, 2007 3:03 pm

Re: PF statblock importer

Post by galneweinhaw »

Love it! awesome work. We should convince lmarkus to add this macro to his framework =D

Now you just have to figure out how to add in the weapons/attacks :wink:
galneweinhaw = galileo newton einstein hawking

User avatar
galneweinhaw
Dragon
Posts: 481
Joined: Tue Jan 02, 2007 3:03 pm

Re: PF statblock importer

Post by galneweinhaw »

I tried making an Ochre Jelly, pasting exactly this:
Spoiler

Code: Select all

Ochre Jelly CR 5

XP 1,600

N Large ooze

Init –5; Senses blindsight 60 ft.; Perception –5

Defense

AC 4, touch 4, flat-footed 4 (–5 Dex, –1 size)

hp 63 (6d8+36)

Fort +8, Ref –3, Will –3

Defensive Abilities split; Immune electricity, mind-affecting effects, ooze traits, slashing and piercing damage

Offense

Speed 10 ft., climb 10 ft.

Melee slam +5 (2d4+3 plus 1d4 acid and grab)

Space 10 ft.; Reach 5 ft.

Special Attacks constrict (2d4+3 plus 1d4 acid)

Statistics

Str 14, Dex 1, Con 22, Int —, Wis 1, Cha 1

Base Atk +4; CMB +7 (+11 grapple); CMD 12 (can't be tripped)

Skills Climb +10
and got this as output: Illegal argument type java.lang.String, expecting java.math.BigDecimal

this is with v1.3

Most of the stats were entered into the token however, with only skills and maybe a couple others missing.
galneweinhaw = galileo newton einstein hawking

User avatar
Cosworth
Cave Troll
Posts: 31
Joined: Thu Nov 19, 2009 1:17 pm
Location: Denmark
Contact:

Re: PF statblock importer

Post by Cosworth »

The Ochre Jelly read fine here so I could only make a guess as to what the problem is.

Try this slightly modified Ochre Jelly. I've replaced the en dashes with proper minus signs
Spoiler
Ochre Jelly CR 5
XP 1,600
N Large ooze
Init -5; Senses blindsight 60 ft.; Perception -5
Defense
AC 4, touch 4, flat-footed 4 (-5 Dex, -1 size)
hp 63 (6d8+36)
Fort +8, Ref -3, Will -3
Defensive Abilities split; Immune electricity, mind-affecting effects, ooze traits, slashing and piercing damage
Offense
Speed 10 ft., climb 10 ft.
Melee slam +5 (2d4+3 plus 1d4 acid and grab)
Space 10 ft.; Reach 5 ft.
Special Attacks constrict (2d4+3 plus 1d4 acid)
Statistics
Str 14, Dex 1, Con 22, Int —, Wis 1, Cha 1
Base Atk +4; CMB +7 (+11 grapple); CMD 12 (can't be tripped)
Skills Climb +10
Sorry I can't be more specific.

Imper1um
Cave Troll
Posts: 92
Joined: Mon Sep 28, 2009 7:46 am

Re: PF statblock importer

Post by Imper1um »

Fricken awesome, saves me LOTS of time when importing monsters, however, a few bugs:

1. When importing the saves, make sure that you remove the bonus from the individual stat (WIS Mod from Will Save, etc).
2. When putting the HP, put in the HP minus CON.
3. If a stat is -, the value should be 0.
4. Calculate HD by looking at the number in front of the d when looking at the HP. For example,

hp 18 (2d8+9)

The HD is 2. You'll also have to take into account when they have multi-classing, for example,

hp 43 (4d8+3d6+7)

The HD is 7 (4+3).

5. When calculating the skills, don't just put in the Ranks, I would put in 1 point per HD, changing the skill to 'Class' instead of Cross, and then what is remaining (minus Size, Armor and Stat), I would put the extra points in Misc.

User avatar
Cosworth
Cave Troll
Posts: 31
Joined: Thu Nov 19, 2009 1:17 pm
Location: Denmark
Contact:

Re: PF statblock importer

Post by Cosworth »

I almost forgot to upload the latest version 1.4.

It does attacks now as well, identifying multiple attacks, offhand weapons, natural attacks, ranged, bonuses, twohanded strength bonuses etc. Some inaccuracies are to be expected.

Multiple fixes including Saves & HP done correctly

Room for improvement: HD calc + Skills done more intelligently

I can't set a stat to 0 as that generates a -5 modifier in the current framework
Attachments
Statblock2Token.mtmacro
v 1.4
(5 KiB) Downloaded 268 times

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: PF statblock importer

Post by Azhrei »

Cosworth wrote:I can't set a stat to 0 as that generates a -5 modifier in the current framework
Yeah, that's a bummer. :(

What should probably happen is the value should be set to -1 and the modifier properties should check and return the correct value. For example, using the following for the ConMod property would take care of it for undead:

Code: Select all

[r: if(Constitution==-1, 100, floor((Constitution-10)/2)) ] 
Of course, the bigger issue is that every macro that blindly uses ConMod should really be checking for the -1 because the use of ConMod is an indicator that maybe the roll isn't needed at all (such as a Fortititude save). I used 100 in the above formula because it pretty much guarantees that any use of ConMod will succeed. :)

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: PF statblock importer

Post by lmarkus001 »

Yeah for Stats of - I enter 10. This gives no bonus/penalty.

User avatar
Cosworth
Cave Troll
Posts: 31
Joined: Thu Nov 19, 2009 1:17 pm
Location: Denmark
Contact:

Re: PF statblock importer

Post by Cosworth »

I just discovered that my latest version 1.4 in fact wasn't updated at all. The correct file is in the first post now.

Imper1um
Cave Troll
Posts: 92
Joined: Mon Sep 28, 2009 7:46 am

Re: PF statblock importer

Post by Imper1um »

(thumbs up) Fricken awesome, saves and HP is dead on!

Few other things, HD is still not being imported correctly. Importing a Small Fire Elemental (2 HD http://www.d20pfsrd.com/bestiary/monste ... ental/fire) is still giving 1 HD.

Also, if you find the 'Immune' and 'Weaknesses' section, add it to the Note in the Energy Resistance Section.

Lastly, in the 'Race' section in the main stats, when you encounter
N Small outsider (elemental, extraplanar, fire)
Outsider type is being selected correctly, however, the Extraplanar and Fire checks are not being checked. If anything, you can put these in the Notes section under race and people can check them off.

As for the weapons, make sure you are selecting 'Fighting with Two-Weapons?' to 'Off-hand Heavy/Monster'. Also, if you see
Melee slam +4 (1d4 plus burn)
make sure you don't add the 'plus burn' to the end of the Damage.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: PF statblock importer

Post by Azhrei »

And I seemed to have a problem with a bow being listed as "x2" although the statblock clearly showed "x3".

And the orcs that the party fought last night didn't all have the correct weapons (they were using greataxes and mwk composite longbows), but I suppose it's more help if I just post the statblock here for testing, eh? I'll come back and do that later...

Otherwise I thought this thing did an AWESOME job of simplifying my game prep!

User avatar
Cosworth
Cave Troll
Posts: 31
Joined: Thu Nov 19, 2009 1:17 pm
Location: Denmark
Contact:

Re: PF statblock importer

Post by Cosworth »

Glad this is being put to use.

I'll get around to the HD issue soon. Good point on the vulnerabilities/immunities.

When a damage string reads (1d6+grab) or similar I've opted to copy the whole string into the damage die entry. The diceroller seems to be ok with this. Otherwise I wouldn't know where to put the +grab info. Any suggestions?

The most difficult is handling attack options. Lindsey's framework splits each weapon into a separate slot and this makes it difficult to assign e.g the harpy's full attack

Melee morningstar +8/+3 (1d8+1), 2 talons +3 (1d6)

Here the morningstar is a primary weapon and the talons secondary. Multiattack penalty is applied to the talons and they are considered OH/light weapons. The Morningstar receives no penalty.
Had the talons been a dagger instead the whole calculation changes as the two weapon fighting penalties kick in for the morningstar.

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: PF statblock importer

Post by lmarkus001 »

Remember that a "weapon" in my framework is really an "attack set". So when you encounter a monster that wields a manufactured weapon, the general rule is that weapon is considered a primary single weapon attack. But then all other attacks from the monster are considered secondary attacks (so get -5 or -2 if have multi-attack).

There are of course variants to those basic rules (ettin, for example, has 2 heads so can get 2 primary attacks with weapons). But in general, an equipped manufactured weapon is a primary attack weapon that uses decaying BAB (11/5/1) for number of attacks, and all other natural attacks are secondary weapons.

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: PF statblock importer

Post by neofax »

I am getting an error:

java.lang.NullPointerException error executing expression s = json.set( s, "rank", skVal-eval(skStat)).

With the below statblock. I thought it was Profession: Brewer, so I took that out. Still get the error though.:
Spoiler
Jek Bartollo, Tavern Keeper CR 4
Male Human Rogue 5
LE Medium humanoid (Relford Local)
Init +3; Senses Perception +7
AC 17, touch 13, flat-footed 14
(+4 armor, +3 Dex)
hp 38 (5d8)
Fort +1, Ref +7, Will +1
Spd 30 ft
Melee +1 shortsword +6 (1d6+3/19-20) club +5 (1d6+2)
Ranged light crossbow +6 (1d8/19-20)
Special Attacks Sneak Attack +3d6, Surprise Attack
During Combat: Jek is a burly man whose stocky frame belies his nimbleness and agility. Jek will use his bluff skill to feint in combat if it means that one of his road agents can gain the upper hand or make a sneak attack of their own.
Morale: Jek is no fool and knows when he is beaten. Jek will surrender if it means saving his life. He will however remember the incident and seek revenge at the earliest opportunity.
Str 14, Dex 16, Con 10, Int 12, Wis 10, Cha 14
Base Atk +3 CMB +6; CMD 18
Feats Agile Maneuvers, Armor Proficiency (Light), Deadly Aim, Deceitful, Master Craftsman: Profession: Brewer, Rogue Weapon Proficiencies, Simple Weapon Proficiency (All)
Skills Acrobatics +8, Appraise +6, Bluff +11, Climb +7, Diplomacy +6, Disable Device +10, Disguise +8, Escape Artist +8, Fly +3, Intimidate +9, Knowledge: Local +9, Linguistics +5, Perception +7, Profession: Brewer +10, Ride +3, Sense Motive +8, Sleight of Hand +10, Stealth +11, Swim +2, Use Magic Device +10
Languages Common, Orc, Elf
SQ Resiliency, Sneak Attack +3d6, Trap Sense +1, Trapfinding +2, Uncanny Dodge
Gear +1 shortsword, +2 leather armor, crossbow bolts x30 caltrops, club, light crossbow, masterwork thieves’ tools, potion of cure moderate wounds, desk key, safe key, 22gp

Post Reply

Return to “D&D 3.5/Pathfinder 1e Campaign Macros”