DICE PACKS BUNDLE
  1. #1

    Basic documentation for Library Modules/FG2 XML ?

    Hey there. I'm looking into making some library modules. I understand the only way to do so is by editing the XML files themselves.

    To do so i looked into the xml format itself and i believe i have a basic grasp on it. One of the things i've noticed when doing so is that the tags on it are basically arbitrary and are up to the software in question.

    To learn those i've started snooping around through some of the SRD library modules and i'm starting to have an inkling how they're built. However a lot of the stuff still confuses me. I still have no idea what some of the tags and attributes do.

    Searching for reference around the forums i've seen some answers to specific questions from people who already seemed knowledgeable, and while many of those were enlightening morsels of information i am still left without a starting point so to speak.

    Is there any sort of documentation out there talking a bit about the basic structure and function of FG2 XMLs, specifically the library module ones, and what the tags and attributes are and do, etc?

    P.S. how ruleset-dependent are the XMLs? Do i need to learn ruleset intricacies to make lib modules? Do i also need to learn LUA? If so, where's the best place to get information on the former(tutorials for the latter fill the internet so i'm cool there.)

    Thank you in advance for your answers.

  2. #2
    Your question is kind of complex. It really depends on what you are planning to do. Can you tell us your plans?

    XML allows the user to create any tag they like, unlike normal HTML. So, if you wanted to create a CD library, it would be something like
    Code:
    <cd>
        <artist>...</artist>
        <title>...</title>
        <songlist>
            <song>...</song>
        </songlist>
    </cd>
    The Modules are similar to this, but it also has tags that are rendered in a certain way (ex, LIST, LI, TABLE, B) like HTML. If all you're trying to do is add some flavor text, you should be good knowing HTML.

    Now Extentions are another thing entirely. The are usually adjustments to an existing ruleset. However, they can be similar to Modules as well.

    Like I said, kind of complex question
    Last edited by tdewitt274; August 8th, 2010 at 16:30.

  3. #3
    I know how XML basically works, and that the tags are defined not by the format itself but the software trying to read it since it's basically a data storage format. It's there that my question lies.

    I'd like to know more about how FG2 interprets said data. I've obviously figured out tags like <p> or <td> which are formatting tags also common to HTML, and i can spot obvious custom tags.

    But what i really am interested in is knowing about tags FG2 expects when reading a library mod xml. Stuff like <librarylink> and <class> and other such. What do they do, when are they expected and how are they used correctly? Finally structurewise what does FG2 expect to be there mandatorily when reading a library module.

    I understand it's a lot to ask about but i am willing to learn and i haven't so far found any cohesive documentation, mostly bits and pieces by griogre an others. I'm just trying to make a library module or several with the rules for DH, npcs, weapon and armor tables etc.

  4. #4
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    SoulOfTheReaver - First things first, you may want to review the Library and the Ruleset Modification guide, whilst you may not be planning to actually modify a ruleset, the documentation within the Library and guides will provide you with the ready reference to FGII basic and advanced operations, including window control and database interaction. The guides will also familiarise you with how modules implement their databases and how FGII manages/access them.

    Module XML structure, aside from some standard content is essentially dependant upon the ruleset you are using. Each ruleset implements different data structures and thus your second port of call is to familiarise yourself with the ruleset and the windowclasses it exposes and makes use of.

    As for HTML tags like <h>, <p>, <b>, <i>, <list> and <table>, FGII only supports these tags within a <formattedtextfield> node. They are essentially used to apply formatting to blocks of text.

    Finally, if you can indicate which ruleset(s) you want to use, perhaps someone here can pen a small guide on modules and how to compile the XML.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  5. #5
    Thanks for that hint doc, i'll look into said guides.

    The ruleset that i'm playing with is Dark Heresy, the one available from the Wiki. Yes i have the actual book.

    But how dependent upon the ruleset's structure would a library module that just has some basic text information be?

    I'm thinking critical damage tables (for those who are familiar with the game system) as well as expositions of the game's rules for my new players, something akin to the Complete SRD Basic Rules module as far as data structure is concerned. Wouldn't that simply use said standard content that DrZeuss was talking about?(Could anyone tell me more about the standard part btw?)

    I'm planning to add a monster manual of sorts later on but i realize that already implies char sheets and personalities so that would be ruleset dependent.

  6. #6
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    OK. Here's an example of a module that should in theory work with most rulesets that are derived from the Foundation or Base ruleset. I can't be sure but it may very well work with Dark Heresy, so give it a go and let us know.

    The module is a basic guide to FGII. Its content is out of date, but more importantly gives a pretty good example of how to implement <tables> and other formatted text within a series of Library reference sheets.

    Hopefully will pose useful as a reference.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  7. #7
    If you are looking to make basic text for you to use, then it would not be that hard to implement. I've never used Dark Heresy but for the most part it would just depend on how that ruleset reads its definition.xml file. I can look into how it would basically works to create a plan text module that could include tables and such.


    Edit:

    Here is a basic module that will easily work for what you are wanting to do. If you put it into your module folder in FGII app data folder it will show up inside your Dark Heresy library, when you bring up your game.

    https://abacusforge.com/fgii/DH-basicrules.mod

    If you want to edit the file just unzip the .mod file and it should give you a folder with, db.xml, definition.xml, and thumbnail.png. Click on db.xml and it should look something like this.

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <root version="2.0">
    	<library>
    		<dhbasicrules static="true">
    			<name type="string">Dark Heresy Basic Rules</name>
    			<categoryname type="string">Dark Heresy</categoryname>
    			<entries>
    				<block-1>
    					<librarylink type="windowreference">
    						<class>referencetextwide</class>
    						<recordname>..</recordname>
    					</librarylink>
    					<name type="string">Test</name>
    					<text type="formattedtext">
    						<p><b>Heading:</b></p>
    						<p>This is a test to see if you are able to read this.</p>
    					</text>
    				</block-1>
    			</entries>
    		</dhbasicrules>
    	</library>
    </root>
    Just use simple html editing for the text with in the <text> area for what you are looking to do.

    If you want to add a another window for something else just add another "block". With xml these types of brackets can be named basically anything. I used "block" to make it easier in organizing but you can change it to something more familiar. If you add another window, it will look something like this and so on.

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <root version="2.0">
    	<library>
    		<dhbasicrules static="true">
    			<name type="string">Dark Heresy Basic Rules</name>
    			<categoryname type="string">Dark Heresy</categoryname>
    			<entries>
    				<block-1>
    					<librarylink type="windowreference">
    						<class>referencetextwide</class>
    						<recordname>..</recordname>
    					</librarylink>
    					<name type="string">Test</name>
    					<text type="formattedtext">
    						<p><b>Heading:</b></p>
    						<p>This is a test to see if you are able to read this.</p>
    					</text>
    				</block-1>
                                     <block-2>
    					<librarylink type="windowreference">
    						<class>referencetextwide</class>
    						<recordname>..</recordname>
    					</librarylink>
    					<name type="string">Test</name>
    					<text type="formattedtext">
    					         Place new text or table here.
    					</text>
    				</block-2>
    			</entries>
    		</dhbasicrules>
    	</library>
    </root>

    I agree that there is not that much of a rulebook or manual to follow so the only way I figured out how it all works together is just reading the code and then see how it works within Fantasy Grounds when you run it. This is how I learned my very very limited xml in use with FG as well as reading the forums and asking questions.

    I hope this helps and if you need anymore information just post.

    Good luck .
    Last edited by cpbs; August 8th, 2010 at 21:23.
    AbacusForge - Blog
    Think - Develop - Build

    Player:Yes Times: Contact Me

    DM:Yes/Also willing to DM groups (PM me) Time: Contact Me

    Rulesets: 3.5, Cthulhu

  8. #8
    Thanks everyone for all your help, your advice was very useful indeed. I'm in the process of making my library modules, and i made a little something extra as a thank you for the community. You can view it here

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