Jump to content

Recommended Posts

Posted (edited)
On 9/10/2023 at 5:16 PM, xoomigo said:

Sadly, no. The JSON file is part of the DCS-BIOS mechanism to work a specific aircraft module. The JSON file for each aircraft selected during DCS-COINS setup is also replicated into the TP plugin folder - as it is also needed by the "dcs-bios-api" (a 3rd party library by Daniel Tian) which made DCS-COINS possible.

Were you able to get any of the FP's DCS-BIOS modder to commit on supporting your mod?

After searching, I managed to create the MH-60R.lua file (with 5 switches for test) and DCS-BIOS transcribed it to json
I attach the files if you want to transcribe in *.pp for test
Thanks for your help

MH-60R.lua MH-60R.jsonp MH-60R.json

Edited by Tanuki44
Posted
On 9/9/2023 at 6:50 PM, xoomigo said:

DCS-COINS release 2023-09-09 is now available.

Hello, xoomigo, sorry to bother you again. I'm trying to solve one cosmetic problem. In common values, DCS-BIOS provides speed both in metric (_EU) and imperial (_US) variants. But for altitude, I don't have that option - only feet there. Touch Portal offers some options, but it is cumbersome:

  • Using something like ${(value:mgdc_commondata_st_alt_msl_ft) / 3.28} does not work.
  • You have to set an event with "When the plug-in state", then choose the common alt feet value, and use "does not change to" option with some unlikely value (e.g. -1).
  • Then you can do some math "Calculate with Value), but / 3.28 produces an ugly number with decimals, there seems to be no rounding available.

So it definitely is possible somehow, but it is not satisfactory (at least what I know about now).

Would it be possible to add some basic calculation and rounding 🙂 to your PP files? Is it even possible to have two lines there bound to the same DCS-BIOS input?

✈️ L-39, F-4E, F-5E, F-14, F/A-18C, MiG-15, F-86F, AJS-37, C-101, FC2024 🛩️ Yak-52, P-47, Spitfire, CE2 🚁 UH-1H, Mi-8, Ka-50 III, SA342 🗺️ NTTR, PG, SY, Chnl, Norm2, Kola, DE 📦 Supercarrier, NS430, WWII, CA 🕹️ VKB STECS+Gladiator/Kosmosima+TPR ▶️ DCS Unscripted YouTube 🐛 "Favourite" bugs: 1) Object local camera fast/slow inverted, 2) Yak-52 toggles not toggling, 3) all Caucasus ATC bugs

Posted
15 hours ago, Tanuki44 said:

After searching, I managed to create the MH-60R.lua file (with 5 switches for test) and DCS-BIOS transcribed it to json
I attach the files if you want to transcribe in *.pp for test.

Okay, I only need the JSON file. Here's the derived PP file.  Hope it works. 🙂

MH-60R.pp

Posted
4 hours ago, virgo47 said:

Hello, xoomigo, sorry to bother you again. I'm trying to solve one cosmetic problem. In common values, DCS-BIOS provides speed both in metric (_EU) and imperial (_US) variants. But for altitude, I don't have that option - only feet there. Touch Portal offers some options, but it is cumbersome:

  • Using something like ${(value:mgdc_commondata_st_alt_msl_ft) / 3.28} does not work.
  • You have to set an event with "When the plug-in state", then choose the common alt feet value, and use "does not change to" option with some unlikely value (e.g. -1).
  • Then you can do some math "Calculate with Value), but / 3.28 produces an ugly number with decimals, there seems to be no rounding available.

So it definitely is possible somehow, but it is not satisfactory (at least what I know about now).

Would it be possible to add some basic calculation and rounding 🙂 to your PP files? Is it even possible to have two lines there bound to the same DCS-BIOS input?

Hi virgo47,

Sounds reasonable. Unfortunately, my schedules are packed for the next few days... also need some time to explore the options. Will get back to you when I can.

xoomigo

  • Like 1
Posted (edited)
2 hours ago, xoomigo said:

Sounds reasonable. Unfortunately, my schedules are packed for the next few days... also need some time to explore the options. Will get back to you when I can.

No rush at all.

BTW: Touch Portal guys plan to add rounding in the next major version (but it is not planned yet). They also plan to support multi-page import with the same values (reusing value IDs from previously imported page), which will be super practical for multi-page panel for a single plane. And multi-page export/import too. So I've learned on their Discord today, although we don't know how far the version really is. 🙂

Finally, they gave me a tip how to round it with text processing, quite complicated, but in my case I didn't mind to "floor" the number of meters (round down). So my solution in the end was very simple:
image.png

So at least for this scenario, I'm covered.

Edited by virgo47

✈️ L-39, F-4E, F-5E, F-14, F/A-18C, MiG-15, F-86F, AJS-37, C-101, FC2024 🛩️ Yak-52, P-47, Spitfire, CE2 🚁 UH-1H, Mi-8, Ka-50 III, SA342 🗺️ NTTR, PG, SY, Chnl, Norm2, Kola, DE 📦 Supercarrier, NS430, WWII, CA 🕹️ VKB STECS+Gladiator/Kosmosima+TPR ▶️ DCS Unscripted YouTube 🐛 "Favourite" bugs: 1) Object local camera fast/slow inverted, 2) Yak-52 toggles not toggling, 3) all Caucasus ATC bugs

Posted (edited)
8 hours ago, xoomigo said:

Sounds reasonable. Unfortunately, my schedules are packed for the next few days... also need some time to explore the options. Will get back to you when I can.

Talking about possible flexibility improvements...

image.png

The first section shows how I cycle through three states now. The second shows, how I can't - because I don't see a way how to set AC voltmeter integer value directly. Would that be easy to implement? This only gets more and more elaborate for 5 way knobs (DC VM in Huey), etc.

I tried to put the actual commands into On Events sections instead (where the red box is):

image.png

But this does not work very well with the increment command. If I click very fast on the Touch Portal button, the increment action and the setting in On Event phase feet into each other and the cycle can start that is very difficult to stop (mostly by slowing down either Android app or DCS). In other words, it's not systemic, I'd rather not issu commands back to DCS-BIOS when I react to DCS-BIOS, if you undestand me. I'd like to drive everything with variables.

I can leave it in On Pressed section, but then I can't avoid that ugly multi-level IF that only gets uglier with more values.

Having action to set the value directly would be cool. At least for more than 2-way switches.

But... I realize, it is ANOTHER action. Unless the same action offers both direct value (like today) OR variable. I don't know what you see as reasonable. Or do I want too much?

Edited by virgo47

✈️ L-39, F-4E, F-5E, F-14, F/A-18C, MiG-15, F-86F, AJS-37, C-101, FC2024 🛩️ Yak-52, P-47, Spitfire, CE2 🚁 UH-1H, Mi-8, Ka-50 III, SA342 🗺️ NTTR, PG, SY, Chnl, Norm2, Kola, DE 📦 Supercarrier, NS430, WWII, CA 🕹️ VKB STECS+Gladiator/Kosmosima+TPR ▶️ DCS Unscripted YouTube 🐛 "Favourite" bugs: 1) Object local camera fast/slow inverted, 2) Yak-52 toggles not toggling, 3) all Caucasus ATC bugs

Posted

For my part, I have a problem of communication with Mods

If I use keybinds, it works correctly from tablet to PC => DCS
I tried the HUEY page available in the user files, I have no communication with the UH-1H module...
On this page there is an OFFLINE light which I believe should have the text turn white when connecting to the module,
it is constantly grayed out, although the tablet is recognized as connected to TouchPortal...

How do I test to see if the problem is with DCS-BIOS or TouchPortal?
The UH-1H module is activated in DIOS.lua and selected in the choice of DCS-COINS modules, the plugin loads without error in TouchPortal.

Thanks for the help
 

Posted
1 hour ago, Tanuki44 said:

I tried the HUEY page available in the user files, I have no communication with the UH-1H module...

How do I test to see if the problem is with DCS-BIOS or TouchPortal?

I'm not using the existing Huey page, but doing my own for the fun of it. Huey/DCS works fine and communicates with the buttons - or at least with those few from the overhead console I managed to configure.

I had quite a problem with DCS-BIOS for a while though, it reported the common values, but none others, I tried to reinstall it repeatedly, in the end, I even removed/renamed the Export.lua, just to make it work, because otherwise the DCS-BIOS installation didn't add the line there. But in the end, it should work.

I tested it by running cmd, went to Munt.G_DCS-COINS directory and ran: DCS-COINS.exe -v

When it didn't work properly, I could see an action on Touch Portal button press, but no activity in DCS. Also, there was no activity when I did something in DCS. Not only for UH-1H module, but for any other module that worked for me before. After persuading DCS-BIOS to work, I could see both-way communication clearly and everything worked fine.

✈️ L-39, F-4E, F-5E, F-14, F/A-18C, MiG-15, F-86F, AJS-37, C-101, FC2024 🛩️ Yak-52, P-47, Spitfire, CE2 🚁 UH-1H, Mi-8, Ka-50 III, SA342 🗺️ NTTR, PG, SY, Chnl, Norm2, Kola, DE 📦 Supercarrier, NS430, WWII, CA 🕹️ VKB STECS+Gladiator/Kosmosima+TPR ▶️ DCS Unscripted YouTube 🐛 "Favourite" bugs: 1) Object local camera fast/slow inverted, 2) Yak-52 toggles not toggling, 3) all Caucasus ATC bugs

Posted

I got help from WarLord from DCS FlightPanels.


This made it possible to find the problem in the lua file, currently DCS-BIOS seems (I have to complete the file) to be functional in bidirectional mode.

It will be necessary to regenerate the *.pp file, for the moment I will modify the current test file manually

  • Like 1
Posted
17 hours ago, Tanuki44 said:

Is there a small converter to automatically transcribe the lua file to *.pp?
This would avoid disturbing you with each modification

 

I will PM you.

Posted
On 9/13/2023 at 3:16 AM, virgo47 said:

Talking about possible flexibility improvements...

I'd like to drive everything with variables.

Are you asking for the plugin action "AC Voltmeter Source" to accept value from a TP variable?

Posted
24 minutes ago, xoomigo said:

Are you asking for the plugin action "AC Voltmeter Source" to accept value from a TP variable?

Yes, something like that - to avoid 5-way IF/ELSE nested block. I have Number TP variables backing most of my buttons anyway. This way I could write "increment" and then set that incremented value to AC Voltmeter Source, instead of doing it in IF/ELSE block-fest.

Of course, this would be practical for any more than 2-state button, but 3 is still manageable as well (I've done many of those)... around 4 it starts to be more annoying.

But I'd understand if this was the least important thing in DCS-COINS for you, of course. I like it as it is, I like the sliders added previously, it's cool that we at least CAN do this.

✈️ L-39, F-4E, F-5E, F-14, F/A-18C, MiG-15, F-86F, AJS-37, C-101, FC2024 🛩️ Yak-52, P-47, Spitfire, CE2 🚁 UH-1H, Mi-8, Ka-50 III, SA342 🗺️ NTTR, PG, SY, Chnl, Norm2, Kola, DE 📦 Supercarrier, NS430, WWII, CA 🕹️ VKB STECS+Gladiator/Kosmosima+TPR ▶️ DCS Unscripted YouTube 🐛 "Favourite" bugs: 1) Object local camera fast/slow inverted, 2) Yak-52 toggles not toggling, 3) all Caucasus ATC bugs

Posted
7 minutes ago, virgo47 said:

Yes, something like that - to avoid 5-way IF/ELSE nested block. I have Number TP variables backing most of my buttons anyway. This way I could write "increment" and then set that incremented value to AC Voltmeter Source, instead of doing it in IF/ELSE block-fest.

Of course, this would be practical for any more than 2-state button, but 3 is still manageable as well (I've done many of those)... around 4 it starts to be more annoying.

But I'd understand if this was the least important thing in DCS-COINS for you, of course. I like it as it is, I like the sliders added previously, it's cool that we at least CAN do this.

Yes, I had also thought of the feature earlier - but I don't think it can be done within the plugin itself.

It will require TP to provide a way to pass a variable to the plugin action. Currently, the plugin can only accept a fixed value from a predefined list.

Posted
1 hour ago, xoomigo said:

Yes, I had also thought of the feature earlier - but I don't think it can be done within the plugin itself.

It will require TP to provide a way to pass a variable to the plugin action. Currently, the plugin can only accept a fixed value from a predefined list.

Ah, I see that. I didn't know where the limitation was. Never mind then. Thank you for the explanation.

✈️ L-39, F-4E, F-5E, F-14, F/A-18C, MiG-15, F-86F, AJS-37, C-101, FC2024 🛩️ Yak-52, P-47, Spitfire, CE2 🚁 UH-1H, Mi-8, Ka-50 III, SA342 🗺️ NTTR, PG, SY, Chnl, Norm2, Kola, DE 📦 Supercarrier, NS430, WWII, CA 🕹️ VKB STECS+Gladiator/Kosmosima+TPR ▶️ DCS Unscripted YouTube 🐛 "Favourite" bugs: 1) Object local camera fast/slow inverted, 2) Yak-52 toggles not toggling, 3) all Caucasus ATC bugs

Posted

Hi @xoomigo , another question popped up during my stab at UH-1H panel. I'm adding volume mapping for radios and I've got a couple of problems. I know you're generating PP files somehow and the problems are probably on the DCS-BIOS side (if not DCS itself), but PP file is the place where I can fix it:

  • Many names are quite terrible, short, non-specific. E.g. "Power" is actually VHF COMM Power, but that's difficult to guess. And there are two "Volume"s and two more "Volume Control (step...)" for various volume knobs. It seems that the PP order is preserved, so eventually I can map it all somehow.
  • But adding insult to the injury 🙂 the volumes for the radio are INVERTED! Max is 0 and vice versa. Can I somehow redefine the =ctrl(...) expression to invert it? I can be creative with inverted colors and have slider going from top to bottom, but that sucks.
  • There are also minor offences like Dome light saying that 0 is WHITE when in fact it's GREEN. But this is no problem at all, I can just add a comment to the button and march on. Compared to inverted sliders this doesn't bother me at all.

But it all brings the question. Do you regenerate those PP files every time, or do you manage them separately and only merge in changes from DCS-BIOS? Would it be possible to fix it on your end or should I manage my own patches for PP files - for times of DCS-COINS upgrade.

✈️ L-39, F-4E, F-5E, F-14, F/A-18C, MiG-15, F-86F, AJS-37, C-101, FC2024 🛩️ Yak-52, P-47, Spitfire, CE2 🚁 UH-1H, Mi-8, Ka-50 III, SA342 🗺️ NTTR, PG, SY, Chnl, Norm2, Kola, DE 📦 Supercarrier, NS430, WWII, CA 🕹️ VKB STECS+Gladiator/Kosmosima+TPR ▶️ DCS Unscripted YouTube 🐛 "Favourite" bugs: 1) Object local camera fast/slow inverted, 2) Yak-52 toggles not toggling, 3) all Caucasus ATC bugs

Posted

Each time the lua file for DCS-BIOs is modified, the equivalent *.json file is updated when starting a mission using the mod.
I noticed that it was necessary to generate the *.pp file again and do a setup for the plugin again too.

Posted

If I take the example of the HUEY page, there is an 'OFFLINE' / 'ONLINE' caution light.
It deactivates when the unit is destroyed, but remains activated when leaving the mission,
Is there a solution for this?

Posted
25 minutes ago, Tanuki44 said:

If I take the example of the HUEY page, there is an 'OFFLINE' / 'ONLINE' caution light.
It deactivates when the unit is destroyed, but remains activated when leaving the mission,
Is there a solution for this?

I don't think there is, it seems that the previous plane goes offline when you actually start another plane (change slot and click Fly). That's how the events are delivered.

✈️ L-39, F-4E, F-5E, F-14, F/A-18C, MiG-15, F-86F, AJS-37, C-101, FC2024 🛩️ Yak-52, P-47, Spitfire, CE2 🚁 UH-1H, Mi-8, Ka-50 III, SA342 🗺️ NTTR, PG, SY, Chnl, Norm2, Kola, DE 📦 Supercarrier, NS430, WWII, CA 🕹️ VKB STECS+Gladiator/Kosmosima+TPR ▶️ DCS Unscripted YouTube 🐛 "Favourite" bugs: 1) Object local camera fast/slow inverted, 2) Yak-52 toggles not toggling, 3) all Caucasus ATC bugs

Posted
13 hours ago, virgo47 said:
  • Many names are quite terrible, short, non-specific. E.g. "Power" is actually VHF COMM Power, but that's difficult to guess. And there are two "Volume"s and two more "Volume Control (step...)" for various volume knobs. It seems that the PP order is preserved, so eventually I can map it all somehow.
  • But adding insult to the injury 🙂 the volumes for the radio are INVERTED! Max is 0 and vice versa. Can I somehow redefine the =ctrl(...) expression to invert it? I can be creative with inverted colors and have slider going from top to bottom, but that sucks.
  • There are also minor offences like Dome light saying that 0 is WHITE when in fact it's GREEN. But this is no problem at all, I can just add a comment to the button and march on. Compared to inverted sliders this doesn't bother me at all.

But it all brings the question. Do you regenerate those PP files every time, or do you manage them separately and only merge in changes from DCS-BIOS? Would it be possible to fix it on your end or should I manage my own patches for PP files - for times of DCS-COINS upgrade.

Yup. DCS-BIOS was maintained by various volunteer individuals over a few years and unfortunately as you have discovered, there's a lack of coordination/emphasis on naming convention/format to use. You may have noticed in my changelog, the mention of "user-friendly TP value refinements" - where I tried to fix some of these parameters via a "translator mapper", essentially a table (DCS-BIOS -> DCS-COINS PP -> TP and vice-versa) to translate to more human-friendly terms, the description and control options.

I can include your work into the mapper so that you don't need to manually change them each time you update the PP files and others can also enjoy the fruits your labor and time. 🙂 Actually on that point, I can add you as a contributor once I create my GitHub account and upload the code there, and you can edit it directly. (Sigh..., so many things I want to do and yet so little time available... ☹️)

As Tanuki44 had said, the PP files need to be generated and plugin reinstalled to refresh the upload package for TP, every time the DCS-BIOS Lua/JSON files are updated. Currently, there's a prequisite that the PP files must be compatible with the DCS-BIOS version used.

A future enhancement in mind is not to have the PP files pre-generated and packed together with the DCS-COINS plugin, and instead have them generated on-the-fly during the DCS-COINS Setup using the existing DCS-BIOS installation (if not installed via DCS-COINS package) in the DCS Scripts folder. This will avoid incompatibilities/mismatches between PP and DCS-BIOS JSON files if the latter are from a different version.

Cheers.

 

  • Like 1
Posted
12 hours ago, Tanuki44 said:

If I take the example of the HUEY page, there is an 'OFFLINE' / 'ONLINE' caution light.
It deactivates when the unit is destroyed, but remains activated when leaving the mission,
Is there a solution for this?

Not sure whether this will help but there's "Common Data" Action "Reset Aircraft States" option to reinitialize aircraft to intial default values. Essentially, the defaults are for aircraft parked on the ground, ready for a cold start.

I have the action in a TP button which I will trigger prior to restarting a mission immediately (or starting a new mission) using the same aircraft.

 

Posted
2 hours ago, xoomigo said:

I can include your work into the mapper so that you don't need to manually change them each time you update the PP files and others can also enjoy the fruits your labor and time. 🙂 Actually on that point, I can add you as a contributor once I create my GitHub account and upload the code there, and you can edit it directly. (Sigh..., so many things I want to do and yet so little time available... ☹️)

I'll gladly contribute this kind of changes when the time comes. 😉

I know that after PP change I have to regenerate the plugin, that's not the problem. (I do this after upgrades as I enable EU speed in common data. No problem.)

How about those inverted sliders? Is there some kind of way to do something like (65535-<valueFromBios>)*-1 in the PP file for that =ctrl(...)?

✈️ L-39, F-4E, F-5E, F-14, F/A-18C, MiG-15, F-86F, AJS-37, C-101, FC2024 🛩️ Yak-52, P-47, Spitfire, CE2 🚁 UH-1H, Mi-8, Ka-50 III, SA342 🗺️ NTTR, PG, SY, Chnl, Norm2, Kola, DE 📦 Supercarrier, NS430, WWII, CA 🕹️ VKB STECS+Gladiator/Kosmosima+TPR ▶️ DCS Unscripted YouTube 🐛 "Favourite" bugs: 1) Object local camera fast/slow inverted, 2) Yak-52 toggles not toggling, 3) all Caucasus ATC bugs

Posted (edited)

No problem to help according to my knowledge (I am new to the DCS-BIOS, DCS-COINS and TouchPortal environment)
Since I need to create the DCS-BIOS file for my *.lua mod, my main difficulty at the moment is choosing
the right type of switch or button for the commands to make sure I can use it in TouchPortal.
I also need to understand how to synchronize the lights, buttons during a hot start

Edited by Tanuki44
  • Recently Browsing   0 members

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