| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Scripting language

Page history last edited by Blake 13 years, 8 months ago

Adding a key to a dungeon

 

Format

There are two kinds of lines in the script files: Commands lines and Non-command lines.

  1. A command line begins with a command in brackets and arguments to that command follow.  Each argument is enclosed in brackets like so: [command][argument1][argument2]
  2. A non-command line is simply text and is handled specially on a per-Scripted-object basis

 

Commands: Generic (used in both Map and Dialog scripts)

  • comment -- explain to yourself, and others, wtf is going on!
  • jump -- move to another portion of the script (this will go from the top of the file until it hits the first label match if label is never found ... well, I don't know what will happen yet)
    • label -- the name of the section we're looking for
  • label -- assign a label for jumping around the script
    • label -- arbitrary text
  • set - not really tested - set some global state variable (used for tracking game progress)
    • var -- the variable we're setting
    • value -- the new value 
  • check -- begin block to check the global state variable (used for checking game progress)
    • var -- the variable we're checking     
    • test -- the type of test
      • eq -- var equals value
      • lt -- var is less than value
      • lte -- var is less than or equal to value
      • gt -- var is greater than value
      • gte -- vare is greater than or equal to value
    • val -- the value we're comparing to 
    • label --jump to this label on true
    • failLabel -- optional, jump to this label on failure
  • end -- end the script, return to the previous scene
  • switch scene - change to another scene
    • newScene -- no idea how you indicate which scene
  • get key -- the player gets a key needed to open a door
    • color -- what color key did they pick up? 

 

Commands: Map Specific

  • set tile -- updates the tile at a location
    • posId -- id indicating which position and primary layer
    • detailLayer -- which detail layer we're acting in
    • tileTypeId -- ID of tile to set (can be found in the tiles.txt file in /data/)
  • remove tile -- removes a tile from the map
    • tileId -- id indicating which position and primary layer
    • detailLayer -- which detail layer should have its tile wiped out
  • dialog - transitions to a dialog scene
    • filepath -- dialog script file to use
    • implemented: do_dialog
  • warp - moves the user to a new location 
    • map -- destination map name (file path)
    • tileId -- ID of a tile on that map (alpha numeric)
    • transitionType, optional -- how the warp will be displayed
      • instant (default)
      • west scroll
      • east scroll 
      • north scroll
      • south scroll 
      • fade
      • pixelate
    • implemented: do_warp
  • launch cutscene -- initiate cutscene
    • cutscene -- the cutscene to start 
  • sign -- launches a sign dialog (or just the dialog scene with text, if you want
    • text to show --  the text shown. Use a dollar sign $ to indicate new lines

 

Commands: Dialog specific

     Sample Script

  • profile -- indicates the image to use of the person speaking
    • image file -- if empty will use no profile pictur
  • pause -- pauses the dialogue, user needs to hit enter to continue 
  • question -- begins a question block
    • text -- the text  of the prompt
  • choice
    • label -- where to jump to in the dialogue if this is the player's choice
    • text -- the choice presented to the user 
  • /question -- ends a question block (causes presetation to the user, waits for input) 

Comments (0)

You don't have permission to comment on this page.