RPTools.net

Discussion and Support

Skip to content

It is currently Sun Feb 18, 2018 7:11 pm 




Forum rules


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



Reply to topic  [ 104 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

Previous topic | Next topic 

  Print view

Author Message
 Offline
Giant
 
Joined: Mon Sep 28, 2009 6:46 am
Posts: 132
 Post subject: Re: PF statblock importer
PostPosted: Mon Feb 08, 2010 7:13 pm 
Why don't you just ask the user anything if you're unsure about some stuff? I'd rather be asked if a Weapon if Primary/Secondary, Manafactured/Natural rather than you guessing and I have to fix it later. :P


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Fri Mar 28, 2008 11:30 pm
Posts: 1870
Location: Layfayette Hill, PA
 Post subject: Re: PF statblock importer
PostPosted: Tue Feb 09, 2010 2:20 pm 
Aye, what is stored is an attack set, not a weapon.

_________________
D&D3.5 / Pathfinder Framework


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12111
Location: Tampa, FL
 Post subject: Re: PF statblock importer
PostPosted: Tue Feb 09, 2010 11:59 pm 
Found another bug this evening -- crossbows need to have the Str bonus to damage capped at 0. My group gotten sliced up by a couple of large light crossbows until I realized that the Str bonus was being added in!

I'd like to see the modifier property name moved into the SkillsJ property instead of having to look it up in the SkillStat string list (this is part of the framework). Unfortunately, that's probably a pretty intrusive change requiring little snippets of updates all over the place. :roll:


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Tue Dec 05, 2006 4:41 pm
Posts: 143
 Post subject: Re: PF statblock importer
PostPosted: Tue Mar 16, 2010 5:07 pm 
Hi All,
I've been looking for ways to get PCGen data into MapTool. I've made output sheets that will export to InitiativeTool but was disappointed to find that although you can export a token from InitiativeTool it does not seem to transfer any of the InitiativeTool properties into MapTool token properties. So far this statblock imported is the best thing I've found for the job. I've created a simple PCGen outputsheet formatted in this specific statblock configuration and it seems to work well with the macro. This is nice because we've recently completed entering the Pathfinder Bestiary, so any creature in it can now be easily generated, exported and pasted into MapTool. I've put this sheet up in my gallery for anyone interested, its the one named "csheet_statblock_to_token".

_________________
~ Eddy Anthony (MoSaT)
~ PCGen Data, Docs & Tracker Chimp
~ Outputsheet Tamarin & Mac build guru


Top
 Profile  
 
 Offline
Great Wyrm
 
Joined: Tue May 26, 2009 7:51 pm
Posts: 2060
Location: Philadelphia, PA
 Post subject: Re: PF statblock importer
PostPosted: Sat May 08, 2010 6:07 pm 
Is there a way that I can change the macro to put the actual name in the GM Name line and the creature type in the Name line? I would rather have the players do Monster Knowledge checks than knowing it is a Otyugh/Beholder/Mind Flayer... Also, is there a way to input Knowledge/Craft/Profession/Perform Skills automatically? I really love the work so far as it basically only takes like 5 minutes to make a token.


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12111
Location: Tampa, FL
 Post subject: Re: PF statblock importer
PostPosted: Sat May 08, 2010 8:36 pm 
IIRC the statblock macro doesn't handle skill names with embedded spaces, so "Knowledge (Arcana)" won't work, nor would "Escape Artist".

Hmm, maybe that's not true. It might be that the punctuation doesn't work. I know I found a problem and the only fixes I had were not very convenient at all so I ignored it. :roll:


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3836
Location: MD
 Post subject: Re: PF statblock importer
PostPosted: Fri May 21, 2010 12:29 am 
I've been customizing the statblock2token macro for my framework and I was wondering if someone knew a way to grab the HP values inside the parenthesis using strfind?

That is, if the statblock reads:

hp 80 (7d10+42)

I'd like to be able to grab the "7d10+42" value.

That way I can quickly randomize the hitpoint values of monsters I drop into the game instead of using the default values (which are usually pretty weak.)

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
 Offline
Great Wyrm
 
Joined: Tue May 26, 2009 7:51 pm
Posts: 2060
Location: Philadelphia, PA
 Post subject: Re: PF statblock importer
PostPosted: Fri May 21, 2010 8:43 am 
This is kinda cheesy and very ineffecient as it is my first Regular Expression, but it works:
\([0-9]{1,4}[d][0-9]{1,2}\+[0-9]{0,4}\)


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12111
Location: Tampa, FL
 Post subject: Re: PF statblock importer
PostPosted: Fri May 21, 2010 11:30 am 
Yeah, the real answer requires a loop as you can't know how many of the "d" die rolls there will be. And I don't know how the match functions work with repeated regex groups:

[(]([+]?(\\d+)d(\\d+))+([+](\\d+))?[)]

Note that I used brackets around literal characters instead of a double-backslash. I find that it's sometimes easier to read. I also allowed a leading "+" in the first field since that made the rest of the regex shorter. And the letter "d" requires at least one digit in front of it -- which all statblocks I've seen include, so it shouldn't be a problem.

Maybe not in this case. Here's the same regex using the backslashes instead:

\\(\\+?((\\d+)d(\\d+))+(\\+(\\d+))?\\)

Both of those are untested. But they should handle the following:

7d10+12
1d8+3d6+14
6d12
+8d6

The problem is that the string "1d8+3d6" will match the first group twice and I don't know how that is returned by the string matching code. Testing would be required.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1761
Location: Chicagoland
 Post subject: Re: PF statblock importer
PostPosted: Fri May 21, 2010 12:13 pm 
Couldn't you simply use the following?

Code:
(.*)


I mean, you really don't need to parse out the dice right because you'll be passing the notation to MT and MT already handles all of those permutations and will simply roll those dice, right?

And the above keeps the ()'s but that shouldn't be a problem as [(1d8)] rolls just as well as [1d8].

Of course, I may be missing something in that particular macro?

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12111
Location: Tampa, FL
 Post subject: Re: PF statblock importer
PostPosted: Fri May 21, 2010 12:16 pm 
Oh man, now he got ME!!!

Very good, Jamz. :)


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3836
Location: MD
 Post subject: Re: PF statblock importer
PostPosted: Fri May 21, 2010 2:34 pm 
Ok, going to need some more specifics on the (.*) method.

The code is this:

Code:
[H: id = strfind(statblock, "hp ([0-9]+).+?([0-9]+)")]
[H, IF(0<getFindCount(id)),CODE:
{
  [HP=getGroup(id, 1, 1)]
  [HPmax="[R: max(Level, ( "+(HP-ConB*Level)+" + (ConB * Level) ) )]"]
  [HD=getGroup(id, 1, 2)]
  [Level = max(1,HD)]
  [output=output+"HP: "+HP+", HD: "+HD+"<br>"]
}]


Where I thought the (.*) would go just ended up grabbing most of the rest of the stat block and sticking it in the HD prop.



And, here is another issue.

When there are multiple resists, only the first one imports and appends to the DR property using this code:

Code:
[H: id = strfind(statblock, "Resist (\\w+) (\\d+)")]
[H, IF(0<getFindCount(id)),CODE: {
  [resist = getGroup(id, 1, 1)+" "+getGroup(id, 1, 2))]
  [DR=DR+" Resist "+resist]
  [output=output+"Resist: "+resist+", "]
  }]


The types of resists are: Acid, Cold, Electricity, Fire, Sonic

A multiple entry of resists in the statblock might look like:

Resist acid 20, electricity 20, fire 20;


Edit: I'll actually be putting the resists in a token property that looks like:

Resist: Acid=0; Cold=0; Electricity=0; Fire=0; Sonic=0;

But once I know how to deal with the case used in this macro, I should be able to apply it to my own framework.

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Sun Feb 25, 2007 11:53 am
Posts: 3836
Location: MD
 Post subject: Re: PF statblock importer
PostPosted: Sat May 22, 2010 3:10 am 
Full Bleed wrote:
Ok, going to need some more specifics on the (.*) method.

*snip*


I couldn't get any of the suggestions made to work, so after some gnashing of teeth, I figured out something that works for me:

Code:
[H: id = strfind(statblock, "hp ([0-9]+).(\\((.+)\\))?.?Fort")]
[H, IF(0<getFindCount(id)),CODE:
   {
      [HP=getGroup(id, 1, 1)]
      [MaxHP=HP]
      [HD=getGroup(id, 1, 2)]
   }
]


Note, I cut some stuff out that was in the original since I didn't need it and I'll put in an option to evaluate the HD if I don't want to use the statblock's default.



If anyone want to take a shot at the multiple resists issue mentioned above, please do!

_________________
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12111
Location: Tampa, FL
 Post subject: Re: PF statblock importer
PostPosted: Sat May 22, 2010 9:46 am 
Unfortunately I can't work on this, but here are some random thoughts I've had about this tool. (Btw, a big ThankYou to Cosworth on such a useful macro!)

One thing I've noticed about the importer is that it doesn't adhere to the convention of using punctuation to denote fields. For example, your Resist entry ends with a semicolon. In fact, every field should end with a semicolon except the last one in a group. So for something like Resist, it might be good to match against "Resist (.*);" so that the entire list of resistances is retrieved, then process them one at a time using the comma delimiter (which means they can be processed as a normal string list).

The problem is that the last element in any section may not have the semicolon. I think the best way to handle that would be to look for all of the section headings (OFFENSE, SPECIAL ABILITIES, etc) and add a semicolon in front of them. Plus add a semicolon to the very end of the string.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1761
Location: Chicagoland
 Post subject: Re: PF statblock importer
PostPosted: Sat May 22, 2010 12:14 pm 
Also note, you may need to use \(.*\) instead.

( and ) are special characters and since you are specifically looking for a ( you need to escape it. I do most of my quick testing in TextPad (has a great regExp search/replace) but MT parser may differ from TextPad's.

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 104 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  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 is 1 user online :: 0 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: No registered users and 1 guest





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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman