RotorOps/Generator/RotorOpsGroups.py
spencer-ki bdf5d95f48 transport helos update
-UH-60L troop capacity set to 11
-bugfix: AI enemy planes/helicopters attacked invisible FARPS
-generator now produces an error log
-Syria scenario FARP support units invulnerable
-all red/blue coalition objects now swap sides for defense mode, including carriers and FARPs
-forces templates can include air units with customization for loadout, livery, and skill
-carrier and FARP parking for enemy helicopters
-parking now supports multiple airports per side
-improved AI flight orbits (now onside and perpendicular to closest enemy airport)
-enemy transport helicopters!  Random troop drops in enemy-occupied zones
-'APCs spawn infantry' now disables conflict zones as infinite troop pickup zones
-bug fix: add zone triggers can be added in wrong order
-Combined Joint Task Forces now supported
-disable pickup zone smoke option added
-Scenario briefing now viewable in generator
-defending vehicles disperse on attack (script option)
-AWACs escorts now weapons-free and engage enemy air threats
-briefing images added
-new Persian Gulf scenario
2022-02-19 12:44:10 -08:00

118 lines
4.1 KiB
Python

from dcs.countries import Russia, USA
import dcs.unit as unit
from dcs.mission import Mission
import dcs.mapping as mapping
import dcs.ships
import dcs.vehicles
import dcs.statics
import dcs.unit
import random
class VehicleTemplate:
class CombinedJointTaskForcesBlue:
@staticmethod
def zone_farp(mission, country, farp_country, position, heading, name, late_activation):
# ai air units attack farp with late activation units, so we will set it to enemy coalition. It will be captured when frienly units spawn
farp = mission.farp(farp_country, name, position, hidden=False, dead=False, farp_type=dcs.unit.InvisibleFARP)
vg = mission.vehicle_group_platoon(
country,
name + " Static",
[
dcs.vehicles.Unarmed.M_818,
dcs.vehicles.AirDefence.Vulcan,
dcs.vehicles.Unarmed.Ural_375,
dcs.vehicles.Unarmed.M978_HEMTT_Tanker
],
position.point_from_heading(45, 7),
heading=random.randint(0, 359),
formation=dcs.unitgroup.VehicleGroup.Formation.Star,
)
vg.late_activation = late_activation
return vg
@staticmethod
def logistics_site(mission, country, position, heading, prefix=""):
farp = mission.farp(country, "Logistics FARP", position, hidden=False, dead=False, farp_type=dcs.unit.InvisibleFARP)
sg = mission.static_group(
country,
prefix + " Logistics",
dcs.statics.Fortification.TV_tower,
position.point_from_heading(heading, 80),
heading
)
dist_from_center = 30
for i in range(1,4):
u = mission.static("logistic" + str(i), dcs.statics.Cargo.Iso_container_small)
u.position = position.point_from_heading(heading + 90, dist_from_center + (i * 15))
u.heading = 10
sg.add_unit(u)
for i in range(5,8):
u = mission.static("logistic" + str(i), dcs.statics.Cargo.Iso_container_small)
u.position = position.point_from_heading(heading + 270, dist_from_center + (i * 15))
u.heading = 10
sg.add_unit(u)
a_pos = position.point_from_heading(heading + 180, dist_from_center)
u = mission.static("Ammo Dump", dcs.statics.Fortification.FARP_Ammo_Dump_Coating)
u.position = a_pos.point_from_heading(heading + 90, 1)
u.heading = heading
sg.add_unit(u)
u = mission.static("FARP Tent", dcs.statics.Fortification.FARP_Tent)
u.position = a_pos.point_from_heading(heading + 90, dist_from_center + 20)
u.heading = heading
sg.add_unit(u)
u = mission.static("Fuel Depot", dcs.statics.Fortification.FARP_Fuel_Depot)
u.position = a_pos.point_from_heading(heading + 90, dist_from_center + 40)
u.heading = heading
sg.add_unit(u)
return sg
@staticmethod
def sa6_site(mission, country, position, heading, prefix="", skill=unit.Skill.Average):
vg = mission.vehicle_group(
country,
prefix + "SA6 site",
dcs.vehicles.AirDefence.Kub_1S91_str,
position,
heading
)
u = mission.vehicle("Launcher 1", dcs.vehicles.AirDefence.Kub_2P25_ln)
u.position = position.point_from_heading(heading + 140, 30)
u.heading = heading
vg.add_unit(u)
u = mission.vehicle("Launcher 2", dcs.vehicles.AirDefence.Kub_2P25_ln)
u.position = position.point_from_heading(heading + 210, 30)
u.heading = heading
vg.add_unit(u)
u = mission.vehicle("Rearm Truck", dcs.vehicles.Unarmed.Ural_375)
u.position = position.point_from_heading(heading + 0, 40)
u.heading = heading
vg.add_unit(u)
for u in vg.units:
u.skill = skill
return vg