PDA

View Full Version : General Parser?



SoulOfTheReaver
February 22nd, 2010, 00:03
I'm the owner of a Dark Heresy book which i've scanned and am in the process of OCR-ing. Now i wanna add some of the stuff (rules, enemies, talents, skills etc) into FG2 as a library module for the excellent DarkHeresy ruleset.

I've read that D&D 4E has its 4E Parser that can make XML files for that ruleset. I've toyed around with it with no success in making a workable library entry for DH.

Now my question is, is there out there, or if not is it technically feasible to make a Parser for general use, in which the categories of library entries are flexible (can make my own categories), and which can be adapted to work for several rulesets?

Otherwise, can you suggest any other way to set up a library module for DH?

Moon Wizard
February 22nd, 2010, 01:11
In short, data modules can be built for any ruleset, but require ruleset code to define the structure, display and behavior of the data modules.

The inclusion of the reference sheets in 4E involved the creation of over 20 different sheet types for all the various objects supported, as well as integration of how data objects can be dragged and dropped on the main sheets for the ruleset.

It is definitely a good-sized project to undertake this from scratch, though you could reuse some of the reference code from the d20 or other example rulesets to help bootstrap.

Cheers,
JPG

Tenian
February 22nd, 2010, 11:44
The parser itself is very dependent on the structure of the input data. DND 4E presents it's data in a certain format and the parser is not particularly adaptable to new/different formats.

It would be possible to write a more generic parser in which users could build templates for input and output but the 4E Parser was definitely not designed to do that.

Building a parser to handle input templates and output templates would take considerable effort. It's not something I plan on doing as the only game I'm currently playing is DND4E and I have no plans to switch any time soon.

Doswelk
February 22nd, 2010, 15:04
Otherwise, can you suggest any other way to set up a library module for DH?

You'll have to resort to the method I have to use when I'm building Savage Worlds Modules (for Smiteworks), I suspect:

Do it by hand... :(

Ikael
February 22nd, 2010, 20:53
I have been working on to make generic Python-based parser, but at the moment to project is far from being easily-modifiable when dealing with input and output formats. Another quirk is that it's depended on free 'Some PDF to HTML Converter' tool which is used to convert PDF files to HTML. The parser works perfectly for my needs at the moment but I have lots of interest to make it more generic and easier to use. However, I am afraid that's not going to happen very soon.

If you happen to have decent Python-knowledge the current tool could be used to aid in your task.