From Adonthell
Jump to navigation Jump to search

The Adonthell Scripting Guide


One of Adonthell’s fundamental design principles is to keep engine and game strictly seperate. Therefore, a lot of game specific functionality is not included in the engine, but needs to be written anew for each game. This makes the engine very flexible and allows to create very different kinds of RPGs. However, it also requires plenty of Python scripting.

To ease this task, this guide has been compiled. It will explain the structure of each script and also give some example code. However, it is not supposed to replace the Adonthell API documentation, which explains the available classes and methods in much greater detail. If the API seems too complex at first, the Architecture documentation should be consulted, as it provides a good overview of the engine’s inner workings.

It is assumed that the reader has at least a basic understanding of Python and object oriented programming (OOP). The Python tutorial is a good source to refresh your memories on these topics, if necessary.


  1. Game Initialization
  2. Event Scripting
  3. Item Scripting
  4. Character Scripting
  5. Dialogue Scripting
  6. Map View
  7. User Interface
  8. Cutscenes


Since Python is no strongly typed language, the type of parameters will often not be obvious in the examples. Therefore it will be added in brackets, where useful. So a line like

   def [item_base] combine (self, [item_base] item) 

indicates that the combine method has both argument and return value of type item base. This helps finding the respective class description in the API documentation.