Node-X is the system and NodeScript is the code which I developed and which I use to create my CYOA/Multiple-Choice adventure games. It has been used as a DOS beta in my first game “Project Delta” (see IFComp 2008), as a DOS/Linux release version of Generation 1 in my second game “Trap Cave” (see IFComp 2009) and as a Windows beta of Generation 2 in my third game “Dead Hotel” (see IFComp 2011).
Beta versions of my Node-X system are usually called “internals” and release versions are called “externals”. Project Delta and Dead Hotel are internals, because you can run the games, but you can’t write your own adventures for the system/engine, because engine and game are both compiled in the exe file. Trap Cave is the only external so far, because you may run the game or not, but most important of all, you can code and write your own CYOA adventures for Node-X Generation 1, because the engine reads external game files, interpretes them and converts them into program code.
Trap Cave (incl. Node-X Generation 1)
ifarchive.org/indexes/if-arc … pcave.html
Trap Cave NodeScripts (*.nx)
ifarchive.org/indexes/if-arc … XGame.html
Now after 2-3 years I have decided to publish a de-obfuscated reference manual for NodeScript in this forum. Obfuscation is known as a method to confuse or express something in a way that it can only be understood by insiders.
So I made the NodeScript look obfuscated. I did this, not to confuse anyone or hide anything, but simply because I hadn’t coded any editor for my Node-X system. I had to type everything manually in a text editor. And I didn’t want to type or copy+paste the long names of variables and ENUMs every time when I coded my Trap Cave adventure. That’s why I replaced everything with very short abbreviations and made the Node-X engine understand those when a NodeScript file (*.nx) was read.
Now my fourth and upcoming CYOA/MCA game in 2012 is most likely to be an external version again, using the newer Node-X Generation 2 this time. The second generation has been showcased to a certain extent in my third game Dead Hotel. The fourth game will not only be a game release, but an editable system release aswell, using NodeScript as interpreter code in external game files.
Thus I’m releasing this de-obfuscated NodeScript reference manual for any CYOA author out there who may be interested to code custom Node-X adventures for generation 1 (included in Trap Cave download) and upcoming generation 2, and wants a better understanding of the script. This reference manual may also be helpful for experienced programmers on how to code a more advanced system or engine for CYOA/MCA games. And because I’m going to keep abbreviations in NodeScript. It not only creates smaller game files, although this is less of a problem in these modern days, but it is also faster to edit NodeScript with a text editor, because you don’t have to type so much.
Here we go…
[NX.NodeScript] Gen = Generation EC = EngineClass (see classes below) TE = TextEncode (see encodes below) [FI] = FileInfo D = Date T = Time [GI] = GameInfo T = Title A = Author V = Version L = Language [NI] = NetInfo E = Email U = URL [GIF] = GameInterface CS = ColorScreen CT = ColorText CTi = ColorTitle CL = ColorLocation CN = ColorNode CK = ColorKey CC = ColorChoice CLi = ColorLine LS = LineStyle [FIF] = FileInterface SF = SaveFile [Inv] = Inventory EC = ElementColor EN = ElementName SEN = SubElementName SLN = SubLeftName SRN = SubRightName SLA = SubLeftAbbreviation SRA = SubRightAbbreviation EV = ExamineVerb PV = PutVerb PVA = PutVerbAdditive CI = ColorItem [PS] = PlayerStart bInv = bInventory (Inventory bool flag, true or false) N = StartNode LI = StartLeftItem RI = StartRightItem [Ls] = Locations [NTx] = NodeText x [ATx] = AlternativeText x [ITx] = ItemText x (Item Description) [Cs] = Choices [Qs] = Questions (yes/no type) [Nx] = Node x bNF = bNodeFlag (true or false) PCA = PreCallAction (see actions below) PCF = PreCallFlag PCJ = PreCallJump L = Location NT = NodeType (see types below) T = NodeText NC[x] = NodeChoice[x] NJ[x] = NodeJump[x] GQ = GateQuestion GJK[x] = GateJumpKey[x] NI = NodeItem bIF = bItemFlag (true or false) FSC = FlagSetChoice FUC = FlagUnsetChoice AT = AlternativeText AC = AlternativeChoice AJ = AlternativeJump [Ix] = Item x IT = ItemType (see types below) IN = ItemName T = ItemText CT = CombineTag CI = CombineItem CV = CombineVerb CVA = CombineVerbAdditive bIU = bItemUndo (undo bool flag, true or false) UV = UndoVerb UVA = UndoVerbAdditive UMI = UndoMasterItem USI = UndoSlaveItem EngineClasses (EC) NJ = NodeJumper (default cyoa engine) NL = NodeLinker (not yet implemented) TextEncodes (TE) R13 = Rot13 R47 = Rot47 2R = 2Rot/DoubleRot (combination of Rot13+Rot47) PreCallActions (PCA) ENUMs for Nodes (things that happen before a node is called / a cyoa page is displayed) none = PRE_None HI = PRE_HideInventory SI = PRE_ShowInventory TI = PRE_TakeItemFromPlayer GI = PRE_GiveItemToPlayer AS = PRE_AutoSaveHere IJ = PRE_ItemJump AIJ = PRE_AnyItemJump FJ = PRE_FlagJump AF = PRE_AlternativeFlag UF = PRE_UnsetFlag SF = PRE_SetFlag TF = PRE_ToggleFlag IF = PRE_ItemFlag CIF = PRE_CombinedItemFlag UIF = PRE_UndoItemFlag LIF = PRE_LeftItemFlag RIF = PRE_RightItemFlag NodeTypes (NT) ENUMs for Nodes (specific behaviour of a node / cyoa page) DN = NT_DeadNode (a node with no choices, used for game over and end pages) JN = NT_JumpNode (a node with no choices, but with one destination to jump to next) GT = NT_GateNode (a node with a yes/no choice, gate question) PN = NT_PathNode (a node with a number of choices and destinations, your regular cyoa page) FN = NT_FlagNode (a node with choices, flag-controlled) IN = NT_ItemNode (a node with choices, and a specific item to be either picked up or placed) ItemTypes (IT) ENUMs ST = IT_Standard (your regular item) MC = IT_MasterCombiner (a master item which requires a slave item to create a new item) SC = IT_SlaveCombiner (a slave item for a master item to create a new item)
- Comazombie / Emilian Kowalewski