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.
- Game Initialization
- Event Scripting
- Item Scripting
- Character Scripting
- Dialogue Scripting
- Map View
- User Interface
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.