Set.game.id

From AGI Wiki
Revision as of 09:00, 21 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''set.game.id''' command sets the game ID. == Syntax == set.game.id(msg mGAMEID);<br /> set.game.id("gameid"); == Remarks == The game ID is a short name,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The set.game.id command sets the game ID.

Syntax

set.game.id(msg mGAMEID);
set.game.id("gameid");

Remarks

The game ID is a short name, up to 6 characters, that identifies the game, such as 'KQ1', 'SQ2', 'GR', 'MUMG' etc.

When the game ID is set with this command, AGI checks it against an internal game ID value that is embedded within the main interpreter file. If the values do not match, AGI quits without any warning. This was done presumably to make sure the games were not run on an incorrect version of the interpreter, as well as to discourage pirating by requiring the use of the original interpreter files.

If a game ID is set, AGI prepends it to save game file names (e.g. 'KQ1SG.1').

See the GameIDs and Interpreter Executable topic for additional information on how game IDs were used in Sierra games and how to manage them in fan made games.

Possible Errors

None.

Example

Code:

<syntaxhighlight lang="agi"> [ assume the interpreter file has been modified to use [ this game ID for that great fan made game 'Dungeon!' set.game.id("DGN1"); [ DUNGEON! </syntaxhighlight>

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 143 (0x8F hex)

See Also

System Commands
Game IDs and the Interpreter Executable