Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualDrEvil

Posted 21 August 2013 - 06:14 PM

I would probably simplify the effects so that you can put together discreet stages of effect modifications where the order doesn't matter, ie so the math is communative and easy to understand, sort of a series of accumulations and applications in stages. The key I think is a sensible ordering of the calculations with an ordering that makes sense to the player.

 

For example.

  1. Take input list of effects, such as list of damage types
  2. Transform effect types to other effects so they will be treated as though they are the transformed effect
  3. Accumulate all damage together, keeping them separated by type still(fire, arcane, magic, physical, etc), you can also accumulate healing effects as well during this loop.
  4. Apply healing modification effects to healing values.
  5. Apply total healing to the character so that the healing comes before the damage to offset the damage if you so desire. Alternately you could split healing effects into pre-heal and post-heal to modify this order for certain cases, or treat post heals as tiny delay/duration regeneration.
  6. With the accumulated damage per type, apply damage modifiers that apply to each type, (fire resistance will reduce the fire damage only, etc)
  7. Accumulate damage modifiers together and apply them to the characters health.

 

If I were building an effect heavy system I would probably treat everything as an effect that goes through this pipeline. It wouldn't be just the spell effects that go through this, but also the protection levels of armor would be represented as an effect on the list.

 

Start with something simple and easy to follow and worry about the complex order issues when you actually run into a problem creating an effect that maybe you can't with this. At that point it will be easier to understand what and where you have to plug in some new 'features' to get what you need.


#1DrEvil

Posted 21 August 2013 - 06:13 PM

I would probably simplify the effects so that you can put together discreet stages of effect modifications where the order doesn't matter, ie so the math is communative and easy to understand. The key I think is a sensible ordering of the calculations.

For example.

 

  1. Take input list of effects, such as list of damage types
  2. Transform effect types to other effects so they will be treated as though they are the transformed effect
  3. Accumulate all damage together, keeping them separated by type still(fire, arcane, magic, physical, etc), you can also accumulate healing effects as well during this loop.
  4. Apply healing modification effects to healing values.
  5. Apply total healing to the character so that the healing comes before the damage to offset the damage if you so desire. Alternately you could split healing effects into pre-heal and post-heal to modify this order for certain cases, or treat post heals as tiny delay/duration regeneration.
  6. With the accumulated damage per type, apply damage modifiers that apply to each type, (fire resistance will reduce the fire damage only, etc)
  7. Accumulate damage modifiers together and apply them to the characters health.

 

If I were building an effect heavy system I would probably treat everything as an effect that goes through this pipeline. It wouldn't be just the spell effects that go through this, but also the protection levels of armor would be represented as an effect on the list.

 

Start with something simple and easy to follow and worry about the complex order issues when you actually run into a problem creating an effect that maybe you can't with this. At that point it will be easier to understand what and where you have to plug in some new 'features' to get what you need.


PARTNERS