seems wmc was nice to me and left step by step instructions to adding damage types in the code, looks like i may be able to add some of that stuff. i still dont know how easily i will be able to substitute +value: tags with constants. but i can at least make the system a bit more versatile.
*edit*
looks like load and store operations are trivial
*edit again*
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 an assert), 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
add_random ;creates a random number between 0 and +value: and adds it to the damage. (negative numbers result in subtraction)multiply_random ;if +value: is positive, creates a random number between 0 and +value: and multiplies it with damage. if +value is negative, creates a random number between +value: * -1 and 1.random ;random number between damage and +value:
(not available in this patch/build)apply difficulty ;applies difficulty in one of two ways. if value is 0 or less, it will multiply damage by difficulty scaling factor, otherwise it will replace damage with the scaling factor (useful if youve stored damage)
you can use this instead of value (you have to use one or the other but not both)
+stored value: ;# of storage location. this lets you use a stored value in place of an explicit value
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)
patch added, builds uploading. so far i havent tested it.
*edit yet again*
*builds updated*
builds availablethings to look for:
make sure computations work
thoroughly test load and store operations
test invalid indices (should throw
assert 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)
make sure i didnt break the game's damage mechanicslol, my patch is pi kb
*patch removed, see below for a newer one*