Thread: Total of check box
-
November 30th, 2005, 15:23 #1
- Join Date
- Nov 2005
- Posts
- 3
Total of check box
Hi all,
I would like to know if it is possible to assign a value to another area when my check box is checked ??
[ ]level1
[ ]level2 The Level set is level [ 3 ]
[X]level3
[ ]level4
- <multistate name="inteligence_niv1">
<bounds rect="180,124,9,9" />
<state value="0" icon="indicator_mdtplein" />
</multistate>
- <multistate name="inteligence_niv2">
<bounds rect="191,124,9,9" />
<state value="0" icon="indicator_mdtvide" />
<state value="1" icon="indicator_mdtplein" totalvalue=2 /> <- a thing like this ???
</multistate>
Do you have any idea ?
Regards,
Pierre.---
yoyA
-
November 30th, 2005, 17:33 #2
- Join Date
- Mar 2005
- Posts
- 540
Let me make sure I understand what you want? You want this to behave like a radio button so if you have level1 selected and you select level3, then level1 would become blank and level3 would have an X. You would then want something that would tell what level is selected. If this is the case then no it cannot be done right now. When 1.06 is released it will have scripting in it and this should be easy to do what you want. Currently the limitation is that you have to change a multistate manually it cannot be done through the software. If you don't mind that the user would have to deselect level1 and then select level3 then yes it can be done. If you'd like some help with this let me know and I can give you a hand when I get home from work (around 7:00ET).
-
December 1st, 2005, 13:55 #3
- Join Date
- Nov 2005
- Posts
- 3
Hi Cantstanzya,
Thank you for your reply and sorry for my english.
In fact, I want to create a ruleset for the World Of Darkness 2 (Vampire, Mage etc ...)
If you don't know this rule system, I'll try to explain it to you and what I want exaclty
In this case, the Intelligence value attribut will serve me after to calculate a skill Level (ex: Informatique skill).
I would like to populate the Informatique skill automaticly with the Int value (in this case, 3).
Is it possible to do this without the FantasyGrounds v1.06 ?
Regards,
Pierre.---
yoyA
-
December 2nd, 2005, 02:35 #4
- Join Date
- Mar 2005
- Posts
- 540
Yes, the first thing you need to do is create 5 different Multistate in your character sheet xml file
Code:<multistate name="intel1"> <bounds rect="100,100,50,50" /> <state value="0" icon="EmptyCircle" /> <state value="1" icon="FilledCircle" /> </multistate> <multistate name="intel2"> <bounds rect="150,100,50,50" /> <state value="0" icon="EmptyCircle" /> <state value="1" icon="FilledCircle" /> </multistate> <multistate name="intel3"> <bounds rect="200,100,50,50" /> <state value="0" icon="EmptyCircle" /> <state value="1" icon="FilledCircle" /> </multistate> <multistate name="intel4"> <bounds rect="250,100,50,50" /> <state value="0" icon="EmptyCircle" /> <state value="1" icon="FilledCircle" /> </multistate> <multistate name="intel5"> <bounds rect="300,100,50,50" /> <state value="0" icon="EmptyCircle" /> <state value="1" icon="FilledCircle" /> </multistate>
Code:<icon name="EmptyCircle" file="rulesets/YourRulesetName/icons/EmptyCircle.png" /> <icon name="FilledCircle" file="rulesets/YourRulesetName/icons/FilledCircle.png" />
Now (if I understand you correct) you will want to be able to total up how many of the circles are checked. You can do that by adding the numbercontrol below:
Code:<numbercontrol name="TotalIntel"> <bounds rect="350,100,50,50" /> <nodrag /> <nodrop /> <noreset /> <value type="readonly" /> <limits minimum="0" maximum="5" /> <source name="intel1" op="+" /> <source name="intel2" op="+" /> <source name="intel3" op="+" /> <source name="intel4" op="+" /> <source name="intel5" op="+" /> </numbercontrol>
Hope this helps. Let me know if you have any problems or questions. Or if you want it to do something else. Good Luck!
-
December 2nd, 2005, 14:49 #5
You can also create 6 states in one multistate control:
Code:<multistate name="intel1"> <state value="0" icon="ZeroCircles" /> <state value="1" icon="OneCircle" /> <state value="2" icon="TwoCircles" /> <state value="3" icon="ThreeCircles" /> <state value="4" icon="FourCircles" /> <state value="5" icon="FiveCircles" /> </multistate>
Of course, that would require you to keep clicking on the control to cycle through all the possible states, so if you don't like that, you can go with Cantstanzya's version.
As mentioned, this is exactly the thing that will be a snap after 1.06 is ready.Tero Parvinen
Fantasy Grounds Guru
-
December 3rd, 2005, 16:08 #6
Thanks a lot for your advices, it does works perfectley.
I only used yet the first method, but the second one will be help full, for other traits.
I have a few more questions. :roll:
I wonder how to invert the process, it's to say how to use a result in order to view point on a secondary traits. For example:
Resolve °°° + composure °°° = 6 = willpower °°°°°°.
Other thing, how to obtain a trait that would equals the smallest value of the two other traits. For example:
Dexterity °°°° , Wits °°. a smallest value is 2, it means defense = 2.
Regards.
Mickael.Où allons nous ?
-Nulle part.
-Ce sera long ?
-Sans fin.
-
December 4th, 2005, 02:28 #7
- Join Date
- Mar 2005
- Posts
- 540
Originally Posted by koszza
Code:<numbercontrol name="TotalWillpower"> <bounds rect="350,100,50,50" /> <nodrag /> <nodrop /> <noreset /> <value type="readonly" /> <limits minimum="0" maximum="5" /> <source name="resolve1" op="+" /> <source name="resolve2" op="+" /> <source name="resolve3" op="+" /> <source name="composure1" op="+" /> <source name="composure2" op="+" /> <source name="composure3" op="+" /> </numbercontrol>
Originally Posted by koszza
Code:<numbercontrol name="Dex"> <bounds rect="300,100,50,50" /> <nodrag /> <nodrop /> <noreset /> <value type="readonly" /> <source name="dex1" op="+" /> <source name="dex2" op="+" /> <source name="dex3" op="+" /> <source name="dex4" op="+" /> <source name="dex5" op="+" /> </numbercontrol> <numbercontrol name="Wits"> <bounds rect="350,100,50,50" /> <nodrag /> <nodrop /> <noreset /> <value type="readonly" /> <source name="wits1" op="+" /> <source name="wits2" op="+" /> <source name="wits3" op="+" /> <source name="wits4" op="+" /> <source name="wits5" op="+" /> </numbercontrol>
Code:<numbercontrol name="DexMinusWits"> <invisible /> <source name="Dex" op="+" /> <source name="Wits" op="-" /> </numbercontrol> <numbercontrol name="WitsMinusDex"> <invisible /> <source name="Wits" op="+" /> <source name="Dex" op="-" /> </numbercontrol>
Code:<numbercontrol name="DexIsLower"> <invisible /> <source name="DexMinusWits" op="*" valuemap="-5:0,-4:0,-3:0,-2:0,-1:0,0:0,1:1,2:1,3:1,4:1,5:1" /> </numbercontrol> <numbercontrol name="WitsIsLower"> <invisible /> <source name="WitsMinusDex" op="*" valuemap="-5:0,-4:0,-3:0,-2:0,-1:0,0:0,1:1,2:1,3:1,4:1,5:1" /> </numbercontrol>
In the WitsIsLower numbercontrol above, if wits minus dex is a negative number it will be multiplied by 0. If it is higher than zero it will be multiplied by one.
You would then have two numbers, one will be zero and one will be a positive number. Now create two more number controls that will turn the negative number into a 1.
Code:<numbercontrol name="DexMultiplier"> <invisible /> <source name="DexIsLower" op="+" valuemap="-5:1,-4:1,-3:1,-2:1,-1:1,0:1" /> </numbercontrol> <numbercontrol name="WitsMultiplier"> <invisible /> <source name="WitsIsLower" op="+" valuemap="-5:1,-4:1,-3:1,-2:1,-1:1,0:0" /> </numbercontrol>
Code:<numbercontrol name="DexFinal"> <invisible /> <source name="Dex" op="+" /> <source name="DexMultiplier" op="*" /> </numbercontrol> <numbercontrol name="WitsFinal"> <invisible /> <source name="Wits" op="+" /> <source name="WitsMultiplier" op="*" /> </numbercontrol>
Code:<numbercontrol name="Defense"> <bounds rect="400,100,50,50" /> <nodrag /> <nodrop /> <noreset /> <value type="readonly" /> <source name="DexFinal" op="+" /> <source name="WitsFinal" op="+" /> </numbercontrol>
Let's say Dex is 2 and Wits is 5.
DexMinusWits would be -3
WitsMinusDex would be 3
The DexIsLower number control would multiply -3 times 0 which would be 0
The WitsIsLower number control would multiply 3 times 1 which would be 3
The DexMultiplier number control would be set to 1 by the valuemap
The WitsMultiplier number control would be set to 0 by the valuemap
The DexFinal would add Dex of 2 and then multiply it by DexMultiplier of 1 and give you a total of 2
The WitsFinal would add Wits of 5 and then multiply it by DexMultiplier of 0 and give you a total of 0
The Defense would add DexFinal of 2 to WitsFinal of 0 and give you a Defense of 2 (which is what was the lower of the two numbers)
If both were the same this is what would happen:
Let's say Dex is 3 and Wits is 3.
DexMinusWits would be 0
WitsMinusDex would be 0
The DexIsLower number control would multiply 0 times 0 which would be 0
The WitsIsLower number control would multiply 0 times 0 which would be 0
The DexMultiplier number control would be set to 1 by the valuemap
The WitsMultiplier number control would be set to 0 by the valuemap
The DexFinal would add Dex of 3 and then multiply it by DexMultiplier of 1 and give you a total of 3
The WitsFinal would add Wits of 3 and then multiply it by DexMultiplier of 0 and give you a total of 0
The Defense would add DexFinal of 3 to WitsFinal of 0 and give you a Defense of 3 (which in this case were the same but none the less gives you the correct answer)
My character sheet is nearly fully automated and has thousands of lines like the code above (7064 to be exact). I can't wait for 1.06 to come out so that I can clean this up.
-
December 4th, 2005, 08:00 #8
-
December 4th, 2005, 17:01 #9
- Join Date
- Mar 2005
- Posts
- 540
Originally Posted by Crusader
-
December 5th, 2005, 12:57 #10
- Join Date
- Nov 2005
- Posts
- 3
Thanks friends for all the responses
Regards,
Pierre.---
yoyA
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks