Jump to content

Alerax's LSO AI Script


Recommended Posts

kyZtyKk.png

 

--- PREFACE ------------------------------------------------------------------------

 

Hi All-

 

First off, I really appreciate everyone’s positive responses and feedbacks on the first release of the Alerax LSO AI Script (from here on shall be referenced as “LSO Script”). Especially would like to give my special thanks to randomtroubledmind, GYRO_N5EG, VFMA-42 HighwaymanEd, and the VFMA-42 SabreTooths squadron for your inputs, suggestions, and tirelessly pushing the LSO Script to its limits. The LSO Script was originally created so that my friends and I can enjoy the Hornet together during our weekly flights. As you can imagine, it was rather disruptive to have one us do LSO calls and not get the satisfaction (and challenge) of landing on the CV after a long successful mission.

 

That being said, the reason I decided to release the LSO Script to the public was very much to give the community and its members the same fun and enjoyment my friends and I have had in the past months. I purposely wrote the LSO Script to be a standalone, plug-and-play “module” that can be used with any mission (as far as I’m aware of) in both single-player and multi-player environment. What this means is that the LSO Script is itself self-contained, does not use any flags, triggers, or variables that will cause conflict with your existing mission designs.

 

Now, for some of you who are aware of and concern about the way the LSO Script was written, I have to ask for your patience. This is my first time releasing any script/code for the public, and programming is far from what I do professionally. I’m actively learning about open source licenses to understand the best path forward, but I can assure you that I will release the full LSO Script when I am no longer actively supporting it. Until then, I appreciate your understanding and suggest you check out the features and the value this LSO Script offers to the community.

 

Now that this is out the way- let’s jump into the exciting part!

 

Regards-

Alerax

 

 

 

--- FULL FEATURE LIST ( 04.07.2019 ) ------------------------------------------------------------------------

 

GENERAL

- Carrier Communication Information, with radio frequencies, TACAN, ILS, and CV airspace information

- Weather Status Report, with CV BRC, CV final bearing, CV velocity, and wind conditions

- Over 90 unique sound files

- Export grades to Saved Games folder

- Export flight track for review to Saved Games folder (ADDED v.2.5)

- Support for F/A-18C and F-14B

 

CASE I

- Request for Marshal, Enter Pattern, or Straight-in Approach

- Ability to request Marshal as a Single Flight or as a Section (up to 2 flights)

- Marshal stack logic with Angels designation and Charlie call to enter pattern

- Separate frequencies (one for Marshal and one for LSO) to simulate communication protocols

 

CASE II/III

- Since ED is “close” to releasing an official carrier mod, I’ll pause on this to not duplicate work.

 

LSO CALL EVALUATION

- Distance abeam to the CV

- Interval distance between each aircraft

- Handles for spin/holding pattern

- Long the groove calls

- Line up and altitude calls, with different levels of intensity for corrections

- On-speed and glide slope calls (ADDED v.2.5)

- Bolter and wave-off calls

- Wire trap and overall groove flying performance assessment

- Comprehensive grading report using common LSO shorthand notations

 

 

 

--- INSTALLATION ------------------------------------------------------------------------

 

I have simplified the installation significantly. There are largely two parts to the installation, the script and sound files.

 

Firstly, here are the steps to install the script file into your mission.

 

1 )
Open your mission or create a new one in the Mission Editor.

2 )
Go to the Trigger panel.

3 )
On the first column, select new Trigger (rename this to whatever you like), and change condition to “MISSION START”.

4 )
On the third column, select new Action “Do Script File”. Select open and locate the "Alerax_LSO_Script_Release_v2.5.lua" file.

5 )
Rename your CV to “Stennis_AI” (case sensitive)

6 )
Save the mission.

 

Secondly, the sound file installation no longer requires you to install each sound file one by one. However, you’ll need a “.zip” file program for this to work. Also, make sure that you close out of the Mission Editor before you do this step, else DCS Mission Editor may overwrite your mission file.

 

1 )
Locate and select your mission (.miz) file.

2 )
Press F2 to rename the mission file and change the “.miz” to “.zip”. This will allow you directly place the sound files into the mission.

3 )
Open the newly converted .zip file and place the "Alerax_LSO_AI_Script" folder into the root directory (same directory as the “l10n” folder).

4 )
Close out of the .zip file.

5 )
Press F2 and rename the mission back from “.zip” to “.miz”.

 

Done!

 

 

 

--- PREPARATION ------------------------------------------------------------------------

 

I recommend you to review the materials available from the following links to get familiar with the procedures and expectations of a Hornet pilot when inbounding to and landing on the CV. The LSO Script uses a lot of the requirements and procedures detailed in these sources.

 

Lex’s CV Ops Basic (VID 1 & VID 2)

 

Naval Air Training Command CV Procedures

 

VFA-113 Stingers’ LSO Training Course

 

NATOPS Landing Signal Office Manual

 

The LSO Script attempts to provide you with as authentic of an experience as possible based on the publicly available information. Feedback for authenticity improvements are welcome.

 

 

 

--- USAGE: CASE I ------------------------------------------------------------------------

 

There are three methods to engage the LSO when in a CASE I recovery condition. I will go through each, from the simplest to the most involved procedure.

 

STRAIGHT-IN APPROACH

 

This is the simplest procedure to engage the LSO, where you are essentially flying straight into the groove and land on the CV. There will be no abeam checks to the CV or Long in the Groove calls. Note that you can only select this approach if there are no other aircraft in BOTH the Pattern or the Marshal Stack.

 

1 )
Tune in to the CV Marshal Frequency. To check the frequency, go to (
F10
) -> Carrier Menu -> (
F1
) Carrier Comm Information. Look for “Marshal Freq”.

2 )
Request for Straight-In Approach: (
F10
) -> Carrier Menu -> Find yourself (
F5-F8
) -> (
F4
) Request Straight-In.

3 )
If you are cleared for the approach, you will hear “[tail number] Signal Charlie Straight-In, Check-in Button [#]”. Then tune into the designated Button (Channel #) to hear the LSO calls.

4 )
If you are not cleared for the approach, you will hear “[tail number] Signal Delta, Request for Marshal”.

 

ENTER PATTERN APPROACH

 

This is the middle of the road procedure to engage the LSO, where you execute the CV overhead break pattern and the 180 turn to enter the groove. Note that you can only select this approach if there are no other aircraft in the Marshal (but may have other aircraft in the Pattern, so be vigilant when entering). The selection process is similar to the Straight-In Approach.

 

1 )
Tune in to the CV Marshal Frequency. To check the frequency, go to (
F10
) -> Carrier Menu -> (
F1
) Carrier Comm Information. Look for “Marshal Freq”.

2 )
Request for Enter Pattern Approach: (
F10
) -> Carrier Menu -> Find yourself (
F5-F8
) -> (
F3
) Request Enter Pattern.

3 )
If you are cleared for the approach, you will hear “[tail number] Signal Charlie Pattern, Check-in Button [#]”. Then tune into the designated Button (Channel #) to hear the LSO calls.

4 )
As you fly over the CV, you will hear “Check-in Clear” which will indicate that you are clear to engage the overhead break.

5 )
If you are not cleared for the approach, you will hear “[tail number] Signal Delta, Request for Marshal”.

 

MARSHAL APPROACH

 

This is the most involved procedure, but also the most satisfying when you complete the full sequence. The procedure requires you to request marshal from the CV, fly within the tolerance of the 5NM Marshal stack at your designated Angel (and change Angel as the stack collapses), exit the 5NM Marshal, and enter the Pattern. This approach can be done either as a Single Flight or as a Section (up to 2 flights).

 

1 )
Tune in to the CV Marshal Frequency. To check the frequency, go to (
F10
) -> Carrier Menu -> (
F1
) Carrier Comm Information. Look for “Marshal Freq”.

2 )
For Single Flight request for Marshal Approach: (
F10
) -> Carrier Menu -> Find yourself (
F5-F8
) -> (
F1
) Request Marshal Single.

3 )
For Sectional request for Marshal Approach: (
F10
) -> Carrier Menu -> Find yourself (
F5-F8
) -> (
F2
) Request Marshal Section. Note that your wingman needs to fly within 200ft from you to be counted as a Section.

4 )
If you are cleared for the approach, you will hear “[tail number #1] [tail number #2] Freedom Marshal, Angels [X]”.

5 )
Fly your designated Angels and hold a steady 5NM Marshal pattern above the CV (see the resources noted above for a description of this pattern).

6 )
If you hear “[tail number #1] [tail number #2] Push to Angels [X]”, it means that the Marshal stack has collapsed, and you (and your flight) have to push down One Angels to get Signal Charlie. Note that the verbal call will only be for flights in Angels Two, however, all flights must collapse to the appropriate Angel when this call is heard.

7 )
Signal Charlie will be called for you (and your flight) when you (the lead only) are approximately in between Position 2 and 3 to the CV, flying level at Angel Two, and with the correct corresponding heading in the 5 NM Marshal Stack turn. If you are cleared to enter the pattern, you will hear “[tail number #1] [tail number #2] Signal Charlie Pattern, Check-in Button [#]”. Then tune into the designated Button (Channel #) to hear the LSO calls.

8 )
As you fly over the CV, you will hear “Check-in Clear” which will indicate that you are clear to engage the overhead break.

 

If you or your squadron is interested in going through the procedure, please send me a private message and I’m happy to walk you through in Multi-player.

 

 

 

--- LSO CALLS AND GRADES ------------------------------------------------------------------------

 

DESCRIPTION

 

As released in the last version, the LSO calls will give you feedback based on two axes (altitude and line up). The LSO Script attempts to mimic human behaviors in both the level of intensity (corresponding to the amount of correction needed), the timing of the calls, and drift corrections.

 

In addition, the LSO Script provides you with a comprehensive grading report of all your passes and summarizes your performance using the common shorthand LSO notation below

 

Overall Grade:

_OK_ = OK Underline, OK = OK Pass, (OK) = Fair Pass, -- = No Grade, C = Cut Pass

B = Bolter, TCA = Too Close Abeam, TWA = Too Wide Abeam, INT = Incorrect Interval, WO = Wave-Off, WOP = Wave-Off Pattern, OWO = Own Wave-Off

 

Positions:

X = At Start, IM = In the Middle, IC = In Close, AR = At the Ramp

 

Aircraft Flight:

LUL = Line up Left, DL = Drifted Left, LUR = Line up Right, DR = Drifted Right

H = High, LO = Low, / = Fly through Glideslope (up), \ = Fly through Glidesope (down)

 

Aircraft Speed:

F = Fast, S = Slow

 

Others:

NC = Nice Correction, () = Slightly off-course

 

For Example:

(OK) 4 (LUL)X (LO)IM LODRIC NCAR

Means fair pass, 4 wire, slightly lined up left at the start, slightly low in the middle, low and drifted right in close, nice correction at the ramp.

 

 

 

FLIGHT PATH REVIEW (ADDED v2.5)

 

The LSO Script exports your flight track starting between the 90° and 3/4 mile ball call to a “.csv” file for plotting with Excel (see below on how to enable this). The track file exports both your aircraft line up and altitude with references to the error margins. Note that each individual unique aircraft flight track will be exported to the same file. Steps to automatically plot your landing flight path.

 

1 )
Unzip and place the “_Track Graph.xlsm” file into your “YOURNAME/Saved Games/DCS(.openbeta)/Mods/Alerax_LSO_AI” folder.

2 )
Open the “_Track Graph.xlsm”.

3 )
Press the “Run Plotting Macro”. You may need to enable content to allow the macro to run.

4 )
Once the Message Box shows “----COMPLETE----“, all your track files are plotted.

5 )
Open the track file in your “YOURNAME/Saved Games/DCS(.openbeta)/Mods/Alerax_LSO_AI” folder and enjoy!

 

 

 

GRADING EXPORT - For Server/Single-Player Only

 

The LSO Script has an ability to export your grade as a “.doc” file to you DCS Saved Games folder (specifically “YOURNAME/Saved Games/DCS(.openbeta)/Mods/Alerax_LSO_AI”). To enable this feature, there are several things you need to do.

 

1 )
For people who use JSGME, put the attached folder into your “_Mods” folder and enable it. Done.

2 )
For all others, go to “DCS INSTALLATION FOLDER/Scripts”

3 )
Open the filename “MissionScripting.lua” using Notepad++

4 )
Comment out the following two lines by placing “—“ in front of the line

• “sanitizeModule('io')” --> “--sanitizeModule('io')”

• “sanitizeModule('lfs')” --> “--sanitizeModule('lfs')”

 

[/////WARNING/////]

I would like to be completely transparent with this feature. The reason these steps are needed is because DCS prevents “.lua” script from reading/writing files for security reason. By commenting these two lines, you are effectively allowing this LSO Script (and any other script that you may knowingly or not knowingly run) to read/write files to your computer. As such, you are enabling a program to read/write your files at your own risk, and YOU are responsible for any issues, loss, or damages that may occur.

[/////WARNING/////]

 

CLARIFICATION: You DO NOT need to enable Grade Export capabilities for the LSO Script to provide its basic functions. This step is only if you WANT to and CHOOSE to have your grades exported to a file.

 

 

--- CLOSING ------------------------------------------------------------------------

 

Once again, I would like to reiterate my humble appreciation to the community for your positive responses and feedback with this LSO Script. This LSO Script is an accumulation of a lot of hours in the past months conceptualizing, researching, executing, testing, and reworking to get to where we are today. If you feel that this is a valuable addition to your flight simulation experience, I would encourage you to continue supporting the development of this LSO Script though constructive feedbacks and/or donation to the page the below. It really means a lot to me seeing how much this LSO Script adds value to the community.

 

Donate Link (PayPal)

 

I will continue to fix bugs and tweak the LSO Script as feedbacks roll in. One goal of mine is to build the Case II/III recovery in the same level of detail and complexity as you experience with the Case I. Stay tuned for the next major update!

 

Sincerely,

Alerax

 

 

 

--- FAQ ------------------------------------------------------------------------

 

Q: I can't see any menu items for this script?

A: This script only works for F/A-18C Hornet flying within the Carrier Airspace (40NM from Carrier). Support for other aircraft are being considered.

 

Q: I don’t hear any Marshal or LSO calls?

A: Make sure you are tuned into the correct corresponding frequencies (To check the frequency, go to (F10) -> Carrier Menu -> (F1) Carrier Comm Information. Look for “Marshal Freq” or “LSO Freq”). If you are using Easy Communication, you will not be able to hear the Marshal calls (due to limitations of DCS), but you can still hear the LSO calls if you call into the Stennis using the normal [ATC Selection] inbound call to “tune” your Hornet to the correct frequency.

 

Q: I get “Wait for current radio transmission to complete” after select call, what does this mean?

A: It means that you have to wait for current radio transmission to complete. To prevent overlapping calls, I had to add this requirement in so that there are no interruptions with the communications.

 

Q: Vaicom won't allow me to check in with Marshal?

A: Due to the way the script creates the menus dynamically for the flights, this is not currently working but we're working on it for a future update.

 

Q: I would like to integrate this LSO Script to my missions, and I’m concerned it will cause conflicts with [insert concerns]. Will it cause any issue?

A: As far as I’m aware, this script will not cause any conflict since I wrote it to be self-contained and not reliant on other inputs. If you do find issues, please let me know and I’m happy to address them.

 

Q: Can I use a Carrier name other than "Stennis_AI"?

A: Yes, just change the name on Line 37 in the script to whatever name you use in the Mission Editor and it will work.

 

Q: What is the default Marshal/Airboss Frequency and can you change this? How? (-Painter-)

A: The default Marshal/Airboss frequency is 305.000Mhz (default button 1 for the Hornet). Yes, this can be changed by editing Line 38 to whatever frequency you want. For example, 305000000 = 305.000 Mhz, 254000000 = 254.000 Mhz. The number is in hertz so just do the math to get it into the Mhz format.

 

Q: Will this script work with any (or dynamic) Carrier heading? (FSKRipper)

A: Yes, this script will work with any Carrier heading you set in the Mission Editor. It also has the ability to handle dynamic Carrier heading changes as well.

 

Q: Can I use this LSO Script in my Multi-player server?

A: Yes the script was written for both the single-player and multi-player environments. However, if you do use this I ask that you credit me and people involved appropriately and that you are not using this LSO Script for commercial purposes. Also, thanks to the VMFA-42 SabreTooths squadron, we have tested this script in the multi-player environment and confirmed that it is stable.

 

Q: Can I use this LSO Script in my mission/campaign/module/add-ons that I’m selling to others?

A: No.

 

Q: Can I use this LSO Script in my mission/campaign/module/add-ons that I’m releasing for free to the community?

A: Yes (and you are an awesome person, thanks for adding value to the community).

 

Q: How should mission designers credit you and your support team? (NeilWillis)

A: I'd suggest keeping the header in the script and something simple like "Credit: LSO AI Script, Author: Alerax" is plenty enough.

 

 

.

Alerax_LSO_AI_Script.rar

01 - Enable Script Export.rar

_Track Graph.rar

Alerax_LSO_Script_Release_v2.5.1.lua

Alerax_LSO_Mission_v2.5.1.miz


Edited by Alerax
Link to post
Share on other sites
  • Replies 274
  • Created
  • Last Reply

Top Posters In This Topic

It's been a pleasure to help you on this journey and we look forward to getting stuck into the CASE III recoveries!

Intel i9-9900KF @5.2GHz

MSI Z390 Gaming Pro Carbon

32GB G.Skill Trident Z DDR3200 RAM

MSI RTX 2080 Ti Gaming X Trio

40" Panasonic TH-40DX600U @ 4K

Pimax Vision 8K Plus / Oculus Rift CV1 / HTC Vive

Gametrix JetSeat with SimShaker

Windows 10 64 Bit Home Edition

 

[sIGPIC][/sIGPIC]

Link to post
Share on other sites

Alerax I really appreciate what you blokes have done ! I always look forward to using your LSO scripts ! Thanks again!

Regards

 

DL available skins here:

https://www.digitalcombatsimulator.com/en/files/?CREATED_BY=Strut

 

 

Pictures of my Skins here: https://imgur.com/a/bOQyQqW

 

[sIGPIC][/sIGPIC]

Win10 64bit, Intel® Core i7-5820K CPU OC @ 4.50GHz x6, X99A GAMING PRO CARBON, MSI RTX 2080 TI GAMING X TRIO 11Gb, 32GB DDR4 RAM, SSD 960 EVO250GB, SSD 850 EVO 500GB, JetSeat, MFG Crosswind Pedals, VPC Mongoose T-50, TMWH, DSD ButtonBox, Pimax 5k XR/BE

 

 

Link to post
Share on other sites

Brilliant!!! Thanks a lot Alerax!!

 

Nex Sunday my Virtual squadron is starting a long cuise campaing with the Hornet and we will surely use your script!

I really like the addition of exporting the grades. Need to eplore the possibility of creating a Greenie Board with this one.

 

Just one question, would the script work if I rename the carrier to something else than Stennis_AI but I also add that new name to the script lua?

 

Thanks a lot!!!

Link to post
Share on other sites

GRADING EXPORT

 

The LSO Script has an ability to export your grade as a “.doc” file to you DCS Saved Games folder (specifically “YOURNAME/Saved Games/DCS(.openbeta)/Mods/Alerax_LSO_AI”). To enable this feature, there are several things you need to do.

 

1 )
For people who use JSGME, put the attached folder into your “_Mods” folder and enable it. Done.

2 )
For all others, go to “DCS INSTALLATION FOLDER/Scripts”

3 )
Open the filename “MissionScripting.lua” using Notepad++

4 )
Comment out the following two lines by placing “—“ in front of the line

• “sanitizeModule('io')” --> “--sanitizeModule('io')”

• “sanitizeModule('lfs')” --> “--sanitizeModule('lfs')”

 

[/////WARNING/////]

I would like to be completely transparent with this feature. The reason these steps are needed is because DCS prevents “.lua” script from reading/writing files for security reason. By commenting these two lines, you are effectively allowing this LSO Script (and any other script that you may knowingly or not knowingly run) to read/write files to your computer. As such, you are enabling a program to read/write your files at your own risk, and YOU are responsible for any issues, loss, or damages that may occur.

[/////WARNING/////]

 

 

That is asking a lot for code that is obfuscated. Sure its on people to heed your suggestion, but its on you for denying people to be able to verify for themselves the script isn't doing anything not advertised.

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to post
Share on other sites
Brilliant!!! Thanks a lot Alerax!!

 

Nex Sunday my Virtual squadron is starting a long cuise campaing with the Hornet and we will surely use your script!

I really like the addition of exporting the grades. Need to eplore the possibility of creating a Greenie Board with this one.

 

Just one question, would the script work if I rename the carrier to something else than Stennis_AI but I also add that new name to the script lua?

 

Thanks a lot!!!

 

Hi Furia- Hope you and your squadron have fun script in your campaign.

 

Yes, you can use a different Carrier name. Just change the "Stennis_AI" on Line 37 to any name you selected in the Mission Editor and it will work.

 

I'll add this the Q/A.

 

Enjoy!

Alerax

Link to post
Share on other sites
Hi, sorry if this is a stupid question, but would the scrip work with the upcoming Community A-4?

Thanks for the work.

 

Hi canned_fire - unfortunately, the script only works with the F/A-18 Hornet. When other airframes (Tomcat) that can benefit from this script are released I'll make sure to support them.

 

-Alerax

Link to post
Share on other sites
That is asking a lot for code that is obfuscated. Sure its on people to heed your suggestion, but its on you for denying people to be able to verify for themselves the script isn't doing anything not advertised.

 

Grimes- I can see why the code obfuscation may cause you to be concern about the integrity of the LSO Script. I can ensure you that all it does is write down the landing grades to a file (as the community requested). Unfortunately, the only way to do so is to enable DCS to read/write files. That is why I added this Warning Section so that the user can now make an educated choice to either enable it or not.

 

If there is a way to allow data export that doesn't put the user at risk, please let me know, and I'm all ears and will be happy to implement.

 

If not, I believe your concerns and user risks are mutually exclusive discussion topics. Happy to discuss.

 

-Alerax

Link to post
Share on other sites

Hi Alerax,

 

thanks for the new version. I really enjoyed your first script. Only a short question, are course changes by the carrier supported?

i9 9900K @ 5,0GHz | 1080GTX | 32GB RAM | 256GB, 512GB & 1TB Samsung SSDs | TIR5 w/ Track Clip | Virpil T-50 Stick with extension + Warthog Throttle | MFG Crosswind pedals | Gametrix 908 Jetseat

[sIGPIC][/sIGPIC]

Link to post
Share on other sites
Hi Alerax,

 

thanks for the new version. I really enjoyed your first script. Only a short question, are course changes by the carrier supported?

 

Hi FSKRipper-

 

Yes, you can set the Carrier course to anything direction you want and it will work. Also, if the Carrier changes course during the mission, it will work as well.

 

Note that the Carrier direction is output as True Heading, as opposed to Magnetic Heading. Not sure what the real world pilot uses, but if it's Magnetic Heading, I can update that as well.

 

-Alerax

Link to post
Share on other sites

Without going through all your code to rename values so it is readable, I would think your grading is setup in a way that is checking for a players relative position, velocity, AoA, etc with the carrier and where it is supposed to be in the landing. All of that data is available from the export lua environment, which does have native write access to saved games. You'd end up with the mission script to manage the audio files, and grading if you wanted to, then the script in export also do the grading and could keep records of the data. Push comes to shove and people are that desperate to have their score written down you can always add it to the log file via env.info(). Hell could even modify slmod, which does modify missionScripting.lua without touching io/lfs to write player stats.

 

 

I only commented for the simple fact that it is obfuscated code and you are asking to not sanitize lfs and io. On their own, it is more or less ok, something I disagree with which will be in the next paragraph, but overall no harm done. However when used together it presents an opportunity of danger that should not be acceptable. Simply put there are a few mission related mods that ask to modify missionScripting, chief among which is Mbots DCE, its less than ideal, but it is whats needed for that to work. However what Mbot and others haven't done is hide the code that reads/writes files, which is exactly what you have done. I can disagree with the obfuscation and live with it, but add on reading/writing file access on top of it and that is crossing a pretty big damn line.

 

I dislike that the code is obfuscated because it sets a dangerous precedent and it is a direction that the community should not gravitate towards. The mission file and every single mission script lua file that has been released are open source and thus easily viewed and modifiable. The entirety of making missions and scripts is built upon the foundation of freely helping each other out or gaining inspiration by looking at how someone else did some bit of code. Hiding the code in something that is publicly released betrays that ideology. It is one thing to have some private mod that is kept that way or setup to be local only on the servers you personally host, its another to release it for everyone to use and swear up and down that it doesn't do anything nasty while hiding all of the code.

 

To summarize:

Code Obfuscation = I don't like it, but unless ED adopt a KSP style of things where literally every single mod needs to be open sourced and have a license, I can only disagree with your choice and try to persuade you to release the source code.

io/lfs desanitation= an unfortunate reality that is required to do more complex stuff

code obfuscation + io/lfs desanitation= alarm bells a ringing.

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to post
Share on other sites
Without going through all your code to rename values so it is readable, I would think your grading is setup in a way that is checking for a players relative position, velocity, AoA, etc with the carrier and where it is supposed to be in the landing. All of that data is available from the export lua environment, which does have native write access to saved games. You'd end up with the mission script to manage the audio files, and grading if you wanted to, then the script in export also do the grading and could keep records of the data. Push comes to shove and people are that desperate to have their score written down you can always add it to the log file via env.info(). Hell could even modify slmod, which does modify missionScripting.lua without touching io/lfs to write player stats.

 

 

I only commented for the simple fact that it is obfuscated code and you are asking to not sanitize lfs and io. On their own, it is more or less ok, something I disagree with which will be in the next paragraph, but overall no harm done. However when used together it presents an opportunity of danger that should not be acceptable. Simply put there are a few mission related mods that ask to modify missionScripting, chief among which is Mbots DCE, its less than ideal, but it is whats needed for that to work. However what Mbot and others haven't done is hide the code that reads/writes files, which is exactly what you have done. I can disagree with the obfuscation and live with it, but add on reading/writing file access on top of it and that is crossing a pretty big damn line.

 

I dislike that the code is obfuscated because it sets a dangerous precedent and it is a direction that the community should not gravitate towards. The mission file and every single mission script lua file that has been released are open source and thus easily viewed and modifiable. The entirety of making missions and scripts is built upon the foundation of freely helping each other out or gaining inspiration by looking at how someone else did some bit of code. Hiding the code in something that is publicly released betrays that ideology. It is one thing to have some private mod that is kept that way or setup to be local only on the servers you personally host, its another to release it for everyone to use and swear up and down that it doesn't do anything nasty while hiding all of the code.

 

To summarize:

Code Obfuscation = I don't like it, but unless ED adopt a KSP style of things where literally every single mod needs to be open sourced and have a license, I can only disagree with your choice and try to persuade you to release the source code.

io/lfs desanitation= an unfortunate reality that is required to do more complex stuff

code obfuscation + io/lfs desanitation= alarm bells a ringing.

 

Thanks Grimes- I appreciate the explanation. I'm not familiar with using env.info() and the slmod so will have to look into those applications.

 

Again, I'm not asking anyone to desanitize DCS. The Grade Export function is something the community asked for and is not a requirement for the script to run. Users do not need to enable the desanitation (hence being transparent with the warning section) for the script to work.

 

It seems the only issue here is that the approached I took is misaligned with the expectations of the mission scripting community, a subset of the total DCS community. Let's not impede on adding value for the rest of the end-users.

 

My goal is to provide the end-user, who primarily focuses on flying and enjoying DCS, with a missing (and much needed) feature in DCS. It has always been my intentions to keep this a private feature among friends, but since it has gotten much appreciation, I wanted to continue to support and expand its capabilities. I genuinely hope the community understands my positive intentions.

 

-Alerax


Edited by Alerax
Link to post
Share on other sites

@Grimes.

 

I hear you, and I understand your concerns, and to be honest, I agree with them. However, I also backed Alerax to keep his code private whilst it was in active development whilst we at the VMFA-42 we’re testing it.

 

My recommendation was that once we complete the code, he could then open it up if he wished, and I pestered him to allow the export of grades, so I’m responsible for the way he’s set the write permissions.

 

Maybe we should look at removing the mod from public availability until it’s feature complete and he’s happy to open it up.

 

That said, the only thing that is obfuscated in the code are the function names and values and even a Lua hack like me was able to get an idea of what it was doing in between those until my brain hurt from trying to figure out the math. Somebody with your skills should be able to read it no problem.

Intel i9-9900KF @5.2GHz

MSI Z390 Gaming Pro Carbon

32GB G.Skill Trident Z DDR3200 RAM

MSI RTX 2080 Ti Gaming X Trio

40" Panasonic TH-40DX600U @ 4K

Pimax Vision 8K Plus / Oculus Rift CV1 / HTC Vive

Gametrix JetSeat with SimShaker

Windows 10 64 Bit Home Edition

 

[sIGPIC][/sIGPIC]

Link to post
Share on other sites

I dislike that the code is obfuscated because it sets a dangerous precedent and it is a direction that the community should not gravitate towards.

+1! Indeed and what a poor choice by the OP.

A warrior's mission is to foster the success of others.

i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to post
Share on other sites

Alerax, I have tried to implement the export feature but I cannot find the file it is supposed to produce.

I have manually implememted the changes on the lua file as you mentioned, run a mission with the sript made a landing and got the LSO score after landing.

I am running it in the release version. I followed your instructions but I cannot find any doc file created after flying.

Could you please elaborate a bit more what is the name of that file created and where on release version can I find it?

Thanks again!

Link to post
Share on other sites

The export is created in your Saved Games\DCS\Mods folder

 

I don’t think the Mods folder needs to exist in order for this to work...

Intel i9-9900KF @5.2GHz

MSI Z390 Gaming Pro Carbon

32GB G.Skill Trident Z DDR3200 RAM

MSI RTX 2080 Ti Gaming X Trio

40" Panasonic TH-40DX600U @ 4K

Pimax Vision 8K Plus / Oculus Rift CV1 / HTC Vive

Gametrix JetSeat with SimShaker

Windows 10 64 Bit Home Edition

 

[sIGPIC][/sIGPIC]

Link to post
Share on other sites
Alerax, I have tried to implement the export feature but I cannot find the file it is supposed to produce.

I have manually implememted the changes on the lua file as you mentioned, run a mission with the sript made a landing and got the LSO score after landing.

I am running it in the release version. I followed your instructions but I cannot find any doc file created after flying.

Could you please elaborate a bit more what is the name of that file created and where on release version can I find it?

Thanks again!

Hi Furia,

 

The grading file should be in your DCS Saved Games folder. The file path is:

 

YourName\Saved Games\DCS(.openbeta)\Mods\Alerax_LSO_AI

 

The grading files are dynamically generated, Tail#_YourName(TimeCounter).doc.

 

If you couldn't find it, can you check that when you land, do you see a "*" after the "Grading Summary" header? If so, it means that the i/o setup is not enabled.

 

Thanks,

Alerax

Link to post
Share on other sites
Alerax,

 

Thanks very much for continuing to develop the script and releasing it to the community. Appreciate the export function which I (among others) requested.

 

I'm looking forward to creating some new missions with your script this weekend.

 

You're very welcome donkeyrider. Enjoy the update!

 

btw- just so people are aware, the export function will only export to Host/Server/Single-player. So Clients do not need to enable the i/o. The server just needs to have an ability to post/share the grades.

 

-Alerax

Link to post
Share on other sites

Hate to reply paragraph by paragraph, but its sorta needed for this post.

Thanks Grimes- I appreciate the explanation. I'm not familiar with using env.info() and the slmod so will have to look into those applications.

You coded all of that without once printing stuff to DCS.log via env.info(lfWAD1zFVRxNhhOYdK8Jcx2xL .. ' value is:

)? or the other logging functions: env.warning and env.error

 

 

It seems the only issue here is that the approached I took is misaligned with the expectations of the mission scripting community, a subset of the total DCS community. Let's not impede on adding value for the rest of the end-users.

You add more value by letting people see the code and being able to fix it on their own if you go absent. Plus they can learn a thing or two from seeing how such code is written. Just to hazard a guess lessons learnt can be directly applied to similar scripts for helicopter landing/cargo sling loading, or air refueling. I don't intend on dissuading you from making content, you've just raised a flag in how you've done it so far. My first thought when I saw this initially released was "oh cool that'll be neat", which quickly turned into "WTF" when I opened it up.

 

 

I am curious though, what are the ultimate reasons for why you chose to obfuscate the code? Help me appreciate and understand your logic on that front. It appears as though you haven't actually answered that yet.

 

 

I hear you, and I understand your concerns, and to be honest, I agree with them. However, I also backed Alerax to keep his code private whilst it was in active development whilst we at the VMFA-42 we’re testing it.

 

 

That said, the only thing that is obfuscated in the code are the function names and values and even a Lua hack like me was able to get an idea of what it was doing in between those until my brain hurt from trying to figure out the math. Somebody with your skills should be able to read it no problem.

 

Develop it however you wanna develop it. I've done a mix of not publishing changes until I feel it is complete and pushing updates to github whenever I am done for the day editing it. Once its out there though it shouldn't be obfuscated and that doesn't change the fact that both development paths are still valid for whatever updates you have in mind.

 

Sure you can figure out the obfuscation, but that takes time. Way more time than if it wasn't obfuscated. Because lets face it, when looking at someone else's code there is always a bit of a learning curve to their coding style when you can read 100% of it. The obfuscation is the same thing but it takes additional time because it gets thrown into a foreign language that google translate can't help you with. So yes I can figure it out, and the thought crossed my mind out of the ideals of open sourced code, but working on my own stuff is a better use of my time.

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

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to post
Share on other sites
Hi Furia,

 

The grading file should be in your DCS Saved Games folder. The file path is:

 

YourName\Saved Games\DCS(.openbeta)\Mods\Alerax_LSO_AI

 

The grading files are dynamically generated, Tail#_YourName(TimeCounter).doc.

 

If you couldn't find it, can you check that when you land, do you see a "*" after the "Grading Summary" header? If so, it means that the i/o setup is not enabled.

 

Thanks,

Alerax

 

Ok seems this is not enable since I get this "*" symbol but I cannot understand why since I have followed the instructions properly

 

Graded%20landing.jpg

 

I will try again with a different method.

 

Just a comment for this wonderful script. I believe the BRC and FB are based on Magnetic North not True North.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...