SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH4 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=219)
-   -   [TEC] Help with medals (https://www.subsim.com/radioroom/showthread.php?t=254571)

SwissSubCommander 01-17-23 12:58 PM

Help with medals
 
I am working on V2.0 of my Italian Campaign for SH4
One thing I would like to add are authentic Italian Decorations.
I have found the DDS files with the images of the vanilla-medals
however I cant seem to find the text-file with the names of german Decorations.
Obviously if I am going to make the effort to change the images I would also like them to display the correct names.
Pls help :k_confused:

jimimadrid 01-17-23 05:42 PM

I found the names in Data\Menu\menu.txt.


I do not know if this is what you want.

ElCid97 01-17-23 10:35 PM

It depends what "medals" file you're looking for, or what "text" you're going or trying to update.

I'm guessing it's the main one in the "...\Data\UPCDataGE\UPCCrewData" folder labeled "Medals.upc" like the one with the US Fleet Boats. This one has references for the German stuff from what I saw. This affects the medals in general, but primarily the ones that you're going to see in the case when you're in port between patrols.

In this particular file, the "ID=" line and the "MedalType=" line MUST remain the same. These are hard-coded by the sim. What you change is the "NameDisplayable=" line to whatever it is you want. This will be the name that comes up when you get the award after a patrol. It's also the name that will pop up when you look at the case in the port office.

I've also seen a "Basic.cfg" file in the "...\Data\Cfg" folder, but I think that's for legacy stuff. Not sure.

If you want to modify the medals for either yourself or the crew (what you CURRENTLY have in the box/case or what you CAN GIVE the crew), then it's in the "save" folder in your "My Documents" (or whatever it's called these days) under the SH4 folder you have things in. It's the one you're supposed to delete after you install one of the main mods to get a fresh install for mod activation.

Depending on your install it will be a numbered folder in the "...\data\cfg\SaveGames" folder. Here you have to update the pertinent sections in the "CareerTrack.upc" file; specifically the line that speaks of the crew. For example, if you want one of each medal to hand out to the crew you would change the blank line from:

CrewMembersCurrentMedalsRepository=

to:

CrewMembersCurrentMedalsRepository=Purple Heart,Bronze Star,Silver Star,Navy Cross,Dist Service Medal,CMOH

For the pop-up text that comes up when you hover over the small, little things in the crew management page, the file is the "menu.txt" file in the "...\Data\Menu" folder. The lines you're looking for are 5150 to 5156, where 5150 is the "Medal" line and the rest are the lines for the six available medals. NOTE: you have to use a text editor that can tell you line numbers. I use Notepad++ for this.

The "Repository" line's medal name MUST stay the same as far as what you write there so that the proper medal shows up in the crew management page. In other words, it's the name folowing the "ID=" entry in the "Medals.upc" file. Again, it's unfortunately a line that's hard coded. In FotRSU, if you wanted to give out three (3) Asia-Pacific Campaign medals, you would write:

CrewMembersCurrentMedalsRepository=Bronze Star,Bronze Star,Bronze Star

... and you'd have three APCM's to hand out to the crew.

The display name for the crew medals themselves, however, are in the "menu.txt" file and can be anything you want. Why? No clue, but you can write whatever you want and it shows up when you hover over the medals in the Crew Management Page.

I've found a lot of this stuff working on the BuPers mod I've been working on. I'm about to post an update over there so you can get a general idea of where I'm at.

If you have any questions please let me know on that thread since you can use much of what I've found out through trial and error to convert the sim to Italian Fleet Ops (or Japanese, or French, etc.).

It just takes TIME and PATIENCE. And, :Kaleun_Cheers:

ElCid97

jimimadrid 01-18-23 07:27 AM

Quote:

Originally Posted by ElCid97 (Post 2848299)
For the pop-up text that comes up when you hover over the small, little things in the crew management page, the file is the "menu.txt" file in the "...\Data\Menu" folder. The lines you're looking for are 5150 to 5156, where 5150 is the "Medal" line and the rest are the lines for the six available medals. NOTE: you have to use a text editor that can tell you line numbers. I use Notepad++ for this.

ElCid97




Jorge,


you can use the normal editor for the menu.txt.
It works like the ini Files. It has a section "[STRINGS]" and keys "Blabla=" and behind the value of the Key.
The key "5151" has the value "Navy Distinguished Service Medal"

SH4 then ask for this key and get the text.
The menu.txt is used to easily change the languague for the game.


But here begins the problem as i have with the differents menu_1024_768.ini files.
How to change only these lines on an easy mode without let the people manually change their menu.txt file.
My Menumerger will not work, because it need an ini file with "different sections". The menu.text file has only "one section"([STRINGS]).

I will try to rework it, so that the future version will also take care of "one section" files.

SwissSubCommander 01-19-23 06:38 PM

Quote:

Originally Posted by ElCid97 (Post 2848299)
It depends what "medals" file you're looking for, or what "text" you're going or trying to update.

I'm guessing it's the main one in the "...\Data\UPCDataGE\UPCCrewData" folder labeled "Medals.upc" like the one with the US Fleet Boats. This one has references for the German stuff from what I saw. This affects the medals in general, but primarily the ones that you're going to see in the case when you're in port between patrols.

In this particular file, the "ID=" line and the "MedalType=" line MUST remain the same. These are hard-coded by the sim. What you change is the "NameDisplayable=" line to whatever it is you want. This will be the name that comes up when you get the award after a patrol. It's also the name that will pop up when you look at the case in the port office.

I've also seen a "Basic.cfg" file in the "...\Data\Cfg" folder, but I think that's for legacy stuff. Not sure.

If you want to modify the medals for either yourself or the crew (what you CURRENTLY have in the box/case or what you CAN GIVE the crew), then it's in the "save" folder in your "My Documents" (or whatever it's called these days) under the SH4 folder you have things in. It's the one you're supposed to delete after you install one of the main mods to get a fresh install for mod activation.

Depending on your install it will be a numbered folder in the "...\data\cfg\SaveGames" folder. Here you have to update the pertinent sections in the "CareerTrack.upc" file; specifically the line that speaks of the crew. For example, if you want one of each medal to hand out to the crew you would change the blank line from:

CrewMembersCurrentMedalsRepository=

to:

CrewMembersCurrentMedalsRepository=Purple Heart,Bronze Star,Silver Star,Navy Cross,Dist Service Medal,CMOH

For the pop-up text that comes up when you hover over the small, little things in the crew management page, the file is the "menu.txt" file in the "...\Data\Menu" folder. The lines you're looking for are 5150 to 5156, where 5150 is the "Medal" line and the rest are the lines for the six available medals. NOTE: you have to use a text editor that can tell you line numbers. I use Notepad++ for this.

The "Repository" line's medal name MUST stay the same as far as what you write there so that the proper medal shows up in the crew management page. In other words, it's the name folowing the "ID=" entry in the "Medals.upc" file. Again, it's unfortunately a line that's hard coded. In FotRSU, if you wanted to give out three (3) Asia-Pacific Campaign medals, you would write:

CrewMembersCurrentMedalsRepository=Bronze Star,Bronze Star,Bronze Star

... and you'd have three APCM's to hand out to the crew.

The display name for the crew medals themselves, however, are in the "menu.txt" file and can be anything you want. Why? No clue, but you can write whatever you want and it shows up when you hover over the medals in the Crew Management Page.

I've found a lot of this stuff working on the BuPers mod I've been working on. I'm about to post an update over there so you can get a general idea of where I'm at.

If you have any questions please let me know on that thread since you can use much of what I've found out through trial and error to convert the sim to Italian Fleet Ops (or Japanese, or French, etc.).

It just takes TIME and PATIENCE. And, :Kaleun_Cheers:

ElCid97

Thanks a lot. :Kaleun_Wink:
I have managed to achieve almost everything I wanted for the new Version.
Only thing I still havent figured out is how to change the default Hydrophone installed in the sub:06:
Is there any way to give myself medals through cheats to test the mod?

SwissSubCommander 01-20-23 08:14 AM

So far so good.
I managed to change all names. :up:
Now only one thing remains.
To somehow replace the images of the medals.
I have already edited the "deco00", "AwardItems" and "Awards" files
simply pasting images of the italian Medals over the German ones.
However in the crew screen in port, there are still german medals being shown
and in my personal medals, the modded "diploma" on the right hand side shows up, but where the medal should be there is nothing :hmmm:
Any help?:06:

ElCid97 01-20-23 02:35 PM

On lunch break, but will post more tonight.

Check here for "the menu.txt" file: ...\Data\Menu

The "citation" you read is in the "menu.txt" file near the bottom. Here's the example I have so far for BuPers:

;Original wording:
;5890=THIS IS TO CERTIFY #NEWLINE#THE PRESIDENT OF THE UNITED STATES #NEWLINE#HAS AWARDED #NEWLINE##NEWLINE#The #MEDALNAME##NEWLINE#To #TITLE# #NAME##NEWLINE#UNITED STATES NAVY#NEWLINE#Commanding officer, #SUBMARINENAME##NEWLINE#This #DATE##NEWLINE##NEWLINE#For extraordinary heroism as Commanding officer of the #SUBMARINENAME# during the #PATROLNUMBER# war patrol(s) of that vessel,#NEWLINE#the Navy Board of Decorations and Medals#NEWLINE#awards the #MEDALNAME##NEWLINE#to #TITLE# #NAME#.#NEWLINE##NEWLINE#His outstanding display of leadership, devotion to duty, and aggressiveness reflect great credit upon himself, and upheld the highest traditions of the United States Naval Service.

;BuPers Mod updates:
5890=This is to certify that #NEWLINE#the President of the United States of America, #NEWLINE#as authorized by Executive Orders and Congressional Legislation #NEWLINE#has awarded the #NEWLINE##NEWLINE##MEDALNAME# #NEWLINE##NEWLINE#To: #TITLE# #NAME# #NEWLINE#United States Navy #NEWLINE##NEWLINE#for service as Commanding Officer, #SUBMARINENAME#. #NEWLINE##TITLE# #NAME#'s actions since taking command have #NEWLINE#been an outstanding display of leadership, #NEWLINE#devotion to duty, and aggressiveness under fire. #NEWLINE#His actions reflect great credit upon himself, #NEWLINE#the #SUBMARINENAME#, and the United States Naval Service. #NEWLINE##NEWLINE#Given under my hand this #DATE# #NEWLINE#Signed Randall Jacobs, Rear Admiral, USN #NEWLINE#Chief of Bureau of Naval Personnel #NEWLINE#Washington, D.C.

; giving medal with the germans:
5891=In the name of the Fuehrer#NEWLINE#and the Commander of the Kriegsmarine#NEWLINE##NEWLINE#I award#NEWLINE#the #MEDALNAME##NEWLINE#to #TITLE# #NAME##NEWLINE##NEWLINE##DATE#

The German portion is original to the mod, so that's the one you have to change. I kept the original US for a template by commenting out the thing. You can use both as a template for yours. Just be aware of the formatting and the punctuation for the formatting and you'll be fine.

I still need to "justify" since the thing is justified to the right hand side of the screen, but it mostly displays the way it should. I say "mostly" because the last part is also out of whack. Maybe too many lines, but not sure. It's probably somewhere in the menu_1024_768.ini file. Jimimadrid knows more about those than I do.

The crew awards (US and German) are in the "CrewSystemsManagement.dds" file located in the respective folder, namely: ...\Data\Menu\Skins\American\Gui\Layout and ...\Data\Menu\Skins\German\Gui\Layout

I'll go more in depth tonight when I can.

Regards,

ElCid97

SwissSubCommander 01-20-23 03:31 PM

Yes, I already changed the citation.
What I mean is that the medal itself, to the left of the diploma, is not being shown :hmmm:

ElCid97 01-20-23 10:06 PM

Ah, capito ...

While lurking around the "menu_1024_768.ini" file I found the reference for the awards. Unfortunately, I still can't figure out how to format the text.

data/menu/data/awardsitems_3.dds
data/menu/data/awardsitems_4.dds

are the two files you need to change for the German side (i.e. the Axis). This would apply to Japanese awards to add like the Golden Kite, Rising Sun, etc. These are also the ones to change for the WWI mod that some folks have been working on.

Allied awards in the FotRSU setup are in the same directory, but under the name "CaptainAwards_1" and "CaptainAwards_2" with either a "dds" or "tga" extension. Mine are "tga" since I haven't touched them. The "default" Allied/US files are the awardsitems_1.dds and awardsitems_2.dds images. These are the original files that were later updated with real medals (RUIM mod I think??).

For the items on the left hand side of the box that you click on to see what medal you want to read about, then the files are:

data/menu/Skins/German/gui/layout/Medals.tga

Oddly enough, the file is the same as the crew systems management on my installation, just that it has a different name and it looks like there are numbers there for zones and WHERE on the image to find the things. These are the small versions of the medals along the left side of the awards page.

I could be wrong on this since I'm still rummaging around things and learning, but I believe these are the images you are looking for.

Now, if someone can figure out how to format the words so that they are center-justified while still on the right hand side of the screen ...

Right now I have everything basically lining up on the right hand side of the screen, so it looks like you're reading from right to left.:hmmm:

I've been reading info on the forums more than anything else these past few weekends. I've seen entries for things from logbook entries to a sextant mod, but still haven't found anything that can help with the text of the awards other than you change the text itself (citation language) in the "menu.txt" file.

Hope what little I've been able to figure out has helped.

ElCid97

PS: What medals were you thinking of instituting? The sim has the awards hard-coded from what I've read. With wounded, for example, there's a suposed "threshold" of 40% damage. So if your sub has 40% or more damage, you earn a Purple Heart. Apparently that's why we have a Purple Heart in the updates of the awards and why there's a Wound Badge in the German version of the awards.

Haven't tested that out yet, per say, but I do have two of them in the career I was working on. One time came in with 68% hull damage and the other with a little over 50% hull damage. The Argonaut and the Tambor are built like Timex watches - take a licking and keep on ticking!

SwissSubCommander 01-21-23 04:10 PM

https://i.postimg.cc/fTV0d9dH/Silent...3-21-29-49.png

This is how far I am.
Yes I figured out that the "awardsitems_x" files are the ones that need changing.
I did edit them, simply pasting the italian medals over the corresponding german ones.
But alas! instead of a shiny medal there is only an empty background! :k_confused:

I successfully implemented them for the crew management screen

They are: - u-boat sign = distintivo sommergibili
- u-boat front clasp = distintivo della divisione atlantica
- iron cross 2. class = medaglia al valore di marina in bronzo
- iron cross 1. class = medaglia al valore di marina in argento
- german cross = medaglia al valore di marina in oro
- knights cross = croce di guerra al valor militare

propbeanie 01-21-23 06:05 PM

Do your files match in bit depth and extension name, as the originals?

SwissSubCommander 01-22-23 08:45 AM

Quote:

Originally Posted by propbeanie (Post 2848880)
Do your files match in bit depth and extension name, as the originals?

How do I check what bit depth the original has?
And how do I change it if needed?

ElCid97 01-22-23 03:51 PM

What graphics/imaging program are you using? To check the data for the file, you would have to open it and then check the properties from there. If you need to change it, then it's part of the saving procedure. I believe that all the "dds" and "tga" files are 32-bit in format/depth, so you shouldn't have any issues there.

I'm not sure if it's a Win-7 thing, but when I right-click on a "tga" or "dds" file, the properties option only gives me generic info and nothing from the file. This is because they are 32-bit. If I do the same with a "png" or a "jpg" or another 24-bit file, I can see the size and bit depth info for them.

When modifying with GIMP (the program I use) I just make sure to NOT click on compression when it's offered for the dds files. I also agree (YES) to the option for creating mip-maps from a drop-down option. I haven't had any issues yet with this method of doing this. I'm sure there's a similar method for other imaging programs. Just the procedure for getting there may be somewhat different.

I haven't used the "tga" files yet, but I believe you DON'T want the compression option there either.

I believe if you compress the files they are then NOT 32-bit, and therefore can't be read by the sim. That was the case with flightsim files for FS9/FSX which I have considerable experience with. I don't see why this sim would be any different regarding the images/textures.

By the way, how did you get the image you posted to copy to an imaging program? I've tried Ctrl+F11 and PrintScreen, but none of them work for me. All I get is either a black box or a screen-shot of the imaging program I would be in.

Hope this helps.

ElCid97

SwissSubCommander 01-22-23 04:31 PM

GIMP seems like a handy program.
I will try it out :up:
WHat do you mean? How I took the screenshot or how i uploaded it?

ElCid97 01-22-23 05:28 PM

GIMP is basically an open source imaging program that allows you to work with layers and such, much like the payware ones. I figure since I'm only using it for a hobby that the price was worth it. (open source = free). :D

I'm on version 2.10.22, but it may be newer by now.

With regards to the images, I meant how to take them. Eventually I figured it out a little while ago when I started seeing several "bmp" files in the main SH4 directory that weren't there before.

I never would've thought that was the location that Ctrl+F11 would place them. I thought it was going to the save folder with the other stuff you save in-game.

Live and learn. :oops:

I'll post something once I clean them up.

Regards,

ElCid97


All times are GMT -5. The time now is 07:00 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.