Blackfoot
November 13th, 2013, 21:37
I am trying to add a cycle button to a variant of the 3.5 skill tab.
Pulling out the 'class skill' button and replacing it with one that has 4 settings for the 'type' of skill.
In Champions there are 4 types of skills:
Untrained - 6 or less
Familiar Skills - 8 or less
Background Skills - 11 + ranks or less
Trained Skills - 9 + stat/5 + ranks or less
<button_checkbox name="state">
<bounds>22,8,12,12</bounds>
<script>
function onValueChanged()
CharManager.updateSkillPoints(window.getDatabaseNo de().getChild("..."));
end
</script>
</button_checkbox>-->
Replaced with this:
<cycler_charskilltype name="state">
<bounds>22,2,12,20</bounds>
<script>
function onValueChanged()
window.onStatUpdate();
-- I realize this is all wrong.. but I'm still working on this script... suggestions here would help.
end
</script>
</cycler_charskilltype>
Using this template:
<template name="cycler_charskilltype">
<button_stringcycler>
<parameters>
<labelsres>utr|fam|bg|tr</labelsres>
<values>untrained|familiarity|background|trained</values>
</parameters>
</button_stringcycler>
</template>
This ends up looking really pretty and all.. puts it in the right spot.. nice little box and all.. but when I click it it gives me this error:
Script Error: [string "common/scripts/button_stringcycler.lua"]:251: bad argument #1 to 'setValue' (number expected, got string)
and doesn't toggle through the values. I'm not sure why it looking for a number.. I copied this cycler setup from the abilities cycler.. and it is all strings.
Pulling out the 'class skill' button and replacing it with one that has 4 settings for the 'type' of skill.
In Champions there are 4 types of skills:
Untrained - 6 or less
Familiar Skills - 8 or less
Background Skills - 11 + ranks or less
Trained Skills - 9 + stat/5 + ranks or less
<button_checkbox name="state">
<bounds>22,8,12,12</bounds>
<script>
function onValueChanged()
CharManager.updateSkillPoints(window.getDatabaseNo de().getChild("..."));
end
</script>
</button_checkbox>-->
Replaced with this:
<cycler_charskilltype name="state">
<bounds>22,2,12,20</bounds>
<script>
function onValueChanged()
window.onStatUpdate();
-- I realize this is all wrong.. but I'm still working on this script... suggestions here would help.
end
</script>
</cycler_charskilltype>
Using this template:
<template name="cycler_charskilltype">
<button_stringcycler>
<parameters>
<labelsres>utr|fam|bg|tr</labelsres>
<values>untrained|familiarity|background|trained</values>
</parameters>
</button_stringcycler>
</template>
This ends up looking really pretty and all.. puts it in the right spot.. nice little box and all.. but when I click it it gives me this error:
Script Error: [string "common/scripts/button_stringcycler.lua"]:251: bad argument #1 to 'setValue' (number expected, got string)
and doesn't toggle through the values. I'm not sure why it looking for a number.. I copied this cycler setup from the abilities cycler.. and it is all strings.