Thread: XML-> Operation * 10
-
June 15th, 2005, 19:55 #1
XML-> Operation * 10
Hello hello,
In my character sheet, I want to calculate the intelligence modifier * 10 but I just can't find how to do it.. can someone help me!? Here's my code for now... I tried 1 or 2 things but I guess I'm no good at xml... he hehe
<numbercontrol name="intimateknowledgeintelligence">
<value type="modifier" />
<bounds rect="260,84,34,23" />
<nodrop />
<noreset />
<displaysign />
<hideonvalue value="0" />
<source name="intelligencebonus" op="*" />
<description text="Intelligence x 10" />
</numbercontrol>
-
June 15th, 2005, 21:34 #2
Too bad if the op="*" doesn't work since I have use for it myself, but one thing that I notice about your code (if the op="*" indeed does work), is that you tell the program to multiply the intelligencebonus, but not what to multiply it with. I don't have any example code to look at now so I don't know what codes to use but if you can assign the value 10 to this control and then perform the op="*". Maybe that would work?
-
June 16th, 2005, 02:00 #3
- Join Date
- Mar 2005
- Posts
- 540
Give this a try:
<numbercontrol name="always-zero">
<invisible />
</numbercontrol>
<numbercontrol name="intimateknowledgeintelligence">
<value type="modifier" />
<bounds rect="260,84,34,23" />
<nodrop />
<noreset />
<displaysign />
<hideonvalue value="0" />
<source name="intelligence" op="+" />
<source name="always-zero" op="*" valuemap="0:10" />
<description text="Intelligence x 10" />
</numbercontrol>
What I have done is create a number control called "alway-zero", which will always be zero and I use it for defaults throughout my character sheet. In the "intimateknowledgeintelligence" number control I take the value of intellingence, lets say it is 17 and since always-zero is zero it will multiply it by the 17 times 10. This should give you the results you want.
-
June 17th, 2005, 14:14 #4
It worked!!!! Thanks a lot!!!!!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks