ScriptGPCGPC reference

GPC

What a GPC script is

A GPC script is a text file the Zen runs. It sits between your controller and the console. It can read a button, hold a button, wait a number of milliseconds, and move a stick. It cannot see the screen, so it cannot know that a shot was green. Anything that sounds like it watches the meter is describing a different product than this language can be.

The rest of this reference is how a file is shaped, the three ideas you use every day (get_val, set_val, combo, wait), why the compiler stops, which editor to open, and a timed-hold sketch of the kind a standstill jumper script uses. Every code block is an illustration. Do not program it onto a slot and expect a game to treat it as a finished script.

A script is a loop that rewrites the pad

GPC is the language Zen Studio compiles for a Cronus Zen. A script is three ideas: init runs once, main runs over and over while the slot is active, and a combo is a timed sequence you start from main. Inside those, get_val reads a button or a stick and set_val writes one. wait pauses for a number of milliseconds.

You write it, the compiler checks it, and Studio programs a slot. The Zen then sits on the wire and presents the rewritten pad to the console. It is not a program that runs on the console's CPU. If the slot name is missing, none of that loop is running.

The pages under this one split the job. Shape is write, compile, load. Syntax is get_val, set_val, combo, and wait, with a sketch. Errors is what the compiler stops on. Tools is which editor, and what to do when someone asks a model to write the file. The timed-hold sketch shows a button held for a teaching number. That number is not a product.

This site does not host a library of game scripts and does not rank them. A sketch on a page is an illustration. Compile it if you want to see the shape. Do not flash it into a game and expect a feature.

Compile the empty file before you get clever

init, main, and one combo are enough to prove the toolchain. An empty main that compiles means Studio can see the language. Then add a combo_run. A combo that is written and never started is a file that compiles and does nothing, which feels like a hardware fault and is not one. The timed-hold sketch later uses 660 as a teaching length. It is not a product value and it is not yew2K. yew2K, if you need the name, is a separate $64.99 file.

Snippet explainer

Quoted from Collective Minds, A Simple Tutorial. guide.cronus.support/gpc/a-simple-tutorial

RAPID_FIRE: XB1_RT set to 100 40 ms → XB1_RT released 30 ms · 70 ms

  1. ShapeWrite, compile, and loadA GPC file has init, main, and combos. Zen Studio compiles it. Program writes it to a slot, and the cable stays in until that write ends.
  2. Syntaxget_val, set_val, combos, and waitget_val reads an input. set_val replaces it. A combo is where wait is allowed to pause. Time is in milliseconds.
  3. ErrorsCompile failures and unexpected errorA compile error quotes a line. An unexpected error from Studio is often the device or the browser, not the semicolon you are staring at.
  4. ToolsThe editor, and what to do with generated codeCompile in Zen Studio. Other editors are only for typing. Generated GPC still has to compile and still has to be tested on the controller.
  5. TimingA timed hold, the shape of a standstill shotHold a face button for N milliseconds, then release. N is the thing you calibrate. The sketch does not know your jumper.