| An image I found at media.moddb.com. It shows how well Supreme Commander rendered shields - transparent but still has a shape and electromagnetic like properties. |
I just got the "Bubble Shield" working the other week. It took a huge overhaul of the way items work. I implemented an "interceptor" style framework that works like this:
- Interceptors will be called in a filter chain fashion (invoking each one in order and then returning back through the chain).
- Interceptors will be collected in a list when an item is used from the actor (user of the item), board (the environment around the actor), and the target (the one to use the item on).
- Typically interceptors will provide:
- Actor: Time, Update on Use
- Board: Line of Sight, Range Check, Console, Audio, Accuracy
- Target: Damage Modifiers, Health
- Interceptors can be injected or modified to add additional functionality for mods.
- Interceptors usually modify an "invocation" object instead of the actual items or units. This allows things like shields to reduce the damage before it is calculated in the target's health. Cloning the item might also be another good approach.
![]() |
| 1st implementation of a "Scottonian" Bubble Shield. |
The basic factors for creating a shield can be narrowed down to:
- cost per turn - The time units used while shield is active.
- cost per activation - Time units used to activate the shield.
- charge time - Time it take for the shield to become active.
- activation time - How low the shield will remain active.
- damage - How much damage the shield can absorb.
- in/out probability - The probability of damage to the item's wearer and how much accuracy is changed while the shield is active.
For now, the "Scottonian" bubble shield behaves as follows:
- cost per activation = 5
- charge time = 2
- activation time = 4
- damage = 2
The shield is a damage modifier, so damage is first subtracted from the shield and the remainder is passed to the target.



