DICE PACKS BUNDLE
  1. #1

    Assistance with PFSRD - coding question

    Hello,

    I am trying to auto populate a character sheet with a classes weapon/armor proficiencies. It has been working great, however I have run into a problem with getting a rarer weapon to be added.

    The code:

    Code:
    <weaponandarmorproficiency>
        <level type="number">1</level>
        <name type="string">Weapon and Armor Proficiency</name>
        <text type="formattedtext">
          <p>Investigators are proficient with all simple weapons, plus the hand crossbow, rapier, sap, shortbow, short sword, and sword cane. They are proficient with light armor, but not with shields. </p>
        </text>
    </weaponandarmorproficiency>
    All the weapons/armor appear correctly, except the sword cane item.

    The weapon is defined, along with the others, so that does not seem to be the issue.

    Anyone know what function might control what is added as a proficiency?

    Or do I need to create a function to add new items to auto-populate? If that is the case, can anyone point me towards some example code to get me an idea of what is needed.

    Thanks,

    -Elaith

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    Look at the function handleProficiencies in the 3.5E ruleset, campaign\scripts\manager_char.lua file. This looks for various weapon names to identify proficiencies.
    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!

  3. #3
    Ah, thank you so much. Was driving me crazy. Now I just need to figure out how to override the normal function to add the new items. But thank you for pointing me at exactly what I was looking for.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    Quote Originally Posted by Elaith View Post
    Now I just need to figure out how to override the normal function to add the new items.
    It's part of the CharManager global script package. So you can override just that handleProficiencies function in an extension, using CharManager.handleProficiencies = <your new function> which will completely replace the base function.
    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
    Thanks so much Trenloe, I was able to get it figured out. Just needed to be pointed at the correct file.

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