Flexible status attributes

I see a lot of people asking for help with status attributes, and for any use but the most basic the answer is to use a changescript. And I had a thought; that if a whole bunch of new users expect a system to work a certain way, we could make it work that way.

Now, this is pretty inefficient. But here's something that I thought about off the top of my head:

  <function name="AddStatusAttributesForElement" parameters="status, element, statusAttributes" type="string">
    if (not statusAttributes = null) {
      params = NewDictionary()
      foreach (attr, GetAttributeNames (element, true)) {
        dictionary add (params, attr, GetAttribute (element, attr))
      foreach (attr, statusAttributes) {
        list add (status, FormatStatusAttribute(attr, eval (attr, params), StringDictionaryItem(statusAttributes, attr)))

Now, for the key of the statusattributes dictionary, it doesn't have to be just an attribute name. You could have something like currenthp + "/" + maxhp as the variable name for a status attribute, or even have status attributes tied to function calls rather than attributes.

This topic is now closed. Topics are closed after 60 days of inactivity.