frame01.gif (2772 bytes)

The Frame Table/Editor (F3)

This is a large table that lists all the frames in doom. A frame is an individual picture of a sprite, that is shown for a defined period of time and may cause a special action to be carried out. It could be a very simple frame that shows a pillar sitting still and it never moves away from that one frame. Alternatively, it could be a part of a more complex sequence where the frame shows the picture of an enemy firing, displays the picture fully illuminated (even in a dark room), fires a weapon shot and then moves on to the next frame. The player weapons also have frames.

I have said that the table shows all the frames in doom. This is not strictly true. The final frame of the short doom2 lamp is number 966, but the table only goes up to 965.   I think team TNT also added frame 967 for their invisible push controller object.

Frame 0 is a special frame. It shows no graphic and is used in situations where a thing disappears at the end of its death sequence. For example, the last frame in the lost soul death lists frame 0 as its next frame.

In the frame editor, hitting g brings up the same thing list as it does in the thing editor. Selecting a thing from that list will jump to the first frame for that thing. Alternatively you can type in the frame number you want to go to instead.

The frame table has 8 columns. They have the following functions.

Frame number. – Simply a numeric list from 0 to 965. Cannot be edited.

For the next 3 columns, it may be worth checking my page on the naming conventions for doom sprites if you are not familiar with them.

Name. – This is the name of the sprite series being shown on that frame. For example the trooper’s sprite pictures all begin with POSS, so for any frame showing those pictures, the name column will show POSS. This column can not be directly edited.

Sprite #. – This is the number relating to the sprites in a series. Eg the trooper POSS series has sprite number 29. This can be edited, and will change the name listed in the name column. Eg Changing 29 to 30 will shoe a picture from the sargeant SPOS series instead of the POSS series.

Sub # - This number is which one of the pictures in the sprite series will be shown for that frame. If Sprite # is 29 and sub sprite is 0, the POSSA graphics will be shown. If Sprite # is 29 and sub sprite is 1, the POSSB graphics will be shown and so on. You do not specify which of the angle viewpoints for a thing will be shown. If doom is showing POSSA, it will automatically display the correct view angle picture relative to the player for that frame.

Bright Sprite – This is actually a work around. If this column is checked (hit enter to put an x in the column) the frame will be drawn full brightness regardless of ambient lighting. Used for gun flashes, explosions etc. What dehacked is actually doing is adding 32768 to the sprite sub number. This instructs doom to show the frame at full brightness.

Next frame – This is the frame to be shown next in the series. If set to 0, the invisible special frame 0 will be used for things that disappear (like projectile explosions etc).

Duration – This is how long the frame is displayed before moving on to the next one in units that I think are 1/35 of a second. Ie Setting a frame duration will have it on screen for 1 second. If you set the duration to –1 the frame will be shown constantly and never move on to the next one.

Code Pointer – This defines a special action to be performed for this frame. It could be something simple like walk, or it could be turn to face the player (or other target), or launch a fireball etc. To change a code pointer you hit enter and then type the number of the frame that normally has the code pointer wanted, not the code pointer number as displayed in this column. I have published a list of all the codepointers here. Codepointers for players weapons can not be used for monsters, and monster code pointers can not be used for player weapons. If a frame has no code pointer, it can not be given one, and if it has one, it can not be set to 0.

As a simple example of changing a codepointer. If you go to frame 454 ( the frame where the imp launches its fireball) and change the code pointer to 539, the imp will now launch the baron of hell fireball when it attacks.

It is the code pointers section that to me is probably the most valuable enhancement introduced with the BEX format. BEX files can include a section for codepointers that have sensible names (eg using the word PosAttack instead of 185 for the trooper pistol shot). It can also give a code pointer to any frame, not just those that already have one, and remove a code pointer from a frame too. This allows far more flexibility with what you do with the frame table as it means you can get any frame to perform any function that a codepointer exists for.