-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Codenade/dev
merge changes
- Loading branch information
Showing
31 changed files
with
1,995 additions
and
1,228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "ksp2-inputbinder-assets"] | ||
path = ksp2-inputbinder-assets | ||
url = https://github.com/Codenade/ksp2-inputbinder-assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,109 @@ | ||
# ksp2-inputbinder | ||
# ksp2-inputbinder | ||
|
||
ksp2-inputbinder is a mod for [Kerbal Space Program 2](https://en.wikipedia.org/wiki/Kerbal_Space_Program_2). | ||
|
||
### Jump to section | ||
|
||
* [Configuration](#configuration) | ||
* [How to install](#how-to-install) | ||
* [How to build](#how-to-build) | ||
|
||
This mod makes it possible to use gamepads for controlling your vessel. Additionally, it brings UI for configuring input actions, which lets the user make more detailed changes. | ||
|
||
![Settings Panel](https://github.com/Codenade/Codenade/blob/main/ksp2-inputbinder-panel.png?raw=true) | ||
|
||
## Configuration | ||
|
||
The mod settings can be accessed in-game in the flight view. | ||
|
||
![AppBar](https://github.com/Codenade/Codenade/blob/05bb56f4755e55ecd7953ca2ef4baf3d16695c7f/ksp2-inputbinder-appbar.png?raw=true) | ||
|
||
### Custom actions | ||
|
||
#### Throttle | ||
* Throttle Axis: Control your throttle as an axis | ||
|
||
#### Trim | ||
Dedicated actions to change the trim | ||
* Pitch Trim | ||
* Roll Trim | ||
* Yaw Trim | ||
* Trim Reset | ||
|
||
### Included game actions | ||
|
||
* Throttle Delta | ||
* Throttle Cutoff | ||
* Throttle Max | ||
* Pitch | ||
* Roll | ||
* Yaw | ||
* Toggle Precision Mode | ||
* Wheel Steer | ||
* Wheel Brakes | ||
* Wheel Throttle | ||
* Stage | ||
* Toggle Landing Gear | ||
* Toggle Lights | ||
* Toggle SAS | ||
* Toggle RCS | ||
* Translate X | ||
* Translate Y | ||
* Translate Z | ||
* Trigger Action Group 1 | ||
* Trigger Action Group 2 | ||
* Trigger Action Group 3 | ||
* Trigger Action Group 4 | ||
* Trigger Action Group 5 | ||
* Trigger Action Group 6 | ||
* Trigger Action Group 7 | ||
* Trigger Action Group 8 | ||
* Trigger Action Group 9 | ||
* Trigger Action Group 10 | ||
* Camera Pitch Gamepad | ||
* Camera Yaw Gamepad | ||
* Show Map | ||
* Quick Save | ||
* Time Warp Decrease | ||
* Time Warp Increase | ||
* Time Warp Stop | ||
* Toggle Pause Menu | ||
* Toggle UI Visibility | ||
|
||
### Reset the configuration | ||
|
||
To reset the configuration delete `input.json` from `Kerbal Space Program/GameData/Mods/inputbinder`. | ||
|
||
### Other | ||
|
||
For more information see: https://github.com/Codenade/ksp2-inputbinder/wiki | ||
|
||
## How to install | ||
|
||
### Prerequisites | ||
|
||
* [BepInEx](https://docs.bepinex.dev/articles/user_guide/installation/index.html) | ||
|
||
### Instructions | ||
|
||
* unpack the contents of `build.zip` into your KSP 2 installation (eg. `C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program 2`) | ||
|
||
## How to build | ||
|
||
### Prerequisites | ||
|
||
* [.NET Framework 4.7.2](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net472) | ||
* [Unity 2020.3.33](https://unity.com/releases/editor/archive) | ||
* [BepInEx](https://docs.bepinex.dev/articles/user_guide/installation/index.html) installed to your installation of KSP 2 | ||
|
||
### Instructions | ||
|
||
* clone this repository to a location of your liking | ||
|
||
* initialize submodules `git submodule --init --recursive --remote` | ||
|
||
* change the path to your unity installation (2020.3.33) after `echo Building assets` in `build.bat` | ||
|
||
* add a new environment variable named `KSP2_PATH` with the value set to the path to your installation of KSP 2 (eg. `C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program 2`) | ||
|
||
* run `build.bat` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@echo off | ||
SETLOCAL EnableDelayedExpansion | ||
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do ( | ||
set "DEL=%%a" | ||
) | ||
powershell rm "$PWD\build\build.zip" | ||
echo Starting assembly build | ||
dotnet build >> %CD%/build.log | ||
if errorlevel 1 goto ERROR | ||
call :colorEcho 0A "Assembly build finished" | ||
echo. | ||
echo Building assets | ||
"%ProgramFiles%\Unity\Hub\Editor\2020.3.33f1\Editor\Unity.exe" -projectPath "%CD%\ksp2-inputbinder-assets\" -quit -batchmode -executeMethod BuildAssets.PerformBuild >> %CD%/build.log | ||
if errorlevel 1 goto ERROR | ||
xcopy "%CD%\ksp2-inputbinder-assets\Library\com.unity.addressables\aa\Windows\" "%CD%\build\\GameData\Mods\inputbinder\addressables\" /Y /I /E >> %CD%/build.log | ||
call :colorEcho 0A "Building assets finished" | ||
echo. | ||
echo Creating build.zip | ||
powershell Compress-Archive -Path "$PWD\build\*" -DestinationPath "$PWD\build\build.zip" >> %CD%/build.log | ||
call :colorEcho 0A "Done" | ||
echo. | ||
exit /b 0 | ||
|
||
:ERROR | ||
call :colorEcho 0C "Build failed" | ||
echo. | ||
exit /b 1 | ||
|
||
:colorEcho | ||
echo off | ||
<nul set /p ".=%DEL%" > "%~2" | ||
findstr /v /a:%1 /R "^$" "%~2" nul | ||
del "%~2" > nul 2>&1i |
Submodule ksp2-inputbinder-assets
added at
05ec24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.