DICE PACKS BUNDLE
Page 1 of 3 123 Last
  1. #1

    AD&D Core Rules CD Importer for HTML files

    So, I've written a few scripts for myself to import data from the AD&D Core Rules CD (2.0). It's turned out pretty well. Since most of it is HTML it's not been to hard to get it formatted to something that looks pretty good in "Story" document view.

    That said, this is in perl (I run it on my linux box) so most people probably won't be able to use it but hopefully some will. If I could just give the .mod files out I would but right now they don't allow anything but 5e on dmsguild.

    To that end, here is the script I used. It requires a few perl mods and copy/paste experince. If you know perl it's probably going to be an easy process. I'll help out where I can.

    https://github.com/CelestianGC/FG--A...-Core-Importer

    The corebook-html.pl is the file you want. I'd take the time to look at the readme.

    This "should" work for any directory of files you find in your CoreCD\WebHelp\*. If you want the Tome of Magic, run the script on the TM directory (./corebook-html.pl CoreCD/WebHelp/TM tomeofmagic.xml) or DMG for the Dungeon Master's guide files.

    This quoted part is still there but not the preferred method any longer. See the README.md for full details on creating a ref-manual from the created xml files.
    The way I use these files is inserted into a clean campaign. That campaign is used to export and create a .mod for that book. So, I have campaigns for Tome of Magic and DMG and PHB and so on. Then in my REAL campaign I use those mods. The best way I've found so far is to use them from the Library and pop up the window for the book, then you can "search" for the topic. Right now I have no pretty table/index for it.
    At some point I'd like to figure out the library stuff and see if I can organize it better but for now this is what I've got. I'm doing a lot of ruleset coding and this so I bounce between the 2.

    Eventually I will include the spells script (works a lot like this script) that will create the data needed to have the Spells in your campaign but right now I just don't have the time to smooth it out.

    edit:

    Here is what the documents look like in FG.
    Last edited by celestian; May 2nd, 2018 at 15:53.

  2. #2

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Awesome work, Celestian.

  3. #3
    I've updated the script to now also export skills (from the PHB) and Items (from the DMG). These exports are simply the name and the descriptions (with formatting/tables/etc). You'll find *_skills.xml and *_items.xml when they are found.

    With a few tweaks to the item it works out kinda nicely as "templates" using the forge option (well for my ruleset). Vorpal dagger here I go
    Last edited by celestian; March 7th, 2017 at 07:10.

  4. #4
    I've added "corebook-spells.pl" importer to this same github repo. It will allow you to take the data for spells from the html files (I used Player's Handbook and the Tome of Magic html files) and import them into a "Spells" format.

    Mostly useful if you use my ruleset tho I don't see why it wouldn't load in others but not sure how useful it would be.

    Here is a view from my FG desktop with the various items that I've imported.

    Last edited by celestian; April 13th, 2017 at 23:28.

  5. #5

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Very nice work, celestial. Now where did I put my Core Rules CD?.....

  6. #6
    Quote Originally Posted by Bidmaron View Post
    Very nice work, celestial. Now where did I put my Core Rules CD?.....
    Good question I actually still have mine installed and it works on my PC. Not bad for something written in 1999.

    However, all you need are the .htm files located in Webhelp/* for what it's worth.

  7. #7

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    I want to thank you for posting your dropdown code solution too

  8. #8
    Started tinkering with this again now I've got a clue about how ref manuals work (basic stuff). I've got it to where it will create a $outputfile_client.xml file <reference> block that can be used. Right now it's just alphabetically sorted with each entry a subchapter. Not really sure I can do more than that since the html has no real ref that I can use to organize it by.

    Now if we could just edit at least the chapter/subs (order) in ref manuals In FantasyGrounds the hard work would be done. It should be a lot easier to sort it out manually tho than before.

    I've got a work project for the next two days but I'll see about getting a more complete client file (include the library link) sometime soon.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  9. #9
    So, I had a big breakthrough tonight with the import tool. I've been working on making it create the "reference" block (the big one in a refmanual that is the pain in the ***) and the best I could do was create a list of pages sorted alphabetically... really not much like the original book. If we could drag/drop the pages around it would have been useful.

    Tonight however I figured out a way to import the pages from the html files in the order they appear in the actual books (90% at least). Now I can import the pages from the Core Rules CD, such as the Complete Thief's Handbook and it practically be complete and in order like the handbook itself.

    Several books I tested turned out really good. It's got a good 90% of everything in them. Pictures obviously are not there and a few of the tables get wonky in translation but lots easier to cope with.

    Here is what I kicked out in about 30 minutes.



    Very happy how well it turned out. It's not perfect but at this point it's cake to finish.

    The importer update is posted on github.
    Last edited by celestian; January 6th, 2018 at 06:07.
    ---
    Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
    Documentation for AD&D 2E ruleset.
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
    Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.

  10. #10

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Really nice work, Celestian. I have not been able to locate my Core Rules CD in a long time, but it really doesn't matter because the only reason I'd ever go back to anything WotC would maybe be SpellJammer.

    I'd like to eventually do something equivalent for PDFs (Acrobat Reader has an API that lets you select text, copy it, and so on), but the best you could get there would still be without any formatting whatsoever, and it would still have the infamous PDF carriage return problem (but that is not that hard to fix in code). I have never owned the full version of Acrobat, so I am not sure if that version lets you copy character formatting or just the raw text.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in