STAR TREK 2d20
  1. #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>
    Alex
    ---------------------
    https://www.ofdoom.info

  2. #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?

  3. #3
    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.

  4. #4
    It worked!!!! Thanks a lot!!!!!
    Alex
    ---------------------
    https://www.ofdoom.info

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in