Written by the Mad Dog 3/5/02
Updated 3/6/02
Updated 3/7/02
Updated 3/9/02
Updated 3/10/02 //added gun layout
Updated 3/18/02 // added WDL snippet for using skins in qc file
This is a short explanation on how and what you need to export models from ms3d to A5 MDL. I have tried this with several models and it works for me.
Also at the bottom is a method I use to get the right size (height) for my actors in GameStudio.
STEP ONE
make a folder where you will keep your models information
STEP TWO
copy the files starting at "// start A5 qc controller script" to "// end of A5 qc controller script", then paste it in your text editor (I use windows notepad or wordpad). and save it to your folder as the same name that you will use for your model.
(model name, trymy)
example, trymy.qc
after saving it you will notice that it is saved as "mytry.qc.txt", leave it as a text file until you have edited the scrpit to fit your models actions, once this is done just delete ".txt" leaving the "trymy.qc", windows will ask you if your sure you want to change it, say yes. You now have a qc controller script.
Another way you can do it is to use quotation marks around the name “trymy.qc” this will leave the .txt extension off, then set your notepad to open files with the extension .qc (this is what I have done).
Once the qc file has been done and is in your models folder,
while in MilkShape if you need to change anything in the qc file
you can edit it via Tools using Half-life.

STEP THREE
If you plan on skinning your model in ms3d (which is the place to do it) put your texture maps in your folder, you can use any texture that ms3d can load. I use 256x256 bmp maps for my skins.
Texture must be square in multiple sizes of 16.
Examples: 16x16, 32x32, 64x64, 128x128, 256x256, 512x512.
I wouldn’t go higher than 512, the larger the bmp the larger the file size will be.
The GameStudio 3D engine will only allow the model to show "one" skin
at a time.
However you can list several different skins and control them in your .wdl
script.
Say you have a model that looks like a normal person, but then if you shoot him
you could have him change to one of the skins listed in the $skin *.bmp maybe a
warewolf or a skin that shows blood on it or anything you want.
There is a short WDL code snippet below giving an example
on how to use the different skins in a models qc file.
STEP FOUR
after you have finished your model I would save it as a ms3d file then export it as a "GameStudio A5 MDL". Then you can just move the model to your A5 folder, you wont have to move the qc or bitmap files to A5.
**** MAKE SURE TO SAVE YOUR MODEL IN THE MILKSHAPES FORMAT ****
the reason is in case you want to edit your model, once it has been saved as a MDL and you import it back into ms3d as a "GameStudio A5 MDL" it will no longer have animation frames (bones) or skins. A5 MDL4 models don't show bones.
By looking at the script you should be able to see how easy it is to set up. This script is made with the standard movements for GameStudio models.
For your models movements just use the ones you need by removing the "//" marks.
Replace the “newname.bmp” in the Skins with your texture. **NOTE** The skin size you put here must be the same size you used in MilkShape and if you used more than 1 skin map the skin bmps should all be the same size.
// start A5 qc controller script
$final 0
$pad 0.0
$eye 0.0 0.0 0.0
$flags 0
// Skins
$skinheight 256
$skinwidth 256
$skin newname.bmp
/* set frame numbers that show in the ms3d ani window for the actions in A5
// be sure to put a space between the starting and ending frame "21 24" not "2124". the first numbers after the "$sequence" action is where it starts the second set of numbers is where it will stop. This movement control was set up for one I tested.
If you make a model that has no animations you still have to enter a set of sequence numbers.
What I do is give the stand sequence a value of 1.
Example: $sequence stand 1 1
Another thing that is important is all models even a chair or desk exc. have to have a bone with all the vertices assinged to it, otherwise when you open it in WED you will get an "error incorrect format"*/
// movement controls for A5
$sequence stand 1 4
$sequence walk 5 9
// $sequence run 0 0
// $sequence duck 0 0
// $sequence crawl 0 0
// $sequence jump 0 0
// $sequence swim 0 0
$sequence attack 10 12
// $sequence death 0 0
// $sequence shot 0 0
// end of A5 qc controller script
The method I use for scaling my actors. I made a quick and simple blocked model for this example.
DO THIS BEFORE YOU ADD ANY BONES
Using the ms3d default screen layout make your model from top to bottom and you should have something similar to this. Notice how many grid squares there are on this one it’s 8 ˝ .

Now what you need to do is to scale the model down until it
is about 3 to 3 ˝ grid squares high.
This will give you the size of an average sized model like the ones in
GameStudio.

Now save it and close. Then open it again in ms3d and
continue finishing your models details
along with adding the bones, mapping the skins and so forth.
Your models center of gravity is important in A5,
so click on “Tools” on the ms3d tool bar,
then choose “Show Model Statistics”.

I try to keep the “center” close to all “0.00” off a little
one way or the other won’t hurt much,
these are the x,y,z positions of the model.
I always save models at different stages while I build just in case I mess up one so bad I can at least come back to where I was before I messed up, just a thought for advise for us beginners.
If you do not know how to map out a Skin in MilkShape you need to look at the tutorials below’
There is a lot more to it than just loading a skin texture.
For skinning and bones for animating I used these two tutorials located at:
www.machinima.com/articles/modeling_intro_index/
www.planetquake.com/polycount/resources/halflife/tutorials.shtml
it will save you a lot time if you print them out for reference.
In fact while your at it print this one also. *S*
******IF YOU HAVE MORE THAN ONE GROUP*****************
After you have mapped all the different groups of your model, head, chest, arms and so forth.
Before exporting as an A5 MDL choose select all from the edit dropdown list and regroup
All the groups into 1 group, otherwise some panels may not show up in A5.
****REMEMBER*****
To save the model so it has all your separate groups, so after grouping all to one group save it with
A different name so if it didn’t get skinned quite right you won’t have to go through the process of
Making all the different groups again.
************** GUN LAYOUT ******************
Here are the layout views that show the position of a gun designed in
MilkShape.
Having your gun barrel pointed in these directions make the gun pointing
straight ahead when the player picks it up.
Notice where the center of the barrel is, this is where you will call your
muzzle_vert shooting position for WED.
And once again notice how many grid squares there are in this side view.
Between 4 and 5 grid squares will give you the length of a normal rifle.



If you view the models skin in MED (there is really no need to ) it will be upside down.
This is supposed to be fixed in next ms3d update, not that it matters.
************* CHANGING SKINS *********************
Here is an example of a human that when he gets shot the first time
He changes to a werewolf and starts his attack then at death
he changes back to his human form.
You can change the "(my._health<=x)" to suit your needs.
/////////////////////////
ACTION man_wolf
{
MY._FORCE = 1;
MY._HEALTH = 125;
MY._FIREMODE = DAMAGE_SHOOT+FIRE_PARTICLE+0.1;
anim_init();
actor_fight();
change_skn(); //this calls for diffent skins in qc file
}}
//////////////////////////
function change_skn()
{
while(me)
{
if (my._health<=125){my.skin = 1;}// human skin
if (my._health<=120){my.skin = 2;}// wereqwolf skin
if (my._health<=90){my.skin = 3;}// werewolf with blood
if(my._health<=50) {my.skin = 4;}// werewolf more damaged
if(my._health<=10) {my.skin = 1;}// back to human and lays dead
wait(1);
}}
//////////////////////////////////////////////////
Also for this particular model in order to change to skin1 while running the
dying frames
you need to edit the "war.wdl" template by canceling out the
(MY._I_COWARDICE == 0) statements.
///////////////////////////
"war.wdl"
//////////////////////
function state_wait()
{...........
// init values here for backwards compatibility
// if(MY._I_COWARDICE == 0)
// { MY._I_COWARDICE = 30; } // use default cowardice
these two statements.
.........
.........
}
///////////////////////////////////////
I would like to thank Keith aka Ambit,
for his help on getting me started with this code snippet for the skin change.
A big THANK YOU to MilkShape 3D for this model editor