3 |
|
|
4 |
\subsection{About the Scripting Guide} |
\subsection{About the Scripting Guide} |
5 |
|
|
6 |
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.\\ |
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 {\it Architecture} documentation should be consulted, as it provides a good overview of the engine's inner workings.\\ |
7 |
|
|
8 |
It is assumed that the reader has at least a basic understanding of Python and object oriented programming (OOP). The Python tutorial\footnote{\sf \href{http://www.python.org/doc/current/tut/tut.html}{http://www.python.org/doc/current/tut/tut.html}} is a good source to refresh your memories on these topics, if necessary. |
It is assumed that the reader has at least a basic understanding of Python and object oriented programming (OOP). The Python tutorial\footnote{\sf \href{http://www.python.org/doc/current/tut/tut.html}{http://www.python.org/doc/current/tut/tut.html}} is a good source to refresh your memories on these topics, if necessary. |
9 |
|
|
10 |
\subsection{Conventions} |
\subsection{Conventions} |
11 |
|
|
12 |
Since Python is no strongly typed language, the type of parameters will often be not clear from the examples. Therefore it will be added in brackets, where useful. So a line like |
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 |
13 |
|
|
14 |
{\footnotesize |
{\footnotesize |
15 |
\begin{verbatim} |
\begin{verbatim} |
25 |
|
|
26 |
{\footnotesize |
{\footnotesize |
27 |
\begin{verbatim} |
\begin{verbatim} |
28 |
cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/adonthell login |
export CVS_RSH=ssh |
29 |
cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/adonthell co -P doc |
cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/adonthell co -P doc |
30 |
\end{verbatim} |
\end{verbatim} |
31 |
} |
} |
32 |
|
|
33 |
If prompted for a password, simply hit enter. To update your copy of the code, run |
The first time you do this, you will be prompted by SSH to authenticate the server's key fingerprint. Answer with 'yes'. To update your copy of the code, run |
34 |
|
|
35 |
{\footnotesize |
{\footnotesize |
36 |
\begin{verbatim} |
\begin{verbatim} |