Status of shields, energy and laser temp after a jump
Moderators: winston, another_commander
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Status of shields, energy and laser temp after a jump
One thing that I have noticed is that if you carry out a hyperspace jump to escape a particularly difficult situation i.e shields are low or down, energy levels are low and lasers are overheating when you emerge in the target system the shield and energy levels are still low and the laser temperature high despite some degree of time having passed.
Generally this is not too much of a problem as you can wait until all have recovered however if you are unlucky enough to jump into an ambush with little fuel for your injectors, (if you have any), this can be an issue.
Would it be possible to have shield and energy levels fully restored and lasers fully cooled upon exiting witchspace ?
Generally this is not too much of a problem as you can wait until all have recovered however if you are unlucky enough to jump into an ambush with little fuel for your injectors, (if you have any), this can be an issue.
Would it be possible to have shield and energy levels fully restored and lasers fully cooled upon exiting witchspace ?
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: Status of shields, energy and laser temp after a jump
How much time has passed is a much debated issue. Basically there are two conflicting theories:Shipbuilder wrote:One thing that I have noticed is that if you carry out a hyperspace jump to escape a particularly difficult situation i.e shields are low or down, energy levels are low and lasers are overheating when you emerge in the target system the shield and energy levels are still low and the laser temperature high despite some degree of time having passed.
One school of thought is that the jump actually takes as much time as is indicated by the adjusting clock. To you as the pilot it only looks instantly because you spend the time in witchspace in some sort of suspended animation.
The other school of thought is that from your perspective the jump is indeed instantly, only in the surrounding Ooniverse time has passed, which is why your clock has to be adjusted. Obviously, that would be the same for your ship: no time has passed for it during the jump, therefore the shield and energy status would be exactly the same before and after the jump.
The latter school of thought seems to be reflected in how the game actually works.
If you're asking for an OXP way of doing it, the answers are yes, yes and no. Energy and shield levels can be set by script. The same goes for cabin temperature, which is another indicator that one would expect to be back to normal after a jump. Laser temperature is off-limits for scripts. So this would require you to re-write a part of the game code. The consensus among the developers has been to not do that, because it would pave the way for the frowned-upon laser cooling booster.Shipbuilder wrote:Would it be possible to have shield and energy levels fully restored and lasers fully cooled upon exiting witchspace ?
But the rest is only a few lines of code. Just copy the following into a text file named "script.js", and put it either directly into "AddOns", or into "AddOns/Config", which you may need to create.
Code: Select all
"use strict";
this.name = "restoreEnergyLevels";
this.description = "Script for restoring the player ship's energy levels after each jump";
this.author = "Commander McLane";
this.copyright = "© 2012 Commander McLane";
this.license = "CC-by-nc-sa 3.0";
this.version = "1.0";
this.shipWillExitWitchspace = function()
{
player.ship.energy = player.ship.maxEnergy;
player.ship.forwardShield = player.ship.maxForwardShield;
player.ship.aftShield = player.ship.maxAftShield;
player.ship.temperature = 0.234375;
}
Last edited by Commander McLane on Sat Sep 15, 2012 11:07 am, edited 1 time in total.
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: Status of shields, energy and laser temp after a jump
No problems – Thinking about it this way this makes sense.The other school of thought is that from your perspective the jump is indeed instantly, only in the surrounding Ooniverse time has passed, which is why your clock has to be adjusted. Obviously, that would be the same for your ship: no time has passed for it during the jump, therefore the shield and energy status would be exactly the same before and after the jump. The latter school of thought seems to be reflected in how the game actually works.
I wholeheartedly agree as the development of laser cooling equipment would unbalance the game way too much, making combat very much more risk free which of course it shouldn't be.The consensus among the developers has been to not do that, because it would pave the way for the frowned-upon laser cooling booster.
To be you should always be weighing up whether or not you get involved in a skirmish or try to avoid it (especially if you happen you be carrying a large hold of valuable cargo).
Thanks for your feedback and the code
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Status of shields, energy and laser temp after a jump
That's quite a tempting code snippet, McLane... but it would give me a possibly unfair advantage over any bandits following through my wormhole.Commander McLane wrote:Code: Select all
"use strict"; this.name = "restoreEnergyLevels"; this.description = "Script for restoring the player ship's energy levels after each jump"; this.author = "Commander McLane"; this.copyright = "© 2012 Commander McLane"; this.license = "CC-by-nc-sa 3.0"; this.version = "1.0"; this.shipWillExitWitchspace = function() { player.ship.energy = player.ship.maxEnergy; player.ship.forwardShield = player.ship.maxForwardShield; player.ship.aftShield = player.ship.maxAftShield; player.ship.temperature = 0.234375; }
Still... very tempting indeed! <ponders the passage of time in witchspace>
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!
And any survivors, their debts I will certainly pay. There's always a way!
Re: Status of shields, energy and laser temp after a jump
NPC ships could be scripted with it too, via
this.shipExitedWormhole
.My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Disembodied
- Jedi Spam Assassin
- Posts: 6885
- Joined: Thu Jul 12, 2007 10:54 pm
- Location: Carter's Snort
Re: Status of shields, energy and laser temp after a jump
All will be explained, to nobody's satisfaction, in a new piece of Oolite fiction:Shipbuilder wrote:One thing that I have noticed is that if you carry out a hyperspace jump to escape a particularly difficult situation i.e shields are low or down, energy levels are low and lasers are overheating when you emerge in the target system the shield and energy levels are still low and the laser temperature high despite some degree of time having passed.
Stranglehold
a Captain Hesperus adventure
coming soon to a forum near you ...
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: Status of shields, energy and laser temp after a jump
I could make it still more tempting by addingEl Viejo wrote:That's quite a tempting code snippet, McLane... but it would give me a possibly unfair advantage over any bandits following through my wormhole.
Still... very tempting indeed! <ponders the passage of time in witchspace>
Code: Select all
player.ship.fuel = 7;
(There is of course absolutely no justification whatsoever for this, and I want to make it abundantly clear that I wholeheartedly distance myself from any misguided attempt to create or insert such a shameful piece of code! )
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Status of shields, energy and laser temp after a jump
Yes, that had occured to me too! I'll resist that temptation in its entirety!Commander McLane wrote:Code: Select all
player.ship.fuel = 7;
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!
And any survivors, their debts I will certainly pay. There's always a way!
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: Status of shields, energy and laser temp after a jump
For myself it's actually no temptation at all. I don't jump out of combat situations, so I usually have full shields and energy when I arrive in a new system.
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Status of shields, energy and laser temp after a jump
My 'Testing' ship has magic fuel tanks - very useful for that business. My player ships, never, ever!Commander McLane wrote:Code: Select all
player.ship.fuel = 7;
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Amah
- ---- E L I T E ----
- Posts: 486
- Joined: Tue Aug 28, 2012 8:05 pm
- Location: aboard the Laenina Crowne - Yasen-N class space freighter
- Contact:
Re: Status of shields, energy and laser temp after a jump
just wondering, if one can set a different value player.ship.maxEnergy; as well, without too many sideeffects. Pondering on the idea to make an extra energy bank equipment.
Amah
- about Amah: wiki
- noshaders versions of Griff's extra, alternate ships and accessories: discussion, wiki
- ocpc - customize the player ship: discussion, oxp repository
Re: Status of shields, energy and laser temp after a jump
You can't - maxEnergy is read-onlyAmah wrote:just wondering, if one can set a different value player.ship.maxEnergy; as well, without too many sideeffects. Pondering on the idea to make an extra energy bank equipment.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Amah
- ---- E L I T E ----
- Posts: 486
- Joined: Tue Aug 28, 2012 8:05 pm
- Location: aboard the Laenina Crowne - Yasen-N class space freighter
- Contact:
Re: Status of shields, energy and laser temp after a jump
too bad.. oh well...Thargoid wrote:You can't - maxEnergy is read-onlyAmah wrote:just wondering, if one can set a different value player.ship.maxEnergy; as well, without too many sideeffects. Pondering on the idea to make an extra energy bank equipment.
Amah
- about Amah: wiki
- noshaders versions of Griff's extra, alternate ships and accessories: discussion, wiki
- ocpc - customize the player ship: discussion, oxp repository
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: Status of shields, energy and laser temp after a jump
Hi Amah!Amah wrote:too bad.. oh well...Thargoid wrote:You can't - maxEnergy is read-onlyAmah wrote:just wondering, if one can set a different value player.ship.maxEnergy; as well, without too many sideeffects. Pondering on the idea to make an extra energy bank equipment.
Instead of just wondering by yourself you could get absolute certainty by simply looking it up. Everything about Oolite scripting is well documented and just one click away, in the Oolite JavaScript Reference of the Elite Wiki. Here's all you need to know for instance about the properties an entity (a ship is one of several possible types of entities) can have, and what you can do to them. Scroll down to "energy", and you'll see that it is a "Number (read/write)". Scroll down to "maxEnergy", and you'll see easily that it is a "Number (read-only)".
Voilà. No need to wonder. You can just look it up, and in less time than it takes you to submit a post here on the boards.
Re: Status of shields, energy and laser temp after a jump
However, if all you want is extra energy bars, you can specifically set the n_bars parameter inside the drawEnergyGauge definition. You'll need a custom HUD.plist for that, though...
Not quite as helpful as increasing max energy itself, I know...
Not quite as helpful as increasing max energy itself, I know...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)