TSME: Target System Memory Expansion
STE: Scanner Targeting Enhancement
MTS: Multi-Targeting System
HUD Improvements
A set of HUD changes intended to make scripting easier and improve HUD functionality in general.
Problem
Customisation of HUDs from script is not straightforward. Use of console messages to display arbitrary text semi-persistently (as is becoming popular) is difficult to make compatible with other OXPs doing the same thing and can be inefficient. Some potentially useful functionality is missing or requires inefficient workarounds to implement.
Proposal
Add some additional features to HUDs:Overlays
- Waypoint display. Allow waypoints to be defined (
player.ship.waypoints
,player.ship.addWaypoint(...)
, etc.) and then displayed as line-drawn objects with attached names. Probably should require an ASC to be fitted. Waypoints may have orientation as well as position.- Additional dial for currently primed equipment name, with option to make multi-line and show next/previous items too. (should we add this to the default HUD?) Probably it should be invisible if no equipment is selected.
While we're here, though it's not strictly HUD-related unless we decide these need a dial too: we currently have two items which currently act a lot like primable equipment (and could be duplicated by one) but have keys reserved specially for them - the energy bomb and the {secret item}. What we could do is rename those keys to "contingency device" and "special equipment", and allow the player to select while docked via an interface screen a primable equipment item to bind to each slot (with the current devices as default; some careful work needed with the interface to not reveal the existence of the {secret item} if it's not installed). Pressing the key would then send 'N' to that equipment without affecting the Shift-N cycling setting.- Additional dial for current ASC target beacon code. (should we add to default HUD?)
- Optional setting to display low-opacity rectangles around TSME-tracked ships if STE installed. What colours should these be?
As with reticle-sensitive, probably not enabled on the default HUD - should we provide equipment to enable this, or leave it to OXPs? Should the rectangles have ship names like the current target or just be rectangles?
- Same as current STE target? (i.e. green for ship, blue for wormholes)
- Scanner colours?
- Different colour for missile-locks if MTS installed?
- Customisation of STE label - font-scale as requested, and also allow the text to be set with a description string "
[oolite_ste_displayname]\n[oolite_ste_range] ([oolite_ste_legalstatus])
"- Not sure about this one, but: is it actually right that red/yellow hostility depends on weapon range? You can get very strange effects if a ship has different weapons on different facings, as it switches between them. I'd prefer 'red' to be any normal ship that is targeting the player in a hostile way (should defence targets count? only if the ship has point defence weapons?)
- HUD Overlays - scriptable HUD text controls (see below)
HUDs would define overlay regions like other dials. HUDs could define more than one overlay region, though they shouldn't overlap. When an overlay is not in use, it will not be drawn. Default HUD would probably add two, one on the left edge and one on the right edge, below the comm log.
Scripts could then enable and disable their own overlays (most often on events, or on primable equipment), and refresh the overlay to replace the contained text.
Enabled overlays would be put in a stack, last-enabled at the top. The overlays would then be displayed from the top down in the various overlay regions on the HUD, until all overlay regions were used. Ideally: overlays stick to their current region if possible, rather than rotating around every time a new one is added or an old one removed; and ideally: a short overlay-changing animation rather than an instant switch.
To make overlays generally usable by OXP writers, they would probably need to have a constant width and height in terms of text characters. (Suggestions for what this should be? 8-10 lines of 25-30 characters seems about right)
OXP writers can't guarantee that the overlay will be visible, as that depends on equipment activation order, etc. (And the HUD having any overlays, but they can be added...) Since they should generally be bound to equipment under player control, it's the player's job not to activate too many at once.
A very rough photoshopped example of how overlays might look in-game: