STAR TREK 2d20
Page 1 of 4 123 ... Last
  1. #1

    XML Assistance in Savage Worlds Module Creation

    Good day! Once more I come to the well of knowledge in order to figure out how to do something in the XML. Working on my Savage Rifts module...got most of it laid out correctly, save some Gear entries. I'd like to have a reference page for each type of gear, ie Body Armor. On this reference page would be links to the various types of body armor in the reference.bodyarmor section that when clicked brings up the reference text for that piece of body armor. Here's what I have so far (this appears in <library>):

    Code:
    <chapter_201_bodyarmor>
    				<librarylink type="windowreference">
    						<class>sw_referencetextwide</class>
    						<recordname>..</recordname>
    					</librarylink>
    					<name type="string">**Body Armor</name>
    					<text type="formattedtext">
    <p>Aside from minor electronics, most of these suits of armor do not have powered enhancements. All cover all locations and many have Full Environmental Protection, which includes fully sealed systems; self contained breathing; immunity to temperature extremes, radiation, vacuum, poisons, and disease; and other self-regulating life support systems. Unless otherwise stated, all have basic (five mile range) communications and light sensitive visors or eye lenses (offset illumination penalties by 2 and provide +2 to resist blinding attacks).</p>
    					<p>Each suit of body armor also has a Strength Minimum listed. For every die type the wearer has under the minimum, he suffers a −1 to all Agility and Agility-linked skill rolls, as well as −1 to his Pace. In Savage Rifts®, this penalty also applies to Arcane skill rolls (including psionics).</p>
    					<p><b>Embedded Toughness:</b> To reflect the advanced technology used to construct Rifts Earth armor, many suits of body armor also provide additional points of Toughness. This is a huge enhancement, in light of the fact that Armor Piercing has no effect on Toughness.</p>
    					</text>
    				</chapter_201_bodyarmor>
    Pointers on how to do that? It seems rather easy, but after looking at the code for hours today, my brains a bit muddled. I was thinking it'd be a simple linklist, but not having any luck with that.

    Thanks for any insight in advance!
    GB
    Ultimate Edition license holder - No License Needed to Play My Games (Need Demo Version of FG Downloaded)

    Timezone: Eastern Standard Time (EDT) United States; GMT -4 hours

    Game in Progress: AD&D 2e - Against the Zhentarim

  2. #2

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    2,211
    Blog Entries
    7
    Someone will probably beat me to the punch. I'm about to hop a flight home from work so if no one else answers this in the next few hours, I'll look at it after dinner when I'm home.

  3. #3
    Thanks Talyn!
    Ultimate Edition license holder - No License Needed to Play My Games (Need Demo Version of FG Downloaded)

    Timezone: Eastern Standard Time (EDT) United States; GMT -4 hours

    Game in Progress: AD&D 2e - Against the Zhentarim

  4. #4

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    2,211
    Blog Entries
    7
    Ok, I brought up several windows, which type are you asking about?



    From your description, it sounds like you're wanting the big list of gear right? Then you click an item and it brings up the smaller window? Plus you can drag the item into a character's inventory?

    If so, that particular window is a "reference_categorisedlist" class. In the screenshot I used, that's the normal gear/equipment which for the upcoming 3.2 version of Fantasy Grounds, they want that contained in <mundaneitems> for Savage Worlds, per the Data Structure & Best Practices article. On that note, be sure you're testing on 3.2 as some of the sorting gets finicky if you use categories it doesn't like, whereas 3.17 doesn't give a damn what you call anything.

    So in my Library, I call a "reference_categorisedlist" class, and point it to the "reference.lists.mundaneitems" recordname.
    In that <lists> section, that's where you build how the window looks, the titles of the category columns, width, etc. and one of the tags there specifies <itemclass type="string">item</itemclass> which tells the list window to use the "item" window class when you click on any of the links, which is the smaller window you see there detailing the grappling hook in my screenshot.

    The individual items themselves are contained in reference.mundaneitems with all their pertinent info.

    That what you were after or something else?

    Attachment 15742

  5. #5
    The way I envision it is that in the library there is an entry called "Quick Lists", much like every other Savage Worlds setting I've seen. Of course, this module has new edges, hindrances, etc. Also there would be a link to gear there. You click the link, that calls a window that flavor text about gear in general, and links to each specific kind (ie Body Armor, Power Armor, Robot Armor, etc.). Clicking any of these links will bring up yet another window with fluff information on the specific category of gear (IE standard body armor has a 5 km radio, etc.). Under that bit of fluff is the links to the body armor (for example, Juicer Plate). Each one of those points at a the appropriate reference.list.bodyarmor recordname, and each one of those links can be drug to a character sheet. Clicking on the link will bring up the small record that is specific to that body armor, weight, etc.

    It could be that I'm going about this all wrong and convoluted. In the Savage Rifts setting, there is a lot of information along with the lists of items. I'll post a screenshot of the module to date when I get home so that the picture can do a much better job of describing it!


    Thanks,
    GB
    Ultimate Edition license holder - No License Needed to Play My Games (Need Demo Version of FG Downloaded)

    Timezone: Eastern Standard Time (EDT) United States; GMT -4 hours

    Game in Progress: AD&D 2e - Against the Zhentarim

  6. #6

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    2,211
    Blog Entries
    7
    Oh, so this thing:



    That window class is "sw_referenceindex" and you just build an <index> then list each item as a <link>. Personally, I'm not a fan of that class (or if I'm being honest, the majority of the sw_* classes) but several projects in the past have used them because they're there I guess. But whatever works for you, since Rifts will have to be a personal project -- there's no license for an official FG version of it unfortunately so enjoy what you're building, that probably took awhile!

    If it helps, unzip the SW ruleset somewhere outside FG. The SW classes are in /ref/ref_basicclasses.xml and a couple others in /ref/ref_swclasses.xml plus don't forget the CoreRPG classes that Savage Worlds is overlayed upon.

    Attachment 15743

  7. #7
    Thanks for the information, Talyn! I had no idea where to look for the classes. I assume any of the CoreRPG classes will work as well? I'll post those screenies shortly..still buried at work. The portion that I'm working on will link to those same entries on the table displayed above, but will have additional text "fluff" on them. I can't put additional fluff on those sw_referenceindex classes, correct (ie no <text type="formattedtext"> or <description type="formattedtext">. I'm hoping that SW class files answers the question of which of those two types of XML entries work on which classes...sometimes one works, sometimes the other. I think it's due to the specific Window Class being called...
    Ultimate Edition license holder - No License Needed to Play My Games (Need Demo Version of FG Downloaded)

    Timezone: Eastern Standard Time (EDT) United States; GMT -4 hours

    Game in Progress: AD&D 2e - Against the Zhentarim

  8. #8

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    2,211
    Blog Entries
    7
    Yes, all CoreRPG window classes work in Savage Worlds (and every other ruleset (most of them)) which are overlayed on CoreRPG.

    Here's an edited snippet of the window above (it's the Sci-Fi Companion by the way):

    Code:
    <chapter_010_quicklinks>
    	<librarylink type="windowreference">
    		<class>sw_referenceindex</class>
    		<recordname>..</recordname>
    	</librarylink>
    	<name type="string">Quick Links</name>
    	<index>
                    <_06_armor>
    			<listlink type="windowreference">
    				<class>reference_categorisedlist</class>
    				<recordname>reference.lists.armor@Science Fiction Companion</recordname>
    			</listlink>
    			<name type="string">Armor</name>
    		</_06_armor>
            </index>
    </chapter_010_quicklinks>
    So in that module, the author built the entire list of items for the Quick Links (all the edges, hindrances, new gear, etc.) all into that library entry. That's what the <recordname>..</recordname> means.

    I chose the armor link since you were talking about armor for Rifts. As you can see, clicking that opens the reference_categorisedlist class I was talking about above, which is a sorted list of all the items like the gear in my Lankhmar screenshot. The reference.lists.armor defines how that list looks—the column names, etc. while within that list header there's <source type="string">reference.armor@Science Fiction Companion</source> which tells the entire list where to fill itself with data from. It sounds complicated but it's pretty simple to understand once you dig in and play with it a couple times.

    I'd suggest unzipping some of the settings you own and looking at their code. Now, some of the code is a little older and is a little inefficient though it still works fine obviously. If nothing else, it's good to learn from and that's exactly how I got my start learning (and trust me, I'm still learning!). Also, <linklist> is no longer necessary, just a simple <link> will do the trick.
    Last edited by Talyn; October 18th, 2016 at 03:58.

  9. #9
    I had purchased the Interface Zero and Nemezis settings, however, they're not showing up in the Modules. I'm assuming they're encrypted within the Content Vault...sadly, that's the only reason I purchased them was to tear them apart and see how they were constructed...
    Ultimate Edition license holder - No License Needed to Play My Games (Need Demo Version of FG Downloaded)

    Timezone: Eastern Standard Time (EDT) United States; GMT -4 hours

    Game in Progress: AD&D 2e - Against the Zhentarim

  10. #10
    OK..this is what I have:
    Attachment 15746
    You can see my library (Work in Progress) on the left hand side for Savage Rifts. Upon clicking the Gear entry in the library, this opens up the Gear Reference box. No issues there. Now then, when clicking on the Body Armor entry to the left in the Library, the Body Armor Reference text is pulled up. What I'd like to do is beneath the "Embedded Toughness" bit on the Body Armor Reference Text is to put links to each of the individual body armor types (example, juicer plate). When clicking the link, it'd bring up the appropriate entry in reference.lists.bodyarmor.

    You mentioned "reference_categorisedlist" class. Does this particular class allow you to add formatted text to it? If so, that would work exactly how I need it to.

    Thanks again for your help Talyn!

    GB
    Ultimate Edition license holder - No License Needed to Play My Games (Need Demo Version of FG Downloaded)

    Timezone: Eastern Standard Time (EDT) United States; GMT -4 hours

    Game in Progress: AD&D 2e - Against the Zhentarim

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