RPTools.net

Discussion and Support

Skip to content

It is currently Fri Dec 15, 2017 1:03 pm 






Reply to topic  [ 107 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Cave Troll
 
Joined: Tue Sep 29, 2009 4:28 pm
Posts: 45
Location: New York
 Post subject: Paste 4e Monster from a pdf: get stats and a monster card
PostPosted: Tue Feb 02, 2010 8:18 am 
Here's a token that contains 4 macros. You can paste directly from a pdf and the macros will parse the text, gather all the stats, make your token stats match those stats, then create a formatted monster card that has clickable macros to roll attacks and damage.
(I'm working on one for player characters, it should be easier to copy from a character sheet since it is formatted nicer)

Demo and token here:
http://rpgconnect.org/files/MonsterImporterDemo.wmv
http://rpgconnect.org/files/MonsterImporter.wmv
http://rpgconnect.org/files/RegExParser.rptok

Pic:Image


Top
 Profile  
 
 Offline
Dragon
 
Joined: Tue Mar 24, 2009 2:34 pm
Posts: 859
 Post subject: Re: Paste Monster from a pdf: get stats and a monster card
PostPosted: Tue Feb 02, 2010 9:23 am 
Dude, that is remarkably awesome.

Does it work for Compendium copy and paste as well? It's awesome even if it doesn't. :)

_________________
Reed (halfling sorcerer P3) // Collin (human fighter P2) // Cine (eladrin psion H2)
Sirath (deva shaman H1) // Alesk (dragonborn cleric H3) // Kevin (halfling barbarian H1)


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Tue Sep 29, 2009 4:28 pm
Posts: 45
Location: New York
 Post subject: Re: Paste Monster from a pdf: get stats and a monster card
PostPosted: Tue Feb 02, 2010 10:43 am 
Yeah, it works with the online compendium text.


Top
 Profile  
 
 Offline
Dragon
 
Joined: Tue Mar 24, 2009 2:34 pm
Posts: 859
 Post subject: Re: Paste Monster from a pdf: get stats and a monster card
PostPosted: Tue Feb 02, 2010 10:49 am 
JamesManhattan wrote:
Yeah, it works with the online compendium text.


... if there's anything I can ever do for you, ask. I'm serious. Thank you.

_________________
Reed (halfling sorcerer P3) // Collin (human fighter P2) // Cine (eladrin psion H2)
Sirath (deva shaman H1) // Alesk (dragonborn cleric H3) // Kevin (halfling barbarian H1)


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: Paste Monster from a pdf: get stats and a monster card
PostPosted: Tue Feb 02, 2010 11:10 am 
James, that is really genius.

I'm wondering - do you have an interest in looking at how something like this might be done to fit an existing framework (obviously, I'm thinking of mine, but DeviantNull's and Veggie's might also be worth considering)?

I'm not sure how possible (or practical) it is to parse a monster sheet into the setup that I use (it might simply be too complex to parse a power out into the relevant pieces), but something like that would be incredibly cool (which is not to say this isn't already fantastic!). And, it would allow me to RULE THE WORLD!

Or, at least, not have to spend so much time typing monsters up.

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Tue Sep 29, 2009 4:28 pm
Posts: 45
Location: New York
 Post subject: Re: Paste Monster from a pdf: get stats and a monster card
PostPosted: Tue Feb 02, 2010 5:17 pm 
Take a look at the macros, they are commented. On the EditMonster macro you'll see how easy it is to pull AC from a monster. You can use those variables or change them to match your framework.

For the card; I just parse the text using regular expressions and put html tags around certain parts. If I keep going and completely tag the hell out of the card. You should be able to pull bits and pieces of whatever you want from the finished product.

The hyperlinks just call another RollTheDice macro which is pretty simple right now. You could have the variables sent to your own attack macro or customize the RollTheDice macro to account for criticals etc.

Let's put FantasyGrounds out of business!!


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: Paste 4e Monster from a pdf: get stats and a monster card
PostPosted: Tue Feb 02, 2010 5:52 pm 
I changed this to a Sticky and modified the original subject line to indicate that it's for 4e.

If this is generic enough to put into any 4e framework then we can move it to the Drop-In Resources forum. Otherwise those frameworks should probably have a link back to this thread (maybe the OP for the framework should have that link?).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: Paste Monster from a pdf: get stats and a monster card
PostPosted: Tue Feb 02, 2010 7:39 pm 
JamesManhattan wrote:
Take a look at the macros, they are commented. On the EditMonster macro you'll see how easy it is to pull AC from a monster. You can use those variables or change them to match your framework.

For the card; I just parse the text using regular expressions and put html tags around certain parts. If I keep going and completely tag the hell out of the card. You should be able to pull bits and pieces of whatever you want from the finished product.

The hyperlinks just call another RollTheDice macro which is pretty simple right now. You could have the variables sent to your own attack macro or customize the RollTheDice macro to account for criticals etc.

Let's put FantasyGrounds out of business!!





Boo. YAH.

You are a scholar and a gentleman.

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: Paste 4e Monster from a pdf: get stats and a monster card
PostPosted: Tue Feb 02, 2010 7:54 pm 
As a quick note - does this expect a particular property set (and if so, did I just miss downloading it?) I get prompted for "StatCard" when trying the process, and it doesn't appear to work.

Edit: ah, it does require a property "StatCard" set up in campaign properties. For better drop-in capability (though this is superb), you could set the property invisibly so that even if it's not in the campaign, it's on the token. I would do it something like this - at the beginning of EditMonster, just change it to:

[h:setProperty("StatCard", json.get(macro.args,"TextBox"))]

The best drop-in approach I find is to "namespace" the variables, too - so "StatCard" becomes something like jmh.StatCard. That way, you are unlikely to run into property collisions with an existing campaign (for instance, if they already have a property StatCard - why they would, who knows - your macros won't wipe out their property).

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Jul 18, 2009 12:47 pm
Posts: 8
 Post subject: Re: Paste 4e Monster from a pdf: get stats and a monster card
PostPosted: Tue Feb 02, 2010 11:59 pm 
I am getting the Statcard error also. How did you fix it Rumble? I am using the Veggiesama framework.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Jul 18, 2009 12:47 pm
Posts: 8
 Post subject: Re: Paste 4e Monster from a pdf: get stats and a monster card
PostPosted: Wed Feb 03, 2010 12:00 am 
Rumble wrote:
As a quick note - does this expect a particular property set (and if so, did I just miss downloading it?) I get prompted for "StatCard" when trying the process, and it doesn't appear to work.

Edit: ah, it does require a property "StatCard" set up in campaign properties. For better drop-in capability (though this is superb), you could set the property invisibly so that even if it's not in the campaign, it's on the token. I would do it something like this - at the beginning of EditMonster, just change it to:

[h:setProperty("StatCard", json.get(macro.args,"TextBox"))]

The best drop-in approach I find is to "namespace" the variables, too - so "StatCard" becomes something like jmh.StatCard. That way, you are unlikely to run into property collisions with an existing campaign (for instance, if they already have a property StatCard - why they would, who knows - your macros won't wipe out their property).


Where did you drop Statcard in the campaign props?


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: Paste 4e Monster from a pdf: get stats and a monster card
PostPosted: Wed Feb 03, 2010 12:08 am 
Davenporttenn wrote:
Rumble wrote:
As a quick note - does this expect a particular property set (and if so, did I just miss downloading it?) I get prompted for "StatCard" when trying the process, and it doesn't appear to work.

Edit: ah, it does require a property "StatCard" set up in campaign properties. For better drop-in capability (though this is superb), you could set the property invisibly so that even if it's not in the campaign, it's on the token. I would do it something like this - at the beginning of EditMonster, just change it to:

[h:setProperty("StatCard", json.get(macro.args,"TextBox"))]

The best drop-in approach I find is to "namespace" the variables, too - so "StatCard" becomes something like jmh.StatCard. That way, you are unlikely to run into property collisions with an existing campaign (for instance, if they already have a property StatCard - why they would, who knows - your macros won't wipe out their property).


Where did you drop Statcard in the campaign props?


I just opened up the Campaign Properties, selected the "Basic" set, and added "StatCard" (without the quotes) to the end of the list. Then hit "Update", and you're good to go.

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Jul 18, 2009 12:47 pm
Posts: 8
 Post subject: Re: Paste 4e Monster from a pdf: get stats and a monster card
PostPosted: Wed Feb 03, 2010 12:14 am 
Rumble wrote:
Davenporttenn wrote:
Rumble wrote:
As a quick note - does this expect a particular property set (and if so, did I just miss downloading it?) I get prompted for "StatCard" when trying the process, and it doesn't appear to work.

Edit: ah, it does require a property "StatCard" set up in campaign properties. For better drop-in capability (though this is superb), you could set the property invisibly so that even if it's not in the campaign, it's on the token. I would do it something like this - at the beginning of EditMonster, just change it to:

[h:setProperty("StatCard", json.get(macro.args,"TextBox"))]

The best drop-in approach I find is to "namespace" the variables, too - so "StatCard" becomes something like jmh.StatCard. That way, you are unlikely to run into property collisions with an existing campaign (for instance, if they already have a property StatCard - why they would, who knows - your macros won't wipe out their property).


Where did you drop Statcard in the campaign props?


I just opened up the Campaign Properties, selected the "Basic" set, and added "StatCard" (without the quotes) to the end of the list. Then hit "Update", and you're good to go.


Cool, let me try that


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Jul 18, 2009 12:47 pm
Posts: 8
 Post subject: Re: Paste 4e Monster from a pdf: get stats and a monster card
PostPosted: Wed Feb 03, 2010 12:24 am 
Hmm, I think I need someone smarter than me to tell me how to work this neat feature with the Veggiesama framework. It's pretty cool but I can't get it to work with Veggie. I think the properties are different.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: Paste 4e Monster from a pdf: get stats and a monster card
PostPosted: Wed Feb 03, 2010 12:30 am 
Davenporttenn wrote:
Hmm, I think I need someone smarter than me to tell me how to work this neat feature with the Veggiesama framework. It's pretty cool but I can't get it to work with Veggie. I think the properties are different.


Oh, yeah, it won't work with a framework unless it's reprogrammed to do so - the property sets all vary significantly. I was looking it over to work with my framework, but the amount of parsing required would be exceptional - I would have to not only pull out things like dice rolls, but also turn the various descriptions into power details, etc.

It could be made to work in another framework with some manipulation of property sets and so forth, but it's not necessarily straightforward.

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 107 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  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 2 users online :: 1 registered, 0 hidden and 1 guest (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: Exabot [Bot] and 1 guest





cron

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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman