![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#1 | |||||
Ocean Warrior
![]() Join Date: Dec 2007
Location: Between test depth and periscope depth
Posts: 3,021
Downloads: 175
Uploads: 16
|
![]()
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_TurretNow 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:
Quote:
Quote:
Quote:
Quote:
__________________
USS Kentucky SSBN 737 (G) Comms Div 2003-2006 Qualified 19 November 03 Yes I was really on a submarine. |
|||||
![]() |
![]() |
![]() |
#2 | |||
Ocean Warrior
![]() Join Date: Dec 2007
Location: Between test depth and periscope depth
Posts: 3,021
Downloads: 175
Uploads: 16
|
![]()
Our objective here is to replace a standard Deck Gun with one of our choosing. A lot of the skills needed to perform this are obtained by following part 1 of the tutorial above, but part 2 should still be pretty simple. Again for this example I will be using the Ohio sub.
Now the next thing we have to figure out is what type of gun do we want to replace this with? For this tutorial I will use the US 14in Triple gun turret. Once you've made your selection we need to find out where all the AI unit guns are stored. Go to Data\Library\ShipParts, in here you find three sets of files named "guns_radars". The gun I'm using can be found in "guns_radars_03.dat". Once you have identified what file set your new gun is in, make a copy of that file set. I will be copying the guns_radars_03.dat and sim files. Now paste that in your USSubParts folder. Now that we've made a copy lets rename it. For simplicities sake we will name the files like the game has the other deck gun files named. So my "guns_radar_03" becomes "Deck_Gun_14." Now that we have that renamed open it up. Delete all the other guns in here except for the one you are using. Now save it. Open up the .sim file along with our dat file. We want to search for our gun in this sim file and delete all the other entries. Use the ID number of our gun to find its entry in the sim file. Now the next thing to do takes us back to the dat file. We need to rename our gun in here. Keep in mind that the base and the barrels both need to be renamed. I'm going to change mine to "14in_base_US" and "14in_barrels_US". Save again. Now over to the sim file. In here we want to select the wpn_Cannon sub-entry. Then in the right side expand obj_turret. You will see an entry named Barrel. The name there and the name for our barrels in the dat file must match so make that change here.Once we have only our gun entries in both files, save both files. Here's what our dat file looks like: And here's the sim file: Now in order not to confuse the game we have a couple more steps in our files. The first step is going to be remaping ID numbers. Go up to "Tools", select "Remap IDs". This brings up a window with a few options. First you want to press the Random button, then press Ok. Now save the dat file. Now do the same thing in the sim file except for pressing the Random button. If you press the Random button while Remapping IDs in the sim file, the IDs won't match and our gun won't work. Our next stop is the Weapons.upc file found in Data\UPCData\UPCUnitsData. If you don't have a copy of this file already make one. In this file we are going to add our new gun. Let's copy the entry for the 4in 50cal deck gun and paste it at the bottom, this will be our template with which to work. The first change we want to make to this is the [Weapon 6] line to [Weapon XX], where XX=the next number in the series for entries, mine happens to be 12. On the next line we will change ID= 4in50calUS to ID= 14in50calUS. Next line, 4"/50 Caliber Cannon becomes 14" /50 Caliber Cannon. Now we go down to the AmmoTypesAccepted line. For this we need to open up the Shells.dat file which is in the Library folder. This file lists all the shells in the game, from 20mm all the way up to 16in. So to find out what shell my gun fires I'm going to go to the Deck_Gun_14.sim file to find out. Look for the ammo_storage entry and expand it and it's sub entries. Only one of these entries here has a shell and amount, the rest are all zeroes. Quick side note, there are four types of shells: AP= Armor Piercing HE= High Explosive AA= Anti Aircraft SS= Starshell So we want to copy the shell type number and use that to "find" our shell in shells.dat. And we come up with...huh? A 14in gun is firing a 16in shell? Lucky for us all the shells are labeled in a manor that we can understand. So I'm going to take the extra step of changing my gun to firing 14in shells instead of 16in shells. Any gun can fire any shell you tell it to in the game, it's as simple as selecting the shells ID number and pasting it into the appropriate place in the guns sim file. Now lets go back to our Weapons.upc file and the AmmoTypesAccepted line. I'll make the change from 4inAPUS to 14inAPUS. One more line to change in this entry and that's the ExternalLinkName3D line. We want that to be the same as our guns name in the dat file, so I'll change mine to 14in_base_US. Save the Weapons file and open the UpgradePacks.upc file. Here's the end result of our entry into the Weapons.upc file: Quote:
Just like in the Weapons.upc file we will copy the entry for the 4" 50cal deck gun, [UpgradePack 13], and paste it at the bottom. First thing to change is the [UpgradePack 13] to the next in the series, mine will be [UpgradePack 32]. Next to change is the ID line. I'll change mine to Upack14in50calDG. NameDisplayable is our next line to change, mine will be 14" 50 cal Deck Gun. One last line to change here, IDLinkUpgradePackElements. What you enter on this line must match the ID line for our gun in the Weapons.upc file. And the end result here: Quote:
Now to the NSS_OhioSSBN.upc. We want to go down to the UpgradePackSlot section of the file, now find the entry for our deck gun. Remove "IDLinkUpgradePackSlotsIntervalDefault2= 1943-08-02, NULL, Upack3in50calDG". Now change the date of 1943-08-01 to the word NULL. This ensures that you will have this gun throughout the war. Now we need to change Upack4in50calDG to match the ID of our new gun in the UpgradePacks.upc file. So this now becomes Upack14in50calDG. Try it out in game. At this point the gun should be there but you cannot man the gun yourself. So now we have to included that. To do this we have to give our new gun a .cam file. The end result: Quote:
The easiest way to do this is to copy the .cam file of one of the three deck guns in the USSubParts folder. I've copied Deck_Gun_4_50.cam and renamed it Deck_Gun_14 to match the other files for my gun. One important thing to do to this file after renaming it is to Remap IDs like before, no need to press the Random button, just Remap IDs. Now let's go to our guns dat file. Open up the first node. Right click on the node and select Append New Child Chunk\Nodes\Node. Then select this new node, right click and select Appen New Child Chunk\Label. I'm going to enter Dmy_cam_14 for the name of this label. This is going to our camera view for our gun. At this point you may want to position the node someplace where you can have a good view unobstructded. Here's what our dat file looks like now. Once you have that positioned we need to link that to our cam file. So copy the ID number for our new node and go over to the cam file. Change the Parent IDs on both of the CamUserData main entries to that of our node from the dat file. Save all your work and make sure it works in the game.
__________________
USS Kentucky SSBN 737 (G) Comms Div 2003-2006 Qualified 19 November 03 Yes I was really on a submarine. Last edited by ETR3(SS); 02-25-10 at 02:01 PM. Reason: posted part 2 |
|||
![]() |
![]() |
![]() |
#3 | ||||||
Ocean Warrior
![]() Join Date: Dec 2007
Location: Between test depth and periscope depth
Posts: 3,021
Downloads: 175
Uploads: 16
|
![]()
The third part of this tutorial will focus on adding AA guns to our boat. Since this is very similar to adding deck guns to our boat I'll be quote the first part of this tutorial frequently and making appropriate changes. Again the Ohio has been choosen for this tutorial. For the AA guns we will be working with the Conning Tower files which can be found under the Objects folder.
Quote:
__________________
USS Kentucky SSBN 737 (G) Comms Div 2003-2006 Qualified 19 November 03 Yes I was really on a submarine. Last edited by ETR3(SS); 02-26-10 at 08:45 PM. Reason: posted part 3 |
||||||
![]() |
![]() |
![]() |
#5 |
Rear Admiral
![]() |
![]()
Great writeup.
![]() |
![]() |
![]() |
![]() |
#6 |
The Old Man
![]() Join Date: Mar 2007
Posts: 1,554
Downloads: 340
Uploads: 0
|
Great post!!!.......
![]() ![]() ![]() |
![]() |
![]() |
![]() |
#7 | |
Sailor Man
![]() Join Date: Oct 2009
Location: Dieser verdammte Platz
Posts: 239
Downloads: 43
Uploads: 0
|
![]() Quote:
![]() |
|
![]() |
![]() |
![]() |
#8 |
Ocean Warrior
![]() Join Date: Dec 2007
Location: Between test depth and periscope depth
Posts: 3,021
Downloads: 175
Uploads: 16
|
![]()
Part 2 is up. See post #2.
![]()
__________________
USS Kentucky SSBN 737 (G) Comms Div 2003-2006 Qualified 19 November 03 Yes I was really on a submarine. |
![]() |
![]() |
![]() |
#9 |
Sailor Man
![]() Join Date: Oct 2009
Location: Dieser verdammte Platz
Posts: 239
Downloads: 43
Uploads: 0
|
![]()
Holy cow, I made a mod! My S-boat now has a 4" double gun turret!
Now to make more... with even bigger guns, muahahaha! @ETR3(SS) : Thank you, thank you, thank you. Oh, and did I mention... Thank You! ![]() ![]() ![]() |
![]() |
![]() |
![]() |
#10 |
The Old Man
![]() Join Date: Mar 2007
Posts: 1,554
Downloads: 340
Uploads: 0
|
clayp in back of room(raises hand)
![]() |
![]() |
![]() |
![]() |
#11 |
Loader
![]() Join Date: Jul 2007
Location: Central FL
Posts: 88
Downloads: 337
Uploads: 0
|
![]()
Oh, my god...! I have been eager for this kind of tutorial for years, since I strongly want to do somemodding by myself. It's the first that I've found that shows people some details of the game files and how to change them. Thanks very, very much for posting!
![]() Yet, a very bitter disapointment struck me hard when, after following the tutorial almost to the end, I could not find the UpgradePacks.upc file ![]() (I downloaded the ohio class sub for SH4 v1.4 just to follow the instructions of this tutorial). Can anyone outhere help me, please!!!!!! ![]() Thanks, rea00cy |
![]() |
![]() |
![]() |
#12 | |
Admiral
![]() Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
|
![]() Quote:
The UpgradePacks.upc is in the Data/UPCData/UPCUnitsData folder. @Clay Hi Clay, Hope you are back for a long time now!! The "main node" for any object is the first one and is farthest to the left. There will be "child nodes" under it, but they will be indented. So in this image of the gun, 9 is the main node for the gun. The ones above it with the colored circles are materials/textures that are applied to the gun. They are not part of the actual gun, just the "Paint" that goes on the gun. Nodes 8 and 10 as you see are indented and are "child nodes" and 9 in the Main node or "Parent node" if that might make it easier to understand. Hope that helps. Peabody
__________________
System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2. |
|
![]() |
![]() |
![]() |
#13 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
hi all
etr3 i have doing your tutorial but i quess that i have something wrong ![]() i have to try to put a deckgun on a xxi but i have a problem and have not always my swimmingclodes with me look your self wat have i doing wrong ? grt henk ![]() |
![]() |
![]() |
#14 |
Ocean Warrior
![]() Join Date: Dec 2007
Location: Between test depth and periscope depth
Posts: 3,021
Downloads: 175
Uploads: 16
|
![]()
Looks like the problem is the location of your node in the boats dat file. You obviously want to move it up and back...way back.
![]()
__________________
USS Kentucky SSBN 737 (G) Comms Div 2003-2006 Qualified 19 November 03 Yes I was really on a submarine. |
![]() |
![]() |
![]() |
#15 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
So that looks better and my feet stay dry
![]() ![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|