Jump to content

[WIP] [1.12.x] HUDReplacer - (v1.2.11-beta)


UltraJohn

Recommended Posts

41 minutes ago, Nazalassa said:

Should allow us to get rid of all these issues with misaligned pixels because the texture is 1 pixel too wide :)

I think the problem is that a lot of HUD elements reference the same texture object, so changing one changes it for all elements. Like how the pause menu buttons reference the same texture as the pause menu background (if i remember correctly), but one of them are stretched to fill the entire background. if you were to change the size of that background texture, you'll squish the button texture together instead.

Link to comment
Share on other sites

8 minutes ago, UltraJohn said:

I think the problem is that a lot of HUD elements reference the same texture object, so changing one changes it for all elements. Like how the pause menu buttons reference the same texture as the pause menu background (if i remember correctly), but one of them are stretched to fill the entire background. if you were to change the size of that background texture, you'll squish the button texture together instead.

Yes, but for stuff that only appears once and/or are not stretched, it doesn't really matter.

Link to comment
Share on other sites

6 minutes ago, Nazalassa said:

Yes, but for stuff that only appears once and/or are not stretched, it doesn't really matter.

That's true I guess, but I also wonder how it would affect using a non-100% UI scale in the settings?

Link to comment
Share on other sites

....And today on colors that are cursed:

Spoiler

UIajbqz.png

The winner is... That bottom pink text that's impossible to read! :D 

 

Colorable Speed text and heading text is also coming in the next update.. Stay tuned. Soon™

Rs9UuFa.png

Edited by UltraJohn
Link to comment
Share on other sites

 1.2.5-beta is released.

https://github.com/UltraJohn/HUDReplacer/releases/tag/1.2.5-beta

 

What's Changed

  • Added Navball Speed/Text recolor support
  • Added Navball Heading recolor support
  • Added Navball cursor recolor support
  • Added Stage and Total deltaV recolor support

 

These are the currently possible recolor options:

HUDReplacerRecolor:NEEDS[HUDReplacer]
{
	priority = 1
	tumblerColorPositive = 0,1,0,1 // RGBA values from 0-1
	tumblerColorNegative = 0,0,1,1
	PAWTitleBar = 0,0,1,1
	KALTitleBar = 0,1,1,1
	gaugeNeedleYawPitchRoll = 1,0,0,1
	gaugeNeedleYawPitchRollPrecision = 0,1,0,1
	METDisplayColorRed = 0,0,1,1
	METDisplayColorYellow = 1,0,1,1
	METDisplayColorGreen = 0,1,1,1
	speedDisplayColorText = 1,0,0,1
	speedDisplayColorSpeed = 1,1,0,1
	navBallHeadingColor = 0,1,1,1
	stageTotalDeltaVColor = 1,0,0,1
	stageGroupDeltaVTextColor = 0,1,0,1
	stageGroupDeltaVNumberColor = 0,0,1,1
	navballCursor = 1,0,0,1
}

 

Link to comment
Share on other sites

On 6/9/2023 at 11:33 AM, zapsnh said:

You can replace the navball texture without NavBallTextureChanger, it's navball#512x256.png. AFAIK HUDReplacer only supports 512x256 textures while NavBallTextureChanger supports up to 1024x512 and it doesn't replace the IVA navball.

(also HUDReplacer can replace other things, not just the HUD *cough* *cough* *cough*)
(just realized that it's very similar to TextureReplacer since it can replace planet textures, skybox, and kerbal heads))

Tried in two steps first navball.png then NavBall.png after a double check with the debug mode and it works!
Quality is really better with a higher texture size, numbers are a bit blurry with the stock texture.

Link to comment
Share on other sites

  • 2 weeks later...

New to forum, but not to KSP - so hey, I guess. I recently found your mod while looking for new ui, so I decided to make my own (because that's easier, obviously /s). Still very early WIP, but I thought I may share and also ask @UltraJohn whenever it would be possible to add support for recoloring vertical speed gauge (it's orange) and stage numer / tumbler (black)?

Below some screens and YT video to show how it looks while playing:

tSYquAl.png

sFA0rRT.png

Also, shutout to @zapsnh I used your files to get up to speed quickly in some cases, to see what's where :P Thank you

Link to comment
Share on other sites

Hey there and welcome! @Senshi_Isamu:)

I love what you did with the navball, looks very interesting and sleek. Can't wait to see what it'll look like in its finished state!

1 hour ago, Senshi_Isamu said:

add support for recoloring vertical speed gauge (it's orange) and stage numer / tumbler (black)?

Definetely. Just to be clear about which things you are talking about. You mean these?

zlHB0bb.png

And the orange needle (I believe you can recolor this through the texture itself?)

WlhVpoQ.png

Same goes for the tumbler. (FlightTopBarExtended_ASL_AGL_with_shadows) Unless you're talking about a different one, do let me know.

Edited by UltraJohn
Link to comment
Share on other sites

57 minutes ago, UltraJohn said:

Definetely. Just to be clear about which things you are talking about. You mean these?

zlHB0bb.png

And the orange needle (I believe you can recolor this through the texture itself?)

WlhVpoQ.png

Same goes for the tumbler. (FlightTopBarExtended_ASL_AGL_with_shadows) Unless you're talking about a different one, do let me know.

Thanks! Navball was nightmare to get right. So many concepts, so many limitations, but yeah, I'm pretty happy myself with where it ended

As for the stage / tumbler, I mean only this one (but what you marked could also be useful): 
Nu8j7Ro.png

And the orange needle you got right. It's white in texture, so game is definitely recoloring it for whatever reason :/

Link to comment
Share on other sites

43 minutes ago, Senshi_Isamu said:

Thanks! Navball was nightmare to get right. So many concepts, so many limitations, but yeah, I'm pretty happy myself with where it ended

As for the stage / tumbler, I mean only this one (but what you marked could also be useful): 
Nu8j7Ro.png

And the orange needle you got right. It's white in texture, so game is definitely recoloring it for whatever reason :/

Alright, I'll take a look at getting these added then :)

Link to comment
Share on other sites

  1.2.6-beta is released.

https://github.com/UltraJohn/HUDReplacer/releases/tag/1.2.6-beta

 

What's Changed

  • Added StageTumbler recolor support. It uses the same definition as used for the AltitudeTumbler's positive color (tumblerColorPositive)
  • Added VerticalSpeedGauge needle recolor support.
verticalSpeedGaugeNeedleColor = 0,0,0,1 // RGBA
Link to comment
Share on other sites

For some unknown reason, the textures for Hudreplacer do not work at all. I have installed Ztheme and two of the slim navball cursor mods. Neither worked.

  • Hudreplacer itself appears to be loaded after looking in ksp logs and turning on the toolbar debugger
  • After reinstalling a couple times, the color of the font for the altimeter changed from black to white
  • I have the most recent versions of Harmony, Hudreplacer, Ztheme, and modulemanager
  • Filepath for Ztheme was KSP>Gamedata>Ztheme>individual folders with textures
  • I have noticed that my installation of Ztheme, nor SlimNavballMarkers does not have the PluginData folder
  • All of my mods are downloaded manually from github
  • I have no idea if i sohuld send my ksp logs, or how, as this is my first post

I appreciate any help.

Edited by throwaway 13
added on a specification for installation method
Link to comment
Share on other sites

51 minutes ago, throwaway 13 said:

For some unknown reason, the textures for Hudreplacer do not work at all. I have installed Ztheme and two of the slim navball cursor mods. Neither worked.

  • Hudreplacer itself appears to be loaded after looking in ksp logs and turning on the toolbar debugger
  • After reinstalling a couple times, the color of the font for the altimeter changed from black to white
  • I have the most recent versions of Harmony, Hudreplacer, Ztheme, and modulemanager
  • Filepath for Ztheme was KSP>Gamedata>Ztheme>individual folders with textures
  • I have noticed that my installation of Ztheme, nor SlimNavballMarkers does not have the PluginData folder
  • All of my mods are downloaded manually from github
  • I have no idea if i sohuld send my ksp logs, or how, as this is my first post

I appreciate any help.

Hello! Can you post your KSP.log? It's in the KSP root folder next to the KSP exe.

Edited by UltraJohn
Link to comment
Share on other sites

11 hours ago, throwaway 13 said:

Thanks. The issue you're having lies with your installation of SlimNavballMarkers. I just redownloaded it and it's working fine for me. I can see that in your log it's complaining about the file path for this mods texture files, that it does not exist.

[EXC 19:35:32.805] DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\GameData\UJModlets\SlimNavballMarkers\textures'.

You may have accidentally deleted something from there. Could you try reinstalling it, and see if it works?

 

Edit: You installed it incorrectly. SlimNavballMarkers is supposed to be inside the folder UJModlets, not directly inside GameData. A reinstall will fix it. Just make sure to extract and merge the GameData folder from the zip to KSP's GameData :)

 

Edited by UltraJohn
Link to comment
Share on other sites

BTW, @Nazalassa @zapsnh @Senshi_Isamuand everyone else who wants to make their own config. I have done a little research about optimizing memory usage and what I've found is that you should make sure to put your texture folders into a directory called PluginData. This will make KSP not load the contents of this directory and all of its subdirectories into the GameDatabase, which saves slightly on memory usage.

All you need to do is create a new folder named PluginData in your root folder of the mod where the cfg file is, and move all your existing folders into that. Then ofcourse remember to update your cfg filepaths.

For example that would be:
 

GameData/NazTheme/UI -> GameData/NazTheme/PluginData/UI

GameData/NazTheme/Editor -> GameData/NazTheme/PluginData/Editor

and so on... I will update the github readme to include this information :)

Edited by UltraJohn
Link to comment
Share on other sites

4 hours ago, UltraJohn said:

Thanks. The issue you're having lies with your installation of SlimNavballMarkers. I just redownloaded it and it's working fine for me. I can see that in your log it's complaining about the file path for this mods texture files, that it does not exist.

[EXC 19:35:32.805] DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\GameData\UJModlets\SlimNavballMarkers\textures'.

You may have accidentally deleted something from there. Could you try reinstalling it, and see if it works?

 

Edit: You installed it incorrectly. SlimNavballMarkers is supposed to be inside the folder UJModlets, not directly inside GameData. A reinstall will fix it. Just make sure to extract and merge the GameData folder from the zip to KSP's GameData :)

 

that one change fixed everything. Thanks for the help!

Link to comment
Share on other sites

On 7/3/2023 at 2:02 PM, UltraJohn said:

BTW, @Nazalassa @zapsnh @Senshi_Isamuand everyone else who wants to make their own config. I have done a little research about optimizing memory usage and what I've found is that you should make sure to put your texture folders into a directory called PluginData. This will make KSP not load the contents of this directory and all of its subdirectories into the GameDatabase, which saves slightly on memory usage.

All you need to do is create a new folder named PluginData in your root folder of the mod where the cfg file is, and move all your existing folders into that. Then ofcourse remember to update your cfg filepaths.

For example that would be:
 

GameData/NazTheme/UI -> GameData/NazTheme/PluginData/UI

GameData/NazTheme/Editor -> GameData/NazTheme/PluginData/Editor

and so on... I will update the github readme to include this information :)

Actually, putting '#'s in the texture names cause the game to treat it like HTML anchors, so for example if you name your texture  hellotex#32x32.png  it will look for a texture named  hellotex , which it will not find, thus loading nothing. As I always put the side of the texture in the filename, I think it just doesn't load them.

Spoiler

I think it does spam the log with errors, but that's not that important, right?

Link to comment
Share on other sites

1 hour ago, Nazalassa said:

Actually, putting '#'s in the texture names cause the game to treat it like HTML anchors, so for example if you name your texture  hellotex#32x32.png  it will look for a texture named  hellotex , which it will not find, thus loading nothing. As I always put the side of the texture in the filename, I think it just doesn't load them.

I think you talked about that a while back about some stock textures having an error during loading? Are you sure it's not just the same stock issue? (Or was that zap? I forget lol)

But anyway it shouldn't be an issue as long as you use a folder named PluginData to store all the textures, since this specific folder name (alongside some other ones) is ignored by KSP and thus not loaded into memory. Have you tried that and still getting the same problem?

Edited by UltraJohn
Link to comment
Share on other sites

29 minutes ago, Nazalassa said:

Anyways, I wonder... Is there a way to delete the altimeter, the navball, etc. ?

What devious plans are you working on? :D 

But yeah you'd have to be careful how you do that. Any mod depending on it existing might become problematic. I guess you could write a dll that sets those gameobjects to hidden somehow, without actually destroying it. Or you could possibly set the screen position offscreen so it's "invisible".

Link to comment
Share on other sites

3 minutes ago, UltraJohn said:

I guess you could write a dll that sets those gameobjects to hidden somehow

That would require me being able to compile a dll first :) but I'll see what I can do.

(stereographic-projection navball coming lol)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...