Skip to content

Context Inline Script

Oleg edited this page Sep 14, 2024 · 3 revisions

Execution Modes

First of all, CI Scripts can work in two modes:

  1. Formatter: CIS will be replaced with it's returned value inside your string. Result will have type of string.
  2. Evaluation: CIS will be evaluated. Result will have type of ReferencedValue.

Execution mode is selected using one simple rule: if string contains ONLY Context Inline Script, then evaluation mode is used, otherwise formatter is used.

Symbols

Symbol Name Description Examples
$ Start Invoke This symbol indicates start of Context Inline Script. It is used to indicate beginning of invoking function, that is going after this. $global/, $find:id=0xB3300000/, $current/.Width
/ Invoke This symbol is important same as $, because it indicated end of function invoke, which are used in every CIS. $rfind:id=0x00134003/, $current/.Solid, $find:id=0x33310001/.Version
: Start Args This is optional symbol that is used to pass arguments to function. $find:id=0xB3300000/, $rfind:id=0x00134003,max_backtrace=1/, $find:id=0xB3300000/
, Next Arg Indicator of starting new argument in arguments list of function call. $rfind:id=0x00134003,max_backtrace=1/, $rfind:id=0x00134002,max_backtrace=1/.NumSolids, $current:test1=1,test2=2,test3=3,test4=4/
. Accessor Symbol for accessing field with name, that follows after that it. $current/.Width, $find:id=0x33310001/.Version, $current/.Next.NumTexturePacks
= Key-Value Separator Separator of key and value in current function's argument $global:arg1=0,arg2=1,arg3="foo"/, $rfind:id=0x00134003,max_backtrace=1/, $rfind:id=0x00134002,max_backtrace=1/

Syntax

Types

Function Invoking

Passing Arguments

Object Accessors

Clone this wiki locally