DCS World Mission Editing, Five Digit Flags, Group Names, Zones This guide describes a method of using five digit flags with DCS World Events -> Conditions -> Actions features. It also explains the corresponding naming convention for groups and units. In DCS World, event flags can be up to five digits in length. Flags must start with 1-9; leading zeroes and alpha characters are not allowed. A five digit flag can represent the coalition, group, unit and state of actionable AI. === DCS Keyboard Commands: Toggle Console - LAlt-Y Time Accelerate - LCntrl-Z Time Decelerate - LAlt-Z Time Normal - LShift-Z Radio Menu - \ Objects Switch Forward Direction - LCntrl-PgDn Objects Switch Reverse Direction - LCntrl-PgUp Restart - LShft-R === The Basics of Five Digit Flags: 10000-99999 Red: 10000-49999 First digit; Coalition/Unit Types: Red flags start with '1' through '4': 1: Red Main & Aircraft Groups 2: Red Helicopter Groups 3: Red Vehicle Groups 4: Red Ship Groups Blue: 50000-89999 Blue flags start with '5' through '8': 5: Blue Main & Aircraft Groups 6: Blue Helicopter Groups 7: Blue Vehicle Groups 8: Blue Ship Groups The second & third digits are the Group numbers. The Group number is also used in the group's name. The fourth digit is the Unit Number. The fourth digit in the five digit flag can be used to associate groups by function or for designating a unit of a group. The fifth digit is the State: 0: Count (use to test a flag value, and Flag Increment and Decrement) 1: is Dead, or Lost 2: is Alive, or Won 3: is Attacking 4: Broadcast; for messages 5: Zone Clear 6: Delay; use with Time Since Flag 7: Zone Entered; Client Detect Latch 8: Zone Captured; Client Detect Latch; is Damaged 9: is Deactivated (vs Dead) Examples: Red Aircraft group 24 is dead: 12401 = True Red Aircraft group 24 unit 3 is dead: 12431 Red Aircraft group 24 is in a zone: 12407 Red Aircraft group 24 unit 4 is in a zone: 12447 Red Vehicle group 5 is deactivated: 30509 = True Red Ship group 24 is in a zone: 42407 Blue Aircraft group 24 is dead: 52401 = True Blue Helicopter group 9 unit 2 is attacking: 60923 Blue Vehicle group 44 is dead: 74401 Blue Vehicle group 44 is broadcasting a repeating message: 74404 A coalition flag (Red: 10000, Blue: 50000) can be used for the state of Red or Blue coalitions, or to track scores: Red coalition points flag: 10000 Red coalition points flag 2: 10001 Red coalition points flag 3: 10002 Red Clients detected: 10006, used with latches 10007 & 10008 Blue coalition points flag: 50000 Blue coalition points flag 2: 50001 Blue coalition points flag 3: 50002 Blue Clients detected: 50006, used with latches 50007 & 50008 --- Examples of AI Group names: Red AGrp24 Mig-29 Red HGrp09 Ka-50 Red SGrp24 Speedboat Red SGrp25 Cruiser Blue AGrp12 AWACS Blue AGrp24 F/A-18C SEAD Blue HGrp01 Cobras Blue HGrp02 Hueys Blue SGrp01 Carrier Blue SGrp02 Civ Boat Groups by function:* Red VGrp01 Gen Vaz HQ Support Red VGrp011 Gen Vaz HQ Defense Red VGrp012 Gen Vaz HQ ADA Blue VGrp23 Armor Blue VGrp231 Armor; Late Activated, Cloned from VGrp23 Blue VGrp232 Armor; Late Activated, Cloned from VGrp23 Blue VGrp233 Armor; Late Activated, Cloned from VGrp23 Blue VGrp234 Armor; Late Activated, Cloned from VGrp23 Blue VGrp24 Air Defense Blue VGrp241 Air Defense; Late Activated, Cloned from VGrp24 Blue VGrp242 Air Defense; Late Activated, Cloned from VGrp24 Blue VGrp243 Air Defense; Late Activated, Cloned from VGrp24 Blue VGrp244 Air Defense; Late Activated, Cloned from VGrp24 Blue VGrp03 Kutaisi Support Blue VGrp031 Kutaisi Defense Blue VGrp032 Kutaisi ADA === Beyond Basics AI Groups The second and third digits of a five-digit group flag are the same as the group number in a group name. The five-digit flag scheme allows group numbers of two digits. By numbering groups with two digits, a five-digit flag can be used to uniquely identify coalition and unit type, group number, unit number and a 'state'. With this scheme, each coalition can have 100 groups of any type. Two-digit AI Group number categories 01-09 - Airbase units 10-19 - AWACS, Tankers 20-49 - Armor, Convoys 50-59 - Air Defense 60-89 - Aircraft 90-99 - Watchtowers, Buildings, Depots AI Group Names AI group names include a two-digit group number. The group number is used in the Group Name field when setting up the mission. The coalition, such as Red or Blue, starts the Group Name and separates the names in the Unit List. Additional descriptions may be added at the end of the Group Name. Blue VGrp30 Armor Red AGrp12 AWACS Red VGrp90 Bunker --- Fourth Digit: Unit Number (0-9) Usually this value is a zero. I do not use the unit numbers very often, and I typically do not take the time to enter these unit numbers into the Unit Name field. I will only do so if I need to flag the unit for some purpose, such as Explode Unit or Smoke On Unit. It can be used for the Group Association scheme described above. --- Fifth Digit - State The States were developed over many missions. The order is kept it to support older missions. Occasionally, I will fudge these a bit, more so with values 5, 6, and 8 -- the zone states. You may find the Dead vs Deactivate useful, as these conditions may have different consequences in your mission. --- AI Group Association - By Location: Red VGrp01 Gen Vaz HQ Support Red VGrp011 Gen Vaz HQ Defense Red VGrp012 Gen Vaz HQ ADA Blue VGrp03 Kutaisi Support Blue VGrp031 Kutaisi Defense Blue VGrp032 Kutaisi ADA - To Spawn - after the first group dies, spawn the next, and then the next, etc.: Red VGrp12 Armor Red VGrp121 Armor; Late Activate the rest of these Red VGrp122 Armor Red VGrp123 Armor Red VGrp124 Armor --- AI Large Aircraft Groups Large aircraft, such as heavy bombers and tankers, are best kept to one unit per group. Multiple units within a group of large a/c do not respond well to waypoints and events. Even with this restriction, large a/c can be associated together. Example - a Blue AI bomber aircraft 'group' of four uses Group Number 20: Blue VGrp201 Armor, flag 52010 Blue VGrp202 Armor, flag 52020 Blue VGrp203 Armor, flag 52030 Blue VGrp204 Armor, flag 52040 === Client Aircraft Group Names Client (or Player) groups are named differently. A single Client is its own group, limited to one unit. Client aircraft group names start with the aircraft type followed by the Group number; this is also the a/c BORT number (for Blue). This makes for easy identification of available slots when joining a mission (and the Nose Number of the a/c will correspond to the multiplayer slot number for the Own ID on A-10C aircraft). Examples of Client Aircraft Group names: A-10C 01 Vaziani Cold Start A-10C 02 Vaziani Cold Start A-10C 03 Vaziani Cold Start A-10C 04 Vaziani Cold Start A-10C 11 Vaziani Warm Start A-10C 12 Vaziani Warm Start A-10C 13 Vaziani Air Start A-10C 14 Vaziani Air Start F-15C 01 Kutaisi Cold Start F-15C 02 Kutaisi Cold Start F-15C 03 Kutaisi Warm Start F-15C 04 Kutaisi Warm Start UH-1H 01 FARP London Cold UH-1H 02 FARP London Warm MiG-29S 01 Anapa Cold MiG-29S 02 Anapa Air Ka-50 01 FARP Vetka Warm Ka-50 02 FARP Vetka Warm Ka-50 03 FARP Vetka Warm Ka-50 04 FARP Vetka Warm Note that these Client Group names do not need to include the 'Blue' or 'Red' coalition at the beginning. These identifiers would take up space in the Role Selection window where the Client slots are already grouped by coalition. === Client Numbering It is often better to start a Client aircraft group number using 'x1', like '11', '21', '31', etc., instead of 10, 20, 30...; this is for associating Client a/c BORT and Callsign values to correspond to the group number. Don't use the Group Number = '00'; save that '00' value for high-level flags like win/lose conditions, and counters. Clients typically do not need flags in multiplayer missions. Therefore, the Group numbers in the Client names above can be the same Group numbers for AI Groups. If it is necessary to set flags for Clients as well as AI then the Client Group numbers would need to be unique. There is no editor control of the Client slot names for Combined Arms. === Zone Flags: 90000-99999 Five-digit flags with leading digit 9 can be used for Zones, with two-digit numbered Zones. Use the State (position 5) of values 5, 7 or 8 to indicate when a Coalition/Unit Type is in or out of a Zone. The first digit in a Zone Flag is 9, followed by the two-digit Zone Number. The fourth digit is the Coalition/Unit Type; use a "1" for Red and a "5" for Blue. The fifth digit is the State. 90257 - Zone 02, a Blue a/c entered 93435 - Zone 34, all Red vehicles are cleared out Red Aircraft (Coalition/Unit Type 1) in Zone 3: 90317 = True Red Helicopters (Coalition/Unit Type 2) were in Zone 20 and left: 92027 = False, 92025 = True Red Vehicles (Coalition/Unit Type 3) in Zone 15: 91537 Blue Ships (Coalition/Unit Type is 8) are in Zone 2: 90287 = True Blue Ships are out of Zone 2: 90285 = True, 98027 = False Mist scripts can detect the type of Vehicle, Aircraft, Helicopter and Ship; see the Mist Guide for these functions: mist.flagFunc.units_in_zones mist.flagFunc.units_in_moving_zones === Two-Digit Flags Flag 1 is use to 'disable' an event without removing the event. I will use Flags 2-9 for a random numbers; for a random number between 1 and 4 use Flag 4, between 1 and 6 use Flag 6. Flag 10 is for a repeating message throughout the mission (I repeat mission messages every 23 minutes, or 1380 seconds). Use flags 50-99 to wrap up a mission, typically with countdown messages every few minutes until a mission load/end. Flag 1 - Use Condition Flag Is True (1) to disable an event Flags 2-9: Random Value Flags, Flag Set Random Value (4,1,4), (5,1,5), (6,1,6), etc. Flag 10 - Repeating Messages Flag 20 - Initiate Action Flag 30 - Debug, Radio flags Flag 40 - Flag 50-55 - Blue Wins Flag 56-59 - Blue Scores Flag 60-65 - Red Wins Flag 66-69 - Red Scores Flag 70 - Radio Flag 80 - Timeout Flag 90 - Mission Load, Reload, Restart & Cancel Restart (2 flags) === Mission Version & File Name The mission file names can include a version indication with a revision, like "254C3d". This naming convention indicates the version of DCS World for the mission (e.g.: v2.5.4), as well as a revision number that accomodates up to 26 incremental revisions like a, b, c, .. z, as well as a major revision increment like from "3d" to "4a". iShot The Shilka 254C3d.miz iShot The Shilka 254C3e.miz iShot The Shilka 254C3f.miz iShot The Shilka 254C4a.miz With different maps, substitute the 'C' above with a single character map abbreviation, like 'C' for the Caucasus map, N for Nevada, 'P' for Persian Gulf: iShot The Shilka 254C5g.miz NAVEX Nevada 254N1e.miz Jumeirah Keyhole 254P1a.miz === Mist, and Scripts Load Mist first with a Mission Start event, and Actions -> Do Script File, and Message 'Load Mist vxxx' (display for 1 second). I now load all scripts in the desired order with Mission Start events, and no Conditions, except for Flag (1,True) to disable an event if desired. === -- Displaying Flag Values With Text Messages -- Use a Do Script Action (does not require Mist) - local msg = {} msg[#msg + 1]='Blue All Points Flag 10000 value = ' msg[#msg + 1]=trigger.misc.getUserFlag('10000') msg[#msg + 1]='. \n' msg[#msg + 1]='Blue Vehicles In Zone Points Flag 20000 value = ' msg[#msg + 1]=trigger.misc.getUserFlag('20000') msg[#msg + 1]='. \n' msg[#msg + 1]='. \n' msg[#msg + 1]='Blue Aircraft Points Flag 50000 value = ' msg[#msg + 1]=trigger.misc.getUserFlag('50000') msg[#msg + 1]='. \n' msg[#msg + 1]='Blue Heli Points Flag 60000 value = ' msg[#msg + 1]=trigger.misc.getUserFlag('60000') msg[#msg + 1]='. \n' msg[#msg + 1]='Blue Vehicle Points Flag 70000 value = ' msg[#msg + 1]=trigger.misc.getUserFlag('70000') msg[#msg + 1]='. \n' msg[#msg + 1]='Blue Ship Points Flag 80000 value = ' msg[#msg + 1]=trigger.misc.getUserFlag('80000') msg[#msg + 1]='. \n' msg[#msg + 1]='\n' msg[#msg + 1]='Press Pause to freeze the action. \n' trigger.action.outText(table.concat(msg), 6) local msg = {} msg[#msg + 1]='Flag 1 value = ' msg[#msg + 1]=trigger.misc.getUserFlag('1') msg[#msg + 1]='. \n' msg[#msg + 1]='Flag 2 value = ' msg[#msg + 1]=trigger.misc.getUserFlag('2') msg[#msg + 1]='. \n' msg[#msg + 1]='. \n' trigger.action.outText(table.concat(msg), 6) === F° = ((C° * 9) / 5) + 32 C° = (F° - 32) * 5 / 9 === meters to feet 1m = 39.37 inches = 3.28 feet But, in DCS it seems to be: 1m = 3.05 feet === Set tanker speed to 330 knots @ 11,000' === --- Stop Condition when a flag is true if trigger.misc.getUserFlag(58104) == 1 then return true end --- set a flag at a waypoint --- 'Perform Command', Run Script trigger.action.setUserFlag(71007, 1) === -- This script can be used to detect five digit flag values within Advanced Waypoint Actions: --- Stop Condition when a flag is true if trigger.misc.getUserFlag(58104) == 1 then return true end === --- Message at the bottom of briefings --- Put "Designer Notes" at the bottom of the Briefing, in the top window: --- Designer Notes --- blah --- blah --- blah --- Wrecking Crew --- This mission is available for anyone to host and/or modify. Keep the text in the Designer Notes section; add to it if desired. --- Contact WreckingCrewProjects@gmail.com for comments, questions, new mission ideas and design help. --- Enjoy! Wrecking Crew, Smooth Operators Squadron, "We fly so that others may die!" --- end of Where it says Designer Notes -- Briefing Entries Tanker Friendly Altitudes & Speeds KC-130 is all tactical drogue, KC-135 is all boom, KC-135MPRS is all drogue KC-130 Tanker Freq 298 MHz AM, "Shell", 9Y, "SHL", 15,000' @ 336 kts, for AV-8, drouge KC-135 Tanker Freq 297 MHz AM, "Arco", 10Y "ARC", 12,000' @ 310 kts, for A-10, boom KC-135 -- 20,000' @ 410 kts, for F-15C & F-16, boom KC-135MPRS Freq 296 MHz AM, "Texaco", 11Y "TEX", 23,000' @ 430 kts, for F-14 & F/A-18, drogue IL-78M Tanker Freq 290 MHz AM, 23,000' @ 430 kts, for Su-33 AWACS Freq 277 MHz AM, "Overlord", 24,000' @ 450 EWR Freq 280 AM, "Axeman" Stennis Carrier Freq 380 MHz AM, TACAN Bearing 74X "STE", ICLS 11 Tarawa Freq 390 MHz AM, TACAN 75X "TAR", ICLS 12 -- For 250 kias. To get this set the Speed in the Mission Editor as follows: 30,000 ft. 400 kts 25,000 ft. 375 kts 20,000 ft. 350 kts 15,000 ft. 325 kts 10,000 ft. 300 kts For intermediate heights, change it by 5 kts per 1000 ft. --- Frequency Band Designations - AM Unless Specified: 30-37 (FM): Blue Ground 50-57 (FM): Red Ground 216-227: Red FARPs 228-239: Blue FARPs 271-276: Red AWACS/GCI 277-282: Blue AWACS/GCI 290-295: Red Tankers 296-302: Blue Tankers 304-314: Red Flights 315-326: Blue Flights 361-379: Red Ships 380-399: Blue Ships TACANS X Channels for Ground/Ships Y Channels for Tankers/Air Units 32-43: Red 2-11, 50-80: Blue Wrecking Crew