Fuel Injection Cruise Control

From Elite Wiki
Revision as of 05:38, 3 August 2018 by Phkb (talk | contribs)

Overview

This OXP adds primable equipment that enables a pilot to engage their fuel injectors in the same way as they can for the torus drive, that is, they can start and stop the injectors by pressing a button, rather than having to hold down the injectors key. For most joystick players this will seem unnecessary, as usually the injectors are assigned to a convenient button which can be pressed at the same time as other buttons. But for keyboard players, holding the down the injector key while attempting to steer the ship or shoot can create some very twisty hand contortions.

Equipment Operations

The "Fuel Injection Cruise Control" equipment item can be purchased from any TL11 system (the same as for standard fuel injectors) for 1150cr. You must have fuel injectors installed in order to purchase this equipment item.

After purchasing, you will need to prime the equipment by pressing "Shift-N", then activating it by pressing "n". You must accelerate to your maximum speed before engaging the equipment. Press the "n" key again to de-activate the cruise control.

Cruise Control can be set to auto-engage when the maximum speed is reached, by priming the equipment and pressing the "b". Using Library Config, you can set a red alert and docking override for this mode, so that in those conditions, setting the speed to maximum will not auto-engage the cruise control, even if the auto-engage is on.

The Fuel Injection cruise control will be automatically turned off in any of these scenarios:

  • The Torus drive is engaged.
  • The normal injectors key is pressed.
  • The player manually reduces speed.
  • The ship runs out of fuel.

Note: If the normal injectors key is pressed while cruise control is active, there will be a brief slowdown while the cruise control is turned off and the normal injector function is activated.

OXP Interfaces

Because this OXP is simulating the injectors, the normal JavaScript property "player.ship.injectorsEngaged" will not return true when the cruise control is engaged. To allow other OXP's to easily determine that the cruise control is on, two properties are now set.

 worldScripts.FuelInjectionCruiseControl._engaged (boolean)
 player.ship.script._ficcEngaged (boolean)

Scripts may check either of these settings to determine whether cruise control is active.

Download

Download FuelInjectionCruiseControl.oxz v0.5 (downloaded 0 times).

Licence

This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 4.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/

Thanks to Damocles Edge for suggesting the equipment in the first place, and to Norby for suggesting some different methods of implementing the solution.

Version History

0.5

  • Acceleration up to injector speed will now vary based on thrust level of ship (ie Asp MkII will accelerate faster than an Anaconda).
  • Pressing injectors key when cruise control is engaged will now avoid the "sliding" issue during transition.
  • Simplified setting of velocity vectors.
  • Improved integration with Surjectors.

0.4

  • Cruise control injector speed is now equivalent to normal injector speed.
  • Fixed issue where "sliding" could occur when slowing down.
  • Slowed acceleration up to injector speed will now only happen if current speed is less than injector speed.
  • Added some flags to allow other OXP's to easily determine when the FICC is engaged.
  • Turning off auto-engage mode when the cruise control is active will now turn off the cruise control as well.
  • Auto-engage mode is now saved between sessions, and can be set with Library Config.
  • Code improvements as suggested by Norby.

0.3

  • Acceleration up to injector speed is now slower, similar to applying injectors normally.
  • Removed debug code.
  • Bug fixes.

0.2

  • Added player message when attempting to engage CC while in Torus drive.
  • Added options to auto-engage CC when max speed attained using mode key (b). Can be disabled in red alert and when docking using Library Config.
  • Made compatible with Q-Charger.
  • Made compatible with Surjectors.

0.1

  • Initial release.

Quick Facts

Levelindicator0.png
0-{{{2}}}

Minimum Oolite versionCPU usage averageMemory usage lowGPU usage lowisConfigurable

Config options available through 'Library'
Version Released License Features Category Author(s) Feedback
0.5 2018-08-03 CC BY-NC-SA 4.0 Fuel Injection Equipment OXPs phkb Oolite BB

Gameplay and Balance indicator

Tag-colour-green.png