577 Commits

Author SHA1 Message Date
walterroach
c8e71d269b Improve Ground Unit Behavior
* Prevent spinning units
* Prevent units spawning in exclusion zone
* Prevent units from moving into exclusion zone
2020-12-12 15:33:26 -06:00
walterroach
817d6a0e15 Merge remote-tracking branch 'upstream/develop_2_3_x' into ground_tasking 2020-12-12 12:44:47 -06:00
Dan Albert
1a062e2170 Set carrier speed for recovery.
https://github.com/Khopa/dcs_liberation/issues/543
(cherry picked from commit d316836e909e12d46c79389d54a678e0f5f3e007)
2020-12-11 19:19:48 -08:00
Dan Albert
fe658eb877 Always aim the carrier into the wind.
https://github.com/Khopa/dcs_liberation/issues/543
(cherry picked from commit 8443f61f0ae0e2e3a3035e41198235d42af9235f)
2020-12-11 19:19:47 -08:00
walterroach
56591b8655 broken waypoint finder 2020-12-11 18:17:44 -06:00
Khopa
508a5693c9 Fixed duplicated tgo issue with chinese and russian navy generators. 2020-12-11 20:55:59 +01:00
Khopa
b74d8b12d0 Fixed duplicated unit names in german WW2 Flak site groups. (Which would cause duplicated unit error in unitmap.py when trying to start the mission) 2020-12-10 22:32:24 +01:00
Khopa
1258f3e17c Carrier and Tarawa are now fully moveable 2020-12-10 00:13:34 +01:00
walterroach
6296896471 Add special fuel case for C101 #492 2020-12-08 18:26:37 -06:00
walterroach
473cda971a Fix typing mistake 2020-12-08 17:16:09 -06:00
walterroach
cf570adabe Refactor armor
Break `plan_action_for_groups` into smaller methods

Add type hinting and cleanup formatting
2020-12-08 16:55:04 -06:00
walterroach
02196f2883 Change ground unit waypoints to offroad Ground Unit Waypoint
"On-Road" #495
2020-12-08 15:11:47 -06:00
Dan Albert
8c64867918 Fix duplicate names of AAA units.
Fixes https://github.com/Khopa/dcs_liberation/issues/517
2020-12-06 22:14:56 -08:00
walterroach
aea82e2266 Add FOB capture 2020-12-06 21:45:21 -06:00
Dan Albert
b0b9c1c8e6 Fix deletion of waypoints.
`FlightPlan.waypoints` returns a list created from the iterator now, so
removing items from that list does not actually alter the flight plan.

Fixes https://github.com/Khopa/dcs_liberation/issues/489
2020-12-06 15:32:28 -08:00
Dan Albert
b5ff32c5b6 Show patrol end time on the kneeboard.
Fixed https://github.com/Khopa/dcs_liberation/issues/421
2020-12-06 15:01:21 -08:00
Dan Albert
8f30e60e1b Use unplanned missions to guide aircraft purchase.
AI aircraft purchase decisions are now driven by the missions that the
flight planner was unable to fulfill. This way we're buying the aircraft
we actually need instead of buying them at random, in the locations we
need them, in the order they're needed.

There's a bit more that could be improved here:

* Unused aircraft could be ferried to where they would be more useful.
* Partial squadrons could be completed rather than buying a whole flight
  at a time.
* Aircraft could be ranked by their usefulness so we're not buying so
  many Hueys when a Hornet would do better.
* Purchase a buffer of CAP capable aircraft in case too many are shot
  down and they are not available next turn.

https://github.com/Khopa/dcs_liberation/issues/361
2020-12-06 00:59:04 -08:00
Dan Albert
b8e64d4369 Revert "Revert "Migrate buildings and TGOs to unit map.""
With fixed tracking for TGO groups and fortification "buildings".

Fixes https://github.com/Khopa/dcs_liberation/issues/485

This reverts commit 72ac8ca8724573efa14e5d15880b697aaaa4eacd.
2020-12-05 14:26:16 -08:00
Dan Albert
72ac8ca872 Revert "Migrate buildings and TGOs to unit map."
Not registering kills correctly. It was in my limited testing, so need
to dig deeper.

https://github.com/Khopa/dcs_liberation/issues/494

This reverts commit 90697194a1a4ca67b53eb7b4056e4f7f5416ac58.
2020-12-04 23:57:58 -08:00
Dan Albert
90697194a1 Migrate buildings and TGOs to unit map.
Fixes https://github.com/Khopa/dcs_liberation/issues/485.
2020-12-04 01:10:18 -08:00
Dan Albert
13f4baa34e Fix duplicate name of Patriot unit.
Caught by the `UnitMap`. This does break saves that have live Patriot
STRs.
2020-12-04 01:03:57 -08:00
Khopa
cdf28700cf Possible to spawn manpads on frontline even if infantry squads are disabled. 2020-12-01 23:14:07 +01:00
Khopa
948c1d0bb0 Fixed unused aircraft not using skins setup in factions files. 2020-12-01 22:50:11 +01:00
Khopa
de0a3f929c Made WW2 Flak sites more compact, so it's easier to fit them in fields on the Normandy map. 2020-12-01 13:49:09 +01:00
Dan Albert
4f37610dfb Convert front line units to UnitMap.
https://github.com/Khopa/dcs_liberation/issues/485
2020-12-01 01:25:51 -08:00
Ignacio Muñoz Fernandez
66ee5f5392
Bingo & Joker Fuel for Flight Plans (#480)
Add bingo and joker fuel information to the kneeboard.
2020-11-29 14:53:15 -08:00
Khopa
208a7550ef Added C101CC to list of antiship capable aircrafts. 2020-11-29 13:16:35 +01:00
Khopa
37e23f70d6 Put manpads in modern faction's infantry squads. And added a setting to disable it. 2020-11-29 13:11:49 +01:00
walterroach
292ac42003 Fix campaigns without frontline.
* Missions will now generate without a frontline conflict
* Bulls is now defined as the nearest opposing airfield for each side
2020-11-28 19:53:01 -06:00
walterroach
29b894f8b0 Fix odd frontline unit spawns
* Modfied frontline vector to ensure start point stays outside of
  exclusion zone.  (Previously it could be up to 100m inside)

* Change randomization in offset distance from frontline to be based
  on a percentage of the unit type's fixed offset instead of the
  width of frontline.
  (Prevents units from being far from their expected distance from
  frontline)

* Change visualgen to use the same frontline vector calculation as the
  unit spawns
2020-11-28 18:43:32 -06:00
Khopa
f2c2ef82c5 Fixed unused aircraft using the same slots as used aircrafts. 2020-11-28 22:29:09 +01:00
Khopa
2ed1c36c54 Fixed infantry for red player being the same units as blue faction. Fixed skill for enemy vehicles being the same as player's one. 2020-11-28 21:34:21 +01:00
Dan Albert
bd60760f9d Merge faction sams and shorads into air_defenses.
Fixes https://github.com/Khopa/dcs_liberation/issues/473. Air defenses
for bases, strike locations, and fixed IADS will now all downgrade to
lower tier systems as needed. Strike locations will still be spawned as
an equally weighted random generator from either the medium or long
range groups, but will use a short range system if none are available to
the faction.

I've made the change in a way that leaves factions compatible, but will
follow up to clean up our built-in factions.
2020-11-27 17:45:40 -08:00
Dan Albert
e8aa9839b0 Fall back to lower range SAMs when needed.
Mostly fixes https://github.com/Khopa/dcs_liberation/issues/473. The
last part of the fix is to migrate the `shorads` property of the faction
to just be in `sams` and just use the property to decide its use.
Currently factions like USA 2005 that have long range SAMs and SHORADs
only will still not spawn anything at medium sites because they have no
other SAMs declared.
2020-11-27 17:45:40 -08:00
Dan Albert
fcdb22db5b Add range property to all air defense generators. 2020-11-27 17:45:40 -08:00
walterroach
e73cf68def
Merge pull request #474 from walterroach/frontline_vector
Frontline vector
2020-11-27 18:49:50 -06:00
Dan Albert
fa5b842cc7 Strengthen SA-10, add point defense.
Fixes https://github.com/Khopa/dcs_liberation/issues/417, though the
notes on that bug about this being non-optimal for skynet are still
true. This doesn't make skynet behavior any worse though, and does
improve it some compared to not having PD.

Adds two new SA-10 generator variants:

* Tier 2, with SA-15 for point defense
* Tier 3, with SA-15 for point defense and the Shilka upgraded to a
  Tunguska.

Updated factions that are capable of those systems, added missing SAMs
to those factions, and removed use of SA-19 as an independent SAM from
those factions. Will do a larger audit of faction SAMs later.
2020-11-27 16:25:10 -08:00
walterroach
43a21cb341 Fix bug #353 2020-11-27 17:53:56 -06:00
walterroach
45361b57a7 fixed bad import 2020-11-27 16:42:11 -06:00
walterroach
a9f1de13b1 Fix armor groups spawning bugs
* Prevent common cases where ground units do not spawn due to
  frontline position being in exclusion zone

* Fix case where ground units will spawn inside exclusion zone due to
  random offset from frontline center being fixed

* Remove dead code from `conflictgen.py`

* Start cleanup of `GroundConflictGenerator`
2020-11-27 16:31:52 -06:00
walterroach
edbe2d86f2 Merge branch 'develop' into frontline_vector 2020-11-27 13:47:10 -06:00
walterroach
4e12a1cdad Rework frontline vector
Ensures frontline stays outside of exclusion zones by adjusting its
position and width

Adds a DisplayOption for viewing the frontline vector on the map
2020-11-27 13:46:53 -06:00
Dan Albert
5d4fccd438 Fix mypy regressions. 2020-11-26 20:08:24 -08:00
Dan Albert
0e807d84c2 Differentiate required long and medium range SAMs.
To improve IADS design in campaigns, this differentiates required long
and medium range SAMs. SAMs that must be long range SAMs are defined by
SA-10 or Patriot launchers, while medium range SAMs are defined by SA-2,
SA-3, or Hawk launchers.

Long range SAMs positions will only be populated by long range SAMs
(Patriots and SA-10s), and not all factions have those available. Medium
range SAMs currently comprise all air defenses that are not long range
SAMs, so if the faction includes flak guns in their `sams` property then
flak guns may be spawned at medium range SAM locations.

Base defenses and random SAM locations continue to use either type of
SAM.
2020-11-26 19:48:14 -08:00
Dan Albert
cd97526d2b Mark the fishbed as capable of strike missions. 2020-11-26 13:46:33 -08:00
Khopa
87fdc16f9b Update to support the newest version of the Rafale mod. 2020-11-26 21:38:46 +01:00
Dan Albert
7636234649 Fix mission generation when labels are changed.
Fixes https://github.com/Khopa/dcs_liberation/issues/457
2020-11-25 22:17:15 -08:00
Dan Albert
2bd673a531 Don't allow operating on broken runways.
Doesn't allow helos or harriers to do it either even though they should
be able to because we don't currently support ground spawns, which would
be needed to prevent those aircraft from using the runway. Even then, I
don't know if they can be forced to *land* vertically.

Fixes https://github.com/Khopa/dcs_liberation/issues/432
2020-11-25 18:50:00 -08:00
Khopa
afabf6fd00 Fixed Control Point being set as neutral in some case. 2020-11-25 23:35:01 +01:00
Khopa
0eb4519797 Fixed IndexError preventing mission generation when a faction does not have any awacs aircraft available. 2020-11-25 23:11:55 +01:00