If you know that you have a lot of modifiers that basically work the same (e.g. “This modifier adds # points to weapon damage”), then you can use a SO definition to create SO instances from that that represent your different modifiers of that type. This could be like:
- “This modifier adds 5 points to weapon damage”
- “This modifier adds 10 points to weapon damage”
- “This modifier adds 15 points to weapon damage”
- “This modifier adds 20 points to weapon damage”
While it may seem strange at first to do this, because in the simpliest of cases your SO definitions only contain one value, think about how you can use them everywhere. You canc reate modifier pools which allow you to select a bunch of modifiers from a predeterminated group of modifiers and so on.
Something that gets a little bit tricky is applying the modifier to a weapon. What if one modifier is a flat bonus, but a different modifier is a percentage bonus? You have to handle different modifiers, well, differently. One solution to this is to give the SO definition the logic on where the modifier affects the weapon. The link provided by @Kurt-Dekker in the previous case shows such an example. Another example can be found here , for instance.