Library.OXP

From Elite Wiki
Revision as of 01:34, 19 November 2021 by Cholmondely (talk | contribs) (Tools: Tweaks)
Disambiguation:

Oolite abounds with libraries!

Are you looking for • A Library in the programmer's sense: reusable code that people writing OXPs can use. That is to say instead of everyone writing a javascript method to land on a planet, one person does so and everyone else uses that: ::*Library.oxp - see below on this page ::*Cabal Common Library.oxp • A library of books or of ship/station descriptions: ::*Ship Library on the starting game screen - descriptions of ships, stations, asteroids and missiles mostly from the Vanilla game ::*View Ship Specifications - as above, but on the F4/4 Ship-Station Interface screen when docked ::*Gallery OXP does something similar to the above but with all encountered items ::*Technical Reference Library OXP - similar to Gallery but includes non-encountered ships. ::*Ship's Library OXP: by Cim (with the Ship's Manual; a half-dozen library books are addable) The last four are accessed through the F4/4 Ship-Station Interface screen when docked - all under Ship Systems

IconLib.png
Animator
PAD: GalCop
PAD: Persons
PAD: Player data
Starmap

Overview

Reinventing the wheel is not everybody's taste, so here comes a collection of useful snippets and helpers. Its main purpose is to simplify or unify some common tasks used by OXPers. Library is the successor to CCL, Hyperradio and OXPConfig. The library does not alter any native JS objects (like Array or String) to avoid clashes and does not clutter the global namespace.

This oxp also adds the following items to the F4 ship-station interface page

  • Config for AddOns (AddOns category) - for tweaking OXPs
  • PAD (Captain's Log category) - a personal assistance device with details of naval career, people met, etc.

The P.A.D. (or Personal Assistance Device) ships functionality to display different sorts of data, sorted by categories. Every category may contain several pages (or subcategories) - which can also be implemented by AddOns. What I do have right now are categories for

GALCOP: A standard entry, but after doing specific jobs it will contain an entry for the Navy as well. Other AddOns may add more.
GUILDS: An empty entry at the moment. Could be used e.g. by RandomHits, Feudal States and other AddOns which do have a membership.
INFOS: A category for special events, news, etc. Could be useful e.g. for BloombergMarkets, etc.
LOGBOOK: A category for standard events like rescued escape pods, bailed out, fined, etc. Could be used for contracts as well.
PERSONS: A category for characters you have met.
SYSTEMS: A category for special systems like Tianve, Tionisla, etc.
SEARCH
PLAYER DATA

The PAD also ships with search functionality and some categories do allow the player to add custom notes. The display of these pages is based on templates, so all pages in a category will have the same layout. AddOns can add data easily to existing pages or add a new page in existing categories. Another feature is to set player specific data, like origin, species, gender, age and a custom picture.

Note: there are several oxp's that allow for configuring other oxp's:

  • Library (the most recent, done via the F4 page when docked) by Svengali
  • OXPConfig (done via the F2 page - press F7 when told to) by Svengali
  • Station Options by cag: this one is comprehensible, but alas, only a beta version (2018)

Features

For Documentation just follow the links.

  • Lib_2DCollision.js - Methods for checking if point is in bounding-box, on line or in poly.
  • Lib_Animator.js - Tool to create animations on missionscreens (see Demos).
  • Lib_BinSearch.js - Instantiated search tree.
  • Lib_Config.js - Configuration interface for AddOns.
  • Lib_Crypt.js - De-/Encryption for strings.
  • Lib_GUI.js - Unified GUI image, sound and music handling.
  • Lib_Main.js - Generic functions for various tasks.
  • Lib_Music.js - Unified event driven and generic music handling (see Demos).
  • Lib_PAD.js - Unified logbook, mission-log, diary and interface. Added in v1.7
  • Lib_Starmap.js - In-System-Maps in 3D (docked and inflight) (see Demos). Added in v1.7

ID

identifier = "oolite.oxp.Svengali.Library";

Requirements

  • Latest version needs Oolite v1.88.

Download

Install like any other OXP.

Demos

Install like any other OXP.

Tools

There are two tools tucked away in diverse locations:

See here for description re shaders etc. (2 pages, 2018).
On your F4 screen (if you have Library running too) under "Developer":

Lib MatFinder Pos01.png Lib MatFinder Pos02.png Lib MatFinder.png


On starting a game (if you have Library running too):

Library devtools switches.png Library devtools.png Library devtools.values.png

On your F4 screen (if you have Library running too) under "Lib_MatEditor":

Lib MatEditor (1).png Lib MatEditor (2).png

Keeper's alternative images

Alternatives

Keeper produced his own set of tailored images & sounds for Library.

"The screens have a bit of the "legend" icons showing the relative order of government and economy types, as well as a function key menu with English labels (the old menu from the previous BGS set but with text added by myself -- now blended over the new backgrounds nicely). Here's a 16:10 screenshot: http://www.keeper1st.com/Oolite/bgsexample.png

For the sounds, I replaced the "Item Sold" and "Item Bort" (?!) with nice little chimes (can't remember where they came from -- original Oolite?), changed things like "Ortopilot activated" into "Autopilot activated", trimmed some dead air (e.g. so instead of "missile......armed" it's "missile armed"), removed all instances of Majel Barrett from Star Trek (nothing against the late Ms Barrett or Star Trek; I just think the second voice is unnecessary), and greatly changed the extremely long and drawn-out game-over sound into a rather rapid explosion then sudden expulsion of air into silence, which is rather more shocking and realistic."

Tweaks


Quick Facts

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

Minimum Oolite versionCPU usage mediumMemory usage averageGPU usage averageisParentisAPIisDocumentedisConfigurable

Version Released License Features Category Author(s) Feedback
1.7.1 2018-11-19 CC-by-nc-sa-4.0 Helper for OXPs Misc OXPs BlackWolf & Svengali BB-Link