111 Commits

Author SHA1 Message Date
Raffson
95580a6cef
Compatibility fix for lua5.4 2024-03-01 22:11:14 +01:00
MetalStormGhost
60859d39c1 Fixed the Channel landmap. 2023-12-01 21:14:36 +01:00
Raffson
57c2850c87
Finish Sinai support
Resolves #134
2023-06-11 03:22:09 +02:00
Dan Albert
df922e9ca7
Force polygons into validity during GIS import.
Not sure why, but some polygons become invalid (which usually means a
self-intersecting "polygon", such as two triangles that meet at a point)
during this transformation. Shapely includes a tool to reshape polygons
into validity, so use that.
2023-06-04 13:01:09 +02:00
Dan Albert
9ebbe11d83
Add debug command to dump aircraft priorities.
https://github.com/dcs-liberation/dcs_liberation/issues/2809
2023-05-14 14:30:19 +02:00
MetalStormGhost
42f488df0b
Renamed Liberation to Retribution in the following files: (#62) 2023-01-01 15:29:08 +01:00
MetalStormGhost
bc674edb3a
Updated the Caucasus landmap (#28)
It is now also suitable for campaigns set in the forested regions of Caucasus. There are corridors for ground forces from Apsheronsk to Tuapse and from Maykop to Sochi. Also, the hilly area around Ambrolauri can now be used in campaigns as well.
2022-12-03 16:25:29 +01:00
Dan Albert
868c38b782
Remove unused data.
We get TACAN, ILS, and ATC data from pydcs now. The rest of this
manually curated data is unused.
2022-10-02 19:56:48 +02:00
Dan Albert
631ee96bbe
Move beacons module.
This isn't related to the missiongenerator, and importing this file from
some places (such as runway data) will cause a circular reference when
importing the rest of the missiongenerator package.
2022-10-02 19:56:47 +02:00
Dan Albert
2c53f7952f
Alter the beacon format to be keyed by ID.
ID based lookup will be used for finding ILS and TACAN beacons from the
pydcs data.
2022-10-02 19:56:47 +02:00
Dan Albert
2aab7c34be
Fix broken error message in beacon importer. 2022-10-02 19:56:46 +02:00
Dan Albert
4d9179d378
Add a GIS shapefile to landmap importer. 2022-09-17 14:35:08 +02:00
Dan Albert
cc9174cba4
Add a data linter with Markdown output.
Wildly incomplete, but it's a start.
2022-09-17 14:35:06 +02:00
Dan Albert
46a3aa9540
Load airfield data when called for airport.
The for_theater method is always called before for_airport is during
normal gameplay, but I'm writing a linter to show missing airfield data
that calls for_airport first.
2022-09-17 14:35:06 +02:00
Dan Albert
fa4bf3d516
Make generate_landmap importable.
This file may not be needed long term, but for now I want to import
to_multipoly for some other work.
2022-09-04 12:07:16 +02:00
Dan Albert
22c3d4ebc5 Add a CLI tool for viewing default loadouts. 2022-05-29 15:23:21 -07:00
RndName
f20d0effe9
Update Anti Air and Naval Layouts
- Break down the remaining Anti Air Layouts. Now each layout.miz only contains 1 layout
- Added a python script which can fix the orientation of a layout
- Fix layout orientation. Now all aa layouts are oriented to the north.
- Add small change so that whole carrier group will be rotated correctly with the BRC

closes #2215
2022-05-12 16:21:12 +02:00
Dan Albert
1a9930b93a Remove our old lat/lon support code.
pydcs provides this now.
2022-02-22 17:40:35 -08:00
RndName
2c17a9a52e Refactor Templates to Layouts, Review and Cleanup
- Fix tgogenerator
- Fix UI for ForceGroup and Layouts
- Fix ammo depot handling
- Split bigger files in smaller meaningful files (TGO, layouts, forces)
- Renamed Template to Layout
- Renamed GroundGroup to TheaterGroup and GroundUnit to TheaterUnit
- Reorganize Layouts and UnitGroups to a ArmedForces class and ForceGroup similar to the AirWing and Squadron
- Reworded the UnitClass, GroupRole, GroupTask (adopted to PEP8) and reworked the connection from Role and Task
- added comments
- added missing unit classes
- added temp workaround for missing classes
- add repariable property to TheaterUnit
- Review and Cleanup

Added serialization for loaded templates

Loading the templates from the .miz files takes a lot of computation time and in the future there will be more templates added to the system. Therefore a local pickle serialization for the loaded templates was re-added:
- The pickle will be created the first time the TemplateLoader will be accessed
- Pickle is stored in Liberation SaveDir
- Added UI option to (re-)import templates
2022-02-21 20:45:41 +01:00
RndName
344d4e31b7 Migrate generators to templats
- added all new templates
- deleted the generators
- added documentation
2022-02-21 20:45:41 +01:00
RndName
daf4704fe7 Rotate ground-units as in the campaign miz
This implements a logic to rotate groups which are generated from templates like the origin (ground unit) which was placed by the campaign designer
2022-02-21 20:45:41 +01:00
RndName
5febcdd4e4 Implement Template System for ground objects
- Factored out the current generators to use a better approach with Templates build from the dcs mission editor.
- This information is extended with a template-mapping in a json file which allows to logically group together multiple dcs groups and even statics to one template
- The combination of mapping and miz will be serialized to a template.json which is only used for loading.
- Factions now load templates during initialization and hold all the templates they can really use. This is based around the faction file.
- Implemented a template randomizer which allows to add some randomization to templates
- Each Template Group can have 1 randomizer which randomizes unit_type and size based on the mapping definition. Larger groups need to be devided in more fine detailed groups as we can now handle them better due to the change from dcs group types to our own classes.
- Rewritten the ArmorGroup, Naval and EWR template handling

Rework GroundObjectBuyMenu to support templates
2022-02-21 20:45:41 +01:00
Dan Albert
74291271e3 Move mission generation code into game.
Operation has been renamed MissionGenerator and is no longer a static
class.
2021-10-22 13:48:43 -07:00
Dan Albert
db51384b63 Add auto-generation warning to files. 2021-07-31 13:40:04 -07:00
bgreman
aa328d3ef7
Adds Marianas Islands support (#1406)
* Implements #1399

* Reverting accidental change in generate_landmap.py

* Changelog update

* Import beacon data for Marianas.

Co-authored-by: Dan Albert <dan@gingerhq.net>
2021-07-03 14:51:26 -04:00
docofmur
1bcc332885 Syrian Terrain update 2021-06-19 02:28:11 -07:00
docofmur
46c15f37c5 exclusion zone update 1 test change on caucases, massive update on syria 2021-06-18 17:58:08 +02:00
Dan Albert
75c4724200 Delete the obsolete converter. 2021-06-17 22:10:15 -07:00
Dan Albert
e7223da19f Convert remaining unit data. 2021-06-17 22:09:16 -07:00
Dan Albert
499d143199 Add a converter for groun unit info. 2021-06-17 22:09:06 -07:00
Dan Albert
8c62a081fe Remove unused code from AircraftType conversion. 2021-06-12 20:13:45 -07:00
Dan Albert
4a3ef42e67 Wrap the pydcs FlyingType in our own AircraftType.
This is an attempt to remove a lot of our supposedly unnecessary error
handling. Every aircraft should have a price, a description, a name,
etc; and none of those should require carrying around the faction's
country as context.

This moves all the data for aircraft into yaml files (only one converted
here as an example). Most of the "extended unit info" isn't actually
being read yet.

To replace the renaming of units based on the county, we instead
generate multiple types of each unit when necessary. The CF-18 is just
as much a first-class type as the F/A-18 is.

This doesn't work in its current state because it does break all the
existing names for aircraft that are used in the faction and squadron
files, and we no longer let those errors go as a warning. It will be an
annoying one time switch, but it allows us to define the names that get
used in these files instead of being sensitive to changes as they happen
in pydcs, and allows faction designers to specifically choose, for
example, the Su-22 instead of the Su-17.

One thing not handled by this is aircraft task capability. This is
because the lists in ai_flight_planner_db.py are a priority list, and to
move it out to a yaml file we'd need to assign a weight to it that would
be used to stack rank each aircraft. That's doable, but it makes it much
more difficult to see the ordering of aircraft at a glance, and much
more annoying to move aircraft around in the priority list. I don't
think this is worth doing, and the priority lists will remain in their
own separate lists.

This includes the converted I used to convert all the old unit info and
factions to the new format. This doesn't need to live long, but we may
want to reuse it in the future so we want it in the version history.
2021-06-12 20:13:45 -07:00
Dan Albert
4415429661 Stop requiring user input for mkrelease.py. 2021-05-13 19:16:40 -07:00
Dan Albert
8a01209ded Add data for lat/lon conversions. 2021-04-27 21:20:11 -07:00
Dan Albert
a47bef1f13 Blacken. 2021-02-12 20:10:45 -08:00
Simon Clark
791aa8b6d1 Fix the powerplant object template.
For some reason, the large building with the tank on is rotated 180 degrees when put into an actual mission. Therefore, I've just spun it around to counter this.
2021-01-30 23:46:15 +00:00
Dan Albert
10debbc286 Constrain front lines better.
Holes in the inclusion zone are defined by exclusion zones, not by holes
in the inclusion zone. Add a cached property for the inclusion zone that
is not also sea or exclusion zone and use that boundary instead.
2020-12-24 13:50:29 -08:00
Dan Albert
b9138acbc8 Use shapely projection instead of brute force.
Converts the landmap to use MultiPolygon instead of a collection of
polygons, since Shapely has explicit support for this.

Because we've done that, we can use a single projection from a line
instead of brute forcing the extent of the front line.

This makes turn processing ~66% faster (3 seconds to 1.8).

There are probably other places this should be used.
2020-12-24 01:20:15 -08:00
Khopa
2c475011a1 Syria terrain update + syrian civil war reworked in miz format 2020-12-21 03:19:17 +01:00
Dan Albert
1a0889d3d9 Update beacon importer to handle TheChannel.
TheChannel doesn't have message catalogs for English.

(cherry picked from commit a7203ea90a97f5ee3aecb524a5362f09e35f46df)
2020-12-19 11:47:00 -08:00
walterroach
eddd66b5c4 West coast Caucasus Landmap improvements 2020-12-12 15:35:12 -06:00
Khopa
feed55186f Migrated "polygon" code to shapely 2020-12-12 02:31:43 +01:00
Khopa
babfd4abda Merge remote-tracking branch 'khopa/develop' into develop 2020-12-11 22:04:50 +01:00
Khopa
a029c165a0 Normandy campaigns and terrain update 2020-12-11 22:04:33 +01:00
walterroach
9b51533d96 Caucasus Terrain and frontline tweaks 2020-12-11 14:35:06 -06:00
Khopa
c3023a9f99 Normandy terrain data update 2020-12-01 13:39:54 +01:00
Khopa
45ce28f9bf Another big Persian gulf terrain update (Iran) 2020-11-29 15:19:28 +01:00
Khopa
a7421fc670 Updated Persian Gulf terrain data to include more exclusions zones. 2020-11-29 15:00:03 +01:00
walterroach
c501c45c52 Update channel landmap
Ensures a valid frontline location can be found on the Dunkirk campaign
between Saint Omer and Dunkirk
2020-11-28 19:42:10 -06:00
Dan Albert
200c13dc31 Remove dead code. 2020-11-21 13:27:19 -08:00