Jump to content
Mike Dora

How to Define Nation as "Enemy"?

Recommended Posts

I wonder if anyone can help me with a wee brainteaser I've been struggling with.

 

I have a "Soviets in Afghanistan" version of SF1 (Oct 08 patch), with the Soviets set as "friendly" so that I can go Taliban-bashing in the 80's. It occured to me that it might add a little spice to this if I could introduce Pakistani F-16A's as a "very rare" enemy. This would give the Soviet MiG-29's something to do, and has a root in reality - during the Soviet War in Afghanistan, Pak AF ac shot down up to 8 Soviet ac in the ill-defined border region, including an early Su-25 flown by Alexander Rutskoy, later VP of Russia (and a key player in the failed coup of Aug 91).

 

Adding an F-16A to the Aircraft folder, with nationality set to "Pakistan", was quite straightforward. My problem is that if I have Pakistan set to "enemy" in the Flight folder's "nations" file and in the Afghanistan terrain's "Afghanistan_nations" file (copies of both attached, together with the F-16A data file), then when I select the F-16A in the Create Mission screen and press Accept, I get a CTD. BTW the same happens whatever "enemy" nationality I give the F16A, and also when I give an "enemy" nationality to a Soviet ac.

 

The only way I can get the F-16A to work is if Pakistan is listed as "friendly", ie on the same side as the Soviets. Which kind of defeats the object.

 

So, how can I set things up so the Pak F-16A can actually show up as an "enemy" to the "friendly" Soviets? What (probably obvious) thing am I missing?

 

Thanks

 

Mike

NATIONS.txt

Afghanistan_NATIONS.txt

F-16A_Data.txt

Share this post


Link to post
Share on other sites

you do it via LimitedNations=TRUE in the terrains' main ini (Afghanistan.ini), and create or edit the AfghanNations.ini, listing the firendly and enemy sides

Share this post


Link to post
Share on other sites

you do it via LimitedNations=TRUE in the terrains' main ini (Afghanistan.ini), and create or edit the AfghanNations.ini, listing the firendly and enemy sides

 

Thanks Wrench,

 

I've tried that (but isn't it an SF2 switch? I'm working in SF1 with this one) but it still doesn't work, I still get the CTD when I try to select the Pak F-16A. There may be something else I'm missing..?

 

Mike

Share this post


Link to post
Share on other sites

Are there any enemy airbases for them?

 

No actually, do you think maybe that's the issue?

 

Mike

Share this post


Link to post
Share on other sites

If you are speeking of the AFG terrain i made some years ago or the updates from third side, then you cant fly for the enemies, because there is no enemy airfield set. If you would include an enemy airfield (what would be possible) and select strike missions (in campaign or single mission) you would often get strike missions against the enemy airfield. That would be historically incorrect.

Share this post


Link to post
Share on other sites

If you are speeking of the AFG terrain i made some years ago or the updates from third side, then you cant fly for the enemies, because there is no enemy airfield set. If you would include an enemy airfield (what would be possible) and select strike missions (in campaign or single mission) you would often get strike missions against the enemy airfield. That would be historically incorrect.

 

 

Well I solved the problem of getting Pak ac to fly as the enemy, by as suggested creating a new "enemy" airbase. I cheated by copying the Jalalabad setup (in the *_Targets.ini file), moving it about 100km east and 20km south, and labelling the new location as Peshawar - it's in about the right place. I also reduced the F-16 range, initially to just 200 but I may go down further, so that the Pak F-16's should only show up close to "Peshawar", ie in the border region as in real life. Might also limit them to intercept missions only, again as in real life.

 

The remaining issue is that just raised by Gepard, that by creating a new enemy airfield I may have given the Soviet side the opportunity for OCA strikes against that location. Not good. So next I'm going to experiment by leaving the "Peshawar" location in the *_Targets.ini file, but deleting all the specific target objects (runway, hangars, buildings) from the rest of the "Peshawar" entry. Theoretically that'll leave nothing for the system to specify as a strike target. Will see how it goes..

 

Mike

Edited by Mike Dora

Share this post


Link to post
Share on other sites

thats an easy fix,but will require some work in both the targets and types inis. This same 'cheat' is being used in the KAW mod, for the PRC airfields west of the Yalu (and therefore, off limits).

 

You need to 'clone' all the objects on the Peshwar base in the types ini -expecially the runway and ALL buildings, and give them a 0 point value.

Example:

 

[TargetType0**]

Name=barrack1n

FullName=Barrack

ModelName=barrack1.lod

TargetType=MISC

ActiveYear=0

TargetValue=0

UseGroundObject=FALSE

DamagePoint=10.0

ArmorValue=0.0

ArmorType=0

RepairRate=0.150

StartDetectChance=0

StartIdentifiedChance=0

IncreaseDetectChanceKey=0

MaxVisibleDist=15000.0

DamagedModel=

DestroyedEffect=MediumShortStructureCollapse

DestroyedModel=barrack1_destroyed

SecondaryChance=25

SecondaryEffect=SmallExplosionEffect

 

note that it's now called "barrack1n" -n for neutral or no value. You'll need to do that for EVERY object listed in/on that airfield.

Basically, you copy/paste each one at the bottom of the Afghan_types.ini, useing the next number in sequence

 

you'll have to go through the targets ini for the runway you've selected for Peshwar, noting down ALL the items listed, and change them to the n type:

 

[TargetArea0**]

Name=Peshawar PAFB

Position=*Insert proper coordinates*

Radius=6000

ActiveYear=0

Location=*Insert Proper Location*

Alignment=ENEMY

AirfieldDataFile=desert_airfield1n.ini

NumSquadrons=3

Target[001].Type=Runway1n

Target[001].Offset=0.00,0.00

Target[001].Heading=60.0

Target[002].Type=Tower1n

Target[002].Offset=-66.16,0.09

Target[002].Heading=0

Target[003].Type=windsockn

Target[003].Offset=50.00,-1200.00

Target[003].Heading=180

Target[004].Type=windsockn

Target[004].Offset=-50.00,-1200.00

Target[004].Heading=180

Target[005].Type=windsockn

Target[005].Offset=50.00,1200.00

Target[005].Heading=180

Target[006].Type=windsockn

Target[006].Offset=-50.00,1200.00

Target[006].Heading=180

Target[007].Type=ils_shackn

Target[007].Offset=-65.00,-1229.00

Target[007].Heading=90

Target[008].Type=ils_shackn

Target[008].Offset=-66.00,1230.11

Target[008].Heading=90

Target[009].Type=eor_shackn

Target[009].Offset=177.00,-1267.00

Target[009].Heading=180

Target[010].Type=eor_shackn

Target[010].Offset=177.00,1267.00

Target[010].Heading=0

Target[011].Type=fueltank1n

Target[011].Offset=415.00,860.00

Target[011].Heading=180

Target[012].Type=fueltank1n

Target[012].Offset=415.00,885.00

Target[012].Heading=180

Target[013].Type=fueltank1n

Target[013].Offset=415.00,910.00

Target[013].Heading=180

Target[014].Type=fueltank1n

Target[014].Offset=415.00,935.00

Target[014].Heading=180

Target[015].Type=USFuelTruckn

Target[015].Offset=502.83,365.08

Target[015].Heading=312

Target[016].Type=Hangar2n

Target[016].Offset=592.00,93.00

Target[016].Heading=270

Target[017].Type=Hangar2n

Target[017].Offset=592.00,43.00

Target[017].Heading=270

Target[018].Type=blastshieldn

Target[018].Offset=484.49,385.10

Target[018].Heading=217

Target[019].Type=blastshieldn

Target[019].Offset=452.06,408.76

Target[019].Heading=217

Target[020].Type=building1n

Target[020].Offset=629.32,375.72

Target[020].Heading=0

Target[021].Type=building2n

Target[021].Offset=622.77,438.32

Target[021].Heading=0

Target[022].Type=Hangar3n

Target[022].Offset=602.24,223.20

Target[022].Heading=270

Target[023].Type=Hangar1n

Target[023].Offset=592.00,148.00

Target[023].Heading=270

Target[024].Type=Hangar1n

Target[024].Offset=592.00,294.00

Target[024].Heading=270

Target[025].Type=fueltank2n

Target[025].Offset=534.78,341.84

Target[025].Heading=180

Target[026].Type=pit16n

Target[026].Offset=407.00,-260.00

Target[026].Heading=0

Target[027].Type=pit16n

Target[027].Offset=407.00,-185.00

Target[027].Heading=0

Target[028].Type=pit8n

Target[028].Offset=407.00,-110.00

Target[028].Heading=180

Target[029].Type=fire_deptn

Target[029].Offset=558.00,-12.00

Target[029].Heading=0

Target[030].Type=watertower1n

Target[030].Offset=628.79,-325.83

Target[030].Heading=90

Target[031].Type=USJeepn

Target[031].Offset=-434.96,1057.02

Target[031].Heading=45

Target[032].Type=USJeepn

Target[032].Offset=565.91,5.21

Target[032].Heading=280

Target[033].Type=USFuelTruckn

Target[033].Offset=527.39,5.35

Target[033].Heading=92

Target[034].Type=bombtrailern

Target[034].Offset=517.47,-98.75

Target[034].Heading=4

Target[035].Type=bombtrailern

Target[035].Offset=568.01,118.21

Target[035].Heading=277

Target[036].Type=bombtrailern

Target[036].Offset=321.30,-175.30

Target[036].Heading=12

Target[037].Type=powercartn

Target[037].Offset=321.70,-269.60

Target[037].Heading=0

Target[038].Type=blastshieldn

Target[038].Offset=518.60,-41.40

Target[038].Heading=270

Target[039].Type=blastshieldn

Target[039].Offset=518.60,-62.20

Target[039].Heading=270

Target[040].Type=blastshieldn

Target[040].Offset=518.60,-83.50

Target[040].Heading=270

Target[041].Type=blastshieldn

Target[041].Offset=518.60,-145.70

Target[041].Heading=270

Target[042].Type=blastshieldn

Target[042].Offset=518.60,-221.40

Target[042].Heading=270

Target[043].Type=blastshieldn

Target[043].Offset=518.60,-295.60

Target[043].Heading=270

Target[044].Type=pit8n

Target[044].Offset=407.00,-335.00

Target[044].Heading=0

Target[045].Type=ASRn

Target[045].Offset=-406.67,1080.92

Target[045].Heading=0

Target[046].Type=barrack1n

Target[046].Offset=-386.39,1029.59

Target[046].Heading=130

Target[047].Type=shack1n

Target[047].Offset=-396.73,1065.22

Target[047].Heading=270

Target[048].Type=shack1n

Target[048].Offset=-426.88,1085.00

Target[048].Heading=130

Target[049].Type=building2n

Target[049].Offset=-449.12,1073.09

Target[049].Heading=40

Target[050].Type=barrack1n

Target[050].Offset=694.00,-19.98

Target[050].Heading=90

Target[051].Type=barrack1n

Target[051].Offset=694.43,-61.07

Target[051].Heading=90

Target[052].Type=barrack1n

Target[052].Offset=694.43,-104.11

Target[052].Heading=90

Target[053].Type=barrack1n

Target[053].Offset=693.71,-145.22

Target[053].Heading=90

Target[054].Type=barrack1n

Target[054].Offset=696.61,-186.87

Target[054].Heading=90

Target[055].Type=barrack1n

Target[055].Offset=695.13,-229.71

Target[055].Heading=90

Target[056].Type=barrack1n

Target[056].Offset=695.99,-272.42

Target[056].Heading=90

Target[057].Type=barrack1n

Target[057].Offset=697.62,-318.97

Target[057].Heading=90

Target[058].Type=barrack1n

Target[058].Offset=758.36,41.02

Target[058].Heading=90

Target[059].Type=barrack1n

Target[059].Offset=759.36,84.55

Target[059].Heading=90

Target[060].Type=barrack1n

Target[060].Offset=759.36,125.78

Target[060].Heading=90

Target[061].Type=barrack1n

Target[061].Offset=695.45,347.38

Target[061].Heading=90

Target[062].Type=barrack1n

Target[062].Offset=695.45,303.41

Target[062].Heading=90

Target[063].Type=barrack1n

Target[063].Offset=694.40,258.45

Target[063].Heading=90

Target[064].Type=barrack1n

Target[064].Offset=697.02,210.64

Target[064].Heading=90

Target[065].Type=barrack1n

Target[065].Offset=697.02,169.55

Target[065].Heading=90

Target[066].Type=barrack1n

Target[066].Offset=695.45,125.10

Target[066].Heading=90

Target[067].Type=barrack1n

Target[067].Offset=696.03,84.01

Target[067].Heading=90

Target[068].Type=barrack1n

Target[068].Offset=695.11,40.97

Target[068].Heading=90

Target[069].Type=barrack2n

Target[069].Offset=621.86,-56.03

Target[069].Heading=90

Target[070].Type=barrack2n

Target[070].Offset=622.86,-96.30

Target[070].Heading=90

Target[071].Type=bunker2n

Target[071].Offset=546.18,-540.50

Target[071].Heading=90

Target[072].Type=bunker2n

Target[072].Offset=545.36,-490.74

Target[072].Heading=90

Target[073].Type=bunker2n

Target[073].Offset=545.25,-445.57

Target[073].Heading=90

Target[074].Type=barrack1n

Target[074].Offset=763.89,-21.27

Target[074].Heading=90

Target[075].Type=barrack1n

Target[075].Offset=763.23,-61.73

Target[075].Heading=90

Target[076].Type=barrack1n

Target[076].Offset=763.23,-102.76

Target[076].Heading=90

Target[077].Type=barrack1n

Target[077].Offset=762.49,-145.77

Target[077].Heading=90

Target[078].Type=barrack1n

Target[078].Offset=763.77,-187.30

Target[078].Heading=90

Target[079].Type=barrack1n

Target[079].Offset=763.77,-231.20

Target[079].Heading=90

Target[080].Type=barrack1n

Target[080].Offset=760.68,-275.80

Target[080].Heading=90

Target[081].Type=barrack1n

Target[081].Offset=762.28,-318.69

Target[081].Heading=90

Target[082].Type=shack1n

Target[082].Offset=823.36,-328.42

Target[082].Heading=270

Target[083].Type=xAAA

Target[083].Offset=-573.20,1497.53

Target[083].Heading=315

Target[084].Type=xAAA

Target[084].Offset=541.14,537.89

Target[084].Heading=45

Target[084].ActiveYear=1961

Target[085].Type=xAAA

Target[085].Offset=526.88,-828.54

Target[085].Heading=135

Target[085].ActiveYear=1961

Target[086].Type=xAAA

Target[086].Offset=-410.75,-1512.31

Target[086].Heading=225

Target[087].Type=building1n

Target[087].Offset=629.43,-16.72

Target[087].Heading=0

Target[088].Type=building2n

Target[088].Offset=624.43,-136.72

Target[088].Heading=0

Target[089].Type=shack1n

Target[089].Offset=634.79,-307.83

Target[089].Heading=180

Target[090].Type=shack1n

Target[090].Offset=538.00,-5.00

Target[090].Heading=0

Target[091].Type=building3n

Target[091].Offset=488.97,413.26

Target[091].Heading=0

Target[092].Type=xUSJeep

Target[092].Offset=472.93,408.29

Target[092].Heading=190

Target[093].Type=shack1n

Target[093].Offset=466.65,416.44

Target[093].Heading=180

Target[094].Type=building1n

Target[094].Offset=589.43,-16.72

Target[094].Heading=0

Target[095].Type=powercartn

Target[095].Offset=467.40,397.14

Target[095].Heading=-30

 

note the "xAAA"; with nothing of vaule to defend, they're no longer needed. The game engine ™ will skip over those entires.

 

you'll also need, in the example above, the Desert_airfield1.ini, to rename to match the new runway. (or the ini for whichever one you're using)

 

further questions; just ask

Edited by Wrench

Share this post


Link to post
Share on other sites

Thanks Wrench,

 

In fact I've found that my PAF Peshawar works as the F-16 base if I delete all the ground objects except the runway. So my lazy way ahead now is to clone a runway into the *_Types.ini file as suggested above, giving it a zero point value to make sure that it doesn't inadvertendly get targetted by the Soviets. Would hate to be the cause of that kind of cross-border incident..

 

Thanks

 

Mike

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..