Commit Graph

608 Commits

Author SHA1 Message Date
Dan Albert
29a0644719 Never generate empty ship groups.
Fixes https://github.com/Khopa/dcs_liberation/issues/391

(cherry picked from commit c833078e71)
2020-12-25 01:35:24 -08:00
Khopa
368bf08ade Fixed mypy error 2020-12-24 03:18:53 +01:00
Khopa
86394d8f19 Artillery groups would retreat in the wrong direction - fixed (parameters of the retreat point function are a bit confusing 😕 ) 2020-12-24 02:02:17 +01:00
Khopa
04e2c02eff SCUD missile sites will fire on nearest enemy airport by default 2020-12-24 01:26:00 +01:00
Khopa
b59167d3ca Changelog update, WW2 factions can recruit AA/AT guns for frontlines. 2020-12-23 18:21:13 +01:00
Khopa
282a5109ba Infantry group are always made of 5 units instead of a random amount. 2020-12-23 01:33:49 +01:00
Khopa
7c29ea836c Infantry is only generated for IFV and APC groups 2020-12-22 23:24:27 +01:00
Khopa
12bf26223d Added shorad units on frontline 2020-12-22 23:23:32 +01:00
Dan Albert
5382d99a94 Improve TOT planning.
Moves all TOT planning into the FlightPlan to clean up specialized
behavior and improve planning characteristics.

The important part of this change is that flights are now planning to
the mission time for their flight rather than the package as a whole.
For example, a TARCAP is planned based on the time from startup to the
patrol point, a sweep is planned based on the time from startup to the
sween end point, and a strike flight is planned based on the time from
startup to the target location. TOT offsets can be handled within the
flight plan.

As another benefit of theis cleanup, flights without hold points no
longer account for the hold time in their planning, so those flights are
planned to reach their targets sooner.

As a follow up TotEstimator can be removed, but I want to keep this low
impact for 2.3.2.

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

(cherry picked from commit 745dfc71bc)
2020-12-19 11:46:58 -08:00
Khopa
ec5a26e8dd Added ZSU-57 sites 2020-12-18 01:05:06 +01:00
Khopa
2b7cd36eea T72B3 and BTR-82A support 2020-12-18 00:42:44 +01:00
Dan Albert
2288b7f7b2 Fail gracefully when out of radio channels.
Fixes https://github.com/Khopa/dcs_liberation/issues/598

(cherry picked from commit 498af28efb)
2020-12-16 22:24:07 -08:00
Dan Albert
a075e62bad Fix easy going CAPs.
Fixes https://github.com/Khopa/dcs_liberation/issues/592

(cherry picked from commit 1ebe367e07)
2020-12-15 22:48:21 -08:00
Khopa
561d679a62 Merge remote-tracking branch 'khopa/develop_2_3_x' into develop_2_3_x 2020-12-15 23:14:51 +01:00
Khopa
991cd91dd4 Possible to setup Runway attack payload, default to strike payload otherwise; 2020-12-15 23:14:36 +01:00
walterroach
9e51ff0253 Merge pull request #589 from walterroach/sead_flyover
SEAD Tasking
2020-12-15 15:25:31 -06:00
walterroach
7838c9b49b Revert DEAD flyover 2020-12-15 12:58:55 -06:00
Khopa
e134143f16 Fixed possible crash in mission generation when generating a mission with a faction that doesn't have mandpad and with the disabled infantry option checked.
(cherry picked from commit 31fdd24c3e)
2020-12-15 10:20:41 -08:00
walterroach
a36858f3ea Change SEAD target waypoint to flyover 2020-12-15 11:53:12 -06:00
Dan Albert
f0f6739cf8 Don't cull flights.
This was made largely pointless in 2.2, since the AI won't plan a dozen
CAPs 300nm from the front line any more. Culling flights mostly just
confuses players and breaks the planning AI.

If we do want to limit flight counts, we need to do that by limiting
flight counts. The AI will try to put their aircraft as close to the
mission as possible, so culling will do very little to stop them from
spawning 50 flights at the front-line attached airfield.

https://github.com/Khopa/dcs_liberation/issues/578
(cherry picked from commit 0b2483ea15)
2020-12-14 23:55:58 -08:00
walterroach
4b0d2f7abc Merge pull request #576 from walterroach/explict_resources
Explicit resources
2020-12-13 18:04:58 -06:00
Dan Albert
dd28781b69 Fix kneeboard ILS for many airfields.
Fixes https://github.com/Khopa/dcs_liberation/issues/564

(cherry picked from commit 61ebe9780e)
2020-12-13 15:12:39 -08:00
walterroach
8e3039dd37 Fix Zero Fuel Start #559 2020-12-13 15:41:13 -06:00
walterroach
d9ea33cbb9 Fix diversified frontline distance 2020-12-13 12:21:09 -06:00
Dan Albert
ff0446cc12 Fix division by zero for very close waypoints.
Fixes https://github.com/Khopa/dcs_liberation/issues/557

(cherry picked from commit 08ceb57c31)
2020-12-12 14:51:32 -08:00
Dan Albert
6455c38ff4 Fix duplication of pydcs translation keys.
We shouldn't be constructing these by hand, and the first argument is
not the value of the string. I'm not really sure why the current code
works at all. We probably do this in other places and should clean that
up, but for now this should fix Tauntaun.

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

(cherry picked from commit affb332eb9)
2020-12-12 14:24:09 -08:00
Dan Albert
f62c2fbabb Show player waypoint timing in the briefing.
Fixes https://github.com/Khopa/dcs_liberation/issues/536

(cherry picked from commit d5276c9d4a)
2020-12-12 14:18:36 -08:00
walterroach
4c0fc5a407 Adjust tanker speed and altitudes #444 2020-12-12 16:08:37 -06:00
walterroach
f608cd5aef fix mypy issues 2020-12-12 15:45:55 -06:00
walterroach
0371b62acb Merge branch 'ground_tasking' into develop_2_3_x 2020-12-12 15:41:00 -06:00
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
Dan Albert
ae034d5387 Show takeoff time in waypoint list.
https://github.com/Khopa/dcs_liberation/issues/536
(cherry picked from commit 07e5c568c4)
2020-12-12 13:22:57 -08: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 d316836e90)
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 8443f61f0a)
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 72ac8ca872.
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 90697194a1.
2020-12-04 23:57:58 -08:00