Samarex
March 21st, 2017, 04:03
I have a setup on a 3.5E ruleset Charactersheet and I am trying to automate it but not sure how to make the script to do it.
Setup is
String, number-field A, Number-field b, number-field c, number-field d
Alignment Law Chaos Good Evil
First thing is
I need Set 1 (A and B) tied together in the manner if A increases by 1 then B decreases by 1 or if A decreases 1 then B increases 1, with scores of 0-21 (Combine Score MUST be 21) Same with Set 2 (C and D)
Second
I would like the String to auto update depending on the following rules
Set 1
If Scores are all between 8-13 then String is Neutral
If either A or B is 14 or greater then that Field is used (Example A-14,B-8 would give a Law Alignment, A-8,B14 a Chaos)
Set 2
If Scores are all between 8-13 then String is Neutral
If either C or D is 14 or greater then that Field is used (Example C-14,D-8 would give a Good Alignment, C-8,D14 a Evil)
Combine Set 1 and Set 2 and generate String field
Example 11,11,11,11 would be Neutral
14,8,11,11 -Lawful Neutral
11,11,14,18 -Neutral Good
14,8,14,8 Would Be Lawful-Good
Character Sheet Code
<frame_char name="alignmentframe">
<bounds>15,45,480,45</bounds>
</frame_char>
<string_labeled name="alignmentlabel">
<anchored to="alignmentframe" position="insidetopleft" offset="15,10" width="115" height="20" />
<labelres>char_label_alignment</labelres>
</string_labeled>
<number_strscoreadj name="alignmentlaw" source="abilities.alignment.scorelaw">
<anchored to="alignmentframe" position="insidetopleft" offset="195,13" />
<default>11</default>
</number_strscoreadj>
<string_charalignmentlabel>
<anchored to="alignmentlaw" />
<static textres="char_label_alignlaw" />
</string_charalignmentlabel>
<number_strscoreadj name="alignmentchaos" source="abilities.alignment.scorechaos">
<anchored to="alignmentlaw" position="right" offset="55,0" />
<default>10</default>
</number_strscoreadj>
<string_charalignmentlabel>
<anchored to="alignmentchaos" />
<static textres="char_label_alignchaos" />
</string_charalignmentlabel>
<number_strscoreadj name="alignmentgood" source="abilities.alignment.scoregood">
<anchored to="alignmentchaos" position="right" offset="55,0" />
<default>11</default>
</number_strscoreadj>
<string_charalignmentlabel>
<anchored to="alignmentgood" />
<static textres="char_label_aligngood" />
</string_charalignmentlabel>
<number_strscoreadj name="alignmentevil" source="abilities.alignment.scoreevil">
<anchored to="alignmentgood" position="right" offset="55,0" />
<default>10</default>
</number_strscoreadj>
<string_charalignmentlabel>
<anchored to="alignmentevil" />
<static textres="char_label_alignevil" />
</string_charalignmentlabel>
Thanks for any help
Samarex
Setup is
String, number-field A, Number-field b, number-field c, number-field d
Alignment Law Chaos Good Evil
First thing is
I need Set 1 (A and B) tied together in the manner if A increases by 1 then B decreases by 1 or if A decreases 1 then B increases 1, with scores of 0-21 (Combine Score MUST be 21) Same with Set 2 (C and D)
Second
I would like the String to auto update depending on the following rules
Set 1
If Scores are all between 8-13 then String is Neutral
If either A or B is 14 or greater then that Field is used (Example A-14,B-8 would give a Law Alignment, A-8,B14 a Chaos)
Set 2
If Scores are all between 8-13 then String is Neutral
If either C or D is 14 or greater then that Field is used (Example C-14,D-8 would give a Good Alignment, C-8,D14 a Evil)
Combine Set 1 and Set 2 and generate String field
Example 11,11,11,11 would be Neutral
14,8,11,11 -Lawful Neutral
11,11,14,18 -Neutral Good
14,8,14,8 Would Be Lawful-Good
Character Sheet Code
<frame_char name="alignmentframe">
<bounds>15,45,480,45</bounds>
</frame_char>
<string_labeled name="alignmentlabel">
<anchored to="alignmentframe" position="insidetopleft" offset="15,10" width="115" height="20" />
<labelres>char_label_alignment</labelres>
</string_labeled>
<number_strscoreadj name="alignmentlaw" source="abilities.alignment.scorelaw">
<anchored to="alignmentframe" position="insidetopleft" offset="195,13" />
<default>11</default>
</number_strscoreadj>
<string_charalignmentlabel>
<anchored to="alignmentlaw" />
<static textres="char_label_alignlaw" />
</string_charalignmentlabel>
<number_strscoreadj name="alignmentchaos" source="abilities.alignment.scorechaos">
<anchored to="alignmentlaw" position="right" offset="55,0" />
<default>10</default>
</number_strscoreadj>
<string_charalignmentlabel>
<anchored to="alignmentchaos" />
<static textres="char_label_alignchaos" />
</string_charalignmentlabel>
<number_strscoreadj name="alignmentgood" source="abilities.alignment.scoregood">
<anchored to="alignmentchaos" position="right" offset="55,0" />
<default>11</default>
</number_strscoreadj>
<string_charalignmentlabel>
<anchored to="alignmentgood" />
<static textres="char_label_aligngood" />
</string_charalignmentlabel>
<number_strscoreadj name="alignmentevil" source="abilities.alignment.scoreevil">
<anchored to="alignmentgood" position="right" offset="55,0" />
<default>10</default>
</number_strscoreadj>
<string_charalignmentlabel>
<anchored to="alignmentevil" />
<static textres="char_label_alignevil" />
</string_charalignmentlabel>
Thanks for any help
Samarex