InFine 1) is a very simple scripting language used to describe the animations that are played as interludes and finales. The scripts are written in InFine definitions. It can also be used to define introductory animations (InFine scripts can be played before or after any map); briefings and debriefings if you will.
Once a script starts playing, its commands will be executed until a wait or a pause command is encountered. The script ends when the last command of the script is executed. This means if you forgot to use any wait or pause commands the script will end immediately.
Almost all numeric values (coordinates, colors, scale factors) are interpolated, i.e., their value can change gradually. The
In command is used to set the interpolation timer, which will be effective until the next time
In is issued. Note that interpolation only occurs while the script is waiting for something. Otherwise the script commands are executed one after another with no delay in between.
The player can interact with the animation by pressing a key on the
keyboard or a mouse or a joystick button. This will trigger a skip event
Commands are case-insensitive (some arguments are not, however).
Whitespace (spaces, tabs, newlines) is ignored.
Comments are ignored. Comments are lines that begin with the hash
character (#), or anything that begins with
#> and ends in
The general syntax of a command is:
(command) (arg-1) ... (arg-N)
Some commands don't need any arguments. Note that only whitespace separates the arguments. All commands have a fixed number of arguments.
Semicolons (;) are used to mark the end of a compound. Don't use semicolons elsewhere. An example of how semicolons are used:
IF commercial DO MusicOnce "dm2ttl" Wait 13 ;
The whole screen is thought to be 320 pixels wide and 200 pixels tall, regardless of the actual display resolution. You can freely use fractional pixels (e.g. 104.5) for more accurate placement of objects.
Color values are floating-point numbers, and must be between zero and one. An alpha value of zero means fully transparent and one means opaque.
Time is generally specified in seconds.
OffY), in the order in which they were created.
Restrictions imposed by this order:
IF commercial DO #> Here can be multiple commands spanning multiple lines. <# ; ELSE DO # More commands. ;
IFand its condition are only executed if the condition evaluates to true. The condition can be one of the following:
| MODE:|| True if the current game_mode is
|secret||True if the current map was exited through a secret_exit.|
|netgame||True in multiplayer games.|
|deathmatch||True in deathmatch games.|
|shareware||True when a shareware_wad is being used (DOOM 1, Heretic). Always false for doom_ii, final_doom and hexen.|
|ultimate||True if the game_mode is “doom1-ultimate” (doom).|
|commercial||True if the game_mode is “doom2” (doom).|
|leavehub||True if a hub has just been exited (hexen).|
|fighter||True if the player's class is fighter (hexen).|
|cleric||True if the player's class is cleric (hexen).|
|mage||True if the player's class is mage (hexen).|
IFNOTand its condition are only executed if the condition evaluates to false. The same conditions are used as with
IFNOTto provide an alternative execution path.
gotocommand. Don't use duplicate marker IDs.
NoSkipcommands. When a script is paused and the player causes a skip event, only the pause mode ends, no actual skipping happens.
In 2 Filter 0 0 0 1 Wait 2
The interpolation timer is set to two seconds with the
In command. The
Filter command changes the screen filter to opaque black but because the interpolation timer is set to a non-zero value, the change will be gradual. In this case it will take two seconds. The
Wait command pauses the script for two seconds, during which the filter will have time to interpolate to its destination color, i.e. opaque black.
SkipHereis encountered, all the commands from the current position to the end of the script are ignored and the execution of the script ends.
CanSkipis the default mode.
SkipHere. Note that all the skipped commands were ignored.
Eventscommand has been executed, the script will begin tracking input events.
music, but (if possible) plays the song only once.
Color(red) (green) (blue)
Color 1 1 1
ColorAlpha(red) (green) (blue) (alpha)
The flat will be tinted with the background color.
would appear to move the origin of the screen 160 pixels to the right (half a screen). Note that only picture objects are affected.
Filter(red) (green) (blue) (alpha)
Filter 1 0 0 1
These commands are shared by all objects (rectangle objects, text objects, and picture objects).
ScaleXY(object-id) (x-scale) (y-scale)
RGB(object-id) (red) (green) (blue)
Rect(rect-id) (x) (y) (width) (height)
XImage R “Mouse”).
BOTH) ® (g) (b) (a)
BOTTOMcolors to different values.
BOTH) ® (g) (b) (a)
BOTTOMcolors to different values.
Imagecommand accepts pcx images as well as normal raw images.
ImageAt(pic-id) (x) (y) (image-lump)
Patch(pic-id) (x) (y) (patch-lump)
Anim(pic-id) (patch-lump) (time-sec)
ImageAnim(pic-id) (image-lump) (time-sec)
ImageAnimin the same picture's animation.
States(pic-id) (state-id) (count)
States mo BOSS_RUN1 12
This will append 12 frames starting from the state BOSS_RUN1 to the animation sequence of the picture object named “mo”.
Text(text-id) (initial-x) (initial-y) (string)
|\“||Double quote (”)|
|\w||Pause of 0.5 seconds|
|\W||Pause of 1 second|
|\p||Pause of 5 seconds|
|\P||Pause of 10 seconds|
|\0||Text color changed to the text object's color|
|\1||Predefined color 1|
|\2||Predefined color 2|
|\9||Predefined color 9|
TextDef(text-id) (initial-x) (initial-y) (def-id)
Text, but the text itself is taken from the text definition with the ID (def-id).
TextLump(text-id) (initial-x) (initial-y) (lump)
Text, but the text itself is taken from the lump named (lump).
PreColor(color-number) (red) (green) (blue)
PreColor 4 0 1 0
By default all the predefined colors are set to white (1 1 1). Use the escape sequences \1…\9 in the text string of a text object to force the text to be drawn using a predefined color.
Pos mytext 0would rewind the text object “mytext” so that it would start typing its text from the beginning.