This member has provided no bio about themself...

Blog RSS Feed Report abuse Doom 3 Tutorial- How to create statues of monsters using scripts

0 comments by hellstorm27 on Apr 1st, 2014

The Ruiner mod has numerous "statues" of stock Doom 3 monsters that were evidently created using 3D modelling software and they look quite impressive in-game.  However, it is also possible to create similarly impressive statues by modifying the stock monsters and making a couple of minor tweaks to their AI.  The process is quite involved, however, and I discovered it partly through a process of trial and error.

For example, if you want to make a statue of the Imp:

1.  Extract the TGA files for the imp, which are normally located in Doom3/base/pak002.pk4, under the directory /models/monsters/imp.

2.  Open the files in your favourite photo editing software (e.g. Gimp, Photoshop, Paint Shop Pro), remove the colour from the images (by turning the Saturation down to zero under Hue/Saturation options) and under the Brightness/Contrast options, turn the contrast down (a contrast offset of between -20 and -25 often works).  Do not do this for "imp_local.tga" because this is a bumpmap file which saves the peaks and troughs associated with the imp's texture- this should be left at the default.  Save the new files as "imp_statue" rather than as "imp", so as not to overwrite the images for the original Imp.  If you accidentally overwrite the original files, it wont be a problem as you can just rename them and Doom 3 will still access the originals inside pak002.pk4.

 3.  In "base/pak000.pk4/materials", locate the material files for the Imp, under "materials/monsters.mtr".  The Imp one will refer to a model, "models/monsters/imp/imp".  Create a new definition (it may be easiest to create a new materials file inside a mod directory, so if your mod is called "enemy" then your material file would like in enemy/materials/X.mtr, where X can be any name- the name of the materials file is not important, what's important is what you name the modified Imp definition within the file).  The new definition should be based on "models/monsters/imp/imp", but rename it to "models/monsters/imp/imp_statue" and replace the references to default textures with the new imp_statue textures that you created.  Make sure that you replace "flesh" with "stone" in the material type definition.
My file looks like this:

code:
models/monsters/imp/imp_statue
{
  unsmoothedTangents
  //noselfshadow
stone
  renderbump  -size 512 512 -aa 3 models/monsters/imp/imp_local.tga models/monsters/imp/work/imp_hp.lwo

  { // burning corpse effect
    if  parm7     // only when dead

    // make a burned away alpha test for the normal skin
    blend gl_zero, gl_one     // don't draw anything

    map models/monsters/imp/imp_statue_dis.tga  // replace this with a monster-specific texture
    alphaTest 0.05 + 0.3 * (time - parm7)
  }
  { // burning corpse effect
    if parm7      // only when dead

    // draw the fire burn at a negative polygonOffset, so it is behind the other stages
    privatePolygonOffset  -1    // stage-only polygon offset
        blend add
        blend gl_one, gl_zero
   
    map models/monsters/imp/imp_statue_dis.tga  // replace this with a monster-specific texture
    alphaTest 0.3 * (time - parm7)
  }
  forceOverlays
  bumpmap addnormals (models/monsters/imp/imp_local, heightmap (models/monsters/imp/imp_statue_bmp.tga, 6) )
  diffusemap models/monsters/imp/imp_statue_d
  specularmap models/monsters/imp/imp_statue_s
  }

 
4.  The next step is to create a new skin for the Imp so that Doom 3 will "colour" the Imp with the new material.  So, create a new .skin file within the "skins" directory (you can do this in the base directory but for various reasons it is better to have a separate mod directory, so in my mod it is enemy/skins).  My imp skin file looks like this:

code:
skin skins/enemy/statue
{
  models/monsters/imp/imp   models/monsters/imp/imp_statue
model monster_demon_imp
}
 

  
5.  At this point, if you were to put a standard Imp into your map and, in the editor (typically Doom3edit or DarkRadiant or GTkRadiant) enter the key values "skin", "skin/enemy/statue", you would see an Imp that looks like a statue, but behaves like a regular Imp.  Therefore, to make the Imp behave like a statue as well, you need to modify the AI and animations.  Fortunately, this is not too "involved" as you only need to create one custom "animation" which consists of a single pose.

Therefore,  check out the Imp's animations and meshes which are located in base/pak002.pk4 under models/md5/monsters/imp.  Select a .md5anim file that you want to take an individual "pose" from to use as the statue's pose.  I chose "sight.md5anim" as typically when monsters see an enemy, they roar and open their mouths wide, which can produce some scary-looking poses.  For this tutorial you do not need to edit the default imp.md5mesh as a custom "skin" can be used to over-ride the default texture associated with the mest, as per step 4.

6.   Save "sight.md5anim" as a new .md5anim in your mod directory (for me it is enemy\models\md5\monsters\imp).  Name it "statue.md5anim".  The next bit is quite tricky as you have to have some understanding of what .md5anim files do.  

In the file, change "numFrames" to "1".  Near the bottom of the file there will be a series of frames (frame 0, frame 1, etc.)  Take frame 11 and rename it to frame 0, and delete all of the other frames.  Then, under "bounds", delete all lines apart from the 12th line down (this corresponds to the mesh that is used for frame 11).  Frame 11 is a pose where the imp begins to open his/her mouth upon seeing an enemy.  With a bit of trial and error you may be able to find a better frame to use as a pose.

My file looks like this:

code:
MD5Version 10
commandline "anim models/monsters/imp/animation/cycles/sight.ma -dest models/md5/monsters/imp/sight.md5anim -game Doom -prefix IMP1_ -keep Lknee Rknee Lelbow Relbow camera Body -keep Rmissile Lmissile -parent Rmissile Rhand -parent Lmissile Lhand -parent Rwing Chest -parent Lwing Chest -parent Hips Body -parent Waist Body -parent camera Head -prefix IMP2_ -prefix IMP_ -align ALL"

numFrames 1
numJoints 71
frameRate 24
numAnimatedComponents 80

hierarchy {
  "origin"  -1 0 0  //
  "Body"  0 63 0  // origin ( Tx Ty Tz Qx Qy Qz )
  "Hips"  1 9 6 // Body ( Tx Qx )
  "Lupleg"  2 56 8  // Hips ( Qx Qy Qz )
  "Lloleg"  3 56 11 // Lupleg ( Qx Qy Qz )
  "Lankle_r"  4 56 14 // Lloleg ( Qx Qy Qz )
  "Lball_r" 5 0 0 // Lankle_r
  "Ltoe1_r" 6 0 0 // Lball_r
  "Ltip1_r" 7 0 0 // Ltoe1_r
  "Ltoe2_r" 6 0 0 // Lball_r
  "Lknee" 4 0 0 // Lloleg
  "Rupleg"  2 56 17 // Hips ( Qx Qy Qz )
  "Rloleg"  11 56 20  // Rupleg ( Qx Qy Qz )
  "Rankle_r"  12 56 23  // Rloleg ( Qx Qy Qz )
  "Rball_r" 13 0 0  // Rankle_r
  "Rtoe1_r" 14 0 0  // Rball_r
  "Rtip1_r" 15 0 0  // Rtoe1_r
  "Rtoe2_r" 14 0 0  // Rball_r
  "Rtip2_r" 17 0 0  // Rtoe2_r
  "Rknee" 12 0 0  // Rloleg
  "Waist" 1 9 26  // Body ( Tx Qx )
  "Chest" 20 56 28  // Waist ( Qx Qy Qz )
  "Lrib"  21 0 0  // Chest
  "Rrib"  21 0 0  // Chest
  "Shoulders" 21 0 0  // Chest
  "Lshldr"  24 0 0  // Shoulders
  "Luparm"  25 56 31  // Lshldr ( Qx Qy Qz )
  "Lloarm"  26 56 34  // Luparm ( Qx Qy Qz )
  "Lelbow"  27 0 0  // Lloarm
  "Lhand" 27 56 37  // Lloarm ( Qx Qy Qz )
  "Lindex_lo" 29 56 40  // Lhand ( Qx Qy Qz )
  "Lindex_base" 30 0 0  // Lindex_lo
  "Lindex_mid"  31 0 0  // Lindex_base
  "Lindex_tip"  32 0 0  // Lindex_mid
  "Lmissile"  29 0 0  // Lhand
  "Lpinky_base" 29 56 43  // Lhand ( Qx Qy Qz )
  "Lpinky_mid"  35 0 0  // Lpinky_base
  "Lpinky_tip"  36 0 0  // Lpinky_mid
  "Lring_lo"  29 56 46  // Lhand ( Qx Qy Qz )
  "Lring_base"  38 0 0  // Lring_lo
  "Lring_mid" 39 0 0  // Lring_base
  "Lring_tip" 40 0 0  // Lring_mid
  "Lthumb_lo" 29 0 0  // Lhand
  "Lthumb_base" 42 56 49  // Lthumb_lo ( Qx Qy Qz )
  "Lthumb_mid"  43 0 0  // Lthumb_base
  "Lthumb_tip"  44 0 0  // Lthumb_mid
  "Neck"  24 0 0  // Shoulders
  "Head"  46 56 52  // Neck ( Qx Qy Qz )
  "Jaw" 47 8 55 // Head ( Qx )
  "camera"  47 0 0  // Head
  "Rshldr"  24 0 0  // Shoulders
  "Ruparm"  50 56 56  // Rshldr ( Qx Qy Qz )
  "Rloarm"  51 56 59  // Ruparm ( Qx Qy Qz )
  "Relbow"  52 0 0  // Rloarm
  "Rhand" 52 56 62  // Rloarm ( Qx Qy Qz )
  "Rindex_lo" 54 56 65  // Rhand ( Qx Qy Qz )
  "Rindex_base" 55 0 0  // Rindex_lo
  "Rindex_mid"  56 0 0  // Rindex_base
  "Rindex_tip"  57 0 0  // Rindex_mid
  "Rmissile"  54 0 0  // Rhand
  "Rpinky_base" 54 56 68  // Rhand ( Qx Qy Qz )
  "Rpinky_mid"  60 0 0  // Rpinky_base
  "Rpinky_tip"  61 0 0  // Rpinky_mid
  "Rring_lo"  54 56 71  // Rhand ( Qx Qy Qz )
  "Rring_base"  63 0 0  // Rring_lo
  "Rring_mid" 64 56 74  // Rring_base ( Qx Qy Qz )
  "Rring_tip" 65 0 0  // Rring_mid
  "Rthumb_lo" 54 0 0  // Rhand
  "Rthumb_base" 67 56 77  // Rthumb_lo ( Qx Qy Qz )
  "Rthumb_mid"  68 0 0  // Rthumb_base
  "Rthumb_tip"  69 0 0  // Rthumb_mid
}

bounds {
  ( -31.3935508728 -33.2783317566 -0.7134016752 ) ( 18.4649372101 37.2027511597 77.4620437622 )

}

baseframe {
  ( 0 0 0 ) ( -0.5 -0.5 -0.5 )
  ( 2.4760267735 51.5447387695 -3.0239832401 ) ( 0 0 -0.0269656405 )
  ( 0.5391756296 5.3652052879 3.3494231701 ) ( -0.0613402687 0.0000000001 0.0000000002 )
  ( 4.848110199 -7.4995913506 -3.4994642735 ) ( 0.7533305883 -0.3584097624 0.4982229173 )
  ( 23.7252902985 2.0797479153 -0.5190656781 ) ( 0.0169100352 0.0553716682 -0.507117033 )
  ( 25.9992160797 0.4113081098 0.2117699981 ) ( -0.8378994465 0.3697840869 -0.000367692 )
  ( 7.6428747177 -0.1704849452 1.3742944002 ) ( 0.4521562159 0.6102808714 0.0235710088 )
  ( 3.1405432224 1.9824055433 0.4279401004 ) ( -0.8991587758 -0.430994302 -0.0660222024 )
  ( 5.8355131149 -0.2658029199 -0.4782480299 ) ( 0.8991587758 0.4309942722 0.0660222024 )
  ( -0.5779812932 4.8389954567 -0.1373329312 ) ( -0.8650191426 -0.4959682524 -0.0630925223 )
  ( -13.9593009949 -13.436507225 -0.8776077032 ) ( -0.5202627778 0.5450600982 -0.4030430019 )
  ( -4.5475716591 -7.4995927811 -3.499464035 ) ( 0.5095764995 -0.3193181753 0.7491980195 )
  ( 23.9364261627 0.4695867002 0.2634396255 ) ( -0.0132172052 -0.0323398076 -0.5067955852 )
  ( 25.928571701 -1.061173439 -0.2101614475 ) ( 0.8804562688 -0.4287308455 0.1820172966 )
  ( 7.3969669342 1.0700726509 1.9842569828 ) ( 0.414168328 0.5506002903 -0.0844277292 )
  ( 3.7375535965 1.1405699253 0.4979706407 ) ( -0.8991587758 -0.430994302 -0.0660222322 )
  ( 6.4621925354 -1.3206008673 -0.5251560807 ) ( 0.8991587758 0.4309942722 0.0660222247 )
  ( 0.5862001181 4.6806712151 0.0544680618 ) ( -0.8650191426 -0.4959682524 -0.0630925596 )
  ( 5.1609163284 1.0726276636 -0.406784445 ) ( 0.8650191426 0.4959682226 0.0630925521 )
  ( -15.0127677917 -12.2452049255 -0.9185569882 ) ( -0.4076469541 0.5704365373 -0.470038116 )
  ( 0.5617718101 2.817825079 0.2927732468 ) ( -0.0178351477 0 0 )
  ( -0.0000000208 7.0335407257 -2.6373338699 ) ( 0.201567024 -0.0920431614 0.0823274627 )
  ( 5.5330328941 5.4921531677 9.7140846252 ) ( 0 0 0 )
  ( -5.1057934761 5.3530840874 9.7140846252 ) ( 0 0 0 )
  ( -0.0000004874 6.9072780609 1.4406898022 ) ( 0 0 0 )
  ( 1.3570985794 5.1922392845 5.7731337547 ) ( 0 0 0 )
  ( 6.011097908 2.649071455 -3.8526349068 ) ( -0.2380189896 0.132037282 -0.056156069 )
  ( 15.5160989761 -8.4108753204 -4.8359546661 ) ( 0.2470137626 0.5948097706 0.0545518361 )
  ( -0.0000004008 -5.1226344109 -10.860042572 ) ( 0 0 0 )
  ( 16.1131668091 -0.862603724 5.8071165085 ) ( 0.075790748 -0.0235308465 0.3191515803 )
  ( 3.8181121349 -0.2973783016 4.3312106133 ) ( 0 0 0 )
  ( 0.9821479321 2.2913444042 2.5638625622 ) ( 0 0 0 )
  ( 1.708524704 0.2291327417 1.8135774136 ) ( 0 0 0 )
  ( 3.1367900372 -0.0327331014 0.8311431408 ) ( 0 0 0 )
  ( 6.8432250023 -2.1682388783 3.2700173855 ) ( -0.138220951 0.2414328605 0.0411296487 )
  ( 5.2521152496 0.9975341558 0.5324622989 ) ( 0.0000000068 -0.2179616541 0.0000000041 )
  ( 3.3450102806 1.2089673281 2.4598009586 ) ( 0 0 0 )
  ( 1.681576252 -1.4940611124 2.1254475117 ) ( 0 0 0 )
  ( 4.649204731 1.6285676956 3.3226091862 ) ( 0.0000000068 -0.2179616541 0.0000000041 )
  ( 1.7058147192 2.0827009678 2.6628034115 ) ( 0 0 0 )
  ( 2.0110440254 1.0785975456 2.2803318501 ) ( 0 0 0 )
  ( 2.5381846428 -0.6152225137 1.9290049076 ) ( 0 0 0 )
  ( -0.4182890356 -1.1882292032 1.0407077074 ) ( -0.2898611128 -0.1038644761 0.1486005187 )
  ( 1.6213328838 0.0893517062 3.1109926701 ) ( 0 0 0 )
  ( 2.3349740505 -0.0248277131 2.2007021904 ) ( 0 0 0 )
  ( 2.4510016441 0.2524562478 -0.1834257543 ) ( 0 0 0 )
  ( -0.0000001948 7.1730985641 2.5618207455 ) ( 0 0 0 )
  ( -0.0000000276 3.3070755005 2.491951704 ) ( -0.0577989146 0.0846273452 0.0329034701 )
  ( 0.0000001506 0.9315695167 2.2590591908 ) ( 0.0721767098 0.0000000002 0.0000000003 )
  ( -0.0402970463 1.4245171547 8.0585632324 ) ( 0.4386899173 0.4286603034 0.5624555945 )
  ( -1.3571002483 5.1922497749 5.7731347084 ) ( 0 0 0 )
  ( -6.7415614128 2.6489987373 -3.8526377678 ) ( -0.2907330096 -0.053753797 -0.0805300251 )
  ( -15.516087532 -8.4107513428 -4.8359498978 ) ( 0.0694723353 -0.5479462147 0.2041756213 )
  ( 0.0000000718 -5.1226363182 -10.8600435257 ) ( 0 0 0 )
  ( -16.1131229401 -0.8626292348 5.8071131706 ) ( 0.218038708 0.0240256824 -0.327667594 )
  ( -1.5337347984 2.4702615738 4.9790902138 ) ( -0.0779427066 0.0519779809 -0.0891063362 )
  ( -0.5139840245 1.6197491884 2.403200388 ) ( 0 0 0 )
  ( -0.6929480433 1.687722683 2.0502464771 ) ( -0.0100346701 0.0304258224 -0.0366764255 )
  ( -2.4904234409 0.4470478296 1.2389490604 ) ( 0 0 0 )
  ( -5.4880919456 -0.3461858928 4.295088768 ) ( 0.1432322711 0.3550916016 0.0819803327 )
  ( -4.7624530792 2.5737540722 1.6511298418 ) ( 0.0793462843 -0.3546554148 -0.1802829504 )
  ( -1.9488474131 2.2087686062 0.3771297038 ) ( 0 0 0 )
  ( -4.0100383759 0.6788948178 0.8763221502 ) ( 0 0 0 )
  ( -2.5452070236 3.57975173 3.5105957985 ) ( -0.0257917885 -0.2003844976 -0.1592328548 )
  ( -2.3333375454 3.3305103779 1.1794564724 ) ( 0 0 0 )
  ( -2.1264834404 2.197457552 0.70610255 ) ( -0.0003960302 0.0163160004 -0.0367806926 )
  ( -3.5052778721 0.53081882 0.2454159409 ) ( 0 0 0 )
  ( 0.729351759 -1.1781214476 1.7946341038 ) ( 0.0773966312 -0.1778857559 -0.2815241218 )
  ( -2.893507719 0.0141301416 2.1601076126 ) ( -0.0397726409 -0.1485752016 -0.1408533454 )
  ( -2.8386559486 0.1393289566 0.9360996485 ) ( 0 0 0 )
  ( -2.1317574978 1.8289468288 -0.6433672309 ) ( 0 0 0 )
}

frame 0 {
   1.2743713856 49.8071212769 -6.2236757278 -0.301613301 -0.0656906441 -0.0252647735
   -0.0907445773 0.2923710346
   0.7540339231 -0.2941021323 0.5339689255
   0.0371071063 0.0738617554 -0.6434295177
   -0.8305364847 0.4191995859 0.0581805855
   0.5359956026 -0.3419888318 0.7382792234
   -0.0281945076 -0.0433229692 -0.6589797735
   0.8208566904 -0.5117877722 0.2123244107
   -0.0681486875 0.1237936914
   0.0071677719 -0.1102561727 0.0996083394
   -0.3379310369 0.0283825267 0.238038227
   0.0720432699 0.2310861796 0.0174674299
   0.0143112773 -0.0205912869 0.1865288317
   -0.0058438457 0.1013047695 0.0249757692
   -0.0334293842 -0.2901588678 0.0325438902
   0.032865338 -0.1890057921 -0.04168576
   -0.0206565745 0.0745454952 0.041123461
   0.2911868691 0.0261631962 -0.0799840987
   -0.2130338699
   -0.3580453396 -0.1959558129 -0.3496784568
   0.0341408998 -0.1498850435 0.063953191
   0.4111736417 -0.0181319881 -0.332657218
   -0.1373830438 0.1029238626 -0.1825084984
   0.0751905441 -0.3131851256 -0.2397393435
   -0.062719278 -0.1732839942 -0.2472289354
   -0.0007715528 0.0317876674 -0.0716580674
   -0.0323306099 -0.1710879207 -0.083092168
}
 

 
7.  Your new Imp needs a new scriptobject file to tell it to use the "statue" animation and nothing else.  In base/pak000.pk4 there is a directory called "script\", which contains two relevant script files: "monster_demon_imp.script\" and "doom_main.script\".  Extract these two into your mod directory (mine is enemy/script) and create a new script file called "monster_demon_imp_statue.script\", which tells the imp to spawn and just perform the "statue" animation.  My file looks like this:

code:
/***********************************************************************

ai_monster_demon_imp_statue.script

monster_demon_imp_statue
monster_demon_imp_statue_crawler

***********************************************************************/



object monster_demon_imp_statue : monster_base {


  // States
  void    state_Begin();
  void    state_Idle();
    void    Torso_Idle();
  void    Legs_Idle();
  void    init();


};

/*
=====================
monster_demon_imp_statue::init
=====================
*/
void monster_demon_imp_statue::init() {

 
  idleAnim( ANIMCHANNEL_TORSO, "statue" );
    idleAnim( ANIMCHANNEL_LEGS, "statue" );
}


void monster_demon_imp_statue::Torso_Idle() {

 

}


void monster_demon_imp_statue::Legs_Idle() {


}


/***********************************************************************

  States

***********************************************************************/

/*
=====================
monster_demon_imp_statue::state_Begin
=====================
*/
void monster_demon_imp_statue::state_Begin() {
  animState( ANIMCHANNEL_TORSO, "Torso_Idle", 0 );
  animState( ANIMCHANNEL_LEGS, "Legs_Idle", 0 );
//  monster_begin();
//  setMoveType( MOVETYPE_ANIM );
//  setState( "state_Idle" );
}

/*
=====================
monster_demon_imp_statue::state_Idle
=====================
*/
void monster_demon_imp_statue::state_Idle() {
  wait_for_enemy();

//  nextLeap    = RandomTime( IMP2_LEAP_RATE );
//  nextAttack    = 0;
//  nextDodge   = RandomTime( IMP2_DODGE_RATE );
//  nextNoFOVAttack = 0;

//  setState( "state_Combat" );
}
 

This is basically a modification of the default Imp file which tells the imp to just spawn and play the "statue" animation (it is necessary to leave the "torso_idle" in because the torso is used as part of the imp's model).  The statue animation is just a single pose.

Then, in doom_main.script, add in a new line that references ai_monster_demon_imp_statue.script- otherwise Doom 3 will throw up an error saying that the script file does not exist.

8.  Now you need to create a custom definition for the Imp.  The Imp's default definition is located in base/pak000.pk4 under "def/monster_demon_imp.def".  Extract this file to your mod directory (e.g. "enemy/def/monster_demon_imp.def".  

In this file, in the section of code saying, "model monster_demon_imp", create a new line, "anim statue", "models/md5/monsters/imp/statue.md5anim".  My relevant section of code is as follows:

code:
model monster_demon_imp {
  mesh              models/md5/monsters/imp/imp.md5mesh
  channel torso         ( *chest )
  channel legs          ( waist *Hips Body origin )
 
  anim af_pose          models/md5/monsters/imp/initial.md5anim
  anim ik_pose          models/md5/monsters/imp/initial.md5anim
             
  anim teleport         models/md5/monsters/imp/teleportin.md5anim {
    frame 4             sound_body snd_footstep
    frame 21            sound_body snd_sight
  }  
  anim initial          models/md5/monsters/imp/initial.md5anim
  anim crawl            models/md5/monsters/imp/scurry2.md5anim {
    frame 6             sound_body snd_footstep
    frame 10            sound_body snd_footstep
    frame 14            sound_body snd_footstep
    frame 18            sound_body snd_footstep
  }
  anim crawl_idle         models/md5/monsters/imp/on4_idle.md5anim {
    frame 57            sound_chatter snd_alert_idle
    frame 140           sound_chatter snd_alert_idle
  }
  anim stand            models/md5/monsters/imp/idle1.md5anim
  anim statue           models/md5/monsters/imp/statue.md5anim
  anim idle           models/md5/monsters/imp/idle1.md5anim {
    random_cycle_start
  }
  anim idle1            models/md5/monsters/imp/idle1.md5anim {
    random_cycle_start
  }
  anim sight1           models/md5/monsters/imp/sight.md5anim {
    frame 15            sound_body snd_sight
  }
  anim sight2           models/md5/monsters/imp/sight2.md5anim {
    frame 13            sound_body snd_sight2
  }
  anim walk           models/md5/monsters/imp/walk1.md5anim {
    random_cycle_start
    frame 2             leftfoot
    frame 19            rightfoot
  }
  anim run            models/md5/monsters/imp/faster_walk.md5anim {
    random_cycle_start
    frame 13            leftfoot
    frame 26            rightfoot
  }
  anim crawl_evade_left     models/md5/monsters/imp/evade_left_on4.md5anim {
    frame 1             sound_voice snd_pain
    frame 14            sound_body snd_footstep
    frame 15            sound_body snd_footstep
    frame 16            sound_body snd_footstep
  }
  anim crawl_evade_right      models/md5/monsters/imp/evade_right_on4.md5anim {
    frame 1             sound_voice snd_pain
    frame 13            sound_body snd_footstep
    frame 14            sound_body snd_footstep
    frame 15            sound_body snd_footstep
    frame 16            sound_body snd_footstep
  }
  anim crawl_evade_left_noturn  models/md5/monsters/imp/evade_left_on4.md5anim {
    ai_no_turn
    frame 1             sound_voice snd_pain
    frame 14            sound_body snd_footstep
    frame 15            sound_body snd_footstep
    frame 16            sound_body snd_footstep
  }
  anim crawl_evade_right_noturn models/md5/monsters/imp/evade_right_on4.md5anim {
    ai_no_turn
    frame 1             sound_voice snd_pain
    frame 13            sound_body snd_footstep
    frame 14            sound_body snd_footstep
    frame 15            sound_body snd_footstep
    frame 16            sound_body snd_footstep
  }
  anim evade_left         models/md5/monsters/imp/evade_left.md5anim {
    frame 1             sound_voice snd_pain
    frame 14            sound_body snd_footstep
    frame 15            sound_body snd_footstep
  }
  anim evade_right        models/md5/monsters/imp/evade_right.md5anim {
    frame 1             sound_voice snd_pain
    frame 13            sound_body snd_footstep
    frame 14            sound_body snd_footstep
  }
  anim range_attack1        models/md5/monsters/imp/range1.md5anim {
    frame 2             sound_weapon snd_createmissile
    frame 2             create_missile RMissile
    frame 22            sound_weapon snd_attackmissile
    frame 22            launch_missile RMissile
  }
  anim range_attack2        models/md5/monsters/imp/range3.md5anim {
    frame 11            sound_weapon snd_createmissile
    frame 11            create_missile RMissile
    frame 45            sound_weapon snd_attackmissile
    frame 45            launch_missile RMissile
  }
  anim range_attack3        models/md5/monsters/imp/range4.md5anim {
    frame 1             sound_body snd_sight
    frame 2             sound_weapon snd_createmissile
    frame 2             create_missile RMissile
    frame 37            sound_weapon snd_attackmissile
    frame 37            launch_missile RMissile
  }
  anim turret_attack1       models/md5/monsters/imp/turret_attack1.md5anim {
    frame 1             sound_body snd_sight
    frame 2             sound_weapon snd_createmissile
    frame 2             create_missile RMissile
    frame 22            sound_weapon snd_attackmissile
    frame 22            launch_missile RMissile
  }
  anim turret_idle        models/md5/monsters/imp/turret_idle.md5anim
 
  anim jump_start         models/md5/monsters/imp/jump_start.md5anim {
    frame 1             sound_voice snd_attackmelee_1
  }
  anim jump_loop1         models/md5/monsters/imp/jump_loop.md5anim
  anim jump_end         models/md5/monsters/imp/jump_end.md5anim {
    frame 1             sound_body snd_footstep
    frame 3             sound_body snd_footstep
  }

  anim melee_attack1        models/md5/monsters/imp/slash1.md5anim {
    frame 1             sound_weapon snd_attackmelee_1
    frame 8             melee melee_impLeftClaw
    frame 10            sound_body snd_footstep
    frame 17            melee melee_impRightClaw
    frame 19            sound_body snd_footstep
  }
  anim melee_attack2        models/md5/monsters/imp/slash2.md5anim {
    frame 1             sound_weapon snd_attackmelee_2
    frame 4             sound_body snd_footstep
    frame 9             melee melee_impLeftClaw
    frame 11            sound_body snd_footstep
    frame 21            sound_body snd_footstep
  }
  anim melee_attack3        models/md5/monsters/imp/slash3.md5anim {
    frame 1             sound_weapon snd_attackmelee_2
    frame 6             melee melee_impRightClaw 
    frame 10            sound_body snd_footstep
  }
  anim pain_head          models/md5/monsters/imp/pain_head.md5anim {
    frame 1             sound_voice snd_pain
  }
  anim pain_left_arm        models/md5/monsters/imp/pain_luparm.md5anim {
    frame 1             sound_voice snd_pain
  }
  anim pain_right_arm       models/md5/monsters/imp/pain_ruparm.md5anim {
    frame 1             sound_voice snd_pain 
  }
  anim pain_chest         models/md5/monsters/imp/pain_chest.md5anim {
    frame 1             sound_voice snd_pain
  }
  anim pain           models/md5/monsters/imp/pain3.md5anim {
    frame 1             sound_voice snd_pain
  }
  anim leap_attack        models/md5/monsters/imp/scurry_leap.md5anim {
    frame 1             sound_voice snd_sight8
    frame 4             sound_body snd_footstep
    frame 15            sound_body snd_footstep
    frame 16            attack_begin melee_impLeapAttack
    frame 28            attack_end
    frame 30            sound_body snd_footstep
    frame 32            sound_body snd_footstep
    frame 38            sound_body snd_footstep
  }

  anim roofcrawlidle        models/md5/monsters/imp/ceilingimpidle.md5anim {
    ai_no_turn
    frame 1             disableGravity
    frame 1             disableWalkIK
  }
  anim roofcrawl          models/md5/monsters/imp/ceilingimp.md5anim {
    ai_no_turn
    frame 1             disableGravity
    frame 1             disableWalkIK
    frame 117           enableGravity
    frame 117           enableWalkIK
  }

  anim ceilinghang        models/md5/monsters/imp/hangonceiling.md5anim {
    ai_no_turn
    frame 1             disableGravity
    frame 1             disableWalkIK
  }

  anim zombie_feast       models/md5/monsters/imp/severedidle.md5anim {
    ai_no_turn
  }
  anim zombie_feast_wake      models/md5/monsters/imp/severedwake.md5anim {
    ai_no_turn
    frame 6           sound_voice snd_chatter
  }

  anim outofholeidle        models/md5/monsters/imp/outofholeidle.md5anim {
    frame 1             disableWalkIK
    ai_no_turn
  }
  anim outofhole          models/md5/monsters/imp/outofhole.md5anim {
    ai_no_turn
    frame 1             disableWalkIK
    frame 12            sound_voice snd_chatter
    frame 65            enableWalkIK
  }

  anim offwallidle        models/md5/monsters/imp/offwallidle.md5anim {
    ai_no_turn
    frame 1             disableWalkIK
    frame 1             disableGravity
  }
  anim offwall          models/md5/monsters/imp/offwall.md5anim {
    ai_no_turn
    frame 1             disableWalkIK
    frame 1             disableGravity
    frame 73            enableGravity
    frame 73            enableWalkIK
  }
}

 

9.  Finally, insert a new model entity definition as follows:

code:
entityDef monster_demon_imp_statue {
  "inherit"           "monster_demon_imp"
  "scriptobject"          "monster_demon_imp_statue"
  "snd_footstep"          ""
  "snd_sight"           ""
  "snd_sight2"          ""
  "snd_sight8"          ""
  "snd_chatter"         ""
  "snd_chatter_combat"      ""
  "snd_pain"            ""
  "skin"                            "skins/enemy/statue"
"finalBoss"           "1"

}
 

This monster inherits from the default imp, but uses the imp_statue scriptobject and the imp_statue skin.  Hopefully, when you spawn this monster, you should be left with a statue that sits there doing nothing and cannot be killed by conventional means (which is what "FinalBoss 1" does).

Level
Avatar
Avatar
Offline Since
Sep 16, 2014
Country
United Kingdom United Kingdom
Gender
Male
Member Watch
Track this member
Blog Statistics
Articles
1
Views
100
Views Today
0