Add combat npc aircrafts to maps

Questions, comments, concerns, & fixes

Moderator: Forum moderators

Post Reply
Exefune
Newbie
Newbie
Posts: 2
Joined: Wed Mar 12, 2025 7:21 pm
Favorite Aircraft: F-15
OS: windows 10
Has thanked: 1 time

Add combat npc aircrafts to maps

Post by Exefune »

hello, sorry if this was already asked (i dont found any post like this) but i wanted to know how i can add a working NPC combat aircraft into the map, i ask this because i want to make combats in a private server with a friend and we would love to have NPC enemy aircraft goin around or trying to shoot down us, i manage with scenario editor add NPCs but they would fly in straight lane until crashing. pls if there a way to have enemy aircraft in multiplayer game without using the endurace would love it. thanks for read and sorry if i have bad english
User avatar
waspe414
Staff
Staff
Posts: 1623
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 161 times
Been thanked: 521 times

Re: Add combat npc aircrafts to maps

Post by waspe414 »

You have to do it with a .yfs. You can set up a dogfight (Simulation > Create Air Combat), then click OK. This closes the setup window but keeps the settings. Then do File > Save Flight.
This is a mission file (or replay file, missions are just replays without replay data). You can link it to a map by editing the .lst file for the map you're using. For example, if flying on stock Tohoku, open scenery.lst in Notepad and add the filepath of the .yfs to the end of the TOHOKU line. Some of the stock maps link .yfs files for you to reference.

You can edit the specifics of the aircraft by opening the .yfs in Notepad. For each aircraft, the file defines the following:
What aircraft it is
Where it starts
Its IFF
Its unique aircraft ID

It's then updated by AIRPCMND to load specific weapons or fuel and change its position.

INTENTIO sets the aircraft's intentions. You can tweak them to your liking, but the default dogfight values should be fine. If you want to know what any of them are, feel free to ask about them

Here are all the variables if you need them:

Code: Select all

AIRPLANE F-16C_FIGHTINGFALCON TRUE SUBST:F-18C_HORNET
STARTPOS NA MISAWA_RW10
IDENTIFY 0
IDANDTAG 5 ""

AIRPCMND UNLOADWP
AIRPCMND LOADWEPN IFLR 20
AIRPCMND LOADWEPN AIM120 2
AIRPCMND LOADWEPN AIM9 6
AIRPCMND LOADWEPN AGM65 6
AIRPCMND LOADWEPN FUEL 1000
AIRPCMND LOADWEPN AIM9X 2
AIRPCMND LOADWEPN B500HD 2
AIRPCMND LOADWEPN FUEL 800
AIRPCMND LOADWEPN FLR 20
AIRPCMND INITFUEL 75%

AIRPCMND POSITION -68031.14m 32.11m 21996.24m
AIRPCMND ATTITUDE -89.93deg 0.00deg -0.00deg
AIRPCMND CTLLDGEA TRUE
AIRPCMND INITSPED 0.000000m/s

INTENTIO
DOGFIGHT G11.00 B20.00 F6
CLOSEINMAXSPEED FALSE
TARGETFLYINGONLY TRUE
COMBATTHRESHOLD 31484.0m
GIVEUPDS 20000.0m
MINIALTI 100
ENDINTEN
For more info on the .yfs, I have some poorly explained documentation here viewtopic.php?p=90235#p90235
And again, I am happy to answer any questions
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green
Exefune
Newbie
Newbie
Posts: 2
Joined: Wed Mar 12, 2025 7:21 pm
Favorite Aircraft: F-15
OS: windows 10
Has thanked: 1 time

Re: Add combat npc aircrafts to maps

Post by Exefune »

Really very thanks for this information. Sorry for my late response, i barely have free time now but really thanks. When i can im gona try this and im gona check that information.

Really thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest