Jump to content
The Dark Mod Forums

Zombies


Springheel

Recommended Posts

I'm actually going to take a shot at this if I can get the .def files figured out. I've got the default D3 one already, and thought I'd use the tdm_revenant one for comparison, since they're both undead.

Link to comment
Share on other sites

Go for it. The main thing is putting this line in the def file for the zombie:

 

"inherit" "atdm:ai_humanoid"

 

The other main issue is that our AI script assumes certain names for certain animations, and will crash if it tells the AI to play those animations and they aren't there.

 

I think these are the main ones, from the revenant def file:

The names on the left MUST be the same. The files on the right should be the anim names for that particular zombie. You don't have to worry about the sword draw animation, since "draws_weapon" should be set to "0" for the zombie if it doesn't have a weapon.

 

anim walk models/md5/chars/undead/revenant/rev_walk.md5anim {

frame 9 footstep

frame 22 footstep

}

 

anim run models/md5/chars/undead/revenant/rev_run.md5anim {

frame 2 footstep

frame 12 footstep

}

 

anim idle models/md5/chars/undead/revenant/rev_idle01.md5anim

anim pain models/md5/chars/undead/revenant/rev_pain01.md5anim

anim melee_attack models/md5/chars/undead/revenant/rev_attack02.md5anim

{

frame 10 melee melee_DMRevenant_LeftPunch

}

 

In the future we'll change the script to support multiple melee attacks and chose randomly/strategically among them, but right now only the "melee_attack" anim is played. Feel free to bring along the other anims though and call them melee_attack2 or melee_attack_long and melee_attack_quick, etc.

 

Also, you'll want to copy over the anim channel setup from the zombie def rather than the revenant def, since the joint names will be different. I.e., replace this stuff from the revenant file:

 

channel torso ( *spine1 )

channel legs ( *origin -*spine1 )

 

With that from the .def file of the doom3 zombie.

 

You might also have to do something about the head joint, since certain code depends on knowing the name of the head, both in the MD5 mesh and in the AF file. If the name is not "Head" in the zombie md5 mesh, you'll have to change this to the name of the head:

 

/**
* Name of the head body on the AF
* Used to detect drowning when unconscious
* Not needed if the AI has a separate head model
**/
"head_bodyname"		"head"

/**
* Name of the head joint in the md5 mesh.
* This joint should either be the look joint or get rotated
*  to match the look joint in order for KO to work properly.
**/
"head_jointname" 	"Head"

 

On second thought though, this is just used for KO and drowning, neither of which a zombie will do... so maybe I need to code in some keys that tells the system not to check for KO or drowning. :blush:

 

Finally, you might have to copy over some of the melee attack damage definitions from the D3 zombie. These set up the damage, screen overlay, and knockback directions.

Link to comment
Share on other sites

I'm working my way through it, slowly. I put the default zombie into one of our maps just to see what it would look like, and it's actually quite cool. They seem much faster when you don't have a shotgun to attack with. :)

 

Anyway, I noticed that there were multiple pain animations in the def file:

 

anim pain_head3

anim pain_chest1

etc.

 

There are multiple animations for many different parts of the body. So I guess we could do the same thing we our guards if we wanted to (after the first release, of course).

 

I assume I should just pick one for the moment. Do I need to comment the others out if I bring them over or will they just be ignored?

Link to comment
Share on other sites

Ok, I've made most of the changes and I'm ready to test it out, but the zombie isn't appearing in the editor window. I set it to 'entityDef atdm:ai_undead_zombie' in the def file, which I thought would automatically put it into the atdm:ai dropdown window in the editor, but it's not there.

 

Do I need to change the "scriptobject" line, btw? Currently it's set to "monster_zombie"

 

edit: interesting side-note...the default bounding box around the zombie makes it unable to get through doors.

Link to comment
Share on other sites

Do I need to change the "scriptobject" line, btw? Currently it's set to "monster_zombie"

Yes, I would remove that line. If you put in the "inherit" line it should be getting the correct TDM scriptobject, but the scriptobject line from the old def is overloading the inherited one, so you'll want to remove that line.

 

As for the pain animation: That's cool, we could do that in a later release. For now, our script only plays one pain animation, I think it's just called "pain" You can bring the other ones over and they'll be ignored, no problem, but make sure to "name" one of them as "pain"

 

Maybe in a later release we could also think about having a "small pain" and "large pain" animation, or we could just play a sound and not play an animation for small pain, since they'd basically be unphazed.

 

One final question: Where are you putting this stuff? It should be a new def file in /darkmod/defs, named something like tdm_ai_undead_zombie.def

Link to comment
Share on other sites

One final question: Where are you putting this stuff? It should be a new def file in /darkmod/defs, named something like tdm_ai_undead_zombie.def

 

Yep, that's where I put it and what I named it (haven't put it on CVS though, if you're looking).

 

I'll try deleting the scriptobject line when I have time to play with it tonight...do you expect that to have an impact on why it doesn't appear in the atdm:ai window?

 

Is there another way to insert and ai rather than using that dropdown window?

Link to comment
Share on other sites

I'll try deleting the scriptobject line when I have time to play with it tonight...do you expect that to have an impact on why it doesn't appear in the atdm:ai window?

I doubt it, that sounds like something else is wrong.

 

Is there another way to insert and ai rather than using that dropdown window?

 

You can insert it ingame if you want, load up a map, bring up the console and type "spawn <the full AI name>" This might be a better way, since you can see any errors that might be reported in the console. It's probably not loading properly due to a typo or something. It could be the head joint issue too.

Link to comment
Share on other sites

Hmm, something interesting.

 

I haven't been able to do anything with zombie_base yet. Well, that's not true, I can import him into the game with a D3 brain, and he acts like a zombie--though he looks more like a skeleton. He doesn't have a head and I haven't been able to figure out how to attach one. The zombie_base def file also seems a little unusual--doesn't have a lot of the typical stuff.

 

Well, then I noticed that a lot of the zombie models had red bits showing through in the editor, but didn't when you saw them in game. Turns out the red bits are the zombie_base model showing THROUGH the other model.

 

(check out the pic at the top of this thread: http://forums.thedarkmod.com/index.php?showtopic=3944&st=0 ... you can see the red bits of the zombie_base model showing through on the chest and head, yet in-game those don't show up)

 

Any guesses about what this means? It makes me think that zombie_base really is some kind of base class for zombies, containing all the generic animations (it is the only zombie that I've found with "get up" animations, and I know for a fact I saw other types get up during the game).

 

I've kind of run out of ideas about how to test this hunch, however. Anyone have any ideas?

 

At the very least, I'd like to be able to attach a head and include the zombie_base model/animations as another AI option, because this is the last zombie that looks useable for us without a lot of work.

Link to comment
Share on other sites

Hold the phone! :) Sorry if this is not directly in answer to the previous question, but it's something interesting as well.

 

In your base folder, open pak002.pk4.

Take a look at the texture for:

models\monsters\zombie\boney\boney.tga

 

As expected, it's half a guy. Because of the mirroring limitation. But now look at:

 

modes\monster\zombie\morgue\morgue_d.tga

 

NOT half a texture, not mirrored. Is this presumed limitation real? Maybe id did half-textures to save time?

 

If this is not really a limitation, if really opens up skin possibilities. I was looking through here in the first place to see if I could get started on figuring out what's what for nodraw body parts. There are separate parts textures, but I don't know if they're for dismembered limbs, or nodraw purposes.

Link to comment
Share on other sites

The morgue guy is a separate model, with a big injury on one side, which is probably why they didn't do a mirrored texture for him.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...