-
Notifications
You must be signed in to change notification settings - Fork 15
Modding tutorial
Most of the settings for the campaign are in the game\db.py
file. There's lots of comments and you should really read them before changing anything.
Also take a note that it'd be a lot easier to change those files in editor that supports syntax highlight (like Atom, Sublime Text or Notepad++). You will spot the errors more easily and spare yourself the hassle of figuring out why the application won't start.
Find variable PLANE_PAYLOAD_OVERRIDES
and add/change a section for the aircraft. Syntax goes as follows:
`AircraftIdentifier`: {
"Category": "PayloadName",
},
where:
-
AircraftIdentifier
: identifier of aircraft (the same that is used troughout the file) -
"Category"
: (in double quotes) is one of the tasks: CAS, AntishipStrike, GroundAttack, CAP, Intercept, Escort or "*" -
"PayloadName"
: payload as found inresources\payloads\UNIT_TYPE.lua
file. Sometimes this will match payload names in the mission editor, sometimes it doesn't. You can find exact name of the payloads underresources\payloads
folder in alua
file named by aircraft.
Find PLANE_LIVERY_OVERRIDES
and add a section to that. Syntax as follows:
`Identifier`: "LiveryName",
Identifier
is aircraft identifier (as used troughout the file) and "LiveryName" (with double quotes)
is livery name as found in mission editor.
Go to game\game.py
and find the variables starting with PLAYER_BUDGET
:
-
PLAYER_BUDGET_INTIAL
is the starting amount, which will be multiplied by campaign Multiplier -
PLAYER_BUDGET_BASE
is a base value for the turn bonus, which then will be multiplied based on how many bases is captured -
PLAYER_BUDGET_IMPORTANCE_LOG
- base oflog
that is used to determine budget bonus multiplier.
BONUS = LOG(SUM(CAPTURED_BASE_IMPORTANCE * ITS_STRENGTH)+1, PLAYER_BUDGET_IMPORTANCE_LOG) * PLAYER_BUDGET_BASE * CAMPAIGN_MULTIPLIER
In the game\game.py
file there's a variable called EVENT_PROBABILITIES
. First number after event name decide probability for the player (i.e. player attacking enemy), second - for enemy (enemy attacks player). Capture is 100 for player because it's always available.
Go to game\db.py file and remove every occurrence of a unit type that you want to remove from the campaign, remove the save file (DCS\liberation_save), and start the campaign.
- First of all, find out the correct identifier for the unit by scooping trough
pydcs
database:
-
dcs\planes.py
- for planes -
dcs\helicopters.py
- for helicopters -
dcs\vehicles.py
- for vehicles (this include all of the ground vehicles)
If you can't find the id of the unit it could be that the library needs update. Please refer to the Updating pydcs section.
-
Open the
game\db.py
file -
Add it to the
PRICES
variable with price of your choice (it also prioritizes unit commissions to the enemy) -
Add it to the appropriate category for
UNIT_BY_TASK
. Aircraft should be applicable for the following tasks based onUNIT_BY_TASK
categories:
Aircraft:
-
CAP - should be applicable for CAP, Intercept and Escort (meaning that you can select the aircraft in the editor and find those tasks in the dropdown
Main task
menu) - CAS - CAS and AntiShipStrike
- Transport - the same, Transport
- AWACS - the same, AWACS
- Embarking - infantry transport aircraft (task Transport)
Ground units:
- PinpointStrike - could be any ground vehicle
- AirDefense - Anti Aircraft units
- Reconnaissance - any ground vehicle
- Nothing - infantry
Ships:
- Carriage - aircraft carriers. Only first one for the country will be used
- CargoTransportation - transport ships
-
Put it in the appropriate
UNIT_BY_COUNTRY
list. This only affects the campaign, if the unit is not available for the country in the editor putting it here will still won't work. -
Generate a mission with the aircraft and verify that correct load out is loaded for it. If it's not - use Change default load out for the aircraft section of this guide to fix that.
-
Delete
save
file to restart the campaign. Aircraft should be fully integrated into the campaign now.
- Go to https://github.com/pydcs/dcs, download entire repository
Clone or Download
,Download ZIP
- Replace
dcs
folder of the main folder of campaign application with the one from the array