Using The Checklist Script: Carsten Lynker March 16, 2013
Using The Checklist Script: Carsten Lynker March 16, 2013
display clist.lua
Carsten Lynker
Contents
1 Basic Usage 3
1.1 Why this script? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Don’t want it in 32-bit? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Advanced Usage 3
2.1 Write easy formatted checklists . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 The Checklists subfolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Lua code inside a checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Change design 6
page 2 of 6
2 ADVANCED USAGE
1 Basic Usage
There are many files clist.txt in public, who are working with the famous plugin Checklister,
made for X-Plane 8.
All you have to do is to copy these files into the aircraft directory where the main aircraft file
*.acf is located. And you will have to install Checklister.
But Checklister won’t work in 64-bit. So I decided to write a script displaying the clist.txt
files.
All you have to do to get checklists in 64-bit is to copy the script display clist.lua into the
Scripts directory of FlyWithLua. After that, just move your mouse pointer to the left side of
your screen (or window) to display a menu of all pages inside the clist.txt file. While the
mouse pointer is on the left side, move up/down to choose the checklist page you want to see
and move away from the left side.
When the mouse pointer leaves the left side of the screen and a page is selected, then this page
of the checklist will be displayed. To hide the page, just go back to the left side and find an
up/down position, where no page is selected. Then move away.
It’s as simple as that!
You really like the original Checklister and don’t want to see the script working in 32-bit? Just
rename the script from display clist.lua to display clist.lua64 and FlyWithLua will
only execute it in 64-bit.
2 Advanced Usage
If you can’t find a clist.txt for your plane, you can write a checklist in an easy way. Instead
of creating a file clist.txt create a file FWL_checklist.txt and copy it into the main aircraft
directory (just like a clist.txt file).
A file *_checklist.txt must look like this:
page 3 of 6
2.2 The Checklists subfolder 2 ADVANCED USAGE
1 T r a n s p o n d e r Codes
2 −−−−−−−−−−−−−−−−−
3 VFR i n N o r t h American a i r s p a c e 1200
4 VFR s t a n d a r d squawk c o d e 7000
5 VFR c i r c u i t t r a f f i c c o d e i n t h e UK 7010
6 Radio F a i l u r e 7600
7 Emergency ( ICAO , w o r l d w i d e ) 7700
8
9 ITIPAR I n i t i a l C a l l
10 −−−−−−−−−−−−−−−−−−−
11 Identification D−ESAG
12 Type o f A i r c r a f t C e s s n a 172
13 Intention VFR t o Hamburg
14 Position p o s i t i o n 5 minutes to S i e r r a 1
15 Altitude a l t i t u d e 1500 f e e t
16 Request for landing
Use an ASCII text editor and start with the title of the first page.
After the title you can add a line containing at least two - (minus) characters. This is an optional
feature, if you leave it away, just continue with the first row of the page.
Then write the rows of the page. If you want to format them, use spaces or tab. A monospace
font in your editor can help, but keep in mind to save it as an ASCII text file without any font or
style information.
To write down the next page, separate them by an empty line. Make sure that this line is really
empty and does not contain any space or tab character.
That’s it. A very simple checklist format. This format is good to copy&paste checklists from
PDFs.
There has to be a subfolder inside Scripts folder named Checklists. Inside this subfolder
you can store as many checklist files as you like. FlyWithLua will load them, if they fit to these
names (loading them in these order):
TAILNUMBER_tailnumber_clist.txt
TAILNUMBER_tailnumber_checklist.txt
ICAO_ICAO code_clist.txt
ICAO_ICAO code_checklist.txt
global_checklist.txt
If the script finds more then one checklist that matches, it will load all of them and stick them
together.
A file matching to the ICAO code will only be loaded if no other file was found before (matching
to the tailnumber or be placed inside the aircraft folder).
page 4 of 6
2.3 Lua code inside a checklist 2 ADVANCED USAGE
You can use Lua code inside a checklist. To do this, you will have to write the code surrounded
by a letter $ before and after the code. The code must be finished in the same line.
Here is an example of a checklist page:
1 Speeds
2 −−−−−−
3 Vso $ g e t ( " sim / aircraft / view / a c f _ V s o " ) $
4 Vs $ g e t ( " sim / aircraft / view / a c f _ V s " ) $
5 Vfe $ g e t ( " sim / aircraft / view / a c f _ V f e " ) $
6 Vno $ g e t ( " sim / aircraft / view / acf_Vno " ) $
7 Vne $ g e t ( " sim / aircraft / view / a c f _ V n e " ) $
The code will be replaced by it’s returning value (must be a number or a string), while the script
is loading the checklist file. If you want it more dynamic, you can use %% instead of $. Then the
code will be evaluated every single frame. Be careful because this can slow down the simulator,
if you use slow code.
If you want to execute Lua code, but do not want it to be displayed, then you can start a line with
> (greater than). Look at this example:
1 >require ( " radio " )
2
3 Plane Data
4 −−−−−−−−−−
5 ICAO c o d e "$PLANE_ICAO$"
6 Tailnumber "$PLANE_TAILNUMBER$"
7 Your t r a n s p o n d e r i s s e t t o %%SQUAWK%%
8 Your t r a n s p o n d e r mode i s %%i f (TRANSPONDER_MODE > 1 ) t h e n r e t u r n "ACTIVE" e l s e
r e t u r n "STANDBY" end%%
In the first line of this example, the module radio is loaded. It provides the variables SQUAWK
and TRANSPONDER_MODE.
As the code is masked by %%, it will be evaluated every frame. So if you change the transponder
settings during flight, the checklist page will always show the right values.
Another nice thing is, that you can use return to create a more complex Lua code. In the
checklist page you will see the word ACTIVE, if the value of the variable TRANSPONDER_MODE
is greater than 1, else you will see the word STANDBY.
If you want to be more precise, you can use this code:
1 >require ( " radio " )
2 >CCTMODE = { "OFF" , "STANDBY" , "ACTIVE" , "TEST" }
3
4 Plane Data
5 −−−−−−−−−−
6 ICAO c o d e "$PLANE_ICAO$"
7 Tailnumber "$PLANE_TAILNUMBER$"
8 Your t r a n s p o n d e r i s s e t t o %%SQUAWK%%
9 Your t r a n s p o n d e r mode i s %%CCTMODE[TRANSPONDER_MODE+1]%%
page 5 of 6
3 CHANGE DESIGN
3 Change design
You can change the design of the displayed windows in the display clist.lua script.
Search for this part of the script:
13 −−−−−−−8<−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
14 −− You can e d i t t h e s e 5 p a r a m e t e r s t o c u s t o m i z e t h e o u t p u t o f t h i s s c r i p t .
15 l o c a l r o w h i g h t = 21 −− t h e l i n e s p a c i n g i n s c r e e n p i x e l
16 l o c a l framewidth = 5 −− t h e s p a c e b e t w e e n t e x t and f r a m e i n s c r e e n p i x e l
17 l o c a l y _ o f f s e t = 25 −− t h e d i s t a n c e o f t h e window f r o m t h e u p p e r s c r e e n
limit
18 local show_on_right_side = false −− s e t t h i s t o t r u e t o d i s p l a y t h e p a g e s on t h e
right side
19 local t r a n s p a r e n t _ p e r c e n t = 0.65 −− t h e d a r k n e s s o f t h e windows b a c k g r o u n d
20 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−>8−−−−−−−−−−−−−−−−−−−−−
The most important value would be the variable show_on_right_side. Change it’s value to
true and the script will display the menu and the pages on the right side of the screen.
The value of transparent_percent must be between 0.0 and 1.0, where 1.0 will result in
a complete black window, and 0.0 will force the script to display only the text without the
background.
page 6 of 6