Modifying Characteristic Bonus Calculation in the MyQuest extension
I've been using a customized MyQuest extension for some time now to make BRP behave more like Magic World with mostly success, but there is one niggling issue I haven't been able to figure out.
Starting on line 256 in the "MyScript.lua" file there is a function for calculating characteristic bonuses for skills. Numerous times I've attempted to edit this section to make the characteristic bonus calculate according to Magic World rules (which is Characteristic/2) but no matter what I've done, it reverts to the default BRP characteristic bonus calculation.
Here is the default code:
Code:
function getCategoryBonus(influence,characteristic)
if influence=="Primary" then
return characteristic - 10;
elseif influence=="Secondary" then
if characteristic>10 then
return math.floor(characteristic/2) - 5;
else
return math.ceil(characteristic/2) - 5;
end
elseif influence=="Negative" then
return 10 - characteristic;
end
return 0;
end
And here is the code I'm attempting to replace it with:
Code:
function getCategoryBonus(influence,characteristic)
if influence=="Primary" then
return math.ceil(characteristic/2);
end
return 0;
end
I'm certainly no code expert, so I suspect that I'm probably doing something wrong with the syntax, but the console doesn't seem to throw any errors, it just always defaults to the top calculation method, whenever I enable characteristic bonuses in the options.
Any help would be appreciated.