Log in

View Full Version : [TEC] – How to add an emblem to Silent Hunter 5


7Infanterie19
05-25-14, 12:49 PM
[TEC] – How to add an emblem to Silent Hunter 5.

Please note that this is not a tutorial on how to create an emblem, but is instead, a step-by-step tutorial on how to add your own custom emblem to Silent Hunter 5 based on my own experience that I wanted to share with you. You will also learn how to have your emblem displayed at the top of the list in the supply guy's emblem choice screen.

If there are any terms in this tutorial that you don’t understand, please search the forums or use Google or Bing, etc., to find what you are looking for.

The most I will say about creating an emblem is:

- use a program of your choice to create it: Photoshop, GIMP, etc.

- you can find examples in your SH5installfolder\data\Textures\TNormal\tex folder, or in the mods listed at the end of this post.

- file size will be 256x256. 8 bit. RGB.

- ensure that you set up the Alpha Channel to only include your emblem and exclude the background.

- save the file as DXT5 ARGB 8 bpp with a name of "myEmblem.dds” (without quotes) or whatever you want. You can also simply take an emblem from an emblem mod and use that.


Creating an emblem mod:

Start by making a folder in your SH5installfolder\MODS folder and give it a name of your choice like “My Conning Tower Emblem Mod” (without the quotes). Create new folders in that folder named “data”, “Textures”, “TNormal”, “tex”, and “emblems” (without the quotes). Put these into “My Conning Tower Emblem Mod” in the correct order, so that it ends up as:

My Conning Tower Emblem Mod\data\Textures\TNormal\tex\emblems.

We created the “emblems” folder to keep things organized. Put “myEmblem.dds” into the “emblems” folder.

Emblems need to be set up in two files: UpgradePacks.upc and Equipment.upc, both of which are located in SH5installfolder\data\UPCDataGE\UPCUnitsData.

Create new folders in “My Conning Tower Emblem Mod” named “UPCDataGE”, and “UPCUnitsData” (without the quotes). Put these into “data” in “My Conning Tower Emblem Mod” in the correct order, so that it ends up as My Conning Tower Emblem Mod\data\UPCDataGE\UPCUnitsData.

If you aren’t using any mods that use UpgradePacks.upc and Equipment.upc, then copy these original files from SH5installfolder\data\UPCDataGE\UPCUnitsData into My Conning Tower Emblem Mod\data\UPCDataGE\UPCUnitsData.

If you are using one or more mods that use those two files, figure out which mod or mods use them. Select the mod that is the last one loaded if more than one mod uses them, and then copy those two files from that mod into My Conning Tower Emblem Mod\data\UPCDataGE\UPCUnitsData.

Before we continue, note that the order that you see the emblems in the supply guy’s screen is sorted first by highest renown cost, and then by the order in UpgradePacks.upc. So if you want your emblem to be the first one you see, you can set the renown cost to be 105, which is 5 more than the other emblems. Making your emblem cost more than all the other emblems also allows us to simply add our new emblem information to the end of the file without having to worry about trying to reorder it at as the first emblem in the file. Reordering means you’d have to re-sequence all the numbers of the other emblems, or swap positions with emblems higher up in the file. You could do that if you want the extra work, of course! Have fun with that! ;)

We can open up UpgradePacks.upc and Equipment.upc using any notepad editor. Nothing special is required, so Windows WordPad works fine.

We will use the vanilla (original) files for our example.

Let’s open up UpgradePacks.upc. Scroll down to the bottom. You should see this:

[UpgradePack 58]
ID= UpackEmblemContest12
NameDisplayable=UpackEmblemContest12-Name
Info=UpackEmblemContest-Info
Notes=
FunctionalType= UpFTypeEmblem
UpgradePackSlotType= UboatEmblems
Type=NULL
UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0
UnitUpgradePackIntervalOptions1=NULL, NULL, 100
IDLinkUpgradePackElements= EqpEmblemContest12
TrackingID=901

Highlight all those lines, press CTRL + C, or right click your mouse and select Copy. Make a space after the last line (TrackingID=901) and then press CTRL + V, or right click your mouse and select Paste. Change the pasted lines to look something like this:

[UpgradePack 59] << We must always increase this number for every item added.
ID= UpackEmblemSH01 << Use UpackEmblem + your unique suffix (perhaps your initials and emblem number).
NameDisplayable=My first Emblem << This is your emblem name in the game.
Info=This emblem is part of my pack. << You can describe your emblem here.
Notes= << You can leave this blank or add extra info here. Just don’t repeat what you wrote earlier.
FunctionalType= UpFTypeEmblem << Don’t touch this.
UpgradePackSlotType= UboatEmblems << Don’t touch this.
Type=NULL << Don’t touch this.
UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0 << Don’t touch this.
UnitUpgradePackIntervalOptions1=NULL, NULL, 105 << See info below.
IDLinkUpgradePackElements= EqpEmblemSH01 << Use EqpEmblem + your unique suffix that you used earlier.
TrackingID=901 << I don’t think this needs to be incremented. The vanilla files mostly use this ID.

Regarding “UnitUpgradePackIntervalOptions1=NULL, NULL, 105”, the first NULL pertains to when this item becomes available. NULL means that it is available immediately. To do the same thing, you can also set this to 1939-08-31 or earlier, so that the item is guaranteed to be available before your first campaign mission if it starts on 1939-08-31 or later. The second parameter defines the date when this item is no longer available. NULL means never. If we put a date in there, then the item is no longer available on (or the day after?) that date. “105” in this example tells us how much renown this item costs should we wish to purchase it. For us, making it “105” allows our emblem to be the first one we see in the game as mentioned earlier.

Note that there is an emblem named “The Kraken” that costs 500 renown for some reason. That emblem uses ID= packEmblemContest11 in [UpgradePack 57]. When you are ready, search for that ID, and change the renown from 500 to 100, so that the cost of “The Kraken” emblem is in alignment with the cost of all the other emblems.

While we are at it, we should also change the “no emblem” renown cost to 0, because in my opinion, it doesn’t make sense to have to pay to not have an emblem or to remove an emblem, for that matter. You can leave it at 100 if you don’t agree with that thought. Changing renown to 0 will sort “no emblem” to the bottom of the list after you enable another emblem in the game. This emblem is the first emblem in the file - [UpgradePack 42], ID= UpackEmblem1. Go ahead and change the renown from 100 to 0. Notice that this emblem uses TrackingID=900, unlike the others. Also notice that the NameDisplayable for this and some other emblems, doesn’t use the name that we see in game, but uses what I think is some kind of pointer: UpackEmblem1-Name. This is referenced in the file UPCLocalization.tsr, located in SH5installfolder\data\UPCDataGE\UPCLocalization, where it takes the associated emblem name and applies it in game. Why they didn’t just put the name in like they did for their other emblems, I have no clue, although it doesn’t seem to matter anyway.

That’s all we need in the UpgradePacks.upc file, so go ahead and close it and save it, ignoring any formatting message.

Open up Equipment.upc. Scroll down to the bottom. You should see this:

[Equipment 60]
ID=EqpEmblemContest12
NameDisplayable= Wolf
FunctionalType= EqFTypeCoating
EquipmentInterval= NULL, NULL
EquipmentSlotType=NULL
ExternalLinkName3D= data\Textures\TNormal\tex\Wolf.dds
Hitpoints= 10000
DamageDescription1= NULL, 0, 1, 0, 1, 1,
invulnerable, 0, 0, NULL, 0, 1, 1

As before, highlight all those lines, press CTRL + C, or right click your mouse and select Copy. Make a space after the last line (invulnerable, 0,0,NULL,0,1,1) and then press CTRL + V, or right click your mouse and select Paste. Change the pasted lines to look something like this:

[Equipment 61] << We must always increase this number for every item added.
ID= UpackEmblemSH01 << Matches the ID you used in UpgradePacks.upc.
NameDisplayable= My first Emblem << Matches the name you used in UpgradePacks.upc.
FunctionalType= EqFTypeCoating << Don’t touch this.
EquipmentInterval= NULL, NULL << Don’t touch this.
EquipmentSlotType=NULL << Don’t touch this.
ExternalLinkName3D= data\Textures\TNormal\tex\MyEmblem.dds << Matches the file you used when you created your emblem.
Hitpoints= 10000 << Don’t touch this.
DamageDescription1= NULL, 0, 1, 0, 1, 1, << Don’t touch this.
invulnerable, 0, 0, NULL, 0, 1, 1 << Don’t touch this.

At the end of the file, you’ll notice this:
; 60 Items and counting - change this line if adding more items
;************ The End ************

Increment that number for the amount of emblems or items you are adding. In this example, change that to 61.

That’s all we need to do with this file, so go ahead and close it and save it, ignoring any formatting message.

One thing I need to mention before we finish is that I’ve noticed that the amount of items in UpgradePacks.upc (58) doesn’t match the amount of items in Equipment.upc (60). No need to think you missed something, considering that is how the vanilla files were set up. Perhaps someone with more expertise can shed some light on this if it's something important that we need to know.

To finish this all off, if you didn’t create your mod in the MODS folder, go ahead and copy it over there now. Use JSGME to activate the mod. If you are just starting a new campaign or if you have saved while in the bunker, start up your game and head over to talk to the supply guy and check the “Captain’s Emblem” tab under the “Camouflage tab”. If all went well, you should see the fruits of your labour at the top of the list.

JSGME can be found at:
http://www.subsim.com/radioroom/showthread.php?t=171237&highlight=jsgme

After I wrote this, I noticed that gap had written a bit in this thread about adding an emblem:
http://www.subsim.com/radioroom/showthread.php?t=211185&highlight=emblem. (http://www.subsim.com/radioroom/showthread.php?t=211185&highlight=emblem).

Other mods that use emblems:

TheBeast’s EUF:
http://www.subsim.com/radioroom/showthread.php?t=182194

A Fistful of Emblems:
http://www.subsim.com/radioroom/showthread.php?t=164789&highlight=emblems




I hope I got everything down correctly. I welcome any suggestions or corrections.

Cheers!