Scripting Basics using Inky - Studio-Lovelies/GG-JointJustice-Unity GitHub Wiki

Knowledge Requirements

This document is not dependent on other topics.


To keep friction for writers low, the entire game's story can be programmed without the use of Unity or C#:

  1. Run the game
  2. Start a new game
  3. Once you see the first line of dialogue, press Ctrl+R
  4. A text editor will open (if not, select Notepad when asked for an app to open .ink files)
  5. Edit and save the file
  6. The game will restart the script automatically Game_Grumps_-_Joint_Justice_DXJegeNwe1

How to use inky

Using inky itself is quite easy, and is fully documented.

We support all inky functionality, so feel free to go nuts with it.

How to write a dialogue script

Within GG-JJ Unity, inky is extended. Writing any regular line will cause it to become a spoken line, which supports full markdown as detailed here.


Action lines are lines inside .ink-files, that start with & and thereby are not used as dialogue of Actors.

Examples include:

  • playing sound effects: &PLAY_SFX:EvidenceShoop
  • playing music: &PLAY_SONG:TurnaboutGrumpsters
  • camera movement: &CAMERA_PAN:2,0,-204
  • actor animations: &PLAY_EMOTION:Nodding
  • adding evidence: &ADD_EVIDENCE:Bent_Coins

A full list of Actions can be found here.
This list is auto-generated whenever new Actions are added, removed or modified.

Using an Action is done by starting the line with &. Then, in full caps, the name of the action. Most actions support parameters, or values, as well. They are using by following the action with :, and then any parameters, separated by ,. For example:

You can introduce branching paths using choices. When doing so, make sure that a choice is marked as "+ [Choice Text]". If you don't do this, inky will interpret it as a spoken line after choosing it.

How to write a cross examination script

Cross examination scripts work a bit different. You can't introduce normal choices. Instead, all choices encountered act as a "Continue, press, or present evidence" moment. The first choice is always the "Continue" choice, the second choice is always the "Press witness" choice, and any other choices are considered "evidence" choices. When adding evidence choices, please make sure the names line up correctly to the names detailed in preset values. Note, you can add both actor names and evidence names for this. It is also important to make sure you completely re-do the entire scene state (background, actor, pose, emotion, etc.) with every line knot. If you do not do this, the system might trip up when coming back from a sequence where the player presented incorrect evidence, or from a "press" choice.

As an example, please see this part of the first Ross Cross examination:


Note that on a continue, it leads to the next line. On a press, it leads to the press part of that line, which then leads back to the next line in the sequence (or the ending, as is the case on line 3. On line 4, you can see an example of how to use evidence. The third option is presented as "Attorneys_Badge". When presenting the attorney badge on this line specifically, it will branch off into a small sequence where ross talks about how lovely the badge is.

Location of .ink-Files

To make a new .ink-file available to Unity or modify existing scripts, place or change files inside /unity-ggjj/Assets/Resources/InkDialogueScripts.