PDA

View Full Version : JPG 3d Variant



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.

Moon Wizard
August 11th, 2009, 06:28
The default weapon list item uses a checkbox control to handle whether a weapon is melee or ranged. The getState() function only returns either true or false.

Are you basing your ruleset on one of the JPG rulesets?
If so, there should be an iconcycler control that I built which you can use. You'll need to look at the code to see an example of how to set it up and update the script code.

Cheers,
JPG

Paul Pratt
August 11th, 2009, 06:46
I am using a jpg set. I found the iconcycler and used in in the char sheet combat.xml

The issue becomes what call to use instead of getState? getIndex was a guess that didn't work. And that's were I am stuck.

Telemaco
January 30th, 2010, 14:10
I'm looking for a Conan online system, like d20 but with dodge and parry... is your ruleset working in this way?

thx.

ludol
October 6th, 2010, 21:01
i'm working on one if you want to test mp me;)