Jump to content

Extracting all weapons and loadout configs


dcs76

Recommended Posts

I wrote a web based mission planning tool which does allow our squadron to create our packages, flights and missions. It also allows defining the loadout for each and every aircraft. When entering the multiplayer server, the pilots assigned to those flights/missions just use the F10 radio menu to configure the loadout which was predefined by the flight lead in the mission planning tool. They see the loadout to be set on their kneeboards automatically.

 

For our mission planning tool, we originally used the DCS Mission Editor to look up any possible loadout config for each and every pylon of all the aircraft we are flying and manually put this config and aossicated paylout weight and drag in the web app config. This allowed mission planners to figure out a loadout dedicated to the planned mission.

 

With DCS 2.7 the loadout config of a few aircraft changed - specifically the weights were updated across the board. I do not want to manually go through all the aircraft and loadout configs again in the ME, so I wondered if it is possible to extract that information somehow from DCS itself via a mod or by just using an external lua interpreter and load the weapon and loadout lua tables located within the DCS folders. I tried to hook into export.lua or the kneeboard lua scripting environment, but it seems I do not have access to all loadout configs and weapons of all aircraft. The best results I got so far where when I wrote a lua script importing (via dofile) all the lua scripts located at CoreMods\aircraft\AircraftWeaponPack. That gave me a lot of weapon info, payloads with their respective information (weight, image and such), and loading the lua files from the aircraft folders within the CoreMods/aircraft folder gave me the possible loadout configuration for each aircraft.

 

The thing is. there are a lot of loadout configs missing in the loadout definitions which are referenced by the aircraft pylon tables. For instance, In the A-10C loadout config, the CLSID "BRU-42_3*BDU-33" is referenced, but it is nowhere to be found. I unsuccessfully searched all files for this or other CLSIDs which I have been unable to find in the AircraftWeaponPack. I did also search archives and binaries. Does anyone know, where I can find the missing loadout definitions?

 

My guess is that I would need to write my own aircraft mod and have some lua hooks there which will give me access to all possible weapon/loadout definitions and I hope I will then be able to dump that data somehow, but I hoped for an easier solution.

Link to comment
Share on other sites

It seems until before 2.7 update, there was a weapons and loadout database underneath Scripts/Database. Those lua scripts are gone now. Probably compiled into binaries?

 

I did some extensive script loading foo and was able to get the loadout definitions of about 400 items. However, I also encountered references to additional 200 loadout definitions which I could not access.

 

I wonder how modders/module developers are able to get a list of all available weapons now.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Ok, I was able to get hold of the data with this simple script:

 

local S = require('Serializer')
local f = io.open('db.lua', 'w')

local s = S.new(f)
s:serialize_simple('db', db)
f:close()

 

I just loaded this script at the end of DCS/MissionEditor/MissionEditor.lua with

 

dofile(<path_to_script>)
 

As soon as I start DCS, the data is dumped into the file db.lua. It is 46 MB big at the moment.

 

Now I can just extract the important parts of it and write the yaml/json files as before.

 

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...