Energy Rebalance

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
stranger
Deadly
Deadly
Posts: 147
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Energy Rebalance

Post by stranger » Tue Apr 10, 2018 3:46 am

Energy Rebalance
Latest OXZ - Version 0.3.0
Uploaded 28 February 2019

Energy Rebalance (Ship Configuration Compatible) aka Energy Rebalance SCC (modification made by phkb)
Latest OXZ - Version 0.2.0
Uploaded 28 February 2019

This OXP rebalances energy between shields and energy banks. If forward/aft shield level dropped below 25% of max capacity under fire, energy from banks is transferred directly onto shield in question, preventing damage of equipment and cargo, until energy banks are drained under 64 units.
If energy level drops below critical 32 unit level, energy transfer switches back from remaining shields to energy bank.
Well, Energy Rebalance looks as extremely simplified and fully automated "lite" version of Shield Cycler (author Lone_Wolf), but it is not equipment upgrade. It is redefined game mechanics.

Dependencies:

Energy Rebalance OXP requires Breakable Shield Generators & Breakable Energy Unit (author Capt Murphy).
Energy Rebalance SCC OXP requires Ship Configuration (author phkb).

Conflicts:

Energy Rebalance OXP is incompatible with Shield Equaliser+Capacitors (author CommonSense OTB) and with Shield Cycler / Shield Cycler Next (author Lone_Wolf).
It is also incompatible with Ship Configuration (author phkb). Use Energy Rebalance SCC in this case.

Credits:

Shield Cycler / Shield Cycler Next (author Lone_Wolf) - clear formulation of problem with energy damage and working way for fixing it.
IronHide (author Thargoid) - some code tricks (not included onto final code, but very helpful in testing of some ideas).
phkb - editing Energy Rebalance to adopt for Ship Configuration.
Last edited by stranger on Thu Feb 28, 2019 9:52 pm, edited 4 times in total.

User avatar
phkb
Commodore
Commodore
Posts: 2415
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Energy Rebalance

Post by phkb » Tue Apr 10, 2018 6:18 am

stranger wrote: It is also incompatible with Ship Configuration (author phkb).
It looks like it wouldn't be hard to add compatibility with Ship Config. I'll see if I can put a small code snippet together.

User avatar
stranger
Deadly
Deadly
Posts: 147
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Energy Rebalance

Post by stranger » Tue Apr 10, 2018 6:28 am

phkb wrote:
Tue Apr 10, 2018 6:18 am
stranger wrote: It is also incompatible with Ship Configuration (author phkb).
It looks like it wouldn't be hard to add compatibility with Ship Config. I'll see if I can put a small code snippet together.
Nice! Ship Configuration seems a bit complicated for me, but it is very interesting project. I like idea of equipment bay with limited capacity.

User avatar
stranger
Deadly
Deadly
Posts: 147
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Energy Rebalance

Post by stranger » Tue May 08, 2018 6:34 am

Energy Rebalance OXP is presented in two versions now:

Energy Rebalance OXP in initial variant - dependent on Breakable Equipment and incompatible with Ship Configuration.
Energy Rebalance SCC (rewritten by phkb) - compatible with Ship Configuration. Thanks, phkb, for adopted SCC variant and sorry for such long delay!

jackiebean
Dangerous
Dangerous
Posts: 109
Joined: Wed Jan 18, 2017 2:01 pm

Re: Energy Rebalance

Post by jackiebean » Tue May 08, 2018 1:34 pm

sounds really cool. i wonder if someone will come up with crew variables for how well the energy rebalance behaves? not having an actual crew for some ships makes it a lot harder to handle all the crew stations, so something like your energy rebalance is very welcome.

User avatar
stranger
Deadly
Deadly
Posts: 147
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Energy Rebalance

Post by stranger » Tue May 08, 2018 10:43 pm

jackiebean wrote:
Tue May 08, 2018 1:34 pm
i wonder if someone will come up with crew variables for how well the energy rebalance behaves?
Simulating crew is interesting idea and there are some tricks to do it. There are some pros and cons affecting gameplay also. I think it deserves separate discussion.

User avatar
stranger
Deadly
Deadly
Posts: 147
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Energy Rebalance

Post by stranger » Thu Feb 28, 2019 10:08 pm

In both versions of Energy Rebalance added new feature. If energy level drops below critical 32 unit level, energy transfer switches back from remaining shields to energy banks.

Just for clarity: Energy Rebalance compensates only energy damage (laser hits and missile blasts). It will not compensate shield level drop caused by collision.

User avatar
stranger
Deadly
Deadly
Posts: 147
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Energy Rebalance

Post by stranger » Thu Feb 28, 2019 11:48 pm

Extract from latest.log demonstrating how it works.

Modelled situation. Launched from Coriolis and open fire to nav beacon. You all know following events :mrgreen:
Having laser fire from six o'clock.

Without Energy Rebalance

Taking aft shield damage

Code: Select all

06:19:44.251 [LogEvents]: attacked by GalCop Viper 3793 128+128 shield and 256 energy left
06:19:44.254 [LogEvents]: taking shield damage from GalCop Viper 3793 128+122 shield and 256 energy left
06:19:44.256 [LogEvents]: attacked by GalCop Viper 3793 128+122 shield and 256 energy left
06:19:44.257 [LogEvents]: taking shield damage from GalCop Viper 3793 128+116 shield and 256 energy left
...
06:19:45.302 [LogEvents]: attacked by GalCop Viper 3793 128+16 shield and 256 energy left
06:19:45.303 [LogEvents]: taking shield damage from GalCop Viper 3793 128+10 shield and 256 energy left
06:19:45.432 [LogEvents]: attacked by GalCop Viper 3793 128+10 shield and 256 energy left
06:19:45.434 [LogEvents]: taking shield damage from GalCop Viper 3793 128+4 shield and 256 energy left
Aft shield depleted. Taking direct energy damage.

Code: Select all

06:19:45.435 [LogEvents]: attacked by GalCop Viper 3793 128+4 shield and 256 energy left
06:19:45.437 [LogEvents]: taking 2 energy damage from GalCop Viper 3793 128+0 shield and 254 energy left
06:19:45.532 [LogEvents]: attacked by GalCop Viper 3793 128+0 shield and 255 energy left
06:19:45.534 [LogEvents]: taking 6 energy damage from GalCop Viper 3793 128+0 shield and 249 energy left
...
06:19:48.059 [LogEvents]: attacked by GalCop Viper 3793 128+0 shield and 7 energy left
06:19:48.060 [LogEvents]: taking 6 energy damage from GalCop Viper 3793 128+0 shield and 1 energy left
06:19:48.192 [LogEvents]: attacked by GalCop Viper 3793 128+0 shield and 1 energy left
06:19:48.194 [LogEvents]: taking 6 energy damage from GalCop Viper 3793 128+0 shield and -5 energy left
06:19:48.195 [LogEvents]: got energy damage from GalCop Viper 3793 and died!
BANG!

Now with Energy Rebalance.

Taking aft shield damage

Code: Select all

06:24:35.830 [LogEvents]: attacked by GalCop Viper 17849 128+128 shield and 256 energy left
06:24:35.832 [LogEvents]: taking shield damage from GalCop Viper 17849 128+122 shield and 256 energy left
06:24:35.833 [LogEvents]: attacked by GalCop Viper 17849 128+122 shield and 256 energy left
06:24:35.834 [LogEvents]: taking shield damage from GalCop Viper 17849 128+116 shield and 256 energy left
...
06:24:36.624 [LogEvents]: attacked by GalCop Viper 17849 128+40 shield and 256 energy left
06:24:36.625 [LogEvents]: taking shield damage from GalCop Viper 17849 128+34 shield and 256 energy left
06:24:36.721 [LogEvents]: attacked by GalCop Viper 17849 128+34 shield and 256 energy left
06:24:36.723 [LogEvents]: taking shield damage from GalCop Viper 17849 128+28 shield and 256 energy left
Aft shield level drops below 32. Starting energy transfer to stabilize aft shield.

Code: Select all

06:24:36.725 [LogEvents]: attacked by GalCop Viper 17849 128+32 shield and 252 energy left
06:24:36.726 [LogEvents]: taking shield damage from GalCop Viper 17849 128+26 shield and 252 energy left
06:24:36.851 [LogEvents]: attacked by GalCop Viper 17849 128+32 shield and 246 energy left
06:24:36.852 [LogEvents]: taking shield damage from GalCop Viper 17849 128+26 shield and 246 energy left
...
06:24:38.531 [LogEvents]: attacked by GalCop Viper 17849 128+32 shield and 73 energy left
06:24:38.532 [LogEvents]: taking shield damage from GalCop Viper 17849 128+26 shield and 73 energy left
06:24:38.533 [LogEvents]: attacked by GalCop Viper 17849 128+32 shield and 67 energy left
06:24:38.535 [LogEvents]: taking shield damage from GalCop Viper 17849 128+26 shield and 67 energy left
Energy drops below 64. Energy transfer aborted.

Code: Select all

06:24:38.645 [LogEvents]: attacked by GalCop Viper 17849 128+32 shield and 61 energy left
06:24:38.647 [LogEvents]: taking shield damage from GalCop Viper 17849 128+26 shield and 61 energy left
06:24:38.648 [LogEvents]: attacked by GalCop Viper 17849 128+26 shield and 61 energy left
06:24:38.649 [LogEvents]: taking shield damage from GalCop Viper 17849 128+20 shield and 61 energy left
...
06:24:38.754 [LogEvents]: attacked by GalCop Viper 17849 128+14 shield and 62 energy left
06:24:38.755 [LogEvents]: taking shield damage from GalCop Viper 17849 128+8 shield and 62 energy left
06:24:38.885 [LogEvents]: attacked by GalCop Viper 17849 128+9 shield and 62 energy left
06:24:38.887 [LogEvents]: taking shield damage from GalCop Viper 17849 128+3 shield and 62 energy left
Aft shield depleted. Taking energy damage.

Code: Select all

06:24:38.889 [LogEvents]: attacked by GalCop Viper 17849 128+3 shield and 62 energy left
06:24:38.890 [LogEvents]: taking 3 energy damage from GalCop Viper 17849 128+0 shield and 58 energy left
06:24:38.986 [LogEvents]: attacked by GalCop Viper 17849 128+0 shield and 59 energy left
06:24:38.987 [LogEvents]: taking 6 energy damage from GalCop Viper 17849 128+0 shield and 53 energy left
...
06:24:39.125 [LogEvents]: attacked by GalCop Viper 17849 128+0 shield and 41 energy left
06:24:39.127 [LogEvents]: taking 6 energy damage from GalCop Viper 17849 128+0 shield and 35 energy left
06:24:39.230 [LogEvents]: attacked by GalCop Viper 17849 128+0 shield and 36 energy left
06:24:39.232 [LogEvents]: taking 6 energy damage from GalCop Viper 17849 128+0 shield and 30 energy left
Energy drops below 32. Critical alert. Last hope - transfer energy from remaining forward shield.

Code: Select all

06:24:39.233 [LogEvents]: attacked by GalCop Viper 17849 112+0 shield and 46 energy left
06:24:39.234 [LogEvents]: taking 6 energy damage from GalCop Viper 17849 112+0 shield and 40 energy left
06:24:39.336 [LogEvents]: attacked by GalCop Viper 17849 112+0 shield and 40 energy left
06:24:39.338 [LogEvents]: taking 6 energy damage from GalCop Viper 17849 112+0 shield and 34 energy left
...
06:24:40.198 [LogEvents]: attacked by GalCop Viper 17849 34+0 shield and 37 energy left
06:24:40.200 [LogEvents]: taking 6 energy damage from GalCop Viper 17849 34+0 shield and 31 energy left
06:24:40.201 [LogEvents]: attacked by GalCop Viper 17849 18+0 shield and 47 energy left
06:24:40.202 [LogEvents]: taking 6 energy damage from GalCop Viper 17849 18+0 shield and 41 energy left
Galcop Viper 17849 taking lunch break. 15 seconds later his teammate 16279 continue his work. Nothing personal, it's business.

Code: Select all

06:24:54.639 [LogEvents]: attacked by GalCop Viper 16279 47+0 shield and 41 energy left
06:24:54.641 [LogEvents]: taking 6 energy damage from GalCop Viper 16279 47+0 shield and 36 energy left
06:24:54.642 [LogEvents]: attacked by GalCop Viper 16279 47+0 shield and 36 energy left
06:24:54.643 [LogEvents]: taking 6 energy damage from GalCop Viper 16279 47+0 shield and 30 energy left
...
06:24:54.955 [LogEvents]: attacked by GalCop Viper 16279 15+0 shield and 38 energy left
06:24:54.956 [LogEvents]: taking 6 energy damage from GalCop Viper 16279 15+0 shield and 32 energy left
06:24:54.957 [LogEvents]: attacked by GalCop Viper 16279 15+0 shield and 32 energy left
06:24:54.958 [LogEvents]: taking 6 energy damage from GalCop Viper 16279 15+0 shield and 26 energy left
Forward shield depleted. Final phase.

Code: Select all

06:24:55.069 [LogEvents]: attacked by GalCop Viper 16279 0+0 shield and 42 energy left
06:24:55.071 [LogEvents]: taking 6 energy damage from GalCop Viper 16279 0+0 shield and 36 energy left
06:24:55.073 [LogEvents]: attacked by GalCop Viper 16279 0+0 shield and 36 energy left
06:24:55.074 [LogEvents]: taking 6 energy damage from GalCop Viper 16279 0+0 shield and 30 energy left
...
06:24:55.456 [LogEvents]: attacked by GalCop Viper 16279 0+0 shield and 7 energy left
06:24:55.458 [LogEvents]: taking 6 energy damage from GalCop Viper 16279 0+0 shield and 1 energy left
06:24:55.462 [LogEvents]: attacked by GalCop Viper 16279 0+0 shield and 1 energy left
06:24:55.463 [LogEvents]: taking 6 energy damage from GalCop Viper 16279 0+0 shield and -5 energy left
06:24:55.465 [LogEvents]: got energy damage from GalCop Viper 16279 and died!
It is testing situation. No any evasive maneuvers. In real combat you'll have good chance to take heavy fire and break contact without shield loss and equipment damage due to direct energy damage.
Energy capacity really matters now. Without energy rebalance you'll have only 1.2 s of military laser fire before shield collapse. Having energy rebalance you have 3.0 s safe exposure for your Cobra Mk III without upgrades.

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1343
Joined: Thu Jun 20, 2013 10:22 pm

Re: Energy Rebalance

Post by Redspear » Fri Mar 01, 2019 11:03 am

Interesting...
I look forward to trying it out. Thanks :D
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

User avatar
stranger
Deadly
Deadly
Posts: 147
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Energy Rebalance

Post by stranger » Fri Mar 01, 2019 11:58 am

@Redspear

Are you using Ship Configuration? It will be nice to have feedback for Energy Rebalance SCC too.

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1343
Joined: Thu Jun 20, 2013 10:22 pm

Re: Energy Rebalance

Post by Redspear » Fri Mar 01, 2019 12:40 pm

No, sorry... It's a very fine oxp just a bit too much 'accountancy' for my tastes. 10-15 years ago it probably would have been one of my favourites.

Besides, I've been updating Equipment by Ship Class - long overdue and simpler approach to the same idea. Less ambitious and much more clumsily coded :P
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

Post Reply