ive added some new features to armor.tbl. features include new calculation types, storage locations, and the ability to set where difficulty is applied in relation to calculations (fixes 2493 and possibly 2494).
ive added the following calculation types to the system
+calculation: does this
cap if damage is greater than +value:, damage = +value:
instant cap if damage is greater than +value:, damage = +value: and calculations stop
set damage = +value:
load damage = number in storage location +Value: (may be between 0 and 7 right now, anything more or less will cause a warning), storage locations default to 0 if no values are stored there;
store current damage is stored in storage location +Value: (0-7), does not change damage. storage locations are only persistent for the duration of an armor calculation
random random number between damage and +value:
you can use these instead of +value: (you have to use one of the 3, but you cant use more than one) on most calculation types
+stored value: # of storage location (0-7). this lets you use a stored value in place of an explicit value for a calculation
+constant: lets you choose one of several internally defined values in place of +value:
base damage -damage before calculations are done (this happens after difficulty scaling if set to happen first)
current damage -the current damage value
difficulty factor -the current difficulty factor, by default 0.2 (easy) to 1(insane)
random -random number between 0 and 1
pi -3.14159... not sure what you'd use it for though
you can set where difficulty is computed on a per damage type basis with (this goes after +Weapon Piercing Type:)
+Difficulty Scale Type: first, last, manual (default is first)
things to look for:
make sure computations work
thoroughly test load and store operations
test invalid indices (should throw an appropriate warning)
make sure you cant use +stored value: with load/store calculation types (i debated whether or not to make this a feature, and decided it was better if it wasnt)
check status of mantis issue 2494 (shield armor no work for player) with this build
make sure i didnt break the game's damage mechanicsnote that i haven't had a chance to test this yet.
*edit*
i fixed some bugs and uploaded a new patch, but due to an unrelated issue i cannot make any new builds at the moment
*edit again*
latest builds here[attachment deleted by ninja]