This is an MFD that has 3 pages of buttons that can toggle other buttons or states.
- 12 buttons can be used in total, 3 pages of 4 buttons.
- Uses a state machine to remember what page it is on.
- When it goes to a new page it will update the button states as needed.
- Can be modded to add more pages like ISAN display, or other functionality.
This MFD has abolute control over what ever functions is on it's current page. The way around this is when you want to change, for say a button, that the MFD is "looking" at on it's page. You have to check if the MFD is on it's particular page and update the corresponding button.
Example work around:
// Turn off
if :MP=2 then
:R2=0
else
:f8=0
end
// Turn on
if :MP=2 then
:R2=1
else
:f8=1
end
3 basic Yolol Chips
1 Memory Chip
- Change the name of
ChipField1
toP1
- Change the name of
ChipField2
toP2
- Change the name of
ChipField3
toP3
- or any other one below these if you have space
1 Text Panel
- Change the name of
PanelValue
toMD
6 Simple Buttons
- Change the name of
ButtonState
toL1
- Change the name of
ButtonState
toL2
- Change the name of
ButtonState
toR1
- Change the name of
ButtonState
toR2
- Change the name of
ButtonState
toMPP
- Change the name of
ButtonState
toMPN
1 Progress bar 12×24
- Change the name of
PanelValue
toMP
- Place
L1
andL2
to the left ofMD
andR1
andR2
to the right ofMD
- Place
MPP
to the left ofMP
andMPN
to the right ofMP
It should be aranged something like this:
L1 |MD| R1
L2 | | R2
MPP MP MPN
- Open
state_common.nolol
in your favorite editor, VSCode is what I use. - Where is shows
define :Func1=:f1
, changef1
to match your button or other togglable property(0 or 1). - If you have the vscode-yolol extentions installed press Control+Shift+P and look for
YODK: Compile NOLOL-Code
. This will compile the nolol code into yolol code for you. - If you use another editor, then you will need to install yodk and run
yodk compile Functions.nolol
at the command line. - Do this for
Display.nolol
andPageControl.nolol
- (Optional) Open
Compile-Memory.ps1
in your favorite editor, VSCode is what I use. - (Optional) Where is shows below are your page screens, edit these lines to match your functions
< f1
f3 >
< f2
f4 >
- (Optional) Then open up a PowerShell window and
cd
to thetools
folder and runpowershell .\Compile-Memory.ps1
- Open up the
memory.txt
file and look at the bottom. You will seeP1=
,P2=
, andP3=
lines. These are what you need to set the values in your memory chip. If you skipped the (Optional) parts then just edit these to match your needs. - Copy
Functions.yolol
,Display.yolol
, andPageControl.yolol
into their own yolol chips.
You can create an issue here on GitHub, hit me up on discord on the Starbase discord server as Spyingwind, or PM/Mail in game as Spyingwind.