Pyskool 0.1.2 (2009-07-22)

1 What is Pyskool?
2 Installing and running Pyskool
2.1 General notes
2.2 Linux/FreeBSD
2.3 Mac OS X
2.4 Windows
2.5 Command line options
3 Playing Pyskool
3.1 Skool Daze mode
3.1.1 Original game instructions
3.1.2 School Rules
3.2 Back to Skool mode
3.3 Keys
4 TODO
5 Bugs
6 Changelog
6.1 Pyskool 0.1.2 (2009-07-22)
6.2 Pyskool 0.1.1 (2009-04-29)
6.3 Pyskool 0.1 (2008-11-12)
6.4 Pyskool 0.0.4 (2008-10-24)
6.5 Pyskool 0.0.3 (2008-10-08)
6.6 Pyskool 0.0.2 (2008-09-23)
6.7 Pyskool 0.0.1 (2008-09-09)
7 Customising Pyskool
7.1 Graphics
7.2 The ini file
7.2.1 [Game]
7.2.2 [Images]
7.2.3 [Sounds]
7.2.4 [SpriteGroup *]
7.2.5 [Characters]
7.2.6 [Eric]
7.2.7 [CatapultPellets]
7.2.8 [Timetable]
7.2.9 [SpecialPlaytimes]
7.2.10 [Lesson *]
7.2.11 [RandomLocations]
7.2.12 [SkoolLocations]
7.2.13 [CommandList *]
7.2.14 [Rooms]
7.2.15 [Chairs]
7.2.16 [Doors]
7.2.17 [DoorImages]
7.2.18 [Walls]
7.2.19 [Staircases]
7.2.20 [Floors]
7.2.21 [Routes]
7.2.22 [NoGoZones]
7.2.23 [SitDownMessages]
7.2.24 [CharacterWidths]
7.2.25 [AssemblyMessages]
7.2.26 [Blackboards]
7.2.27 [BlackboardMessages]
7.2.28 [QuestionsAndAnswers *]
7.2.29 [LinesMessages]
7.2.30 [LessonMessages]
7.2.31 [Shields]
7.2.32 [Safe]
7.2.33 [Grass]
7.2.34 [SkoolMessages]
7.3 Command reference
7.3.1 AddLines
7.3.2 AwaitAssemblyTime
7.3.3 CheckIfTouchingEric
7.3.4 ConductAssembly
7.3.5 ConductClass
7.3.6 ConductClassWithEric
7.3.7 Dethroned
7.3.8 EndGame
7.3.9 FetchEric
7.3.10 FindEric
7.3.11 FindEricIfMissing
7.3.12 FindSeat
7.3.13 FireCatapult
7.3.14 FireNowAndThen
7.3.15 Follow
7.3.16 Fly
7.3.17 Freeze
7.3.18 GoTo
7.3.19 GoToRandomLocation
7.3.20 GoTowardsXY
7.3.21 GoToXY
7.3.22 GrassAndAnswerQuestions
7.3.23 Hide
7.3.24 Hit
7.3.25 HitNowAndThen
7.3.26 Jump
7.3.27 JumpIfOpen
7.3.28 JumpIfShut
7.3.29 KnockedOut
7.3.30 KnockedOver
7.3.31 MoveAboutUntil
7.3.32 OpenDoor
7.3.33 Restart
7.3.34 Say
7.3.35 SetClock
7.3.36 SetControllingCommand
7.3.37 SetRestartPoint
7.3.38 ShutDoor
7.3.39 Signal
7.3.40 SitForAssembly
7.3.41 SitStill
7.3.42 StalkAndHit
7.3.43 StartAssemblyIfReady
7.3.44 StartDinnerIfReady
7.3.45 StartLessonIfReady
7.3.46 TellClassWhatToDo
7.3.47 TellEric
7.3.48 TellEricAndWait
7.3.49 TellKidsToSitDown
7.3.50 TripPeopleUp
7.3.51 Unsignal
7.3.52 WaitAtDoor
7.3.53 WalkAround
7.3.54 WalkFast
7.3.55 WalkUpOrDown
7.3.56 WatchForEric
7.3.57 WipeBoard
7.3.58 Write
7.3.59 WriteOnBoard
7.3.60 WriteOnBoardUnless
7.4 Example customisations
7.4.1 Cursing CREAK
7.4.2 Blackboard blasphemy
7.4.3 800 LINES PERKINS
7.4.4 Punch the pedagogue
7.4.5 History in the Map Room
7.4.5.1 Adding an entry to the timetable
7.4.5.2 Creating the lesson
7.4.6 All aboard the Science Lab
7.4.6.1 Adding an entry to the timetable
7.4.6.2 Creating the lesson
7.4.7 Where's the chalk?
7.5 Example ini files
8 Frequently asked questions
8.1 How does Pyskool differ from the original games?
8.2 Why Python (and Pygame)?
8.3 Why Skool Daze and Back to Skool?

1 What is Pyskool?

In 1985, Microsphere published Skool Daze, a game for the Sinclair ZX Spectrum. Later in the same year, the sequel Back to Skool was published.

Each game was based in a boys' school (though Back to Skool added a playground and a girls' school) and revolved around the antics of Eric, the hero. In Skool Daze, Eric must steal his report card from the school safe - the combination of which must be extracted from the teachers' brains using flashing shields or, in the case of the history teacher, post-hypnotic suggestion. In Back to Skool, Eric must get his report card back into the school safe, this time with the extra help provided by a water pistol, stinkbombs, a bike, mice, a frog and a girlfriend.

Pyskool is a project to re-implement these classic games in Python and Pygame, with the aim of making them easy to customise by editing a configuration file or - for more advanced customisation - writing some Python code. For information on how the project is progressing, pop by the Pyskool blog once in a while.

2 Installing and running Pyskool

2.1 General notes

Pyskool requires Python (version 2.5+) and Pygame (version 1.7+).

2.2 Linux/FreeBSD

You almost certainly have Python already installed, and there are probably Pygame packages available via the package management system. Debian-based distros have python-pygame, openSUSE has python-pygame, Fedora has pygame, and FreeBSD has py25-game (for example).

To start Pyskool in Skool Daze mode, open a terminal window, change to the directory containing this documentation, and do:

$ ./sd.py

or, to run Pyskool in Back to Skool mode:

$ ./bts.py

2.3 Mac OS X

For OS X there are Python packages available here, and Pygame packages available here.

When Python and Pygame are installed, open a terminal window, change to the directory containing this documentation, and do:

$ ./sd.py

to run Pyskool in Skool Daze mode; or, to run Pyskool in Back to Skool mode:

$ ./bts.py

2.4 Windows

For Windows there are Python packages available here, and Pygame packages available here.

To run Pyskool in Skool Daze mode, double-click the sd.py file in the same directory as this documentation. To run Pyskool in Back to Skool mode, double-click bts.py.

If that doesn't work, try the command line. If you have Python installed in C:\Python25, open a command prompt, change to the directory containing this documentation, and do:

> c:\python25\python.exe sd.py

to run Pyskool in Skool Daze mode; or, to run Pyskool in Back to Skool mode:

> c:\python25\python.exe bts.py

2.5 Command line options

The sd.py and bts.py executables support a few command line options:

3 Playing Pyskool

3.1 Skool Daze mode

3.1.1 Original game instructions

In the role of our hero, Eric (or any other name you decide to call him and the rest of the cast), you know that inside the staffroom safe are kept the school reports. And, being Eric, you realise that you must at all costs remove your report before it comes to the attention of the Headmaster.

The combination to the safe consists of four letters, each master knowing one letter and the Headmaster's letter always coming first. To get hold of the combination, you first have to hit all the shields hanging on the school walls. Trouble is, this isn't as easy as it looks. Some of them can be hit by jumping up. Others are more difficult. You could try and hit a shield by bouncing a pellet off a master's head whilst he is sitting on the ground. Or, being Eric, you may decide to knock over one of the boys and, whilst he's flattened, clamber up on him so that you can jump higher.

OK. So all the shields are flashing wildly, disorientating the poor masters. Knock them over now and, before they can stop themselves, they'll reveal their letter of the code. All except for the history master, of course, who because of his great age and poor eyesight can't be trusted to remember. His letter has been implanted into his mind hypnotically. To make him reveal it, you must find out the year he was born (which, in case you were wondering, changes each game). Then, creep into a room before he gets there and, if the board is clean, write it on the blackboard. When he goes into that room and sees his birthdate he will, as if by post-hypnotic suggestion, give away his letter.

Now that you know all the letters of the combination, all you have to do is work out which order they go in. You know that the Headmaster's letter is always first, but as for the other three...you'll just have to try the various possibilities. Find a clean blackboard and write out a combination.

Rush back to the staffroom and jump up to reach the safe with your hand. If nothing happens, then the combination must be wrong, so you'd better find another clean blackboard and try a different one.

With the safe open, your troubles still aren't over, as the flashing shields are rather a giveaway. To stop them flashing, you now have to hit all of them again.

Done it? Congratulations! You are now allowed, along with all your friends, to move on to the next class at school. But remember, there will be reports at the end of this term...

3.1.2 School Rules

Boys shall attend lessons as shown in the timetable at the bottom of the screen. (Remember that because you cheated in the exams last year, you always go to the same lessons as the swot.)

Boys do not score points by attending lessons, but may be given lines if caught in the wrong place.

Boys who acquire over 10,000 lines shall be expelled immediately from the school.

Boys are not allowed to enter the staffroom or the Headmaster's study. Take care.

At playtime, boys are supposed to be playing and not in any of the classrooms.

Boys shall not hit their schoolmates.

Boys shall not fire catapults.

Boys are expected to walk quietly in the corridors - they are not for running or sitting in.

School dinners are compulsory.

Boys will be neat and polite at all times.

3.2 Back to Skool mode

At the moment there is not much of a game to play; adding game elements unique to Back to Skool will be the focus of Pyskool from now on.

3.3 Keys

The keys to move Eric around are:

Eric always walks fast. In the original games Eric walked slow unless you held down the shift key; I always held down the shift key, so didn't feel motivated to include a 'slow mode'.

Other useful keys are:

4 TODO

In case you hadn't noticed, Pyskool is very much a work in progress. There's lots of stuff that remains to be done in Back to Skool mode, including (but not, as the saying goes, limited to):

5 Bugs

No doubt there are bugs in Pyskool - and in this documentation - or ways it deviates unacceptably from the original games. To report bugs (reproducible crashes, especially), please contact me (Richard Dymond) at rjdymond@gmail.com.

6 Changelog

6.1 Pyskool 0.1.2 (2009-07-22)

6.2 Pyskool 0.1.1 (2009-04-29)

6.3 Pyskool 0.1 (2008-11-12)

In Skool Daze mode:

6.4 Pyskool 0.0.4 (2008-10-24)

In Skool Daze mode:

6.5 Pyskool 0.0.3 (2008-10-08)

6.6 Pyskool 0.0.2 (2008-09-23)

6.7 Pyskool 0.0.1 (2008-09-09)

Initial public release.

7 Customising Pyskool

What follows is a description of every section of the ini files, and every command found in the command lists that control the characters. Armed with this knowledge, you'll be able to start mucking around with how Pyskool works and the game characters behave.

If you can't be bothered to read any of this and instead just want to get your modding hands dirty right now, head over to Example customisations.

If you're even lazier than that, head over to Example ini files for a description of the ready-made customised ini files distributed with Pyskool.

7.1 Graphics

The stock Pyskool graphics are stored in PNG files in subdirectories named bts, common and sd under images/originalx1. The PNG files are:

These images were extracted straight from memory snapshots of Skool Daze and Back to Skool, and are therefore identical to the graphics in the original games (hence the original prefix in the directory name).

The *_ink.png and *_paper.png files are used in GraphicsMode 1 (see [Game]) in order to emulate the Spectrum display, which was restricted to two colours ('ink' and 'paper') per 8x8-pixel block.

sprites.png is an 8x16 array of sprites for the characters in the game. These sprites are all facing left, and are flipped to obtain the corresponding right-facing sprite.

Any of these images can be customised using your favourite image editor.

Pyskool performs the following steps to determine the base directory for graphics to use in the game:

The actual image files used from the base directory are defined in the [Images] section.

If you wanted to create your own hi-res graphics at 2x the original Spectrum size, you could place them under a base directory called <ImagesDir>/Customx2 and use the following config values in the [Game] section:

ImageSet: Custom Scale: 2 GraphicsMode: 0

7.2 The ini file

The ini file (skool_daze.ini or bak2skool.ini) determines many aspects of the game, such as the names of the characters, the order of the lessons, and what characters do during lessons. Each section of the ini file is described below.

7.2.1 [Game]

The Game section contains configuration parameters in the format:

param-name, param-value

Recognised parameters are:

7.2.2 [Images]

Each line in the Images section takes the form:

imageId, path

where imageId is the unique ID of an image, and path is the location of the corresponding image file on disk (relative to the ImagesDir directory declared in the [Game] section). Recognised image IDs and the images they refer to are:

7.2.3 [Sounds]

Each line in the Sounds section takes the form:

soundId, path

where soundId is the unique ID of a sound sample, and path is the location of the sound sample on disk (relative to the SoundsDir directory declared in the [Game] section). Recognised sound sample IDs and the samples they refer to are:

7.2.4 [SpriteGroup *]

The [SpriteGroup *] section names take the form:

SpriteGroup spriteGroupId

where spriteGroupId is a unique ID for a group of sprites in sprites.png (see Graphics) - such as BOY for the little boys, or TEARAWAY for the Tearaway. The unique ID can be anything you like; it is used only in the [Characters] section later on to link a character to a specific group of sprites.

Each line in a SpriteGroup section represents a single sprite from sprites.png and takes the form:

spriteId, index

where spriteId is the descriptive ID for the sprite (unique within the section), and index is the index of the sprite as it appears in sprites.png. Recognised sprite IDs and their meanings are:

7.2.5 [Characters]

Each line in the Characters section takes the form:

characterId, name[/title], spriteGroupId, initial-animatory-state, (x, y), flags

and corresponds to a single character, where:

The initial animatory state takes form "Ln" or "Rn", where "L" means facing left, "R" means facing right, and n is the index of the WALKn sprite (see [SpriteGroup *]).

Recognised flags and their meanings are:

7.2.6 [Eric]

The Eric section describes our hero, Eric. It contains a single line in the format:

characterId, name, spriteGroupId, initial-animatory-state, (x, y), flags

where:

For a description of the format of the initial animatory state and the available flags, see [Characters].

7.2.7 [CatapultPellets]

Each line in the CatapultPellets section takes the form:

characterId, spriteGroupId, commandListId, range, hit-zone

where:

Each character whose unique ID appears in this section will be fitted out with a catapult. In the stock Pyskool this will be Eric and the Tearaway - the only characters with catapult-firing sprites.

7.2.8 [Timetable]

The Timetable section contains an ordered list of lesson IDs. Lessons happen starting with the first in the list, and proceed one by one to the end of the list. When the last lesson in the list is finished, the game loops back round to the first lesson in the list.

An example of a lesson ID is Creak-BlueRoom-1, which refers to the first of a set of lessons in which Eric and the Swot are taught by MR CREAK in the Blue Room. The lesson ID could be anything, but it's helpful to make it descriptive.

A lesson can be thought of as a set of entries from the personal timetables of the characters. These sets of entries can be found in the [Lesson *] sections, described below.

7.2.9 [SpecialPlaytimes]

The SpecialPlaytimes section is used only in skool_daze.ini, and contains a list of lesson IDs that refer to playtimes which will be considered "special". A special playtime does not appear in the timetable proper (though you could insert it), but three times out of eight a random special playtime is substituted for an actual playtime timetable entry. In the stock skool_daze.ini the SpecialPlaytimes section looks like this:

Playtime-Mumps Playtime-SwotGrass Playtime-HiddenPeaShooter

Thus, three playtimes out of every eight in Skool Daze mode will be one of those where you have to steer clear of the pestilential Bully, prevent the Swot from reaching the head's study, or fix the race to the fire escape between the Tearaway and the headmaster.

7.2.10 [Lesson *]

The [Lesson *] section names take the form

Lesson lessonId [*]characterId, roomId

if the lesson will take place with a teacher in a classroom or the dinner hall, or

Lesson lessonId locationId

if the lesson is an unsupervised period, where:

Each line in a [Lesson *] section takes the form

characterId, commandListId

where characterId is the unique ID of a character (see [Characters]), and commandListId is the ID of the 'command list' that will control the character's movements during the lesson. A command list is a sequence of commands - such as GoTo or FindSeat - that make a character appear intelligent (kind of). See [CommandList *] for more details.

In any [Lesson *] section there should be one line for each character defined in the [Characters] section.

7.2.11 [RandomLocations]

The RandomLocations section contains lists of suitable locations for the characters to visit when they go on walkabouts (e.g. during playtime). Each line takes the form:

characterId, (x1, y1), (x2, y2)...

where characterId is the character's unique ID (see [Characters]), and (x1, y1) and so on are the coordinates of locations in the skool. There must be at least one pair of coordinates per line, and there should be one line for each character defined in the [Characters] section.

7.2.12 [SkoolLocations]

The SkoolLocations section contains a list of descriptive IDs for commonly used locations in the skool. These descriptive IDs are used by the GoTo command in the command lists that control the characters (see [CommandList *] below). Each line in this section takes the form:

locationId, x, y

where locationId is the descriptive ID, and x and y are the coordinates of the location. An example of a location ID is BlueRoomDoorway, which means exactly what you think it means.

7.2.13 [CommandList *]

The [CommandList *] section names take the form

CommandList commandListId

where commandListId is a descriptive unique ID for the list of commands that follows. These unique IDs are used in the [Lesson *] sections: for each type of lesson there is, every character is assigned a single command list to follow.

One example of a command list is:

[CommandList Walkabout1-Wacker] GoTo, HeadsStudy:Left GoToRandomLocation Restart

This command list is used occasionally by the headmaster; it makes him repeatedly go to one of his random locations and then back to his study.

Each line in a command list takes the form of the command name followed a comma-separated list of arguments. See the command reference for more details on the commands that may be used to control a character.

7.2.14 [Rooms]

The Rooms section contains one line for each classroom in the skool. Each line takes the form:

roomId, name, y, minX, maxX

where:

7.2.15 [Chairs]

The Chairs section contains one line for each classroom in the skool. Each line takes the form:

roomId, x1, x2...

where roomId is the classroom's unique ID (see [Rooms]), and x1, x2 and so on are the x-coordinates of the chairs in the classroom.

7.2.16 [Doors]

The Doors section contains details of the doors and windows in the game. Each line takes the form:

doorId, x, bottomY, topY, initial-status[, auto-shuts]

where:

7.2.17 [DoorImages]

The DoorImages section contains details of the images that will be used for the doors and windows when they are open or shut. Each line takes the form:

doorId, shutTopLeft, size, coords

where:

The door/window images can be found in mutables.png (or mutables_ink.png and mutables_paper.png if GraphicsMode is 1 - see Graphics). mutables.png is arranged so that the image of a door/window when open is at (x + width, y), where (x, y) are the coordinates of the image of the same door/window when shut. The open/shut images for any given door/window are the same size.

7.2.18 [Walls]

The Walls section contains details of the impenetrable barriers in the skool. Each line takes the form:

x, bottomY, topY

where x is the wall's x-coordinate, and bottomY and topY are the y-coordinates of the bottom and top of the wall. For example:

0, 20, 0

defines the wall at the far left (x = 0) of the skool, which stretches from the bottom floor (y = 20) to the ceiling of the top floor (y = 0).

7.2.19 [Staircases]

The Staircases section contains details of the staircases in the skool. Each line takes the form:

staircaseId[:alias], bottom, top[, force]

where:

In the stock Pyskool, force is used only for the staircase in Back to Skool that leads down to the assembly hall stage; it's the only staircase that you must go up or down if you approach it.

An example of a line from the Staircases section is:

UpToStudy:DownFromStudy, (91, 10), (84, 3)

which defines the staircase that leads up to the head's study in Back to Skool. This staircase's unique ID is UpToStudy, but it can also be referred to as DownFromStudy. These unique IDs and aliases are used later on in the [Routes] section.

7.2.20 [Floors]

The Floors section contains details of the "floors" in the skool. A "floor" (note the quotes) is a region of the skool that cannot be reached from another region of the skool without navigating a staircase. For example, in Skool Daze, the region to the left of the Map Room wall is one floor, and the region to the right of the Map Room wall is another floor. You can't get from one to other without going up or down a staircase (walking through walls is prohibited).

Each line in this section takes the form:

floorId, minX, maxX, y

where:

The unique IDs are used in the [Routes] section (see below).

7.2.21 [Routes]

The Routes section is one of the most important sections in the ini file. It defines the routes (a route may be considered as a list of staircases) that the characters must take to get from where they are to wherever they are going. Any errors here will result in the characters wandering aimlessly around the skool, unable to find classrooms, the playground, or the toilets. Disaster!

Anyway, each line in this section takes the form:

homeFloorId, *|destFloorId[, destFloorId[, ...]], nextStaircaseId

where:

How this works is best illustrated by example. Let's look at the routes defined for the bottom floor in Back to Skool to everywhere else in the skool:

Bottom, LeftMiddle, LeftTop, UpToToilets Bottom, GirlsMiddle, GirlsTop, GirlsSkoolLower Bottom, *, UpToStage

The first line says that to get from the bottom floor (Bottom) to the floors called LeftMiddle and LeftTop (see [Floors]), the first staircase you need to navigate is UpToToilets (see [Staircases]). The second line says that to get from the bottom floor to the middle floor (GirlsMiddle) or top floor (GirlsTop) in the girls' skool, you need to use the GirlsSkoolLower staircase first. The third line says that to get anywhere else (*) from the bottom floor, you need to take the stairs up to the stage (UpToStage).

7.2.22 [NoGoZones]

Each line in the NoGoZones section corresponds to a region of the skool Eric is never supposed to enter. The lines take the form:

zoneId, minX, maxX, bottomY, topY

where zoneId is a descriptive name for the zone (not used anywhere else), minX and maxX are the lower and upper x-coordinates of the zone, and bottomY and topY are the y-coordinates of the bottom and top of the zone. Whenever Eric is spotted in one of these zones by a teacher, the GET_OUT lines message will be delivered in screeching tones.

7.2.23 [SitDownMessages]

The SitDownMessages section contains one line for each teacher of the form:

characterId, sit-down-message

where characterId is the teacher's unique ID (see [Characters]), and sit-down-message is what the teacher says at the start of a lesson. For example:

CREAK, SIT DOWN YOU LITTLE ANARCHISTS

7.2.24 [CharacterWidths]

The CharacterWidths section is used to determine the location and size of the font bitmaps in the font.png graphic. Each line takes the form:

"char", offset, width

where char is the font character (e.g. f, @, !), offset is the font character's distance in pixels from the left of the image, and width is its width in pixels.

7.2.25 [AssemblyMessages]

The AssemblyMessages section contains all the information required to build a message used by the headmaster during assembly in Back to Skool. There are three types of entry in this section:

MESSAGE, assembly-message-template

which defines the template for the assembly message, and:

VERB, verb NOUN, noun

which define the verbs and nouns to substitute into the message template. There must be at least one verb and one noun; they are chosen at random to form the message.

7.2.26 [Blackboards]

The Blackboards section defines the blackboards in the classrooms. Each line takes the form:

roomId, x, y

where roomId is the classroom's unique ID (see [Rooms]) and x and y are the coordinates of the top left corner of the blackboard.

7.2.27 [BlackboardMessages]

The BlackboardMessages section contains a list of messages written on the blackboard by the teachers or the tearaway. Each line in this section takes the form:

characterId, message

where characterId is the unique ID of the teacher or the tearaway, and message is the message.

There are two special characters used in the blackboard messages: '^' and '$'. '^' represents the newline character, and '$' is used to prefix the unique ID of a character, as in:

TEARAWAY, i hate^$WACKER

where $WACKER will be replaced by whatever name has been given to the character whose unique ID is WACKER (see [Characters]).

7.2.28 [QuestionsAndAnswers *]

The [QuestionsAndAnswers *] section names take the form

QuestionsAndAnswers characterId

where characterId is the unique ID of a teacher (see [Characters]).

There are at least three types of entry in a [QuestionsAndAnswers *] section. The first type of entry is the Question entry:

Question, questionId, groupId, question-template

where:

There should be at least one Question entry in a [QuestionsAndAnswers *] section.

The second type of entry is the Answer entry:

Answer, questionId, answer-template

where questionId is the ID of the question to which this is the answer, and answer-template is the answer template. There should be one Answer entry for each Question entry in a [QuestionsAndAnswers *] section.

The third type of entry in this section is the QAPair entry:

QAPair, groupId, qa1, qa2

where groupId is the ID of the group of QAPairs to which this particular QAPair belongs, and qa1 and qa2 are the words that will replace the macros in question-template and answer-template. There should be at least one QAPair entry per [QuestionsAndAnswers *] section (and ideally many more than one, to prevent the question-and-answer sessions between teachers and the Swot from being rather monotonous).

The optional fourth type of entry in a [QuestionsAndAnswers *] section consists of three lines:

SpecialQuestion, question SpecialAnswer, answer SpecialGroup, groupId, qaPairIndex

and is used to define the "special" question Eric will need the answer to in order to obtain the relevant teacher's safe combination letter. The SpecialQuestion keyword is followed by the text of the special question (which will be posed by the teacher at the start of the lesson). The SpecialAnswer keyword is followed by the text of the Swot's answer to the special question (which will contain a macro to be expanded). The SpecialGroup keyword is followed by groupId (which specifies the ID of the group of QA Pairs from which the "magic word" will be taken), and qaPairIndex (which is 0 or 1, and refers to which element of the QAPair will be the magic word). Once Eric has figured out what the magic word is, he will need to write it on a blackboard and hope that the teacher sees it while all the shields are flashing, whereupon the teacher will reveal his safe combination letter.

If the SpecialQuestion, SpecialAnswer and SpecialGroup lines are not present, there will be no magic word associated with the teacher. In that case, simply knocking the teacher over with a catapult pellet will make him reveal his safe combination letter.

7.2.29 [LinesMessages]

The LinesMessages section contains a list of admonitions delivered by lines-givers when Eric has been spotted doing something he shouldn't. Each line in this section takes the form:

characterId|*, linesMessageId, lines-message

where

If * is used instead of a character ID, the lines message will be used by all lines-givers (unless they have been explicitly assigned a lines message with the same lines message ID). For example:

WITHIT, NO_HITTING, BE GENTLE^NOW *, NO_HITTING, DON'T HIT^YOUR MATES

would make MR WITHIT scream "BE GENTLE NOW" whenever he sees Eric throwing a punch, whereas every other teacher would scream "DON'T HIT YOUR MATES" instead.

A lines message always spans two lines on-screen. A caret (^) is used to indicate where the words should be wrapped.

Lines message IDs used in both Skool Daze and Back to Skool are:

Lines message IDs used only in Skool Daze are:

Lines message IDs used only in Back to Skool are:

The lines message IDs are used internally, and should not be changed. If a particular lines message ID is missing from the list, then lines will not be given for the infraction it refers to. So if there were no entry in the LinesMessages section with the lines message ID 'NO_HITTING', no lines would ever be dished out for hitting.

7.2.30 [LessonMessages]

The LessonMessages section contains a list of messages that will be used by teachers who are not teaching Eric, or teachers who are teaching Eric but have chosen not to do a question-and-answer session. Each line in the section takes the form:

characterId|*, lesson-message[, condition]

where:

If * is used instead of a specific character ID, the message will be placed in every teacher's repertoire. The message may contain the character sequence '$n', which will be replaced by a random number between 100 and 999. The only recognised condition identifier is:

which, if specified, means the message will be used only if the blackboard (if there is one) has been written on. Any other condition identifier will evaluate to true.

7.2.31 [Shields]

The Shields section contains information about shields (of which there are 15 in Skool Daze, and none in Back to Skool). Each line describes a single shield, and takes the form:

x, y, score, imageIndex

where x and y are the shield's coordinates, score is the number of points awarded for making the shield flash or unflash, and imageIndex is the index of the shield's pair of images in mutables.png (which are used to make the shield flash).

7.2.32 [Safe]

The Safe section contains a single line of the form:

x, y, score[, imageIndex]

where x and y are the safe's coordinates, and score is the number of points awarded for opening the safe. If imageIndex is present, it is taken to be the index of the safe's pair of images in mutables.png; these images will be used to make the safe flash when it is opened (which happens only in Skool Daze).

7.2.33 [Grass]

The Grass section contains five lines of the form:

Writers, characterId[, characterId...] WriteTale, <text> Hitters, characterId[, characterId...] HitTale, <text> AbsentTale, <text>

The information in this section is used by the Swot to determine who can be blamed for hitting him or writing on a blackboard, and what to say when telling tales.

The Writers line contains a comma-separated list of IDs of characters who can be blamed for writing on a blackboard. The WriteTale line contains the text of the blackboard-writing tale.

The Hitters line contains a comma-separated list of IDs of characters who can be blamed for hitting the Swot. The HitTale line contains the text of the so-and-so-hit-me tale.

The AbsentTale line contains the text that will be spoken by the Swot when he's telling on Eric for being absent during class.

The text of a tale may contain '$TITLE' (which will be replaced by the teacher's title, as defined in the [Characters] section), '$1' (which will be replaced by the name of the hitter or writer chosen from the Hitters or Writers list), or '$characterId' (where characterId is the unique ID of any character, and which will be replaced by the name of that character).

7.2.34 [SkoolMessages]

The SkoolMessages section is a dumping ground for messages that have no obvious home anywhere else. Each line takes the form:

messageId, message

where messageId is a unique message ID, and message is the message text. Recognised message IDs are:

7.3 Command reference

The [CommandList *] sections contain commands and parameters that control the characters. Brief descriptions of the commands used in these command lists follow. Unless specified otherwise, commands are used in both Back to Skool and Skool Daze.

7.3.1 AddLines

The AddLines command is used in the command lists GrassOnEric-Wacker and HiddenPeaShooter-Wacker (Skool Daze only) to add to Eric's lines total after he has been found guilty of misdeeds. The number of lines to be added to the total is specified by the command's sole argument.

7.3.2 AwaitAssemblyTime

The AwaitAssemblyTime command is used in the command list Assembly-Wacker (Back to Skool only). It makes the headmaster return to the start of the command list unless it's time to go down to the stage for assembly. The command takes no arguments.

7.3.3 CheckIfTouchingEric

The CheckIfTouchingEric command is used in the command list MumpsWalkabout-Bully (Skool Daze only), which is used by the Bully when he has mumps. It checks whether the Bully is touching Eric, and alerts whichever teacher is following the YouHaveMumps-Teacher command list (MR ROCKITT by default) if necessary. The command takes no arguments.

7.3.4 ConductAssembly

The ConductAssembly command is used in the command list Assembly-Wacker (Back to Skool only). It makes the headmaster tell the kids they're in detention. The command takes no arguments.

7.3.5 ConductClass

The ConductClass command is used in the following command lists:

It controls teachers from the point where they reach the edge of the blackboard and is responsible for making them:

7.3.6 ConductClassWithEric

The ConductClassWithEric command is used internally to control a teacher who is teaching Eric and the Swot. It takes over control from the ConductClass command as soon as the Swot shows up and sits down. It's therefore responsible for making the teacher:

7.3.7 Dethroned

The Dethroned command is used internally to control a character who has been pushed out of his seat in class. It makes him sit stunned on the floor for a brief period, then stand up, after which it's up to the FindSeat command to reseat him. The Dethroned command takes no arguments.

7.3.8 EndGame

The EndGame command is used in the command list YouHaveMumps-Teacher (Skool Daze only) to end the game after Eric has been found contaminated with the Bully's disease. It is also used internally to end the game after MR WACKER has told Eric that he's expelled. The command takes no arguments.

7.3.9 FetchEric

The FetchEric command is used internally by the ConductClassWithEric command to make a teacher track down the truant Eric and shepherd him back to the classroom. It takes no arguments.

7.3.10 FindEric

The FindEric command is used in the following command lists (Skool Daze only):

The command is used to make a character look for Eric (to give him a message); it also stops the skool clock (which can be restarted later on with a SetClock command) to allow Eric to be found before the bell rings. When Eric has been found, he is frozen so that he has no choice but to listen to the message. FindEric takes no arguments.

7.3.11 FindEricIfMissing

The FindEricIfMissing command is used in the command list DinnerDuty. It makes whichever teacher is on dinner duty go and look for Eric if he's not in the dinner hall.

7.3.12 FindSeat

The FindSeat command is used in the following command lists:

It makes a boy or girl find a seat in the classroom and sit down; it also makes the character find another seat if he's knocked out of one (unless the character is the Swot, who must return to the same seat to avoid having to move his speech bubble during lessons). The command takes no arguments.

7.3.13 FireCatapult

The FireCatapult command is used internally to make a catapult-carrying character (i.e. Eric or the Tearaway) fire his catapult. It takes no arguments.

7.3.14 FireNowAndThen

The FireNowAndThen command is used as an argument to the SetControllingCommand command to make the Tearaway fire his catapult occasionally. If the command decides that the time is ripe to send a projectile whizzing through the air, it passes control to the FireCatapult command. The FireNowAndThen command takes no arguments.

7.3.15 Follow

The Follow command is used in the command list Stampede-Follower (Skool Daze only). It is used by little boys 2-11 to sync their movements with those of the stampede leader, little boy 1. (Internally it syncs destinations, and hands over control to the GoTo command.) The command takes a single argument: the unique ID of the character to follow.

7.3.16 Fly

The Fly command is used internally to control an airborne catapult pellet (i.e. one that has been fired). It moves the pellet through the air, checking to see if any unfortunate characters lie in its path. When a pellet has finished its flight, it is hidden from view and control is handed back over to the Hide command.

The Fly command takes two arguments: range and hit-zone, as described in the [CatapultPellets] section.

7.3.17 Freeze

The Freeze command is used internally by the FindEric command to freeze Eric once he has been found. It continually monitors the keyboard to check whether Eric has acknowledged delivery of a message (by pressing 'U'). It is then up to the TellEric or TellEricAndWait command to unfreeze Eric as appropriate. The Freeze command takes no arguments.

7.3.18 GoTo

The GoTo command is arguably the most important command ever in the history of Pyskool. Without it, the characters would stay rooted to the spot, Pyskool would be boring, and you wouldn't be reading this. Sad. Anyway, GoTo takes a single argument, which must be one of the following:

I leave it to the reader to guess what the command does.

7.3.19 GoToRandomLocation

The GoToRandomLocation command is used in many command lists to make a character go to one of his random locations. It takes no arguments.

7.3.20 GoTowardsXY

The GoTowardsXY command is used internally to make a character turn round or take one step in the direction of the destination x and y coordinates specified in the two arguments, instead of continuing all the way to the destination. The command is used primarily by the FindEric and FetchEric commands, which require tracking of a moving target (our hero) rather than a fixed destination.

7.3.21 GoToXY

The GoToXY command is used internally to make a character go to a location specified by an (x, y) pair of coordinates. In fact, the GoTo command resolves its location ID parameter into an (x, y) pair of coordinates and then hands over control to GoToXY. Unsurprisingly, GoToXY takes two arguments: x and y, as in:

GoToXY, 23, 17

Although GoToXY is not used explicitly in any of the stock command lists, there is nothing to stop you using it in a command list if you wish.

7.3.22 GrassAndAnswerQuestions

The GrassAndAnswerQuestions command is used in the following command lists:

It makes the Swot tell tales to the teacher just before class starts, and answer the teacher's questions later. The command takes no arguments.

7.3.23 Hide

The Hide command is used in the command list Pellet to control a catapult pellet that is not airborne (and so should not be visible, because it's hiding in the catapult owner's pocket). The command takes no arguments.

When the catapult pellet is fired, it is made visible and control is handed over to the Fly command.

7.3.24 Hit

The Hit command is used internally to make a fist-wielding character (i.e. Eric or the Bully) throw a punch. It takes no arguments.

7.3.25 HitNowAndThen

The HitNowAndThen command is used as an argument to the SetControllingCommand command to make the Bully throw a punch occasionally. If the command decides that the time is ripe to send a fist whizzing through the air, it passes control to the Hit command. The HitNowAndThen command takes no arguments.

7.3.26 Jump

The Jump command is used internally to control Eric while he's jumping. It lifts him into the air, checks to see whether he has reached a shield, and then lets him drop (unless there is an unconscious kid below). The command takes no arguments.

7.3.27 JumpIfOpen

The JumpIfOpen command is used in the command lists UpperRoom-Teacher and MiddleRoom-Teacher (Back to Skool only) to jump back to the start of the command list if the boys' skool door is still open. The command takes two arguments: the unique ID of the door (see [Doors]) to check for openness, and the number of commands to jump back or ahead, as in:

JumpIfOpen, SkoolDoor, -5

7.3.28 JumpIfShut

The JumpIfShut command is used in the command list ShutGateAndDoor-Albert (Back to Skool only) to jump ahead in the command list if the boys' skool door or the skool gate is already shut. The command takes two arguments: the door or gate's unique ID (see [Doors]), and the number of commands to jump ahead, as in:

JumpIfShut, SkoolGate, 3

7.3.29 KnockedOut

The KnockedOut command is used internally to control a child character who has been knocked out (by Eric, the Bully, or the Tearaway). KnockedOut keeps the character out cold for a brief period and then makes him stand up; after that, the character will resume whatever he was doing before.

This command would not really be useful in a command list, but if you want to use it, go knock yourself out. (Groan. - Ed.)

7.3.30 KnockedOver

The KnockedOver command is used internally to control an adult character who has been downed by a catapult pellet or a stampeding boy. KnockedOver stuns the character, makes him reveal his safe combination letter (if appropriate), also makes him give lines to the nearest main child character (if any), and then helps him up off the floor; after that, the character will resume whatever he was doing before.

7.3.31 MoveAboutUntil

The MoveAboutUntil command is used to make a character repeatedly walk a random number of paces away from a fixed point and back again. The fixed point will be the point the character reached before MoveAboutUntil was invoked.

The command takes a single argument, which determines when the character should proceed to the next command in his command list. For Skool Daze, possible arguments and their meanings are:

For Back to Skool, possible arguments and their meanings are:

7.3.32 OpenDoor

The OpenDoor command is used in the following command lists (Back to Skool only):

It takes one argument, namely the unique ID of the door (see [Doors]) to open. Unsurprisingly, it makes the character open the door in question - unless that door is already open, in which case the command does nothing.

7.3.33 Restart

The Restart command is used in many command lists to return to the first command in the list. For example:

[CommandList Walkabout1-Wacker] GoTo, HeadsStudy:Left GoToRandomLocation Restart

This command list is used by the headmaster; it makes him go to his study, then to one of his random locations, and then back to his study, and so on. The Restart command takes no arguments.

7.3.34 Say

The Say command is used internally to make a character say something. It takes two arguments: the thing to say, and whether to notify listeners when done (which defaults to False, and is set to True only during lessons so that the teacher and the swot don't talk over each other). For example:

Say, 'Hello mum!'

would make a character say 'Hello mum!'.

Although Say is not used explicitly in any of the stock command lists, there is nothing to stop you using it in a command list if you wish.

7.3.35 SetClock

The SetClock command is used in the following command lists (Skool Daze only):

The command restarts the clock with a certain amount of time remaining until the bell rings, specified by the sole parameter. SetClock is always used at some point after a FindEric command, which stops the clock to allow enough time for Eric to be found. In the BullyHasMumps-Boy, GrassOnEric-Boy and HiddenPeaShooter-Boy command lists, SetClock is used to ensure that the special playtime has enough time to run until the next lesson.

7.3.36 SetControllingCommand

The SetControllingCommand command is an awkwardly named command that takes another command - and that command's parameters - as its only argument, as in:

SetControllingCommand, OtherCommand, SomeParameter

What happens then is that on every pass through the main loop of the game, OtherCommand (the 'controlling' command) will be called for the character so controlled. The idea is that OtherCommand will make the character do something continuously (e.g. walk fast) or occasionally (e.g. fire a catapult or throw a punch).

In the stock command lists, SetControllingCommand uses the following commands as parameters:

The 'controlling' command remains in effect until the following command in the command list has completed. For example, in the command list MapRoom-Tearaway the first two commands are:

SetControllingCommand, FireNowAndThen GoTo, MapRoom:0

so FireNowAndThen is called for the Tearaway on every pass through the main loop of the game until he reaches the location MapRoom:0.

7.3.37 SetRestartPoint

The SetRestartPoint command is used in the following command lists:

The command has the effect of discarding itself and all previous commands in the command list, so that any Restart or StartLessonIfReady command appearing further down the command list will bring control back up the list to the command following SetRestartPoint instead of the top of the list.

For example, the GirlsSkoolWalkabout-Teacher command list looks like this:

GoTo, DrinksCabinet ShutDoor, DrinksCabinet SetRestartPoint GoToRandomLocation Restart

The SetRestartPoint command here effectively makes itself and all previous commands disappear, so when Restart is reached at the end, control passes to GoToRandomLocation instead of GoTo, DrinksCabinet. The command takes no arguments.

7.3.38 ShutDoor

The ShutDoor command is used in the following command lists (Back to Skool only):

It takes one argument, namely the unique ID of the door (see [Doors]) to shut. Unsurprisingly, it makes the character shut the door in question - unless that door is already shut, in which case the command does nothing.

7.3.39 Signal

The Signal command is used in the following command lists (Skool Daze only):

The command takes a single argument: the name of the signal to set. Signals are used by the MoveAboutUntil command to make a character pace up and down until the time is right to proceed to the next command in the command list. This scheme allows characters' movements to be coordinated.

For example, take a look at the command list HiddenPeaShooter-Boy, which is used by little boy no. 10 in the Playtime-HiddenPeaShooter lesson:

GoTo, Gym MoveAboutUntil, TearawayReady MoveAboutUntil, WackerReady FindEric TellEricAboutTearaway Signal, EricWasTold GoToRandomLocation MoveAboutUntil, EndOfLesson

This command list makes the boy find and tell Eric about the pea shooter, but only after both the headmaster and the Tearaway have arrived at the Revision Library (where their race to the fire escape begins). The boy then signals that he has told Eric what's up, whereupon the headmaster and the Tearaway begin their race.

See also the Unsignal command.

7.3.40 SitForAssembly

The SitForAssembly command is used in the following command lists (Back to Skool only):

It makes the character sit down in the assembly hall until the headmaster has finished speaking. The command takes no arguments.

7.3.41 SitStill

The SitStill command is always found immediately after the FindSeat command when it appears in a command list. It makes the character stay seated (in other words, do nothing). The command takes no arguments.

7.3.42 StalkAndHit

It sounds brutal, but there really was a command list in Back to Skool that contained instructions to make the Bully track down Eric's girlfriend in order to knock her about. In Pyskool, the equivalent (but more flexible) command is StalkAndHit, which takes a single argument: the unique ID of the character to track down. The command is used in the Walkabout-Bully command list (Back to Skool only).

StalkAndHit should be used as an argument to the SetControllingCommand command, as in:

SetControllingCommand, StalkAndHit, HEROINE

As a controlling command, StalkAndHit continually updates the character's destination to match that of the target, and makes him throw punches now and then along the way.

7.3.43 StartAssemblyIfReady

The StartAssemblyIfReady command is used in the command list Assembly-Teacher (Back to Skool only) by MR CREAK, MR ROCKITT and MR WITHIT. It restarts the command list unless it's time to start assembly. The command takes no arguments.

7.3.44 StartDinnerIfReady

The StartDinnerIfReady command is used in the command list DinnerDuty. It restarts the command list unless it's time to start looking out for Eric during dinner. The command takes no arguments.

7.3.45 StartLessonIfReady

The StartLessonIfReady command is used in the following command lists in Skool Daze:

and the following command lists in Back to Skool:

The command takes a single argument, which is the name of a signal that indicates which room the teacher will teach in when ready. In Skool Daze, these signals are:

and in Back to Skool:

The command restarts the command list unless it's time to start the lesson, in which case it raises the named signal (so the kids know when to sit down).

7.3.46 TellClassWhatToDo

The TellClassWhatToDo command is used internally by the ConductClass and ConductClassWithEric commands to make a teacher tell the class what to do (which usually involves writing an essay, turning to a certain page in their books, or revising for their exams).

7.3.47 TellEric

The TellEric command is used in the following command lists (Skool Daze only):

It makes the character deliver the message in the command's sole argument, and then unfreeze Eric (if he was frozen, as by the FindEric command).

7.3.48 TellEricAndWait

The TellEricAndWait command is used in the following command lists (Skool Daze only):

It makes the character deliver the message in the command's sole argument, and then unfreeze Eric (if he was frozen, as by the FindEric command) as soon as he has registered understanding of the message so delivered. If Eric is slow to respond, the message will be repeated periodically.

7.3.49 TellKidsToSitDown

The TellKidsToSitDown command is used internally by the StartLessonIfReady command to make a character (a teacher, normally) tell the kids to sit down when it's time to start class. The command takes no arguments.

7.3.50 TripPeopleUp

The TripPeopleUp command is used as an argument to the SetControllingCommand command in the command lists Stampede-Leader and Stampede-Follower (Skool Daze only); it makes the character trip up anyone in his path as he proceeds to his destination. The command takes no arguments.

7.3.51 Unsignal

The Unsignal command is used in the command lists Stampede-Leader and HiddenPeaShooter-Tearaway (Skool Daze only), to lower signals previously raised. It takes a signal name as its sole argument, as in:

Unsignal, TearawayReady

7.3.52 WaitAtDoor

The WaitAtDoor command is used in the command list ShutGateAndDoor-Albert (Back to Skool only) to make ALBERT wait at the skool door or the skool gate until all the characters are on the correct side and it's therefore safe to shut the door or gate. The character flags B and G (see [Characters]) are used to determine which skool (and hence which side of the door) a character belongs to. The WaitAtDoor command takes a single argument: the unique ID of the door or gate (see [Doors]).

7.3.53 WalkAround

The WalkAround command is used in the following command lists in Skool Daze:

and the following command lists in Back to Skool:

It takes a single argument, which is the number of walkarounds to do - a "walkaround" being a short trip away from the origin (wherever the character was when the WalkAround command was invoked) and back again.

The WalkAround command is also used internally by the MoveAboutUntil command.

7.3.54 WalkFast

The WalkFast command is used as an argument to SetControllingCommand in the command lists GrassOnEric-Wacker and HiddenPeaShooter-Wacker (Skool Daze only) to make the headmaster rush on his way to the fire escape (to find the hidden pea shooter) or to Eric (to give him lines).

7.3.55 WalkUpOrDown

The WalkUpOrDown command is used internally by the ConductClass and ConductClassWithEric commands to make a teacher turn round and walk three paces. Called repeatedly, it makes the teacher walk up and down.

7.3.56 WatchForEric

The WatchForEric command is used as an argument to SetControllingCommand in the command list ShutGateAndDoor-Albert (Back to Skool only) to make ALBERT keep his eyes peeled for our hero jumping out of skool windows.

This command has not yet been implemented.

7.3.57 WipeBoard

The WipeBoard command is used internally by the ConductClass and ConductClassWithEric commands to make a character wipe a blackboard clean. The command takes no arguments.

7.3.58 Write

The Write command is used internally to control Eric while he's writing on a blackboard. It would be of no use in a command list.

7.3.59 WriteOnBoard

The WriteOnBoard command is used internally by the ConductClass, ConductClassWithEric and WriteOnBoardUnless commands to make a character write on a blackboard. The character should (ideally) be standing at the target blackboard before this command is invoked.

The command takes a single argument, namely the message to be written on the board. So if you wanted to use the command explicitly in a command list, you could put something like:

GoTo, ExamRoomBlackboard:Middle WriteOnBoard, 'Pyskool rox!'

7.3.60 WriteOnBoardUnless

The WriteOnBoardUnless command is used in the following command lists in Skool Daze:

and the following command lists in Back to Skool:

It makes the Tearaway write on a blackboard unless the board has already been written on or the signal named in the command's sole argument has been raised. The signals used in Skool Daze are:

and the signals used in Back to Skool are:

7.4 Example customisations

So now you know everything there is to know about the ini file and command lists, you're ready to don your 'modding' hat and get customising. Right? Well, if not, you might want to follow the example customisations below to get a feel for what's possible.

7.4.1 Cursing CREAK

Maybe the simplest thing to customise is what the characters say. In this example we customise MR CREAK's sit down message (i.e. how he tells the kids to sit down when it's time to start a lesson).

To do this, find the [SitDownMessages] section in skool_daze.ini and edit the line:

CREAK, BE QUIET AND SEATED YOU NASTY LITTLE BOYS

so that it reads:

CREAK, ARSES ON SEATS YOU SCUMMY LITTLE BUGGERS

(or whatever other polite request you'd like to see MR CREAK utter). Then run Pyskool in Skool Daze mode and giggle like a schoolboy (or girl) as the profanities pour from the history teacher's mouth.

7.4.2 Blackboard blasphemy

An equally simple and giggle-inducing trick is to change what the characters write on the blackboards. In this example we'll modify MR WITHIT's blackboard messages in Back to Skool.

Open up bak2skool.ini and find the section named [BlackboardMessages]. In there you will see a bunch of lines that start with WITHIT (MR WITHIT's unique ID):

WITHIT, ARTESIAN^WELLS WITHIT, THE DOLDRUMS WITHIT, TASTY^GEYSERS WITHIT, THE GREEN^REVOLUTION WITHIT, TREACLE^MINING WITHIT, FROG FARMING

For fun, you can replace these messages with something more interesting, or add more messages (having only six to choose from makes MR WITHIT a dull man). Note that the '^' character will be replaced with a newline.

Then run Pyskool in Back to Skool mode and smile with satisfaction as MR WITHIT complies with your particular blackboard message whims.

7.4.3 800 LINES PERKINS

Did you ever think it was unfair that the little kids in Skool Daze (i.e. not Eric, the Swot, the Tearaway or the Bully) never got lines? Eric would down a teacher with a catapult pellet, but any little kids in the vicinity could breeze past the teacher with complete impunity while Eric (or, if he was lucky, one of the other big kids) got slapped in the face with a bunch of lines.

Well this is Pyskool, and we can change all that. To make the little kids in Skool Daze potential lines recipients, go to the Characters section in skool_daze.ini and find the lines corresponding to the little boys:

BOY01, PERKINS, BOY, L0, (43, 17), F BOY02, GIBSON, BOY, R0, (44, 17), F BOY03, FANSHAW, BOY, L0, (45, 17), F ...

The last field in each line (which contains 'F' by default) is the character flags field. The character flag that turns a character into a potential lines recipient is 'R'. So add that flag to each line, thus:

BOY01, PERKINS, BOY, L0, (43, 17), FR BOY02, GIBSON, BOY, R0, (44, 17), FR BOY03, FANSHAW, BOY, L0, (45, 17), FR ...

Now start Pyskool in Skool Daze mode, find a teacher milling about with a bunch of little kids, let rip with the catapult, and experience the satisfaction of seeing the hitherto nameless ones get their come-uppance.

7.4.4 Punch the pedagogue

The teachers in Skool Daze and Back to Skool - well, MR WACKER and MR CREAK in particular - were always asking for a smack. Unfortunately, in the original games teachers were inexplicably impervious to Eric's pugilistic efforts. Eric could always whip out his catapult and send a teacher to the floor with a pellet, but it's not quite the same thing.

Anyway, with Pyskool, you get to change the rules. To make the teachers punchable with effect, open up skool_daze.ini or bak2skool.ini and go to the Characters section. There you will find the lines corresponding to the teachers; in skool_daze.ini they look like this:

WACKER, MR WACKER, 80, L0, (10, 17), ALPW ROCKITT, MR ROCKITT, 96, L0, (10, 17), ALPW WITHIT, MR WITHIT, 88, L0, (10, 17), ALPW CREAK, MR CREAK, 104, L0, (10, 17), ALPW

The last field in each of these lines is the flags field (see [Characters]). To make a teacher punchable, we need to add the F flag. For example:

WACKER, MR WACKER, 80, L0, (10, 17), AFLPW

Make the change for each teacher you'd like to see Eric (and, as a side effect, the Bully too) be able to punch, and off you go and get your long-awaited revenge.

7.4.5 History in the Map Room

A somewhat more involved customisation is creating a new lesson. In this example we'll create a lesson where MR CREAK teaches Eric in the Map Room. In the original Skool Daze, MR CREAK never taught anywhere but in the Reading and White Rooms, so it'll be good for him to stretch his ageing legs and get on over to the Map Room.

7.4.5.1 Adding an entry to the timetable

First we are going to add an entry to the [Timetable] section. So, open up skool_daze.ini, head over to the Timetable section, and insert a new lesson ID or replace an existing one - preferably near the top, so you don't have to flick through too many lessons in Pyskool in order to test it. The top few lessons in the stock skool_daze.ini are:

[Timetable] Playtime-1 Wacker-ExamRoom Withit-MapRoom-1

You could replace Withit-MapRoom-1 with Creak-MapRoom-1:

[Timetable] Playtime-1 Wacker-ExamRoom Creak-MapRoom-1

This means that the third lesson of the day will be the one with ID Creak-MapRoom-1. But that lesson doesn't exist yet, because we just made it up. So now it's time to create the lesson.

7.4.5.2 Creating the lesson

Now that the Timetable section contains a brand new lesson ID, we have to make sure there is a corresponding [Lesson *] section. For this we're going to take a short cut. Since a lesson with MR CREAK in the Map Room is going to be almost the same as a lesson in the Map Room with any other teacher, we're going to find one such lesson, copy and paste it, and make the necessary modifications.

A good candidate for this copy/paste/modify plan is the lesson Withit-MapRoom-1, so find the section named [Lesson Withit-MapRoom-1 WITHIT, MapRoom], copy and paste it somewhere else amid the [Lesson *] sections, and rename it thus:

[Lesson Creak-MapRoom-1 CREAK, MapRoom] BOY01, ReadingRoom-Boy BOY02, WhiteRoom-Boy BOY03, ReadingRoom-Boy BOY04, WhiteRoom-Boy BOY05, ReadingRoom-Boy BOY06, WhiteRoom-Boy BOY07, ExamRoom-Boy BOY08, ReadingRoom-Boy BOY09, ExamRoom-Boy BOY10, ExamRoom-Boy BOY11, MapRoom-Boy WACKER, ExamRoom-Teacher ROCKITT, WhiteRoom-Teacher WITHIT, MapRoom-Teacher CREAK, ReadingRoom-Teacher TEARAWAY, ExamRoom-Tearaway BULLY, MapRoom-Bully SWOT, MapRoom-Swot

Now we're almost done. All that remains is to assign the appropriate command list to MR CREAK, and an alternative appropriate command list to MR WITHIT. The simplest thing to do is switch their command lists round, thus:

WITHIT, ReadingRoom-Teacher CREAK, MapRoom-Teacher

And that's it. Now run Pyskool in Skool Daze mode, and give MR CREAK a round of applause as he makes it to the Map Room for the first time in his long career.

7.4.6 All aboard the Science Lab

Let's try our hand at a completely new lesson in Back to Skool this time. What about one where every boy and girl piles into the Science Lab with MR ROCKITT? That should be interesting.

7.4.6.1 Adding an entry to the timetable

You're an old hand at this now. Open up bak2skool.ini and inspect the [Timetable] section:

[Timetable] Playtime-5 Creak-BlueRoom-1 Assembly

Let's replace that Creak-BlueRoom-1 entry with a carefully chosen unique ID for our new lesson:

[Timetable] Playtime-5 Rockitt-ScienceLab-AllAboard Assembly

Time to create the lesson itself.

7.4.6.2 Creating the lesson

We'll use the copy/paste/modify trick again, but this time there will be a lot more modifying to do. The lesson Rockitt-ScienceLab-1 would be a good template to use, so find the lesson section named [Lesson Rockitt-ScienceLab-1 ROCKITT, ScienceLab], copy and paste it somewhere else amid the lesson sections, and rename it thus:

[Lesson Rockitt-ScienceLab-AllAboard ROCKITT, ScienceLab]

The next step is to assign appropriate command lists to the characters. The appropriate command list for the little boys and girls is ScienceLab-Boy - don't be fooled by the -Boy suffix. So modify those command lists thus:

GIRL01, ScienceLab-Boy GIRL02, ScienceLab-Boy ... BOY01, ScienceLab-Boy BOY02, ScienceLab-Boy ... BOY10, ScienceLab-Boy

Now for the teachers. MR ROCKITT will obviously have to be in the Science Lab and the other teachers might as well just wander around, since they'll have nothing better to do:

WITHIT, Walkabout1-Teacher ROCKITT, ScienceLab-Teacher CREAK, Walkabout2-Teacher TAKE, GirlsSkoolWalkabout-Teacher

WACKER and ALBERT are fine as they are. Next, the main kids. They all need to pile into the Science Lab:

TEARAWAY, ScienceLab-Tearaway BULLY, ScienceLab-Bully SWOT, ScienceLab-Swot HEROINE, ScienceLab-Boy

Now we're ready. Fire up Pyskool in Back to Skool mode, and watch the Science Lab fill to bursting point. Fun.

7.4.7 Where's the chalk?

So you've modified messages and lessons, but to be brutally honest, you haven't proved yourself as a Pyskool modder until you've created your own command list. Recall that a command list is a list of commands (!) that control a character during a lesson.

In this exercise we'll take the command list that controls the Tearaway when he's on a blackboard-defacing spree in Skool Daze:

[CommandList WriteOnBoards-Tearaway] GoTo, ExamRoomBlackboard:Middle WriteOnBoardUnless, Dirty GoTo, WhiteRoomBlackboard:Middle WriteOnBoardUnless, Dirty GoTo, ReadingRoomBlackboard:Middle WriteOnBoardUnless, Dirty SetControllingCommand, FireNowAndThen GoToRandomLocation WalkAround, 10 Restart

and turn it into a command list that leaves the Tearaway frustrated by the global chalk shortage. One simple way to do this is to replace the three WriteOnBoardUnless commands with these commands:

Say, "Hey, where's the chalk?" Say, "OMG, no chalk here, either!" Say, "WTF? Has Mr Creak been eating the chalk or something?"

And for good measure we'll insert another Say command after GoToRandomLocation:

Say, "Anybody got any chalk?"

When these modifications are complete, the command list should look like this:

[CommandList WriteOnBoards-Tearaway] GoTo, ExamRoomBlackboard:Middle Say, "Hey, where's the chalk?" GoTo, WhiteRoomBlackboard:Middle Say, "OMG, no chalk here, either!" GoTo, ReadingRoomBlackboard:Middle Say, "WTF? Has Mr Creak been eating the chalk or something?" SetControllingCommand, FireNowAndThen GoToRandomLocation Say, "Anybody got any chalk?" WalkAround, 10 Restart

Now run Pyskool in Skool Daze mode and watch as the hapless Tearaway's blackboard-daubing career is dashed to the ground.

7.5 Example ini files

The title of this subsection is a little misleading, because at the moment there is only one example ini file distributed with Pyskool, which is examples/sd_take_too.ini. In order to make use of it, invoke sd.py with the -i/--ini option:

$ ./sd.py -i examples/sd_take_too.ini

and say hello to Skool Daze's new philosophy teacher, who may look somewhat familiar.

8 Frequently asked questions

At the time of writing this, there are no frequently asked questions, or even any infrequently asked questions. So for now I'll fill this section with questions made up by me.

8.1 How does Pyskool differ from the original games?

Though the conversion of the original games to Python/Pygame is pretty faithful (I think), there are some differences, noted below.

8.2 Why Python (and Pygame)?

Because Python is an elegant, expressive, and excellent programming language. Plus it enables rapid development, which is good because I'm writing Pyskool in my limited spare time. Pygame's pretty good too. I don't know how else I'd do graphics with Python.

8.3 Why Skool Daze and Back to Skool?

If you need to ask, you probably shouldn't be here. Actually, what are you doing here? Go and play Jet Set Willy, or something.