5E Product Walkthrough Playlist
  1. #1

    Pregen Character Module (5E)

    I'm having a heckuva time trying to make a pregenerated character module.

    This module has some custom backgrounds etc, and I'll likely add a Reference Manual link as well.

    However, the old public PAR5E doesn't seem to handle pregens and the manual method listed here isn't very detailed: https://www.fantasygrounds.com/wiki/index.php/Pregens

    What I've tried to do:
    -Create a new campaign, where I'm inputting a new background and created a PC character.
    -Exited FG and edited the db.xml file to add the following code:
    Code:
    	<library>
    		<id-00001>
    			<librarylink type="windowreference">
    				<class>pregencharselect</class>
    				<recordname>pregencharsheet@PregenTest5E</recordname>
    			</librarylink>
    			<name type="string">Pregenerated Characters</name>
    		</id-00001>
    	</library>
    -Then added this code to the root:
    Code:
    <pregencharsheet>
         <Character1>
         ...
         </Character1_>
         <Character2_>
         ...
         </Character2_>
         ...
    </pregencharsheet>
    -Save and when I load the campaign back up and click on Library, I get a script error popup: Script Error: [string "library_booklistentry"]:1: bad argument #-1 to 'getModuleInfo' (string expected, got nil)
    -Theoretically I can export the PC to xml and paste this xml manually into db.xml in place of the Character1 tags.

    Any insight to those who have gone before is appreciated! I downloaded rob's FG 5E Pregens from DMs guild to try and learn more, however this is just the xml files of the characters and not a "mod" to load them.
    US East Coast-Based DM - Ultimate Licence Holder

  2. #2
    It looks like the expected format for the XML is wrong. Try exporting a module with some other types of records to see how the library structures should be built.

    It should look something like this:
    Code:
    <root ...>
      <library>
        <moduletag>
          <name type="string">Name</categoryname>
          <categoryname type="string">Category</categoryname>
          <entries>
            <link1>
              <librarylink type="windowreference">
                <class>pregencharselect</class>
                <recordname>pregencharsheet</recordname>
              </librarylink>
              <name type="string">Pregenerated Characters</name>
            </link1>
            ...
          </entries>
        </moduletag>
      </library>
      ...
    </root>
    EDIT: And what Zacchaeus said below. The library link structures are not really designed to be used outside modules, though they currently work to some degree.

    Cheers,
    JPG
    Last edited by Moon Wizard; September 15th, 2017 at 21:02.

  3. #3
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,826
    You need to edit a module - not a campaign. So you'll first create a module, then edit the XML as shown on that link and add the XML of the characters from the campaign db.xml where you created the characters. Then zip the module back up and load as normal.
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

  4. #4
    I think my template pack has the code for pregens for 5e:
    http://www.fantasygrounds.com/forums...sset-Templates
    I never claimed to be sane. Besides, it's more fun this way.

  5. #5
    Quote Originally Posted by Zacchaeus View Post
    You need to edit a module - not a campaign. So you'll first create a module, then edit the XML as shown on that link and add the XML of the characters from the campaign db.xml where you created the characters. Then zip the module back up and load as normal.
    Gotcha, my error in editing the campaign db.xml file... I needed to create essentially an empty mod to edit manually.
    US East Coast-Based DM - Ultimate Licence Holder

  6. #6
    Quote Originally Posted by Nickademus View Post
    I think my template pack has the code for pregens for 5e:
    http://www.fantasygrounds.com/forums...sset-Templates
    Downloaded! This looks excellent for reference, thanks for taking the time to put it together and respond
    US East Coast-Based DM - Ultimate Licence Holder

  7. #7
    OK, making steady progress on this project.. However, I wanted to try to link to a specific pregen character sheet from within the referencemanual. At this stage, I'm having to create the entire module manually via XML, so thought I would play around some to see if I could get this to work. So far no dice...

    I was going to post a question about how to do this, but I've figured it out! So I'm posting here in case someone searches for a similar issue or someone wants to add this to the wiki:

    The correct XML link in the reference manual for pregens is:

    Code:
    <link class="charsheet" recordname="reference.pregencharsheet.xxPregen@SampleModule">Example 1 Character Sheet</link>
    This pops up the expected window with this pregen's character sheet, with everything filled out correctly, even before they have decided to add it to the campaign!

    Cheers,
    US East Coast-Based DM - Ultimate Licence Holder

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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
  •  
5E Character Create Playlist

Log in

Log in