PDA

View Full Version : Changing the category bonuses



peterb
April 5th, 2021, 12:49
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:

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:

function getCategory(name)
if (not currentline) or (not currentline.Categories) then
return {Order=name,Primary={},Secondary={},PriNeg={},SecN eg={}};
end
if not currentline.Categories[name] then
return {Order=999,Primary={},Secondary={},PriNeg={},SecNe g={}};
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

Phocaea
April 10th, 2021, 01:39
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