PDA

View Full Version : aritmetics in a numbercontrol



subbuglio
February 15th, 2005, 20:44
I have to calculate STxST/5 and other multiplicative values derived from the stats. Is there a way using <source>?
how does valuemap work?

msd
February 16th, 2005, 05:27
I have to calculate STxST/5 and other multiplicative values derived from the stats. Is there a way using <source>?
how does valuemap work?

BIIIIIIIIIIG Disclaimer here...I only looked at this for a few moments. In other words, this might be a stupid response that makes you say "well obviously...I knew that!"

:D

Valuemap appears to be exactly that...(ducks in preparation for getting hit). It seems to be mapping (in the examples I saw) ability scores to defined bonuses. If you have a limited number of possible ability scores, it seems like its just easier to hard code it like this as opposed to try and teach the machine to do some formula.

Can't you just create your own XML node and have a valuemap entry that looks something like this (taking 10 as an example for the sake of clean math)



<source name="myAttribute" op="+" valuemap="10&#58;20...15&#58;45...20&#58;80..." />


Is this a d20 type system where strength scores are going to fall within a reasonably defined range?

subbuglio
February 16th, 2005, 09:38
well... ok, I got the point, but i'd prefer not to hardcode... anyway if there is no other way, maybe i'll do the hard work... :?
If there is the possibility to make calculations, as it is possible to sum values (like bonuses) please tell me!