Page 11 of 11

Re: [Release] HUD Selector v1.17

Posted: Sun Jul 28, 2024 5:20 am
by phkb
Wildeblood wrote: Sat Jul 27, 2024 11:14 am
Bull*bleep*
I'll take a look tomorrow to see if I can discern what Norby was trying to fix/resolve/achieve.

Re: [Release] HUD Selector v1.17

Posted: Sun Jul 28, 2024 6:15 am
by Cholmondely
Auto Crosshairs OXP Change Log (from Hiran's oolite-expansion-catalog)

-----------
Change Log:
-----------

1.1.1 (October 5th, 2014) Discard HUD settings if HUD file changes.

1.1 (October 2nd, 2014) Same as version 1.0.88.

1.0.88 (October 2nd, 2014) Ver 1.1 beta: because a crosshair reset causes a HUD reset, this now saves and routinely restores reticleTargetSensitive, scannerNonLinear, and scannerUltraZoom settings. (I think this is wrong, but the commoonity seem to think it is right. Too bad if another script is actually trying to change these settings on the fly.) A backup copy of the version 1.0.77 script remains inside.

1.0.77 (October 1st, 2014) Ver 1.1 beta: enhanced patchability.

1.0.66 (September 30th, 2014) Ver 1.1 beta: automatically detects patch files at start-up.

1.0.5 (September 29th, 2014) Bug fix: check that on-target crosshairs file isn't accidentally recorded as off-target file.


1.0.4 (May 23rd, 2013) Bug introduced in 1.0.3 fixed, and new on-target cross-hair design.

1.0.3 (May 22nd, 2013) Added alternative cross-hair for mining laser.

1.0.2 (May 20th, 2013) Better compatibility with other cross-hair switching OXPs.

1.0.1 (May 20th, 2013) Bug fix: stop frame callback if equipment is damaged.

1.0 (May 20th, 2013) First published.





HUDSelector Change Log (from Hiran's oolite-expansion-catalog)


Changelog (scroll d-o-w-n!)
---------
2024.04.19. v1.27 (phkb)
* Added console message when changing HUD's via the F4 Interface page.
* Small tweak to MFD setting, so MFD's aren't set to "undefined".
* Small code fix for missing declaration.

2023.10.15. v1.26 (phkb)
* Corrections to Telescope MFD entries in array.

2023.10.11. v1.25 (phkb)
* Removed debug messages.

2023.10.08. v1.24 (phkb)
* Really fixed issue with reading default MFD's from new dataset method.

2023.10.08. v1.23 (phkb)
* Fixed issue with reading default MFD's from new dataset method.

2023.10.07. v1.22 (phkb)
* Reapplied old code that read default MFDs, so there should be continuity between old and new versions.

2023.09.23. v1.20 (phkb)
* New, more consistent method to save MFD arrangement.

2023.09.06. v1.19 (phkb)
* Gave MFD's a "displayName" to make interface far more user friendly
* Added some text alignment code to the lists, to make them a little easier to read. Also added some helper text to each screen, to better explain what they do.
* Expanded the default list of MFD's.
* Removed need for FCB's on mission screens.
* After the game has started and all compatible HUD's have been registered, the callback function will only be called on the HUD being disabled and the HUD being enabled, reducing the time it takes to switch HUDs and preventing timeout issues.
* Changed the flow of screens, so exiting from the MFD or Combat HUD custom dials screens returns to the main HUD listing, instead of exiting back to the F4 Interfaces page.
* Setting the initial HUD after load, and running all the callbacks, is now only performed once, rather than twice.

2020.11.21. v1.18
* Display HUD Selector Removal in red at Ship Outfitting screen.
* Sets Station Interface (F4) when loading savefile (previously done only when docking).
* Deals with more than one HUD from the same worldscript.
* Adds Primeable Equipment MFD to the default MFDs list.

2016.08.15. v1.17
* Removed "(adjusting)" text from timer in Large and other included HUDs.
* Always turn on the HUD at launch and at Options(F2) to fix problems in any addons.
* A comma added into "Press Space, Commander".

2015.05.26. v1.16
*Fixed timeout caused by missing images, thanks to CdrC64.

2015.05.25. v1.15
* ExtraLarge HUD got narrower scanner in 16:10 to fit 10 MFDs from Oolite 1.81.
* HUDs can define different plists for 4:3, 16:10 and 16:9 screens in AddHUD call.

2015.05.24. v1.14
* ExtraLarge HUD is the new name of XL HUD.
* Removed Original HUD and Wide HUD in favor of Large HUD and ExtraLarge HUD.
* Fixed fuel indicator in ExtraLarge HUD.
* Small HUD got alert sensitive scanner.

2015.05.23. v1.13
* Large HUD is optimized for 16:10 screens, scanner is narrower to show 10 MFDs.
* Wide HUD is a bit polished variant of the previous Large HUD for 16:9 screens.
* XL HUD is a polished variant of the Large HUD in v1.11 with very large scanner.
* Clock and custom dials are repositioned from bottom center in these HUDs.

2015.05.21. v1.12
* Large HUD's messages and comms boxes are wider and aligned to the sides.
* Reduced Large scanner height for better aspect ratio and more room.
* Fixed needed fuel indicator, thanks to Anonymissimus.
* Removed the nonexistent Scanner HUD from the selectable HUD list.

2015.05.17. v1.11
* Large HUD added with as large scanner as in NumericHUD.

2015.04.27. v1.10
* Fixed restore of MFDs if the current HUD remove them in the dock.
* Interface screens use background from BGS or Better Screens if available.

2015.01.10. v1.9
* MFD selector list limited to the actual number of MFDs.
* Exit back to the Interfaces screen from HUD and MFD interfaces.

2014.10.20. v1.8
* Original HUD got many numeric displays from CombatMFD.
* Custom Dials setup in Hud Selector Interface.
* Support for more than 20 HUDs and MFDs.

2014.10.16. v1.7
* Original and Small HUDs has numeric speed display with CombatMFD in Oolite 1.81.

2014.09.25. v1.6
* Scanner settings compatible with Auto Crosshairs OXP and plist-changer huds.


2014.09.24. v1.5
* Fixed the saving of scanner settings if the equipment is uninstalled.

2014.09.23. v1.4
* Scanner settings are adjustable by mode key (b) if HUD Selector primed.

2014.08.29. v1.3
* MFD setup changes during flight are saved (need Oolite 1.81).
* Original and Small HUDs has 10 MFDs and scanner zoom up to 16x.
* Support in Original and Small HUDs for CombatMFD's target status.

2014.08.12. v1.2
* Small fix for MarketObserver.

2014.08.11. v1.1
* Interfaces and MFD handling.
* Selections are saved into the savegame.
* The included Original and Small HUDs has 8 MFDs.

2014.07.05. v1.0
* First release.

Re: [Release] HUD Selector v1.17

Posted: Sun Jul 28, 2024 6:25 am
by Wildeblood
Cholmondely wrote: Sun Jul 28, 2024 6:15 am

2014.09.25. v1.6
* Scanner settings compatible with Auto Crosshairs OXP and plist-changer huds.
Using a frame callback to hammer some settings on every single frame update, just to prevent anyone else from changing them, is a strange understanding of "compatible".

Re: [Release] HUD Selector v1.17

Posted: Sun Jul 28, 2024 6:27 am
by phkb
As I said, I'll have a look at the code tomorrow - there might be an easier solution than a FCB.

Re: [Release] HUD Selector v1.17

Posted: Sun Jul 28, 2024 6:31 am
by phkb
Just from reading the patch notes, I suspect a better solution for HUD Selector would be to check if Auto Crosshairs is installed, and if so, don't try to redo what Auto Crosshairs is doing. Basically, to get out of the way, and save the settings if ACH is not installed. That may not make any sense when I open the code up, but that seems like a better approach to take.

Re: [Release] HUD Selector v1.17

Posted: Mon Aug 05, 2024 3:32 am
by phkb
Here's my analysis so far:

Autocrosshairs starts a FCB (Frame Callback) whenever the player acquires a target, and stops it if the players loses a target. When a target is acquired, it also grabs a copy of various HUD settings (reticleTargetSensitive, scannerNonLinear and scannerUltraZoom). Then, if the player aligns their target into the target cone, the hud crosshairs are changed. If the player isn't correctly aligned with the target , the crosshairs are set to null (reverting to whatever the HUD had defined originally) and the stored HUD settings are reapplied (because those three settings are reset whenever the crosshairs are set to null.

OK so far.

Now, HUDSelector. This one is more complex as it's trying to do a lot. It's trying to fix a couple of interactions, particularly with Telescope for some reason. You can turn off the fix it applies by setting this.$HUDSelectorFix = false; on line 75 of "hudselector.js", and after doing so, everything still seems to operate fine. However, I didn't try doing things like changing your HUD while in flight, or changing your HUD scanner settings in flight, both of which can be done using HUD selector, so I don't know if those are the problematic sections.

I'm quite confused by the need to fix the HUD if Auto Crosshairs is installed. And not even the equipment purchased, just that the OXP is installed. It seems like a very big hammer to apply to a rather small nail.

My only thought on conflicts at present is, because Auto Crosshairs assumes the player will be aligned with the target when it changes the crosshairs, there *might* be a problem for anything that changes the player's target without being aligned (ie any of the targeting mods, and Telescope are the obvious examples). I say "might" because I tried using auto crosshairs with HUD selector (with the FCB fix turned off) and telescope and my own "FastTargetSelector" oxp. I could change my target using the target selector equipment, and then when I aligned with the target, auto crosshairs kicked in and successfully changed the crosshairs, and then cleared the crosshairs when out of alignment, all without upsetting my scanner zoom or linear settings. So I wasn't able to demonstrate any conflicts in game.

I'll continue doing some tests, but given my Oolite time has been severely cut back in recent time it might take me a while to get to the bottom of this. If someone else wants to test interactions, just apply the change I mentioned above in "hudselectpr.js", then run your game as normal. If there are no reports in the next few weeks, I'll publish a tweaked version of HUD selector.