So I'm hoping that all the math smart users can chime in and help.
The size modifer progression has been changed from the D&D progression. The code Jay uses in v1.1 is for DnD and is similar to what is used in PCGen.
The new progression is as follows:
Colossal = -10 (old -8 )
Gartantuan = -5 (old -4 )
Huge = -2
Large = -1
Medium = 0
Small = 1
Tiny = 2
Diminutive = 5 (old 4)
Fine = 10 (old
Here is the formula that Jay uses of DnD progression (calculation is in property for "sizeModifier"):
Code: Select all
<property name="size" type="MAP" group="Description">
<properties>
<property name="name">
<description>Size of the creature.</description>
</property>
<property name="difference" type="SCRIPT">
<description>Size difference from a medium sized creature</description>
<script>JavaScript::
var Java = new JavaImporter(java.math);
with (Java) {
var value = 0;
if (name != null) {
if (name.equalsIgnoreCase("small")) {
value = -1;
} else if (name.equalsIgnoreCase("tiny")) {
value = -2;
} else if (name.equalsIgnoreCase("diminutive")) {
value = -3;
} else if (name.equalsIgnoreCase("fine")) {
value = -4;
} else if (name.equalsIgnoreCase("large")) {
value = 1;
} else if (name.equalsIgnoreCase("huge")) {
value = 2;
} else if (name.equalsIgnoreCase("gargantuan")) {
value = 3;
} else if (name.equalsIgnoreCase("colossal")) {
value = 4;
} // endif
} // endif
new BigDecimal(value);
} // endwith</script>
</property>
<property name="specialSizeModifier" type="SCRIPT">
<description>Size bonus for special actions like trip and bull rush.</description>
<script>difference * 4</script>
</property>
<property name="sizeModifier" type="SCRIPT">
<description>Size modifier used for AC</description>
<script>if(lt(difference, 0), 1, -1) * floor(2^(abs(difference) - 1))</script>
</property>
</properties>
</property>
Thank you,
-David