The main ini file - pyskool.ini - defines key bindings and the appearance and content of the game menus. Each section is described below.
The Keys
section defines the key bindings. Each line in the section has the
form:
actionId, key1, key2, ...
where actionId
is the identifier of the action to bind to the keys
key1
, key2
and so on. Any number of keys may be bound to an action.
Pyskool recognises the following action identifiers for moving Eric:
LEFT
- move leftRIGHT
- move rightUP
- move upDOWN
- move downSIT_STAND
- sit down or stand upOPEN_DESK
- open a deskFIRE_CATAPULT
- fire the catapultFIRE_WATER_PISTOL
- fire the water pistolDROP_STINKBOMB
- drop a stinkbombHIT
- throw a punchJUMP
- jumpWRITE
- start writing on a blackboardENTER
- finish writing on a blackboardCATCH
- try to catch a mouse or frogUNDERSTOOD
- acknowledge understanding of a messageMOUNT_BIKE
- mount the bikeDUMP_WATER_PISTOL
- throw away the water pistolRELEASE_MICE
- release some miceKISS
- try to kiss someone
In addition, Pyskool recognises the following identifiers for actions not related to moving Eric:
QUIT
- quit PyskoolFULL_SCREEN
- toggle full-screen modePAUSE
- pause the gameSCREENSHOT
- take a screenshotSAVE
- save the gameLOAD
- load the most recently saved gameMENU
- show the menuMENU_EXIT
- hide the menu and resume the gameMENU_PREV
- move to the previous item in the menuMENU_NEXT
- move to the next item in the menuMENU_EXEC
- execute the selected menu item
Pygame uses keyboard constants to identify keys; a full list of those constants
can be found in the
pygame documentation. The key names
(key1
, key2
etc.) declared in a line of the Keys
section should
match the names of the Pygame keyboard constants, but with the K_
prefix
removed.
Each Menu ...
section defines a menu and its appearance. The section name
has the form:
Menu menuId
where menuId
is a unique identifier for the menu. The section may contain
the following configuration parameters:
Alpha
- the transparency of the menu (0=fully transparent, 255=fully opaque)Highlight
- the background colour of the selected menu itemInk
- the ink colour to use for the title, menu items and status barPaper
- the main background colourStatusPaper
- the background colour of the status barTitle
- the menu titleTitlePaper
- the background colour of the title barWidth
- the width of the menu (as a fraction of the screen width)
At the moment, pyskool.ini contains the definition for only one menu, whose
unique ID must be Main
.
Each MenuItems ...
section defines the menu items for a menu. The section
name has the form:
MenuItems menuId
where menuId
is the unique identifier of the menu (defined by a :ref:`menu`
section).
Each line in the section has the form:
operation, text
where:
operation
is the unique ID of the operation to which the menu item is boundtext
is the text of the menu item
The operation IDs recognised by Pyskool are:
LOAD
- load the most recently saved gameQUIT
- quit PyskoolRESUME
- hide the menu and resume the gameSAVE
- save the gameSCALE_DOWN
- decrease the scale factor by 1SCALE_UP
- increase the scale factor by 1