DICE PACKS BUNDLE
  1. #1

    Similar Extension to 'Smoothed Bonuses'

    I play in a weird campaign that uses a different Stat Bonus system. It is (Stat - 50) / 2.

    Is there a way I could make my own extension to do this? Could I get the source code to the 'Smoothed Bonuses' extension?

    Of course the campaign has other weird rules; but that is the big one.

  2. #2

    Over-riding Bonus Calculations

    Stat bonus is deliberately exposed, so can be modified using an extension. Take a copy of the smoothed bonus extension (I think it is just a folder in the extensions directory, so you can copy the whole folder and rename it), and edit the extension.xml file. That file should contain some Lua script which looks like this:
    Code:
    function onInit()
      OptionManager.register("abilitybonus",SmoothedBonus);
    end
    
    function SmoothedBonus(optname,win)
      local val = 0;
      if not win or not win.temp then
        return 0;
      end
      val = win.temp.getValue();
      if val > 95 then
        return (val-95)*2+15;
      elseif val > 89 then
        return (val-89)+9;
      elseif val > 71 then
        return math.floor((val-72)/3)+4;
      elseif val > 59 then
        return math.floor((val-60)/4)+1;
      elseif val > 40 then
        return 0;
      elseif val > 28 then
        return math.floor((val-29)/4)-3;
      elseif val == 28 then
        return -4;
      elseif val > 12 then
        return math.floor((val-13)/3)-9;
      elseif val > 10 then
        return -10;
      elseif val > 5 then
        return val - 21;
      else
        return val*2 - 27;
      end
    end
    You need to change it to look like this:
    Code:
    function onInit()
      OptionManager.register("abilitybonus",MyBonus);
    end
    
    function MyBonus(optname,win)
      local val = 0;
      if not win or not win.temp then
        return 0;
      end
      val = win.temp.getValue();
      return math.floor((val-50)/2);
    end
    You will also need to change the top part of the extension.xml file so the extension doesn't clash with the smoothed bonus one. You should change this:
    Code:
    <name>Smoothed Bonuses</name>
    <description>Smoothes ability bonuses, consistent with RM Companion I.</description>
    To this:
    Code:
    <name>House Bonuses</name>
    <description>Converts bonuses to house rules.</description>
    Hope that helps

    Stuart

  3. #3
    Thanks Stuart, this is awesome.
    Here is the untested compressed directory. Will test it tonight.

    Is there a place I can see what else is 'exposed'?
    Last edited by PhilFischer; October 20th, 2010 at 17:05.

  4. #4
    I'm afraid that only the skill bonus was exposed like this, although there are one or two other areas that can be tweaked with some more effort, such as the development points associated with a given stat value and the skill percentage associated with a given number of skill ranks.

    Stuart

  5. #5
    Hello Mr. StuartW or anyone else that may know.
    Will this Linear Bonus Ext above still work in current RM Classic as of Aug/5/2013?

  6. #6
    If you are using the latest version of the RMC ruleset (1.5.5) then you can use the extension here: https://www.fantasygrounds.com/forum...tat-Extensions

    You can find a list of extension here: https://www.fantasygrounds.com/forum...ns-and-Modules

  7. #7

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
  •  
FG Spreadshirt Swag

Log in

Log in