Vizzy is a visual programming system that you can use to automate your craft to execute a wide variety of flight-oriented tasks. The easiest way to get started is to watch the tutorial video here:

Programs

You can create a program for your craft by opening the menu and clicking EDIT PROGRAM. This will attach the program to your craft's primary command pod however, you can attach programs to any part in your craft. This can be done by clicking on a part and then opening the Tinker Panel and clicking the "Add Flight Program" button.

Instructions

Instructions have square corners and are connected in a sequence. They are executed one after another and many have slots where you can type in parameters or where you can drop expression blocks.

Expressions

Expressions return a value. Expressions with angled edges return a boolean (true or false) and expressions with curved corners return a string, number, vector, or list. An expression is only evaluated when it is inside the parameter slot of an instruction that is executing.

If an expression returns a value of a type that does not match the expected type of the parameter slot it is in, then the value will be automatically converted to the correct type. If Vizzy cannot figure out how to convert a value, it will use a default value. For example, if an expression returns a string and the parameter slot is expecting a number, then the string will be converted to a number. If the string cannot be converted to a number, then a default value of 0 will be used.

Events

Events are orange blocks that initiate execution at the appropriate time and are the starting point for a series of instructions. The most common event is the On Start event, which is where programs typically start.

Variables

Variables allow you to store a value that can be retrieved and processed later.

Custom Instructions and Expressions

You can create your own instructions and expressions in Vizzy. This is very similar to writing functions in other programming languages.

Program Execution

When a program starts, it checks to see if there are any On Start event blocks in the program and if there are it will create a new (artificial) thread to start executing the attached instructions, one at a time. Before executing an instruction, it will first evaluate all expression blocks inserted into the parameter slots of the instruction to determine the values to be used to execute the instruction.

If the craft encounters another event that has a corresponding event block in the program then it will create a new thread to execute the instructions attached to that event block. A program can have multiple threads running at once, however these threads are not true background threads and they all run on the game's main thread. To simulate simultaneous execution of threads, the game will alternate between threads each game frame. The program will execute at most 25 instructions per game frame. This number can be configured by XML-modifying the FlightProgram modifier's maxInstructionsPerFrame attribute. There is no limit to the number of expressions that can be evaluated in a single frame.

It is advised to place a Wait 0 Seconds at the end of loops as it is often a good place for a thread to pause execution for that game frame and give a chance to other threads in the program to execute.

Funk

The new FUNK expression was introduced in version 0.9.700. It parses and evaluates a text-based expression and returns the result as a number.

There are several properties that are accessible from the FUNK expression, but these are not yet finalized as version 0.9.700 is still in beta.

You can find more information about the FUNK expression here.


Comments

  • Log in to leave a comment
  • Profile image

    TimeWarp doens't work

    22 days ago
  • Profile image
    75 getrice

    @KellyNyanbinary No worries! Thank you so much!

    one month ago
  • Profile image

    It’s somewhere in appdata. I forgot. Sorry @getrice

    one month ago
  • Profile image
    75 getrice

    @KellyNyanbinary Thank you! One last thing, where would I find the craft file in the directory?

    one month ago
  • Profile image

    You can view it in the craft XML file but it’s formatted horribly @getrice

    one month ago
  • Profile image
    75 getrice

    How would I edit my program as a text file; or at least view it as such? Thanks in advance.

    one month ago
  • Profile image

    @Kleesmilie you could make it something like this:

    While brake is applying
    if current wheel rpm is more than 0.05 set brake value to 1
    Else set brake value to 0

    And then smooth it out, eh gonna try it soon

    7 months ago
  • Profile image
    149 RStar

    Hello .. I am new but saw some best auto commands ..so am trying to understand .. can anyone guide..if I can get an activation of my second pod(say satellite manuver commands) after I place that thing into orbit... All I need to see that these commands shouldn't interfere with rocket one.. so if I can add command at beginning where it will get activated after stage separation from it's previous core(rocket) ........

    so if anyone understood my question lol pls guide me with that command line .. thank you

    7 months ago
  • Profile image

    @seventeen it is a career mode not a SR2 copy

    +1 7 months ago
  • Profile image
    11.5k FalconAero

    @Infinite17 cool

    +1 7 months ago
  • Profile image
    14.5k seventeen

    @FalconAerospaceFAS hahaha yeah Gozinya is working on it

    +1 7 months ago
  • Profile image
    11.5k FalconAero

    Will vizzy os on mfd come in future? I can't wait to play sr2 inside sr2 on mfd ;)

    +1 7 months ago
  • Profile image

    Click on the link on the bottom of the post and scroll down tho the bottom of that page. There it describes how to get the properties of a part, including RPM for wheels. @BeamerBoy
    What I gathered from that is, you select a specific part in the PartSelector section of the expression by giving it the ‚exact part name‘ (you seem to be able to change this in the xml, as shown in the top of the page linked on the bottom of the linked page). The ModifierSelector specifies what part it is, based on its id. The Data part of the expression seems to specify where the numbers of the expression come from, refer to the table linked in the link form the post. The PropertySelector tells the expression what property of a part to get, again please refer to the table.
    As an example, you can get the value of a variable in a vizzy program by using: [name of part executing program].FlightProgram.[name of variable]; or a more more specific example: CockpitTest.FlightProgram.TimeToImpact
    These are just my thoughts and could be totally wrong. If someone with actual knowledge could correct me it would be appreciated.

    +1 7 months ago
  • Profile image

    @Kleesmilie how exactly could i read a wheel’s rpm in vizzy?

    7 months ago
  • Profile image

    @La1pista Anti-Lock Braking system stops wheels on a car from locking up and sliding while braking an Traction Control System prevents the powered wheels from Wheel-Spinning while under acceleration

    7 months ago
  • Profile image

    @BeamerBoy what is ABS and TCS?

    7 months ago
  • Profile image

    @Kleesmilie how can i do that?

    7 months ago
  • Profile image

    holllld up what

    7 months ago
  • Profile image

    Now you can read the rpm of a wheel, which is necessary for such systems. @BeamerBoy

    +2 8 months ago
  • Profile image

    @Kleesmilie omg, i was thinking about how cool it would be to program ABS and TCS. I thought it would be impossible. But you say it is?

    +2 8 months ago
  • Profile image

    Finally able to make ABS and TCS happen.

    +1 8 months ago
  • Profile image
    6,902 Hannah1212

    That was a very useful explanation of how threads work, I didn’t know that before.

    8 months ago
  • Profile image
    14.5k seventeen

    no

    8 months ago
  • Profile image
    19.9k Rafaele

    preparing for incoming april fools o-o

    8 months ago
  • Profile image
    132 ImtiaakSR

    Hey @AndrewGarrison hi sorry for pinging but i have a suggestion to add Water and Dust particles when landing or launching and don't let it be too detailed for low performance devices

    +1 8 months ago
  • Log in to see more comments

38 Upvotes

Log in in to upvote this post.
0 MAxoid
664 MercerAerospace
19.9k Rafaele
1,762 MisatoTheOtherSergal
Mod SupremeDorian
5,082 Thebapi
579 YaMomzBox420
14.5k seventeen
3,583 DragonTech
6,902 Hannah1212
1,046 PointBreak
9,069 NotVedhaspace
17.0k Rizkyman
129 Remedy31
12.2k ChuckNotChunk
Mod InfinityTechnology
6,206 SmurfResearchX
6,595 AQUILA
553 Kleesmilie
294 zeropol
8,242 iAEROSPACE
42.7k DASX
1,023 ISLANDER
6,668 Yoon
157 AxeAerospace
1,501 DARO
675 Ardee
315 Astrospace
11.5k FalconAero
Dev pedro16797
60 Brixxter
1,281 CaveatEmperor
2,746 GrizzlitnCFSP
244 analyzer1
15 orangePHdeaf
15 SpaceISRO
0 wpppwpqp