Skip to content

Use easily with P3D V4 thanks to LUA script

Featured Replies

For those who desperate to use this aircraft with V4 and don't want to bother "fixing it" at every start up, below is a small LUA script which I load automatically with FSUIPC when selecting the DA20 (it set "instructor mode", this repairs the aircraft, then set it to "ready for take off", and set few of my necessary settings). Pretty much anything can be done like this, if you know the LVARS (I have the full list, but I'm not sure I'm allowed to post it here)

 


ipc.writeLvar('L:SETTING_INSTRUCTOR_MODE',1)
ipc.sleep(500)
ipc.writeLvar('L:SETTING_STATUS_PRE_TAKEOFF',1)
ipc.writeLvar('L:LEVER_PROPELLER_PITCH_MODE',1)
ipc.writeLvar('L:CONDITION_GPS500',200)
ipc.writeLvar('KT76A_simple',1)
ipc.writeLvar('KX125_simple',1)
ipc.writeLvar('L:WHEEL_FAIRING_RIGHT',1)
ipc.writeLvar('L:WHEEL_FAIRING_LEFT',1)
ipc.writeLvar('L:WHEEL_FAIRING_NOSE',1)

 

last 3 lines put the wheel fairing in place ;)

  • 1 month later...

Can you say what to do to install this script?

  • 3 months later...

Hi,I'll try too, to get this one to work on P3D V4 too. (Prepar3D_v4_Professional_4.2.21.24048)
Your LUA script works fine. But when I switch in to the VirtualCockpit it crash.

Any idee to fix this?

 

What is the right statement for Cold and Dark? 

ipc.writeLvar('L:SETTING_STATUS_PRE_TAKEOFF',1)
ipc.writeLvar('L:SETTING_STATUS_COLD_AND_DARK',1)?

Can you give me the link to full list of LVAR commands ?

 

 

  • 2 weeks later...
  • 1 month later...
  • Author

Hi,

 

you need full (paid) version of FSUIPC, and copy this lines in a LUA file (txt file to which you change extension to "lua"), place it in the "modules" folder of P3D. Then for your test you can assign a key to start the script in the FSUIPC settings. once all set, you can autorun the script when DA20 is loaded (check FSUIPC documentation).

 

list of LVAR is there: http://vr-vfr.ovh/wp-content/uploads/2018/07/DA20-LVARS.txt

 

 

  • Author
On 5/15/2018 at 1:16 PM, ikarus06 said:

Your LUA script works fine. But when I switch in to the VirtualCockpit it crash

 

I don't have this issue, sorry I can't help.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy & Terms of Use

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.