Difference between revisions of "Ship Comparison"
(→Download) |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
A new interface screen "Ship Comparisons" allows the details of up to three ships to be displayed. Details included are: |
A new interface screen "Ship Comparisons" allows the details of up to three ships to be displayed. Details included are: |
||
+ | * Price |
||
* Max speed |
* Max speed |
||
* Injector speed |
* Injector speed |
||
* Max thrust |
* Max thrust |
||
− | * Max pitch |
||
+ | * Pitch/roll/yaw |
||
− | * Max roll |
||
− | * Max yaw |
||
* Weapon positions |
* Weapon positions |
||
* Missile pylons |
* Missile pylons |
||
Line 20: | Line 19: | ||
* Ship mass |
* Ship mass |
||
* Equipment space (plus convertible cargo space) |
* Equipment space (plus convertible cargo space) |
||
+ | |||
+ | A menu option, "View standard equipment availability", shows a list of all the standard equipment items, and whether each one is (a) fitted as standard, (b) is available for optional installation, or (c) not available. |
||
+ | The standard equipment items shown are: |
||
+ | * Forward weapon type |
||
+ | * ECM |
||
+ | * Fuel scoops |
||
+ | * Passenger berths |
||
+ | * Energy unit |
||
+ | * Naval energy unit |
||
+ | * Docking computer |
||
+ | * Shield booster |
||
+ | * Military shield enhancement |
||
+ | * Galactic hyperdrive |
||
+ | * Scanner targeting enhancement |
||
+ | * Multi-targeting system |
||
==Overriding Data== |
==Overriding Data== |
||
Line 29: | Line 43: | ||
// add an override for a particular ship data key, giving it a new name |
// add an override for a particular ship data key, giving it a new name |
||
sc._override["noshaders_z_groovy_cobra1_baker_player"] = "Cobra Mark I Special"; |
sc._override["noshaders_z_groovy_cobra1_baker_player"] = "Cobra Mark I Special"; |
||
− | // optionally, if you need to override the extra cargo capacity or the weapon facings, use the following |
||
− | // data element 1 is the additional cargo available for this ship type |
||
− | // (5 in the example) |
||
− | // data element 2 is the weapon facings on this ship type (1 = forward only, 3 = forward and aft, 15 = all) |
||
− | // (15 = All in the example) |
||
− | sc._extraData["Cobra Mark I Special"] = [5, 15]; |
||
} |
} |
||
+ | |||
+ | If a particular ship is not displaying the correct value for additional cargo or for the number of weapon facings, these values can be added to a list of exceptions. To do this, simply add the following line of code to a worldScript: |
||
+ | |||
+ | worldScripts.ShipComparison._extraData["Cobra Mark I Special"] = [5, 15]; |
||
+ | |||
+ | Use the generic ship name when specifying the dictionary key (unless you are updating the details of a specific shipkey). The two values in the array are the extra cargo allocation (5 in the example), and the number of weapon facings (1 = front, 2 = aft, 4 = port, 8 = starboard: 3 means front and aft, 15 means all). |
||
==Installation== |
==Installation== |
||
Line 42: | Line 56: | ||
==Download== |
==Download== |
||
− | Download [[Media:ShipComparison.oxz|ShipComparison.oxz]] |
+ | Download [[Media:ShipComparison.oxz|ShipComparison.oxz]] v2.3 (downloaded {{#downloads:ShipComparison.oxz}} times). |
==License== |
==License== |
||
Line 50: | Line 64: | ||
==Version History== |
==Version History== |
||
+ | 2.3 |
||
+ | * Fixed issue where the equipment space array was continually growing with duplicate entries. |
||
+ | |||
+ | 2.2 |
||
+ | * Further improvements to handling of situation where _oo_shipyard property is not defined for a particular player ship. |
||
+ | |||
+ | 2.1 |
||
+ | * Better handling of situations where the _oo_shipyard property is not defined for a particular player ship. |
||
+ | <div class="mw-collapsible mw-collapsed" data-expandtext="Show older" data-collapsetext="Hide older" style="overflow:auto;"> |
||
+ | 2.0 |
||
+ | * Added ship price to the list of information shown. |
||
+ | * Put pitch, roll and yaw onto 1 line. |
||
+ | * Added new menu option, "View standard equipment availability", which shows which standard equipment items are fitted as standard, available for optional installation, or not available at all. |
||
+ | * Removed requirement to store a value in missionVariables. |
||
+ | * Added option to clear ship list to Library interface. |
||
+ | |||
+ | 1.9 |
||
+ | * Worked out how to get weapon facings and large cargo bay values without needing to create ship objects to test. Should work with all ships, but I have left the override array in place in case exceptions arise in the future. |
||
+ | |||
+ | 1.8 |
||
+ | * Added Cobra Mark IV to list of exceptions. |
||
+ | |||
1.7 |
1.7 |
||
* Changed "==" comparisons to "===" for performance improvements. |
* Changed "==" comparisons to "===" for performance improvements. |
||
Line 82: | Line 118: | ||
1.0 |
1.0 |
||
* Initial release. |
* Initial release. |
||
+ | </div> |
||
==Quick Facts== |
==Quick Facts== |
||
+ | {{OXPLevel|0}}{{IconOXP|ooVersion="1.80"|oxpCPU="Average"|oxpMEM="Low"|oxpGPU="Low"|oxpIsAPI=true|oxpIsDocumented=true|oxpIsConfigurable=true}} |
||
+ | [[Image:IconLib.png|48px|right|link=Library|alt=Config options available through 'Library']] |
||
{{Infobox OXPb| title = ShipComparison.oxz |
{{Infobox OXPb| title = ShipComparison.oxz |
||
− | |version = |
+ | |version = 2.3 |
− | |release = |
+ | |release = 2019-07-15 |
|license = CC BY-NC-SA 4.0 |
|license = CC BY-NC-SA 4.0 |
||
|features = Ship Comparison |
|features = Ship Comparison |
Latest revision as of 13:11, 15 July 2019
Contents
Overview
This OXP aims to help players who are in the market for a new ship by providing a visual, side-by-side comparison of ship specifications.
A new interface screen "Ship Comparisons" allows the details of up to three ships to be displayed. Details included are:
- Price
- Max speed
- Injector speed
- Max thrust
- Pitch/roll/yaw
- Weapon positions
- Missile pylons
- Cargo capacity (plus expansion size)
- Energy banks
- Energy recharge rate
- Hyperspace capable
If Ship Configuration is installed:
- Ship mass
- Equipment space (plus convertible cargo space)
A menu option, "View standard equipment availability", shows a list of all the standard equipment items, and whether each one is (a) fitted as standard, (b) is available for optional installation, or (c) not available. The standard equipment items shown are:
- Forward weapon type
- ECM
- Fuel scoops
- Passenger berths
- Energy unit
- Naval energy unit
- Docking computer
- Shield booster
- Military shield enhancement
- Galactic hyperdrive
- Scanner targeting enhancement
- Multi-targeting system
Overriding Data
If a particular ship needs to have it's own entry, even if it would normally be listed under another ship type, you can override the list entry for that data key. Put this into the startUpComplete routine of your OXP:
var sc = worldScripts.ShipComparison; if (sc) { // add an override for a particular ship data key, giving it a new name sc._override["noshaders_z_groovy_cobra1_baker_player"] = "Cobra Mark I Special"; }
If a particular ship is not displaying the correct value for additional cargo or for the number of weapon facings, these values can be added to a list of exceptions. To do this, simply add the following line of code to a worldScript:
worldScripts.ShipComparison._extraData["Cobra Mark I Special"] = [5, 15];
Use the generic ship name when specifying the dictionary key (unless you are updating the details of a specific shipkey). The two values in the array are the extra cargo allocation (5 in the example), and the number of weapon facings (1 = front, 2 = aft, 4 = port, 8 = starboard: 3 means front and aft, 15 means all).
Installation
Place the 'ShipComparison.oxz' into your 'AddOns' folder and when you start the game, hold down 'Shift' until you see the spinning Cobra.
Alternatively, you can download the expansion using the expansion pack manager in the game itself.
Download
Download ShipComparison.oxz v2.3 (downloaded 2772 times).
License
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/
Balance image from http://simpleicon.com/balance.html
Version History
2.3
- Fixed issue where the equipment space array was continually growing with duplicate entries.
2.2
- Further improvements to handling of situation where _oo_shipyard property is not defined for a particular player ship.
2.1
- Better handling of situations where the _oo_shipyard property is not defined for a particular player ship.
2.0
- Added ship price to the list of information shown.
- Put pitch, roll and yaw onto 1 line.
- Added new menu option, "View standard equipment availability", which shows which standard equipment items are fitted as standard, available for optional installation, or not available at all.
- Removed requirement to store a value in missionVariables.
- Added option to clear ship list to Library interface.
1.9
- Worked out how to get weapon facings and large cargo bay values without needing to create ship objects to test. Should work with all ships, but I have left the override array in place in case exceptions arise in the future.
1.8
- Added Cobra Mark IV to list of exceptions.
1.7
- Changed "==" comparisons to "===" for performance improvements.
- Added ship mass to display (only if "Ship Configuration" OXP v0.3.1 is installed)
- Moved the F4 interface to "Ship Systems", putting it near "Ship Registrations".
1.6
- Fixed Javascript error when attempting to check for script_info objects on ships that don't have any script_info defined.
1.5
- Added ability to hide ships via script info.
1.4
- Added Equipment space from "Ship Configuration" OXP v0.1.0 or later. Only available if that OXP is installed.
- Additional ship data overrides.
1.3
- Added a "+" symbol to extra cargo value to make it clearer it is in addition to the base cargo capacity.
- Additional ship data overrides.
- Added dictionary and code examples to allow OXP's to override ship data for a particular data key.
1.2
- Added cargo expansion size to list of items.
- Fixed issue where missing "weapon_facings" value was not defaulting to the correct value. If any ships has been missed or show up incorrectly just let me know.
- Added a "change scroll direction" function so if you go past the ship you want to can turn around and go back, rather than having to scroll all the way around the list.
1.1
- Fixed issue where some ship definitions were incorrectly showing with "0" missiles.
- Fixed issue where some ship definitions were showing a blank in the cargo capacity field.
- Added code to hide specifications of some ships (classified data and such).
1.0
- Initial release.
Quick Facts
Version | Released | License | Features | Category | Author(s) | Feedback |
---|---|---|---|---|---|---|
2.3 | 2019-07-15 | CC BY-NC-SA 4.0 | Ship Comparison | Misc OXPs | phkb | Oolite BB |