Quantcast
Channel: The Abode of McThag
Viewing all articles
Browse latest Browse all 13860

Adventures In INI Editing

$
0
0
SF2 defines nearly everything with .ini files.

It makes changing things easy, but you have to know the syntax...

My rush of downloading free planes from Combat Ace came with the weaponry peculiar to the planes.

A "generic" weapon is defined by its type and what nation made it.  So a Sidewinder would be IRM and USN,USAF (the Air Force and Navy are separate nations in SF2).

A weapon station is likewise defined generically.

So if you add a new missile that's USAF and IRM it will appear in the loadout of every plane with stations marked USAF and IRM.  Sometimes in inappropriate ways, such as an AIM-4F showing up in the Sparrow recesses of an F-4C.

What you can do to end this is to edit the weapons and stations to be station specific.  Thus you add a line that says that station can carry AIM-4 and a line to the weapon saying that it can only be carried by a station so marked.

Luckily, the list of planes that carried the AIM-4 and AIM-26 is short.

But it becomes a problem with the F-101B.  The internal side of the flip door can carry both Falcons and Genies.  Making the stations weapon specific means it's an either/or deal.

Still working this one out.


The way you solve the problem is to make a whole new system identical to the system that contains the stations set aside for the Genie.

So you end up with:

(Original)
SystemName[018]=GenieBay

(New)
SystemName[018]=GenieBay
SystemName[019]=GenieBay2

in the fuselage section and:

(Original)
[GenieBay]
SystemType=WEAPON_STATION
StationID=7
StationGroupID=3
StationType=INTERNAL
NumWeapons=2
AttachmentPosition001=-0.26,3.32,0.02
AttachmentPosition002= 0.26,3.32,0.02
AttachmentAngles=0.0,-1.2,180.0
LoadLimit=800
AllowedWeaponClass=AHM,IRM,SAHM
SpecificStationCode=AIR2
DiameterLimit=0.5
LengthLimit=3.0
BombBayAnimationID=9
BombBayOpenTime=1.0
BombBayCloseTime=1.0
AttachmentType=USAF
ModelNodeName=Genie_Hi
MovingPylon=TRUE
RotatingPylon=TRUE
AutomaticDoors=FALSE
PylonMass=10
PylonDragArea=0.06

(New)
[GenieBay]
SystemType=WEAPON_STATION
StationID=7
StationGroupID=3
StationType=INTERNAL
NumWeapons=2
AttachmentPosition001=-0.26,3.32,0.02
AttachmentPosition002= 0.26,3.32,0.02
AttachmentAngles=0.0,-1.2,180.0
LoadLimit=800
AllowedWeaponClass=AHM,IRM,SAHM
SpecificStationCode=AIR2
DiameterLimit=0.5
LengthLimit=3.0
BombBayAnimationID=9
BombBayOpenTime=1.0
BombBayCloseTime=1.0
AttachmentType=USAF
ModelNodeName=Genie_Hi
MovingPylon=TRUE
RotatingPylon=TRUE
AutomaticDoors=FALSE
PylonMass=10
PylonDragArea=0.06

[GenieBay2]
SystemType=WEAPON_STATION
StationID=8
StationGroupID=3
StationType=INTERNAL
NumWeapons=2
AttachmentPosition001=-0.26,3.32,0.02
AttachmentPosition002= 0.26,3.32,0.02
AttachmentAngles=0.0,-1.2,180.0
LoadLimit=800
AllowedWeaponClass=AHM,IRM,SAHM
SpecificStationCode=AIM4
DiameterLimit=0.5
LengthLimit=3.0
BombBayAnimationID=9
BombBayOpenTime=1.0
BombBayCloseTime=1.0
AttachmentType=USAF
ModelNodeName=Genie_Hi
MovingPylon=TRUE
RotatingPylon=TRUE
AutomaticDoors=FALSE
PylonMass=10
PylonDragArea=0.06

The important thing to making this work is to make sure the StationGroupID is the same between them, that forces the game to load either station 7 or station 8 and not both.

Viewing all articles
Browse latest Browse all 13860

Trending Articles