I've been playing about with values like maxAftShield and came to wonder how it would relate to shield boosters and military shields...
For example, if standard max shields is 128 and via script I set that to 64 for a player ship, what happens when said ship aquires either of the shield enhhancers?
A. The 68 value remains in place (without additional checks for said pieces of equipment)
B. The enhancements apply a set value for any ship (effectively treating any ship as though it ordinarily had shields of 128)
C. The enhancements apply a muliplier to the 68 value (so the enhancements, like the '68' shields, are at half effect)
D. The enhancements add to the value of 68 (so the base shields remain weaker than normal but the additions just as powerful as on any other ship)
E. Some other outcome
For my purposes, I'd like C to be true, with A, and particlarly B, being the more problematic.
If a ship already has a shield enhancement and I set maxAftShield to 68 am I negating their effects?
Can someone explain it to me please?
Workings of Shield Enhancements
Moderators: winston, another_commander
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Workings of Shield Enhancements
I've just run a quick test on the debug console and it looks like the actual response is D. The effect is additive.
If you have 128 maxAftShield and you set it to 64, then award a shield bosster, maxAftShield jumps to 192, which is consistent with the
Also, if you have already a shield booster and set the value of maxAftShield by script to 64, then the game will do just that. This creates potential for problems, because if the shield booster gets removed or damaged in combat, then 128 points will be deducted from maxAftShield, giving you a negative maximum value with all sort of havoc that will ensue because of that.
If you have 128 maxAftShield and you set it to 64, then award a shield bosster, maxAftShield jumps to 192, which is consistent with the
"oolite_shield_increase" = 128;
key of this equipment in equipment.plist. Also, if you have already a shield booster and set the value of maxAftShield by script to 64, then the game will do just that. This creates potential for problems, because if the shield booster gets removed or damaged in combat, then 128 points will be deducted from maxAftShield, giving you a negative maximum value with all sort of havoc that will ensue because of that.
- Redspear
- ---- E L I T E ----
- Posts: 2689
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Workings of Shield Enhancements
Thanks a_c
Well it could be worse then. I'll have to add some extra checks to my oxp.
Do both miltary shields and shield boosters add 128?
So standard ship with both = 128+128+128 = 384?
Actually, if I just set a shield multiplier instead of a definition then I should be fine, right?
Well it could be worse then. I'll have to add some extra checks to my oxp.
Do both miltary shields and shield boosters add 128?
So standard ship with both = 128+128+128 = 384?
Actually, if I just set a shield multiplier instead of a definition then I should be fine, right?
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
- Redspear
- ---- E L I T E ----
- Posts: 2689
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Workings of Shield Enhancements
Thanks for your time a_c
That meant the rest of my problem is just simple maths.
That meant the rest of my problem is just simple maths.