Comments (4)
Of course this can be done, but I'm absolutly lacking the time to do it for you.
But my best advice would be to copy the lua export script and to change it to export a JSON file.
Another way would be to use python reflection to get the data out of the the python module, but a bit more python knowledge is needed for that.
from dcs.
Thank you for taking the time to reply :)
I've been looking into reflection but like you said, some extra python knowledge is required and I'm still at the part where I forget to str() the stuff I try to print and I get errors, so we're not there yet.
I'll try to modify the script then, to make it output JSON instead. What do I have to do to make the script run? Just put the .lua file in DCS's saved games folder and it'll automatically be picked up by dcs and executed on startup or do I have to register it somewhere? How do I trigger the export/execution of the script?
Again, thnk you for taking the time, I really appreciate it.
from dcs.
it is somewhat documented in the header of the script:
-- execute(dofile) this script at the end of
-- of 'DCS World\MissionEditor\modules\me_mission.lua'
-- base.dofile("C:\\Users\\peint\\Documents\\dcs\\tools\\pydcs_export.lua")
Then you just start dcs and the script will run, if you have an error in your code DCS will get stuck on startup and
the error can usually be found in the dcs log .txt file (somewhere in the Saved Games/DCS) folder.
It is pretty cumbersome this way, because always restarting DCS takes some time, but I didn't find another way yet.
from dcs.
Oh thank you for explaining it how it works, I didn't understand if èxecute(dofile)` was something I had to do or if the comment was telling me it is what it does already. Now i get it. I'll look into it when I can. Thank you.
from dcs.
Related Issues (20)
- Halo setting not handled HOT 4
- Export Issue rockets.lua
- Update PyPI release HOT 6
- ModuleNotFoundError: No module named 'dcs.terrain.caucasus'
- Collaboration for terrain data. HOT 3
- liveries_scanner: "zipfile.BadZipFile: File is not a zip file" HOT 9
- pip install error HOT 1
- RFC: drop python 3.7 support HOT 2
- security policy? HOT 2
- `Country` should be split into constant data and miz state
- replace our lua parser with lupa? HOT 3
- AH-64D_BLK_II has no pylon 5 HOT 2
- import dcs fails HOT 2
- RFC: drop Python 3.8 support? 3.9? 3.10?
- remove default for waypoint speed
- datalink support HOT 5
- Unhandled task type: Strafing HOT 1
- Linked unit
- Order of trigger actions changes after a load and save
- DCS export documentation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcs.