Contextual Help OXP

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4893
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Contextual Help OXP

Post by phkb »

I finally got around to releasing this. This mod *requires* Oolite 1.91, as it uses features in that release. In fact, I just pushed a patch to v1.91 to fix a bug, so you should definitely update to the latest version if you can.

I also chose to create a new thread for the release, rather than have 2 pages of discussion before the release annoucement. If you want to read the original discussion, you can find it here: https://bb.oolite.space/viewtopic.php?t=21426

What does this do? Basically, it provides a mechanism where help text related to the current GUI screen can be easily and quickly displayed. And that's (mostly) it.

The "mostly" I'm alluding to is that other OXP's can piggy-back on the system. To see this demonstrated, here's a screen grab of the help text displayed from the Short Range Chart screen.
Image
Note the line at the bottom: "Press Ctrl-G on this screen to open the Galactic Registry." That text was added by Galactic Registry. If you use Smugglers, and the Email System, you will find they both add some text as well.

So, in summary, this OXP allows for quick access to basic help on each of the GUI screens, and provides a way for OXP developers to add their own content to the help text. The help text is directly from cims Ship's Library OXP, but let me know if more/less/tweaks are needed.

At the moment, the key combination to access this is Ctrl-H. The "?" mark (shift-/ on US/UK keyboards) is out, as it's used on the Chart screen and Market screen. F1 is out, because it's in use as the "Launch ship" key. The "+" key is certainly feasible, but I don't think it's quite as intuitive as Ctrl-H. I'd prefer to use (a) a key combo that is not currently in use elsewhere, so that players aren't forced to change their keyboard configuration just to use it, and (b) a combination that can be the same on every page. So if a suggestion can be made that is more intuitive, I'm happy to change it.

In any event, to help with making it clear you *can* press Ctrl-H, a message will be shown in the console whenever you visit a GUI page for the first time, reminding you of the key combo.

The mod should be in the Download Manager now, but if you prefer a direct link, here you go: ContextualHelp.oxz.
I'll write up a wiki page shortly, with instructions on how to work with it.
OK, wiki page is up: [EliteWiki] Contextual Help
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6781
Joined: Wed Feb 28, 2007 7:54 am

Re: Contextual Help OXP

Post by another_commander »

Ace. Will test this baby as soon as I get a chance.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6781
Joined: Wed Feb 28, 2007 7:54 am

Re: Contextual Help OXP

Post by another_commander »

Two observations from testing so far:

1. The message at the bottom of each help screen reads "Press ESC to return" but I can use Enter to return just fine too.

2. Maybe this has nothing to do with the OXP itself and it was just a one-off event, but reporting it just in case. After running a few checks with Contextual Help (installed via the Manager), I uninstalled the OXP and returned to the game. Pressed Ctrl+h to make sure it was not active anymore and then launched, flew around for a minute and exited the game. When I looked at the log, I found this at the end:

Code: Select all

18:38:18.280 [gnustep]: 2025-04-03 18:38:18.280 oolite[2916] src/Core/Scripting/OOJavaScriptEngine.m:498  Assertion failed in OOJavaScriptEngine(instance), method callJSFunction:forObject:argc:argv:result:.  Invalid parameter not satisfying: OOJSValueIsFunction(context, function)

18:38:18.282 [exception]: ***** Exception in pollDockedControls [GUI keys]: NSInternalInconsistencyException : src/Core/Scripting/OOJavaScriptEngine.m:498  Assertion failed in OOJavaScriptEngine(instance), method callJSFunction:forObject:argc:argv:result:.  Invalid parameter not satisfying: OOJSValueIsFunction(context, function)
18:39:00.108 [exit.context]: Exiting: Shift-escape pressed.
18:39:00.112 [gameController.exitApp]: .GNUstepDefaults synchronized.

Closing log at 2025-04-03 18:39:00 +0300.
This did not happen when I relaunched the game for one last check (without Contextual Help).

The full log from that run is attached for completeness.
Attachments
Previous.zip
(6.55 KiB) Not downloaded yet
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6781
Joined: Wed Feb 28, 2007 7:54 am

Re: Contextual Help OXP

Post by another_commander »

OK, reproduced the second error by following the process from start (install OXP via Manager, use it for a couple of screens, uninstall it via Manager, press Ctrl+h a few times, exit).

It seems that the action that causes it is the Ctrl+h after the OXP has been uninstalled. Once I quite the game and relaunch it, I can press Ctrl+h as much as I want and all is good.

It's a minor issue I would say, there does not seem to be any actual problem in the game and frankly, I would have never noticed had I not made it standard practice to look at the log after every test run.
User avatar
Captain Beatnik
Deadly
Deadly
Posts: 164
Joined: Sun Feb 27, 2011 10:15 pm
Location: Eastern Bavaria (Average Agricultural Confederacy)

Re: Contextual Help OXP

Post by Captain Beatnik »

Great new feature, good work!

Any chance Oolite 1.91 will be avaliable soon for mac so that mac users (like me) can also use it?
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams, 1952 - 2001)
You have to try the impossible to achieve the possible. (Emil Sinclair, 1877 - 1962)
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2734
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance, looking through a telescope with the lens cap on

Re: Contextual Help OXP

Post by Redspear »

phkb wrote: Thu Apr 03, 2025 3:15 am
So, in summary, this OXP allows for quick access to basic help on each of the GUI screens, and provides a way for OXP developers to add their own content to the help text.
Will have to check this out but sounds great.
Post Reply