A note on the str() function that is mentioned at the bottom of that page. We have found through experimentation that the first argument must be a string and the second must be the name of an input. It does not seem to work with any other combination of arguments.
But we were able to concatenate two inputs using this form:
str(str("", BaseMode), ImpactHit)
Since str needs the first argument to be a string and str() returns a string, we first use the inner str call to turn BaseMode into a string, then use the outer str() to tack value of ImpactHit onto that.
We used that technique to combine inputs such as having the basemode first followed by the impactHit. So, for instance, we might create animations called warriorDamaged.asq and clericDamaged.asq. That way when different impacts happen, they can vary based on the base mode. Thus, each base mode effectively constitutes a set of common animations, such as melee, dodge, damaged, death, etc. but done in a different style from one base mode to another. When we set the base mode, such as to warrior or cleric, we are setting which animation set that will be used.