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 > SH4 Mission Designers' Forum
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 12-12-16, 11:30 PM   #1
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default New construction random choice?

I'm looking for the file or files that control which new sub is given and when during a career. Ideally I should be able to start in a Sugar boat, instead of "new construction" get promoted to a Porpoise, then a Salmon/Sargo, then Gar, etc. What I get instead seems to be a random dice roll.

One possibility would be changing the availability dates for various subs (example the Porpoise not available until July 42, Sargo Jan 43, Gar/Tambor July 43, etc. ) in the flotillas.upc file, but I'm hoping there's another "promotion" file somewhere to make it simpler.
Sniper297 is offline   Reply With Quote
Old 03-30-17, 07:20 PM   #2
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

After several false starts (including assorted CTDs) I edited two files in the \Data\UPCData\UPCCampaignData folder;

CareerStart.upc

Flotillas.upc

It turns out to be tricky since some of the data is interdependent, for example if you set the availability of the GAR class for sometime in 1943 in Flotillas.upc, then try to start a 1941 career when the GAR is listed as one of the choices to start in CareerStart.upc, the game will crash when you select career.

So I deleted all but the S-18 from the CareerStart.upc:

[CareerStart 1.Flotilla 2]
ID= C1Flotilla2
NameDisplayable= Manila
IDLinkFlotilla= FremantleCommand
IDLinkUserPlayerUnits= F2Sboat, 6

Then in Flotillas.upc;

[Flotilla 2.UserPlayerUnitType 1]
ID= F2Sboat
NameDisplayable= S-18 class
AvailabilityInterval= NULL, 1942-04-15
IDLinkUserPlayerUnitType= S18
UnitTypeCommonality= 6 ; to be used when a random choice is assigned
IDFlotillaLinkTransferTo= BrisbaneCommand ; when the flotilla is disbanded, the subs of this type are transferred to this one

[Flotilla 2.UserPlayerUnitType 2]
ID= F2Porpoise
NameDisplayable= Porpoise class
AvailabilityInterval= 1942-01-01, 1943-02-01
IDLinkUserPlayerUnitType= Porpoise
UnitTypeCommonality= 7
IDFlotillaLinkTransferTo= NULL

[Flotilla 2.UserPlayerUnitType 3]
ID= F2Salmon
NameDisplayable= Salmon class
AvailabilityInterval= 1944-12-01, 1945-01-01
IDLinkUserPlayerUnitType= Salmon
UnitTypeCommonality= 6
IDFlotillaLinkTransferTo= NULL

[Flotilla 2.UserPlayerUnitType 4]
ID= F2Sargo
NameDisplayable= Sargo class
AvailabilityInterval= 1943-01-01, 1944-08-01
IDLinkUserPlayerUnitType= Sargo
UnitTypeCommonality= 11
IDFlotillaLinkTransferTo= PearlHarborCommand

[Flotilla 2.UserPlayerUnitType 5]
ID= F2Tambor
NameDisplayable= Tambor class
AvailabilityInterval= 1944-05-01, 1945-03-01
IDLinkUserPlayerUnitType= Tambor
UnitTypeCommonality= 1
IDFlotillaLinkTransferTo= NULL

[Flotilla 2.UserPlayerUnitType 6]
ID= F2Gar
NameDisplayable= Gar class
AvailabilityInterval= 1944-05-01, 1943-12-01
IDLinkUserPlayerUnitType= Gar
UnitTypeCommonality= 3
IDFlotillaLinkTransferTo= BrisbaneCommand

[Flotilla 2.UserPlayerUnitType 7]
ID= F2Gato
NameDisplayable= Gato class
AvailabilityInterval= 1944-12-01, NULL
IDLinkUserPlayerUnitType= Gato
UnitTypeCommonality= 10
IDFlotillaLinkTransferTo= NULL

[Flotilla 2.UserPlayerUnitType 8]
ID= F2Balao
NameDisplayable= Balao class
AvailabilityInterval= 1944-08-01, NULL
IDLinkUserPlayerUnitType= Balao
UnitTypeCommonality= 10
IDFlotillaLinkTransferTo= NULL

This is purely experimental right now, the idea being a low ranking officer starting with an S boat, promoted to a Porpoise, then a Sargo. The availability dates eliminates the possibility of getting something weird like first promotion to a Gato, then a second promotion that takes you backwards into a Porpoise or Salmon. I wish there was a simpler way, since it's so blasted touchy, but near as I can tell both files will have to be carefully coordinated for the different flotillas and career start years. If one of the choices in 1941 is a Tambor or Gar then both of those have to be available in 1941 or the game will crash, and if they're available then either one could be assigned as a "new" sub later in the career.
Sniper297 is offline   Reply With Quote
Old 03-31-17, 03:55 AM   #3
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,911
Downloads: 444
Uploads: 2


Default

There is a upc file for the Submarines also, in the Data / Submarine / SubName folder, and that's what you match in the CareerStart for the Submarine. You'll notice an S18 and S42. There's an "ID=" line in that, and that's what goes on that "IDLinkUserPlayerUnitType=" line. Some of those lines have the ;comment of "; enumeration of ID(s) that point to submarine upc file". That's what that means. The Flotilla.upc has similar requirements of "exactly matching" parts of the CareerStart file, and things in the PatrolObjectives.cfg must match things in flotilla.upc... one little "I" not dotted, or "T" not crossed, and you get a CTD to tell you that you made a mistake... There really should be an error trap there, but there isn't... You'll see "DeBug Mode" listed in some areas of the game's internals, but not in others... ??
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Old 04-12-17, 03:12 PM   #4
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Been so busy testing this I forgot to check back on this thread.

Yeah, I don't see where it would make a difference with the missions, unless you're driving a Gato in 1942 you're not gonna get the UserPlayerUnitType 7.Objective 1 mission, you'll get the mission for whatever type you're driving.

This is not actually working - started in an S boat, made three short patrols and was offered a new sub after the third patrol in January 42, as expected I got a Porpoise. Made three patrols in the Porpoise, offered new sub in April 42 - got a Gato.

[Flotilla 2.UserPlayerUnitType 7]
ID= F2Gato
NameDisplayable= Gato class
AvailabilityInterval= 1944-12-01, NULL
IDLinkUserPlayerUnitType= Gato
UnitTypeCommonality= 10
IDFlotillaLinkTransferTo= NULL

According to that a Gato is not supposed to be available for an Asiatic career until 1944, so I missed a file hack someplace.
Sniper297 is offline   Reply With Quote
Old 04-12-17, 09:14 PM   #5
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,911
Downloads: 444
Uploads: 2


Default

I'm not near my computer now, but - from my memory now - I believe it's the CareerStart, there's a number in the listings, after the boats' "definition" line(s), where it's like "Flotilla Commonality = ", or something to that effect, and it's either 1, 2, 3, etc., whichever boat is the "default" to start that particular start with. Look at like Stock Pearl, Career Start 1, and you'll see "points" at the Porpoise, and Manila points at the S-18 boat. I'd have to double-check with CapnScurvy, but there's an "Upgrades" type file, also a cfg, if I'm remembering that correctly, that might control the upgrade path...
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Old 05-04-17, 12:49 PM   #6
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Quote:
Originally Posted by Sniper297 View Post
According to that a Gato is not supposed to be available for an Asiatic career until 1944, so I missed a file hack someplace.
At least three GATO class boats were in Asiatic by 1943. USS Silversides began her 4th patrol out of Brisbane in Dec 1942; a most memorable patrol for pharmacist's mate, PM1 Thomas Moore who performed a successful emergency appendectomy immediately followed by enduring a severe ASW DC attack 23 Dec when Silversides attempted to surface.

After the attack seemed to be over,
Quote:
"Thinking herself safe, Silversides surfaced only to find the destroyer still there. Additionally, a Japanese airplane had arrived on the scene, and proceeded to drop three bombs on the submarine, severely damaging her bow planes and causing them to lock on full dive. Silversides managed to level off just short of crush depth and eventually evaded the enemy ship before surfacing to recharge her batteries and effect emergency repairs."
Silversides continued her patrol.
https://en.wikipedia.org/wiki/USS_Silversides_(SS-236)

I wanted to correct the GATO Asiatic start date and tell the interesting (story) of part of Silversides fourth patrol. After the above incident, she went on to sink the largest ship of her career before returning to port for major repairs.

Happy Hunting!
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."

aanker is offline   Reply With Quote
Old 05-05-17, 04:14 PM   #7
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Well, the point of this exercise is not about when certain types were actually available, it's about what would be logical. Lt. Peasant has no political connections, starts the war in an S boat. LCDR Prince knows Important People, starts in a Porpoise. LCDR King comes from a wealthy family, starts in a Salmon. So when LT Peasant finishes 3 or 4 successful patrols in an S class, will he get upgraded to a Tambor? Not likely, LCDR Prince and LCDR King get Tambors, LCDR King's XO get promoted to command the Salmon, LT Peasant gets LCDR Prince's old Porpoise for his next command. If LT Peasant does an outstanding job and gets a lot of medals, he could get the best sub available, but the average would get something better than he had but not always the best.

The way the game is set up the "upgrade" is a completely random roll of the dice, it's possible to go from an S boat to a Gato, then for the next "upgrade" you get demoted to a Salmon. What I'm trying to do here is make the progression more logical, and the Flotilla Commonality number still leaves the career programming random rather than something that makes sense. Editing those Flotilla Commonality numbers reduces the odds of going from a Balao to a Gar, but a bad roll of the dice is still possible.
Sniper297 is offline   Reply With Quote
Old 05-05-17, 05:54 PM   #8
aanker
Pacific Thunder
 
aanker's Avatar
 
Join Date: Apr 2004
Location: Yellow Sea
Posts: 1,896
Downloads: 236
Uploads: 14


Default

Interesting project, good luck.

I was just correcting the record regarding when the GATO class boats started patrolling in Asiatic.

Happy Hunting!
__________________
" Bless those who serve beneath the deep,
Through lonely hours their vigil keep.
May peace their mission ever be,
Protect each one we ask of thee.
Bless those at home who wait and pray,
For their return by night and day."

aanker is offline   Reply With Quote
Old 05-05-17, 06:33 PM   #9
yubba
Admiral
 
Join Date: Sep 2009
Location: in a neighborhood near you
Posts: 2,478
Downloads: 293
Uploads: 2
Default this is what I did to get the PT in campaign

You can use this as blue print to get what you want where,, I haven't swap boats around yet,, but I'm thinking of it,, what I did do was put RFB 1.4 upc campaign file into claytons optical correction 1.4,, and now I have a nice list of dates and a attack map that works.. This what I did for the PT may be you will find what you missed in here. Took some editing in the main game folder but I got it to work in RFB 1.4 out of Manila to start since I just figured it out,there is a bit of editing so bare with me, I'll print out edits. You edit UPC Data files,,.. Start with Career Start,, edit this so it looks like this,, you should dump the UPC Campaign file out of the PT-109 first before install it and do the edits in main game folder

[CareerStart 2.Flotilla 2]
ID= C2Flotilla2
NameDisplayable= Manila
IDLinkFlotilla= FremantleCommand
IDLinkUserPlayerUnits= F2Sboat, 5, F2Porpoise, 7, F2Salmon, 4, F2Sargo, 8, F1NSSPT109, 4
FlotillaBriefingText= ; seems to have no function
FlotillaCommonality= 2 ; to be used when a random choice is assigned

then go to Flotillas and edit this you can copy and paste this

[Flotilla 2.UserPlayerUnitType 9]
ID= F1NSSPT109
NameDisplayable=Elco PT_109 MTB
AvailabilityInterval= 1938-01-01, 1945-12-31
IDLinkUserPlayerUnitType= NSS_PT_109
UnitTypeCommonality= 4
IDFlotillaLinkTransferTo= NULL


then add this I copied one of subs campaigns and renamed it..you can also copy and paste this

[Flotilla 2.UserPlayerUnitType 9.Objective 1] ; NSSPT109
ID= Fre3OBj1
NameDisplayable= Objectives placed around the Phillipines
AvailabilityInterval=NULL, 1944-10-01
ObjectiveCode= Philippines

[Flotilla 2.UserPlayerUnitType 9.Objective 2]
ID= Fre3OBj2
NameDisplayable= Java Sea
AvailabilityInterval=1942-02-01, 1945-08-01
ObjectiveCode= Java Sea

[Flotilla 2.UserPlayerUnitType 9.Objective 3]
ID= Fre3OBj3
NameDisplayable= Makassar Strait
AvailabilityInterval=1942-05-01, 1944-03-01
ObjectiveCode= Makasar Strait

[Flotilla 2.UserPlayerUnitType 9.Objective 4]
ID= Fre3OBj4
NameDisplayable= Celebes Sea
AvailabilityInterval=NULL, 1944-11-01
ObjectiveCode= Celebes Sea

[Flotilla 2.UserPlayerUnitType 9.Objective 5]
ID= Fre3OBj5
NameDisplayable= South China Sea
AvailabilityInterval=1941-12-01, 1945-09-01
ObjectiveCode= South China Sea

[Flotilla 2.UserPlayerUnitType 9.Objective 6]
ID= Fre3OBj6
NameDisplayable= Sulu Sea
AvailabilityInterval=NULL, 1942-02-28
ObjectiveCode= Sulu Sea

[Flotilla 2.UserPlayerUnitType 9.Objective 7]
ID= Fre3OBj7
NameDisplayable= Formosa
AvailabilityInterval=NULL, 1941-12-20
ObjectiveCode= Formosa Strait

[Flotilla 2.UserPlayerUnitType 9.Objective 8]
ID= Fre3OBj8
NameDisplayable= Luzon Strait
AvailabilityInterval=NULL, 1941-12-23
ObjectiveCode= Luzon Strait

;***************************


then go to UPC Units make a new folder and copy and paste the porpoise file inside new folder and rename,, to UnitParts9NSSPT_109

then open file and Edit this so it looks likes this

[UnitPart 1]
ID= NSS_PT_109
Type= NSS_PT_109ConningTower
NameDisplayable= NSS_PT_109 MTB
UnitPartInterval=NULL, NULL
ExternalLinkName3D= data/objects/Conning_PT109_01
HullTextureNameOverride=data/Submarine/NSS_PT1_09/NSS_PT_109class_T01.tga
HullLightmapTextureNameOverride=data/Submarine/NSS_PT_109/NSS_PT_109_O01.tga
HullNormalmapTextureNameOverride= NULL
MenuSilhouetteTextureNameOverride=NSS_PT_109_Class _01.tga


then remove it and place it back in UPCUnits folder that should do it

Last edited by yubba; 05-05-17 at 06:44 PM.
yubba is offline   Reply With Quote
Old 05-05-17, 06:38 PM   #10
ETR3(SS)
Ocean Warrior
 
Join Date: Dec 2007
Location: Between test depth and periscope depth
Posts: 3,021
Downloads: 175
Uploads: 16
Default

The logic is behind the actual number of boats per class vs time. Start of war there were 10 Porpoise class, 6 Salmon Class, 10 Sargo Class, 12 Tambor Class. The Gato Class production was ramping up with a total of 77 completed, followed by 120 Balao Class boats. Odds are you're going to transfer to a new boat, and those odds become greater the later in the war due to losses of the older classes.

I do understand what you're saying though from the perspective of working your way up the ladder. But as you and I both know the Navy puts people where it needs them.
__________________


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
Old 05-05-17, 08:01 PM   #11
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,911
Downloads: 444
Uploads: 2


Default

Quote:
Originally Posted by ETR3(SS) View Post
... But as you and I both know the Navy puts people where it needs them.
So, that would explain my last boat then:
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Old 05-05-17, 08:03 PM   #12
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Yeah, especially in wartime. My current problem is random CTD, rather than improving with 1.5 it's actually more frequent, so now I gotta try a US career with no mods, see if one of the many many mods is the problem or 1.5 isn't worth the aggravation.
Sniper297 is offline   Reply With Quote
Old 05-05-17, 08:10 PM   #13
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,911
Downloads: 444
Uploads: 2


Default

Watch for semi-colons where they shouldn't be, and where they should be... That's been my biggest mistake most times, in that I'll do a divider line of
--------------------------
and forget to put the semi-colon in front to make it a comment... bad dates too, and mis-matched ID and Commonality stuff...
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Old 05-05-17, 10:03 PM   #14
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Usually a single error in a file will result in a crash when loading, or if specific to a single system or ship will have a trigger. Example, a sonar file is screwed up you get CTD when you go to the sonar station, or an error in the CFG file for a FUBUKI class destroyer will cause a crash when there's a FUBUKI in sight. This doesn't seem to be specific to anything, sometimes changing views, sometimes after a torpedo hit, sometimes tracking a target with the sonar, sometimes just when cruising along. And of course I reload a save and repeat the same things and it doesn't crash, one of them unholy bugs that can't be duplicated easily which makes troubleshooting a nightmare. Only way to deal with it is start from scratch with a clean install.
Sniper297 is offline   Reply With Quote
Old 05-06-17, 02:33 PM   #15
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,911
Downloads: 444
Uploads: 2


Default

But man, when it actually ~works~!!! Wow! How cool is that?...
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie 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 07:06 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.