Jump to content
The Dark Mod Forums

Simple animals


Baddcog

Recommended Posts

I added a rather basic squeak for his chatter. I assume this is okay for now, but I don't know how "fleshed out" the little guy is going to be AI-wise and whether or not he needs variations or distinctive noises for certain events.

According to our release progress thread, we want to have rats in the sewers, so I assume it should have a basic set of sounds. I guess a set of two or three "idle" squeaks and one or two "danger sight" squeaks should do the trick.

Link to comment
Share on other sites

  • Replies 179
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Ok, I've got a rudimentary idle behaviour in the PK4 which got just uploaded (edit: def files are up to date now too). Check it out in test/rat.map, the rat should run around, pause, run, play its idle anim, go to the next path_corner, run around, wait, etc. etc. Everything is randomized a bit, i.e. it switches between running and walking, the goal position is varied while it walks, and so on. It's still far too slow, it should be twice as fast.

 

Next step is to make it run away when it notices the player.

 

edit2: Dammit, I used the wrong vcproj (the one from the server) to build the PK4, the AnimalTask objects were missing. The correct PK4 is up now.

Link to comment
Share on other sites

Sounds fun. I'll check it out tonight.

 

edit: I can't varify that it's actually doing what you describe, greebo. It seems to walking a regular route around the outside of the map (actually it got stuck on the door the first time, but after I opened it it seemed to just go in a big circle. It does cycle randomly between walking and hopping, and I saw it go on its high legs once or twice, but it never actually paused or seemed to play its idle animation.

 

I also had one instance where the rat turned right beside the candle, and hit it with his tail, sending it flying across the room. Super rat! :)

 

edit: After I played around some more, I saw what seemed like a more random behaviour, at least before he gets stuck on the door (currently the rat can open the door, but he keeps getting caught when it starts closing).

 

I added spawnargs to double the speed of the animations...that looks better in terms of distance travelled, though the legs now move a little too fast.

Link to comment
Share on other sites

I assume you didn't have the fully updated PK4 or DEF files, because in my version the rat can't open doors anymore. I'll double-check again today whether I uploaded everything, but the rat really should do more than just running around in circles.

Link to comment
Share on other sites

That's what I see too - gets stuck while trying to open the door - but nevertheless this is a huge advance again - and nice squeak. I have a rat in my own mission just gnawing an apple at the moment - but got tired of the placeholder spider sound. It will be interesting to see what I can do with once this is sorted. It's a magnificent model. Compare those bug things in TDS. I don't recall any rats in TDS.

Link to comment
Share on other sites

Ok, tried it with the update and it seems better. I still noticed that the rats seem to have super muscles--one of them hit a bottle and sent it flying across the room.

 

I think that the animations need to be tweaked. Speeding the walk up just doesn't look very good, as the legs seem to be moving ridiculously fast. I think a simple tweak to the animation that moved the origin more quickly would be sufficient.

 

Also, I assume the bit where he stands on his hind legs is the idle animation? I like that one, but it seems like a simple, 'standing there' animation would be something that could be played more frequently without looking odd. Don't know if baddcog has time to mess with those or not.

Link to comment
Share on other sites

Some nits:

 

* def/tdm_ai_rat.def as opposed to def/tdm_ai_animal_horse.def - should I rename it?

* the rat weights 10 kilograms. Thats about a factor 5 to high :)

 

Otherwise, nice! [squeak]

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

You're suggesting changing tdm_ai_rat.def to tdm_ai_animal_rat.def, yes?

 

Let me know what you do here so I can determine what to name the sound shader and where to place its sound files. Currently his sound(s) are located under the voices/monster/rat directory (I figured he could be a worthy adversary being a 10 kilo rat and all). Perhaps an animal subdirectory under the voices directory is in order?

Link to comment
Share on other sites

Ah, cool to see some work has been done on this.

 

I can try and update the walk anim soon. I've really been slacking lately. Kindof bored and busy at the same time, been doing other stuff. Sorry, not meaning to bail out, just one of those times... Just got back from vacation in LA too.

 

Anyway, I could just move the origin, certianly the easiest way to speed up the walk. I already cut in in half time wise for speed, maybe more than that, can't remember. As is his feet don't slide, if I only move origin they will, but he is small and it might not be noticable.

 

Anway, I'm updating now but getting ready for bed and another week of work. I'll really try and motivate soon.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I would guess that their current speed is about normal for walking. Do they have a run mode? Maybe increase it just a little but try also increasing how often they make that little jump so maybe it would look like a scamper - at least in run mode.

Link to comment
Share on other sites

I would guess that their current speed is about normal for walking.

 

Well, if you're using the current version on SVN, I almost doubled the speed of the animation with a spawnarg. Baddcog, if you're testing a new walkspeed, you'll want to remove the "anim_speed_walk" (or something similar to that) from the entitydef.

 

I was thinking that if we find out it's possible to attach md5meshes to AI, a perfect candidate would be the rat's tail.

Link to comment
Share on other sites

You're suggesting changing tdm_ai_rat.def to tdm_ai_animal_rat.def, yes?

 

Yes, that was the idea, so the files are named consistently. (Anybody can rename it, I was just offering to do it)

 

Let me know what you do here so I can determine what to name the sound shader and where to place its sound files. Currently his sound(s) are located under the voices/monster/rat directory (I figured he could be a worthy adversary being a 10 kilo rat and all). Perhaps an animal subdirectory under the voices directory is in order?

 

If we don't have such a directory already, we probably should have, because the horse would also need sounds and it isn't a monster?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I was thinking that if we find out it's possible to attach md5meshes to AI, a perfect candidate would be the rat's tail.

 

I guess you mean attach a tail to AI other than the rats correct? Not attach a tail to a tailess rat.

 

An easier way to make a werewolf or ratman...and use existing anims?

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I guess you mean attach a tail to AI other than the rats correct? Not attach a tail to a tailess rat.

 

No, I meant removing the tail from the rat model and adding a ragdoll one that would bounce around as the rat moved. That way when the rat turned around, the tail wouldn't stay stiff and fling bottles across the room. :)

 

But I would still need to confirm it can be done. It wouldn't take long, actually. I (or someone else) could just try attaching a rope to an AI and see if anything strange happens.

 

Actually, if you wanted to leave that possibility open, you could just make the rat's tail a separate mesh and material, so if we get ragdoll tails working, we could just use nodraw on the original tail (though come to think of it, I don't know if nodraw md5meshes are actually nonsolid or not).

 

An easier way to make a werewolf

 

Well, we already have one. :huh:

 

(Though I had actually toyed around with adding that werebeast head onto an existing AI body and reskinning it. Theoretically that would be fairly straightforward, and would give us a more human-like werebeast--perhaps a transition stage or something. But that would be somewhat time-consuming, so unless we have a map that requires one, I doubt I'll get to it before December.)

Link to comment
Share on other sites

It does work and the only problems (in a short test) appear to be because of the big size of the rope blocking the AI. I first just stuck in a rope vertically behind a guard and it moved along behind him like an indian rope trick swaying perfectly round corners. Then I noticed he wasn't even attempting to patroll through doors but bypassing them to the next patrol point.

 

Then I rotated the rope and aligned it to trail behind him. Again, this worked but he eventually got stuck between the posts of a canopy as the rope got tangled and the kept turning and tangling his feet with the rope. Again, he avoided doors.

 

But I think all that is just size of the rope and hopefully a small tail on a rat would be OK. In fact might be better than with a stiff tail?

 

I think there is performance hit. Didn't study it but think I was getting about 20 to 25 in one street without and maybe 15 to 20 with the rope but that was a very rough observation as we were continuously moving. Maybe a rat tail of just 2 or 3 bones would be enough.

 

This got me wondering about my snake map - maybe the rope attached to an unrendered silent rat might be fun... :)

Link to comment
Share on other sites

Hmm, that's a good point about the performance hit...the tail would constantly be in motion so the engine would be constantly measuring the physics on it. That would be a lot more expensive than just an animated tail.

 

Hmmm...that might be a deal-breaker, as we don't want something ambient like rats to affect performance in any significant way.

Link to comment
Share on other sites

Yeah, we deffinately want the rats to be as low performance drain as possible.

 

Although that is a good idea for having a tail.

 

Additional complications would arise because getting rid of the tail would mean changing the polycount/verts of the model and bones of the skeleton. Meaning all the animation work is thrown out and started over, I really don't wanna do that either.

 

The AF model is 3 bodies (tail, body and head) which could be simplified to 2.(I'd say adding the head to body would be the best way. More likely a plyer would pick it up by body or tail, rather than getting rid of the tail body.

I don't think this really needs done though, for the amount of usage a rats af would see I don't think 2 or 3 af bodies would make the performance drag much different.

The biggest reason to simplify it would just be to get rid of any twitchiness that I couldn't get out of the current AF. That mainly only happens when grabbing the head and swinging it around.

Anyway, this is the easiest performance gain to get out of it and would take a mere few minutes, so I might do it anyway before release.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Additional complications would arise because getting rid of the tail would mean changing the polycount/verts of the model and bones of the skeleton. Meaning all the animation work is thrown out and started over, I really don't wanna do that either.

 

It shouldn't. You just delete the polys of the tail mesh, not the tail joints or skeleton. It doesn't hurt anything to have joints that aren't weighted to anything.

 

But anyway, I agree we shouldn't really go there for performance reasons.

 

I don't see why reducing the number of AFs on the ragdoll rat is necessary either--unless we are expecting piles of dead rats, the difference between 2 or 3 shouldn't really matter.

 

I think really the rat needs only two things--a faster walk animation, and perhaps an alternate idle that doesn't involve him standing up (since when he's in idle state, he just stands up over and over). Then I'd call him done.

Link to comment
Share on other sites

A nonsolid tail sounds like a decent compromise. If it's easy to do.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

While testing I note that when these rats bump the player they push him around. I have them on team 0 so not sure if the default is to flee the player anyway so might not be crucial.

 

What is strange is they seem to patrol even when I have not set them any target! I think they are heading for path corners set up for other AI but why? Sometimes a mapper might want a rat just to lurk in a rat hole.

 

Committed two new rat skins : animals/bc_rat_dark and animals/bc_rat_pale...

post-400-1208427928_thumb.jpg

Link to comment
Share on other sites

Yes, I set up the movement behaviour of the rats like that on purpose. They don't need to target a path entity to run around - I figured that it is not very exciting if a rat is just standing there, that's not how animals are expected to behave, is it?

 

At any rate, they should not head towards path_corners that are not targetted by themselves. If you can confirm that they actually run to other AI's path_corners, please upload a map and I'll look into it.

Link to comment
Share on other sites

I'd have to check, but all three soon headed for the locked door and scurried about there until a guard unlocked it then they escaped into the night! They seemed to have purpose but maybe they were all following the same random string?

 

I agree they are better to move around rather than stay static in general if it not easy to set them up to patrol like other AI. If they can go anywhere uncontrolled by the mapper then I can imagine problems. A mapper might set up an abandoned part of town with rats but not want them in other areas. So they can only be controlled by barriers such as putting them down sewers? What is their step height? Perhaps small steps could be used to keep them in areas.

 

I'm intrigued to follow them now and see just where they go. :)

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

    • 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.
      · 6 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...