How does my Cobra's energy supply work?

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

How does my Cobra's energy supply work?

Post by Cholmondely »

The model would seem to be:

Engines -> Energy Banks/Batteries -> Shields

But how does the Extra Energy Unit fit in? How do the various Grids fit in? etc.

________________________________________________________________________________

Hypothesis:

Engines -> Energy Bus -> Capacitors/Energy Banks -> Shields
  1. The power supply from the engines can be augmented by the Extra Energy Unit & the Naval Energy Unit
    • The Energy Bus can be augmented by the (Civilian) Energy Grid & the Naval Energy Grid (Naval Grid .oxp)
      • The Energy Banks/Batteries are so far unalterable (only ever the same four banks for my Cobra MkIII)
        • The Shields can be augmented by Shield Boosters & Military Shield Enhancement and are tweakable (Shield Cycler.oxp/Shield Equalizer & Capacitors.oxp

        I'm asking because I found this: http://wiki.alioth.net/index.php/Extra_Energy_Unit ambiguous, and this: https://bb.oolite.space/viewtopic.php?f=2&t=17666 a tad too complex to be sure that I understood it properly.

        NB: Has anybody managed to work out how listing works on the BB?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Reval
---- E L I T E ----
---- E L I T E ----
Posts: 402
Joined: Thu Oct 29, 2020 3:14 am
Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.

Re: How does my Cobra's energy supply work?

Post by Reval »

Cholmondely wrote: Sat Nov 21, 2020 6:36 pm
NB: Has anybody managed to work out how listing works on the BB?
phpBB list creation is all laid out quite nicely HERE under 'Generating Lists'.

(Edit: see example in my recent post here.)

As to the Engine->Energy->Shields/Lasers chain, your supposition seems admirably reasonable. That's the way I've usually visualized it, at least. But maybe a dev could elucidate the code-logic for us...

maxEnergy, max(..)Shields (fore or aft), and max(..)ShieldRechargeRate (fore or aft) can each be increased or decreased easily in a JS script, and I assume, for efficacity, they should be modified together.

And tying those to the particular craft's engine-capacity (ie. maxSpeed or maxThrust) is an intriguing and very sensible proposition.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
User avatar
Reval
---- E L I T E ----
---- E L I T E ----
Posts: 402
Joined: Thu Oct 29, 2020 3:14 am
Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.

Re: How does my Cobra's energy supply work?

Post by Reval »

Cholmondely wrote: Sat Nov 21, 2020 6:36 pm
The Energy Banks/Batteries are so far unalterable (only ever the same four banks for my Cobra MkIII)

Further assumption: the fact that any scripted increase in maxEnergy does not show in the HUD doesn't necessarily alter the fact that the increased strength is in effect.

But I'd appreciate a more definite answer to this too... (devs and/or more experienced scripters?)
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: How does my Cobra's energy supply work?

Post by dybal »

Changes in maxEnergy, and energyRechargeRate specially, should not be be done lightly, their effects on game balance are huge - a high energyRechargeRate might make a ship, in practical terms, invulnerable to lasers.

As far as I know, there are no equipments, core game or OXP, that increase maxEnergy (though Ship Configuration might have variations of equipments that do that to an extent). I see energy banks as a user interface fiction, they are the integer number of 64 energy unit blocks that fit in the ship's maxEnergy - I didn't try to increase maxEnergy, but if the change wasn't enough to increase the number of 64-unit blocks there would be no change in the HUD... try increasing by at least 64 and see if the HUD updates the number of energy banks.

energyRechargeRate are increased by Extra Energy Unit and Naval Energy Unit, and increasing the energy recharge rate makes a ship _much_ tougher: I enabled those equipments for NPCs in my Ooniverse and it takes a looong time to whittle down the shield and then the energy of a Mamba with Shield Boosters and EEU enabled using a Beam laser.

Shield strength is modified by Shield Booster and Military Shield Enhancement, each one adds 128 energy units to each of aft and forward shields, but Shield Boosters don't change the default shieldRechargeRate, while Military Shield Enhancement increases it from 2 to 3.

Higher shieldRechargeRate are useful only if the ship has energyRechargeRate to supply it... the standard shieldRecharge rate of 2 would need a ship with energyRechargeRate of 4 to be fulfilled.

Energy Grid and Naval Energy Grid increase shieldRechargeRate if there's a surplus between the ship's energyRechargeRate and its shieldRechargeRate.

The default model, as I see it, would be:

Energy generators -> accumulators (energy banks) -> shields

Extra Energy Unit and Naval Energy Unit are generators, which imply that engines aren't, and there are core game ships with low energy generation and high speed, like the Sidewinder Scout Ship.

In the core game, engines (cruising and Torus, not fuel injectors or wormhole generators) and energy generators are perpetual-motion devices, they work for free.

Now, if you run HardWay OXP, the model changes:

fuel -> energy generators -> energy banks -> shields
fuel -> engines (cruising, Torus and fuel injectors)

If you run out of fuel, you get into emergency mode, running on batteries, and when you run out of stored energy, booom!
Last edited by dybal on Tue Nov 24, 2020 11:54 am, edited 3 times in total.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: How does my Cobra's energy supply work?

Post by Cody »

... try increasing by at least 64 and see if the HUD updates the number of energy banks.
It should - my Cobra's instrument panel shows 5 energy banks.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Reval
---- E L I T E ----
---- E L I T E ----
Posts: 402
Joined: Thu Oct 29, 2020 3:14 am
Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.

Re: How does my Cobra's energy supply work?

Post by Reval »

I do believe that's just the in-depth, veteran answer we were searching for - so thanks again, dybal :)

But let's just see if I understood aright: in the case of maxEnergy, you're telling us that the extra energy won't show in the HUD until it's been increased by at least 64 units? (testing on a Sidewinder in my E.T. OXP, I'm incrementing player's energy by 1 on each successful trade, and the SW starts off with something like 204, with three bars in the HUD... so I guess one wouldn't get another bar until 64 trades have been made?)
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: How does my Cobra's energy supply work?

Post by dybal »

Reval wrote: Sun Nov 22, 2020 4:04 pm
I do believe that's just the in-depth, veteran answer we were searching for - so thanks again, dybal :)

But let's just see if I understood aright: in the case of maxEnergy, you're telling us that the extra energy won't show in the HUD until it's been increased by at least 64 units?
More or less.. if maxEnergy was 127, increasing by one would reach 2 energy banks and it might increase the number of energy banks in the HUD
Reval wrote: Sun Nov 22, 2020 4:04 pm
(testing on a Sidewinder in my E.T. OXP, I'm incrementing player's energy by 1 on each successful trade, and the SW starts off with something like 204, with three bars in the HUD... so I guess one wouldn't get another bar until 64 trades have been made?)
Something like 52 trades, so maxEnergy gets to 256, 4 full banks.

But that's only the visual feedback in the HUD... the ship will have had that extra energy capacity along the way.
User avatar
Reval
---- E L I T E ----
---- E L I T E ----
Posts: 402
Joined: Thu Oct 29, 2020 3:14 am
Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.

Re: How does my Cobra's energy supply work?

Post by Reval »

OK, and slightly off-topic: is it possible to increase any of these key ship properties by a fraction - say 0.5 instead of 1? I'm still confused as to whether these numbers are being treated as integers or not...

I was thinking that in the case of shieldRechargeRate it might be more sensible to do it by smaller amounts, in the light of what you have explained to us.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: How does my Cobra's energy supply work?

Post by dybal »

Reval wrote: Sun Nov 22, 2020 4:53 pm
OK, and slightly off-topic: is it possible to increase any of these key ship properties by a fraction - say 0.5 instead of 1? I'm still confused as to whether these numbers are being treated as integers or not...

I was thinking that in the case of shieldRechargeRate it might be more sensible to do it by smaller amounts, in the light of what you have explained to us.
Yes, it is, they are float
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: How does my Cobra's energy supply work?

Post by dybal »

Reval wrote: Sun Nov 22, 2020 4:53 pm
OK, and slightly off-topic: is it possible to increase any of these key ship properties by a fraction - say 0.5 instead of 1? I'm still confused as to whether these numbers are being treated as integers or not...

I was thinking that in the case of shieldRechargeRate it might be more sensible to do it by smaller amounts, in the light of what you have explained to us.
Yes, it is, they are float.

And an increase of 1 unit in recharge, be it energy of shield, is hughe in its effects
User avatar
Reval
---- E L I T E ----
---- E L I T E ----
Posts: 402
Joined: Thu Oct 29, 2020 3:14 am
Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.

Re: How does my Cobra's energy supply work?

Post by Reval »

Understood. So what sorts of increments for thes sensitive properties would you personally use? (per trading round, that is).
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: How does my Cobra's energy supply work?

Post by dybal »

Reval wrote: Sun Nov 22, 2020 5:00 pm
Understood. So what sorts of increments for thes sensitive properties would you personally use? (per trading round, that is).
For recharge, 0.01

A hundred rewarded trades to get a full recharge point.

And I would put a cap in the total recharge rewards: no more than 50% of the original recharge.
User avatar
Reval
---- E L I T E ----
---- E L I T E ----
Posts: 402
Joined: Thu Oct 29, 2020 3:14 am
Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.

Re: How does my Cobra's energy supply work?

Post by Reval »

And how about maxForwardShield? - there are no guidelines in shipdata.plist, where shield strength is simply never noted...
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: How does my Cobra's energy supply work?

Post by dybal »

Reval wrote: Sun Nov 22, 2020 5:59 pm
And how about maxForwardShield? - there are no guidelines in shipdata.plist, where shield strength is simply never noted...
I would use Shield Booster and Military Shield Booster as guidelines for max<Position>Shield:

default shields: 128
default + Shield Boosters: 256
default + Military Shield Enhancement: 256
default + Shield Boosters + Military Shield Enhancement: 384

I would put a cap in the total reward (say, 128), then divide that max total reward by the number of "steps" you want the trader to do to get there before the rewards flat out.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: How does my Cobra's energy supply work?

Post by dybal »

And I would make around 10~15 steps until the rewards top out, give names for those ranks of traders, and make the rewards greater as the trader climbs the ladder (i.e., the first step would give an increase in 5 point in shields, the second give 8,..., the last give 20)
Post Reply