MD2 support:
++++++++++++
MD2 is the Quake2 format for 3D objects.
In order to have MD2 monsters, you need to download the dglmd2.zip file (on http://www.doomworld.com/doomgl).
Then you must:
1- Create a md2 subdirectory in your doom directory.
2- Unzip dglmd2.zip in this sub-directory.
All the MD2 files from this archive are converted MDL files from the YPOD Quake1 total conversion (http://www.planetquake.com/doom).
Don't forget to set the "useMD2" option to 1 in your doomrc.cfg file.

-------------------
How to use MD2.INI:
-------------------

[MD2] section
+++++++++++++
The [MD2] section listed all the MD2 present in the rest of the file.
Example:
Nb= 13			<-- There is 13 MD2 files used by DoomGL
IMP=			<-- Beginnig of the list
SOLDIER=
SARGEANT=
PINK=
BARON=
CACO=
CYBERD=
SPIDER=
CHAINER=
ARACH=
ARCHV=
MACUM=
REVEN=			<-- End of the list

Each element of the list has its own section.

MD2 definition section
++++++++++++++++++++++
Example:
[IMP]
file= md2\imp.md2
autorotate= 0
noLOD= 0
offset= 27.0
scale= 100.0
states= MD2_TROO_STND MD2_TROO_RUN MD2_TROO_ATK MD2_TROO_PAIN MD2_TROO_DIE MD2_TROO_DIE2

The "imp" MD2 filename is "md2\imp.md2".
The autorotation is disabled. You can enable it for ammo, shield, weapons, etc. (like Quake).
The LODs are enabled.
The Y offset is 27 (if you put 0 instead of 27 the imp will have its legs into the floor !).
The scale factor is 100. The bigger this factor is, the bigger the MD2 monster will be.
the "states" line lists all the MD2 states which will be mapped on the original sprite states.
Each state has its own section.

You could also add a weapon line, if you need one.
For example, the "Generations" cyberdemon has its rocket launcher:
weapon= md2\cyber\weapon.md2

State section:
++++++++++++++
Example 1:

[MD2_TROO_STND]
anim= wait

the stand animation for the imp will be replaced by the "wait" animation present in the MD2 file.

Example 2:

Here we want to replace the dead body by an MD2 dead body. We simply use the last frame of the 
"death" animation.

[MD2_TROO_DIE2]
anim= death			<-- Animation name.
nbTics= 1			<-- Number of frame to be played.
StartFrame= 28		<-- First frame to be palyed.
EndFrame= 28		<-- Last frame to be played.

Another example of using the NbTics / StartFrame / EndFrame lines is the PAIN aniamtion of
the chaingunner.
Its MD2 file has no pain animation, so we simply use the first frames of its death animation:

[MD2_CPOS_PAIN]
anim= death
nbTics= 4
StartFrame= 2
EndFrame= 5

[CORRESP] section
+++++++++++++++++
This section lists ALL the states present in the game.
If you know C language see the "state_t states[NUMSTATES]" table in info.c of the Doom/heretic/Hexen sources.
You CAN'T delete any line of this section, nor switching them.

The imp states are:
S_TROO_STND= MD2_TROO_STND
S_TROO_STND2= MD2_TROO_STND
S_TROO_RUN1= MD2_TROO_RUN
S_TROO_RUN2= MD2_TROO_RUN
S_TROO_RUN3= MD2_TROO_RUN
S_TROO_RUN4= MD2_TROO_RUN
S_TROO_RUN5= MD2_TROO_RUN
S_TROO_RUN6= MD2_TROO_RUN
S_TROO_RUN7= MD2_TROO_RUN
S_TROO_RUN8= MD2_TROO_RUN
S_TROO_ATK1= MD2_TROO_ATK
S_TROO_ATK2= MD2_TROO_ATK
S_TROO_ATK3= MD2_TROO_ATK
S_TROO_PAIN= MD2_TROO_PAIN
S_TROO_PAIN2= MD2_TROO_PAIN
S_TROO_DIE1= MD2_TROO_DIE
S_TROO_DIE2= MD2_TROO_DIE
S_TROO_DIE3= MD2_TROO_DIE
S_TROO_DIE4= MD2_TROO_DIE
S_TROO_DIE5= MD2_TROO_DIE2
S_TROO_XDIE1= -

As you can see there are 8 RUN states which represent the 8 sprites of the walk animation.
Those 8 states are all mapped to the MD2_TROO_RUN. The engine will automatically display the right
frame at the right moment.
Also, you can see that the last sprite of the death animation (state S_TROO_DIE5) is mapped to the
1 frame MD2 state MD2_TROO_DIE2.
Leaving the line "S_TROO_XDIE1= -" indicates that the explode animation still uses sprites.

In the [CORRESP] section, you could also change the default length of a state (usefull if the
corresponding MD2 animation is too long or too short in comparison with the original sprite animation).

For example, when using the "Generations" Cyberdemon, the attack states in original doom were too short (12 tics).
The "attack" animation of the MD2 is 16 frames length. So we can increase the number of tics of the original state:
S_CYBER_ATK2= MD2_GCYBER_ATK 16

Another example with the "Gen" Cyberdemon: Its "death3" animation is too short in comparison with the sprite animation.
The sprite animation has 10 frames (length 10 tics).
The MD2 animation has just 8 frames. So we should reduce each original frames to 6 tics:
S_CYBER_DIE1= MD2_GCYBER_DIE 6
S_CYBER_DIE2= MD2_GCYBER_DIE 6
S_CYBER_DIE3= MD2_GCYBER_DIE 6
S_CYBER_DIE4= MD2_GCYBER_DIE 6
S_CYBER_DIE5= MD2_GCYBER_DIE 6
S_CYBER_DIE6= MD2_GCYBER_DIE 6
S_CYBER_DIE7= MD2_GCYBER_DIE 6
S_CYBER_DIE8= MD2_GCYBER_DIE 6
S_CYBER_DIE9= MD2_GCYBER_DIE 6


---------------
IMPORTANT NOTE
---------------
Think to change your skins palettes to the Doom palette.