User Guide
Quick Reference
Modding
Development
User Guide
Quick Reference
Modding
Development
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
(see the CanSkip
, NoSkip
and SkipHere
commands).
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 ;
Strings can be split onto multiple lines (like in DED files, see the Text definition).
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.
OffX
and OffY
), in the order in which they were created.Restrictions imposed by this order:
DO
IF commercial DO #> Here can be multiple commands spanning multiple lines. <# ; ELSE DO # More commands. ;
END
IF
(condition)IF
and its condition are only executed if the condition evaluates to true. The condition can be one of the following: MODE:(game-mode) | True if the current game_mode is (game-mode) . For example:MODE:doom2-plut |
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). |
IFNOT
(condition)IFNOT
and its condition are only executed if the condition evaluates to false. The same conditions are used as with IF
.ELSE
IF
and IFNOT
to provide an alternative execution path.MARKER
(marker-id)goto
command. Don't use duplicate marker IDs.GOTO
(marker-id)Pause
CanSkip
and NoSkip
commands. When a script is paused and the player causes a skip event, only the pause mode ends, no actual skipping happens.In
(time-sec) 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.
Tic
Wait
(time-sec)WaitAnim
(pic-id) WaitText
(text-id)CanSkip
SkipHere
is encountered, all the commands from the current position to the end of the script are ignored and the execution of the script ends. CanSkip
is the default mode.NoSkip
SkipHere
SkipHere
. Note that all the skipped commands were ignored.Events
Events
command has been executed, the script will begin tracking input events.NoEvents
OnKey
(key-name) (marker) bind
.UnsetKey
(key-name) bind
.PlayDemo
(filename) Cmd
(console-command) Trigger
NoTrigger
Sound
(sound-id) SoundAt
(sound-id) (volume) SeeSound
(thing-type) DieSound
(thing-type) Music
(music-id) MusicOnce
(music-id) music
, but (if possible) plays the song only once.NoMusic
Color
(red) (green) (blue) Color 1 1 1
ColorAlpha
(red) (green) (blue) (alpha) Flat
(flat-lump) flat FLOOR4_8
The flat will be tinted with the background color.
NoFlat
OffX
(pixels) OffX 160
would appear to move the origin of the screen 160 pixels to the right (half a screen). Note that only picture objects are affected.
OffY
(pixels) Filter
(red) (green) (blue) (alpha) Filter 1 0 0 1
These commands are shared by all objects (rectangle objects, text objects, and picture objects).
Del
(object-id) X
(object-id) (x) Y
(object-id) (y) Angle
(object-id) (degrees) Sx
(object-id) (scale) Sy
(object-id) (scale) Scale
(object-id) (scale) ScaleXY
(object-id) (x-scale) (y-scale) RGB
(object-id) (red) (green) (blue) Alpha
(object-id) (alpha) Rect
(rect-id) (x) (y) (width) (height) XImage
(rect-id) (external-gfx-resource) XImage R “Mouse”
).FillColor
(rect-id) (TOP
|BOTTOM
|BOTH
) ® (g) (b) (a)TOP
and BOTTOM
colors to different values.EdgeColor
(rect-id) (TOP
|BOTTOM
|BOTH
) ® (g) (b) (a)TOP
and BOTTOM
colors to different values.Image
(pic-id) (image-lump) Image
command accepts pcx images as well as normal raw images.ImageAt
(pic-id) (x) (y) (image-lump) Patch
(pic-id) (x) (y) (patch-lump) Set
(pic-id) (patch-lump) ClrAnim
(pic-id) Anim
(pic-id) (patch-lump) (time-sec) ImageAnim
(pic-id) (image-lump) (time-sec) Anim
and ImageAnim
in the same picture's animation.PicSound
(pic-id) (sound-id) Repeat
(pic-id) 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) \n | Newline |
\“ | Double quote (”) |
\_ | Space |
\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).SetText
(text-id) (string) SetTextDef
(text-id) (text-id) 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.
Center
(text-id) NoCenter
(text-id) Scroll
(text-id) (speed) In
and Y
commands.Pos
(text-id) (type-pos) Pos mytext 0
would rewind the text object “mytext” so that it would start typing its text from the beginning.Rate
(text-id) (rate-tics) FontA
(text-id) FontB
(text-id)LineHgt
(text-id) (pixels)