FG Spreadshirt Swag
Page 2 of 3 First 123 Last

Thread: Inventory XML

  1. #11
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    <?xml version="1.0" encoding="iso-8859-1"?>
    <root version="2.07">
    <author>Troll Lord Games</author>
    <name>Arms and Armour</name>
    <ruleset>Castles_and_Crusades</ruleset>
    </root>
    i went back to the original source that DrV gave me and it looks like this but wont appear in module activation:

    <?xml version="1.0" encoding="iso-8859-1"?>
    <root>
    <name>Arms and Armor</name>
    <author>Troll Lord Games</author>
    <ruleset>Castles and Crusades</ruleset>
    </root>

  2. #12

    Join Date
    Mar 2006
    Location
    Arkansas
    Posts
    7,395
    Note the difference between the British and American spelling of Armor ie Armour vs. Armor. Next make sure the definition file has exactly the same spelling as the name element in the client or db file. Also move any other version of the module file out of Data App modules. Also in that XML snip you don't have a library node. The Name node goes in the library node.

  3. #13
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Ha! I did that so many times and still missed that spelling of Armour again...

    Is there a reason that you know why this tag works
    <root version="2.07">
    and the simple
    <root>
    does not?

    And your second point is referring to this line?
    <library>
    <cncarmsnarmorcontents static="true">
    <name type="string">Arms and Armor</name>
    <categoryname type="string">Castles &amp; Crusades</categoryname>
    And lastly - exactly where shoudl these .mods reside?
    Only in the \modules directory?
    Do clients/players also need the file in their \modules directory?

    I will go back tonight and start again with the original file and work thru step by step with this added knowlege...

    thanks Griogre

  4. #14
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    Quote Originally Posted by damned
    And lastly - exactly where shoudl these .mods reside?
    Only in the \modules directory?
    Do clients/players also need the file in their \modules directory?
    They should only be in the <app data folder>\modules directory. Don't keep old versions in there (just in case) as you may end up with old modules still open and the <name> tag within the XML being the same which will result in them combining.
    Players will only need to install a copy in their modules directory if it is a client.xml module. common.xml will be downloaded from the GM and cached and db.xml is GM only.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  5. #15
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Ok - so new testing underway.
    Brand new computer with new install of FGII.
    Only difference is this computer is 64bit.

    I have copied the new ruleset into \rulesets
    I have copied an unmodified version of the Arms and Armor guide into \modules
    CnC_3.0b1_Castlellans_Guide_Arms_and_Armor.mod

    I launch a new campaign selecting the new ruleset and I go to Modules Activation and the Arms and Armor guide (by any name) is not there.

    Eventually I found that after changing the line in bold:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <root>
    <name>Arms and Armor</name>
    <author>Troll Lord Games</author>
    <ruleset>Castles and Crusades</ruleset>
    </root>
    to the following:
    <ruleset>Castles_and_Crusades</ruleset>
    It now shows in Module Activation!!!!!

    So I can now see it as GM and as a player. The <root> trail I think was laid by a herring...

    So now either as player or GM the first time I click on any of the equipment lists I get the following error popup in the debug window:

    Ruleset Error: Database type mismatch for 'ev'
    Ruleset Error: Database type mismatch for 'ev'
    ...
    Ruleset Error: Database type mismatch for 'ev'

    Looking at the equipmernt list the number of error lines matches the number of items. In addition in the list view the EV value is not listed but in the description it is. When I drag items into the character sheet (woohoo DrV) the EV populates. So...

    In client.xml I located all of these descriptions:
    <Breastplate_Steel>
    <link type="windowreference">
    <class>referencearmor</class>
    <recordname>armsnarmordescription.Breastplate_Stee l@Arms and Armor</recordname>
    </link>
    <name type="string">Breastplate, Steel</name>
    <cost type="string">300 gp</cost>
    <ac type="string">+5</ac>
    <weight type="string">30 lbs.</weight>
    <ev type="number">3</ev>
    </Breastplate_Steel>
    and replaced with:
    <ev type="string">3</ev>
    but leaving the actual item description as number:

    <Breastplate_Steel>
    <name type="string">Breastplate, Steel</name>
    <ac type="number">5</ac>
    <isidentified type="number">1</isidentified>
    <itemtype type="string">armor</itemtype>
    <armortype type="string">part</armortype>
    <value type="string">300</value>
    <ev type="number">3</ev>
    <weightlbs type="number">30</weightlbs>
    <description type="formattedtext">
    <table>
    <tr><td>% COVERAGE:</td><td>50%</td></tr>
    <tr><td>AVAILABILITY:</td><td> 35%</td></tr>
    <tr><td>OPTIONAL:</td><td>Similar to bronze Breastplate, but more durable and so avoids the AC reduction via blows.</td></tr>
    </table>
    <p></p>
    </description>
    <identified type="formattedtext">
    <table>
    <tr><td>% COVERAGE:</td><td>50%</td></tr>
    <tr><td>AVAILABILITY:</td><td> 35%</td></tr>
    <tr><td>OPTIONAL:</td><td>Similar to bronze Breastplate, but more durable and so avoids the AC reduction via blows.</td></tr>
    </table>
    <p><link class="imagewindow" recordname="refimage.Breastplate_Steel"><b>Image: Breastplate, Steel</b></link></p>
    <p>As with the bronze breastplate, this rigid armor provided greater protection to the vital areas of its wearer. However, being made of steel it granted greater protection (and additional +1 to AC) and was more durable in combat.</p>
    <p></p>
    </identified>
    </Breastplate_Steel>
    I now get the tables working and the descriptions working. And as I have left the @Arms and Armor references that I deleted in earlier attempts all links to images also work.

    So... have I done all this just for my setup or can anyone else verify any of this?

    regards
    Damian

  6. #16
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Oh so cruel....

    Images load for GM but players just get:

    Runtime Error: Unable to create window with invalid data source 'image' - 'refimage.Banded_Mail@Arms and Armor'

    So strange because Im actually on the same computer connecting to localhost so Im referencing the SAME mod file....

    Gnashes teeth...

  7. #17
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    Quote Originally Posted by damned
    Oh so cruel....

    Images load for GM but players just get:

    Runtime Error: Unable to create window with invalid data source 'image' - 'refimage.Banded_Mail@Arms and Armor'

    So strange because Im actually on the same computer connecting to localhost so Im referencing the SAME mod file....

    Gnashes teeth...
    So, these are actually images (pictures or maps) in the "maps and images" list?

    If so, I'm not sure what's been done with the ruleset, but these don't usually appear in the player's list unless they have already been shared by the GM. This was functionality that came into FG in rulesets after the current C&C ruleset - so, I'm guessing that the code DrV is working with is not quite there yet??

    Or, are you not talking about images?
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  8. #18
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Arms and Armour
    -> Swords and Axes
    -> Scimitar
    Has all stats and a bit of a description and history of weapon including strengths and weaknesses and a link to an Image. DM clicks on it and a nice little black and white scimitar opens in a new window.
    For players - after making the changes above - they get all but the image (they get the link) whereas the GM gets it all...
    DrVenture is updating the ruleset, incorporating the extensiosn Sorceror had completed and those that were in Beta...

  9. #19

    Join Date
    Mar 2006
    Location
    Arkansas
    Posts
    7,395
    Trenloe, player modules can have images they just have to be put in the module by hand and most library modules were built by hand until the parsers came along.

    Damned, I watch your struggles with great sympathy since I, and everyone in the d20 era of FG went down that road. I think some fast background might help you since the C&C ruleset and libraries were originally build by DA and DA was a very small group and, early on, we all used the *exact* same data patterns in our libraries and rulesets.

    First, though, C&C was different from most rulesets in that the player library modules were client modules and sold separately. I am *assuming* your Arms and Armor module is also a client module.

    Second, I hate to tell you this but we are going to have to talk root node here. At DA we found a bug in FG. The problem was the link addresses were being ignored. IE:
    Code:
    <Section00Credits>
       <librarylink type="windowreference">
          <class>sw_referencetextwide</class>
          reference.credits@50F Player Guide
       </librarylink>
       <name type="string">Credits/Legal</name>
    </Section00Credits>
    was treated exactly like it was:
    Code:
    <Section00Credits>
       <librarylink type="windowreference">
          <class>sw_referencetextwide</class>
          reference.credits
       </librarylink>
       <name type="string">Credits/Legal</name>
    </Section00Credits>
    This was for *all* links in any library module open - except db files don't combine with common or clients files - ever. The original owners didn't do nearly so many updates as the current owners, so it was quite a while later before they patched the bug. But when they were working on fixing it they found that so many modules had started taking advantage of this "bug" it had become a "feature." The "feature" being you could merge selected parts of open library modules if you set it up right.

    The original owners had a dilemma, if they just fixed the bug it would break those library modules that had used it as a "feature" and yet it was really a bug that impacted all open library modules. Fortunately for them it was a bug that only affected developers so their solution was... the root node version. Library modules with no version or a version number of less than a certain amount would continue to have the "feature" and those with a higher version number would have the bug fix.

    FYI, the new owners have continued the idea behind root node versions so if you are building a new library module you should generally use the latest root node version with I think is 2.9 right now. Whew, that was long.

    So... 1) The original C&C modules just like all early library modules released by DA prior to the discovery of that address link bug will merge with any library module that doesn't have a high version root node. 2) Since all early DA library modules used the *same* data structure the odds of merging are very high... and since you seemed to have copied that data structure in your new module - this applies to you too. 3) We knew all this at DA so we build any follow on modules in such a way as to deliberately avoid any problem with merging. The good news for you is you don't need to do any of that work around you just need to use the current root version number.

    That all explained, its my belief you have at least two currently somewhat complementary/contradictory problems. You have a merge "feature" problem that is masking that you have at least some bad link addresses. And its possible your image links aren't build right (its a two stage process unlike that of an adventure module). Basically when you fix your merge address feature/problem you links don't work which seems like you're going backwards but until you make sure you aren't using the merging "feature" you are never going be sure its not a problem with your links.

    To troubleshoot to see if you have a have a straight merge problem, move all other C&C modules out of the FG data apps module folder. Then start FG and see if the links still work. If they do that would mean the link data is inside the current module. If they don't then you were pulling the info from another C&C module. Next up the root version to 2.9 and see if the links still work. If they don't that means your link addresses are broken in the @modulename part and probably don't match the internal library module name. Once you get any link address problems fixed if you still are having problems with getting links to pop an image we can go over the two stages of how to build an image link in a library module. I didn't mean to write a book, hope that helps.
    Last edited by Griogre; October 29th, 2012 at 20:20.

  10. #20
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Wow!
    Thanks for taking the time to explain all that.

    So -
    If I dont put a root version then any client.xml without a root version can potentially reference content or links in any other loaded client.xml without specifying the module?
    And the same goes for common.xml to common.xml and db.xml to db.xml?

    If i enter a root version of 2.?? or higher this behaviour stops.

    On my test machine with only a demo license my module works 100% now for DM. For Player (connecting on localhost) all the links are working except for the images in the following:
    Arms and Armor (ok)
    > Body Armor (or any other equipment list) (ok)
    > Coat of Plates (or any other item) (ok)
    > in the description is a link Image: Coat of Plates and this only works for GM.

    Player gets: Runtime Error: Unable to create window with invalid data source 'image' - 'refimage.Coat_of_Plates@Arms and Armor'

    could it be a sharing violation being that both sessions are accessing same physical file? i need to move this tested module onto my live environment and connect a host.

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
  •  
Starfinder Playlist

Log in

Log in