Skip to content

[Feature] set hotkeys (for example Ctrl-9 for PhotoMode) #76

Description

@okranger1777

Summary

I would like to be able to set hotkeys (for example Ctrl-9 for PhotoMode)

Confirm the following statements

  • I have checked that this feature is not already available in the latest release of NMSE.
  • I have searched the issue tracker and found no duplicate.
  • I have searched the documentation and found nothing matching this request.
  • This issue contains only one feature request.
  • I have read and agree to follow the code of conduct.

Description

I set hotkeys in each new save (for example Ctrl-9 for PhotoMode).

I would love NMSE to support this as well as Import/Export for sharing and reuse across saves.

As far as I know the options are not all fully documented anywhere but here is a summary of what I know from a script that works for me:

https://github.com/okranger1777/nms-mission-progress/blob/main/scripts/hotkeys.py

They are set in BaseContext PlayerStateData HotActions in 3 arrays of 10 (Player, Ship, Exocraft)

The toggles are the most simple, examples for Ship:

        { "Action": {"QuickMenuActions": "ThirdPersonShip"}, "Id": "^", "Number": 0, "InventoryIndex": {"X": -1, "Y": -1} }, 
        { "Action": {"QuickMenuActions": "CallFreighter"}, "Id": "^", "Number": 0, "InventoryIndex": {"X": -1, "Y": -1} }, 
        { "Action": {"QuickMenuActions": "SummonNexus"}, "Id": "^", "Number": 0, "InventoryIndex": {"X": -1, "Y": -1} }, 
        { "Action": {"QuickMenuActions": "PhotoMode"}, "Id": "^", "Number": 0, "InventoryIndex": {"X": -1, "Y": -1} } ]

PhotoMode works across all 3 but most are specific to each array, such as ThirdPersonCharacter ThirdPersonShip ThirdPersonVehicle.

Some require "Id" or "Number" to be set (discovered by setting manually in game):

        { "Action": {"QuickMenuActions": "Emote"}, "Id": "^EMOTE_WAVE", "Number": 0, "InventoryIndex": {"X": -1, "Y": -1} }, 
...
        { "Action": {"QuickMenuActions": "EconomyScan"}, "Id": "^", "Number": 1, "InventoryIndex": {"X": -1, "Y": -1} }, 

The recharge action sets InventoryIndex to the material to use (such as Ion Battery or Sodium) but it does not work reliably for me.

Use case

  • Easier than editing JSON
  • Document settings
  • Import/Export would allow sharing and reuse across saves

Desired outcome

Set Hotkeys

Acceptance criteria

  • Existing Hotkeys show in UI
  • Can set Hotkeys
  • Can Import/Export

Additional information

See description

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    • Status
      Planned Long Term Features

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions