View Single Post
Old 05-23-19, 09:51 PM   #1
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default Tutorial, earlier upgrades

This exercise will be to get a career start with the option of a GATO class in December 1941. Files involved;


\Data\UPCData\UPCCampaignData\CareerStart.upc
\Data\UPCData\UPCUnitsData\UpgradePacks.upc
\Data\Submarine\NSS_GATO\NSS_Gato.upc

Before beginning, COPY THOSE FILES TO A BACKUP LOCATION. Important, if you make a mistake the easiest way to recover is to copy the backup files in to overwrite the ones you messed up.

Starting with the simplest hack, just give me a Gato in December of 41.

Browse to \Data\UPCData\UPCCampaignData\ and open CareerStart.upc with notepad.

[CareerStart 1.Flotilla 1]
ID= C1Flotilla1
NameDisplayable= Pearl Harbor
IDLinkFlotilla= PearlHarborCommand
IDLinkUserPlayerUnits= F1Porpoise, 4, F1Tambor, 5, F1Gar, 4
FlotillaBriefingText=
FlotillaCommonality= 1

[CareerStart 1.Flotilla 2]
ID= C1Flotilla2
NameDisplayable= Manila
IDLinkFlotilla= FremantleCommand
IDLinkUserPlayerUnits= F2Sboat, 6, F2Porpoise, 7, F2Salmon, 6, F2Sargo, 11
FlotillaBriefingText=
FlotillaCommonality= 2

Add a comma after the last boat, then an F1Gato to the Pearl Harbor start, F2Gato to Manila;

[CareerStart 1.Flotilla 1]
ID= C1Flotilla1
NameDisplayable= Pearl Harbor
IDLinkFlotilla= PearlHarborCommand
IDLinkUserPlayerUnits= F1Porpoise, 4, F1Tambor, 5, F1Gar, 4, F1Gato, 10
FlotillaBriefingText=
FlotillaCommonality= 1

[CareerStart 1.Flotilla 2]
ID= C1Flotilla2
NameDisplayable= Manila
IDLinkFlotilla= FremantleCommand
IDLinkUserPlayerUnits= F2Sboat, 6, F2Porpoise, 7, F2Salmon, 6, F2Sargo, 11, F2Gato, 10
FlotillaBriefingText=
FlotillaCommonality= 2

Save the file, then start the game and test by starting new careers, both Pearl and Manila. If the game crashes, check your syntax - one misplaced or missing comma will cause the game to crash. Note also the F1 and F2 have to match the other subs for each flotilla.

After testing, we want something better than the default early war Gato, so open the \Data\Submarine\NSS_GATO\NSS_Gato.upc file.

EDIT, FIND, "conning",

[UserPlayerUnit 1.UnitPartSlot 1]
ID=GatoConningSlot
NameDisplayable=Conning Tower Mount
Type=NULL
AcceptedTypes=GatoConningTower
IDLinkUnitPartIntervalDefault1= NULL, 1942-09-31, GatoConningEarlyWar
IDLinkUnitPartIntervalDefault2= 1942-10-01, 1943-03-31, GatoConningMedWar
IDLinkUnitPartIntervalDefault3= 1943-04-01, 1944-10-31, GatoConningLateWar
IDLinkUnitPartIntervalDefault4= 1944-11-01, NULL, GatoConningElite
ExternalNodeName3D= Z01

Rather than fiddling with all that cutting and welding, let's take the last year conning tower and change it so we have the same one for the entire war.

[UserPlayerUnit 1.UnitPartSlot 1]
ID=GatoConningSlot
NameDisplayable=Conning Tower Mount
Type=NULL
AcceptedTypes=GatoConningTower
IDLinkUnitPartIntervalDefault1= NULL, NULL, GatoConningElite
ExternalNodeName3D= Z01

Note that NULL replacing the first date means it's available from the start, NULL for the second date means it never expires. Simple way to change most upgrade packs, but be sure to replace the Default4 with Default1 for whatever is in the first slot.

That gives you a Gato with the Elite conning tower, which has 40mm Bofors fore and aft by default. For other sub types you have "late war" in the first slot.

For the deck gun(s);

\Data\UPCData\UPCUnitsData\UpgradePacks.upc

For the double 5 inch 25s scroll down to upgrade pack 25;

[UpgradePack 25]
ID= Upack5in25calDGDouble
NameDisplayable= 5" 25 cal Deck Guns (Bow and Stern)
FunctionalType= UpFTypeWeaponCannon
UpgradePackSlotType= USDeckGunAdv
Type=NULL
UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0
UnitUpgradePackIntervalOptions1= 1945-01-01, NULL, 2000
IDLinkUpgradePackElements= 5in25calUS, 5in25calUS

Change to

[UpgradePack 25]
ID= Upack5in25calDGDouble
NameDisplayable= 5" 25 cal Deck Guns (Bow and Stern)
FunctionalType= UpFTypeWeaponCannon
UpgradePackSlotType= USDeckGunAdv
Type=NULL
UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0
UnitUpgradePackIntervalOptions1= NULL, NULL, 0
IDLinkUpgradePackElements= 5in25calUS, 5in25calUS

Then save, exit, try in game. For other subs, in this example the Porpoise;

[UserPlayerUnit 1.UpgradePackSlot 3]
ID= UpgDeckGun
NameDisplayable= Deck Gun
Type=NULL
AcceptedTypes=USDeckGunBasic
UserCustomizable=Yes
IDLinkUpgradePackSlots= BowDeckGun, SternDeckGun
IDLinkUpgradePackSlotsIntervalDefault1= NULL, 1943-09-01, Upack3in50calDGStern
IDLinkUpgradePackSlotsIntervalDefault2= 1943-09-02, NULL, Upack3in50calDGBow

You can edit the NSS_Porpoise\NSS_Porpoise.upc file by copying and pasting the datablock from the NSS_Gato.upc to overwrite that;

[UserPlayerUnit 1.UpgradePackSlot 3]
ID= UpgDeckGun
NameDisplayable= Deck Gun
Type=NULL
AcceptedTypes=USDeckGunBasic, USDeckGunAdv
UserCustomizable=Yes
IDLinkUpgradePackSlots= BowDeckGun, SternDeckGun
IDLinkUpgradePackSlotsIntervalDefault1= NULL, NULL, Upack4in50calDGBow
IDLinkUpgradePackSlotsIntervalDefault2= NULL, NULL, Upack3in50calDGBow
IDLinkUpgradePackSlotsIntervalDefault3= NULL, NULL, Upack3in50calDGStern
IDLinkUpgradePackSlotsIntervalDefault4= NULL, NULL, Upack5in25calDGBow

And that gets you the double 5 inch 25s on any fleet sub.

For radar, simplest way is to get it by default, back to \Data\Submarine\NSS_GATO\NSS_Gato.upc to find and null;

[UserPlayerUnit 1.UpgradePackSlot 1]
ID= UpgSurfaceSearchRadar
NameDisplayable= Surface Search Radar
Type=NULL
AcceptedTypes=GatoSurfaceRadars
UserCustomizable=Yes
IDLinkUpgradePackSlots= EqSlot42, EqSlot43, SurfRadarAntenna
IDLinkUpgradePackSlotsIntervalDefault1= 1942-07-05, 1943-07-01, UpackGatoSJRadar
IDLinkUpgradePackSlotsIntervalDefault2= NULL, NULL, UpackGatoSJ1Radar
;IDLinkUpgradePackSlotsIntervalDefault3= 1945-09-01, NULL, UpackGatoSSRadar

[UserPlayerUnit 1.UpgradePackSlot 2]
ID= UpgAirSearchRadar
NameDisplayable= Air Search Radar
Type=NULL
AcceptedTypes=AirRadars, AdvAirRadars
UserCustomizable=Yes
IDLinkUpgradePackSlots= EqSlot33, AirRadarAntenna
IDLinkUpgradePackSlotsIntervalDefault1= 1941-12-25, 1943-03-11, UpackGatoSDRadar
IDLinkUpgradePackSlotsIntervalDefault2= NULL, NULL, UpackGatoImpSDRadar
IDLinkUpgradePackSlotsIntervalDefault3= 1945-08-01, 1945-12-31, UpackGatoSVRadar

For this example I have Improved SD and the SJ-1 by default, if desired you could change the start date to NULL for the early sets then upgrade later.
Sniper297 is offline   Reply With Quote