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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 02-17-10, 10:08 PM   #1
ETR3(SS)
Ocean Warrior
 
Join Date: Dec 2007
Location: Between test depth and periscope depth
Posts: 3,021
Downloads: 175
Uploads: 16
Default [TUT] Adding gun mounts to playable units

The purpose of this thread is to show you how to add gun mounts to playable units.

Tools required:
S3D
Notepad

The first step is to choose what unit you want to work with. For the purpose of this tutorial I have chosen the Ohio Class Submarine. Now what we want to do is open up the .dat file using S3D. Open up the main node for our unit. Now right click that node and highlight "Append New Child Chunk", then select Nodes and then Node. This should insert a new Node at the end of the other nodes. Just like the previous step select this node, right click and highlight "Append New Child Chunk", then add a Label. So your new node with its label should look like this:


XXX:Node- <New Label>
XXX:<New Label>
XXX= the number for those entries.

Now we want to name our new node. To do this select our label sub-entry. On the right side you should get a text box that you can type in. Currently <New Label> is in that box. Enter "slot_M01_NSS_S18" into that box. Remember how we added the new node to the unit in the beginning? Now we have to do that again in the node you just created. This time enter "cfg#M01_NSS_S18" into the our new <New Label> box. Let's break this down so you understand what you are entering.

cfg#M01_NSS_S18


M=Main Armament

Variants of this are:

A= Anti Aircraft
S= Secondary Armament

01=Mount Number

NSS_S18=Unit Name

Armed with that knowledge you can now change the label to suit your needs. Should look like this:

Playable Unit



Now we want to position the node where we want our gun at. Select the first node we created and use this menu to position it.




A red dot in the model preview represents where you node is at at that moment. Once you get your node positioned where you want save it. That's it for the .dat file.

Next is the sim file so go ahead and open that up. First thing you want to do here is right click and "Append New Chunk," select the Controllers then the Controller option. Select this new entry and a text box will show up on the right. Enter obj_Turret in that field. Now right click on our new entry and select "Append New Child Chunk", Properties, SH4, SHSim, obj_Turret. So we should now have the following:

XXX: obj_Turret
XXX: obj_Turret

Now select the sub-entry and a menu appears on the right. What we are interested in in this menu is Traverse and Elevation. Under each are the tree things we are primarily interested in; min, max, and speed. For traverse min is how far left the mount can rotate, and max is how far right. Speed is the speed the mount rotates in º/sec. The same settings for Elevation should be self explanatory. That does it for the sim file!

Next we open the units UPC file found in the Submarine/NSS_Unit Name folder. Our first stop here is the compartments listing. We want to add a new compartment to our unit. For Ohio I added this compartment:

Quote:
[UserPlayerUnit 1.Compartment 6]
CompartmentType= 2
StatusActive= No
ID= S18DeckGun
NameDisplayable= Deck Gun
Type=NULL
FunctionalType= ArtilleryRoom
MechanicalCoef= 0.5
ElectricsCoef= 0.5
GunsCoef= 0.2 ;0..1
WatchmanCoef= 0.5
WatchStandingCoef= 0.048
MaintenanceCoef= 0.0144
RepairsCoef= 0.072
ReloadingweaponCoef= 0.072
SleepCoef= -0.12
LeadersSlots=0
CrewMembersSlots= 0
EffciencyDenominator=2
EffciencyDenominatorBS=2
Hitpoints=200
CrewExposure=0.7
EquipmentsExposure=0.1
WeaponsExposure=0.1
ExternalDamageZoneTypeID3D= 43
DamageDescription1= NULL, 0, 0.2, 0, 1, 1, Minor damage, 0, 0, NULL, 0, 0.2, 0.2
DamageDescription2= NULL, 0.2, 0.6, 0, 1, 1, Medium damage, 0, 0, NULL, 0, 0.2, 0.5
DamageDescription3= NULL, 0.6, 1, 0, 1, 1, Heavy damage, 0, 0, NULL, 0, 0.2, 1
I added this as the last compartment. Something to make sure you change is the compartment number. If the previous compartment is compartment 7 obviously name this new one compartment 8. The next thing we need to add now is crew slots for our new compartment.You will want to add this at the end of all the other crew member slots in the file just before the equipment and weapons slots start. Again this is what I added for Ohio:

Quote:
; ******** DECK GUN *********

[UserPlayerUnit 1.Compartment 6.CrewMemberSlot 1]
ID=CrewMemberSlot_DGunL1
NameDisplayable= Deck Gun Leader
Type= Leader
WatchIndex= 0
IDLinkCrewMember= CPOGuns
WatchCrewMemberSlot3D= WM1@slot_M01
BattleStationsCrewMemberSlot3D= WM1@slot_M01
WatchAccessoriesForAdding3DObjects= NULL
WatchAccessoriesForSubtracting3DObjects= NULL
BattleAccessoriesForAdding3DObjects= NULL
BattleAccessoriesForSubtracting3DObjects= NULL

[UserPlayerUnit 1.Compartment 6.CrewMemberSlot 2]
ID=CrewMemberSlot_DGunC1
NameDisplayable= Deck Gun Crew
Type= Crewman
WatchIndex= 0
IDLinkCrewMember= NR
WatchCrewMemberSlot3D= WM2@slot_M01
BattleStationsCrewMemberSlot3D= WM2@slot_M01
WatchAccessoriesForAdding3DObjects= NULL
WatchAccessoriesForSubtracting3DObjects= NULL
BattleAccessoriesForAdding3DObjects= NULL
BattleAccessoriesForSubtracting3DObjects= NULL
Make sure the compartment number for your crew slots matches the compartment number you entered earlier. Next step is adding the weapon slots slots. Just like the crew slots add this after all the other equipment and weapons slots but before the Upgrade Slots.
Quote:
;------------------------------------------------------------
; DECK GUN
;------------------------------------------------------------

[UserPlayerUnit 1.Compartment 6.WeaponSlot 1]
ID= BowDeckGun
NameDisplayable= Deck Gun Mount
Type=NULL
AcceptedTypes= NULL
UserCustomizable=No
IDLinkBunker= GunsAmmoBunker
IDLinkWeaponIntervalDefault1= NULL, NULL, NULL, NULL
ExternalNodeName3D= M01
ExternalObjectName3D= NULL
ExternalDamageZoneTypeID3D= -1

[UserPlayerUnit 1.Compartment 2.Bunker 1] ; Deck Gun and Flak guns ammo
ID=GunsAmmoBunker
Capacity=10
IDLinkAmmunitionIntervalDefault1= NULL, NULL, NULL, 0
Now we add an entry under UpgradePackSlot.

Quote:
[UserPlayerUnit 1.UpgradePackSlot 3]
ID= UpgBowDeckGun
NameDisplayable= Deck Gun Mount
Type=NULL
AcceptedTypes=USDeckGun
UserCustomizable=Yes
IDLinkUpgradePackSlots= BowDeckGun
IDLinkUpgradePackSlotsIntervalDefault1= NULL, 1943-08-01, Upack4in50calDG
IDLinkUpgradePackSlotsIntervalDefault2= 1943-08-02, NULL, Upack3in50calDG
One last thing to enter to make our new mount work in-game and that's under FunctionalSubsystem. Like before this goes at the end of that section.

Quote:
[UserPlayerUnit 1.FunctionalSubsystem 25]
ID= CrewDeckGun
NameDisplayable= Deck Gun
FunctionalType= CrewMembersGrouping
IDLinkFunctionalSubsystemSlots= CrewMemberSlot_DGunL1, 0,CrewMemberSlot_DGunC1, 0
Note that the colored entries must match each other, yellow for yellow, red for red, etc. This gives you the basics you need to add a gun mount to a playable unit. My next post will be about changing the gun that is mounted by default, yes you can have the Yamatos 18in guns on a submarine!
__________________


USS Kentucky SSBN 737 (G)
Comms Div 2003-2006
Qualified 19 November 03

Yes I was really on a submarine.
ETR3(SS) is offline   Reply With Quote
 


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 04:19 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.