Spell icon order and visibility should rely on the earliest applied effect
In all the releases that had spell icons implemented, the order of spell icons was controlled by the order of internal numeric effect IDs (this loosely correlated with effect schools, but not really). After recent magic effect dehardcoding preparation work the sorting became alphabetic, reliant on the internal string IDs.
Neither approaches are acceptable. Morrowind appears to use the order in which effects were applied, using the earliest instance to place the icon. Morrowind also calculates the icon's transparency based on the first instance's duration, even if the overall effect will remain active when the first effect expires.
For example:
- Cast First Barrier
- Cast Water Walking
- Cast Second Barrier
Watch the icons as you do these actions and keep track of the durations (though in Morrowind this isn't possible).
Current behavior:
- Shield icon is added
- Water walking icon is added
- Shield icon remains where it is (the second effect appears in the tooltip)
- When the first Shield expires, its icon remains in place (doesn't fade out)
Original behavior
- unchanged
- unchanged
- unchanged
- When the first Shield is about to expire, its icon will fade out then move to the right
Now try this:
- Cast Water Walking
- Cast First Barrier
Current behavior:
- Water walking icon is added
- Shield icon is added before the water walking icon
Original behavior:
- Water walking icon is added
- Shield icon is added after the water walking icon
Note in 0.50.0 the fixed order of Shield and Water Walking is swapped, so you'll want to do the above tests in the other order and have two different water walking spells. Note also that this expects you not to have any other effects active as then the differences would be more obvious depending on the exact other effects you have.
The original behavior was too complicated to copy in 2013's magic system, but now we can do better.