DICE PACKS BUNDLE
  1. #1

    Join Date
    Aug 2015
    Location
    Western New York
    Posts
    204

    Mass import of data into Fantasy Grounds for use with GURPS

    Hello All,
    Subject line says it all (so to speak).

    Problem:

    When one has to enage in creating your own list of items in FG, generally speaking, you open a new item, fill in the relevant details, then close the new item after you've filled in the data.

    At this rate, it takes a while to manually enter in 300 items, one at a time.

    But what if you could place all of this data directly into a spreadsheet? What if you could type in the data into Excel, then either use a "Macro" to then export the data you compiled directly to a text file, and simply copy and paste the material in the text file directly into the relevant "section" in your db.xml file?

    Here is a "for example" listing for a single "item" that I want for use with my GURPS CYBERPUNK campaigns:

    <id-00001>
    <public />
    <cost type="string">$12500+</cost>
    <lc type="string">4</lc>
    <locked type="number">0</locked>
    <name type="string">Arm and Hand Options: Bionic Striker</name>
    <notes type="formattedtext">
    <p>CUT2 - 96</p>
    </notes>
    <subtype type="string">Bionic Modifications</subtype>
    <tl type="string">8</tl>
    <type type="string">Equipment</type>
    <weight type="number">0</weight>
    </id-00001>

    In reality? All I need in my excel spreadsheet are the following columns:

    Cost
    LC
    Name
    Notes
    Subtype
    TL
    Weight

    Each "line" in the excel spreadsheet, with equipment data in it, could then be written to a text file by adding the tags:

    <cost type="string">

    Then adding the actual data from the cell in excel - then ending that line of text with

    </cost>

    Very simple, and very quick. Do this with each "column" for each of its specialized "data field" name, and I can replicate perfectly, all the data that appears for each item - from its unique "id-0000" value to all that fills in until I hit the </id-0000> tag. If I have 400 items in my spreadsheet, it will have id-0001 on through to id-00400 in the final text.

    Now, suppose I made it so that the program could read all 400 items in an excel spreadsheet, build up the section that fits in between

    <item>

    and

    </item>

    in any given db.xml file?

    What if you don't even have to manually cut and paste, but simply open the db.xml file, and have the program look for the <item> and the </item> inside the db.xml file, and insert your new "items" catalog between those two points?

    If I can do it for the Items section of the db.xml - I can also do it for the Story section of the XML (in case you want to enter all 400+ star system data from the Spinward Marches Traveller source books. You could perhaps have an excel spreadsheet with all of your game modifiers listed, or all of your languages listed, or what have you.

    Regardless of what the community here wants, I intend to create this application for my own use because frankly, I do NOT want to enter in 600 plus items for use with GURPS ULTRATECH, GURPS ULTRATECH 2, and GURPS BIOTECH - one item at a time! Put it in excel, organize the data the way you want it, and then import it directly into db.xml and be done with it.

    The only REAL pain in the buttocks part of this approach is this:

    Notes generally has the ability to be "formattedtext" which in turn, has to be formatted in a specific manner. <p> and </p> for start and end of a paragraph etc. This is not something that Excel with its "cells" handles well. I can always make it so that "short entries" can be placed in excel, and the user can then later go back and fill in by hand (manually) the description of the item in Fantasy Grounds proper. For example? I noted that the item is on page X of Classic Ultratech 2. I will go back in for Fantasy Grounds, and open up the item, see it already says "CUT2 - 96" and know I have to go to page 96 to find the description.

    So, where do you, the reader of this thread come in? What I build for myself, will of course, be useful for my own needs. But if you want something specific for your needs, you may want to say "Hey Hal, can you..." and give me an idea of what would help YOU.

    The only REAL problem I see right now? If Ronnke updates his work such that it has new features, I'm going to have to insure that what I create via VB.NET keeps current with what he creates. Since he's putting all this hard work into this, anything I can do to make his life easier will be payback for his kindness. If he changes things, I'll try to keep up with him.


    So - comment away or make requests or what have you. In the meantime, I'm going to go back to coding and then testing it etc. It has been a long time since I've worked with VB.NET to open up Excel sheets, read data, and then write to a new text file.

  2. #2
    Hey Hal,

    I'm not sure but have you looked at the Mod Maker program I created to allow you to do all that? I'm not saying it's the cats meow but if you want to get to playing and creating worlds instead of wrestling with a bunch of xml you might give it a try.

    I'm currently working on allowing Ability and Traits but you can for sure create all the items you want for ultra tech, high tech, or whatever and they work with the ruleset.

    If I missed something let me know, since I'm still playing around with it I might be able to add it in. If not and you just enjoy what you are working on then rock on!

  3. #3

    Join Date
    Aug 2015
    Location
    Western New York
    Posts
    204
    Quote Originally Posted by Jaxilon View Post
    Hey Hal,

    I'm not sure but have you looked at the Mod Maker program I created to allow you to do all that? I'm not saying it's the cats meow but if you want to get to playing and creating worlds instead of wrestling with a bunch of xml you might give it a try.

    I'm currently working on allowing Ability and Traits but you can for sure create all the items you want for ultra tech, high tech, or whatever and they work with the ruleset.

    If I missed something let me know, since I'm still playing around with it I might be able to add it in. If not and you just enjoy what you are working on then rock on!
    I found another of your Youtube videos that explained what I wasn't finding.

    What I'm looking to do is be able to import from an excel spreadsheet, all of say, 400 items all at once. If your Mod Maker could do that, it would be great. If you're still online, can we chat in Fantasy Grounds?

  4. #4
    I read this thread before I read that you were having a problem running Mod Maker. I'm just logging out though sin ti is 2:45 am.

    And yeah, I'm happy to help.

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
  •  
FG Spreadshirt Swag

Log in

Log in