Log in

View Full Version : Sonar contact lines and "Tails" - Colour info


oRGy
10-11-05, 07:34 AM
Hi;

For the next version of Improved U-Boat I've changed from the RuB model of contact lines and tails to a sort of 'vaguer SH3' style, where you the ship contact tails and icons are all there, but are only in black, so you still have to manually id' the ship to tell if its friendly, neutral, or enemy.

Now this was surprisingly easy, but doing this had the side-effect of making the sonar lines of warships the same colour (black) as merchants. Now, I am not altogether sure this is a bad thing, but I was wondering if there was a more elegant way to do this that would allow one to keep the sonar lines of warships red... The problem is that the file contline.tga is used for sonar lines, ship 'tails', and other things.

Any chance the colour info for all these things is stored in some easily accessible cfg file, or does anyone have some interesting tidbits of information?

Kpt. Lehmann
10-11-05, 08:24 AM
For the next version of Improved U-Boat I've changed from the RuB model of contact lines and tails to a sort of 'vaguer SH3' style, where you the ship contact tails and icons are all there, but are only in black, so you still have to manually id' the ship to tell if its friendly, neutral, or enemy.

Now this was surprisingly easy, but doing this had the side-effect of making the sonar lines of warships the same colour (black) as merchants. Now, I am not altogether sure this is a bad thing, but I was wondering if there was a more elegant way to do this that would allow one to keep the sonar lines of warships red... The problem is that the file contline.tga is used for sonar lines, ship 'tails', and other things.


:rock: :rock: :rock: I have hoped for a LONG time that there would be a mod that would do this! Way to go oRGy. I think the lines all being the same color is a GOOD thing. Besides if you take a moment to listen to the hydro yourself... there is no mistaking the high-speed screw sounds of the DD's...

...and I think that is really the only ship you need to worry about 98% of the time.

:up: :up: :up:

Kpt. Lehmann
10-11-05, 08:40 AM
Could you might release that as a separate mod or describe how we can build it? I'd like to go ahead and use it to get the feel for it.

... unless you feel it is "Top Secret." :cool:

oRGy
10-11-05, 12:45 PM
It's quite simple - open contline.tga and dashline.tga (in /data/menu/gui or thereabouts), with photoshop, invert colours, and save.

For the little "hand drawn ship" icons in the extreme zoomed in view, you do the same... they're in /data/Sea/whatever, and are usually called something like NBB_Blah_shp.tga. Also do this for submarines, etc. In RuB default these are blanked out so you don't see them.

Kpt. Lehmann
10-11-05, 12:49 PM
It's quite simple - open contline.tga and dashline.tga (in /data/menu/gui or thereabouts), with photoshop, invert colours, and save.

For the little "hand drawn ship" icons in the extreme zoomed in view, you do the same... they're in /data/Sea/whatever, and are usually called something like NBB_Blah_shp.tga. Also do this for submarines, etc. In RuB default these are blanked out so you don't see them.

Cool! Can I do the same thing in Irfanview by "converting to greyscale?"

oRGy
10-11-05, 01:00 PM
I don't think so - they have an alpha channel for transparency.

Kpt. Lehmann
10-11-05, 01:05 PM
Well crud... that cuts me out since I don't have photoshop.

I'll give it a shot though... if it causes a CTD... that will be the answer... will post back.

I love the idea though... It still causes you to identify cons without losing them from the map alltogether... I mean your watch crew SHOULD be watching and have an easier time of identifying the close cons.

Kpt. Lehmann
10-11-05, 01:41 PM
HEY IT WORKS!!! I just used "decrease color depth" instead of "convert to greyscale" and set it to "2" (black and white) in Irfanview.

Sonar contact lines for all merchant ships and warships are now black fading to grey... will do the same for subs later too.

Later I will convert all contact colors to be the same...

NOW you will have to be reeeeaally careful not to torp neutral ships! :P

oRGy, If I get to it quick enough would you mind if I put these files together as a mod and credited you? (It might be 2-3 days, maybe tonight if the forum slows down.)

oRGy
10-11-05, 01:47 PM
I don't mind at all. :)

Remember you'll have to edit the icons for all ships, subs, and planes.

Kpt. Lehmann
10-11-05, 01:56 PM
I don't mind at all. :)

Remember you'll have to edit the icons for all ships, subs, and planes.

Roger that and thanks... lol I would have forgotten the planes. :sunny:

Kpt. Lehmann
10-11-05, 10:14 PM
Well oRGy,

I just spent 3 hours repeating the above for all planes, subs, and boats....

:damn: :damn: :damn:

I think part of the problem was I overlayed stock _shp tga's with RUb 1.44 files before reducing them to two colors.

I wound up with only little boxes for cons with no tails... and NO cons at all at short range. No offense Beery, but that's quite backwards.

Sonar lines still work though.

I've been chasing "all grey cons" since I first started watching this forum. :shifty:

I'll do some more experimenting tonight, but won't be able to come back to it until Thursday when I get back from work.

Rubini
10-11-05, 10:24 PM
Hi oRGy,
Hi Kpt. Lehmann,

I think that you have to release this work for the stock game too. It's a must have one!
Please release it! :rock: :rock:


Rubini.

Kpt. Lehmann
10-11-05, 11:53 PM
Hi oRGy,
Hi Kpt. Lehmann,

I think that you have to release this work for the stock game too. It's a must have one!
Please release it! :rock: :rock:


Rubini.

No worries Admiral Rubini sir! We will keep at it. :sunny:

I am going to try doing a stock version first to practice a bit.

Kpt. Lehmann
10-13-05, 08:13 AM
I will be back at work on this topic late today. :know:

Gairith
10-13-05, 11:57 AM
Myros made a mod like this awhile back, still works with SH3 v1.4b and RUB v1.43

http://www.subsim.com/phpBB/viewtopic.php?t=32213

Kpt. Lehmann
10-13-05, 12:24 PM
Myros made a mod like this awhile back, still works with SH3 v1.4b and RUB v1.43

http://www.subsim.com/phpBB/viewtopic.php?t=32213

Yes sir. I am using that mod as a basis for my work. It only changes contact colors at certain ranges though. It is not all inclusive.

I have just gotten adobe photoshop... have been needing it for ages anyway. It may take me a few days to get used to it... but I will continue until I get it right. :|\

remilton
10-13-05, 09:56 PM
Yes sir. I am using that mod as a basis for my work. It only changes contact colors at certain ranges though. It is not all inclusive.

I have just gotten adobe photoshop... have been needing it for ages anyway. It may take me a few days to get used to it... but I will continue until I get it right. :|\

I am working on this also, as I personaly like the ship icon schetches at the higher mags on the map screen.

I do wish they were grey all though, or at least the same color, which might be why they are removed in RUB. :ping: Or it could be I just don't understand how to properly plot, ( :oops: ) but I do know I don't like the ships that I and my officers have identified and plotted to dissapear at high zooms. :down: Kind of looses something for me.

Have you determined how to remove the (friend or foe) colors from these icons? I have tried manipulating the TGA files but it seems the colors are determined elsewhere. :hmm:

Kpt. Lehmann
10-14-05, 12:56 AM
Remilton, you are correct. The colors are apparently determined and triggered elsewhere. If you know where please let me know.

Thank goodness for Rubini's HT mod. It saves a lot of hunting time.

I have been using the Type 34 DD as my test subject.

To correct a statement I made earlier, the Myros No Color mod affects con colors as you zoom in and out on the map... not apparently what I thought earlier. (I thought it had to do with range to contact.

A misconception I have fiured out. the "_shp" tga files only determine the SIZE of the hand-drawn ship. Any changes to its color simply fill the space with a solid rectangle. The rectangle size is proportionate to the size of the ship in question. By swapping _shp files you can get a battleship-sized contact for an S-Boat if you wanted.

Therefore the hand-drawn ship files must be packed away in a DAT file or something similar. I checked the dat file for the Type 34 and only found its skin.

Also secondary to this, unless the _shp files are somehow layered
I don't think that photoshop will help.

I need to know two things:

1) What file determines the color trigger for all ships... potentially we could set them all to be blue for friendly, neutral, and enemy. Green just doesn't seem right and red would be a good alternative.

2) Where are the "hand-drawn" ship tga files.

If either requires hex editing skills... I'm sunk. :shifty: I think that this process may have something to do with why the RUb map contact arrangement is the way it is and I am running into old problems.

Marhkimov
10-14-05, 03:57 AM
When you were testing out your own "greyed" icons, I think I know why you only saw little black boxes. You probably did not save at a high enough bit/pixel rate. It is best to save files with transparencies at 32 bit/pixel setting, otherwise SH3 cannot read it and will display odd things.

Either that or Infranview did not work correctly. Also, I have no idea why PS cannot access those unit icons, which is really weird because GIMP can... :roll:

remilton
10-14-05, 07:35 AM
I need to know two things:

1) What file determines the color trigger for all ships... potentially we could set them all to be blue for friendly, neutral, and enemy. Green just doesn't seem right and red would be a good alternative.

2) Where are the "hand-drawn" ship tga files.

If either requires hex editing skills... I'm sunk.


A netural color would be great, but a long as it is only one I would be happy. I think it may be hard coded for the ship colors, but hope prevails.

Well, the _shp.tga files do indeed contain the hand drawn ship icons. In Photoshop look in the layers window (F7) and click on the channels tab. In the alpha channel at the bottem of the list you will see the ship drawing.

Marhkimov
10-14-05, 08:03 AM
I believe this is what you guys are looking for???

http://i11.photobucket.com/albums/a172/hockeemaster/SH3%20misc/22020c9c.jpg

Colorless contacts.

The picture is shown without the tail lines, but that is only due to my personal preference. I hate those lines. If you like the tail lines, use your imagination.

Kpt. Lehmann has all of the details... ;)

oRGy
10-14-05, 09:00 AM
Captain Lehmann - The hand-drawn ship icons are as I said before in an earlier post, all in the /data/Sea/N_Blah folders. They are usually called NBlahnameofship_Shp.tga.

All you have to do is invert the colours in photoshop and save. It works properly for me in the Improved U-boat version.

The question of what file controls the definitions for the colours was the reason I started the thread, if you read the first post again. ;)

It could be one of the .dat files, but I don't know which one. My concern was the sonar lines are black with the IuB mod along with contact tails etc, but you're probably right in that its not too bad and forces you to pay more attention to what your SO is saying.

remilton
10-14-05, 09:28 AM
All you have to do is invert the colours in photoshop and save. It works properly for me in the Improved U-boat version.



oRGy

Thanks for that clarification. I thought I had already tested that inversion without success, but evidently I need to keep better notes. :oops:

I just tested again and for sure the ship icon tested is now dark.

This is a great sim, and more enjoyable everyday with the help of this great community we have here.

Thanks again. :D

oRGy
10-14-05, 09:35 AM
No problem. :)

My attitude is - if it doesn't work, try again and take better notes.

:|\

Kpt. Lehmann
10-14-05, 09:56 AM
Captain Lehmann - The hand-drawn ship icons are as I said before in an earlier post, all in the /data/Sea/N_Blah folders. They are usually called NBlahnameofship_Shp.tga.

All you have to do is invert the colours in photoshop and save. It works properly for me in the Improved U-boat version.

The question of what file controls the definitions for the colours was the reason I started the thread, if you read the first post again. ;)

It could be one of the .dat files, but I don't know which one. My concern was the sonar lines are black with the IuB mod along with contact tails etc, but you're probably right in that its not too bad and forces you to pay more attention to what your SO is saying.

Ahhh (Kpt. Lehmann feels schtupid und bangs head on table.)

Thanks oRGY... Lol I think I was up WAYYY too late and couldn't see the forest for the trees... and I was barking up the wrong tree(s) but only slightly. Those files you refer to and my test subject (NDD_Type34_shp) are the files I am looking at and attempting to alter.

We owe a BIG thanks to Marhkimov who accelerated the process overall last night.

Yes Marhkimov, that is part of what I am looking for. The last piece of the puzzle is to have the little pointy ship icons, or at the least, contact boxes, visible at the closest zoom level on the map screen... and have them all the same color.

I think that answers your question too remilton.

Oh yeah, oRGy the contact lines are a done deal. I have them set to all black. I hope to explain options to this mod assuming all works well that way if you want different color for warship contact lines you can keep that.

One thing that might help is if someone could tell me where to find "invert colors" in Photoshop. Photoshop is still very new to me.

I'm not out of tricks yet! :|\

oRGy
10-14-05, 10:00 AM
CTRL-I is the shortcut.

BTW, the reason the "pointy ship" icons don't show up in the closest zoom view is due to the fact that you are using RuB. RuB integrates the "Assisted plotting mod" which removes these icons, by colouring them all white, which is considered transparent by SH3.

These icons are, as said, called "Nblah_shp.tga" in /data/Sea/ship folders.

Kpt. Lehmann
10-14-05, 10:09 AM
CTRL-I is the shortcut.

These icons are, as said, called "Nblah_shp.tga" in /data/Sea/ship folders.

Thanks for the PS tip! :up:

Yes sir... the "_shp" files that you refer to are what I was referring to ;) ... at the moment I am using the NDD_Type34_shp file as my guinea pig... which is found inside the NDD_Type34 folder in "Sea."

Even the RUb files can be gotten around by renaming appropriate stock "_shp" files. I will double check that I am working with stock file... I don't think I was using RUb files because as you say they have been altered to be invisible.

remilton
10-14-05, 11:27 AM
More good photshop info:

If you have the TGA files you want to change grouped as a seperate mod as I have done, you can do the following;

Create an action to do the color swap process, then go to menu File/Automate/Batch to have PS do all your files and save them back to disk in only a matter of seconds.

Kpt. Lehmann
10-14-05, 01:00 PM
More good photshop info:

If you have the TGA files you want to change grouped as a seperate mod as I have done, you can do the following;

Create an action to do the color swap process, then go to menu File/Automate/Batch to have PS do all your files and save them back to disk in only a matter of seconds.

cool! Once I figure out how to do that...

At the moment I am furiously cleaning house ... landlord coming over and time spent modding has its price lol.

Will be back on it this afternoon.

Kpt. Lehmann
10-14-05, 06:43 PM
Okay,

I've tried color inversion, stock AND RUb _shp files, tried hand drawing on _shp file itself. (see below pic for results of that)

No matter what I try I still wind up with a blue rectangular background for the Type 34 friendly DD when zoomed close on map.

I believe sincerely now that I am bumping up against a trigger for individual _shp files.

In order to have all uniform color contacts... we have to find the file that determines unit alignment color and re-define its properties to show the same color ship icons irregardless of alignment. I no longer believe it to be hard coded... but possibly hex edited

I'm hitting a wall here... that information HAS to be somewhere. Those little hand drawn ships ARE tga's and may be packed into DAT files... The dat file holding the skin for the Type 34 does not have the map icon tga for the same... as with the other icons

http://img440.imageshack.us/img440/3582/sh3img141020051826166715et.th.jpg (http://img440.imageshack.us/my.php?image=sh3img141020051826166715et.jpg)

Marhkimov
10-14-05, 06:47 PM
When you are finished editing in PS, instead of clicking 'save,' try 'save as' and then choose the 32 setting instead of 16 or 24, and don't check RLE compression. That might just do the trick.

If that doesn't work, also try saving as either 16 or 24... One of the above file settings should work.

Kpt. Lehmann
10-14-05, 06:56 PM
Okay will do Marhkimov.

Kpt. Lehmann
10-14-05, 07:03 PM
back in 2-3 hours

remilton
10-14-05, 10:25 PM
No matter what I try I still wind up with a blue rectangular background for the Type 34 friendly DD when zoomed close on map.



Such a coincidence! I used the NDD_Type34 for my test mule also.

Keep at it Captain, it does work.

When loading into PS, if it askes about color profiles when opening the image file, check do not manage.

After making your edit:

You can either simply close the file and overwrite with asked,
or, you can "save as" but be carful to save the correct file type and as 32 bit.

Just keep plugging away as it has to be a procedural problem.

Hunterbear
10-14-05, 10:48 PM
Hi Kpt. Lehmann,

For your Photoshop help: On the top menu navigation goto

Image>Adjustments>Invert

or hotkey

Ctrl + I

The Help>Photoshop Help or F1 is a quick way to find most of what you'd like to know about the functions in Photoshop.

Hope it helps.

:)

Kpt. Lehmann
10-14-05, 11:18 PM
Thanks Hunterbear I will remember that. :up:

I hope you are right remilton. I will try as you suggest after banging my head on the wall for a while. Lol thanks to Admiral Rubini's HT mod there is a handy little Type 34 DD sitting just outside my pen at St Nazaire.

I have just completed testing "save as" 32, 24, and 16, with "RLE" both on and off... six tests... each time taking clean/stock NDD_Type34_shp tga and hand re-drawing pointy ship shape (lol... for lack of better description)

Arrrrgh! I'm thinking about offering a pint of my blood to the graphics gods.

Here I go again. I'll be on duty for 24 hours again tomorrow... may have to come back to it Sunday.

Kpt. Lehmann
10-14-05, 11:38 PM
Well remilton, it didn't ask me or give me color management options when opening the _shp file with PS... and it looks like I've already correctly done the other thing you asked... have been saving images as TGA. (see six tests above)

Maybe Sunday when I get back I can come at it with a fresh mind. Tonight I will poke around looking for text edited triggers and the TGA's I've extracted from every SH3 Dat file.

Gnite all.

remilton
10-15-05, 12:37 AM
Kpt. Lehmann:

Sorry you are having difficulty.

I don't why you are drawing anything in the _shp file as all is needed is to load , invert , save.

I have SH3 with 1.4b patch. I have inverted thos sea and air files and created a mod with those. I then load rub 1.44 and then my new mod on top of that and viola dark ship and plane icons.

Keep plugging

Kpt. Lehmann
10-15-05, 12:52 AM
Ahhhh now I see what you mean... but what you get is just plain little rectangles right sir?

I am attempting to make the contacts look like little "ship shapes" viewed from above when zoomed in on map.

The inversion process worked right away for me a couple of days ago using irfanview... I just hope to take it one step further.

remilton
10-15-05, 10:16 AM
Ahhhh now I see what you mean... but what you get is just plain little rectangles right sir?

I am attempting to make the contacts look like little "ship shapes" viewed from above when zoomed in on map.

The inversion process worked right away for me a couple of days ago using irfanview... I just hope to take it one step further.

Make sure you are working with the original SH3 files. It will not work with the RUB patched files.

To be clear on this, the RUB files have no "ship shapes" left in them. You must work with the original SH3 files to get the "ship shapes.

When you load the correct file into PS, the ship shape will be in the Alpha Channel. Go to the "window" menu and select "Channels". A window will open and show 5 channels; RGB, Red, Green, Blue, and Alpha. Look in the channels window on the Alpha channel and you will see the "Ship Shape" if you have loaded the correct file.

Keep the RGB channel the active channel and invert. If you click on the Alpha channel and make it active before you invert you will not get the desired results.

Hope this helps...

Kpt. Lehmann
10-16-05, 08:48 AM
Remilton, I will get back to work on this after a few hours of much needed sleep and other duties. I can't wait to try your suggestions. Thanks for being patient with my limited knowledge of PS. I really appreciate the detailed instructions/description.

Mahrkimov, ummm what exactly is RLE? (in relation to saving images)

Marhkimov
10-16-05, 10:45 AM
Mahrkimov, ummm what exactly is RLE? (in relation to saving images)

I'm not sure. Maybe someone else knows?

Kpt. Lehmann
10-16-05, 07:54 PM
First SUCCESS!!! Will expand later... still drained from work :doh:

http://img202.imageshack.us/img202/9551/firstsuccess2cd.th.png (http://img202.imageshack.us/my.php?image=firstsuccess2cd.png)

remilton
10-16-05, 11:54 PM
Sweet!

My level of enjoyment has increased greatly since I made all those icons a nuetral color. :|\

Kpt. Lehmann
10-17-05, 02:50 AM
Okay, I have completed all of the stock ships. I will continue on to add RUb and HT additional units for universal compatability.