X-Plane 12 Baron 58 Copilot Lua Script Cold & Dark to Takeoff.

Baron 58 Aircraft Parked

X-Plane 12 Baron 58 Copilot Lua Script Cold & Dark to Takeoff.


Introducing the BARON58_ColdAndDark Lua Script: Your Virtual Co-Pilot for X-Plane 12

At LETSFLYVFR, we understand that getting the most out of your Baron 58 flight experience means having a reliable co-pilot. That’s why we’ve developed the BARON58_ColdAndDark Lua script for X-Plane 12 pilots.

Whether you’re new to virtual flying or a seasoned aviator, this script is designed to walk you through the entire pre-flight and takeoff process, ensuring everything is ready for your flight and guiding you safely through the skies beyond!

What Does It Do?

IMPORTANT: You MUST the FLIGHT with ENGINES OFF!

This Script WiLL GET “QUARANTINED” if you start the X-Plane 12 Flight with ENGINES ON! The ENGINES MUST BE OFF!

The Baron58_ColdAndDark.lua Script takes you from the moment you load into X-Plane 12, from a cold and dark state to a fully functional aircraft ready for takeoff. Here’s what it can help you with:

  • Cold & Dark Start: Guides you through the aircraft from the parking spot, guiding you through engine and system startup procedures.
  • System Checks: Prompts you as the pilot to complete key system checks, including engine magneto tests, ensuring all your gauges and instruments are ready.
  • Runway Clearance & Takeoff: Assists with runway clearance and takeoff checks, guiding you to the right speeds for a smooth departure.
  • Wheels Up and Beyond: Once you’re airborne, the script will be there to help with Rotate, Gear up as well as POWER if you get distracted during the initial climb out. It will advise you of climb speeds, cruise settings, descent settings and eventually your landing back at your destination.
  • The CO-Pilot is there to prompt you and NOT do the work for you. Its as much an instructor as it is a friendly co pilot for your Baron 58.

The Script

This X-Plane 12 Baron58_ColdAndDark.lua will As this script matures deliver much more but this is as much an open Beta at the moment. We plan to expand its functionality with more features such as climb rate callouts, cruise power settings, descent power settings, and landing checklists as time goes on.

Eventually, the goal is for the script to be a complete co-pilot system, providing assistance from takeoff to landing.

How was it Created?

The scripts is designed by Brendon McAliece (Gunnie) of the LetsFlyVFR.com Blog and LetsFLyVFR.com YouTube Channel for the X Plane 12 community. The script design and flow is assembled by Brendon and using Chat GPT to do the actual programming. This has proven to be immensely frustrating with many many iterations being created and modified just to get to this point.

Honestly the use of CHAT GPT and sometimes other AI, HAS Defiantly NOT made this a five minute task. It’s been three weeks of writing and testing to get to this point at Version 1.0 so if your seeing a later version being delivered then there’s weeks of additional work!

Time has been been dedicated to adjusting, adding new features, tuning features and flight testing the whole X-Plane 12 Baron 58 Copilot Lua Script. Its fun and super frustrating when X Plane sends the script to the QUARANTINE all the time when there is a small issue.

Don’t worry anything that is posted has been thoroughly tested!

AI Does NOT always have the Answers!

Just to be clear for those who think its a quick make this for me Chat GPT, is far far from the truth in actuality. There was a point where we had been tested one feature trying to get a simple GEAR UP & Locked using DATAREFS and ALTITUDE. Chat GPT actually Gave UP on me! Yes it said “I have no more answers!

So appreciate the calls that come from your CO PILOT, there’s sweat, tears both real and AI that’s made this small project work and built into every one of them I have created!

X Plane Baron 58

X-Plane 12 Baron 58 Copilot Lua Script. V1.0

Ok here’s the actual X-Plane 12 Baron 58 Copilot Lua Script for you. Please follow the instructions below to make sure the install is perfect and you can enjoy out Baron 58 Copilot. You can change some of the TEXT only, You can REORDER checklists by simply changing the words and leave comma for small pauses so there is space between each task. I want to make this a little longer as its not super slow but thats for latter.
If you want to change the ” my friend” to your own name thats ok! It makes it more personal.

COPY THE TEXT BELOW – You can change the HILIGHTED TEXT if You Wish! It can make the experience more personalised. Add Your name where it says SIR or make a cheeky comment!
Copy BETWEEN the ————————- OK!
Don’t Include the ——————- !

NOTE: Further refined 25/6/2025.


Name the file: Baron58_ColdAndDark.lua

———————————-

–[[
Baron58_ColdAndDark.lua
Custom startup voice script for X-Plane 12
Updated with better timing control by ChatGPT
Originally by Brendon McALiece of LetsFLyVFR.com
–]]
— Datarefs (read-only)
dataref(“PARK_BRAKE”, “sim/flightmodel/controls/parkbrake”, “readonly”)
dataref(“IAS”, “sim/flightmodel/position/indicated_airspeed”, “readonly”)
dataref(“VS”, “sim/flightmodel/position/vh_ind_fpm”, “readonly”)
dataref(“Y_AGL”, “sim/flightmodel/position/y_agl”, “readonly”)
— Voice output helper
function speakNoText(sText)
if XPLMSpeakString ~= nil then
XPLMSpeakString(sText)
else
logMsg(“Voice not available: ” .. sText)
end
end
— State variables
local greeting_spoken = false
local copilot_timer = 0
local checklist_called = false
local brake_released = false
local brake_announced = false
local engine_two_ready = false
local engine_two_announced = false
local brake_reapplied_for_mag = false
local mag_sequence_active = false
local mag_check_timer = 0
local mag_left_called = false
local mag_ok1_called = false
local mag_right_called = false
local mag_ok2_called = false
local brake_after_mag_released = false
local brake_after_mag_announced = false
local final_check_called = false
local final_park_check_called = false
local final_check_timer = 0
— Main loop
function copilotChecklistReminder()
local dt = SIM_PERIOD or 0.016
copilot_timer = copilot_timer + dt
if not greeting_spoken then
speakNoText(“Welcome Sir, let’s go flying. Let’s get this beast fired up! Main Battery On Please, Then Lights as required – Rotating Beecon ON”)
logMsg(“Greeting spoken.”)
greeting_spoken = true
end
— Initial checklist reminder
if not checklist_called and copilot_timer > 5 then
speakNoText(“Checklists – Ready to copy”)
logMsg(“Checklist reminder spoken.”)
checklist_called = true
end
— Left engine start
if checklist_called and copilot_timer > 7 and PARK_BRAKE >= 0.5 and not brake_released and not brake_announced then
speakNoText(“Checklist, Ready for Left Engine Start. Brakes HOLD, Props Fully forward, Throttle Crack, Mixture Full RIch, Master ON, Beacon ON, Fuel Pumps ON then OFF, Prime As Required, Ignition to START LEFT ENGINE, Check Oil Pressure.”)
logMsg(“Left engine checklist called.”)
brake_announced = true
end
— Right engine start
if brake_announced and not engine_two_ready and copilot_timer > 15 then
engine_two_ready = true
speakNoText(“Ready for Right Engine Start Sir. Brakes HOLD, Props Fully forward, Throttle Crack, Fuel Pumps ON then OFF, Prime As Required, Ignition to START RIGHT ENGINE, Check Oil Pressure, Avionics ON.”)
logMsg(“Right engine checklist called.”)
engine_two_announced = true
end
— Taxi clearance
if engine_two_announced and PARK_BRAKE < 0.5 and not brake_released then
brake_released = true
speakNoText(“Clear to taxi to Engine Runup Area Sir! Check, Brakes Check, Turn and Slip Check, Heading Check, Altimeter Check.”)
logMsg(“Taxi clearance given.”)
end
— Run-up checks (brake reapplied)
if brake_released and PARK_BRAKE >= 0.5 and not brake_reapplied_for_mag and not mag_sequence_active then
brake_reapplied_for_mag = true
mag_sequence_active = true
mag_check_timer = 0
speakNoText(“Mag checks please Sir. Check Park Brake Set. Throttles for 1700 RPM. Prop Full Forward. Mixture Full Rich. OK. Maximum 125 RPM drop, 50 RPM difference max.Ill just finish Checklists, Please Waite Sir!”)
logMsg(“Mag check instructions started.”)
end
— Mag check sequence
if mag_sequence_active then
mag_check_timer = mag_check_timer + dt
if mag_check_timer > 10 and not mag_left_called then speakNoText("Left mag check first.") mag_left_called = true end if mag_check_timer > 12 and not mag_ok1_called then speakNoText("OK.") mag_ok1_called = true end if mag_check_timer > 14 and not mag_right_called then speakNoText("Right mag check please.") mag_right_called = true end if mag_check_timer > 16 and not mag_ok2_called then speakNoText("OK great. Let's go to the hold short line.") mag_ok2_called = true end
end
— After mag checks – ready for lineup
if mag_ok2_called and PARK_BRAKE < 0.5 and not brake_after_mag_released then
brake_after_mag_released = true
speakNoText(“Check Avionics ON, Check all gauges in the GREEN. Volts Check. Trim set for takeoff, 3 to 6 degrees up. Flaps as required. Prop SINK Switch ON, Controls free and correct. Circuit clear. Runway clear. Park brake on when lined up please sir.”)
logMsg(“Taxi to hold short line complete.”)
end
— Final pre-takeoff checks
if brake_after_mag_released and PARK_BRAKE >= 0.5 and not final_check_called then
final_check_timer = 0
speakNoText(“Final pre-takeoff checks Sir. Doors and windows secure. Seatbelts ON. Prop full forward. Mixture full rich. Transponder ALT. Landing lights ON. Clear.”)
final_check_called = true
end
if final_check_called and not final_park_check_called then
final_check_timer = final_check_timer + dt
if final_check_timer > 5 then
speakNoText(“Checklist: Rotate at 85 knots. Maintain centerline. Ready when you are, Sir!”)
final_park_check_called = true
end
end
end
— Register frame loop
do_every_frame(“copilotChecklistReminder()”)

How to Install the Lua Script and FlyWithLua NG

Step 1: Install FlyWithLua NG

To run the BARON58_ColdAndDark.lua script, you must have FlyWithLua NG installed on your X-Plane 12 setup.

  1. Download FlyWithLua NG from the official site:
    FlyWithLua NG Official Download
  2. Extract the downloaded folder and place it in the X-Plane 12 plugins folder.
    This is typically located at:
    X-Plane 12/Resources/plugins/
  3. Once installed, launch X-Plane 12. If FlyWithLua NG has been installed correctly, you’ll see it listed under the Plugins menu when you start X-Plane.
Step 2: Install the BARON58_ColdAndDark Lua Script
  1. Download/COPY directly from the above window is ok too – the BARON58_ColdAndDark.lua script file from the LETSFLYVFR.com website or wherever it’s hosted.
  2. Open Notepad (or any basic text editor).
  3. Copy and paste the contents of the downloaded BARON58_ColdAndDark.lua file into the Notepad.
  4. Save the file as Baron58_ColdAndDark.lua. When saving, ensure the Save as type is set to All Files (not .txt), or the script will not work. This is crucial!
  5. Place the Baron58_ColdAndDark.lua file in the following directory:
    X-Plane 12/Resources/plugins/FlyWithLua/Scripts/
  6. Restart X-Plane 12 and load your Baron 58 aircraft. The Lua script should now be active and ready for use!
Baron58 Cold & Dark LUA SCRIPT INSTALL SAVE X Plane 12 Lua Scripts

Legal Notice

  • FREE TO DOWNLOAD & USE: The BARON58_ColdAndDark Lua Script 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, 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.

Common Issues & Troubleshooting

While the BARON58_ColdAndDark Lua Script 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.

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.
baron-G58

Get Involved!

Test the BARON58_ColdAndDark Lua Script today, and let us know your thoughts in the comments below. This is just the beginning, and with your help, we can make this tool even better.

Don’t forget to share any bugs or suggestions so we can keep improving our X-Plane 12 Baron 58 Copilot Lua Script.

Thank you for supporting LETSFLYVFR, and happy flying!



Letsflyvfr Shop

Current Baron 58 Lua Scripts Available.

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.

Brendon McAliece - Gunnie and a Jabiru 170 Sport Pilot Certified.
Brendon McAliece – Sport Pilot Certificate Holder

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 0 times.

As an Amazon affiliate I may benefit from qualifying sales.

4 responses to “X-Plane 12 Baron 58 Copilot Lua Script Cold & Dark to Takeoff.”