TUTORIAL

###### page best viewed at 800 x 600

#### This Quick Tutorial was made for Macmillan Publishing on January 31st 1997 by Bubbah aka. Tan Sian Yue, This little Tutorial will get you started making awesome 3dimensional monsters for the Quake engine... Making a Plugin-monster requires you to use many different skills and use many different programs, but it is definately a challenge worth taking...Quake Monsters are different from Doom's and making a new one for a new level would include at least some proficiency in 3dediting and modelmaking, 3danimating, 2dgraphics manipulation, some Quake-C coding, map making abilities and a love for the game Quake :)

##### NEW WORDS for NEW USERS TO 3D:

###### ----NOTE----these words may not be perfectly described, but i gotta keep it simple, right?
FACE= a face, or polygon is a triangle (for Quake, that is) in space that'll form part of the surface of the object you're making...like, a cube'll have 6 sides, but 12 faces (each side's built up out of 2 faces/triangles)
VERTEX= a face has 3 vertices, a cube, which has 12 faces, has 8 vertices...this is not a mistake, faces can share vertices.
ELEMENT= a cube is an element, just think of an element as a group of joined faces... a cube is an element... two cubes are two elements, two cubes that share a vertex is one element
OBJECT= Grouped elements become an object...a cube and a cylinder can be grouped into an object, this is handy for when you need to move or rotate a group of elements which form an arm or a leg etc.
MESH= general word describing elements, objects and faces...
FRAME= many 3deditors come with animating capability, a frame of animation...
SKIN= the texture on the final monster... it is a Quake term.

## STEP 1

### DESIGNING QUAKE-BABE

#### Designing and planning out a model are essential... What i'll be modelling today is a Female Quake player (unlike Bazooka Babe, which can be found on this cd-rom), which i'll need for a patch i'm working on at the moment...
There are a couple of ways in which i can model her... One way is to use a Blobsculpter, which is a 3dediting utility, which takes a bunch of spheres and peels a skin over them...and a Bones program, which helps you animate the mesh... as you can see, it's great for working with organic forms because there won't be any seems where arm and chest meet etc. (snakeman was done using this method)...
The other method, which i will use to make Quake-Babe, is to create a set of objects that will resemble your monster's parts (2 legs, 2 feet, 2 arms(with hands), a head, a chest(with neck), a pelvis, a gun and a Barrel-flash) and animate them by simply rotating them around their axes in a special way... Ken D. Turner's spider was made using this method
These 2 types of meshes are called non-jointed and jointed models respectively and each require a different technique to animate... The most important thing to do is to plan her out... Draw it out, taking away most of the unnecessary elements that'll eat up processor time and screw up game play, remeber, you've got to stay under 500 faces... Thus now i know the Quake-Babe'll have 11 OBJECTS... The hands, eyes and other small details will end up on the SKIN...
Now i'll plan out all the animation frames, most of which will be the same as Quake-Dude's (player.mdl)....how many animation frames is that? about 145 frames... To lessen the workload I opted to get rid of the Axe, this will have a triple function...

--1 it gives me more faces to work with, which the axe would have taken up...i can increase detail on other parts
--2 it enables me to use the same frames for what would have been an axe-idle sequence and a gun-idle sequence... This will half the amount of frames i'd need to animate... eg. idle, pain and death sequences can now just share frames...
--3 Quake-babe'll look cool, bashing you with her big gun instead!!!
Other than that, i noticed there were alot of death sequences, all of which were above 8 frames of animation, so i'll make one or two death sequences of 9 frames and use them to cover all 6 different dying sequences, this will seriously cut down the workload...going down from 60 or so death frames to just 9 or 18!...
It's this kind of planning and decission making that will seriously benefit you in the long run... Planning out your monster is a crucial first step... I get many e-mails from people telling me how right i am about this.

## STEP 2

### MODELLING QUAKE-BABE

#### preparation: for the Quake Scale, export a single FRAME out of an .mdl file using Meddle...Place the player.mdl file into your c:\quake\id1\progs directory and type in the Meddle directory: mdl -e player.asc 1 player.mdl NOW import the player.asc file into your 3deditor and you should see a mesh of the quake player's first frame...note the scale, where the feet are and note the origin axis, use these to get the correct scale and to place your model

#### Depending on your 3deditor, modelling the QUAKE-BABE may differ from my description, though i think most 3deditors have A CUBE, CYLINDER, CONE and a SPHERE built into it, which you can just summon up... The objects will be scaled down to Quake scale size...And the BABE'll be placed near the origin axis...so her legs touch the ground.

#### I find it works best to use cones for each object, with a small amount of sides and an equally small amout of segments, say 5 sides and 3 segments...remeber, you have to get the most out of every face, I vertex edit the cone into place, trying to keep it simple and symmetrical... this is quite tedious work, but spend time on getting the proportions correct... Don't worry about ribs or muscles and such, they'll be handled in the skin... For Quake-babe i spent about 50% of the total time modelling her, tediously scaling, moving vertices, bending and shearing the mesh so it'll look like a leg or an arm or a head...Put them all into place and you'll end up with something that may look like this:
Here's a Quick Rundown of things you'll need to keep in mind while modelling your monster:

---FACE COUNT:
...Keep your FACE-count under 500 faces!!! Any more and you can end up slowin' gameplay by alot!!! Just stick under 500 and you'll be fine...detail'll be handled in the skin...heh

---SCALE and POSITIONING:
...Seems logical, but i'm readin' so many Q-mails on user groups askin': HELP, WHAT SHOULD I DO? MY MONSTER IS STUCK IN THE FLOOR!!!....Use Meddle to export a player idle frame to an asc file...import the idle1.asc to your 3d-editor program...You should see a mesh of the player character...See the scale? THIS is the Quake SCALE...See where his feet are?THIS is the Quake FLOOR...Stick to it: it'll save you alot of headache later when doin' the qc...heheh...

---BASE FRAME:
...Use Meddle's excellent scripting language to make your own monster.med and run the script like: mdl monster.med....use the example.med files as your start and work from there... NOTE that the first .asc file Meddle uses will be the one for the base frame. This one will be used to add your SKIN...Rotate your model in such a way that 1. it makes it easy for you to recognise what you'll be painting later...and 2. Shows as much surface as possible so it'll be all round well textured...If it requires for you to stretch, squash and move vertices and/or elements, by all means do so (NEVER DELETE and COPY---see point above)!!! This Base frame can be any shape, even decapitated (like the Bazooka Babe is)...heh...

## STEP 3

### ANIMATING QUAKE-BABE

#### Once you've finished modelling everything, which includes the barrel flash and GUN, you can start the fun process of animating...
Rotate objects, so the BABE appears to be running...Quake-dude uses 6 frames for this, so i'll have to do the same, starting with fullstride, landing with right leg, bringing in the leg, full stride, landing on left leg, bringing in the leg... Most 3deditors have animating capability, animate those 6 frames... When doing an animation sequence it's important that you have a good sense of Quake-timing...You can have a great looking run cycle of some 16 frames, which is WAY too many, and makes the creature look as though it's running in slow motion...heh...
then save exporting the file to .asc or .raw format, so you can import it into meddle... I'm calling these frames brun1.asc...then rotate and reposition everything again for brun2 saving to brun2.asc....and do the same for brun3.asc, brun4.asc, etc. ...and finally do one for the base.asc, making sure everything is aligned for the front viewport, this'll be used for the SKIN...It's a good idea to 'explode' the model so it'll be easier to paint a good skin for it later

#### How you do this WILL again depend on your 3deditor, but what i'd do (usin' 3dstudio) is to make a hierarchy tree of parent and child objects, placing pivot points for each object animate the babe-running sequence in the keyframer so everything looks realistic, go to the 3deditor, select everything, then save the file as a brun.prj file, go back to the keyframer and snapshot frame 1, snapshotting the entire tree, go back to the 3deditor, delete all the selected objects, leaving you with just the frame 1 mesh (which you just snapshotted), then save that to brun1.asc and load up bat.prj again, repeating from there...
Whatever you do, try to save it to asc format....and save it into the EXAMPLES subdirectory of Meddle...eg. c:\meddle\examples\base.asc

Here's a second RUN-down of stuff that you'll need to keep in mind while animating your monster, it'll definately keep you out of trouble:
---TIMING:
...A tricky thing to grasp will be the animation timing...The first run sequence for Babester had 16 frames in it...Way too many---she looked like she was runnin' in slow-motion...Use Quake's .mdl files as a guide (eg. a good run sequence'll have about 6-8 frames)...

---FIRST FRAME FACES=LAST FRAME FACES:
...Make sure you do start with the same model as you end...in other words; everything (every object, every face) that is in your first/base frame has to be in EVERY frame...

---ORDER:
...This is a mistake many beginners make, so you better read this carefully. If you're workin' with several objects, make damn sure the ORDER in which they START is the same for EACH frame... You can end up with an all screwy couple of frames where the left gun and the right gun switch ORDER...If you have a problem like this, check out the ASC files usin' a text editor and compare object listings from bad-frames.asc with your base.asc...i think you may find that the order is screwed...It's just a matter of cut and paste...But always keep this in mind when merging, copying and deleting elements and objects...Best way i find is spendin' alot of time with the modelling of the monster so that everything is exactly how i want it BEFORE i go ahead and animate it...Copyin' deletin' and merging'll only be caused by bad planning...YEP, plan your Monster...heheh...

---FLASHES OF LIGHT:
...A good thing to do is add in some barrel flashes that spew out in the firin' sequences...Check out the Cyberdemon's if you don't know what i mean...

---SPECIAL EFFECTS:
...Ever wonder how Quake knows when a Rocket has a trail following the model? Ever wondered how to make powerups rotate (like the armor powerup and the weapons)? No, There's no need to mess with the qc... Just use QMFLAG... You can specify if an .mdl leaves a pink, yellow, bloody or Rocket trail...Or if the mdl should rotate, like a powerup should... Makes head Gibs, new rockets and new powerups look even better... Or get the newest Meddle version 1.7... It has some extra features that enable you to do this with a simple "flag_gib" or "flag_rotate"... read the text...heh

## STEP 4

### USING MEDDLE

###

#### once all the necessary files are added to your Meddle\examples subdirectory, you're ready to start puttin' it all into Meddle...
Use your text editor to open one of the example.med files.... there's a whole list telling meddle what to do with the necessary files...study it...
For the QUAKE-BABE run sequence, i'd do the following: Remember that after # come comments:

#

#####

# Copy this babe.med file into your Meddle directory and copy all asc files
# base.asc, brun1.asc ,brun2.asc, brun3, brun4.asc, brun5.asc, brun6.asc into the examples subdirectory, k?
# base.asc is the file that contains the exploded Babe...the one used for skinning her, that is...
#
#when it's all done run mdl like mdl babe.med
#
path examples\
# create a new model one for the skin ,called it base.asc
new_mdl base.asc
#
# this inserts the brun1.asc into frame 1...it'll save over the
# old first frame from the batbase.asc retaining the 2d info of newmdl...
insert brun1.asc 1
#
# now this part'll add all the other frames...
insert brun2.asc 2
insert brun3.asc 3
insert brun4.asc 4
insert brun5.asc 5
insert brun6.asc 6
#
# save model
save_mdl babe.mdl
#
# the finished babe.mdl will end up in the
# examples subdirectory...
#

#### NOW that you've text edited the babe.med file, copy it into the Meddle root and run Meddle like : mdl bat.med

## STEP 5

### MAKING THE SKIN

#### first you need to export a .bmp file from Meddle by first copying the finished Babe.mdl file into the c:\quake\id1\progs\ subdirectory and then typing in the Meddle directory:
mdl -e babeskin.bmp 0 babe.mdl
This'll give you the black and grey skin from the base frame of babe.mdl
the babeskin.bmp will end up in your meddle directory....Start up your Paintprogram like Adobe photoshop or paintshop-pro and make something beautiful out of it...work in 16 million colours...use all the filters etc. you want... just make it look real good! A skin can make or break your monster, so spend some time on it...
Save it as a 256 colour .bmp file... Don't use the Quake pallete yet... Converting all the colours now'll change it to the correct pallette, but the bmp will also include all the fullbright colours...if you then run grafixer over it, you'll end up with even less colours, which'll end up makin' the skin look blocky...no, save the skin to 256 colours, its own pallette...and place it into the grafixer directory...

## STEP 6

### GRAFIXER AND 256 COLOURS

#### Now, after you copied the babeskin.bmp to the GRAFIXER subdirectory, run grafixer... turn off the fullbright colours, and play around with the hues if you want...then save the skin by pressing s and exit...Grafixer will have placed the Quake pallette babeskin_01.bmp in the specified subdirectory...copy that skin into the Meddle directory...
Almost there...heh...

## STEP 7

### ADDING THE SKIN

#### once you copied babeskin_01.bmp to the Meddle direcory, type mdl -i babeskin_01.bmp 1 babe.mdl....Meddle starts up with your new skin...press 2 for 2d mode then press s to save the entire babe.mdl file with the new skin...press 3 to go back to 3d mode and look at it... press c to cycle through the animations and press h to view all the frames (except for the base frame) with some info... if you've used a dark skin, press b to change the background colours...use your mouse, together with the mouse button to change view and to zoom in and out...check for spots where the skin looks screwed up, especially around the seems, when you found some weird looking spot (breaks in the skin etc.) press 2 for 2d mode and drag and drop the vertices, this'll change the mapping of the skin onto the model...

#### Meddle's cool, eh? remember to press s in 2d mode to save the babe.mdl file with the skin...exit meddle...the finished babe.mdl file will be in your meddle root directory...copy this to your c:\quake\id1\progs\ subdirectory... now when you run mdl babe.mdl , you'll see the babe with the final skin...et voila!

## STEP 8

### QUAKE C

#### NOW, use fastqcc.zip--all the qc files are in this package: fastqcc compiles your bundle of qc files into a neat little progs.dat file... If you want to make plugin monsters you'll have to get your hands dirty and do some Quake-C programmin'...If you got a text editor and fastqcc, you have all the necessary stuff to program Quake-c...

#### ARRIGHT...for starters, just use one of the previous monster plugin qc files as your base... The spider.qc is good and quite simple to understand... Quake-c tends towards the basic... Just readin' it will make you understand it...(i hope)...Extensive documentation on Quake-c can be downloaded at ftp://ftp.cdrom.com/.5/idgames2/docs/editing/qkspec34.zip

#### And, yeah, ok, if you really, really, really don't want to mess around with the Quake-c, here's another (though, kinda chickenny) option... Look at the mdl file of a creature that behaves in rather the same way as you want your creature to behave... If you are makin' say, The killer Rabbit like the one in Monty Python's Quest for the Holy Grail, you'd have the fluffy critter hoppin'' around, and jump for your throat... Kinda like the dog... Use Meddle to cycle through the animation frames of the dog and remember to press 'H'... There should now be some info on the frame poppin' up... PAIN, IDLE, ATTACK and the lot will become quite apparent. Note down which frames have the dog do what... Then animate your Rabbit with this in mind... eg. if the dog had 6 frames in its dying sequence, make 6 frames for the rabbit to die...etc... Get the picture?... Alright, make sure you place the frames in the same order when Meddlin' it into a Meddle file... Now Killer Wabbits wepwace djogs...heheh... Note: i don't recommend anyone doin' this... Why? because I think it's a damn shame!!! Modellin's the hard part... it'll make it so much more complete if you give the creature a special ability of some sort, Like the Rabbit is a smart Rodent and will evade Rockets by jumping up high and doin' a flip in the air squeeking... And c'mon! a rabbit's a little smaller than a dog, so make it harder to hit (stuff like this)!!! There's always the choice of postin' a note to a newsgroup, there are plenty of programmers willing to help ya out if yer stuck or somethin'... Real friendly lot if ya ask me...

## STEP 9

### IMPLEMENTING YOUR PLUGIN MONSTER

#### Well, you've designed and planned your monster, you've modelled it, you've animated it, you've made the .asc or .raw files into .mdl files, you've made a skin, you've converted your skin to the 256 colour Quake pallette, you've put the skin onto your .mdl and you've written and compiled your monster's qc file...so now what? You want to play with it, of course... But where? there is no level that has spawn points for your monster, right? Now you gotta make a level... This will help others in being able to see the creature and help you debug its qc... i expect you CAN make a map file using your level editor proggy, so i won't go into that...

#### It doesn't matter which editor you're usin' at the mo as long as you have a text editor you're fine...The text file included with the monster patches should state how big the plugin monster will be...eg. KEN's SPIDER is as big as the SHALRATH.... Or Snakeman's as big as an OGRE... Or Bazooka Babe's as big as your uncle... stuff like that... this'll indicate to you that you can use the Level editor to put in a Shalrath where you want the SPIDER to be...This way, the monster won't fall out...Simply use your text editor to change the "monster_shalrath" to the "monster_spider" param in the .MAP file... It's THAT easy... Then compile the level as usual...

### This picture below was made using the Viewer.bsp

## QUAKE VIEWER MAP!!!

##### Ever knackered to find that your model's faces seem back to front in Meddle even though they look ok in Quake, so you're not sure if the Skin's on properly or if all the fuulbright colours are turned off and things like this....? i was...Unless you write some qc and make a map, there's no REAL way to know how big the Creatures really look in Quake... I read this little tidbit from Hipnotic's M. Hadwin's .plan file... The idea and instructions on how to make a map that could actually view a model and its animation frames is right there, no progs.dat, no qc... i just made the level called viewer.bsp to use for myself... It's not a patch or a new monster, but an excellent monster viewer... And this is why i put it in here... all the instructions are in the level itself, just put your babe.mdl in the id1\progs subdirectory and fire up the level like you normally would!

## Try it out, you'll be amazed!!!

## STEP 10

### FINISHED!!!!

#### Once you've finished makin' and codin' your ALL new monster, write a good text file and zip it all up... upload to ftp.cdrom.com with a copy of the txt file with the same name and notify me!, hell post to all quake related newsgroups too!!! Make sure it's perfect before you upload it to ftp.cdrom.com, so get people to Beta test it, like me :))...heheh... Please do remember that there are many ways you can end up with a plugin monster and i've just outlined one... This works for me and i use it...heh...