Paste 4e Monster from a pdf: get stats and a monster card
Moderators: dorpond, trevor, Azhrei, Gamerdude
- JamesManhattan
- Cave Troll
- Posts: 32
- Joined: Tue Sep 29, 2009 5:28 pm
- Location: New York
- Contact:
Paste 4e Monster from a pdf: get stats and a monster card
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:
(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:
Re: Paste Monster from a pdf: get stats and a monster card
Dude, that is remarkably awesome.
Does it work for Compendium copy and paste as well? It's awesome even if it doesn't.
Does it work for Compendium copy and paste as well? It's awesome even if it doesn't.
- JamesManhattan
- Cave Troll
- Posts: 32
- Joined: Tue Sep 29, 2009 5:28 pm
- Location: New York
- Contact:
Re: Paste Monster from a pdf: get stats and a monster card
Yeah, it works with the online compendium text.
Re: Paste Monster from a pdf: get stats and a monster card
... if there's anything I can ever do for you, ask. I'm serious. Thank you.JamesManhattan wrote:Yeah, it works with the online compendium text.
Re: Paste Monster from a pdf: get stats and a monster card
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.
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.
- JamesManhattan
- Cave Troll
- Posts: 32
- Joined: Tue Sep 29, 2009 5:28 pm
- Location: New York
- Contact:
Re: Paste Monster from a pdf: get stats and a monster card
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!!
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!!
Re: Paste 4e Monster from a pdf: get stats and a monster card
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?).
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?).
Re: Paste Monster from a pdf: get stats and a monster card
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.
Re: Paste 4e Monster from a pdf: get stats and a monster card
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).
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).
-
- Kobold
- Posts: 8
- Joined: Sat Jul 18, 2009 1:47 pm
Re: Paste 4e Monster from a pdf: get stats and a monster card
I am getting the Statcard error also. How did you fix it Rumble? I am using the Veggiesama framework.
-
- Kobold
- Posts: 8
- Joined: Sat Jul 18, 2009 1:47 pm
Re: Paste 4e Monster from a pdf: get stats and a monster card
Where did you drop Statcard in the campaign props?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).
Re: Paste 4e Monster from a pdf: get stats and a monster card
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.Davenporttenn wrote:Where did you drop Statcard in the campaign props?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).
-
- Kobold
- Posts: 8
- Joined: Sat Jul 18, 2009 1:47 pm
Re: Paste 4e Monster from a pdf: get stats and a monster card
Cool, let me try thatRumble wrote: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.Davenporttenn wrote:Where did you drop Statcard in the campaign props?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).
-
- Kobold
- Posts: 8
- Joined: Sat Jul 18, 2009 1:47 pm
Re: Paste 4e Monster from a pdf: get stats and a monster card
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.
Re: Paste 4e Monster from a pdf: get stats and a monster card
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.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.
It could be made to work in another framework with some manipulation of property sets and so forth, but it's not necessarily straightforward.