PDF Monster Parser for DN's D&D4e Character Sheet Framework

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

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

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by PinkRose »

Then take a look at the Laughing Shadow Groveler.
For some reason the Triggered Action, Cringe doesn't show up as a power at all.
I am a special snowflake!

Milaha
Kobold
Posts: 1
Joined: Sun Oct 02, 2011 8:59 pm

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by Milaha »

What are the odds of this tool being updated to accept the format that the new EnWorld campagins are using? Zeitgeist for me, and I assume Santiago will use the same format. Right now on MM3 it gets all the stats right, but messes up some standard action powers, and ignores non-standard action powers.

The first adventure is avail for free here if you need some examples:

http://www.enworld.org/ap/intro.html

I realize this is quite a specific request, but it would make my life about a billion times easier over the next couple years as the adventures come out so I figure it doesn't hurt to ask. :-)

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by PinkRose »

I think it would be cool if it could do those EN adventures, for sure.

I also come asking if anyone can now build or adapt a parser from the Online Monster Builder.
as of 3 weeks ago, you can now, FINALLY, export .monster files which are just XML files.
I was wondering if it would be possible to parse through the XML file to build a monster for the DN FW.
I know very little. Enough to grab the right cells, but not enough to make that text and then fill that into the Framework.
Any help would be appreciated.
I am a special snowflake!

User avatar
travist627
Giant
Posts: 140
Joined: Sat Nov 22, 2008 3:53 pm

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by travist627 »

PinkRose wrote:Then take a look at the Laughing Shadow Groveler.
For some reason the Triggered Action, Cringe doesn't show up as a power at all.
It shows up on mine, but didn't pick up that it's a close burst. I had to put "C " (space intended) before the power name to have it pick up that it was a close burst. See if that does it.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by PinkRose »

My mistake.
It wasn't Cringe, it was the Triggered Action Covert Attack.
I am a special snowflake!

User avatar
travist627
Giant
Posts: 140
Joined: Sat Nov 22, 2008 3:53 pm

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by travist627 »

PinkRose wrote:My mistake.
It wasn't Cringe, it was the Triggered Action Covert Attack.
Fixed this issue in the current version (13), which is now posted. The bug happened because the power name ended with "Attack (weapon)." There is a replace function on triggered actions in the parser that have "Attack" and "Effect" so that those lines don't get tagged as power names. So, it did the replace on the actual power name, which kept it from being tagged as a power.

User avatar
travist627
Giant
Posts: 140
Joined: Sat Nov 22, 2008 3:53 pm

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by travist627 »

PinkRose wrote:I think it would be cool if it could do those EN adventures, for sure.

I also come asking if anyone can now build or adapt a parser from the Online Monster Builder.
as of 3 weeks ago, you can now, FINALLY, export .monster files which are just XML files.
I was wondering if it would be possible to parse through the XML file to build a monster for the DN FW.
I know very little. Enough to grab the right cells, but not enough to make that text and then fill that into the Framework.
Any help would be appreciated.
It's going to take some time, but I should be able to adapt the parser for the XML files as a third option. In the end, they will actually be easier to parse than the text exports.

I'm not sure yet about EN adventures.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by PinkRose »

Perfect. I'll download it as soon as I get home.
And as for the XML parser, that would be AWESOME!
I am a special snowflake!

User avatar
travist627
Giant
Posts: 140
Joined: Sat Nov 22, 2008 3:53 pm

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by travist627 »

Well, after much toil and testing, I have uploaded a new version of the monster parser token. This version will process the exported XML text from the online Adventure tools. WotC's XML doesn't always follow the same patterns that they established for several of their monsters, so there are bound to be loads of exceptions out there.

For those of you who have a DDI account, I think you will find that the XML parser works better than the PDF text parsing by leaps and bounds. You will notice a couple nifty new features when you process your first monsters. If the monster has a profile picture listed in the XML code, you will receive a link to the picture in the chat window. This should greatly simplify your process of grabbing a picture for the token. Also, if the XML has a Tactics entry, you can choose to use it on your token instead of copying and pasting from another source.

I have updated the preview pictures in the first post to show what it can do with the XML text, and I have updated the help text.

Many thanks to PinkRose for putting the first few versions through the ringer to help me catch some of those non-standard standard XML entries that are out there!

User avatar
travist627
Giant
Posts: 140
Joined: Sat Nov 22, 2008 3:53 pm

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by travist627 »

Milaha wrote:What are the odds of this tool being updated to accept the format that the new EnWorld campagins are using? Zeitgeist for me, and I assume Santiago will use the same format. Right now on MM3 it gets all the stats right, but messes up some standard action powers, and ignores non-standard action powers.

The first adventure is avail for free here if you need some examples:

http://www.enworld.org/ap/intro.html

I realize this is quite a specific request, but it would make my life about a billion times easier over the next couple years as the adventures come out so I figure it doesn't hurt to ask. :-)
Milaha, I did a slight update to the current token release and reposted it tonight. In the current version (4.0) it will do text replacement on the Zeitgeist format, getting rid of the ">" and replacing the asterisk in power names with a hyphen. That seems to be enough to get most the powers that are standard format. As always, get rid of line breaks that cause you problems. Also, I noticed on Thames Grimsley you'll have to take out the hyphen in Two-Fisted Thwack to get it to read. This should save you a bit of time.

They are basically using a slightly modified version of the MM3 format, so be sure to use that as your monster format.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by PinkRose »

I was using the test version and didn't realize you uploaded a full 4.0 version.
First, thank you so much.
Second, what and how would I remove the word "vision" from "Low-light vision" and "darkvision" entries?
I have those set up on the pop-up sheet and they just take up 6 extra characters.
It's not a problem to edit them, but if I can add it to the parser, I won't have to edit the monsters at all.
I am a special snowflake!

User avatar
travist627
Giant
Posts: 140
Joined: Sat Nov 22, 2008 3:53 pm

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by travist627 »

PinkRose wrote:... how would I remove the word "vision" from "Low-light vision" and "darkvision" entries?
For XML monsters: Edit the XMLStatsParser macro (light blue in the XMLMonsters section) by replacing the following section

Code: Select all

<!-- Pull perception-based abilities-->
[h: tempSenses=""]
[h: SensesID = strfind(tempStatCard, "(?<=<Senses>)[^@]+?(?=</Senses>)")]
[h, if (getFindCount(SensesID)>0), code: { 
	[id = strfind(getGroup(SensesID,1,0), "(?<=<SenseReference>)[^@]+?(?=</SenseReference>)")]
	[FindCount=getFindCount(id)]
	[FOR(iVar, 1, FindCount+1), CODE:   {
		[FoundString=getGroup(id, iVar, 0)]
		[NameID=strfind(FoundString, "(?<=\\<Name\\>)[^<]+")]
		[if(getFindCount(NameID)==0): tempName=""; tempName=getGroup(NameID,1,0))]
		[RangeID=strfind(FoundString, "(?<=\\<Range\\>)[0-9]+")]
		[if(getFindCount(RangeID)==0): tempRange=0; tempRange=getGroup(RangeID,1,0))]
		[tempSenses=listAppend(tempSenses, tempName+if(tempRange>0," "+tempRange,""))]
	}]
}]
[h: setProperty("DNA_Vision",tempSenses)] 
with this code:

Code: Select all

<!-- Pull perception-based abilities-->
[h: tempSenses=""]
<!-- Change the value of DeleteVision to 1 if you want to get rid of the word "vision" from perception abilities-->[h: DeleteVision=1]
[h: SensesID = strfind(tempStatCard, "(?<=<Senses>)[^@]+?(?=</Senses>)")]
[h, if (getFindCount(SensesID)>0), code: { 
	[id = strfind(getGroup(SensesID,1,0), "(?<=<SenseReference>)[^@]+?(?=</SenseReference>)")]
	[FindCount=getFindCount(id)]
	[FOR(iVar, 1, FindCount+1), CODE:   {
		[FoundString=getGroup(id, iVar, 0)]
		[NameID=strfind(FoundString, "(?<=\\<Name\\>)[^<]+")]
		[if(getFindCount(NameID)==0): tempName=""; tempName=if(DeleteVision==0,getGroup(NameID,1,0),replace(getGroup(NameID,1,0),"[Vv]ision",""))]
		[RangeID=strfind(FoundString, "(?<=\\<Range\\>)[0-9]+")]
		[if(getFindCount(RangeID)==0): tempRange=0; tempRange=getGroup(RangeID,1,0))]
		[tempSenses=listAppend(tempSenses, tempName+if(tempRange>0," "+tempRange,""))]
	}]
}]
[h: setProperty("DNA_Vision",tempSenses)]  
For the PDF-based monsters, edit the StatsParser macro (light blue in the universal group) replacing this section

Code: Select all

<!--Pull perception-based abilities-->
[h: tempStatCard=tempStatCard+"Perception +10&#59  "]
[h: id = strfind(tempStatCard, "(Perception\\s|Perception)\\+[0-9]?[0-9](&#59|[;])?\\s+[A-Za-z\\- ,]+")]
[h: tempPercep=getGroup(id,1,0)]
[h: id = strfind(tempPercep, "(?<=[0-9]\\s|;|&#59)[^\\^]+")]
[h: tempVision=getGroup(id,1,0)]
[h: setProperty("DNA_Vision",tempVision)] 
with

Code: Select all

<!--Pull perception-based abilities-->
<!-- Change the value of DeleteVision to 1 if you want to get rid of the word "vision" from perception abilities-->[h: DeleteVision=1]
[h: tempStatCard=tempStatCard+"Perception +10&#59  "]
[h: id = strfind(tempStatCard, "(Perception\\s|Perception)\\+[0-9]?[0-9](&#59|[;])?\\s+[A-Za-z\\- ,]+")]
[h: tempPercep=getGroup(id,1,0)]
[h: id = strfind(tempPercep, "(?<=[0-9]\\s|;|&#59)[^\\^]+")]
[h: tempVision=if(DeleteVision==1,replace(getGroup(id,1,0),"[Vv]ision",""),getGroup(id,1,0))]
[h: setProperty("DNA_Vision",tempVision)] 

In future versions (I'll keep that code in there), just change the value of DeleteVision to 1 in those two macros to enable the feature.

ed1024
Kobold
Posts: 1
Joined: Mon Dec 05, 2011 5:24 pm

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by ed1024 »

Is there a way to use this for PC powers , I would like to create a power Mule for PC tokens.

User avatar
travist627
Giant
Posts: 140
Joined: Sat Nov 22, 2008 3:53 pm

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by travist627 »

ed1024 wrote:Is there a way to use this for PC powers , I would like to create a power Mule for PC tokens.
Sorry, but the token doesn't work for PC sheets in any way that I am aware.

Nodal
Kobold
Posts: 1
Joined: Sun Nov 06, 2011 7:41 pm

Re: PDF Monster Parser for DN's D&D4e Character Sheet Framew

Post by Nodal »

I just wanted to say that I found this while looking for which framework to use for Zeitgeist, and I appreciate it.

Post Reply

Return to “Drop-In Macro Resources”