Difference between revisions of "Starward Rogue:XML - Tutorial Definitions"

From Arcen Wiki
Jump to navigation Jump to search
m (Dominus Arbitrationis moved page Starward Rogue:Starward Rogue:XML - Tutorial Definitions to Starward Rogue:XML - Tutorial Definitions without leaving a redirect)
Line 13: Line 13:
  
 
== tutorial sub-node type: phase ==
 
== tutorial sub-node type: phase ==
 
the contents of this node (between the > and the <, so not including the attributes and the tag itself) will be parsed as a test chamber script when the phase is started
 
 
since the parsing doesn't happen until later, those contents will not be error-checked during the loading of the game
 
  
 
*starting_message
 
*starting_message
 
**the message shown to the player when this phase is started
 
**the message shown to the player when this phase is started
 
**this also shows on the escape menu's bottom-right info block during this phase
 
**this also shows on the escape menu's bottom-right info block during this phase
 +
 +
== phase sub-node type: room ==
 +
 +
The contents of this node (between the > and the <, so not including the attributes and the tag itself) will be parsed as a test chamber script when the phase is started
 +
 +
Since the parsing doesn't happen until later, those contents will not be error-checked during the loading of the game
 +
 +
The script attribute must refer to a room whose type has RoomEntranceStyle.NSEW, WidthOnMap = 1, and HeightOnMap = 1. So Starting, Square, etc. If another room type is used it may work, or it may leave you stranded in doors that don't exist, or whatever.
 +
 +
*name (string, required)
 +
**used by room_connection to identify which rooms are being connected
 +
*x_offset_from_first_room (int), y_offset_from_first_room (int)
 +
**the position of the room relative to the first room; so 1,0 is directly east of the first room, 0,-1 is directly north of the first room, etc
 +
**if two rooms are supposed to be connected, they must be cardinally adjacent (no diagonals)
 +
**these are always 0,0 for the first room, even if you specify otherwise
 +
 +
== phase sub-node type: room_connection
 +
 +
*first_room_name (string, required), second_room_name (string, required)
 +
**the names of the two rooms to connect; they must be cardinally adjacent
  
 
[[Starward_Rogue:Main#XML_Documentation|Starward Rogue XML Documentation Main]]
 
[[Starward_Rogue:Main#XML_Documentation|Starward Rogue XML Documentation Main]]
  
 
[[Category:Starward Rogue]]
 
[[Category:Starward Rogue]]

Revision as of 21:49, 5 January 2016

Each .xml file in the Configuration/Tutorials/ directory is parsed, and each child of the root node is read as a separate tutorial.

Each of those nodes will have 1 or more "phase" nodes, and each phase corresponds to a single room that is run in a way very similar to a test chamber

main nodes

  • name
    • the internal name the game will remember this tutorial by; if someone beats the tutorial and this name is later changed, the game will think it's a new (unbeaten) tutorial
  • display_name
    • the name that will be shown on the tutorial list to the player
  • end_message
    • the message shown to the player when this entire tutorial is successfully completed

tutorial sub-node type: phase

  • starting_message
    • the message shown to the player when this phase is started
    • this also shows on the escape menu's bottom-right info block during this phase

phase sub-node type: room

The contents of this node (between the > and the <, so not including the attributes and the tag itself) will be parsed as a test chamber script when the phase is started

Since the parsing doesn't happen until later, those contents will not be error-checked during the loading of the game

The script attribute must refer to a room whose type has RoomEntranceStyle.NSEW, WidthOnMap = 1, and HeightOnMap = 1. So Starting, Square, etc. If another room type is used it may work, or it may leave you stranded in doors that don't exist, or whatever.

  • name (string, required)
    • used by room_connection to identify which rooms are being connected
  • x_offset_from_first_room (int), y_offset_from_first_room (int)
    • the position of the room relative to the first room; so 1,0 is directly east of the first room, 0,-1 is directly north of the first room, etc
    • if two rooms are supposed to be connected, they must be cardinally adjacent (no diagonals)
    • these are always 0,0 for the first room, even if you specify otherwise

== phase sub-node type: room_connection

  • first_room_name (string, required), second_room_name (string, required)
    • the names of the two rooms to connect; they must be cardinally adjacent

Starward Rogue XML Documentation Main