SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 06-24-11, 03:27 PM   #1
fred8615
Saint of the seas
 
fred8615's Avatar
 
Join Date: Mar 2004
Location: Sorrento, Louisiana
Posts: 1,320
Downloads: 265
Uploads: 127
Well I thought I had a good idea

While playing a patrol in my current career I suddenly got the idea to see if I could expand the tooltip that comes up when you put the cursor over the sub image on the crew management screen, torpedo screen, etc. My idea was to add info on the sub so you could have it ingame. Like this:

USS Narwhal (SS-167)
Class: Narwhal
Commissioned: May 15th, 1930
Displacement: 2730 tons surfaced, 3960 tons submerged
Length: 371 feet
Beam: 33 feet 3.25 inches
Draft: 16 feet 11.25 inches
Maximum Speed: 17.4 knots surfaced, 8 knots submerged
Range: 9380 nm at 10 knots
Underwater Endurance: 10 hours at 5 knots
Test Depth: 300 feet

I found the files I needed to edit, and this morning I was trying to actually create a mod to add it, hence the Narwhal info above. But I ran into a few problems.

The first was that the entire info above types out in the message when you start a career. This wasn't a biggie as it's a simple matter of editing the relevant entry in the menu.txt (which I intended to include in the readme). I realized it would also do this when you got a medal, but again it's a simple editing fix for that too.

My real problem is that everything types out when you get your Operational Orders when starting a patrol, when you send a message, or get a message specifically for your boat. And I can't find the part in the menu.txt to turn off the sub name in these. The career start message and the medals use #SUBMARINENAME# for the sub, but those are the only instances when it appears. I assume it's one of the dozens of uses of %s or %(letter) scattered throughout the menu.txt, but which one where, I have no clue. And I'm assuming it's in menu.txt cause I looked through every other file it could've possibly been in.

So I'm hoping maybe someone with a bit more knowledge can help me out? Otherwise this is gonna end up being one those great ideas that just doesn't work.

Like the magnetic exploder.
fred8615 is offline   Reply With Quote
Old 06-25-11, 08:43 AM   #2
CapnScurvy
Admiral
 
CapnScurvy's Avatar
 
Join Date: Apr 2005
Location: Dayton, Ohio
Posts: 2,292
Downloads: 474
Uploads: 64


Default

Fred, I'm not sure about just what your doing? But I applaud your efforts!

As a possible help, you may need to look in the "Menu_1024_768.ini" file, and see if there is a specific entry for the screens you are trying to change (the sub image for the "options" or "torpedo" screens). Drill down through the menu_1024_768.ini file to see if you can find the correct category, then go over the category to see if you can find the same reference of the "menu.txt" that relates to the text number you changed.

I'm thinking there is a reference to this same tooltip for the other screens you mentioned. What I'm thinking is you could change the reference number to something else (just make up a number that isn't being used by any other text) and use that number for the specific text you want, in the specific screen(s) you want it to appear.

Sorry, not to be any more help, I'm away from the game computer. But, I'm thinking this could be the angle you need to change just the screen you want, leaving the others alone. If your wanting to get into modding the "1024_768.ini" file is something you need to have some knowledge about. Here's a good starting place "The deconstruction of the Menu_1024_768.ini file", this tutorial by zAmboni will help with a lot of what the menu_1024_768.ini file does and how it does it. It won't help in finding just the section your looking for, but I'm guessing it's there. You just need to find it in the correct section.
__________________


The HMS Shannon vs. USS Chesapeake outside Boston Harbor June 1, 1813

USS Chesapeake Captain James Lawrence lay mortally wounded...
Quote:
.."tell the men to fire faster, fight 'till she sinks,..boys don't give up the ship!"
CapnScurvy is offline   Reply With Quote
Old 06-27-11, 03:12 PM   #3
fred8615
Saint of the seas
 
fred8615's Avatar
 
Join Date: Mar 2004
Location: Sorrento, Louisiana
Posts: 1,320
Downloads: 265
Uploads: 127
Default

Okay, let me try to be a little clearer.

This is what I'm trying to do:



But it also does this:



And this:



And this:



I've actually figured out how to fix the last two. For the Status Report, it's this line in the menu.txt:

4171=%s. Position %s

As you can see, it uses the same variable for two different pieces of information. The way it uses them is sequential. If you delete just the first %s then all the sub info will print after "Position." But if I blank the line entirely, the other info will print just fine cause it uses a different variable.

The reply you receive is a bit trickier. It's this line:

4192=From: %s|To: %s|%s

Again, same variable, multiple uses. In this case, the last %s is the message body. So if I blank that line, while you will get the white message card pop up, there WON'T be a copy in the messages clipboard in case you want/need to review it again later. While it's not a problem for me personally, it might be for everyone else.

The real problem is the Operational Orders message. I've been through the menu.txt so many times I can practically recite it from memory! But I can't figure out yet which line to edit to stop it printing out all that info. If it would just print the orders, that would be fine. But as it is now, I wouldn't even use this mod for my strictly personal use, let alone release it.

So, that's where things stand. I'll probably keep playing at it to see if I can eventually get it to work. Maybe since I've illustrated exactly what I'm trying to do, someone out there can help or advise. Even if it's "Forget it. It can't be done." At least then I wouldn't waste any more time.
fred8615 is offline   Reply With Quote
Old 06-27-11, 11:02 PM   #4
CapnScurvy
Admiral
 
CapnScurvy's Avatar
 
Join Date: Apr 2005
Location: Dayton, Ohio
Posts: 2,292
Downloads: 474
Uploads: 64


Default

I see where the tooltip your trying to use makes several unwanted entries. Yep, not good.

I can also see by the image of the sub you're using at the top of the Crew Management screen, that it isn't stock. I'm assuming you created it. Have you thought of creating the image with the text (as you list it) both together in a .dds image? This way the game only needs to find the specific image of the sub that's being used, with the subs characteristics listed along with the image. It may not be as sophisticated as having the tooltip appear and disappear when you mouse over the image but it would still give you the information your looking for along with the subs image.

On another note, I created a tooltip for the deck gun station (really its below the ammunition along the right hand side of the screen) for the Optical Targeting Correction mod. I don't have time to go over how I added the tooltip tonight but let me work on it tomorrow. I can show you what entries I made/changed in the menu_1024_768.ini file that makes it work. I'm still thinking there is a way of either changing the tooltip reference for the Crew Management screen in both the menu_1024 file and the menu.txt file, or at least create a new tooltip giving the information you want. The only problem I can see with creating a different/new tooltip is how would the game choose the correct information to be displayed with the different subs that could be used in the game. If you know how this works (in the menu.txt file?) then we may have something.
__________________


The HMS Shannon vs. USS Chesapeake outside Boston Harbor June 1, 1813

USS Chesapeake Captain James Lawrence lay mortally wounded...
Quote:
.."tell the men to fire faster, fight 'till she sinks,..boys don't give up the ship!"
CapnScurvy is offline   Reply With Quote
Old 06-28-11, 08:10 AM   #5
fred8615
Saint of the seas
 
fred8615's Avatar
 
Join Date: Mar 2004
Location: Sorrento, Louisiana
Posts: 1,320
Downloads: 265
Uploads: 127
Default

Quote:
Originally Posted by CapnScurvy View Post
I see where the tooltip your trying to use makes several unwanted entries. Yep, not good.

I can also see by the image of the sub you're using at the top of the Crew Management screen, that it isn't stock. I'm assuming you created it.
It's from the Subsim Narwhal mod. This was the first version I was trying to create.

Quote:
Have you thought of creating the image with the text (as you list it) both together in a .dds image? This way the game only needs to find the specific image of the sub that's being used, with the subs characteristics listed along with the image. It may not be as sophisticated as having the tooltip appear and disappear when you mouse over the image but it would still give you the information your looking for along with the subs image.
Hadn't thought of that, but I don't think it would work anyway for several reasons. First and foremost is that I don't have a dds editor to create a proper image the game can use. The other issue is positioning so it doesn't cover something you need to access on another screen. Because the same image would be used on them, unless say just the sub systems screen could be set to use just that image. That might work, and would make some sense for that type of info.

Quote:
On another note, I created a tooltip for the deck gun station (really its below the ammunition along the right hand side of the screen) for the Optical Targeting Correction mod. I don't have time to go over how I added the tooltip tonight but let me work on it tomorrow. I can show you what entries I made/changed in the menu_1024_768.ini file that makes it work. I'm still thinking there is a way of either changing the tooltip reference for the Crew Management screen in both the menu_1024 file and the menu.txt file, or at least create a new tooltip giving the information you want. The only problem I can see with creating a different/new tooltip is how would the game choose the correct information to be displayed with the different subs that could be used in the game. If you know how this works (in the menu.txt file?) then we may have something.
The image is in the "Data\Menu\Data\SubmarineClasses" folder, and is called in the NSS_(subname).upc file, not the menu_1024_768.ini. That's how it does it for each class. So I don't think that editing the menu_1024_768.ini will work in this case.

But if I can just add the text over the sub image already in use, without changing any of the dimensions, I think that might work. It's just a question of saving the image in the proper format so the game can use it. I'll see what I can do with the programs I have now, to see if they'll work, or I need something special.

Thanks for the idea.
fred8615 is offline   Reply With Quote
Old 06-28-11, 03:24 PM   #6
fred8615
Saint of the seas
 
fred8615's Avatar
 
Join Date: Mar 2004
Location: Sorrento, Louisiana
Posts: 1,320
Downloads: 265
Uploads: 127
Default

I got it!!! I got it!!! I got it!!




I had to end up downloading GIMP and the DDS plugin for it, and it wouldn't save except as a single layer file, but that doesn't seem to be hurting anything. I even found a freeware version of the font the game uses so the text would match.

The only problem now is that if you use a screen height below 960 the message box writes over the sub info, which will make the message box text hard to read. So if I make a mod out of this, I'll have to make a note about that in the readme.

It isn't exactly what I wanted, because the info is visible all the time. But it's better than nothing, and doesn't require any additional editing beyond the image file.

So what say you all? Want this as a mod, or am I just doing this for myself?

fred8615 is offline   Reply With Quote
Old 06-28-11, 06:02 PM   #7
TorpX
Silent Hunter
 
Join Date: Sep 2010
Posts: 3,975
Downloads: 153
Uploads: 11
Default

I like it.

But wouldn't it be better if the text was in the upper right corner?

Also please put back the commisioning date, that was a nice touch.


TorpX is offline   Reply With Quote
Old 06-29-11, 08:14 AM   #8
fred8615
Saint of the seas
 
fred8615's Avatar
 
Join Date: Mar 2004
Location: Sorrento, Louisiana
Posts: 1,320
Downloads: 265
Uploads: 127
Default

Quote:
Originally Posted by TorpX View Post
I like it.

But wouldn't it be better if the text was in the upper right corner?

Also please put back the commisioning date, that was a nice touch.


It cuts off the text if you put it too close to the edge of the image. That's why it's not all the way to the edge of the stern. I figured the stern was better than the front, and definitely better than centered, where it would cover up the conning tower.

As for the commission date, because the same image is used for all the subs in a class, I can't put the commission date for any individual sub. Only the class info.

Now I could put the commission date back in the tooltip. That's for each individual sub. But that would have the same problem as before, printing out in the messages too. It wouldn't be as bad as writing out ALL the info like before, but some might find it annoying.

What do ya'll think?

EDIT: It occurred to me after posting my reply, you might think the text is a separate image superimposed on the sub image. It's actually the sub image with the text added to it. An image or maybe even a box with the info in it probably could be made and positioned in that area of the subsystems screen. But it would require editing of the menu_1024_768.ini file beyond my capabilities. And of course would also conflict with any other mod that changes the menu_1024_768.ini file. If anyone else wants to try it that way though, be my guest.

Last edited by fred8615; 06-29-11 at 08:34 AM.
fred8615 is offline   Reply With Quote
Old 06-29-11, 12:42 PM   #9
TorpX
Silent Hunter
 
Join Date: Sep 2010
Posts: 3,975
Downloads: 153
Uploads: 11
Default

Quote:
As for the commission date, because the same image is used for all the subs in a class, I can't put the commission date for any individual sub. Only the class info.

Right, I should have realised that.
TorpX is offline   Reply With Quote
Old 06-29-11, 02:11 PM   #10
fred8615
Saint of the seas
 
fred8615's Avatar
 
Join Date: Mar 2004
Location: Sorrento, Louisiana
Posts: 1,320
Downloads: 265
Uploads: 127
Default

Well, it looks like using the sub image method isn't going to work either.

The problem now is the game uses the same image for two different classes, and it does this twice.

The S-18 and S-42 both use one of the five S-class images, apparently depending upon the paint scheme and conning tower configuration. The Sargo uses the same three images as the Salmon class.

I tried putting the S-42 info in one of the images, then edited the NSS_S42.upc file here:

MenuSilhouetteTextureName= S_Class_02b.tga

...to open it instead of the image listed. I used the 02b image for the S-42 info, the 01b image (the default) for the S-18 info. But when I tested it, it used the S-18 image for the S-42. Obviously this isn't the file that needs editing.

So I have no idea what to do next. While it works fine for the other classes, I don't want to have some with info and some without. And since there were some significant differences, I don't want to use one class and not the other. If it can't be done right, there's no point in doing it.
fred8615 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:58 AM.


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