-
-
Notifications
You must be signed in to change notification settings - Fork 2
Cathode scripting overview
Matt Filer edited this page Jan 3, 2023
·
9 revisions
The Cathode Scripting system in Alien: Isolation is super cool, so lets break it down...
- The "COMMANDS.PAK" file holds all scripts for a level in the game, which in CathodeLib can load into (or create via) a
Commandsclass. - Scripts within
Commandsare objects calledComposites. These containEntitytypes which perform our logic. - If you're familiar with Blueprint in Unreal Engine, the structure of
Composites should seem familiar. - There are four types of
Entitywhich aCompositecan hold:-
FunctionEntity- This executes a function. The function can either be hardcoded (which you can pick via the
FunctionTypeenum when creating), or another composite within the Commands object (which you can reference).
- This executes a function. The function can either be hardcoded (which you can pick via the
-
VariableEntity- This acts as an instance of a variable, and can be accessed outside of the
Compositewhen it is instanced as aFunctionEntityvia the parameters.
- This acts as an instance of a variable, and can be accessed outside of the
-
ProxyEntity- This acts as a proxy to an
Entityin anotherComposite. It's useful if you're scripting based on events that occur from nodes in otherCompositescript instances.
- This acts as a proxy to an
-
OverrideEntity- This can override parameters in instances of
CompositereferenceFunctionEntityobjects. For example, say you have aCompositethat places a model with an interactable button, but you want to change the interactable text in this instance - you could use an override to do this.
- This can override parameters in instances of
-
- All
Entitytypes can containParameters, which supply them data. You instance data within aParameterby giving it aParameterDataobject, which can be either:-
cTransform(a position (Y is up), and euler rotation) -
cInteger(an integer) -
cString(a string) -
cBool(a boolean) -
cFloat(a float) -
cEnum(an enum, with an index value) -
cVector3(a vector with X,Y,Z components - sometimes used for colour values) -
cResource(a list of references to resources in the level) -
cSpline(a spline, containing a list of cTransform objects for points along the spline)
-
-
Entityobjects can be linked, either to pass data between eachother, or to trigger events. For example, allEntityobjects have atriggerparameter, which can be linked to in order to trigger them. -
Entityobjects can also reference resources within the game's level (via aresourceparameter which usescResourcetype, or via a direct reference to theEntityitself), such asRENDERABLE_INSTANCEtypes, which reference an index in the level'sRenderableElementsDatabase(which can also be loaded using CathodeLib).
If you'd like to put all of this into action, check out "Creating your first Cathode script" to create an objective popup on level load!