RPTools.net

Discussion and Support

Skip to content

It is currently Wed May 22, 2013 5:42 pm 




Forum rules


Discussion regarding lmarkus001's framework only. Other posts deleted without notice! :)



Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next

Previous topic | Next topic 

  Print view

Author Message
 Offline
Giant
 
Joined: Mon Sep 28, 2009 6:46 am
Posts: 132
 Post subject: [ADDON] [WIP] Rewrite of Statblock2Token Macro
PostPosted: Tue Jul 13, 2010 10:17 pm 
All props go to Cosworth for making the macro in the first place.

This new set changes things a little.

  1. HD Support (No more CR 23, HD 23 Zombies, it correctly interprets HD)
  2. Herolab Fixes
    • Detected a bug when it comes to Magical Items and Stat Bonuses. It lists the base stat then magic after a /
    • Detected some issues with multiple attacks. Stupid "and" and when it uses "Shield, Heavy Steel" (shudders)
  3. Fixes for Statblock Weirdness
    • Fixed some weirdness when it comes to some Statblocks and Names.
    • Fixed some stupid weirdness when it comes to Statblocks using the longer negative (ASCII Code) rather than the Negative next to the zero (0) key. I blame Paizo.
    • Making sure that the SQ Field doesn't get too bad.
    • Fixed for when I'm looking at Herolab and non-herolab tokens.
  4. Detecting immunities to damage types and using '999'.
  5. Putting extra DR/ER it can't figure out into the DR/ER Notes
  6. Modular...easier to read!
  7. Nice little fixes for when a Statblock includes Rage in the statblock.
  8. Adding AC Bonuses to a Mod-set Group rather than the legacy code.
  9. Added in a debug option to allow popups which decrease debunking time. You can enable debugging by changing 0 to 1 when calling convertStatblock.
  10. Debug options! If you wish to enable debug mode, you just need to send 1 instead of 0 to the convertStatblock macro.
  11. Fixed if there is no subtype.

Changelog:
  • Aug 28, 2010: Fixed No Subtype sets.
  • Sep 26, 2010: Adding in fixes for <1 Saves.

More fixes will be added as I make them.

WARNING: At the moment, this does not parse the full token.

Parsing to Do:
  • Cleric Channel Energy
  • Vision
  • Racial Skills

Output to Do:
  • Attacks
  • Skills
  • Speeds
  • SQ/SA

Edit Token to do:
  • See above


File comment: Put this where you put your Libraries.
[UPDATED Sept 26, 2010, 9:20 AM]

Lib_Statblock2token.rptok [29.58 KiB]
Downloaded 118 times
File comment: Put this in your Campaign Macros.
[UPDATED July 15, 7:42 AM]

ConvertStatblock.mtmacro [941 Bytes]
Downloaded 144 times


Last edited by Imper1um on Sun Sep 26, 2010 8:20 am, edited 15 times in total.
Top
 Profile  
 
 Offline
Giant
 
Joined: Mon Sep 28, 2009 6:46 am
Posts: 132
 Post subject: Re: WIP: Rewrite of Statblock2Token Macro
PostPosted: Wed Jul 14, 2010 12:49 am 
Perhaps someone can figure out why getRacialSkillsFromStatblock isn't working. I'm having a heck of a time trying to figure out why it's not working. Here's the statblock that I'm attempting to use with the macros:

Code:
Aasimar    CR 1/2
XP 200
Aasimar cleric 1
NG Medium outsider (native)
Init +0; Senses darkvision 60 ft.; Perception +5
 DEFENSE
AC 15, touch 10, flat-footed 15 (+5 armor)
hp 11 (1d8+3)
Fort +4, Ref +0, Will +5
Resist acid 5, cold 5, electricity 5
 OFFENSE
Speed 30 ft. (20 ft. in armor)
Melee heavy mace –1 (1d8–1)
Ranged light crossbow +0 (1d8/19–20)
Special Attacks channel positive energy (5/day, 1d6, DC 12); rebuke death (1d4+1, 6/day); touch of good (6/day)
Spell-Like Abilities (CL 1st) 1/day–daylight
Spells Prepared (CL 1st)
1st–bless, command (DC 14), protection from evilD
0 (at will)–detect magic, guidance, stabilize
D domain spell; Domains Good, Healing
 STATISTICS
Str 8, Dex 10, Con 14, Int 13, Wis 17, Cha 14
Base Atk +0; CMB –1; CMD 9
Feats Turn Undead
Skills Diplomacy +8, Heal +7, Knowledge (religion) +5; Racial Modifiers +2 Diplomacy, +2 Perception
Languages Celestial, Common, Draconic


It uses the same macro function as the skills one, but it can't seem to pick up the skills and parse them out. There's something I'm doing incorrectly and it's staring me in the face, but I can't seem to see it.


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 11622
Location: Tampa, FL
 Post subject: Re: WIP: Rewrite of Statblock2Token Macro
PostPosted: Wed Jul 14, 2010 5:20 pm 
It looks like the modifiers are in front of the skill name instead of after the skill name. Is that the issue?

_________________
Interested in Time Magazine's Best Invention of 2008 Unix-powered laptop? No crashes or lockups. In fact, that series of articles has two such machines. The other is a Dell netbook. :)


Top
 Profile  
 
 Offline
Giant
 
Joined: Mon Sep 28, 2009 6:46 am
Posts: 132
 Post subject: Re: WIP: Rewrite of Statblock2Token Macro
PostPosted: Wed Jul 14, 2010 5:40 pm 
Yup. It is the issue. Thanks Azhrei.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Tue Jun 22, 2010 12:15 pm
Posts: 1
 Post subject: Re: WIP: Rewrite of Statblock2Token Macro
PostPosted: Thu Jul 22, 2010 9:22 pm 
Really looking forward to this since the current Statblock2Token gives me an error for about half the things I try to import.


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 11622
Location: Tampa, FL
 Post subject: Re: WIP: Rewrite of Statblock2Token Macro
PostPosted: Fri Jul 23, 2010 12:58 am 
It would be good to actually report those issues so that proper solutions can be included. :)

In fact, it might be a good idea to build a bunch of statblocks that shold work so that the new macro can be tested against them. Then we could build that library of statblocks larger and larger and as changes were made to the macro the various statblocks could be retested to make sure the old ones still work.

(The programmers among us would call that "regression testing", but the non-programmers wouldn't know what that means so I spelled it out. 8))

_________________
Interested in Time Magazine's Best Invention of 2008 Unix-powered laptop? No crashes or lockups. In fact, that series of articles has two such machines. The other is a Dell netbook. :)


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Wed Dec 03, 2008 5:13 pm
Posts: 93
 Post subject: Re: WIP: Rewrite of Statblock2Token Macro
PostPosted: Mon Jul 26, 2010 12:04 am 
I tested this tonight on the stat block for a Red Cap using the stat block on www.pathfindersrd.com and it failed to parse the listed DR 10/Cold Iron. Since DR is one of the things it's supposed to be doing correctly, I thought I'd mention it.


Top
 Profile  
 
 Offline
Giant
 
Joined: Mon Sep 28, 2009 6:46 am
Posts: 132
 Post subject: Re: WIP: Rewrite of Statblock2Token Macro
PostPosted: Tue Jul 27, 2010 11:43 am 
Can you provide the statblock so I can debunk this?


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Wed Dec 03, 2008 5:13 pm
Posts: 93
 Post subject: Re: WIP: Rewrite of Statblock2Token Macro
PostPosted: Wed Jul 28, 2010 2:40 pm 
Imper1um wrote:
Can you provide the statblock so I can debunk this?


Debunk away.
www.pathfindersrd.com wrote:
Redcap CR 6

XP 2,400
Always NE Small fey (Pathfinder #4 pg 80)
Init +8; Senses low-light vision ; Perception +12
DEFENSE

AC 20, touch 15, flat-footed 16 (+2 armor, +4 Dex, +3 natural, +1 size)
hp 60 (8d6+32); fast healing 3
Fort +6, Ref +10, Will +7
DR 10/cold iron
Weaknesses irreligious
OFFENSE

Speed 60 ft.
Melee scythe +10 (2d4+10) and kick +4 (1d4+6)
Special Attacks boot stomp
Tactics Lone redcaps try to wear down their opponents by using their boot stomp ability to make a series of hit-and-run attacks. Groups, however, are much more bold, swarming larger foes and slicing them to shreds with their terrible scythes. Bloodthirsty creatures, redcaps fight until they are barely able, fleeing only if reduced below 5 hit points.
STATISTICS

Str 18, Dex 19, Con 18, Int 16, Wis 13, Cha 15
Base Atk +4; CMB +7; CMD 21
Feats Cleave, Improved Initiative, Power Attack, Weapon Focus (scythe)
Skills Acrobatics +15 (+27 jumping), Bluff +13, Climb +15, Escape Artist +15, Intimidate +10, Knowledge (nature) +14, Perception +12, Sense Motive +12, Stealth +19; Racial Modifiers +12 when jumping
Languages Aklo, Common, Giant
SQ heavy weapons, red cap
Gear Leather armor, Medium Scythe
SPECIAL ABILITIES
Boot Stomp (Ex)

A redcap wears heavy iron boots with spiked soles that it uses to deadly effect in combat. It can use its boots to make a secondary attack as part of a full attack action or can use them to make an attack as part of its movement just as if it had the Spring Attack feat. A redcap is only treated as having Spring Attack when attacking with its boots and no other weapon.
Heavy Weapons (Ex)

A redcap's powerful hands and arms allow it to wield Medium weapons without penalty.
Irreligious (Ex)

Bitter and blasphemous, a redcap cannot stand the symbols of good-aligned religions. If a foe spends a standard action presenting such a holy symbol, any redcap that can see the character must make a DC 15 Will save or become frightened for 1 minute and attempts to flee. A redcap who successfully saves becomes shaken for 1 minute.
Red Cap (Su)

A redcap wears a tiny, shapeless woolen hat, dyed over and over with the blood of its victims. While wearing its cap, a redcap gains a +4 bonus on damage rolls and fast healing 3 (reflected above). These benefits are lost if the cap is removed or destroyed, and caps are not transferable, even between redcaps. A redcap can create a new cap to replace a lost cap with 10 minutes of work, although until the redcap can take a standard action to dip the cap in the blood of a foe the recap helped kill, it does not grant its bonuses.


A token generated by the macro is also attached. I've also noticed that the rewrite has the same bug as the old macro, where the values are changed for movement but do not register unless you open the movement panel to manually edit them(the correct values are listed already, but it will not display them unless you click OK).

EDIT: Actually, this is a little weird. It shows the correct DR when you open the dialog to edit core properties(the framework macro, not editing the token directly), but it does not display or show it listed when manually examining the token properties. Instead, DR is a blank and DRER doesn't show any changes at all to the JSON object.


Redcap.rptok [95.27 KiB]
Downloaded 20 times
Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Wed Dec 03, 2008 5:13 pm
Posts: 93
 Post subject: Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro
PostPosted: Wed Jul 28, 2010 6:13 pm 
This strange prompt for a value came up:
Code:
Unresolved value match.1060.m1.group1.


EDIT: The prompt was for the unresolved value. The message above is what was generated when I canceled out of the prompt.

when I imported this stat block:

Code:
Phase Spider
   CR 5
XP 1,600
N Large magical beast
Init +7; Senses darkvision 60 ft., low-light vision; Perception +6
DEFENSE
AC 17, touch 12, flat-footed 14 (+3 Dex, +5 natural, -1 size)
hp 51 (6d10+18)
Fort +8, Ref +8, Will +3
Defensive Abilities ethereal jaunt
OFFENSE
Speed 40 ft., climb 20 ft.
Melee bite +10 (2d6+7 plus poison and grab)
Space 10 ft.; Reach 5 ft.
Special Attacks ethereal ambush
STATISTICS
Str 20, Dex 17, Con 16, Int 7, Wis 13, Cha 10
Base Atk +6; CMB +12 (+16 grapple); CMD 25 (37 vs. trip)
Feats Ability Focus (poison), Improved Initiative, Skill Focus (Stealth)
Skills Climb +18, Perception +6, Stealth +7
Languages Aklo
SPECIAL ABILITIES
Ethereal Ambush (Ex)
A phase spider that attacks foes on the Material Plane in a surprise round can take a full round of actions if it begins the combat by phasing into the Material Plane from the Ethereal Plane.
Ethereal Jaunt (Su)
A phase spider can shift from the Ethereal Plane to the Material Plane as a free action, and shift back again as a move action (or as part of a move action). The ability is otherwise identical to ethereal jaunt (CL 15th).
Poison (Ex)
Bite—injury; save Fort DC 18; frequency 1/round for 8 rounds; effect 1d2 Constitution damage; cure 2 consecutive saves. The save DC is Constitution-based.


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Wed Dec 03, 2008 5:13 pm
Posts: 93
 Post subject: Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro
PostPosted: Wed Jul 28, 2010 7:58 pm 
Here's an example of a statblock that generated a strange error, but I can't post it in total because I'm not sure it's open content:

Code:
Dread Zombie Cyclops   
XP 2,400
CR 6
Pathfinder RPG Bestiary 52, Advanced Bestiary 105
CE Large undead
Init -2; Senses low-light vision; Perception +19
Defense
AC 19, touch 7, flat-footed 19 (+2 armor, -2 Dex, +10 natural,
-1 size)


This was the error the macro generated:
Code:
Error executing setName: the token name cannot be empty.


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 11622
Location: Tampa, FL
 Post subject: Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro
PostPosted: Thu Jul 29, 2010 4:10 pm 
That last one is easy: the statblock is supposed to have the CR first, then the XP. The macro is probably relying on the statblock adhering to the standard and that one does not...

_________________
Interested in Time Magazine's Best Invention of 2008 Unix-powered laptop? No crashes or lockups. In fact, that series of articles has two such machines. The other is a Dell netbook. :)


Top
 Profile  
 
 Offline
Giant
 
Joined: Mon Sep 28, 2009 6:46 am
Posts: 132
 Post subject: Re: WIP: Rewrite of Statblock2Token Macro
PostPosted: Fri Jul 30, 2010 10:51 am 
I took a look at this, and yeah, I'm seeing the same thing. It's the problem that in the framework it's called "ColdIron" and in the statblock it's "cold iron". I am applying a fix soon that will "fudge" this in the statblock. I just ran a test and it worked. (I haven't uploaded it yet, looks like 1-3 other bugs below).

Voltang wrote:
Imper1um wrote:
Can you provide the statblock so I can debunk this?


Debunk away.
www.pathfindersrd.com wrote:
Redcap CR 6

XP 2,400
Always NE Small fey (Pathfinder #4 pg 80)
Init +8; Senses low-light vision ; Perception +12
DEFENSE

AC 20, touch 15, flat-footed 16 (+2 armor, +4 Dex, +3 natural, +1 size)
hp 60 (8d6+32); fast healing 3
Fort +6, Ref +10, Will +7
DR 10/cold iron
Weaknesses irreligious
OFFENSE

Speed 60 ft.
Melee scythe +10 (2d4+10) and kick +4 (1d4+6)
Special Attacks boot stomp
Tactics Lone redcaps try to wear down their opponents by using their boot stomp ability to make a series of hit-and-run attacks. Groups, however, are much more bold, swarming larger foes and slicing them to shreds with their terrible scythes. Bloodthirsty creatures, redcaps fight until they are barely able, fleeing only if reduced below 5 hit points.
STATISTICS

Str 18, Dex 19, Con 18, Int 16, Wis 13, Cha 15
Base Atk +4; CMB +7; CMD 21
Feats Cleave, Improved Initiative, Power Attack, Weapon Focus (scythe)
Skills Acrobatics +15 (+27 jumping), Bluff +13, Climb +15, Escape Artist +15, Intimidate +10, Knowledge (nature) +14, Perception +12, Sense Motive +12, Stealth +19; Racial Modifiers +12 when jumping
Languages Aklo, Common, Giant
SQ heavy weapons, red cap
Gear Leather armor, Medium Scythe
SPECIAL ABILITIES
Boot Stomp (Ex)

A redcap wears heavy iron boots with spiked soles that it uses to deadly effect in combat. It can use its boots to make a secondary attack as part of a full attack action or can use them to make an attack as part of its movement just as if it had the Spring Attack feat. A redcap is only treated as having Spring Attack when attacking with its boots and no other weapon.
Heavy Weapons (Ex)

A redcap's powerful hands and arms allow it to wield Medium weapons without penalty.
Irreligious (Ex)

Bitter and blasphemous, a redcap cannot stand the symbols of good-aligned religions. If a foe spends a standard action presenting such a holy symbol, any redcap that can see the character must make a DC 15 Will save or become frightened for 1 minute and attempts to flee. A redcap who successfully saves becomes shaken for 1 minute.
Red Cap (Su)

A redcap wears a tiny, shapeless woolen hat, dyed over and over with the blood of its victims. While wearing its cap, a redcap gains a +4 bonus on damage rolls and fast healing 3 (reflected above). These benefits are lost if the cap is removed or destroyed, and caps are not transferable, even between redcaps. A redcap can create a new cap to replace a lost cap with 10 minutes of work, although until the redcap can take a standard action to dip the cap in the blood of a foe the recap helped kill, it does not grant its bonuses.


A token generated by the macro is also attached. I've also noticed that the rewrite has the same bug as the old macro, where the values are changed for movement but do not register unless you open the movement panel to manually edit them(the correct values are listed already, but it will not display them unless you click OK).

EDIT: Actually, this is a little weird. It shows the correct DR when you open the dialog to edit core properties(the framework macro, not editing the token directly), but it does not display or show it listed when manually examining the token properties. Instead, DR is a blank and DRER doesn't show any changes at all to the JSON object.


Top
 Profile  
 
 Offline
Giant
 
Joined: Mon Sep 28, 2009 6:46 am
Posts: 132
 Post subject: Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro
PostPosted: Fri Jul 30, 2010 11:47 am 
Alright, this is on the fix sitting on my local machine.

Basically, I applied a HeroLab fix which takes the 'and' and 'or's out of the attack, but I implemented it wrong. I fixed it and normal statblocks are working correctly.

Voltang wrote:
This strange prompt for a value came up:
Code:
Unresolved value match.1060.m1.group1.


EDIT: The prompt was for the unresolved value. The message above is what was generated when I canceled out of the prompt.

when I imported this stat block:

Code:
Phase Spider
   CR 5
XP 1,600
N Large magical beast
Init +7; Senses darkvision 60 ft., low-light vision; Perception +6
DEFENSE
AC 17, touch 12, flat-footed 14 (+3 Dex, +5 natural, -1 size)
hp 51 (6d10+18)
Fort +8, Ref +8, Will +3
Defensive Abilities ethereal jaunt
OFFENSE
Speed 40 ft., climb 20 ft.
Melee bite +10 (2d6+7 plus poison and grab)
Space 10 ft.; Reach 5 ft.
Special Attacks ethereal ambush
STATISTICS
Str 20, Dex 17, Con 16, Int 7, Wis 13, Cha 10
Base Atk +6; CMB +12 (+16 grapple); CMD 25 (37 vs. trip)
Feats Ability Focus (poison), Improved Initiative, Skill Focus (Stealth)
Skills Climb +18, Perception +6, Stealth +7
Languages Aklo
SPECIAL ABILITIES
Ethereal Ambush (Ex)
A phase spider that attacks foes on the Material Plane in a surprise round can take a full round of actions if it begins the combat by phasing into the Material Plane from the Ethereal Plane.
Ethereal Jaunt (Su)
A phase spider can shift from the Ethereal Plane to the Material Plane as a free action, and shift back again as a move action (or as part of a move action). The ability is otherwise identical to ethereal jaunt (CL 15th).
Poison (Ex)
Bite—injury; save Fort DC 18; frequency 1/round for 8 rounds; effect 1d2 Constitution damage; cure 2 consecutive saves. The save DC is Constitution-based.


Top
 Profile  
 
 Offline
Giant
 
Joined: Mon Sep 28, 2009 6:46 am
Posts: 132
 Post subject: Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro
PostPosted: Fri Jul 30, 2010 11:55 am 
Dread Zombie Cyclops? I've seen that before. I'll use the full statblock from the PDF. I know exactly where it is. Yup, I have it.

One thing of note, in that PDF, you will notice it's cut off. You cannot just drag your mouse over the entire statblock because the PDF has Footers and headers which mess up the statblock. On page 18, copy up to the feat 'Improved Bull Rush' then paste that in. Then, copy from the feat 'Power Attack' until the end of the statblock and paste at the end of the textblock.

I will be submitting a fix here to the top of this topic here shortly.
Voltang wrote:
Here's an example of a statblock that generated a strange error, but I can't post it in total because I'm not sure it's open content:

Code:
Dread Zombie Cyclops   
XP 2,400
CR 6
Pathfinder RPG Bestiary 52, Advanced Bestiary 105
CE Large undead
Init -2; Senses low-light vision; Perception +19
Defense
AC 19, touch 7, flat-footed 19 (+2 armor, -2 Dex, +10 natural,
-1 size)


This was the error the macro generated:
Code:
Error executing setName: the token name cannot be empty.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 3 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman