Skip to content

Commit

Permalink
Merge branch 'netniV-MapKey'
Browse files Browse the repository at this point in the history
  • Loading branch information
tashcan committed Jan 13, 2024
2 parents 9c5a2ff + 5343fbe commit f820c78
Show file tree
Hide file tree
Showing 39 changed files with 1,856 additions and 492 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.vscode/
.vs/
out/
build/
/out/
/build/
*.code-workspace
/.cache/
compile_commands.json
compile_commands.json
version.aps
*.vars
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Change Log

## 0.6.0

- Add customisable hotkeys
- Prevent ship 'locate' functionality when viewing nodes
- Add manage ship key ('N')
- Add repair ship key ('R')
- Add show resarch key ('U')
- Add example configuration file
- Adjust runtime configuration output:
- Rename 'community_patch_settings_parsed.toml' to 'community_patch_runtime.vars' to avoid confusion
- Add a massive comment to top of community_patch_runtimes.vars
- Add ui_scale_adjust to allow changes to "step" between ui_scale's
- Make ui_scaleup/ui_scaldown operate like zoom and can now be held
- Add session-based adjustments that last until game is restarted:
- Add toggle cargo views (ALT 1-5)
- Add set zoom preset (SHIFT F1-F5)

## 0.5.2

- fix free resize not working anymore
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ SET(TARGET_SRC
src/version.cc
src/utils.cc
src/il2cpp/il2cpp_helper.cc
src/patches/key.cc
src/patches/modifierkey.cc
src/patches/mapkey.cc
src/patches/config.cc
src/patches/patches.cc
)
Expand Down
58 changes: 33 additions & 25 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
}
]
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ]
},
{
"name": "x64-ReleaseWithDebug",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ]
}
]
}
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ prompt:

```console
cd C:\Games\Star Trek Fleet Command\Star Trek Fleet Command\default\game
<<<<<<< HEAD
mklink [output folder]\stfc-community-patch.dll version.dll
=======
mklink [output folder]\stfc-communty-patch.dll version.dll
>>>>>>> 4f7972cf957addac6e61800c10e4208b6cf1a7a0
```

If you do link the file, please note you will need to close the game to recompile.
Expand Down
84 changes: 84 additions & 0 deletions KEYMAPPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Star Trek Fleet Command - Community Patch

<p align="center">
<img src="https://img.shields.io/badge/License-GPLv3-blue.svg" alt="License: GPLv3">
</p>

<p align="center">
A community patch that adds a couple of tweaks to the mobile game <b>Star Trek Fleet Command&#8482;</b>
</p>

> [!NOTE]
> The code here is a bit of a mess right now, I will be gradually going through and cleaning it up over the next couple of weeks.
## Valid shortcut key strings

Each game function can be assigned a shortcut KEY (with the exception of escape that is fixed).

To use a Modifier, combine it with a single KEY (and optionally other modifiers) separated by a minus symbol:

Value | Keys Required
--: | :--
"SHIFT-Q" | (Left Or Right) Shift + Q
"ALT-LSHIFT-T" | (Left Or Right) Alt + Left Shift + T
"Q" | Q (no Shift, Ctrl, etc)

### Modifiers

Modifiers are not required, any specified must be used together:

Value | Key | Value | Key | Value | Key
--: | :-- | --: | :-- | --: | :--
"SHIFT" | LeftShirt or RightShift | "LSHIFT" | LeftShift | "RSHIFT" | RightShift
"CTRL" | LeftControl or RightControl | "LCTRL" | LeftControl | "RCTRL" | RightControl
"ALT" | LeftAlt or RightAlt | "LALT" | LeftAlt | "RALT" | RightAlt
"WIN" | LeftWindows or RightWindows | "LWIN" | LeftWindows | "RWIN" | RightWindows
"ALTGR" | AltGr

### Keys

Only key can be set at one time:

Value | Key | Value | Key | Value | Key | Value | Key
--: | :-- | --: | :-- | --: | :-- | --: | :--
"HOME" | Home | "END" | End | "PGUP" | PageUp | "PGDOWN" | PageDown
"LEFT" | LeftArrow | "RIGHT" | RightArrow | "UP" | UpArrow | "DOWN" | DownArrow
"BACKSPACE" | Backspace | "CLEAR" | Clear | "CAPS" | CapsLock | "BREAK" | Break
"INSERT" | Insert | "DELETE" | Delete | "HELP" | Help | "MENU" | Menu
"PAUSE" | Pause | "PRINT" | Print | "SPACE" | Space | "RETURN" | Return
"SCROLL" | ScrollLock | "SYSREQ" | SysReq | "TAB" | Tab | "SPACE" | Space
"MOUSE0" | Mouse0 | "MOUSE1" | Mouse1 | "MOUSE2" | Mouse2 | "MOUSE3" | Mouse3
"MOUSE4" | Mouse4 | "MOUSE5" | Mouse5 | "MOUSE6" | Mouse6 | "MINUS" | Minus |
"'" | Quote | "_" | Underscore | "," | Comma | "." | Period
";" | Semicolon | ":" | Colon | "!" | Exclaim | "?" | Question
"(" | LeftParen | ")" | RightParen | "[" | LeftBracket | "]" | RightBracket
"{" | LeftCurlyBracket | "}" | RightCurlyBracket | "@" | At | "*" | Asterisk
"/" | Slash | "\" | Backslash | "\"" | DoubleQuote | "&" | Ampersand
"#" | Hash | "%" | Percent | "`" | BackQuote | "^" | Caret
"+" | Plus | "<" | Less | "=" | Equals | ">" | Greater
"|" | Pipe | "~" | Tilde | "$" | Dollar | - | -
"F1" | F1 | "F2" | F2 | "F3" | F3 | "F4" | F4
"F5" | F5 | "F6" | F6 | "F7" | F7 | "F8" | F8
"F9" | F9 | "F10" | F10 | "F11" | F11 | "F12" | F12
"F13" | F13 | "F14" | F14 | "F15" | F15
"0" | Alpha0 | "1" | Alpha1 | "2" | Alpha2 | "3" | Alpha3
"4" | Alpha4 | "5" | Alpha5 | "6" | Alpha6 | "7" | Alpha7
"8" | Alpha8 | "9" | Alpha9
"A" | A | "B" | B | "C" | C | "D" | D
"E" | E | "F" | F | "G" | G | "H" | H
"I" | I | "J" | J | "K" | K | "L" | L
"M" | M | "N" | N | "O" | O | "P" | P
"Q" | Q | "R" | R | "S" | S | "T" | T
"U" | U | "V" | V | "W" | W | "X" | X
"Y" | Y | "Z" | Z
"KEY0" | Keypad0 | "KEY1" | Keypad1 | "KEY2" | Keypad2 | "KEY3" | Keypad3
"KEY4" | Keypad4 | "KEY5" | Keypad5 | "KEY6" | Keypad6 | "KEY7" | Keypad7
"KEY8" | Keypad8 | "KEY9" | Keypad9 | "KEYDIVIDE" | KeypadDivide | "KEYENTER" | KeypadEnter
"KEYEQUAL" | KeypadEquals | "KEYMINUS" | KeypadMinus | "KEYMULTI" | KeypadMultiply | "KEYPERIOD" | KeypadPeriod
"KEYPLUS" | KeypadPlus | "NUMLOCK" | Numlock

**NOTE**: Default shortcuts are shown in the [README.md](README.md)

## License

- GPLv3
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## Features

- Set system UI scale
- Set system UI scale + adjustment factor
- Set system zoom
- default
- maximum
Expand All @@ -35,9 +35,12 @@
- Exit section when collecting gifts
- Create default toml file settings file if none exists
- Create parsed toml file to show what settings have been applied
- Customise your keyboard shortcuts

## Keyboard shortcuts

The following are default shortcuts that can be modified (see [KEYMAPPING.md](KEYMAPPING.md))

Key | Shortcut
--: | ---
SPACE | Perform default action
Expand All @@ -53,6 +56,8 @@ R | When clicking on mine/player/enemy, perform non-default action (eg, scan)
V | When clicking on mine/player/enemy, toggle view of cargo or default screen
C | Focus Chat (or Open Alliance Chat - Full Screen)
Alt-C | Focus Chat (or Open Alliance Chat - Side of Screen)
PGUP | UI Scale Up
PGDOWN | UI Scale Down

The following keybinds have recently been added:

Expand Down Expand Up @@ -96,7 +101,7 @@ The pre-compiled DLL can be downloaded from the official assets hosted on [GitHu

An example configuration file is [example_community_patch_settings.toml](example_community_patch_settings.toml) and should be
renamed to `community_patch_settings.toml`. When running this file will be parsed (see `community_patch.log`) and the running
values can be found in `community_patch_settings_parsed.toml`. If you have any problems with a setting, check the log and parsed
values can be found in `community_patch_runtime.vars`. If you have any problems with a setting, check the log and parsed
file to verify that the setting was applied.

## Problems?
Expand Down Expand Up @@ -130,7 +135,7 @@ The most common problems getting the DLL to work are:
- The configuration option name is in the wrong section
- The configuration option value is not a true or false

You can verify your configuration by looking at `community_patch_settings_parsed.toml` and/or the
You can verify your configuration by looking at `community_patch_runtime.vars` and/or the
log file `community_patch.log`.

## Disclaimer
Expand Down
Loading

0 comments on commit f820c78

Please sign in to comment.