Baron 58 Decent Landing Lua Script.
This Baron 58 Decent Landing Lua Script is the final chapter in the Baron 58 Lua Script challenge I have set myself! It is called Baron58_DescentLanding.lua and it will work with the other X-Plane 12 Lua NG Scripts I have here on the LetsFlyVFR.com blog page.
What does it do?
The Baron58_DescentLanding.lua takes you from decent to landing in one smooth Lua Script. Once you descend from your cruise it currently activates at 3000 Ft as you approach your desired airfield.
Currently this really works for sea level airports but I am aware many airports can be considerably high as well so I will try my best to address that issue across the group of X Plane 12 Baron 58 Lua Scripts I have created.
Features:
The Baron58_DescentLanding.lua activates at 3000 ft and then using speed, gear handle location as well as flap positions makes a number of speed and altitude callouts.
There are also cautions for overspeeding the gear and flaps if you get distracted so you don’t break your aircraft. There are some limitations to the script but its functional and being improved.
The Baron 58 Decent Landing Lua Script also detects a go around situation and will reset itself to ask you to enter the circuit at the downwind leg point again. This feature allows you to fly somewhere then do touch and go’s before landing.
Honestly this LUA script has been quite challenging and still not polished like I would want but working.
If you download all the BARON 58 LUA scripts and put them in your SCRIPTS folder for FlyWithLUA then your flights will have a companion. Its IMPORTANT to select the correct initial script depending on if your starting ENGINES ON or ENGINES OFF.
The COLD&DARK script will be quarantined and you will get an error message if you start with ENGINES RUNNING! Please ensure Engines are OFF for the COLD and DARK Lua script. Thx
Where do I put the LUA SCRIPT?
This X-Plane 12 Baron 58 Copilot Cruise Decent Lua Script can be placed in your X-Plane 12/Resources/Plugins/scripts/Baron58_DescentLanding.lua. It will work fine with the other scripts we have produced for the Baron 58 Copilot series without conflicting.
Can I Edit the Script?
Yes, absolutely your very welcome to edit the spoken words which are highlighted below for you. This is one of the line so you can identify what’s changeable –
speakNoText(“Positive rate, gear up“) as an example.
You can change the format or wording and even add your name if you want where it says SIR! On my own sim it calls me by name which is a nice touch where appropriate.
I’d be very careful if you decide to edit the CLIMB CHECKLIST section. It would be easy to make an error here!
Commas put a small pause between words but the Brackets ( ) and the Inverted Commas “” must stay as you see them.
How to Install the Lua Script

Create Your Own File.
Copy everything BETWEEN the Dotted LINES and Paste into a NOTEPAD page!
Name it Baron58_DescentLanding.lua
ENSURE you change the file type from TXT to ALL FILES.
If you look at your file and it says Baron58_DescentLanding.lua.txt you didn’t do correctly ok! Resave it and change the FILE TYPE in the lower save box to ALL FILES and you will see it named correctly as Baron58_DescentLanding.lua – OK
Please the file in your X Plane 12/resources/plugins/flywithlua/scripts folder.
The Baron 58 Decent Landing Lua Script.
Name the file : Baron58_DescentLanding.lua
— Baron58_DescentLanding.lua
— Descent to landing checklist with circuit practice and go-around logic
— Created by Brendon McAliece – LETSFLYVFR.com
— Datarefs
dataref(“IAS”, “sim/flightmodel/position/indicated_airspeed”, “readonly”)
dataref(“Y_AGL”, “sim/flightmodel/position/y_agl”, “readonly”)
dataref(“THROTTLE1”, “sim/cockpit2/engine/actuators/throttle_ratio[0]”, “readonly”)
dataref(“THROTTLE2”, “sim/cockpit2/engine/actuators/throttle_ratio[1]”, “readonly”)
— Voice function
function speakNoText(sText)
if XPLMSpeakString then
XPLMSpeakString(sText)
end
end
— Flags
local landing_checklist_done = false
local downwind_called = false
local base_called = false
local final_called = false
local final_speed_called = false
local touchdown_called = false
local goaround_called = false
local sequence_complete = false
— Main logic
function descent_landing_checklist()
if sequence_complete then return end
— Abort/reset if altitude climbs back above 3500 ft AGL
if Y_AGL > 3500 then
landing_checklist_done = false
downwind_called = false
base_called = false
final_called = false
final_speed_called = false
touchdown_called = false
goaround_called = false
sequence_complete = false
return
end
— GO-AROUND DETECTION BELOW 500 FT
if Y_AGL < 500 and (THROTTLE1 > 0.95 or THROTTLE2 > 0.95) and not goaround_called then
speakNoText(“Going Around, Max Power detected. Going around. Re-enter circuitOn Downwind Please Sir.”)
goaround_called = true
— Reset prior flags to enable another landing attempt
landing_checklist_done = false
downwind_called = false
base_called = false
final_called = false
final_speed_called = false
touchdown_called = false
return
end
— LANDING CHECKLIST BELOW 3000 FT and < 160 knots
if Y_AGL < 3000 and IAS < 160 and not landing_checklist_done then
speakNoText(“Landing checklist. Please Slow to 130 knots. Maintain 1500 feet AGL. Gear down, Flaps mid when entering white arc, full flaps below 110 knots.”)
landing_checklist_done = true
end
— DOWNWIND CALL BETWEEN 900–1100 ft
if Y_AGL > 900 and Y_AGL < 1100 and IAS > 120 and landing_checklist_done and not downwind_called then
speakNoText(“Maintain 1000 feet AGL. Gear confirmed down, flaps set. Enter downwind leg please.”)
downwind_called = true
end
— BASE LEG CALL
if Y_AGL > 800 and Y_AGL < 1000 and IAS >= 115 and IAS <= 125 and downwind_called and not base_called then
speakNoText(“Turn base. Begin descent. Maintain 110 knots.”)
base_called = true
end
— FINAL TURN CALL
if Y_AGL < 700 and IAS >= 100 and IAS <= 110 and base_called and not final_called then
speakNoText(“Turn final. Gear down. Flaps full. On speed.”)
final_called = true
end
— FINAL SPEED CALL
if Y_AGL < 300 and IAS < 100 and final_called and not final_speed_called then
speakNoText(“Stable. Approach speed 90 to 95 knots.”)
final_speed_called = true
end
— TOUCHDOWN CALL
if Y_AGL < 20 and IAS < 95 and final_speed_called and not touchdown_called then
speakNoText(“Touchdown speed good. Brakes as required.”)
touchdown_called = true
sequence_complete = true
end
end
— Register frame function
do_every_frame(“descent_landing_checklist()”)
Legal Notice
- FREE TO DOWNLOAD & USE: The Baron58_Cruise.lua is completely free for personal use. You are welcome to download, install, and use it in your X-Plane 12 setup.
- NOT FREE TO REDISTRIBUTE: Redistribution of this script, in whole or in part, without the permission of the creator, Brendon McAliece of LetsFLYVFR.com, is strictly prohibited.
- USER MODIFICATIONS: While you are free to edit the script for your personal use, modifying the Lua script incorrectly may cause it to malfunction. Any modifications are done at your own risk. The script remains the intellectual property of Brendon McAliece, the creator and owner, associated with LETSFLYVFR.com and the LETSFLYVFR YouTube Channel.

Baron58_DescentLanding.lua – Common Issues & Troubleshooting.
While the Baron58_DescentLanding.lua has been extensively tested by Brendon McAliece (AKA Gunnie) of LETSFLYVFR.com, there may still be occasional issues, especially as the script is still in beta. The script included I flew with today and works perfectly!
Common Issues:
- No Speech or Callouts: Ensure FlyWithLua NG is properly installed. If the Lua script isn’t executing, it might be due to missing files or incorrect setup. Check the installation steps carefully.
- Script Not Running: Double-check that the script file is saved with the correct .lua extension and placed in the FlyWithLua/Scripts/ folder.
- Missing Datarefs or Errors in Log: If you see errors about missing datarefs, it may indicate that a specific part of the aircraft model or X-Plane setup is not fully compatible with the script. Report any issues in the comments or contact us.
- Performance Issues: If the script causes performance issues, try disabling other scripts temporarily to identify potential conflicts.
Current Baron 58 Lua Scripts Available.
- COLD START – Baron 58 Co Pilot Lua (Completed & Published)
- Engines Running – Baron 58 Co Pilot Lua (Completed & Published)
- X Plane 12 Co Pilot Take OFF Climb LUA Script (Completed & Published)
- Baron 58 Co Pilot – Cruise Decent LUA Script (Completed & Published)
- Baron 58 Co Pilot – Decent – Landing (In Progress)
Author

Brendon McAliece (Aka Gunnie) is a military veteran with 23 years working on Jet Fighters, their weapons systems and ejection seat/module systems as well as munitions and R&D. Involved with flight simulation since the 1980s, he has flown all the major flight simulators over the years.
He is an Australian expat who has lived in Malaysia, UK, Saudi Arabia and more recently Thailand. He is a multi-lingual blogger who loves to share his life experiences here on LetsFlyVFR.com and DreamingGuitar.com, with his lifestyle and Travel experiences Blog plus his Dreaming Coffee website.
Learn More @
DreamingGuitar.com – DreamingCoffee.com – LetsFlyVFR.com
( HOME – BLOG – SHOP – ABOUT )
This page has been viewed 8 times.
As an Amazon affiliate I may benefit from qualifying sales.