Jump to content

Trigger on fuel


Recommended Posts

Hallo,

 

I own the DCS A10 since some months now, however I am new to this forum.

Since some time I am working at a mission. I try to use some triggers to make it dynamic. Up to now they worked very good however now I come to my question. I wanted to trigger that if the amount of fuel in tanks drops below 1,500 lbs something should happen. I found out that I could use the digital fuel readout and that the first, second and third digits number (90,91,92) to do that. I tried to trigger it with the 'argumen parameter value' (or something similar to that name) however it didn't work as I thought.

It would be kind, if somebody could explain me what I have to set in the 'condition-part' of the trigger to make it work.

 

Best regards,

 

Jonathan

Check out my YouTube: xxJohnxx

 

Intel i7 6800k watercooled | ASUS Rampage V Edition 10 | 32 GB RAM | Asus GTX1080 watercooled

Link to comment
Share on other sites

This might get a little complicated, so bear with me.

 

Firstly, let's take a look at the Fuel Counter in the cockpit. It consists of five digits, such as: "05500". If you open the file mainpanel_init.lua in the folder \...\Scripts\Aicrafts\A-10C\Cockpit, starting on line 808 you will see how the animation of this readout is defined in the config files.

 

You have three arguments - 90 controls the first digit (tens of thousands), 91 controls the second digit (thousands), and 92 controls the third digit (hundreds). The last two digits are not animated and always show "00".

 

All cockpit animations are played on a scale of 0-1. So you have to convert the actual readout of the display into a decimal format. In this case, the actual readout is from 0 to 10. So, if you want the trigger to work when the first digit reads 5, you have to divide 5 by 10. Using this value (0.5), you can enter the Min and Max values into the trigger condition (such as "0.48" and "0.52"). In this case, when the animation reaches the set range (indicator in the cockpit showing '5'), the trigger will be activated.

 

An example. To make the trigger work when the fuel readout reaches 05500 lbs, do the following:

 

Once

->

Cockpit Argument in Range (90), (0), (0)

Cockpit Argument in Range (91), (0.49), (0.51)

Cockpit Argument in Range (92), (0.49), (0.51)

->

Message to all (or whatever)

  • Like 3

- EB

[sIGPIC][/sIGPIC]

Nothing is easy. Everything takes much longer.

The Parable of Jane's A-10

Forum Rules

Link to comment
Share on other sites

EB, you couldn't tell me what file I need for basing a trigger on the VHF FM frequency could you?

The same - mainpanel_init.lua. Check line 979.

 

You generally only need two files to read everything non-digitial in the cockpit. Clickable elements (switches, buttons, knobs) are defined in clickabledata.lua. Non-clickable, non-digital elements (all needle instruments, analog counters, caution/warning lights, flight controls) are in mainpanel_init.lua. Reading digitial output on the displays requires the game console, which is considered a debugging tool and is disabled in the release versions. However, if there is a particular digitial element you want to use as a condition in a trigger (like the status of the TGP for example, or target range, etc.), you can ask here and I can try to help on a case by case basis.

 

If you haven't seen it, we have released a short guide to using cockpit triggers:

http://forums.eagle.ru/showthread.php?t=81376


Edited by EvilBivol-1

- EB

[sIGPIC][/sIGPIC]

Nothing is easy. Everything takes much longer.

The Parable of Jane's A-10

Forum Rules

Link to comment
Share on other sites

  • 1 year later...
However, if there is a particular digitial element you want to use as a condition in a trigger (like the status of the TGP for example, or target range, etc.), you can ask here and I can try to help on a case by case basis.

 

Hey Evil,

 

I know IFF isn't implemented in game as in real life and to be honest, having dealt with crypto and loading codes, it's a PITA I'm happy to be rid of... However, I did have a thought...

 

Is the position of the number wheels on the IFF panel "read" or "seen" or whatever the correct term is in the files you listed above? Even though IFF isn't actually implemented, can you use an IFF code as a trigger?

 

I hope what I'm asking makes sense. Thanks for the help

Sierra..

[sIGPIC][/sIGPIC]

Primary Computer

ASUS Z390-P, i7-9700K CPU @ 5.0Ghz, 32GB Patriot Viper Steel DDR4 @ 3200Mhz, ZOTAC GeForce 1070 Ti AMP Extreme, Samsung 970 EVO M.2 NVMe drives (1Tb & 500 Gb), Windows 10 Professional, Thrustmaster Warthog HOTAS, Thrustmaster Warthog Stick, Thrustmaster Cougar Throttle, Cougar MFDs x3, Saitek Combat Rudder Pedals and TrackIR 5.

 

-={TAC}=-DCS Server

Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 970.

Link to comment
Share on other sites

However, if there is a particular digitial element you want to use as a condition in a trigger (like the status of the TGP for example, or target range, etc.), you can ask here and I can try to help on a case by case basis.

 

If you haven't seen it, we have released a short guide to using cockpit triggers:

http://forums.eagle.ru/showthread.php?t=81376

 

Hmm, TGP heading and range sound pretty much like a first step into the direction of recon missions or trigger actions when you look at the correct place. I did start a thread already, but nobody answered...

:cry:

 

http://forums.eagle.ru/showthread.php?t=99146

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

Hey Evil,

 

I know IFF isn't implemented in game as in real life and to be honest, having dealt with crypto and loading codes, it's a PITA I'm happy to be rid of... However, I did have a thought...

 

Is the position of the number wheels on the IFF panel "read" or "seen" or whatever the correct term is in the files you listed above? Even though IFF isn't actually implemented, can you use an IFF code as a trigger?

 

I hope what I'm asking makes sense. Thanks for the help

Sierra..

 

The switches of the IFF panel are defined in clickabledata.lua starting on line 687. So yes, you can check the position of these switches using the cockpit argument trigger.

 

Hmm, TGP heading and range sound pretty much like a first step into the direction of recon missions or trigger actions when you look at the correct place. I did start a thread already, but nobody answered...
There is no specific TGP heading and range indication in the cockpit, so I don't think there is any way to check them in the triggers.

- EB

[sIGPIC][/sIGPIC]

Nothing is easy. Everything takes much longer.

The Parable of Jane's A-10

Forum Rules

Link to comment
Share on other sites

There is no specific TGP heading and range indication in the cockpit, so I don't think there is any way to check them in the triggers.

Yes, not in the pit, but everything we need is on the TGP screen: The coordinates (don't care if LL, MGRS or both), the compass rose (indicating direction the TGP is looking at), the range and elevation (from DTS or if lased). If we could get at least the coordinates exported as an argument you could check with the cockpit triggers, that would be cool.

The possibility to check these against a moving zone would be awesome!!!

 

Why is this so important for me? I dream of building up the stress and tension the pilot is under when acting under ROEs that require more than just finding a target and destroying it. After reading a lot on the A-10s in Kosovo "Allied Force" campaign, and especially the Afghanistan tours, I find that this "having a mortar tube in sight, asking and waiting for clearance" builds up a vey high tension!

I know with the JTAC implemented there must be already a possibility to check what is your SPI ("That is NOT your target!"):D

 

What I desperately seek is, to use something like it in the ME. Even an addition to the script engine would be fine, since MIST could make this happen.

 

Other scenarios would be a reconnaissance mission prior to a strike or secondary goals that may influence a campaign. E.g. pilot "saw" an insurgent camp on his way back, but has no proper ordnance left. Generate a new task with the radio menu "Identified enemy camp site at NMXXXYYY" - after refueling other tasks or generated missions are put on hold as long as the pilot prosecutes the camp.

If he misses the camp go ahead with mission...

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

We can check for most of the alphanumeric indications on the MFCDs as well, including the TGP point coordinates, range, and elevation. The problem is that it has to be exact, you can't use a band of values. So if you put in a certain coordinate into the trigger, but the player is even one digit off on the MFCD, the trigger won't catch.


Edited by EvilBivol-1

- EB

[sIGPIC][/sIGPIC]

Nothing is easy. Everything takes much longer.

The Parable of Jane's A-10

Forum Rules

Link to comment
Share on other sites

Damn! That means only LOTS of triggers, or hmm, wait... LUA can do loops and x>y or x<y stuff, right? Maybe a bit String optimization ($LEFT or $RIGHT) stuff?

So we may put together the range with a little script? (GRIMES!!! Where are you?)

 

Ok, so let's think about it:

 

  • As long as the players plane is inside a Zone and TGP is active we call a script that calls MGRS or LL coordinates
  • we truncate the LL coordinates to match the range min and max for a 100 meter precision
  • then we check if the truncated coordinates are inside that range (Value >= minCoordinates AND Value <=maxCoordinates)
  • pop goes a trigger and we can act in the ME

The only thing we need to try this is the knowledge how to get the LL-coordinates into the script, please! :notworthy:

 

EDIT: and just to mention, I did search Olgerds documents thoroughly and searched the forum, but no luck. The parameters for the TGP page seem to be a well hidden secret...:music_whistling:


Edited by shagrat

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

Scripts don't really interact with the cockpit arguments at all and I'm not even sure if the coordinates a laser is point at is available in export.lua or anything like that. It might be something nice to have for this type of thing, "player laser on point", especially because it is quite difficult to script it any sort of "does the player see x" behavior. While it might not be optimal, you can fairly easily use smoke rockets to mark known targets or use something like slmod commands and create a script that has the player type in coordinates they have spotted a target at, and then cross reference that location with a further script. I remember Speed talking about a mission where the player is a AFAC and marks targets with smoke and he assigns AI flights new missions to take out targets in that area.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

if I understood EvilBivol correct, the coordinates are already there, we just need a way to interact, by means of triggers or possibly a script. The coordinates the laser / Camera/FLIR is looking at, are shown on the TGP page, so inside the sim it is already there and is transfered to the MFCD-TGP page.

If these values can be sent to the export.lua or as a condition for the trigger system, that would help.

 

It won't help using rockets. One of the intriguing options of this, would be to let a mortar start firing, when the TGP at least looks roughly into the right spot.

Or as I said reconnaissance, check the player really had the artillery spotted, rather than "inside zone" AND "altitude Below" conditions.

I'm building a mission where an insurgent camp is randomly placed in a different position than in the briefing, to imitate outdated Intel. With the TGP you see from 20 miles out the camp is deserted, so I would like to trigger the next actions only if, the camp is visually checked.

As said before quite a useful thing to know where the TGP is pointing :D

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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