mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Updated Layouts (markdown)
28
Layouts.md
28
Layouts.md
@@ -3,7 +3,7 @@
|
||||
The Layout System is a new way of defining how ground objects like SAM Sites or other Vehicle / Ship Groups will be generated (which type of units, how many units, alignment and orientation). It is a complete rework of the previous generator-based logic which was written in python code. The new system allows to define layouts with easy to write yaml code and the use of the DCS Mission Editor for easier placement of the units. The layout system also introduced a new logical grouping of Units and layouts for them, the Armed Forces, which will allow major improvements to the Ground Warfare in upcoming features.
|
||||
|
||||
**Armed Forces**\
|
||||
The Armed Forces is a new system introduced with the layout system which will allow to identitfy and group possible units from the faction together with available layouts for these groups. It is comparable to the AirWing and Squadron implementation but just for Ground and Naval Forces. All possible Force Groups (grouping of 1 or more units and and the available layouts for them) will be generated during campaign initialization and will be used later by many different systems. A Force Group can also include static objects which was not possible before the introduction of the layout system. It is also possible to define presets of these Force Groups within the faction file which is handy for more complex groups like a SA-10 Battery or similar. Example: [SA-10/S-300PS](resources/groups/SA-10.yaml) which includes all the units like SR, TR, LN and has the layout of a [S-300 Battery](resources/layouts/anti_air/S-300_Site.yaml)
|
||||
The Armed Forces is a new system introduced with the layout system which will allow to identitfy and group possible units from the faction together with available layouts for these groups. It is comparable to the AirWing and Squadron implementation but just for Ground and Naval Forces. All possible Force Groups (grouping of 1 or more units and and the available layouts for them) will be generated during campaign initialization and will be used later by many different systems. A Force Group can also include static objects which was not possible before the introduction of the layout system. It is also possible to define presets of these Force Groups within the faction file which is handy for more complex groups like a SA-10 Battery or similar. Example: [SA-10/S-300PS](/dcs-liberation/dcs_liberation/blob/develop/resources/groups/SA-10.yaml) which includes all the units like SR, TR, LN and has the layout of a [S-300 Battery](/dcs-liberation/dcs_liberation/blob/develop/resources/layouts/anti_air/S-300_Site.yaml)
|
||||
|
||||
**The Layout System**\
|
||||
In the previous system the generator which created the ground object was written in python which made modifications and reusability very complicated. To allow easier handling of the layouts and decoupling of alignment of units and the actual unit type (for example Ural-375) the layout system was introduced. Previously we had a generator for every different SAM Site, now we can just reuse the alignemnt (e.g. 6 Launchers in a circle alignment) for multiple SAM Systems and introduce more variety.
|
||||
@@ -15,7 +15,7 @@ As the whole ground unit generation and handling was reworked it is now also pos
|
||||
### General Concept
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
All possible Force Groups will be generated during campaign initialization by checking all possible units for the specific faction and all available layouts. The code will automatically match general layouts with available units. It is also possible to define preset groups within the faction files which group many units and the prefered layouts for the group. This is especially handy for unique layouts which are not defined as `global`. For example complex sam sites like the S-300 or Patriot which have very specific alignment of the different units.
|
||||
@@ -28,7 +28,7 @@ All these generated ForceGroups will be managed by the ArmedForces class of the
|
||||
|
||||
Example for a customized Ground Object Buy Menu which makes use of Templates and UnitGroups:
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## How to modify or add layouts
|
||||
@@ -53,7 +53,7 @@ The miz file is used to define the positioning and orientation of the different
|
||||
|
||||
TODO max amount of possible units is defined from the miz. Example if later the group should have 6 units than there have to be 6 defined in the miz.
|
||||
|
||||

|
||||

|
||||
|
||||
### The Layout configuration file
|
||||
|
||||
@@ -89,7 +89,7 @@ Every unit type has to be defined as a sub group as following:
|
||||
|
||||
Complete example of a generic template for an Aircraft Carrier group:
|
||||
|
||||
```
|
||||
```yaml
|
||||
name: Carrier Group
|
||||
generic: true
|
||||
tasks:
|
||||
@@ -115,7 +115,7 @@ For performance improvements all layouts are serialized to a so called pickle fi
|
||||
|
||||
|
||||
## Migration from Generators
|
||||
The previous generators were migrated using a script which build a group using the generator. All of these groups were save into one .miz file [original_generator_layouts.miz](/resources/layouts/original_generator_layouts.miz).
|
||||
The previous generators were migrated using a script which build a group using the generator. All of these groups were save into one .miz file [original_generator_layouts.miz](/dcs-liberation/dcs_liberation/blob/develop/resources/layouts/original_generator_layouts.miz).
|
||||
This miz file can be used to verify the templates and to generalize similar templates to decouple the layout from the actual units. As this is a time-consuming and sphisticated task this will be done over time.
|
||||
With the first step the technical requirements will be fulfilled so that the generalization can happen afterwards the technical pr gets merged.
|
||||
|
||||
@@ -125,14 +125,16 @@ With the first step the technical requirements will be fulfilled so that the gen
|
||||
With the rework there were also some changes to the faction file definitions. Older faction files can not be loaded anymore and have to be adopted to the new changes.
|
||||
During migration all default factions were automatically updated, so they will work out of the box.
|
||||
|
||||
You can find more detailed information about how to customize the faction file in [Custom Faction](Custom-Faction)
|
||||
|
||||
What was changed:
|
||||
- Removed the `ewrs` list. All EWRs are now defined in the list "air_defense_units".
|
||||
- Added the `air_defense_units` list. All units with the Role AntiAir can be defined here as [GroundUnitType](/game/dcs/groundunittype.py). All possible units are defined in [/resources/units/ground_units](/resources/units/ground_units)
|
||||
- Added `preset_groups`. This list allows to define Preset Groups (described above) like SAM Systems consisting of Launcher, SR, TR and so on instead of adding them each to "air_defense_units". The presets are defined in [/resources/groups](/resources/groups)
|
||||
- Added the `air_defense_units` list. All units with the Role AntiAir can be defined here as [GroundUnitType](/dcs-liberation/dcs_liberation/blob/develop/game/dcs/groundunittype.py). All possible units are defined in [/dcs-liberation/dcs_liberation/blob/develop/resources/units/ground_units](/dcs-liberation/dcs_liberation/blob/develop/resources/units/ground_units)
|
||||
- Added `preset_groups`. This list allows to define Preset Groups (described above) like SAM Systems consisting of Launcher, SR, TR and so on instead of adding them each to "air_defense_units". The presets are defined in [/dcs-liberation/dcs_liberation/blob/develop/resources/groups](/dcs-liberation/dcs_liberation/blob/develop/resources/groups)
|
||||
- Migrated `air_defenses` to air_defense_units and preset_sets.
|
||||
- `Missiles` are migrated to GroundUnitTypes instead of Generator names (see air_defense_units for how to use)
|
||||
- Removed `cruisers`, `destroyers` and `naval_generators`. Migrated them to naval_units and preset_groups
|
||||
- added `naval_units` with the correct ship name found here [/resources/units/ships](/resources/units/ships)
|
||||
- added `naval_units` with the correct ship name found here [resources/units/ships](/dcs-liberation/dcs_liberation/blob/develop/resources/units/ships)
|
||||
- `aircraft_carrier` and `helicopter_carrier` were moved to `naval_units` as well.
|
||||
|
||||
## Preset Groups
|
||||
@@ -141,7 +143,7 @@ Instead of adding the exact name of the previous generator to add complex groups
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
```yaml
|
||||
name: SA-10/S-300PS # The name of the group
|
||||
tasks: # Define at least 1 task
|
||||
- LORAD # The task(s) the Group can fulfill
|
||||
@@ -159,8 +161,8 @@ layouts: # Define at least one layout
|
||||
```
|
||||
|
||||
Resources:
|
||||
- A list of all available preset groups can be found here: [/resources/groups](/resources/groups)
|
||||
- All possible tasks can be found in the [/game/data/groups.py](/game/data/groups.py)
|
||||
- Units are defined with the variant name found in [/resources/units](/resources/units)
|
||||
- A list of all available preset groups can be found here: [/resources/groups](/dcs-liberation/dcs_liberation/blob/develop/resources/groups)
|
||||
- All possible tasks can be found in the [/game/data/groups.py](/dcs-liberation/dcs_liberation/blob/develop/game/data/groups.py)
|
||||
- Units are defined with the variant name found in [/resources/units](/dcs-liberation/dcs_liberation/blob/develop/resources/units)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user