|
1 | | -# HUDReplacer (WIP) |
| 1 | +# HUDReplacer |
2 | 2 |
|
3 | 3 | This is a framework for Kerbal Space Program that allows you to replace HUD/UI textures at runtime. |
4 | 4 |
|
5 | | -## Requirements |
6 | | -[Module Manager](https://forum.kerbalspaceprogram.com/index.php?/topic/50533-*) |
| 5 | +## Download |
| 6 | +[GitHub][gh-download] | CKAN |
7 | 7 |
|
8 | | -[HarmonyKSP](https://github.com/KSPModdingLibs/HarmonyKSP) |
| 8 | +[gh-download]: https://github.com/KSPModStewards/HUDReplacer/releases/latest |
9 | 9 |
|
| 10 | +## Dependencies |
| 11 | +These are not included in the download and must be installed separately |
| 12 | +(or you can just use CKAN). |
10 | 13 |
|
11 | | -## How to create texture packs |
12 | | -Creating texture packs is quite simple. All you need is a folder containing your new textures and a single config file with the following: |
13 | | -``` |
14 | | -HUDReplacer:NEEDS[HUDReplacer] |
15 | | -{ |
16 | | - filePath = GameData/HUDReplacer/PluginData/ |
17 | | - priority = 0 |
18 | | - onScene = SPACECENTER |
19 | | -} |
20 | | -``` |
21 | | -* <strong>filePath</strong> <em>\<string></em> |
22 | | - ``` |
23 | | - The path to your texture folder. Files must be in PNG format. |
24 | | - ``` |
25 | | -* <strong>priority</strong> <em>\<int></em> |
26 | | - ``` |
27 | | - Priority of your texture pack in case of duplicate files. Higher number will take priority over other texture packs. |
28 | | - ``` |
29 | | -* <strong>onScene (optional)</strong> <em>\<int></em> |
30 | | - ``` |
31 | | - Specify a scene to only load this directory in. Useful if you want to change the visuals of the same texture depending on scene. Priority is still taken into consideration for this. |
32 | | - Valid options are: LOADING, LOADINGBUFFER, MAINMENU, SETTINGS, CREDITS, SPACECENTER, EDITOR, FLIGHT, TRACKSTATION, PSYSTEM, MISSIONBUILDER |
33 | | - ``` |
34 | | - NOTE: It is recommended to use a directory named PluginData as your root folder for textures, as it will let KSP know not to load it into its GameDatabase. Since HUDReplacer loads textures directly from disk, there is no reason to also load it into the database, which just makes it load every texture twice, wasting memory. |
| 14 | +* [Module Manager](https://forum.kerbalspaceprogram.com/index.php?/topic/50533-*) |
| 15 | +* [HarmonyKSP](https://github.com/KSPModdingLibs/HarmonyKSP) |
35 | 16 |
|
36 | | -There is also the option for recoloring some specific UI elements, which are not colored through the texture itself, but rather the code. This is due to some elements changing color depending on whats currently happening, such as the top left clock that changes text color depending on the games lag/performance. Below is an example config for all the possible recolor options. |
| 17 | +## How to Create Texture Packs |
| 18 | +Documentation on how to create texture packs, as well as how to recolor other |
| 19 | +UI elements, can be found in the [repository wiki][wiki]. |
37 | 20 |
|
38 | | -``` |
39 | | -HUDReplacerRecolor:NEEDS[HUDReplacer] |
40 | | -{ |
41 | | - priority = 1 |
42 | | - tumblerColorPositive = 1,1,1,1 |
43 | | - tumblerColorNegative = 1,1,1,1 |
44 | | - PAWTitleBar = 1,1,1,1 |
45 | | - PAWBlueButton = 1,1,1,1 |
46 | | - PAWBlueButtonToggle = 1,1,1,1 |
47 | | - PAWVariantSelectorNext = 1,1,1,1 |
48 | | - PAWVariantSelectorPrevious = 1,1,1,1 |
49 | | - PAWResourcePriorityIncrease = 1,1,1,1 |
50 | | - PAWResourcePriorityDecrease = 1,1,1,1 |
51 | | - PAWResourcePriorityReset = 1,1,1,1 |
52 | | - PAWFuelSliderColor = 1,1,1,1 |
53 | | - PAWFuelSliderTextColor = 1,1,1,1 |
54 | | - KALTitleBar = 1,1,1,1 |
55 | | - gaugeNeedleYawPitchRoll = 1,1,1,1 |
56 | | - gaugeNeedleYawPitchRollPrecision = 1,1,1,1 |
57 | | - METDisplayColorRed = 1,1,1,1 |
58 | | - METDisplayColorYellow = 1,1,1,1 |
59 | | - METDisplayColorGreen = 1,1,1,1 |
60 | | - speedDisplayColorText = 1,1,1,1 |
61 | | - navBallHeadingColor = 1,1,1,1 |
62 | | - speedDisplayColorSpeed = 1,1,1,1 |
63 | | - stageTotalDeltaVColor = 1,1,1,1 |
64 | | - stageGroupDeltaVTextColor = 1,1,1,1 |
65 | | - stageGroupDeltaVNumberColor = 1,1,1,1 |
66 | | - stageGroupDeltaVBackgroundColor = 1,1,1,1 |
67 | | - navballCursor = 1,1,1,1 |
68 | | - verticalSpeedGaugeNeedleColor = 1,1,1,1 |
69 | | - maneuverNodeEditorTextColor = 1,1,1,1 |
70 | | - stageEngineFuelGaugeTextColor = 1,1,1,1 |
71 | | - stageEngineHeatGaugeTextColor = 1,1,1,1 |
72 | | - stageEngineFuelGaugeBackgroundColor = 1,1,1,1 |
73 | | - stageEngineHeatGaugeBackgroundColor = 1,1,1,1 |
74 | | - stageEngineFuelGaugeFillColor = 1,1,1,1 |
75 | | - stageEngineHeatGaugeFillColor = 1,1,1,1 |
76 | | - stageEngineFuelGaugeFillBackgroundColor = 1,1,1,1 |
77 | | - stageEngineHeatGaugeFillBackgroundColor = 1,1,1,1 |
78 | | - SASDisplayOnColor = 1,1,1,1 |
79 | | - SASDisplayOffColor = 1,1,1,1 |
80 | | - RCSDisplayOnColor = 1,1,1,1 |
81 | | - RCSDisplayOffColor = 1,1,1,1 |
82 | | - EditorCategoryButtonColor = 1,1,1,1 |
83 | | - EditorCategoryModuleButtonColor = 1,1,1,1 |
84 | | - EditorCategoryResourceButtonColor = 1,1,1,1 |
85 | | - EditorCategoryManufacturerButtonColor = 1,1,1,1 |
86 | | - EditorCategoryTechButtonColor = 1,1,1,1 |
87 | | - EditorCategoryProfileButtonColor = 1,1,1,1 |
88 | | - EditorCategorySubassemblyButtonColor = 1,1,1,1 |
89 | | - EditorCategoryVariantsButtonColor = 1,1,1,1 |
90 | | - EditorCategoryCustomButtonColor = 1,1,1,1 |
91 | | -} |
92 | | -``` |
| 21 | +[wiki]: https://github.com/KSPModStewards/HUDReplacer/wiki/Creating-Texture-Packs |
93 | 22 |
|
94 | | -## Example texture modding |
95 | | -Let's say we want to replace the texture for the Admin building in the KSC sidebar: |
96 | | - |
97 | | - |
98 | | - |
99 | | -To enable the developer features, go into GameData/HUDReplacer/Settings.cfg and change the setting **showDebugToolbar** from **false** to **true**. |
100 | | -After this, we can go ingame and click the HUDReplacer toolbar icon to enable debug mode. Now we can open the console and press D on the keyboard to log the name of the texture that the mouse is currently over. |
101 | | -In this case, we should get the result: |
102 | | - |
103 | | -`Image.mainTexture.name: Buttons_Admin - WxH=256x256` |
104 | | - |
105 | | -This tells us that the texture for the Admin building icon, is called `Buttons_Admin` and the dimensions of the file is 256x256. |
106 | | -Now we can go ahead and create our own texture, or possibly just recolor the original texture. |
107 | | - |
108 | | -We make sure to save our new texture as: `Buttons_Admin.png` and place it in our folder containing the new textures that we specified in the config file. |
109 | | -Start up the game and you should see the icon is now our new texture! |
110 | | - |
111 | | -In the case of a texture which has multiple versions that have the same name but different sizes (e.g. "rect_round_dark"), we must ensure that we append the dimensions of the texture to the filename, like this: |
112 | | -`rect_round_dark#64x64.png` or `rect_round_dark#69x69.png` otherwise, we will be replacing the wrong size texture and that will scale incorrectly. |
113 | | - |
114 | | -# Debug mode keybindings |
115 | | -* <strong>Q:</strong> <em>Reload all replaced textures</em> |
116 | | -* <strong>E:</strong> <em>Dump all textures in scene to ksp.log</em> |
117 | | -* <strong>D:</strong> <em>Get all textures currently over mouse</em> |
| 23 | +## License |
| 24 | +HUDReplacer is available under the GPLv3 license. |
0 commit comments