atcz / DCSWaypointEditor

GNU General Public License v3.0
20 stars 5 forks source link

a plee for help #17

Closed EpiicPenguin closed 1 year ago

EpiicPenguin commented 1 year ago

a while back i was working on a project to bring a simple customizable DataCartridge to dcs. im not super experienced in code so i my plan was to use the default autostart scripting built into each module in "DCS World OpenBeta\Mods\aircraft\A-10C_2\Cockpit\Scripts\Macro_sequencies.lua" and add modify it to set the aircraft up properly like a data cartridge would, like in hornet for example setting default aim-120 range, trackfile time out to 32, etc... with options to change how you wanted to setup the aircraft i got really far and had scripts build for hornet, viper, blackshark 2, but i ran into one major issue from DCS itself.

just as i was getting ready to release a v1 of my script as a mod on the forums when apparently someone found a bug in the intergrety check system for multiplayer that allowed people to edit weapon damage (turn a jdam into a nuke, etc...). this forced pretty much all of the big multiplayer servers to enable the pure scripts option for their servers which of course completely broke my idea, at least for those servers, but i wanted my solution to be able to work anywhere without fear of ED breaking it or updates overwriting it.

thats when i had an idea and why i decided to write this post, DCSWE can use DCS-BIOS to send switch commands to DCS in a Long Sequence... so why not use DCS-bios to send my commands to dcs. most people already have DCS-bios anyway for SRS or DCSWE or TheWay or their own custom switch cockpits. and it would be very unlikely that ED would break DCS-Bios because then everyone's expensive custom cockpits would stop working.

only one problem, im super new to coding and have no idea how to even get a command sent to dcs bios, i've been reading the documentation but most of the examples are for setting up a cockpit with physical switches through an arduino and serial port.

so i thought i would ask you as you have experience with DCSWE which im assuming uses DCS-BIOS to send commands to DCS using software only? im trying to figure out how it all works and what i actually need to learn and am hoping you could mentor me in the right direction.

thank you in advance for any help you can give pointing me in the right direction, i look up to you and the work you've done keeping DCSWE up to date.

atcz commented 1 year ago

This is an idea I've had for a while, where you could read a DCS-BIOS LUA command file, then select commands from a list to add to a queue. Then the queue could be saved and executed like a DCSWE profile. So if I was doing a hornet night mission, I could execute that command queue to set all my night mode switches/brightness etc.

Most of the framework for that is already there in DCSWE, I just haven't had time to work on it.

EpiicPenguin commented 1 year ago

i was planing on building a sketchy, "script kiddys first app" tool, and maybe release it if i could even figure out how to write a gui in python, but incorporating it into DCSWE would be way better from user facing perspective.

im not sure whats easy or hard from a coding perspective yet, but my first step was going to be building app that you could paste the lua scipt into and click a button and it would sent it to DCS. but after digging into the documentation for dcs-bios last night this feature might actually already exist in some form.

it seems that dcs-bios has a dev tool called "The Lua Console" that runs a browser, and allows users to test out scripts. it seems like its mostly set up to either run as a dev console for building a sim pit or as a contentious background app for converting certin switch flips or axii into another for different module setups with the same cockpit (ie: f-14 sim pit controlling an A-10, or having one phisical switch alter multipile switching in dcs) im going to try it out next time i get a chance to play dcs and see what features it offers but it seems built more for sim pit development then being able to quickly use it during a sim flight.

after that other features i was considering were:

  1. an easy way to share scripts with other users, : i was thinking each script should be its own text file so users can just drag and drop user downloaded scripts into a folder where the App would read that folder and make a button and hot key for each script, but maybe a database would be faster from a development or runtime perspective. if it takes the database route it would need easy way to copy paste a script into the database or read from a file and import that into the database within the app so non technical users don't have to modify the database file manually. i was inspired by the simplicity in UI of DCSWE and keeping that non-technical-user friendliness is one of my goals.

  2. buttons and/or hot keys for activation of a script, while in flight.

  3. easy way to change scripts and have a number of scripts to quickly pick from active for a module, i was thinking at least 5 scripts + a 6th for testing, [ cold startup, hot aircraft setup, shutdown for repair, startup from repair, shutdown end of mission,] but if your already thinking of exterior lights then lights on and off would be another 2 so maybe more like 10+ quick access scripts would be better. i don't think its a good idea to clutter the DCSWE interface with 10 more buttons so maybe scripts having their own window or sub part of the main window would be best? idk?

That could all be in the future though, what/when ever you want to, or when ever i find time to learn python. --for starters, i think just a button in DCSWE that runs a script file would be amazing as that would allow me to start developing module specific scripts, which i already know how to do. if you want any scripts made let me know, i'll probably start with the hornet or viper, but after that i'll down the list of what modules i have, and try to build as many scripts as possible.

EpiicPenguin commented 1 year ago

Just a a quick update

I haven't worked on this project idea anymore, I'm hopefully building a new PC soon and will work on this project after that.

i just got really frustrated working playing DCS with my old shitty FX series possessor, ryzen 7800x3d here i come. (hopefully)

atcz commented 1 year ago

I worked on this a while yesterday. I created command files for F18 and UH1 from the dcs-bios LUA files, and started working on the UI to where it will at least load the file you select. Now just need to work on presenting the list of groups/buttons and adding to a profile. Once I get something that runs I'll create a new repo for it.

EpiicPenguin commented 1 year ago

Thats Awesome!

if you can, please link me the F/A-18 LUA so i can see what it looks like and how much work its going to be :)

i got my pc built last week, 7800x3d is amazing, running most games at 2-4 times the fps i was @ only ~40watts. F-15E just released today so im working my way through those Mudhen training missions and then i'l work on learning DCS BIOS.

atcz commented 1 year ago

I just added the command json files for now:

https://github.com/atcz/DCSAircraftCommandEntry

atcz commented 1 year ago

Here's the UI concept so far, need some time to work on the dcs-bios part of it: DCSACE

atcz commented 1 year ago

I have this basically working now for about 6 types of buttons. I created an F18 cold start script that sets up dispenser/ECM, RWR, right DDI and IFF/DL. It looks promising, still needs some more testing and figuring out how to handle bad inputs.

DCSACE2

atcz commented 1 year ago

Future updates will be in: https://github.com/atcz/DCSAircraftCommandEntry