FG Spreadshirt Swag
  1. #1

    Join Date
    Mar 2009
    Location
    Lidingö, Sweden, Europe
    Posts
    344

    Changing the category bonuses

    Just for the record and if someone else wants to do it, here's how you change the category bonuses. Btw this is no criticism of past or current maintainers, I realize the ruleset is old and things where done differently back then and also, the ambition when coding the BRP ruleset was to create a very dynamic ruleset that could work (as the BRP rulesbook does) as a toolset to build a ruleset for any house-rules version of BRP and that makes things a bit complicated, I guess.

    As per the BRP manual, included with the ruleset, you can edit the skill categories in myscript.lua (you can actually name it what you want but for the sake of this text I'll stick to the way it's done in the manual). You can also change the way the category bonuses are calculated, including adding, removing and altering the calculation methods. For example, in the latest version of RuneQuest (as well as in RuneQuest II), there are four calculation methods: one primary positive, one primary negative, one secondary positive and one secondary negative. If you make a change in myscript.lua and reloads the ruleset you would (as I did) expect the category bonuses to be calculated the way you want them. However it isn't that easy. You also need to change the function getCategory in scripts/linemanager.lua (lines 22-30) and change the expected order of input used by the function getBonus in campaign/scripts/charsheet_skilllist.lua.

    Example
    getCategory as shipped:
    Code:
    function getCategory(name)
      if (not currentline) or (not currentline.Categories) then
        return {Order=name,Primary={},Secondary={},Negative={}};
      end
      if not currentline.Categories[name] then
        return {Order=999,Primary={},Secondary={},Negative={}};
      end
      return currentline.Categories[name];
    end
    After change so that it calculates as the per current edition of RuneQuest:
    Code:
    function getCategory(name)
      if (not currentline) or (not currentline.Categories) then
        return {Order=name,Primary={},Secondary={},PriNeg={},SecNeg={}};
      end
      if not currentline.Categories[name] then
        return {Order=999,Primary={},Secondary={},PriNeg={},SecNeg={}};
      end
      return currentline.Categories[name];
    end
    And finally you also need to implement the same change, as to how the calculation methods are coded, as you did in myscript.lua, in the function getBonus in campaign/record_char_powers.xml, as it is duplicated there.

    Hope this helps avoid confusion, if someone needs to make these changes.

    /Peter
    Last edited by peterb; April 5th, 2021 at 12:53.

  2. #2
    I will need to do some practice to understand but great to see someone opening the entrails of BRP

    Please pass on any homemade extensions if you are of a mind to do so

    Michael

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
  •  
DICE PACKS BUNDLE

Log in

Log in