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 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 09-18-12, 06:22 PM   #16
Cybermat47
Willing Webfooted Beast
 
Cybermat47's Avatar
 
Join Date: Aug 2012
Location: Australia
Posts: 5,408
Downloads: 300
Uploads: 23


Default

Quote:
Originally Posted by gap View Post
How are those names used in game? this is something I've never understood
I think it's how the ships names appear on the map. For example, if CAKent Unit 1 was at Scapa Flow, the name HMS Suffolk would appear under the name of the Harbour.
__________________
Historical TWoS Gameplay Guide: http://www.subsim.com/radioroom/showthread.php?p=2572620
Historical FotRSU Gameplay Guide: https://www.subsim.com/radioroom/sho....php?p=2713394
Cybermat47 is offline   Reply With Quote
Old 09-18-12, 06:28 PM   #17
Cybermat47
Willing Webfooted Beast
 
Cybermat47's Avatar
 
Join Date: Aug 2012
Location: Australia
Posts: 5,408
Downloads: 300
Uploads: 23


Default

Quote:
Originally Posted by gap View Post

By doing so you can only change few aspects of the cloned ship (max speed, equipment, camouflages, etc.), but her appearance will be the same as the original one, since they both share the same 3D model.
eh? How!? if you can change camoflage and equpment, i might be able to make a seperate unit for the Tirpitz!
__________________
Historical TWoS Gameplay Guide: http://www.subsim.com/radioroom/showthread.php?p=2572620
Historical FotRSU Gameplay Guide: https://www.subsim.com/radioroom/sho....php?p=2713394
Cybermat47 is offline   Reply With Quote
Old 09-19-12, 09:50 AM   #18
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Cybermat47 View Post
eh? How!? if you can change camoflage and equpment, i might be able to make a seperate unit for the Tirpitz!
Okay, looking into your mod I've noticed only now that you just added some new roster entries, without cloning any unit. I am sorry for any misunderstanding that I might have generated

Anyway, since vanilla SH5 got "cloned" units too, it will be easy for you understanding what I meant. Try opening one of them, NAMC_Patroclus for instance. Its folder got several files. the main one is NAMC_Patroclus.cfg. Open it in notepad and you will see the following entries (commented by me here):

Quote:
ClassName=AMCPatroclus <= this is the name used in roster and in names.cfg for denoting the unit
3DModelFileName=data/Sea/NAMC_Rawalpindi/NAMC_Rawalpindi <= this is the path to the main model: SH5 Patroclus is a clone of the Rawalpindi
UnitType=13 <= this is the unit type; open names.cfg (found in roster) for understanding what it means
MaxSpeed=15 <= ship's speeds are set in their sim files; I am not sure if you can limit it by editing this entry
Length=165.89 <= same as NAMC_Rawalpindi; Don't fiddle with this entry unless you know what you are doing
Width=21.39 <= as above
Mast=39.69 <= as above
Draft=9.00 <= as above
Displacement=11198 <= base displacement used for sunk tonnage calculation
DisplacementVariation=10 <= this is the max figure that is randomly added/subtracted to/from the base displacement
RenownAwarded=220 <= self-explanatory
CrewComplement=40 <= used for lifeboats spawning
SurvivalRate=70 <= as above
SurvivalPercentage=40 <= as above; not sure what's the difference with the previous entry
RecManualCategory=TroopTransport <= used in recognition manual
BowShape=Plumb <= as above
Funnels=2 <= as above
ShowInRecognitionManual=No;it is a clone. the player will identify it as another single ship <= In stock cloned units it is always set to 'No'; not sure if weird things may happen if set to 'Yes'
The remaining files are NAMC_Patroclus.eqp and NAMC_Patroclus.sns. The first one contains gun equipment settings, whereas the latter deals with sensors. They both can be opened with notepad and they share the same format, with many groups of settings. A typical group taken from NAMC_Patroclus.eqp looks like this:

Quote:
[Equipment 1] <= this is an header, denoting the ID of each group; ID's shouldn't be duplicated within the same file, and should be sorted in ascending order
NodeName=M01 <= this is the ID of the bone/node that the gun/sensor gets linked to
LinkName=5.9in_turret_GER <= this is the name of the gun/sensor that gets linked to the bone/node set with the previous entry
StartDate=19380101 <= date in yyyymmdd format that the bone/node will start being equipped with the set gun/sensor
EndDate=19451231 <= date in yyyymmdd format that the bone/node will end being equipped with the set gun/sensor
bones/nodes are sets of x, y, z coordinates within a 3D model that you can link stuff to. In SHIII/IV/V the ones used for equipments are denoted with unique names composed of a letter and a sequential number (i.e. A01, O02, etc.). Letters follow the following code:

M = cannons (main armaments)
A = AA guns
W = depth charge projectors
T = torpedo tubes
L = searchlights

O = visual sensors
H = hydrophones
N = sonar
R = radar

not all the above mentiones bone/node types are featured in every ship. In order to check wich ones are available for the ship you are cloning, and for locating their position on the 3D model, you should open its GR2 file in goblin editor (NAMC_Rawalpindi.GR2 in our example), and look at the list on the left, for bones whose name start with "cfg#" followed by an equipment ID (i.e. "N01", "A03", etc.) and the name of the 3D model itself ("_NAMC_Rawalpindi" in our case). By selecting those entries with a mouseclick, their position will be shown on the unit preview, on the right. For dat inported units the proceidure is about the same, but you can open them with s3d.

Should you need to add a new bone/node to a 3D model, the tools are TDW's GR2 Editor/Viewer/Extractor/Importer for GR2 units and the above mentioned Silent 3Ditor by Skwas for dat units.

Notice that eqp and sns files can get several entries of the same bone/node, as long as you set different date ranges for each of the relevant groups. In this way you can set different armament/sensor outfits for different periods of the war.

For having a list of armaments and sensors available in game, whose names can by directly typed as LinkName settings, you should open respectively guns_radars_01.GR2 (path: data\Library\ShipParts) and AI_Sensors.GR2 (path: data\Library). Again, the required tool is goblin editor (made available by devs in main SH5 folder of the stock game), and you will see those names listed on the left of the screen.

The last step will be adding the cloned unit to the roster, similarly to what you already did with other units. Remember that roster cfg files should be named after the ClassName setting in unit's cfg.file. Talking abou them, these are the settings of AMCPatroclus.cfg, found in data/Roster/British/Sea:

Quote:
[UnitClass]
ClassName=AMCPatroclus <= unit's name; should match the name set in the ClassName entry of unit's main cfg file
UnitType=13 <= unit's type; should match the type set in the UnitType entry of unit's main cfg file
AppearanceDate=19390912 <= when the given nation started operating the unit
DisappearanceDate=19411001 <= when the given nation ended operating the unit
DisplayName=BR AMC Patroclus (proxy) <= I am not sure where this name is actually displayed; I guess you are free to set whatever name here

[Texture 1]
TextureName= <= path to the diffuse map (main texture) you want to use for the unit/class; if not set, the standard texture of the main model is used
LightmapTextureName=data/Sea/NAMC_Penguin/Penguin_AO.tga <= path to the ambient occlusion map (reflection map) you want to use for the unit/class; if not set, the standard texture of the main model is used
NormalmapTextureName= <= path to the normal map (bump map) you want to use for the unit/class; if not set, the standard texture of the main model is used
StartDate=19390101 <= see my note below
EndDate=19461231 <= see my note below
Frequency=1 <= see my note below

[Unit 1]
Name=HMS Patroclus
DOC=19390912
DOD=19401104

[Unit 2]
Name=HMS Hector
DOC=19391220
DOD=19420405

[Unit 3]
Name=HMS Antenor
DOC=19400101
DOD=19411001
There's just one [UnitClass] group for each file. [Texture] and [Unit] groups can be repeated, as long as you give thei headers a sequential number, and they are sorted in ascending order. Date ranges can be overlapping.

In stock game different camoufflages are painted on the ambient occlusion map. Theoretically they could be painted on the diffuse map as well, making things a lot easier (it is not that easy to locate different ship parts in an occlusio map), but I am not really sure that alternative diffuse maps are actually used in SH5.

If different texture definitions with overlapping date ranges are set, the frequency setting is used. An example: let's say that for a given date we have two texture definitions: [Texture 1] and [Texture 2], and that their rescpective frequencies are 1 and 3. The chance for each texture to be sisplayed in game will be respectively: 1/(1+4)=25% and 4/(1+4)=75%

finally, [Unit] entries, as suggested by Trevally, are used for single units names. When spawning a new unit, the game should assign a name to her, picking it randomly from the list of [Unit] entries whose date ranges match the current date. Call me dumb,I've still to understand where these names are displayed in game.
gap is offline   Reply With Quote
Old 09-19-12, 10:23 AM   #19
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
AWESOME
Decided to cut out the quote.

But... AWESOME!! Thank you gap!
Targor Avelany is offline   Reply With Quote
Old 09-26-12, 07:20 PM   #20
Cybermat47
Willing Webfooted Beast
 
Cybermat47's Avatar
 
Join Date: Aug 2012
Location: Australia
Posts: 5,408
Downloads: 300
Uploads: 23


Default

Thank you!
I'll start looking at that!
__________________
Historical TWoS Gameplay Guide: http://www.subsim.com/radioroom/showthread.php?p=2572620
Historical FotRSU Gameplay Guide: https://www.subsim.com/radioroom/sho....php?p=2713394
Cybermat47 is offline   Reply With Quote
Old 09-27-12, 01:59 AM   #21
Cybermat47
Willing Webfooted Beast
 
Cybermat47's Avatar
 
Join Date: Aug 2012
Location: Australia
Posts: 5,408
Downloads: 300
Uploads: 23


Default

v.0.0.03 released!
See post #1 for details!
__________________
Historical TWoS Gameplay Guide: http://www.subsim.com/radioroom/showthread.php?p=2572620
Historical FotRSU Gameplay Guide: https://www.subsim.com/radioroom/sho....php?p=2713394
Cybermat47 is offline   Reply With Quote
Old 09-27-12, 02:40 AM   #22
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
[Equipment 1] <= this is an header, denoting the ID of each group; ID's shouldn't be duplicated within the same file, and should be sorted in ascending order
NodeName=M01 <= this is the ID of the bone/node that the gun/sensor gets linked to
LinkName=5.9in_turret_GER <= this is the name of the gun/sensor that gets linked to the bone/node set with the previous entry
StartDate=19380101 <= date in yyyymmdd format that the bone/node will start being equipped with the set gun/sensor
EndDate=19451231 <= date in yyyymmdd format that the bone/node will end being equipped with the set gun/sensor
How do you figure out the nodename? I've been looking through the files and can't find anything...
Targor Avelany is offline   Reply With Quote
Old 09-27-12, 06:19 AM   #23
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Targor Avelany View Post
How do you figure out the nodename? I've been looking through the files and can't find anything...
You should open the dat/gr2 file of the unit, and look for nodes/bones whose names got this format:

cfg#???_*

where:

??? = NodeName (i.e. A04, L02, O01, etc.)
* = name of unit's main node

By clicking on them you can see their position and rotation, relative to the unit's 3d model.
gap is offline   Reply With Quote
Old 09-27-12, 10:11 AM   #24
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
You should open the dat/gr2 file of the unit, and look for nodes/bones whose names got this format:

cfg#???_*

where:

??? = NodeName (i.e. A04, L02, O01, etc.)
* = name of unit's main node

By clicking on them you can see their position and rotation, relative to the unit's 3d model.
hmmm... Well, I know what I'm doing when I get home tonight.... Digging through Goblin editor again. Spent good 3 hours yesterday using one particular example and only after that asked. I guess I am blind or smth...
Targor Avelany is offline   Reply With Quote
Old 09-27-12, 10:48 AM   #25
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Targor Avelany View Post
hmmm... Well, I know what I'm doing when I get home tonight.... Digging through Goblin editor again. Spent good 3 hours yesterday using one particular example and only after that asked. I guess I am blind or smth...
This is NAGC_C2Appalachian.GR2:



On the right, you see 6 different equipment bones: A18, L03, A15, L04, A16, L06. One of them is selected, and its position is marked in the preview window on the right (see closely the platform at the center of the preview).
gap is offline   Reply With Quote
Old 09-27-12, 11:31 AM   #26
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
This is NAGC_C2Appalachian.GR2:



On the right, you see 6 different equipment bones: A18, L03, A15, L04, A16, L06. One of them is selected, and its position is marked in the preview window on the right (see closely the platform at the center of the preview).
ah, so when we mentioning the nodename in the .cfg file, we are not spelling the entire thing, just the first part... huh, ok

Thanks, gap, that actually helps big time
Targor Avelany is offline   Reply With Quote
Old 09-27-12, 12:57 PM   #27
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Targor Avelany View Post
ah, so when we mentioning the nodename in the .cfg file, we are not spelling the entire thing, just the first part... huh, ok

Thanks, gap, that actually helps big time
Exactly: see post #18 for conventional letters commonly used to denote the bones/nodes for different types of equipment
gap is offline   Reply With Quote
Old 09-27-12, 01:18 PM   #28
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
Exactly: see post #18 for conventional letters commonly used to denote the bones/nodes for different types of equipment
I guess that makes sense, allowing to use the same objects for equipment on different ships/models, which in turn might have different position/characteristics on different units.

Thank you, gap. Sorry to be slow like this...
Targor Avelany is offline   Reply With Quote
Old 09-27-12, 01:53 PM   #29
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Targor Avelany View Post
I guess that makes sense, allowing to use the same objects for equipment on different ships/models, which in turn might have different position/characteristics on different units.
You stand correct for all of your statements except for equipment characteristics: specifications of each given equipment cannot vary from ship to ship. i.e: maximum elevation rate of a 20mm Oerlikon gun in single mounting will not vary if it is fitted on a Liberty Ship rather than on Ark Royal

I you wanted to create a subtype of an existing equipment, you should clone it. But this is not yet possible for SH5 guns, because they are in GR2 format. When TDW will make possible the addition of new meshes/subsets to a Gr2 file, making the same gun to have different specs on different ships will be very easy

Quote:
Originally Posted by Targor Avelany View Post
Thank you, gap. Sorry to be slow like this...
Don't mention it!
gap is offline   Reply With Quote
Old 09-27-12, 01:59 PM   #30
Targor Avelany
Ace of the Deep
 
Join Date: Jan 2010
Location: Vancouver, BC, Canada
Posts: 1,183
Downloads: 225
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
You stand correct for all of your statements except for equipment characteristics: specifications of each given equipment cannot vary from ship to ship. i.e: maximum elevation rate of a 20mm Oerlikon gun in single mounting will not vary if it is fitted on a Liberty Ship rather than on Ark Royal
Nah, I just didn't clearly stated what I meant, I guess. The position of the node/bone can very on every ship. The specs of the, let's say, guns stays the same.

tbh, it was the SubFlag mod by TDW that made me furiously search how the heck/where/etc curiosity rullez
Targor Avelany 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 09:24 PM.


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.