[ADDON] [WIP] Rewrite of Statblock2Token Macro

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! :)
User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Azhrei »

Good work, Zach. :)

(Hmm, do you prefer "Zac" or "Zach"? I think I've seen it both ways...)

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

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Imper1um »

Azhrei wrote:Good work, Zach. :)

(Hmm, do you prefer "Zac" or "Zach"? I think I've seen it both ways...)
Zac. :P

I'm uploading version which includes an incomplete version of skills updates. It does not function at the moment.

jsharen
Giant
Posts: 196
Joined: Tue Feb 05, 2008 3:39 pm

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by jsharen »

Any chance of getting a B63 version of this? Not sure how hard that would be to implement, however I can't use B70 until the FW's I am using get fixed. Changes that were made for B70 do not allow me to use them now.

Thanks!

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

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Imper1um »

jsharen wrote:Any chance of getting a B63 version of this? Not sure how hard that would be to implement, however I can't use B70 until the FW's I am using get fixed. Changes that were made for B70 do not allow me to use them now.

Thanks!
Pretty slim, actually...I don't use anything less than the latest version (unless it's broken for me)

Invariant
Kobold
Posts: 1
Joined: Mon Aug 23, 2010 10:14 am

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Invariant »

I just wanted to first say thanks for working to improve this macro. I've been using the Pathfinder framework for a while now to run a Runelords campaign, but I've only started to use the statblock import macro and I'm going through some growing pains as I learn how to tweak the stat blocks.

I'm trying to understand the difference between two stat blocks, both generated with the same program, where the first one works, but the second gives me an error:

Unknown JSON type "" in function "json.contains".

Could someone please point out what is wrong in the second? Then I can make sure to tweak the block before importing.

Thanks!

This one WORKS.

Code: Select all

RLWIZARD	CR 11
Male Human Wizard 12
CE Medium Humanoid (Human)
Init +3; Perception +13
--------------------
DEFENSE
--------------------
AC 13, touch 13, flat-footed 10   (+3 Dex)
hp 93 (12d6+48)
Fort +9, Ref +10, Will +10
--------------------
OFFENSE
--------------------
Spd 30 ft.
Melee Staff of Mithril Might +10/+5 (1d6+4) and
   Unarmed Strike +8/+3 (1d3+2)
Wizard Spells Known (CL 12, 8 melee touch, 9 ranged touch):
6 (2/day) Disintegrate (DC 23)
5 (4/day) Baleful Polymorph (DC 22)
4 (4/day) Reduce Person, Mass (DC 21)
3 (5/day) Fly
2 (5/day) Cat's Grace (DC 19), Glitterdust (DC 17), Acid Arrow
1 (6/day) Reduce Person (DC 18), Magic Missile, Magic Missile, Magic Missile, Grease (DC 16), Expeditious Retreat, True Strike
0 (at will) Mage Hand, Prestidigitation (DC 15), Acid Splash, Arcane Mark
--------------------
STATISTICS
--------------------
Str 12/15,  Dex 16,  Con 18,  Int 20,  Wis 13,  Cha 12
Base Atk +6/+1; CMB +8; CMD 21
Feats Craft Magic Arms & Armor, Craft Rod, Craft Wondrous Item, Extend Spell, Greater Spell Focus: Transmutation, Greater Spell Penetration, Lightning Reflexes, Scribe Scroll, Spell Focus: Transmutation, Spell Penetration, Wizard Weapon Proficiencies
Skills Appraise +14, Craft: Metalworking +17, Escape Artist +15, Fly +18, Knowledge: Arcana +20, Knowledge: Nature +20, Knowledge: The Planes +16, Linguistics +20, Perception +13, Sense Motive +2, Spellcraft +20
Languages Abyssal, Common, Draconic, Infernal, Terran, Undercommon
SQ Change Shape II (12 rounds/day) (Sp), Enchantment, Illusion, Physical Enhancement +3: Strength (Su), Telekinetic Fist (8/day) (Sp), Transmutation
Combat Gear Staff of Mithril Might; Other Gear Cloak of Resistance, +1, Rod of Metal and Mineral Detection
--------------------
SPECIAL ABILITIES
--------------------
Change Shape II (12 rounds/day) (Sp) Use Beast Shape III or Elemental Body II as a Spell-Like ability.
Enchantment You must spend 2 slots to cast spells from the Enchantment school.
Extend Spell Spell duration lasts twice as normal. +1 Level.
Greater Spell Focus: Transmutation +1 to the Save DC of spells from one school.
Greater Spell Penetration +2 to caster level checks to overcome spell resistance.
Illusion You must spend 2 slots to cast spells from the Illusion school.
Physical Enhancement +3: Strength (Su) +1 bonus to physical ability, +1 per 5 levels (change per day).
Spell Focus: Transmutation Spells from one school of magic have +1 to their save DC.
Spell Penetration +2 to caster levels checks to overcome spell resistance.
Telekinetic Fist (8/day) (Sp) 30' ranged touch attack, 1d4+6
Transmutation Transmuters use magic to change the world around them.
This one RETURNS AN ERROR

Code: Select all

WATER MEPHIT	CR 3
Male Mephit, Water
Small Outsider (Water)
Init +6; Senses Darkvision (60 feet); Perception +6
--------------------
DEFENSE
--------------------
AC 17, touch 14, flat-footed 14   (+2 Dex, +1 size, +3 natural, +1 dodge)
hp 19 (3d10+3); Fast Healing (if underwater) 2
Fort +2, Ref +5, Will +3
DR 5/magic
--------------------
OFFENSE
--------------------
Spd 30 ft., Flying (40 feet, Average), Swimming (30 feet)
Melee Claw x2 (Mephit, Water) +5 x2 (1d3+1) and
   Unarmed Strike +5 (1d2+1)
Special Attacks Breath Weapon (DC 13)
Spell-Like Abilities Acid Arrow, Stinking Cloud, Summon (level 2, 1 mephit of the same type 25%)
--------------------
STATISTICS
--------------------
Str 13,  Dex 15,  Con 12,  Int 6,  Wis 11,  Cha 14
Base Atk +4; CMB +3; CMD 16
Feats Dodge, Improved Initiative
Skills Bluff +8, Fly +10, Perception +6, Stealth +12, Swim +9
Languages Aquan, Common
--------------------
SPECIAL ABILITIES
--------------------
Acid Arrow (1/hour) (Sp) As the spell.  Caster level 6th.
Breath Weapon (DC 13) (Su) Each type of mephit can unleash a particular breath weapon every 4 rounds as a standard action. The DC is Constitution-based and includes a +1 racial bonus.
A cone of acid that deals 1d8 acid damage.
Damage Reduction (5/magic) You have Damage Reduction against all except Magic attacks.
Darkvision (60 feet) You can see in the dark (black and white vision only).
Fast Healing (if underwater) 2 (Ex) You heal damage every round if you have > 1 HP.
Flying (40 feet, Average) You can fly!
Stinking Cloud (1/hour) (Sp) As the spell.  DC 14, caster level 6th.
Summon (level 2, 1 mephit of the same type 25%) (Sp) A creature with the summon ability can summon other specific creatures of its kind much as though casting a summon monster spell, but it usually has only a limited chance of success (as specified in the creature's entry). Roll d%: On a failure, no cr
Swimming (30 feet) You have a Swim speed.

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

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Imper1um »

The Water Mephit does not have an alignment. Needless to say, I've corrected the json.contains error in the popup (subtype generation) when it cannot find the size. I'm going to be retooling the size check to see if I can get that information a little better.

(rubs chin) Where did this come from?

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

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Imper1um »

WARNING: A little notice when parsing PDFs: Paizo is seeming to split words in the document. If you find that this macro isn't parsing Paizo's PDF Statblocks, paste the statblock into Notepad and check for any spaces between words. I noticed in Kingmaker 2 of 6 that all of the statblocks were listed as "C R 5" and such. Make sure you remove the spaces before sending it to the macro.

Glock-9mm
Giant
Posts: 178
Joined: Fri Jan 05, 2007 7:53 pm
Location: Wgtn, New Zealand

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Glock-9mm »

[Question:] Rewrite of Statblock2Token Macro

I saw in the orignal thread that there were some teething issues with importing statblocks from HeroLab. At the moment I am want to buy Herolab for both Pathfinder and WOD, But.... I won't bother getting it for Pathfinder if I cant import the statblocks easily.

Will the revised version handle HL's statblocks?

That was all :)
---
Glock-9mm (Wgtn, NZ)
Shooting from the hip... Never the lip!

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

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Imper1um »

Glock-9mm wrote:[Question:] Rewrite of Statblock2Token Macro

I saw in the orignal thread that there were some teething issues with importing statblocks from HeroLab. At the moment I am want to buy Herolab for both Pathfinder and WOD, But.... I won't bother getting it for Pathfinder if I cant import the statblocks easily.

Will the revised version handle HL's statblocks?

That was all :)
This rewrite is supposed to fix the HeroLab Statblock issues, so feel free to use it.

A major update to how saves are found has been added. Please get the new version.

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

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Azhrei »

How is the new S2T doing with skills and weapon attack routines? Those are the two areas that I've noticed seem to confuse the macro the most...

It seems that any skill with subskills (such as the Knowledge and Perform skills) don't assign values properly. I'm guessing that's because they are created in a weird way inside the JSON objects. But if lmarkus has a Lib: macro for adding new skills, it should be possible to dummy that up...?

The weapon thing is more insidious, as figuring out the proper crit ranges and such is more work. Obviously, it's easiest to assume a crit range of 20/x2 and then only change it if the macro sees a different one. But I'd like to get a warning in those cases where the macro does not see a different crit range so that I know to verify the results. Also, the majority of ranged weapons will have a Str cap of zero unless they are thrown so that should probably default as well (again, an ideal solution would check the weapon name against a list or look for "STR" in the name somewhere or perhaps determine that it's a STR weapon by looking at the damage bonus; a warning would be good if none of the above is possible).

Overall this is a good evolutionary improvement over the previous generation -- thank you! :)

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

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by neofax »

Couple things, the Armor gets jacked up if you go to try and edit it as it is putting a tick mark (') in the JSON. As for the wepons, it would be much nicer if it used the Mod-Set feature to accomplish making weapons. This way people could post their JSON for weapons.

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

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Imper1um »

I'm skipping Skills and Weapons, and I will not be creating any support for it in this iteration of this tool. I am making something tangent to this which works loads better, and will have support for the following inputs:
  • d20PFSRD
  • HeroLab
  • ...and one other I can't remember the name.
I'm calling it "Character Token Bridge." It's a external program that allows you to input statblocks and files and output to Tokens. I'm making it generic enough that it could work for any system, it just requires someone to code the input "bridge" and the output "bridge".

I'm not certain on when it will be done (since my time is currently split between GLWiki, Work, Home, Dexter, Playing Games and this), so more details later. I have a general framework, I'm just getting a proof of concept (D20PFSRD -> .rptok) together before I release anything. It should have the functionality to pull the beasty from PFSRD via a list and convert it to .rptok, without you needing to Ctrl-C/Ctrl-V anything. I'm still working on that, though.

SDShannonS
Giant
Posts: 242
Joined: Tue Sep 12, 2006 12:21 am
Location: San Diego, CA, US

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by SDShannonS »

I am unable to put the Lib_Statblock2token.rptok into a map within MapTool. If I drag and drop from the desktop, it never shows up in MapTool. If I try adding it to a library folder and dragging from within MapTool onto a map, I get a java error:

Code: Select all

com.thoughtworks.xstream.converters.ConversionException: visibleOnlyToOwner : visibleOnlyToOwner
---- Debugging information ----
message             : visibleOnlyToOwner : visibleOnlyToOwner
cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message       : visibleOnlyToOwner : visibleOnlyToOwner
class               : net.rptools.maptool.model.Token
required-type       : net.rptools.maptool.model.Token
path                : /net.rptools.maptool.model.Token/visibleOnlyToOwner
line number         : 37
-------------------------------
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:117)
	at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:29)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:846)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:833)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:789)
	at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:138)
	at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:123)
	at net.rptools.maptool.util.PersistenceUtil.loadToken(PersistenceUtil.java:400)
	at net.rptools.maptool.client.ui.assetpanel.ImageFileImagePanelModel.getTransferable(ImageFileImagePanelModel.java:98)
	at net.rptools.maptool.client.ui.assetpanel.AssetPanel$3.getTransferable(AssetPanel.java:261)
	at net.rptools.lib.swing.ImagePanel.dragGestureRecognized(ImagePanel.java:395)
	at java.awt.dnd.DragGestureRecognizer.fireDragGestureRecognized(Unknown Source)
	at sun.awt.windows.WMouseDragGestureRecognizer.mouseDragged(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseDragged(Unknown Source)
	at java.awt.Component.processMouseMotionEvent(Unknown Source)
	at javax.swing.JComponent.processMouseMotionEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:24)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.thoughtworks.xstream.mapper.CannotResolveClassException: visibleOnlyToOwner : visibleOnlyToOwner
	at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:49)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:76)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:60)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:76)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:26)
	at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:34)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.determineType(AbstractReflectionConverter.java:296)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:178)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:125)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
	... 37 more
"You must be the change you wish to see in the world."
- Mahatma Gandhi

"You know what the chain of command is? It's the chain I go get and beat you with until you understand who's in ruttin' command here."
- Jayne

SDShannonS
Giant
Posts: 242
Joined: Tue Sep 12, 2006 12:21 am
Location: San Diego, CA, US

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by SDShannonS »

Updated to b76 and all is good. Looks like it's incompatible with b63.
"You must be the change you wish to see in the world."
- Mahatma Gandhi

"You know what the chain of command is? It's the chain I go get and beat you with until you understand who's in ruttin' command here."
- Jayne

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

Re: [ADDON] [WIP] Rewrite of Statblock2Token Macro

Post by Azhrei »

Yeah, a lot of stuff that's been done in the last few months will require at least b66 (the stable release version) and the most interesting will require b75 -- and b76 is a nice bug fix collection for b75.

Post Reply

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