Below is an example of a simple Node-X adventure in Nini’s format. It is a conversion of the original demoroom_en.nx script file from the Node-X 1.1 distribution package (see IFComp 2009 entry “Trap Cave”):
[code]; -------------------------------------------------------------------
; demoroom_en.nini (conversion of demoroom_en.nx)
;
; Node-X Interpreter (NXI) v2.x or higher required to run this file!
; (not yet released)
;
; NodeScript and NINI format by Emilian Kowalewski © 2007-2010
;--------------------------------------------------------------------
[NodeScript.NINI]
Generation=1
EngineClass=NodeJumper
[FileInfo]
Date=09/26/2009
Time=19:00
[GameInfo]
Title=Demo: One Room Adventure
Author=Emilian K.
Version=1.0
Language=English
[NetInfo]
Email=@
URL=%
[GameInterface]
LineStyle=Single
[FileInterface]
SaveFile=demoroom
[Inventory]
ElementName=Body
SubElementName=hand
SubElementLeftName=left
SubElementRightName=right
SubElementLeftAbbr=LH
SubElementRightAbbr=RH
[PlayerStart]
bInventory=False
Node=1
[Locations]
1=Description
2=Office
3=End
[Choices]
1=examine chair
2=look around
3=examine desk
4=walk to door
5=open drawer
6=close drawer
7=take key
8=put key in drawer
9=go to desk
10=open door
11=unlock door
[NodeText1]
1=^This script demonstrates how to write a basic one room
2=^adventure with one exit to be unlocked with one item.
4=^This text shows how to center a line on the screen.
5=^For documentation, tutorials and/or help please visit
6=^the Node-X Forum (see URL).
[Node1]
Location=1
NodeText=1
NodeType=JumpNode
NodeJump[1]=2
[NodeText2]
1=You are inside an office and sit on a chair.
[Node2]
PreCallAction=ShowInventory
Location=2
NodeText=2
NodeType=PathNode
NodeChoice[1]=1
NodeChoice[2]=2
NodeJump[1]=3
NodeJump[2]=4
[NodeText3]
1=It’s a black leather chair which can be rotated 360 degrees.
[Node3]
Location=2
NodeText=3
NodeType=JumpNode
NodeJump[1]=2
[NodeText4]
1=You look around the office. In front of you is a desk and a door behind it.
[AltText4]
1=You rotate the chair and take a look around the office.
2=There is a desk in front of you and a door behind it.
[Node4]
PreCallAction=AltFlag
PreCallFlag=3
Location=2
NodeText=4
AltText=4
NodeType=PathNode
NodeChoice[1]=3
NodeChoice[2]=4
NodeJump[1]=5
NodeJump[2]=8
[NodeText5]
1=It’s a white wooden desk with a drawer on the front.
[AltText5]
1=You are in front of the desk.
[Node5]
Location=2
NodeText=5
AltText=5
NodeType=PathNode
NodeChoice[1]=5
NodeChoice[2]=4
NodeJump[1]=6
NodeJump[2]=8
[NodeText6]
1=You have opened the drawer.
[Node6]
Location=2
NodeText=6
NodeType=ItemNode
NodeChoice[1]=6
NodeJump[1]=7
NodeItem=1
bItemFlag=False
FlagSetChoice=7
FlagUnsetChoice=8
[ItemText1]
1=A modern silver key to open office doors.
[Item1]
ItemType=Standard
ItemName=key
ItemText=1
[NodeText7]
1=You have closed the drawer.
[Node7]
Location=2
NodeText=7
NodeType=PathNode
NodeChoice[1]=5
NodeChoice[2]=4
NodeJump[1]=6
NodeJump[2]=8
[NodeText8]
1=You stand in front of the office door.
[Node8]
PreCallAction=ItemJump
PreCallJump=10
Location=2
NodeText=8
NodeItem=1
NodeType=PathNode
NodeChoice[1]=10
NodeChoice[2]=9
NodeJump[1]=9
NodeJump[2]=5
[NodeText9]
1=You can’t open the door. It’s locked!
[Node9]
Location=2
NodeText=9
NodeType=JumpNode
NodeJump[1]=8
[Node10]
Location=2
NodeText=8
NodeType=PathNode
NodeChoice[1]=9
NodeChoice[2]=11
NodeJump[1]=5
NodeJump[2]=11
[NodeText11]
1=You have unlocked the door and left the office. Game solved!
[Node11]
Location=3
NodeText=11
NodeType=DeadNode
; End of script[/code]