Skip to content

Game File Definition

TheTextAdventurer edited this page Jan 2, 2019 · 18 revisions

Structure

The ScottFree game format is text file comprised of the following structures:

  1. Header - information required to configure the game and process the cotent
  2. Actions - collections of conditions and effectors, which drive the game
  3. Words - verbs and nouns recognised by the game
  4. Rooms - rooms in the game
  5. Messages - messages outputted by the game, used by actions
  6. Items - objects in the game the player can interact with
  7. Action Comments - descriptions of Events, sometimes used
  8. Footer - information about the game

Header

A game consists of a header of 12 values:

  1. Unknown
  2. Number of items
  3. Number of actions
  4. Number of Nouns and Verbs (largest sized list * 2)
  5. Number of rooms
  6. Maximum a player can carry
  7. Starting Room
  8. Total Treasures
  9. Word Length (only seen 3,4 or 5)
  10. Time light source lasts. This counts down every time item 9 is in game. Brian Howarths games allow -1 for never run down. When it runs out the light item (9) is dumped in room 0 and a look done. Messages vary between interpreters and include things like 'Your light is flickering and dying' as well as 'Light runs out in %d turns'.
  11. Number of Messages
  12. Room you must put treasure in to score points. Not all games use the treasure system for scoring

All the number of something values are the last item to be read counting from 0. Thus 3 messages, means messages 0, 1, 2 and 3.

A game has 16 (maybe more) binary flags, and 8 (maybe more counters). A few later games seem to have 2 (maybe more) values to store location numbers in temporarily - eg Yoho spell in Claymorgue.

Game Actions

Following the header is a list of game actions. Each is comprised of 8 numbers, taking the form:

  • ActionType
  • Condition * 5
  • Effectors 1 and 2
  • Effectors 3 and 4

For more information, look here.

Conditions

Condition ID Description Number args Arg1
1 Item <arg> carried 1 ItemID
2 Item <arg> in room with player 1 ItemID
3 Item <arg> carried or in room with player 1 ItemID
4 In room <arg> 1 RoomID
5 Item <arg> not in room with player 1 ItemID
6 Item <arg> not carried 1 ItemID
7 Not in room <arg> 1 RoomID
8 BitFlag <arg> is set. 1 Bitflag number
9 BitFlag <arg> is cleared 1 Bitflag number
10 Something carried 0 -
11 Nothing carried 0 -
12 Item <arg> not carried nor in room with player 1 ItemID
13 Item <arg> is in game [not in room 0] 1 ItemID
14 Item <arg> is not in game[in room 0] 1 ItemID
15 CurrentCounter <= <arg> 1 Number
16 CurrentCounter >= <arg> 1 Number
17 Object still in initial room 1 ItemID
18 Object not in initial room 1 ItemID
19 CurrentCounter = <arg> 1 Number

Effectors

Effector ID Description Number args Arg1 Arg2
0 Does nothing - - -
1-51 Print message 0-50. Some drivers add a space some add a newline. 0 - -
52 Get item <arg>. Checks if you can carry it first 1 ItemID -
53 Drops item <arg> 1 ItemID -
54 Moves to room <arg> 1 RoomID -
55 Item <arg1> is removed from the game (put in room 0) 1 Number -
56 The darkness flag is set 0 - -
57 The darkness flag is cleared 0 - -
58 Bitflag <arg1> is set 0 Number -
59 Item <arg1> is removed from the game (put in room 0) (same as 55) 0 - -
60 BitFlag <arg1> is cleared 1 Number -
61 Death. Dark flag cleared, player moved to last room 0 - -
62 Item <arg1> put in room 1 ItemID RoomID
63 Game over. 0 - -
64 Describe room 0 - -
65 Score 0 - -
66 Inventory 0 - -
67 BitFlag 0 is set 0 - -
68 BitFlag 0 is cleared 0 - -
69 Refill lamp (?) 0 - -
70 Screen is cleared. This varies by driver from no effect upwards 0 - -
71 Saves the game. 0 - -
72 Swap item <arg1> and item <arg2> locations 2 ItemID ItemID
73 Continue with next line (the next line starts verb 0 noun 0) 0 - -
74 Take item <arg> - no check is done too see if it can be carried. 1 ItemID -
75 Put item <arg1> with item <arg2> - Not certain seems to do this from examination of Claymorgue 2 ItemID ItemID
76 Look (same as 64) 0 - -
77 Decrement current counter. Will not go below 0 0 - -
78 Print current counter value. Some drivers only cope with 0-99 apparently 0 - -
79 Set current counter value 1 Counter Value -
80 Swap location with current location-swap flag 0 - -
81 Select a counter. Current counter is swapped with backup counter <arg> 1 CounterID -
82 Add <arg> to current counter 1 Value -
83 Subtract <arg> from current counter 1 Value -
84 Echo noun player typed without CR 0 - -
85 Echo the noun the player typed 0 - -
86 CR 0 - -
87 Swap current location value with backup location-swap value <arg> 1 Value -
88 Wait 2 seconds 0 - -
89 SAGA - draw picture 0 - -
90-101 Unused 0 - -
102+ Print message 51-99 0 - -

Words

This section consists of string values - verbs and nouns interleaved. A word with a * at the beginning is a synonym for the word above. Verb 1 is GO, verb 10 is GET, verb 18 is DROP (always). Nouns 1-6 are directions. Verb lists always begin with AUT and Noun lists always begin with ANY.

For example, the first eight word entries of Adventure Land are:

"AUT" "ANY" "GO" "NORTH" "*ENT" "SOUTH" "*RUN" "EAST"

An unpack into

Verb Noun
AUT ANY
GO NORTH
*ENT SOUTH
*RUN EAST

Rooms

Each room entry consists of 6 digits defining exits, followed by a text string describing the room. The exit digits, when greater than 0 indicate the index of the room they lead to, and correspond to the directions North, South, East, West, Up and Down.

A room description that doesn't begin with an * will have the phrase "I'm in a" pre-pended to it when viewed in the game, for example:

"royal anteroom"

Will be displayed as

I'm in a royal anteroom

The first entry is always the inventory room, where out of game items are stored and should not be accessible to the player.

Messages

A list of strings.

Items

A string followed by a number, on the same line, for example,

"GOLD CROWN/CRO/" 22

The string contains the item's description and may end with /TEXT/. This text is not printed but means that an automatic get/drop will be done for 'GET/DROP TEXT' on this item. /TEXT/ must correspond to an existing Noun.

Item names beginning with '*' are treasures. The '*' is printed. If you put all treasures in the treasure room (in the header) and 'SCORE' the game finishes with a well done message. Item location -1 is the inventory (255 on C64 and Spectrum tape games) and 0 means not in play in every game I've looked at. The lamp (always object 9) behaviour supports this belief.

Action Comments

A list of string that correspond to each action, not always used.

Footer

Finally three values follow which are version, adventure number and an unknown magic number.

Acknowledgements

The above text is s based on text from https://www.ifarchive.org/if-archive/scott-adams/interpreters/scottfree/scott.zip, located at the The Interactive Fiction Archive

Home

Data Format

   Adventurer Game Files

   Game File Definition

   Game Actions Examined

Game Information

   Adventure Land

   Pyramid of Doom

Clone this wiki locally