Friday, August 1, 2008

Close...

I'm so nice. I built in an option that loads the file path data from a text file. This will allow you to store the (currently) 14 different paths/files/values needed to run the parser.

I've converted the classes/paragon paths from hardcoded to loaded from a file. I did the same thing with races (a different file). And I've made all the changes to the PHB parser to support them.

Unfortunately I don't have access to my FG2 machine at the moment so I can't be 100% certain I didn't break something. Once I can load these files into FG2 and verify everything looks clean I'll build an install package and then find someone to host it and the base data files.

Note that since this parser was designed for my own personal use...it has next to no error trapping. If you throw a file at it which isn't what it expects, it will probably crash, with a useless error message. It also won't like it if you start making powers that contain illegal characters in them. You get what you pay for...

If I start getting dozens of emails about x,y, or z not working, I'll just stop distributing the program.

5 comments:

Lowlander said...

Thanks. I did a quick test myself and I was able to filter what looked like every stat blocks from the MM with a single regular expression. The text saved by adobe reader when looking at the pdf isn't the greatest thing in the world, but with some editing help it should suffice.

The thing where I don't have much experience is at the FG/module side of things, so even if I couldn't use the parser to read my own text files it would be useful to see how you generate the module after having obtained the data from the files, but that would require the source code I guess :)

If you don't feel like releasing that it would be nice if you could update the set of samples to include the improvements you've since made.

Anyways, it's nice to see how much fun there is to be had with these little projects :D

J said...

The MM is a pain in the butt.

Monster powers have no definite start maker and no definite end marker.

SOME powers start with the power icon (m,M,r,R,C,A) but some do not (Threatening Reach, Goblin Tactics, etc).

Every power ends with a CR but some powers line wrap (typically those with immediate reaction/action triggers) so I couldn't just use CR as a token ender.

I gave up and put an X in front of all the powers without icons (X Threatening Reach, X Combat Advantage) and a terminating marker (ZZX) at the end of every power.

Really it only took a few hours to do the MM. And I'm so used to doing it now with the additions from Dungeon/Dragon/Modules it only takes me few minutes to do a typical article.

Oh as an added bonus, the text within a power can't be on a line that starts with capital A because the parser thinks it's a new power with an area icon. I just unwrap the line.

I hate the MM.

I probably won't release the MM, DMG parsers for a while. I'll give the PHB parser time to shake out and finish up the magic items for slots, armor, etc.

Lowlander said...

Yeah, I see what you mean :)

I'm at the point now where I'm able to pull out every stat block as text.

I found out that if I save my RPGNow.com bought pdf as text it doesn't save page 75 and 87 for some reason, so I added those manually. And then there were a few occasions where stuff ended up on the same line when it shouldn't have, so I had to correct that.

I had already seen the power block problem, and I think I can get quite far automatically, but I think in the end there's nothing to do but mark the powers that need it. The good news is that it only has to be done once and you're set. The bad news for everyone else basically is that it makes it rather hard to make a tool that is going to work for everyone out of the box.

Did you also just save the pdf as text or did you use some 3rd party converter?

I think I'm just going to bite the bullet as well and edit what needs it, after I'm done I can serialize the entire model to an xml file and never have to touch the parser again :)

J said...

I just highlighted what I needed, hit copy, opened a text file and hit paste :)

I then moved all the non-statblock text to another file. I edited both files and remerged them into a FG friendly xml file.

J said...

I left you a message over at FUM, get back to me when you get a chance