Difference between revisions of "Library OXP"
Cholmondely (talk | contribs) (Added more and musings) |
Cholmondely (talk | contribs) (Added Phkb's new ancillary OXPs) |
||
| (15 intermediate revisions by 3 users not shown) | |||
| Line 18: | Line 18: | ||
*Adds '''Config for AddOns''' to the [[F4 page (ship and system interfaces)|F4 ship-station interface]] screen (allows tweaking of compatible oxp's in-game) | *Adds '''Config for AddOns''' to the [[F4 page (ship and system interfaces)|F4 ship-station interface]] screen (allows tweaking of compatible oxp's in-game) | ||
*Adds a '''PAD''' to the [[F4 page (ship and system interfaces)|F4 ship-station interface]] screen (for personal details, recalling (GNN) news flashes, storing data, ''etc''.) | *Adds a '''PAD''' to the [[F4 page (ship and system interfaces)|F4 ship-station interface]] screen (for personal details, recalling (GNN) news flashes, storing data, ''etc''.) | ||
| − | *Plays music during your game (which can be contextual, changing if inside the [[aegis]] or if attacked) - but needs a compatible music .oxp installed | + | *Plays music during your game (which can be contextual, changing if inside the [[aegis]] or if attacked) - but needs a compatible music .oxp installed - see below for list |
| − | *Can be used by mission oxp's to display instructions (see Starmap below) | + | *''Can'' be used by mission oxp's to display instructions (see Starmap below) |
| − | *Can be used to show a [[Cutscene]] (see Animator below) | + | *''Can'' be used to show an animated display and possibly even a [[Cutscene]] (see Animator below) |
| − | *Can be used by other oxp's to display information on the PAD about Guild memberships, NPC's met, peculiarities of systems, ''etc''. It already does this for the [[Galactic Navy OXP]]. | + | *''Can'' be used by other oxp's to display information on the PAD about Guild memberships, NPC's met, peculiarities of systems, ''etc''. It already does this for the [[Galactic Navy OXP]]. |
| − | *Can be used by OXP ship designers to help display ships, exhausts, materials ''etc''. (see MatFinder and devtools below). | + | *''Can'' be used by OXP ship designers to help display ships, exhausts, materials ''etc''. (see MatFinder and devtools below). |
=== Config for AddOns === | === Config for AddOns === | ||
| − | '''Config for AddOns''' (AddOns category | + | '''Config for AddOns''' (Library Config) appears on your Docked F4 screen "AddOns" category. |
| + | :for tweaking OXPs while ''inside'' the game (and docked!) - ''here are some examples'' | ||
*[[BGS]]: (see the 3 screen shots on top right), where one select the effects one desires - station chatter, graphics for hyperspace jump ''etc''.). | *[[BGS]]: (see the 3 screen shots on top right), where one select the effects one desires - station chatter, graphics for hyperspace jump ''etc''.). | ||
*[[Email System OXP]] - listed as "GalCop Admin Services" - one can select categories of e-mails which one wishes not to be sent | *[[Email System OXP]] - listed as "GalCop Admin Services" - one can select categories of e-mails which one wishes not to be sent | ||
| Line 35: | Line 36: | ||
=== PAD (Personal Assistance Device) === | === PAD (Personal Assistance Device) === | ||
| − | [[Lib PAD|PAD]] (Captain's Log category) - a Personal Assistance Device with details of | + | [[Lib PAD|PAD]] (Captain's Log category) - a Personal Assistance Device with details of your [[Galactic Navy OXP]] 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. Currently there are categories for | :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. Currently there are categories for | ||
| Line 42: | Line 43: | ||
:: INFOS: A category for special events, news, etc. Could be useful e.g. for BloombergMarkets, ''etc''. | :: 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. | :: 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. | + | :: PERSONS: A category for characters you have met. Currently only used for the vanilla game missions. |
| − | :: SYSTEMS: | + | :: SYSTEMS: An empty category at the moment. Usable for special systems like Tianve, Tionisla, ''etc''. |
:: SEARCH | :: SEARCH | ||
:: PLAYER DATA | :: PLAYER DATA | ||
| Line 51: | Line 52: | ||
*Library (the most recent, done via the F4 page when docked) by Svengali | *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 | *[[OXPConfig]] (done via the F2 page - press F7 when told to) by Svengali | ||
| − | *[ | + | *[[Station Options]] by cag: this one is actually comprehensible! But the fabulous flood of detail for [[Telescope]]... |
| + | |||
| + | == Ancillary OXPs == | ||
| + | Library OXP acts as an enabler for a huge range of other OXPs (see below). There are also some Demos (see below) showing how abilities of Library OXP can be instantiated in Oolite.<br> | ||
| + | These ''Ancillary OXPs'' instead tweak aspects of Library OXP itself. | ||
| + | *[https://app.box.com/s/271jbpimu2jbs6au913ujkq3y7gcgkr4 LibraryConfigOnF2.oxz] relocates the anti-immersive "Config for AddOns" from the in-game docked F4 screen to the Game Options F2 screen (by Phkb 2025) | ||
| + | *[https://bb.oolite.space/viewtopic.php?p=301851#p301851 PADCustomAvatars.oxp] allows the (relatively) easy addition of custom player portraits to the choice in Library's P.A.D. (by Phkb 2025) | ||
==Features== | ==Features== | ||
| − | For Documentation just follow the links. | + | For Documentation just follow the links. There is more material tucked inside the Library OXZ - and some examples in the Demos |
* ''Lib_2DCollision.js'' - Methods for checking if point is in bounding-box, on line or in poly. | * ''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|Demos]]). | * ''Lib_Animator.js'' - Tool to create animations on missionscreens (see [[#Demos|Demos]]). | ||
| Line 65: | Line 72: | ||
* ''[[Lib_PAD|Lib_PAD.js]]'' - Unified logbook, mission-log, diary and interface. {{AV|1.7}} | * ''[[Lib_PAD|Lib_PAD.js]]'' - Unified logbook, mission-log, diary and interface. {{AV|1.7}} | ||
* ''[[Lib_Starmap|Lib_Starmap.js]]'' - In-System-Maps in 3D (docked and inflight) (see [[#Demos|Demos]]). {{AV|1.7}} | * ''[[Lib_Starmap|Lib_Starmap.js]]'' - In-System-Maps in 3D (docked and inflight) (see [[#Demos|Demos]]). {{AV|1.7}} | ||
| + | |||
| + | === More on the workings of Library.oxp === | ||
| + | Making sense of Library. | ||
| + | <div class="mw-collapsible mw-collapsed" data-expandtext="Show gory details" data-collapsetext="Hide gory details" style="overflow:auto;"> | ||
| + | [[Cabal Common Library OXP]] - Library's precursor - had these scripts | ||
| + | * [[Cabal_Common_Library_Doc_2DCollision|Cabal_Common_2DCollision]], 2D checks | ||
| + | * [[Cabal_Common_Library_Doc_BinSearch|Cabal_Common_BinSearch]], binary search tree | ||
| + | * [[Cabal_Common_Library_Doc_Briefing|Cabal_Common_Briefing]], enhance mission screens | ||
| + | [[File:CCL Briefing01.jpg|300px|thumb|CCL Briefing]] | ||
| + | * [[Cabal_Common_Library_Doc_Comms|Cabal_Common_Comms]], inflight communication | ||
| + | * [[Cabal_Common_Library_Doc_Functions|Cabal_Common_Functions]], generic function library | ||
| + | * [[Cabal_Common_Library_Doc_Keyboard|Cabal_Common_Keyboard]], user input | ||
| + | [[File:CCL Keyboard01.jpg|300px|thumb|CCL Keyboard]] | ||
| + | * [[Cabal_Common_Library_Doc_MissionHandling|Cabal_Common_MissionHandling]], start OXPs based on system descriptions | ||
| + | * [[Cabal_Common_Library_Doc_Music|Cabal_Common_Music]], inflight event driven music (=> Lib_Music) | ||
| + | * [[Cabal_Common_Library_Doc_Overlay|Cabal_Common_Overlay]], inflight overlays | ||
| + | [[File:Vector inflightoverlays.jpg|300px|thumb|CCL Overlay]] | ||
| + | * [[Cabal_Common_Library_Doc_PhraseGen|Cabal_Common_PhraseGen]], generator (v1.8) | ||
| + | * [[Cabal_Common_Library_Doc_SpecialMarkets|Cabal_Common_SpecialMarkets]], trading special goods | ||
| + | * [[Cabal_Common_Library_Doc_OXPStrength|Cabal_Common_Strength]], environment control | ||
| + | |||
| + | :1) In the CCL era, PAD was part of the [[Vector OXP]] which needed CCL to work. | ||
| + | :2) Cabal_Common_Overlay/Inflight overlays are presumably these: | ||
| + | |||
| + | |||
| + | Library has these: | ||
| + | :? Lib_2DCollision.js - Methods for checking if point is in bounding-box, on line or in poly. | ||
| + | :x Lib_Animator.js - Tool to create animations on mission screens (see Demos). - Animator Demo: Cutscenes? | ||
| + | :? Lib_BinSearch.js - Instantiated search tree. | ||
| + | :√ Lib_Config.js - Configuration interface for AddOns. (Widely used by many OXPs) | ||
| + | :? 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). Orchestral Demo & Contextual Jukebox. | ||
| + | :√ Lib_PAD.js - Unified logbook, mission-log, diary and interface. Added in v1.7 | ||
| + | :x Lib_Starmap.js - In-System-Maps in 3D (docked and inflight) (see Demos). Added in v1.7 - Starmap Demo | ||
| + | |||
| + | and there are more: | ||
| + | :x Lib_Cubecode.js (the Vector display above?) | ||
| + | :x Lib_EntityStrength.js (seems to check for weapons, shield strength & recharge rates, NPCs in system) | ||
| + | :x lib_fx.js | ||
| + | :x Lib_MissionCoord.js | ||
| + | :- Lib_PAD_Events.js (unsure about this one - is it what adds the GNN newsflashes into the PAD? Or new data cards such as NPCs or systems?) | ||
| + | :? lib_shield.js | ||
| + | :? lib_starmap12.js | ||
| + | :? lib_test.js (Detect changes in custom role entity?) | ||
| + | |||
| + | Decoder: | ||
| + | :√ - used by our community in other OXPs | ||
| + | :x - not used | ||
| + | :? - not even understood! | ||
| + | |||
| + | === Comments === | ||
| + | Phkb who is the only one to have updated parts of Library.oxp in the past 7 years wrote this: | ||
| + | I've really only used Lib Config, Lib GUI and Lib PAD. Lib PAD events is just a feeder into Lib PAD - it takes some standard game events and records them in the PAD, similar to what I did with the Email System, where I added a whole bunch of automatic emails when the player does certain things. I think I understand Lib GUI pretty well, but it's probably not going to be used very much outside of Xenon UI and BGS. | ||
| + | |||
| + | I have a suspicion Lib Test was in response to my [[Ship Configuration OXP]] - my logic for that OXP was that, if I'm penalising the player by making their ship slower or harder to steer based on the equipment and weight, then it should be applied to *all* NPC ships as well, otherwise the balance of the game would be skewed. But by applying the changes to things like mission ships, it moves those ships away from a particular performance rating a mission author was aiming for. I might be overthinking it, and it's too late to ask now. | ||
| + | |||
| + | One of the issues I have with the code in Library suite is that it's so *dense*, in that everything is reduced to the smallest possible space. A lot of the code uses single letter variable names, which makes reading it a real chore. Whenever I have to dive into it, I spend a lot of time asking questions like "So, what's 'c' in this context? What's 's'? And 't'? And 'z'?", and having to follow the flow of the code back to the origin to work it out for each one. The code is super clever, and it does some pretty amazing things, but it's written in a way that makes maintaining it, for anyone other that the original author, super hard. And the little documentation left behind is not always very helpful, even for a programmer. Several times I've read the documentation and I'm still left with questions about the implementation, which means the only way to actually work it out is trial and error - feeding data in to see what you get out. And that's for the easy stuff, like PAD. The animator, starmap, those things are several levels up from what we're doing with PAD. [https://bb.oolite.space/viewtopic.php?p=301809#p301809 Phkb, 2025] | ||
| + | |||
| + | </div> | ||
== Integration == | == Integration == | ||
=== Config for AddOns === | === Config for AddOns === | ||
| − | Over 30 OXP's use Library's "Config for AddOns" option on the F4 screen to allow configuration. | + | Over 30 OXP's use Library's "Config for AddOns" option on the F4 screen to allow configuration. Click this: [[File:IconLib.png|30px]] for a partial list. |
=== Music === | === Music === | ||
| Line 75: | Line 143: | ||
Music for playing the game to (these three need Library to function): | Music for playing the game to (these three need Library to function): | ||
*[https://app.box.com/s/xd9hnscxrjlb0p5suz8t00e7m5qo743d Lib Music Orchestral Demo]: [[User:Svengali|Svengali]]'s original classical music .oxp (2016: 22Mb) | *[https://app.box.com/s/xd9hnscxrjlb0p5suz8t00e7m5qo743d Lib Music Orchestral Demo]: [[User:Svengali|Svengali]]'s original classical music .oxp (2016: 22Mb) | ||
| − | *[[Contextual Jukebox OXP]] by Arquebus of [ | + | *[[Contextual Jukebox OXP]] by Arquebus of [https://bb.oolite.space/viewtopic.php?f=2&t=21111 YouTube fame] (2021: 115Mb) |
| − | *DIY kit: [ | + | *DIY kit: [https://bb.oolite.space/viewtopic.php?f=4&t=21127 Dangerous Background Music OXP]: [[User:Tsoj|Tsoj]] (2021) |
| − | === OXP's & Vanilla game integration === | + | Version of Library.oxp incorporating Tsoj's changes for music |
| + | *[https://app.box.com/s/ra79jgfe154y9gvsviyl7kow6eng7yli Download] | ||
| + | *[https://bb.oolite.space/viewtopic.php?p=280702#p280702 Discussion] (2021) | ||
| + | |||
| + | === OXP's & Vanilla game integration for P.A.D. === | ||
*[[Vanilla game]] missions have been integrated into Library.oxp | *[[Vanilla game]] missions have been integrated into Library.oxp | ||
*[[Galactic Navy OXP]] has been integrated into Library.oxp | *[[Galactic Navy OXP]] has been integrated into Library.oxp | ||
*[[GNN]] has been integrated into Library.oxp (the most recent new item is displayed on the PAD) | *[[GNN]] has been integrated into Library.oxp (the most recent new item is displayed on the PAD) | ||
| + | *[[User:Phkb|Phkb]] has updated the [[Cataclysm OXP]] mission and included Library integration - ''this'' is where to look to see how to do it! | ||
=== Demos === | === Demos === | ||
| Line 87: | Line 160: | ||
* [https://app.box.com/s/59vqswqh0wxiccerk7wgxerl0m0wmx20 Animator Demo] (zip, 2.8 MiB): a helper for animations on mission screens | * [https://app.box.com/s/59vqswqh0wxiccerk7wgxerl0m0wmx20 Animator Demo] (zip, 2.8 MiB): a helper for animations on mission screens | ||
* [https://app.box.com/s/xd9hnscxrjlb0p5suz8t00e7m5qo743d Lib Music Orchestral Demo]: [[User:Svengali|Svengali]]'s original music .oxp (2016: 22Mb) | * [https://app.box.com/s/xd9hnscxrjlb0p5suz8t00e7m5qo743d Lib Music Orchestral Demo]: [[User:Svengali|Svengali]]'s original music .oxp (2016: 22Mb) | ||
| − | * [https://app.box.com/s/0enjeiuyzjkyg36yxc5j04sdjhx9s7aa Starmap Demo] (oxz, 2.4 KB) - see [ | + | * [https://app.box.com/s/0enjeiuyzjkyg36yxc5j04sdjhx9s7aa Starmap Demo] (oxz, 2.4 KB) - see [https://bb.oolite.space/viewtopic.php?p=264969#p264969 explanation]: Lib_Starmap introduces In-System-Maps in 3D (or 2.5D *sigh*). These maps can be shown on missionScreens and inflight. On missionScreens they can be animated (''eg'' through Lib_Animator). Inflight users can control them via the Advanced Space Compass. Usage for OXP's is easy. |
| + | |||
| + | ''Apart from the demos, nothing yet uses Library's Animator & Star Map functions.'' | ||
=== Tools === | === Tools === | ||
| Line 93: | Line 168: | ||
* 1) [https://app.box.com/s/pwttg9nrqvvpqzya0wcpqpc4ly9bov1r Lib_MatFinder 1.1] (oxz, 39.7 KB) - A developer-tool to work out materials entries. | * 1) [https://app.box.com/s/pwttg9nrqvvpqzya0wcpqpc4ly9bov1r Lib_MatFinder 1.1] (oxz, 39.7 KB) - A developer-tool to work out materials entries. | ||
| + | The whole thing started when I looked in some older OXPs. Pretty often they don't have later implemented stuff (materials, custom views), but creating these entries eats a lot of time and needs a lot of testruns/finetuning. It was meant for my personal use only to speed up the updating orgy I've had in mind, but in the end it got better than expected, so I released it as helper. [https://bb.oolite.space/viewtopic.php?p=154692#p154692 Svengali 2011] | ||
:See [[MatFinder]] for more detail (culled from BB and put in order) | :See [[MatFinder]] for more detail (culled from BB and put in order) | ||
| − | :See [ | + | :See [https://bb.oolite.space/viewtopic.php?p=265566#p265566 here] for original BB description. (2 pages, 2018). |
::Once you load the .oxp, see your F4 screen (if you have Library.oxp running too) under "Developer" to access this tool. | ::Once you load the .oxp, see your F4 screen (if you have Library.oxp running too) under "Developer" to access this tool. | ||
| Line 102: | Line 178: | ||
| − | * 2) [ | + | ::On your F4 screen under "Lib_MatEditor": |
| + | [[File:Lib_MatEditor_%281%29.png|150px]] | ||
| + | [[File:Lib_MatEditor_%282%29.png|150px]] | ||
| + | |||
| + | * 2) [[DevTools]] (oxz) - Tests for all kind of things. Useless for gaming but still funny. | ||
::On starting a game (if you have Library running too): | ::On starting a game (if you have Library running too): | ||
| Line 109: | Line 189: | ||
[[File:Library_devtools.values.png|150px]] | [[File:Library_devtools.values.png|150px]] | ||
| − | ::On your F4 screen | + | ::On your F4 screen under "Lib_MatEditor": |
| − | [[File: | + | [[File:Lib DevTools 1.png|150px]] |
| − | [[File: | + | [[File:Lib DevTools 2.png|150px]] |
| + | ---- | ||
| − | |||
== ID == | == ID == | ||
identifier = "oolite.oxp.Svengali.Library"; | identifier = "oolite.oxp.Svengali.Library"; | ||
| Line 124: | Line 204: | ||
== Tweaks == | == Tweaks == | ||
| − | *[ | + | *[https://bb.oolite.space/viewtopic.php?p=252499#p252499 To add a radio channel] |
| + | |||
| + | *Possible Error | ||
| + | :[https://bb.oolite.space/viewtopic.php?p=270334#p270334 Error followed by Phkb's fix] (2020) | ||
| + | Replace Lib_GUI code, line 311 with | ||
| + | ex = (this.$noEx.indexOf(id)===-1 && this.$IDsExt[id]?this.$IDsExt[id]:null), | ||
== Musings == | == Musings == | ||
| − | [[User:Cholmondely|Cholmondely]] writes: '''this OXP is a tragedy'''. It is ''so'' powerful and can add ''so'' much to the game and nobody did anything with it. [[User:Svengali|Svengali]] died before he could update his old broken missions ([[Vector]] & [[Localhero]]) to run on the newer versions of Oolite and to use it (all the necessary elements are built in for them). And nobody else has used it either - apart from the "Config for AddOns" element. In 2022 one music .oxp appeared which uses it (as does another DIY oxp), but the other elements languish in the dust. | + | [[User:Cholmondely|Cholmondely]] writes: '''this OXP is a tragedy'''. It is ''so'' powerful and can add ''so'' much to the game and nobody did anything with it. [[User:Svengali|Svengali]] died before he could update his old broken missions ([[Vector]] & [[Localhero OXP]]) to run on the newer versions of Oolite and to use it (''all'' the necessary elements are already built in for them). And nobody else has used it either - apart from the "Config for AddOns" element. In 2022 one music .oxp appeared which uses it (as does another DIY oxp), but the other elements languish in the dust. |
| + | |||
| + | There are also a number of abilities lurking in the precursor CCL which were probably inherited by Library.oxp: | ||
| + | :[[Cabal_Common_Library_Doc_Briefing|Cabal_Common_Briefing]], enhance mission screens | ||
| + | :[[Cabal_Common_Library_Doc_Comms|Cabal_Common_Comms]], inflight communication | ||
| + | :[[Cabal_Common_Library_Doc_Functions|Cabal_Common_Functions]], generic function library | ||
| + | :[[Cabal_Common_Library_Doc_Keyboard|Cabal_Common_Keyboard]], user input | ||
| + | :[[Cabal_Common_Library_Doc_MissionHandling|Cabal_Common_MissionHandling]], start OXPs based on system descriptions | ||
| + | :[[Cabal_Common_Library_Doc_Music|Cabal_Common_Music]], inflight event driven music | ||
| + | :[[Cabal_Common_Library_Doc_Overlay|Cabal_Common_Overlay]], inflight overlays | ||
| + | :[[Cabal_Common_Library_Doc_SpecialMarkets|Cabal_Common_SpecialMarkets]], trading special goods | ||
| + | :[[Cabal_Common_Library_Doc_OXPStrength|Cabal_Common_Strength]], environment control | ||
| + | :''somewhere in all this is a ''random integer function'' which is used by [[Factions OXP]] and is presumably still in Library somewhere... (like https://wiki.alioth.net/index.php/Cabal_Common_Library_Doc_Functions#rand.28.29) | ||
| + | |||
| + | The one change which ''would'' be very useful would be the ability to recall more than just the ''one'' most recent GNN news broadcast in the PAD. | ||
| − | + | == Links == | |
| + | *[https://bb.oolite.space/viewtopic.php?t=21449 Library OXP logos and images] (2023-34) | ||
==Quick Facts== | ==Quick Facts== | ||
| Line 152: | Line 252: | ||
|author = BlackWolf & Svengali | |author = BlackWolf & Svengali | ||
|download = [[#Download|See Download]] | |download = [[#Download|See Download]] | ||
| − | |feedback = [ | + | |feedback = [https://bb.oolite.space/viewtopic.php?f=4&t=18248 BB-Link] |
}} | }} | ||
[[Category:Oolite utilities]] | [[Category:Oolite utilities]] | ||
Latest revision as of 17:16, 27 July 2025
This page is about the OXP helper expansion pack, Library, for other uses, see Library (disambiguation).
Contents
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.
- Adds Config for AddOns to the F4 ship-station interface screen (allows tweaking of compatible oxp's in-game)
- Adds a PAD to the F4 ship-station interface screen (for personal details, recalling (GNN) news flashes, storing data, etc.)
- Plays music during your game (which can be contextual, changing if inside the aegis or if attacked) - but needs a compatible music .oxp installed - see below for list
- Can be used by mission oxp's to display instructions (see Starmap below)
- Can be used to show an animated display and possibly even a Cutscene (see Animator below)
- Can be used by other oxp's to display information on the PAD about Guild memberships, NPC's met, peculiarities of systems, etc. It already does this for the Galactic Navy OXP.
- Can be used by OXP ship designers to help display ships, exhausts, materials etc. (see MatFinder and devtools below).
Config for AddOns
Config for AddOns (Library Config) appears on your Docked F4 screen "AddOns" category.
- for tweaking OXPs while inside the game (and docked!) - here are some examples
- BGS: (see the 3 screen shots on top right), where one select the effects one desires - station chatter, graphics for hyperspace jump etc.).
- Email System OXP - listed as "GalCop Admin Services" - one can select categories of e-mails which one wishes not to be sent
- Risky Business - one can select either or both of the "Risky Business" or the "Risk Based Economy]] effects to alter the trading profits in one's game.
- Satellites - one can select the planets at which they appear, and the number appearing
- Station Dock Control - one can control many aspects of what information is presented about docking/docked ships
- Xenon UI - one can select the amber background alternative instead of the blue
PAD (Personal Assistance Device)
PAD (Captain's Log category) - a Personal Assistance Device with details of your Galactic Navy OXP 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. Currently there 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. Currently only used for the vanilla game missions.
- SYSTEMS: An empty category at the moment. Usable 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 currently 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 actually comprehensible! But the fabulous flood of detail for Telescope...
Ancillary OXPs
Library OXP acts as an enabler for a huge range of other OXPs (see below). There are also some Demos (see below) showing how abilities of Library OXP can be instantiated in Oolite.
These Ancillary OXPs instead tweak aspects of Library OXP itself.
- LibraryConfigOnF2.oxz relocates the anti-immersive "Config for AddOns" from the in-game docked F4 screen to the Game Options F2 screen (by Phkb 2025)
- PADCustomAvatars.oxp allows the (relatively) easy addition of custom player portraits to the choice in Library's P.A.D. (by Phkb 2025)
Features
For Documentation just follow the links. There is more material tucked inside the Library OXZ - and some examples in the Demos
- 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
More on the workings of Library.oxp
Making sense of Library.
Cabal Common Library OXP - Library's precursor - had these scripts
- Cabal_Common_2DCollision, 2D checks
- Cabal_Common_BinSearch, binary search tree
- Cabal_Common_Briefing, enhance mission screens
- Cabal_Common_Comms, inflight communication
- Cabal_Common_Functions, generic function library
- Cabal_Common_Keyboard, user input
- Cabal_Common_MissionHandling, start OXPs based on system descriptions
- Cabal_Common_Music, inflight event driven music (=> Lib_Music)
- Cabal_Common_Overlay, inflight overlays
- Cabal_Common_PhraseGen, generator (v1.8)
- Cabal_Common_SpecialMarkets, trading special goods
- Cabal_Common_Strength, environment control
- 1) In the CCL era, PAD was part of the Vector OXP which needed CCL to work.
- 2) Cabal_Common_Overlay/Inflight overlays are presumably these:
Library has these:
- ? Lib_2DCollision.js - Methods for checking if point is in bounding-box, on line or in poly.
- x Lib_Animator.js - Tool to create animations on mission screens (see Demos). - Animator Demo: Cutscenes?
- ? Lib_BinSearch.js - Instantiated search tree.
- √ Lib_Config.js - Configuration interface for AddOns. (Widely used by many OXPs)
- ? 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). Orchestral Demo & Contextual Jukebox.
- √ Lib_PAD.js - Unified logbook, mission-log, diary and interface. Added in v1.7
- x Lib_Starmap.js - In-System-Maps in 3D (docked and inflight) (see Demos). Added in v1.7 - Starmap Demo
and there are more:
- x Lib_Cubecode.js (the Vector display above?)
- x Lib_EntityStrength.js (seems to check for weapons, shield strength & recharge rates, NPCs in system)
- x lib_fx.js
- x Lib_MissionCoord.js
- - Lib_PAD_Events.js (unsure about this one - is it what adds the GNN newsflashes into the PAD? Or new data cards such as NPCs or systems?)
- ? lib_shield.js
- ? lib_starmap12.js
- ? lib_test.js (Detect changes in custom role entity?)
Decoder:
- √ - used by our community in other OXPs
- x - not used
- ? - not even understood!
Comments
Phkb who is the only one to have updated parts of Library.oxp in the past 7 years wrote this:
I've really only used Lib Config, Lib GUI and Lib PAD. Lib PAD events is just a feeder into Lib PAD - it takes some standard game events and records them in the PAD, similar to what I did with the Email System, where I added a whole bunch of automatic emails when the player does certain things. I think I understand Lib GUI pretty well, but it's probably not going to be used very much outside of Xenon UI and BGS. I have a suspicion Lib Test was in response to my Ship Configuration OXP - my logic for that OXP was that, if I'm penalising the player by making their ship slower or harder to steer based on the equipment and weight, then it should be applied to *all* NPC ships as well, otherwise the balance of the game would be skewed. But by applying the changes to things like mission ships, it moves those ships away from a particular performance rating a mission author was aiming for. I might be overthinking it, and it's too late to ask now. One of the issues I have with the code in Library suite is that it's so *dense*, in that everything is reduced to the smallest possible space. A lot of the code uses single letter variable names, which makes reading it a real chore. Whenever I have to dive into it, I spend a lot of time asking questions like "So, what's 'c' in this context? What's 's'? And 't'? And 'z'?", and having to follow the flow of the code back to the origin to work it out for each one. The code is super clever, and it does some pretty amazing things, but it's written in a way that makes maintaining it, for anyone other that the original author, super hard. And the little documentation left behind is not always very helpful, even for a programmer. Several times I've read the documentation and I'm still left with questions about the implementation, which means the only way to actually work it out is trial and error - feeding data in to see what you get out. And that's for the easy stuff, like PAD. The animator, starmap, those things are several levels up from what we're doing with PAD. Phkb, 2025
Integration
Config for AddOns
Over 30 OXP's use Library's "Config for AddOns" option on the F4 screen to allow configuration. Click this:
for a partial list.
Music
Library can introduce music (as well as sound effects). For a full list of all such OXP's see Category:Sound Sets OXPs
Music for playing the game to (these three need Library to function):
- Lib Music Orchestral Demo: Svengali's original classical music .oxp (2016: 22Mb)
- Contextual Jukebox OXP by Arquebus of YouTube fame (2021: 115Mb)
- DIY kit: Dangerous Background Music OXP: Tsoj (2021)
Version of Library.oxp incorporating Tsoj's changes for music
- Download
- Discussion (2021)
OXP's & Vanilla game integration for P.A.D.
- Vanilla game missions have been integrated into Library.oxp
- Galactic Navy OXP has been integrated into Library.oxp
- GNN has been integrated into Library.oxp (the most recent new item is displayed on the PAD)
- Phkb has updated the Cataclysm OXP mission and included Library integration - this is where to look to see how to do it!
Demos
Designed to show how to integrate other OXP's with Library; Install like any other OXP.
- Animator Demo (zip, 2.8 MiB): a helper for animations on mission screens
- Lib Music Orchestral Demo: Svengali's original music .oxp (2016: 22Mb)
- Starmap Demo (oxz, 2.4 KB) - see explanation: Lib_Starmap introduces In-System-Maps in 3D (or 2.5D *sigh*). These maps can be shown on missionScreens and inflight. On missionScreens they can be animated (eg through Lib_Animator). Inflight users can control them via the Advanced Space Compass. Usage for OXP's is easy.
Apart from the demos, nothing yet uses Library's Animator & Star Map functions.
Tools
There are two tools tucked away in diverse locations:
- 1) Lib_MatFinder 1.1 (oxz, 39.7 KB) - A developer-tool to work out materials entries.
The whole thing started when I looked in some older OXPs. Pretty often they don't have later implemented stuff (materials, custom views), but creating these entries eats a lot of time and needs a lot of testruns/finetuning. It was meant for my personal use only to speed up the updating orgy I've had in mind, but in the end it got better than expected, so I released it as helper. Svengali 2011
- See MatFinder for more detail (culled from BB and put in order)
- See here for original BB description. (2 pages, 2018).
- Once you load the .oxp, see your F4 screen (if you have Library.oxp running too) under "Developer" to access this tool.
- On your F4 screen under "Lib_MatEditor":
- 2) DevTools (oxz) - Tests for all kind of things. Useless for gaming but still funny.
- On starting a game (if you have Library running too):
- On your F4 screen under "Lib_MatEditor":
ID
identifier = "oolite.oxp.Svengali.Library";
Requirements
- Latest version needs Oolite v1.88.
Download
Install like any other OXP. Library is on the in-game Expansions Manager. Or, if you prefer, Library 1.7.1 (oxz, 4.9 MiB)
Tweaks
- Possible Error
- Error followed by Phkb's fix (2020)
Replace Lib_GUI code, line 311 with ex = (this.$noEx.indexOf(id)===-1 && this.$IDsExt[id]?this.$IDsExt[id]:null),
Musings
Cholmondely writes: this OXP is a tragedy. It is so powerful and can add so much to the game and nobody did anything with it. Svengali died before he could update his old broken missions (Vector & Localhero OXP) to run on the newer versions of Oolite and to use it (all the necessary elements are already built in for them). And nobody else has used it either - apart from the "Config for AddOns" element. In 2022 one music .oxp appeared which uses it (as does another DIY oxp), but the other elements languish in the dust.
There are also a number of abilities lurking in the precursor CCL which were probably inherited by Library.oxp:
- Cabal_Common_Briefing, enhance mission screens
- Cabal_Common_Comms, inflight communication
- Cabal_Common_Functions, generic function library
- Cabal_Common_Keyboard, user input
- Cabal_Common_MissionHandling, start OXPs based on system descriptions
- Cabal_Common_Music, inflight event driven music
- Cabal_Common_Overlay, inflight overlays
- Cabal_Common_SpecialMarkets, trading special goods
- Cabal_Common_Strength, environment control
- somewhere in all this is a random integer function which is used by Factions OXP and is presumably still in Library somewhere... (like https://wiki.alioth.net/index.php/Cabal_Common_Library_Doc_Functions#rand.28.29)
The one change which would be very useful would be the ability to recall more than just the one most recent GNN news broadcast in the PAD.
Links
- Library OXP logos and images (2023-34)
Quick Facts
| 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 |