Knobster in other sims?

Support for the SimWareKits Knobster in combination with Air Manager and Air Player

Moderators: russ, Ralph

Message
Author
SimPassion
Posts: 5340
Joined: Thu Jul 27, 2017 12:22 am

Re: Knobster in other sims?

#11 Post by SimPassion »

Crash'n'Burn wrote: Mon Mar 06, 2023 6:07 pm I'm not sure what you mean. Why would DCS or BMS send key presses to KnobXP? Do we not neet Knob XP to send key presses to DCS or BMS?
I'm sure you're familiar with devices that just send out key presses (Leo Bodnar, Pokeys)? Then BMS just sees these keys pressed and execute the appropriate command.
Right, I understand it's the other way round as I mentioned previously, if the KnobXP APP for DCS or BMS is external and not a plugin like, as it use to be with MSFS and X-Plane
In any case we have to investigate in the SDK availability and the way to share data and events in both DCS and BMS

SimPassion
Posts: 5340
Joined: Thu Jul 27, 2017 12:22 am

Re: Knobster in other sims?

#12 Post by SimPassion »

Well after searching, it looks like there's no real SDK into DCS, one of the only two ways (apart things other already build and I've not already seen yet), seems to go LUA using the available API from the DCS root folder "DCS World/API/"

Other than this there's a Visual Studio C++ Dynamic Library sample called ED_FM_Template which can be used to go further

Code: Select all

========================================================================
    DYNAMIC LINK LIBRARY : ED_FM_Template Project Overview
========================================================================

AppWizard has created this ED_FM_Template DLL for you.

This file contains a summary of what you will find in each of the files that
make up your ED_FM_Template application.


ED_FM_Template.vcxproj
    This is the main project file for VC++ projects generated using an Application Wizard.
    It contains information about the version of Visual C++ that generated the file, and
    information about the platforms, configurations, and project features selected with the
    Application Wizard.

ED_FM_Template.vcxproj.filters
    This is the filters file for VC++ projects generated using an Application Wizard. 
    It contains information about the association between the files in your project 
    and the filters. This association is used in the IDE to show grouping of files with
    similar extensions under a specific node (for e.g. ".cpp" files are associated with the
    "Source Files" filter).

ED_FM_Template.cpp
    This is the main DLL source file.

/////////////////////////////////////////////////////////////////////////////
Other standard files:

StdAfx.h, StdAfx.cpp
    These files are used to build a precompiled header (PCH) file
    named ED_FM_Template.pch and a precompiled types file named StdAfx.obj.

/////////////////////////////////////////////////////////////////////////////
Other notes:

AppWizard uses "TODO:" comments to indicate parts of the source code you
should add to or customize.

/////////////////////////////////////////////////////////////////////////////
image.png

https://github.com/bjanders/dcs-api
https://www.digitalcombatsimulator.com/ ... ng_engine/
https://forum.dcs.world/topic/193666-sd ... -everyone/
https://forum.dcs.world/topic/316716-sd ... nt-5126114
https://forum.dcs.world/search/?q=sdk&quick=1

https://forum.dcs.world/forum/218-how-to/

Here's from "DCS World/API/DCS_ControlAPI.html"

Code: Select all

DCS Simulation Control User Scripts

The behaviour of the DCS can be altered using the Lua scripts. You define the hooks to the DCS events, and then do what you want using the provided API.

When loading, DCS searches for Saved Games\DCS\Scripts\Hooks\*.lua files, sorts them by name and then loads into the GUI Lua-state. Each user script is loaded into an isolated environment, so the only thing they share is the state of the simulator.

Each script defines a set of callbacks to the DCS events and sets them with the call DCS.setUserCallbacks(cb_table) For each callback type the hooks of all user scripts will be called in order of loading.

For callbacks which are supposed to return a value, currently there are 3 of them:

    onPlayerTryConnect
    onPlayerTrySendChat
    onPlayerTryChangeSlot

returning a value means breaking the hook call chain. Returning nothing (or nil) means continuing the hook chain, which ends with the default allow-all handlers.
The example user script 'Hooks/test.lua':

local test = {}

function test.onPlayerTryConnect(ipaddr, name, ucid, playerID)
    print('onPlayerTryConnect(%s, %s, %s, %d)', ipaddr, name, ucid, playerID)
    -- if you want to gently intercept the call, allowing other user scripts to get it,
    -- you better return nothing here
    return true -- allow the player to connect
end

function test.onSimulationStart()
    print('Current mission is '..DCS.getMissionName())
end

DCS.setUserCallbacks(test)  -- here we set our callbacks

The available API is documented below. The full list of the callbacks is at the end of this document.

In addition, all standard lua 5.1 libraries are available as well, namely:

    base api, like print, etc,
    math.*
    table.*
    string.*
    io.*
    os.*
    debug.*
Last edited by SimPassion on Tue Mar 07, 2023 2:58 am, edited 1 time in total.

SimPassion
Posts: 5340
Joined: Thu Jul 27, 2017 12:22 am

Re: Knobster in other sims?

#13 Post by SimPassion »

I guess @Ralph and @Corjan already made some investigation in the past and came to the same conclusion which bring DCS in a rather closed world in term of coding interaction

SimPassion
Posts: 5340
Joined: Thu Jul 27, 2017 12:22 am

Re: Knobster in other sims?

#14 Post by SimPassion »

For BMS, I've not found any significant and useful info around existing SDK. In any case I don't own any Falcon 4 license on which BMS could be installed over, so I can't check.

https://wiki.falcon-bms.com/en/manuals

https://www.falcon-bms.com/faq/

https://forum.falcon-bms.com/search?ter ... owAs=posts

https://forum.falcon-bms.com/

SimPassion
Posts: 5340
Joined: Thu Jul 27, 2017 12:22 am

Re: Knobster in other sims?

#15 Post by SimPassion »

Tribute to Charles E. Yeager (aka Chuck Yeager) in DCS Film

https://en.wikipedia.org/wiki/Chuck_Yeager Image


Crash'n'Burn
Posts: 256
Joined: Wed May 30, 2018 8:47 pm

Re: Knobster in other sims?

#16 Post by Crash'n'Burn »

@SimPassion I would be happy to gift you a Falcon 4.0 copy and appreciate you looking into this. BMS is my main sim at the moment and what has prompted me to want to be able to use this in BMS. I would like to think all I really need is for Knobster to be able to send out key presses like a macro key device or appear as a DirectX input device on Windows but I'm sure you know about the inner workings and requirements more than I do.

SimPassion
Posts: 5340
Joined: Thu Jul 27, 2017 12:22 am

Re: Knobster in other sims?

#17 Post by SimPassion »

Crash'n'Burn wrote: Wed Mar 08, 2023 10:19 am @SimPassion I would be happy to gift you a Falcon 4.0 copy and appreciate you looking into this. BMS is my main sim at the moment and what has prompted me to want to be able to use this in BMS. I would like to think all I really need is for Knobster to be able to send out key presses like a macro key device or appear as a DirectX input device on Windows but I'm sure you know about the inner workings and requirements more than I do.
Hi @Crash'n'Burn, just a small question, did you also installed your DCS license and game from Steam as well ? In this case, I guess the way to go would be to incorporate the "KnobSTEAM" future plugin as a Steam overlay for games, with the ability to feed key-strokes ...

SimPassion
Posts: 5340
Joined: Thu Jul 27, 2017 12:22 am

Re: Knobster in other sims?

#18 Post by SimPassion »


Crash'n'Burn
Posts: 256
Joined: Wed May 30, 2018 8:47 pm

Re: Knobster in other sims?

#19 Post by Crash'n'Burn »

No, I install direct, no Steam for DCS. If you were to develop for DCS, I would suggest not going through Steam coz it seems that the general advice is that players buy direct from DCS as Steam usually do not have sales as often and are shorter in duration compared to the DCS e-shop, plus there are "mileage" points people can accrue on the e-shop which can be used to take prices off of purchases.

Sabre
Posts: 65
Joined: Tue May 24, 2016 10:51 pm

Re: Knobster in other sims?

#20 Post by Sabre »

Can DCS be used with SPAD.Next? SPAD has knobster support. The knobster touch screen support may not work but with SPADs scripting support I think it could work.

Post Reply