DICE PACKS BUNDLE
  1. #1

    Join Date
    Mar 2006
    Location
    Arkansas
    Posts
    7,397

    5E Help with opening NPCs from a list

    In the Monsters of the Multiverse module, when you open the module and click NPCs it opens a list of monsters called NPCs. If you click on an NPC on the list it opens the npc (shown in the first picture).

    I want to build something similar in the 5E ruleset but the only example I can find is from the basic rules and they open a collapsible list not one long list like MotM.

    I put together an XML test module, but while I can get it to do a list of monsters the links don't work. I either messed up the syntax, am using the wrong refclass, both or ?

    Any help would be appreciated. I've attached the pictures with MotM how I want it to work, what I have and the module.

    The current db.xml code is:
    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <root version="3.3" release="8|CoreRPG:4">
      <library>
        <links5EMonsterTest>
          <categoryname type="string">Core Rules</categoryname>
          <name type="string">5E MonsterLinkTest</name>
          <entries>
            <id-00001>
              <name type="string">NPCs</name>
              <librarylink type="windowreference">
                <class>referenceindex</class>
                <recordname>npcLinks</recordname>
              </librarylink>
            </id-00001>
          </entries>
        </links5EMonsterTest>
      </library>
      <npcLinks>
        <description type="string">NPC Links</description>
        <index>
          <FirstLink>
            <link type="windowreference">
              <class>npc</class>
              <recordname>npc.First@5E MonsterLinkTest</recordname>
            </link>
            <name type="string">First Monster Link</name>
          </FirstLink>
          <SecondLink>
            <link type="windowreference">
              <class>npc</class>
              <recordname>npc.Second@5E MonsterLinkTest</recordname>
            </link>
            <name type="string">Second Monster Link</name>
          </SecondLink>
        </index>
      </npcLinks>
      <npc static="true">
        <First>
          <abilities>
            <charisma>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </charisma>
            <constitution>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </constitution>
            <dexterity>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </dexterity>
            <intelligence>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </intelligence>
            <strength>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </strength>
            <wisdom>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </wisdom>
          </abilities>
          <name type="string">First Monster</name>
        </First>
        <Second>
          <abilities>
            <charisma>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </charisma>
            <constitution>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </constitution>
            <dexterity>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </dexterity>
            <intelligence>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </intelligence>
            <strength>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </strength>
            <wisdom>
              <bonus type="number">0</bonus>
              <score type="number">10</score>
            </wisdom>
          </abilities>
          <name type="string">Second Monster</name>
        </Second>
      </npc>
    </root>
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    The 3.5E monsters has an example of the simple list like the one that is exported by default when exporting record types.

    If you export a record type to a module, then a simple list is created by default in the exported module. If the record type has "views" defined by the ruleset and those views are allowed to export (such as NPCs - By Letter), it outputs a slightly different variation. Try exporting a couple modules to see the output; or better yet, just use the built-in export.

    Code:
       <library>
        <d20monsters static="true">
          ...
          <entries>
           ...  
           <npcs>
              <librarylink type="windowreference">
                <class>reference_list</class>
                <recordname>list.npcs</recordname>
              </librarylink>
              <name type="string">NPCs</name>
            </npcs>
          </entries>
        </d20monsters>
      </library>
      ...
      <list static="true">
    	<npcs>
    		<recordtype type="string">npc</recordtype>
    	</npcs>
      </list>
    Regards,
    JPG

  3. #3

    Join Date
    Mar 2006
    Location
    Arkansas
    Posts
    7,397
    Thanks for the 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
  •  
Starfinder Playlist

Log in

Log in