The Dialog Manual

This is Revision 2 of the Dialog Manual. It describes version 0c of the Dialog language, and version 0.15 of its standard library. Dialog is currently in its beta stage, which means that the language may still undergo significant changes.

Preface

Overview • Structure of the manual • Acknowledgements

Part I: The Programming Language

Predicates and rules • Printing text • Parameters, objects, and wildcards • Success and failure
Local variables • Values • Unification • Partial lists and recursion
Disjunctions • Backtracking • Multi-queries • Visiting all solutions • Collecting values • Collecting words • Just • Infinite loops
If-statements • Negation • Selecting among variations • Stoppable environments • The status bar
Global flags • Per-object flags • Global variables • Per-object variables • Has parent
Access predicates • The current topic • Nested queries in rule heads • Alternatives in rule heads • Automated object generation
Checking the type of a value • Numbers and arithmetic • Styles and formatting • Input • Debugging • System control
Story metadata • Fatal runtime errors • Some notes on performance • Limitations and the future of Dialog

Part II: The Standard Library

Architecture of the library • Running the code examples • A minimal story
Populating the game world • Defining new predicates • Object locations • Dynamic predicates • Hidden objects
Custom traits • Linguistic predicates and traits • Full names • Standard traits for categorizing objects
Pristine and handled objects • Plural forms • Appearance
Rooms and map connections • Regions and floating objects • Light and darkness • Reachability, visibility, and scope • Doors and locks • Moving the player character • Path finding
Introduction to actions • How actions are processed • Stopping and ticking • Instead of, prevent, and perform • Narration predicates • Diversion • Refuse and before
Core actions • Actions that reveal information • Actions that print a message • Diverting actions • Communication • Navigation • Miscellaneous actions • Debugging actions
Timed code • Cutscenes • The intro • Keeping score • The status bar • Game over
Complex actions • The parsing process • Parsing actions • Defining new actions • Parsing object names • Directions and numbers • Topics • Adjusting the likelihood of actions • Synonyms • Asking for clarification • Rule order • Example: Defining a new action
Pronouns • List manipulation • Object tree manipulation • Common checks and complaints • Asking simple questions • Identical objects