SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   DW Mod Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=196)
-   -   Sonar Color Display Change (https://www.subsim.com/radioroom/showthread.php?t=192726)

Fearless 02-21-12 08:52 PM

Sonar Color Display Change
 
Could anyone advise how I can change the Sonar Display Color from Orange to Blue in using a HEX Editor?

This would be greatly appreciated.

Krabb 02-22-12 04:01 AM

As posted by dasOoops from RedRogers you need two offsets:

Interfaces/NON_NUKE_SUB/SonarBB.dll, offset 0x16048: RR GG BB,
Interfaces/NON_NUKE_SUB/SonarNB.dll, offset 0x14184: RR GG BB.

I use HxD as HEX-editor.

Here's what you need to do:
  • Open the file.
  • Go to offset (press Ctrl+G, enter offset value without 0x prefix).
  • Set the color in 3 bytes, starting from the offset given.
    For SonarBB.dll there will be lines like:
    Code:

    Offset(h)  00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    00016030  E5 F7 30 27 00 00 00 00 00 00 00 00 00 00 00 00  å÷0'............
    00016040  59 00 00 00 58 00 00 00 FF 7D 00 00 00 FF 00 00  Y...X...ÿ}...ÿ..
    00016050  12 28 00 00 19 28 00 00 05 28 00 00 13 28 00 00  .(...(...(...(..

    I've marked the bytes you need, ignore cryptic symbols on the right. So, FF is hex-number for red, 7D - green and 00 - blue. Just replace them with hex-numbers for your color. But do not add any new bytes, just replace the existing!
  • Save the file.

Fearless 02-23-12 02:03 AM

Quote:

Originally Posted by Krabb (Post 1843325)
As posted by dasOoops from RedRogers you need two offsets:

Interfaces/NON_NUKE_SUB/SonarBB.dll, offset 0x16048: RR GG BB,
Interfaces/NON_NUKE_SUB/SonarNB.dll, offset 0x14184: RR GG BB.

I use HxD as HEX-editor.



Here's what you need to do:
  • Open the file.
  • Go to offset (press Ctrl+G, enter offset value without 0x prefix).
  • Set the color in 3 bytes, starting from the offset given.
    For SonarBB.dll there will be lines like:
    Code:

    Offset(h)  00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    00016030  E5 F7 30 27 00 00 00 00 00 00 00 00 00 00 00 00  å÷0'............
    00016040  59 00 00 00 58 00 00 00 FF 7D 00 00 00 FF 00 00  Y...X...ÿ}...ÿ..
    00016050  12 28 00 00 19 28 00 00 05 28 00 00 13 28 00 00  .(...(...(...(..

    I've marked the bytes you need, ignore cryptic symbols on the right. So, FF is hex-number for red, 7D - green and 00 - blue. Just replace them with hex-numbers for your color. But do not add any new bytes, just replace the existing!
  • Save the file.

Much appreciated...:up: I actually checked the Virginia class and used 00 AF FF for the colour change.

How or where could I do this change in the SonarDemon.dll?

Krabb 02-23-12 04:42 AM

If I'm not mistaken, for SonarDemon.dll offset is 0x00011064.

Fearless 02-23-12 05:08 PM

Quote:

Originally Posted by Krabb (Post 1843883)
If I'm not mistaken, for SonarDemon.dll offset is 0x00011064.

Thanks for that Krabb... I tried the setting changes but only the text Heading colour changed to Blue.. The waterfall remained unchanged (Orange).

Krabb 02-24-12 02:55 AM

There are two other offsets in SonarDemon.dll: 0x00011064 and 0x0001106C. The first should be for the font color, and others for the background color and the signal color.

You can find them yourself, in NON_NUKE_SUB there are two color versions for each sonar station: standard and with '_b" in the name. Just binary compare them. I used standard fc utility, it gives the following:
Code:

>fc /b SonarDemon.dll SonarDemon_b.dll

000027A1: FF 00
000027A2: 7D AF
000027A3: 00 FF
00011064: FF 00
00011065: 7D AF
00011066: 00 FF
0001106C: 00 FF
0001106D: FF 00

See all offsets I mentioned? Just compare the files and try the offsets found.

Fearless 02-27-12 02:53 AM

Much appreciated Krabb.

That worked.

tippership 07-10-13 05:04 AM

Seems i'm on a roll in bumping topics, but eh, there's a LOT of very good information i'm digging up on here- one can learn a lot...mostly.

Anyway, I want to attempt this- I wouldn't mind messing with the colors on the Jimmy Carter(in the RA mod) ,and seeing what sorts of cool BB colors i could get. Perhaps a bright yellow, or bright green(of a different shade than the LAs)..

So i grabbed the HXD Hex editor(I also have RA and DWEdit, not that DWEdit is of use in this particular task)

And I just realized something- these files are for all subs using these interfaces, arent they?

- while here i am, staring at the ssn21 interface dlls not sure how to locate the BB display, or what offsets actually affect what part of the interfaces- wouldn't this affect ALL subs using the interface? So it'd be all the seawolf subs, not just one. Because I'm betting that this is the generic interface thing where all subs that use the interface pull from. Also, looking at the virginia data in DWEdit....yea..

:hmmm:

Well, i'd only wanted to mess with ONE sub, instead of a whole class, but eh, i'll just copy the values and set them back when i'm done looking at the pretty colors if there are any to be found, so to speak.


So...let's see if i have this straight- if i want to change the colors of any sub's BB , i look for


Quote:

Interfaces/NON_NUKE_SUB/SonarBB.dll, offset 0x16048: RR GG BB,
Interfaces/NON_NUKE_SUB/SonarNB.dll, offset 0x14184: RR GG BB.
, and they'll be in every SonarBB.dll for each sub, eh?

:looks in the SonarBB.DLL for SSN21:

...nope.
::goes into DangerousWaters/Controllers.ini, does a Control-f search for SSN 21, looks for clues::
...nope

.....You know, I feel a bit ticked i can't figure this out ... :(


Anyway ,how would i locate which ....hex numbers do this in the different ships?

Control G on 14184 ...leads me to 14180- ah, 4 spaces to the right. K, I see how that works, as far as pointing you to where something is
and for that example below, it was 84, 85, and 86....
So, it really is no different, regardless of if i pick the SSN21 or another ship?



and if i ever had a idiot moment with the colors(when i get to that point, but i'm putting this as reference for anyone following my tracks in the future), i'd use http://www.mathsisfun.com/hexadecima...al-colors.html

...Okay, so the question is, how did Krabb know which offsets were the demon color ones?

..i'd love to be able to edit the narrowband colors as well(probably nothing else though, aside from that, demon, and BB - OH wait, active sonar..... that'd be boss...)

...Sorry. In any case,, is there a way for me to be able to tell which offsets control what? I can't just start messing around without knowing what i'm doing, naturally.....not with the .dlls.

Anyway, if the way one would discover and find out what offsets control what color is too complex/time consuming for someone like me just wanting to experiment with different menu colors... then I would simply like to know what the offsets are for the

BB, NB, Demon, SSP, active sonar, and active intercept, if someone can be bothered to find them. Well , i suppose the Demon and...bb? have already been posted...


Also , what is the fc utility? Does that somehow reveal what offsets deal in colors?

-Tippership

Ludarm Shulke 01-24-14 09:13 AM

Hi

I've found this topic looking to solve the same problem with my own little DW modification.

Im working with O.H.PERRY class frigate Towed Array station, making its shape like OJ-452/UYQ-21 acoustic display console (I hope all surface STG's familliar with AN/SQQ-89 would be pleased with it). Current progress is:

http://imagizer.imageshack.us/v2/800x600q90/12/7o46.png

..however, yet Im not happy with the display color which shall be green, so I try to make it like this:

http://imagizer.imageshack.us/v2/800...0/690/a2if.png

I have no experience with HEX-editors.. I tryed to follow directions described here above, but Im affraid the location for color settings (for FFG7 platform) is different from the example and I cannot move forward.. :/\\!!

If someone is familliar with that issue and could help me solve this problem - I will appreciate any support.

Greetings


All times are GMT -5. The time now is 10:09 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.