DICE PACKS BUNDLE
  1. #1
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075

    Weird thing happened - stringres picked up from another ruleset???

    So, on my ruleset - I borrowed from several including 2E, 5E, etc.

    I was just cleaning up the 3 stats I had for an npc sheet in prep to add saving throws. Decided to first add the saving throw description strings resource and decided to search on resource of prior control to find the spot in the file to add the next one. I searched on "npc_label_numberattacks"

    from:
    Code:
    <label_column name="numberattacks_text_label">
       <static textres="npc_label_numberattacks" />
    </label_column>
    <labelcontrol_columnh name="numberattacks_text" />
    It appears in UI as "# Attacks"


    Umm it wasn't in my strings... search whole ruleset - nope. Only in the .xml file.
    Search CoreRPG. Nope.
    It's in 2 rulesets 2E and AD&DCore (I kept the old one in my dev tree in case it had anything different that might be useful)

    Huh...
    OOOO - I probably put in my base.xml "strings_adnd.xml" and somehow it ... searches other directories?
    Nope, I don't have it.

    So, moving on and fixing it to include my own resources - BUT, if anyone has a clue how/why this occurred, let me know. Like some sort of thing like C++ template dependency injection? If you think it is impossible, it probably is and I made a mistake that didn't see and not providing all the info. Like said, I don't care about this because clearly I WANT to define my own string resources and will. Just curiosity if it is a thing where it looks in entire ruleset tree from /strings dir xml. Which I CANNOT actually credit as being the reason but hey...

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,674
    Blog Entries
    1
    are you importing from other rulesets?

    <importinfo>
    <acceptfrom ruleset="MoreCore" />
    <acceptfrom ruleset="CoreRPG" />
    </importinfo>

  3. #3
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Quote Originally Posted by damned View Post
    are you importing from other rulesets?

    <importinfo>
    <acceptfrom ruleset="MoreCore" />
    <acceptfrom ruleset="CoreRPG" />
    </importinfo>

    Of course I am! Thank you! Yet another mystery solved due to your help!!
    Code:
    ...
    	<!-- Abilities -->
    	<description>
    		<text>Swords &amp; Wizardry Complete Ruleset</text>
    		<author>Dan Delgado (Varsuuk)</author>
    		<website>https://www.fantasygrounds.com</website>
    	</description>
    	
    	<!-- Layers -->
    	<importruleset source="CoreRPG" />
    	
        <importinfo>
            <acceptfrom ruleset="CoreRPG" />
        </importinfo>
    
    
    
    	<!-- Tabletop settings -->
    	<includefile source="gameelements.xml" />
    ...
    Edit: WAIT... I know I'd get from Core, I meant before it WASN'T from Core (sorry) - it was in 2E.


    "npc_label_numberattacks"

    strings_adnd,xml:
    Code:
    ...
      <string name="npc_label_numberappearing"># Appearing</string>  
      <string name="npc_label_numberattacks"># Attacks</string>  
      <string name="npc_label_organization">Organization</string> 
    ...

    Before I changed it to:
    Code:
          <label_column name="numberattacks_text_label">
          	<static textres="label_numberattacks" />
          </label_column>
          <labelcontrol_columnh name="numberattacks_text" />
    it was
    Code:
          <label_column name="numberattacks_text_label">
            <static textres="npc_label_numberattacks" />
          </label_column>
          <labelcontrol_columnh name="numberattacks_text" />
    And it was displaying # Attacks even though I had YET to define a string for that in my own strings.xml file to the ruleset.
    Was wondering if there was an obvious reason like import - if not then skip, as I said - it was cos hadn't yet defined it but expected it to throw an error due to that. dir search did NOT find that string anywhere except 2E and AD&D Core. Odd
    Last edited by Varsuuk; January 26th, 2020 at 00:36.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    FG only loads the files that you tell it to load via https://www.fantasygrounds.com/refdoc/includefile.xcp and https://www.fantasygrounds.com/refdoc/script.xcp. It doesn't just pick up random files in directories and load them.
    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. #5
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Right, as I always continued to believe. I was trying to figure out what angle I was missing.

    I finished some stuff and committed. In the morning I will again reference the string in 2E and see if it loads it. If it does, will rethink and check again cos there is a razor here somewhere that will explain it.

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