instructions on custom weapons injection

bgreman
2021-07-29 11:59:10 -04:00
parent aee624db25
commit 995bcfbdf8

@@ -56,7 +56,7 @@ Example of final file for the popular A-4E-C mod : https://github.com/dcs-libera
As you can see, extensions for mods are stored in this folder : https://github.com/dcs-liberation/dcs_liberation/blob/develop/pydcs_extensions
These file contains a lot of metadata we need to be able to generate missions, such as possible liveries, possible payloads for each pylons, specific weapons ids ... and so on.
These file contains a lot of metadata we need to be able to generate missions, such as possible liveries, possible payloads for each pylons, specific weapons ids ... and so on.
## Step 2 : Pydcs extensions injection :
@@ -107,11 +107,17 @@ CAP_CAPABLE = [
]
```
## Step 4 : Create default payload
## Step 4 : Create default payload and inject custom weapons
See [Custom Loadouts](Custom-Loadouts)
Create default loadouts for the new plane.
Any custom weapons with the mod should be included in the same file as the python class for the vehicle itself. After the weapons are defined, they must be injected into the `pydcs` weapons table. You do this by including the following line at the top of the file:
`from pydcs_extensions.weapon_injector import inject_weapons`
and the following line after the weapons definition class:
`inject_weapons(CustomWeaponsClass)` where `CustomWeaponsClass` is the name of the weapons class you created. For the A4EC listed above, that name is `WeaponsA4EC`.
## Step 5 : Factions
See [Custom Factions](Custom-Factions) and create a faction that support the mods so it can be used