TUTORIAL 2

How to make an .Mdi and gaurdsrc.4TH files for your .Md2 models.

First put your MODEL.md2 .VGA skins into your game level like you would a floor or ceiling texture.

In your enemy guard directory is the guardsrc.4 TH file. This is where you define which of your models frames are for standing and walking, shooting and dying. If you didn't keep track of which frames did what then you need to open your model in a model editor then write down where your movement sequences start and stop. I like to use Q2Modeller Fig 3. Open your model using FILE then OPEN then go to where your MODEL.md2 is and open it. Along the bottom is a slide bar. Fig 4 Move the slide bar left to right you'll see your model go frame by frame and give you the frame number. Fig 5. Write down the first and last number of each movement, walk, die, shoot, also write down which frame you want the muzzle flash, and whatever other movements you maybe using have.

Fig 3. Fig 4.

Fig 5.

Now go and open your enemy guard's guardsrc.4 TH file. Now put the first and last frame number that you had written down in front of each line needed. Fig 7 Then save it and you should be done.

Fig 7.

To make an .Mdi file you must first open a MS-DOS window, Fig. 1 then enter the directory of where you are saving your md2 model then type EDIT then hit enter. Then in FILE go down to SAVE then save as MODEL.mdi . MODEL is whatever your md2 model name is. Fig 2. Go ahead and close the DOS winsow. Now in Windows explorer go into your directory where you just saved your MODEL.mdi. Double click your mdi file to open it up. Now we enter your md2 info, its size along with skins and rotation of the model in game play. The following are some lines to put in your MODEL.mdi :

Fig 1. Fig 2.

md2name MODEL.md2              This line starts md2name, then put the models md2 name after.
scale 40                       If your model is to small or to large change the numberto adjust size. 
floorhand MODEL.vga            This line starts floorhand, then put your models .VGA file name after.
anglebias 32768                If your model ends up walking backwords  either remove or add this line.
zoffset -150                   This line will raise or lower your model to get it to look like it's walking on the ground.
frame 1 s2200                  This line has to be exactly like this.

rem skin die is MODELDIE.vga   Any lines starting with REM are ignored.  So you can leave yourself notes

To have a bloody skin after killed or to give a weapon a muzzle flash, or to make to skin change for whatever reason the following lines tell the engine which frames to change skins for. Then the skins handle number from your games directory EXTRA#.TXT file, and it has to be the handle number and not the skins VGA name which then has to have the letter 'K' in front of that skins handle number.

The frame numbers are defined in your guardsrc.4 TH file located in your enemies directory.

frame 177 k1720                The line has to start with the word FRAME, then put the frame NUMBER where you want the                                                  
frame 178 k1721                skin to change then the letter K followed by the skins handle number.
frame 179 k1721
frame 180 k1722
frame 181 k1722
frame 182 k1722
frame 183 k1722
frame 184 k1722
frame 185 k1722
frame 186 k1722
frame 187 k1722
frame 188 k1722

In your enemies directory make a folder called MODELS then put your Md2 and your Mdi files into it. Now in your game you'll put your enemy into your game levels like you would before, except now when you go to test your level the Md2 should be in your game instead of the sprite.

TUTORIAL 1

Copyright© 1998-2000 All rights reserved Adano3dgame Productions