PDA

View Full Version : valuemap ranges?



Azrael Nightstar
July 7th, 2006, 08:54
Hey all, I'm wondering if there's a way to use a range, rather than an integer value, in a valuemap. By way of example, the attribute might look like this:


<source name="muscle_excep" op="+" valuemap="0:0, 1-50:1, 51-75:2, 76-90:3, 91-99:4, 100:" />

What I'm trying to do, for reference's sake, is create modifiers based on 2nd edition exceptional strength values, which run from 1-100, but there are only a few modifiers from 1-100, so many of them share the same modifier.

Doing it with a valuemap with all the values 0-100 and the result for each seems like a pain, and trying to do it arithmetically might work, but might be a pain to figure out.

Thus, a range setup seems like the perfect way of handling it. If anyone has other ideas on it though I'd certainly welcome those as well.

Cantstanzya
July 7th, 2006, 11:54
Here is the code from the ruleset I made:


<numbercontrol name="strength">
<bounds rect="8,100,34,23" />
<nodrag />
<nodrop />
<noreset />
<description text="Strength" />
<limits minimum="3" maximum="25" />
<source name="race" op="+" valuemap="0:0,1:0,2:0,3:0,4:0,5:-1,6:+1,7:0,8:0,9:0,10:+1,11:+2,12:0,13:0,14:0" />
<tabtarget next="strengthpercent" prev="alignment" />
</numbercontrol>

<numbercontrol name="strengthpercent">
<bounds rect="43,100,34,23" />
<nodrag />
<nodrop />
<noreset />
<description text="Strength Percentage" />
<limits minimum="0" maximum="100" />
<hideonvalue value="0" />
<tabtarget next="intelligence" prev="strength" />
</numbercontrol>

<numbercontrol name="strengthpercent-yn">
<invisible />
<source name="strength" op="1" valuemap="0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0, 12:0,13:0,14:0,15:0,16:0,17:0,18:1,19:0,20:0,21:0, 22:0,23:0,24:0,25:0" />
</numbercontrol>

<numbercontrol name="strengthpercent-tohit">
<invisible />
<source name="strengthpercent" op="+" valuemap="0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0, 12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0, 22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0, 32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0, 42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:+1 ,52:+1,53:+1,54:+1,55:+1,56:+1,57:+1,58:+1,59:+1,6 0:+1,61:+1,62:+1,63:+1,64:+1,65:+1,66:+1,67:+1,68: +1,69:+1,70:+1,71:+1,72:+1,73:+1,74:+1,75:+1,76:+1 ,77:+1,78:+1,79:+1,80:+1,81:+1,82:+1,83:+1,84:+1,8 5:+1,86:+1,87:+1,88:+1,89:+1,90:+1,91:+1,92:+1,93: +1,94:+1,95:+1,96:+1,97:+1,98:+1,99:+1,100:+2" />
<source name="strengthpercent-yn" op="*" />
</numbercontrol>

<numbercontrol name="strengthpercent-damage">
<invisible />
<source name="strengthpercent" op="+" valuemap="0:0,1:+1,2:+1,3:+1,4:+1,5:+1,6:+1,7:+1,8:+1,9:+1,1 0:+1,11:+1,12:+1,13:+1,14:+1,15:+1,16:+1,17:+1,18: +1,19:+1,20:+1,21:+1,22:+1,23:+1,24:+1,25:+1,26:+1 ,27:+1,28:+1,29:+1,30:+1,31:+1,32:+1,33:+1,34:+1,3 5:+1,36:+1,37:+1,38:+1,39:+1,40:+1,41:+1,42:+1,43: +1,44:+1,45:+1,46:+1,47:+1,48:+1,49:+1,50:+1,51:+1 ,52:+1,53:+1,54:+1,55:+1,56:+1,57:+1,58:+1,59:+1,6 0:+1,61:+1,62:+1,63:+1,64:+1,65:+1,66:+1,67:+1,68: +1,69:+1,70:+1,71:+1,72:+1,73:+1,74:+1,75:+1,76:+2 ,77:+2,78:+2,79:+2,80:+2,81:+2,82:+2,83:+2,84:+2,8 5:+2,86:+2,87:+2,88:+2,89:+2,90:+2,91:+3,92:+3,93: +3,94:+3,95:+3,96:+3,97:+3,98:+3,99:+3,100:+4" />
<source name="strengthpercent-yn" op="*" />
</numbercontrol>

<numbercontrol name="strengthpercent-encumbrance">
<invisible />
<source name="strengthpercent" op="+" valuemap="0:0,1:+250,2:+250,3:+250,4:+250,5:+250,6:+250,7:+2 50,8:+250,9:+250,10:+250,11:+250,12:+250,13:+250,1 4:+250,15:+250,16:+250,17:+250,18:+250,19:+250,20: +250,21:+250,22:+250,23:+250,24:+250,25:+250,26:+2 50,27:+250,28:+250,29:+250,30:+250,31:+250,32:+250 ,33:+250,34:+250,35:+250,36:+250,37:+250,38:+250,3 9:+250,40:+250,41:+250,42:+250,43:+250,44:+250,45: +250,46:+250,47:+250,48:+250,49:+250,50:+250,51:+5 00,52:+500,53:+500,54:+500,55:+500,56:+500,57:+500 ,58:+500,59:+500,60:+500,61:+500,62:+500,63:+500,6 4:+500,65:+500,66:+500,67:+500,68:+500,69:+500,70: +500,71:+500,72:+500,73:+500,74:+500,75:+500,76:+7 50,77:+750,78:+750,79:+750,80:+750,81:+750,82:+750 ,83:+750,84:+750,85:+750,86:+750,87:+750,88:+750,8 9:+750,90:+750,91:+1250,92:+1250,93:+1250,94:+1250 ,95:+1250,96:+1250,97:+1250,98:+1250,99:+1250,100: +2250" />
<source name="strengthpercent-yn" op="*" />
</numbercontrol>

<numbercontrol name="strengthpercent-bendbars">
<invisible />
<source name="strengthpercent" op="+" valuemap="0:0,1:4,2:4,3:4,4:4,5:4,6:4,7:4,8:4,9:4,10:4,11:4, 12:4,13:4,14:4,15:4,16:4,17:4,18:4,19:4,20:4,21:4, 22:4,23:4,24:4,25:4,26:4,27:4,28:4,29:4,30:4,31:4, 32:4,33:4,34:4,35:4,36:4,37:4,38:4,39:4,40:4,41:4, 42:4,43:4,44:4,45:4,46:4,47:4,48:4,49:4,50:4,51:9, 52:9,53:9,54:9,55:9,56:9,57:9,58:9,59:9,60:9,61:9, 62:9,63:9,64:9,65:9,66:9,67:9,68:9,69:9,70:9,71:9, 72:9,73:9,74:9,75:9,76:14,77:14,78:14,79:14,80:14, 81:14,82:14,83:14,84:14,85:14,86:14,87:14,88:14,89 :14,90:14,91:19,92:19,93:19,94:19,95:19,96:19,97:1 9,98:19,99:19,100:24" />
<source name="strengthpercent-yn" op="*" />
</numbercontrol>



Let me know if you have any problems with it.

Azrael Nightstar
July 12th, 2006, 06:36
That's pretty much what I ended up doing, only I created an invisible "helper" control, valuemapped 1-100, and sorted that into "classes". Basically since 18/01 to 18/50 all had the same value I set them to map to "1", the next set to 2, etc. Then for the modifiers themselves I just mapped the "class" values, so that 18/01 to 18/50 added 150 lbs of max press, for example, by using 1:150 in the modifier's map.

I guess there's no neater way of doing this until 1.06 but the workaround isn't bad.

Thanks for the help cantstanzya, but I'd already done my workaround, was just hoping for a neater way to satisfy my perfectionism. Oh well. By the way, the ocean called; they're running out of shrimp.

Cantstanzya
July 12th, 2006, 17:32
Oh well. By the way, the ocean called; they're running out of shrimp.LOL, that's classic