PDA

View Full Version : BUG - Call of Cthuhu - Race NPCs don't apply the ability roll to the CT record



Trenloe
March 11th, 2015, 19:05
The Call of Cthulhu ruleset has the ability to make an NPC record a base "race" record (check the "Race" box on the main tab). Dice strings can be entered for the statistics and when the NPC is added to the CT the dice rolls should be made and applied to the NPC in the combat tracker.

The dice rolls are being made, but the result of the rolls is not being applied to the ability scores. The code is in manager_combat2.lua:


function addNPC(sClass, nodeNPC, sName)
local nodeEntry, nodeLastMatch = CombatManager.addNPCHelper(nodeNPC, sName);

local nSTR = getAbility(nodeNPC, "strength");
local nCON = getAbility(nodeNPC, "constitution");
local nSIZ = getAbility(nodeNPC, "size");
local nDEX = getAbility(nodeNPC, "dexterity");
local nPOW = getAbility(nodeNPC, "power");
local nSAN = getAbility(nodeNPC, "sanity");
...
...

The results (nSTR, nCON, etc.) are never used and nothing is applied back into the NPC database record for abilities.strength, etc..

A second issue here is that all of the entries that can be set as a dice roll in the NPC record aren't included in the getAbility calls above - APP, EDU and INT.