View Single Post
Old 01-12-08, 07:20 AM   #3
Mush Martin
Eternal Patrol
 
Join Date: Dec 2006
Posts: 4,398
Downloads: 4
Uploads: 0
Default

Mymod Segment Two

Contributors MM, RDP, Gunner.

Upgrade Packs.

So now that weve been able to give ourselves
as much money as we like now lets undermine
the economy a bit and make everything free
and available from the start of the war.
Lets start as usual by opening

Desktop\mymod_alfa_1.0\data\upc\UPCUnitsData
now open the file UpgradePacks UPC
Lets look at the first section:

; Upgrade pack Functional Types
;
; FunctionalType= UpFTypeSensorRadar
; FunctionalType= UpFTypeSensorUnderwater
; FunctionalType= UpFTypeSensorBathyTermograph
; FunctionalType= UpFTypeSensorPeriscope
; FunctionalType= UpFTypeWeaponFlak
; FunctionalType= UpFTypeWeaponCannon
; FunctionalType= UpFTypeWeaponTorpedoTube
; FunctionalType= UpFTypeDecoy
; FunctionalType= UpFTypeCoating
; FunctionalType= UpFTypeIceCream
; FunctionalType= UpFTypePropulsionEngines
; FunctionalType= UpFTypePropulsionBatteries
; FunctionalType= UpFTypePropulsionPropellors
; FunctionalType= UpFTypeControlsDirection
; FunctionalType= UpFTypeControlsDiving
; FunctionalType= UpFTypeBulkhead
; FunctionalType= UpFTypeComputerTDC
; FunctionalType= UpFTypeComputerGunfireControl
; FunctionalType= NULL


This section which you can see is commented
out by the devs, is a list of functional types recognized
by the game.

It's pretty straightforward.
UpFTypeSensorRadar means upgrade packs containing radars.

UpFTypeSensorUnderwater means upgrade packs that contain
sonars and so on.

Now to avoid confusion, lets understand that the game
does not utilize all of the types available to it as
purchasable upgrades in the game.

So lets get to it. Because Mymod_alfa_1.0 uses a Gato class,
lets make some equipment available for it.

First off something meant for Gato, a radar to start with will do
and some guns. Lets start here:

[UpgradePack 3]
ID= UpackGatoSVRadar
NameDisplayable= SV Radar
FunctionalType= UpFTypeSensorRadar
UpgradePackSlotType= AdvAirRadars
Type=NULL
;UpgradePackInterval=1945-08
-01, NULL
UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0
UnitUpgradePackIntervalOptions1=1945-06-01, NULL, 1500
IDLinkUpgradePackElements= SDRadarApp, SVRadarAntenna


So by way of explanation........

ID= UpackGatoSVRadar
(the name used by the game itself)

FunctionalType= UpFTypeSensorRadar
(as listed in that top list we looked at)
(I suspect this governs model behaviours ingame)

UpgradePackSlotType= AdvAirRadars
(this is the actual upgrade pack type as you and I
would shop for it ingame. Your sub must have an
upgrade type listed as compatable in its submarine
files in order to accept any type of upgrade.
So if AA gun upgrades arent listed in the submarine
file, then you won't be able to mount 20MM twins even
if they are available)

Type=NULL
(function unknown)

;UpgradePackInterval=1945-08-01, NULL
(this line is commented out and I believe is
just simply a visual reference on the correct
historical date of equipment availability).

UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0
UnitUpgradePackIntervalOptions1=1945-06-01, NULL, 1500
(These two lines govern availability in game,
again the format is startdate before comma, endate
after comma price is the last entry in this example
the price is zero on the first one and 1500 on the second.
Also where there are two availablity dates, I suspect but
have not tested that it is for conning tower. One availability
conning tower two availability and so on).

Why two I'm not sure, but If I invented penicilin in game
in January 1942, I could make it available for say 1000 prestige pts.
If later in say June 1943, I invented mass production techniques
for it then I could time in a drop in price to simulate wider
availability.

Finally
IDLinkUpgradePackElements= SDRadarApp, SVRadarAntenna

(This link elements business seems to be a pre set up
chain of links to various models in game relevant to
a particular upgrade pack in the example above.
The links used are SDRadar Apparatus,
the type and look of the radarscreen and its switches
inside the conning tower and then followed by
SVRadar antenna which is the 3d model that is used
in game with this type as seen outside the sub
. .......I Think!).

So lets change the date and price using the usual method.

[UpgradePack 3]
ID= UpackGatoSVRadar
NameDisplayable= SV Radar
FunctionalType= UpFTypeSensorRadar
UpgradePackSlotType= AdvAirRadars
Type=NULL
;UpgradePackInterval=1945-08
-01, NULL
UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0
UnitUpgradePackIntervalOptions1=NULL, NULL, 0 <----------------------------------change this
IDLinkUpgradePackElements= SDRadarApp, SVRadarAntenna


Moving forward for a quick moment, lets just look at
how a sub defines what upgrade packs it can use.

Back out of the file to this point
Desktop\Mymod_alfa_1.0\Data\UPCData\UPCUnitsData

then open the file
UnitParts1Gato

This file governs stuff the sub uses and when.

[UnitPart 1]
ID= GatoConningEarlyWar
Type= GatoConningTower
NameDisplayable= Start of war Conning Tower
UnitPartInterval=NULL, 1942-12-01
ExternalLinkName3D= data/objects/Conning_Gato_01
HullTextureNameOverride=data/Submarine/NSS_Gato/NSS_Gato_T01.tga
HullLightmapTextureNameOverride=data/Submarine/NSS_Gato/NSS_Gato_O01.tga
HullNormalmapTextureNameOverride= NULL
MenuSilhouetteTextureNameOverride= Gato_Class_01.tga

The above section and one or two more like it further down the
page, govern what tower is available on what date with what
skin and what it will show in the game menu when your shopping
for subs. As well, what types of equipment it will accept
ie. equipment for Gato types.


The next section down that appears below
;------------------------------------------------------------
; COMPARTMENTS STRUCTURE
;------------------------------------------------------------

deals with the rooms as such that come along with each tower
and governs tower repair damage and fatigue models as well as
how many crew are used in the tower.


The next section that appears after

;------------------------------------------------------------
; CREWMEMBER SLOTS
;
;
;Type= Officer ;for Officers slots, which should be located in the Command Room and give bonus to the entire unit
;Type= Leader ;for Leaders slots, which give bonus to the compartment
;Type= Crewman ;for crewmember slots, which work and get poor pay
;
;------------------------------------------------------------

obviously determines how many crew members should appear
in the conning tower, where they go, and what they do.
The commented out list above defines available rank types for use.


The section that appears after
;************************************************* ***********
;
; COMPARTMENT EQUIPMENT & WEAPS
;
;************************************************* ***********

pretty much speaks for itself. By now you will be starting to
be able to look at the entries and understand a little what
they are so here I won't describe the functions just look them
over and see what you can understand at this point without help
from me.


Below that we see
;------------------------------------------------------------
; FLAK GUNS
;------------------------------------------------------------
the section following this governs what type of gun mount is
on the tower. It also establishes the link to the ammunition
available on board the sub.


And finally the section we have been looking for

;************************************************* ***********
;
; UpgradePackSlot
;
;************************************************* ***********

now this we must examine more closely.

[UnitPart 1.UpgradePackSlot 1]
ID= UpgAAGun
NameDisplayable= Anti-Aircraft Gun
Type=NULL
AcceptedTypes=USLightAA
UserCustomizable=Yes
IDLinkUpgradePackSlots= CTBackAA
IDLinkUpgradePackSlotsIntervalDefault1= NULL, NULL, Upack20mmSingle


[UnitPart 1.UpgradePackSlot 1]
The name and number of the slot
in unit part it determines which of the
three conning towers we are talking about.
In this case the first one

ID= UpgAAGun
the games reference "upgrade Anti aircraft gun"


Type=NULL
(use currently unknown)


AcceptedTypes=USLightAA
This slot determines what type of
upgrade packs you can put on the
particular mount. In this case the
back aa platform as determined by
the line CtBackAA.

Now you learn something new everyday, me too.
Gunner in making his contributions to this tut segment
educated me to the fact that there are generic types.
ie. USDecgun will accept all dg types
and USFlak will accept all flak types.


UserCustomizable=Yes
(can you change this in game? yes/no)
I'm not sure, but I think what will turn out
is this. If a position say the deckgun which
isn't a part of the conning tower, is checked
as user customizable, then as long as you
have made an upgrade pack option for it
you will be able to change it out. Where
as if you put in no to user customizable,
even if you had an upgrade pack you
couldn't put it on.


IDLinkUpgradePackSlots= CTBackAA
Tells the game this is for aft on the conning tower


IDLinkUpgradePackSlotsIntervalDefault1= NULL, NULL, Upack20mmSingle
(this determines how long and when available )



Ok so thats determined, now lets make some changes.
Back out and go again to the Upgrade packs upc
and open it.

To begin lets scroll down and locate this section.

[UpgradePack 12]
ID= Upack3in50calDG
NameDisplayable= 3" 50 cal Deck Gun
FunctionalType= UpFTypeWeaponCannon
UpgradePackSlotType= USDeckGun
Type=NULL
UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0
UnitUpgradePackIntervalOptions1= NULL, NULL, 200
IDLinkUpgradePackElements= 3in50calUS

[UpgradePack 13]
ID= Upack4in50calDG
NameDisplayable= 4" 50 cal Deck Gun
FunctionalType= UpFTypeWeaponCannon
UpgradePackSlotType= USDeckGun
Type=NULL
UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0
UnitUpgradePackIntervalOptions1= NULL, NULL, 400
IDLinkUpgradePackElements= 4in50calUS

[UpgradePack 14]
ID= Upack5in25calDG
NameDisplayable= 5" 25 cal Deck Gun
FunctionalType= UpFTypeWeaponCannon
UpgradePackSlotType= USDeckGunHvy
Type=NULL
UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0
UnitUpgradePackIntervalOptions1= 1944-03-28, 1944-09-01, 800
UnitUpgradePackIntervalOptions2= 1944-09-02, NULL, 300
IDLinkUpgradePackElements= 5in25calUS

First off lets change all the availability dates
and prices to = NULL, NULL, 0

Now all three guns are available from the start of
the war, and in any year you would care to make
for the game like 1968 for example.

Next lets change where a pack can be accepted.

In most cases boats that will take the 5"
won't usually take the 3".
In order to make it available, just copy and
paste the new type that you want and paste it
over.

[UpgradePack 12]
ID= Upack3in50calDG
NameDisplayable= 3" 50 cal Deck Gun
FunctionalType= UpFTypeWeaponCannon
UpgradePackSlotType= USDeckGunHvy <---------------Here
Type=NULL
UnitUpgradePackIntervalOptionCurrent= NULL, NULL, 0
UnitUpgradePackIntervalOptions1= NULL, NULL, 0
IDLinkUpgradePackElements= 3in50calUS

Next lets put this somewhere it doesnt belong, say the
forward AA mount on the conning tower.
So open
Mymod_alfa_1.0\Data\UPCData\UnitParts1Gato

and locate these sections

[UnitPart 1.UpgradePackSlot 1]
ID= UpgAAGun
NameDisplayable= Anti-Aircraft Gun
Type=NULL
AcceptedTypes=USLightAA
UserCustomizable=Yes
IDLinkUpgradePackSlots= CTBackAA
IDLinkUpgradePackSlotsIntervalDefault1= NULL, NULL, Upack20mmSingle

[UnitPart 2.UpgradePackSlot 1]
ID= UpgAAGun
NameDisplayable= Anti-Aircraft Gun
Type=NULL
AcceptedTypes=USLightAA
UserCustomizable=Yes
IDLinkUpgradePackSlots= CTBackAA
IDLinkUpgradePackSlotsIntervalDefault1= NULL, NULL, Upack20mmSingle

and

[UnitPart 4.UpgradePackSlot 1]
ID= UpgAAGun
NameDisplayable= Aft Anti-Aircraft Gun
Type=NULL
AcceptedTypes=USLightAA, USHeavyAA
UserCustomizable=Yes
IDLinkUpgradePackSlots= CTBackAA
IDLinkUpgradePackSlotsIntervalDefault1= NULL, NULL, Upack40mmSingle

[UnitPart 4.UpgradePackSlot 2]
ID= UpgBowAAGun
NameDisplayable= Fore Anti-Aircraft Gun
Type=NULL
AcceptedTypes=USLightAA, USHeavyAA
UserCustomizable=Yes
IDLinkUpgradePackSlots= CTForeAA
IDLinkUpgradePackSlotsIntervalDefault1= NULL, NULL, Upack40mmSingle

so where it says
AcceptedTypes=USLightAA
lets add on to the end of it by adding USDeckGun


[UnitPart 1.UpgradePackSlot 1]
ID= UpgAAGun
NameDisplayable= Anti-Aircraft Gun
Type=NULL
AcceptedTypes=USLightAA, USDeckGun <------------------------like this
UserCustomizable=Yes
IDLinkUpgradePackSlots= CTBackAA
IDLinkUpgradePackSlotsIntervalDefault1= NULL, NULL, Upack20mmSingle

Now when your going through the Gato conning tower file
remember there are four conning towers available to Gato
during the war so you will need to scroll down and do the
other towers too if you want to have it for the duration.

If you do that for all of the above slots, then when you
go through the upgrade screen you should be able to put
a deckgun on the conning tower mount as an upgrade.
So if your following along then its now time to change
the mod number to Mymod_alfa_1.2
Watch for the next segment coming soon.
MM (et al)
__________________
RIP Mush



Tutorial

Last edited by Mush Martin; 01-22-08 at 11:37 AM.
Mush Martin is offline   Reply With Quote