Paul Pratt
August 11th, 2009, 02:18
Hi,
I have a working variant of the JPG 3D for Conan RPG. I have the sheet mods done, everything seems to be working expect one item.
On the weapon list, I am trying to get the icons to cycle from ranged, melee, and then to finesee attack types. I changed the char sheet combat.xml to use an iconcycler instead of a checkbox, but have a nagging error in the scripts for char weaponattack: This is the code snippet I am pretty sure that needs to change.
function onSourceUpdate()
local val = calculateSources() + modifier[1];
if window.type.getState() then
val = val + NodeManager.getSafeChildValue(window.getDatabaseNo de(), "...attackbonus.ranged.total", 0);
elseif window.type.getState() then
val = val + NodeManager.getSafeChildValue(window.getDatabaseNo de(), "...attackbonus.melee.total", 0);
else
val = val + NodeManager.getSafeChildValue(window.getDatabaseNo de(), "...attackbonus.finesse.total", 0);
end
setValue(val);
I am pretty sure the call window.type.getState() needs to change, and I am not sure to what. I have tried Index, and a few others as a shot in the dark, but no luck there.
The second issue comes up from another error in a "setValue needed number got a string". I think that is since I don't have the right call to begin with.
Anyone try to add something similar? My coding isn't great but I can usually follow along.
I have a working variant of the JPG 3D for Conan RPG. I have the sheet mods done, everything seems to be working expect one item.
On the weapon list, I am trying to get the icons to cycle from ranged, melee, and then to finesee attack types. I changed the char sheet combat.xml to use an iconcycler instead of a checkbox, but have a nagging error in the scripts for char weaponattack: This is the code snippet I am pretty sure that needs to change.
function onSourceUpdate()
local val = calculateSources() + modifier[1];
if window.type.getState() then
val = val + NodeManager.getSafeChildValue(window.getDatabaseNo de(), "...attackbonus.ranged.total", 0);
elseif window.type.getState() then
val = val + NodeManager.getSafeChildValue(window.getDatabaseNo de(), "...attackbonus.melee.total", 0);
else
val = val + NodeManager.getSafeChildValue(window.getDatabaseNo de(), "...attackbonus.finesse.total", 0);
end
setValue(val);
I am pretty sure the call window.type.getState() needs to change, and I am not sure to what. I have tried Index, and a few others as a shot in the dark, but no luck there.
The second issue comes up from another error in a "setValue needed number got a string". I think that is since I don't have the right call to begin with.
Anyone try to add something similar? My coding isn't great but I can usually follow along.