Jump to content
The Dark Mod Forums
Sign in to follow this  
Sotha

Sotha's mapping thread

Recommended Posts

Okay. I just found the AI prefab with the guards eating and drinking. I assumed they're fully working since someone has made a prefab available. BTW: the prefab WAS made incorrectly in a way the guards are standing in the table, rather than sit and turn towards the table. That prefab shouldn't be used as is and without manual fixing by anyone as the AI will get into trouble if they are alerted.

 

At any rate, the eating looks fine enough to be useable, but only if the AI would put the food back to the table instead of dropping it. Strangely, the drinking works just fine. The AI grabs the bottle from the table, drinks a bit and properly places the bottle back on the table. For food, he takes it, eats, and drops to the floor. I see a difference which may cause this: the bottle entity is somekind of special prop_bottle_sit_and_drink. The food is just an ordinary moveable. I suspect that if there was this mysterious eatable prop entity for food, it might work while a real eating anim is made.

 

When I made this back, we had a problem with it, it would sometimes crash or double do things. Greebo found out that the problem was with anim channels playing the same animation on the legs and the torse. This has since been fixed.

 

As for the dropping food, the AI is supposed to pick up an apple (or any other food you place before it) automatically, "eat" it", and drop the applecore which then vanishes a minute later automatically. This was purely for "proof of concept", e.g. show that it can work at all. Such things (like picking up objects, destroying/dropping/putting back) where impossible before v1.02. I am not sure if I ever got it working completely, tho, as the "animation bug" made things unpredictable. It should work now, tho.

 

Anyway, it might be the prefab was just not finished or forgotten. Since you know a lot more about sitting AI than me, maybe you want to fix it?


"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

Share this post


Link to post
Share on other sites

Anyway, it might be the prefab was just not finished or forgotten. Since you know a lot more about sitting AI than me, maybe you want to fix it?

 

Sure, I will gladly fix the prefab, but the food dropped to the ground issue needs to be fixed first somehow. At present it is unusable. If the AI would simply put the food he is eating back to the table, then take it again, eat, put back on the table (exactly the same thing works with the bottle), this would be useable. Then mappers could put all sorts of bread loafs, carrots and stuff, which the AI could eat a few bites and then put back on the plate, wait a for a while, then resume eating. Would look realistic.


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

Sure, I will gladly fix the prefab, but the food dropped to the ground issue needs to be fixed first somehow. At present it is unusable. If the AI would simply put the food he is eating back to the table, then take it again, eat, put back on the table (exactly the same thing works with the bottle), this would be useable. Then mappers could put all sorts of bread loafs, carrots and stuff, which the AI could eat a few bites and then put back on the plate, wait a for a while, then resume eating. Would look realistic.

 

Whether they drop the food or place it again on the table is governed by the animations (and their framecommands), you can have easily BOTH. E.g.

 

  1. Pick up AI_FOOD
  2. Eat foot
  3. Drop food/leftover

 

(Can be done only as long as there is food)

 

  1. Pick up AI_FOOD
  2. Eat foot
  3. drop back on table

 

(can be repeated endlessly)

 

  1. SPAWN new AI_FOOD
  2. Eat foot (either destroy it, or replace with REMAINS)
  3. drop remains

 

(can be repeated endlessly)

 

The problem with the "prefab" is that the food is dropped beside the table, not on the table, which is because we do not have a suitable animation for it.

 

See: http://wiki.thedarkmod.com/index.php?title=Frame_commands

 

The frame commands are definied inside an animation, and you can change them by replacing (unfortunately only the) entire def.

 

As you can see, our animations are just placeholders, as I cannot animate.

 

See def/tdm_ai_guard_proguard_devel.def around line 807:

 

   // tels TODO: anim is a placeholder
   anim bottle_pickup      models/md5/chars/guards/proguard/playcards_idle_draw.md5anim
   {
       no_random_headturning
       frame 8         pickup      AIUSE_DRINK bottle hand_l
       frame 12        sound       tdm_bottle_slosh
   }

   // TODO: anim is a placeholder
   // pickup whatever food is in front of you, "eat" it, drop it
   anim eat_righthand      models/md5/chars/guards/proguard/sit_idle_cough01.md5anim
   {
       no_random_headturning
       frame 8         pickup      AIUSE_EAT food hand_l
       frame 27        sound_voice snd_eat
       frame 84        drop        food
   }

   // TODO: anim is a placeholder
   // spawn a new apple, "eat" it, drop applecore
   anim eat_apple_lefthand     models/md5/chars/guards/proguard/sit_idle_cough01.md5anim
   {
       no_random_headturning
       //frame 8           pickup      AIUSE_EAT food hand_l
       frame 8             attach      atdm:moveable_food_apple food hand_l
       frame 27            sound_voice snd_eat
       // replace apply by droppable apple core
       frame 45            destroy     food
       frame 45            attach      atdm:drop_apple_core food hand_l
       // now drop it
       frame 96            drop        food
   }

 

Or in other words, the entire code is there, we just lack the animations and there is nothing I can do about that. Sorry.


"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

Share this post


Link to post
Share on other sites

Or in other words, the entire code is there, we just lack the animations and there is nothing I can do about that. Sorry.

 

Okay (I'm seem to be a bit slow today).

Let's return to this until we have the required anims. In the meantime we need to remind mappers not to bother with eating characters.


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

Okay (I'm seem to be a bit slow today).

Let's return to this until we have the required anims. In the meantime we need to remind mappers not to bother with eating characters.

 

Actually, why not? The "spawn up apple, eat it, drop applecore" works just fine when you place the AI in front of a bowl with static apples :)


"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

Share this post


Link to post
Share on other sites

I looked how the bottle is placed down in the def:

	// Tels: Put the drinking bottle down. Detaching it should restore idle animations.
// TODO: anim is a placeholder
anim bottle_putdown		models/md5/chars/guards/proguard/playcards_idle_draw.md5anim
{ 
	no_random_headturning
	frame 25		sound		tdm_bottle_slosh
	frame 80		putdown		bottle
}

 

Here there is the cryptic order "putdown" rather than "drop".

drop means the AI just lets go and the object falls and putdown means that the object appears in its original place on the table?

 

If it is so, maybe the eating behavior could be put to use "putdown," so that objects appear where they were on the table. Then the eating behavior could be used. And when we get new animations for eating, they should update in all the maps, which simply use this animations, right?

 

But yeah, I probably shouldn't be thinking about this since I don't understand the intricacies of these things. I just think it would be cool to have this in basic use while we wait for proper anims.

 

 

Actually, why not? The "spawn up apple, eat it, drop applecore" works just fine when you place the AI in front of a bowl with static apples smile.gif

 

Aye, but howsabout bigger food? There is a single loaf of bread / hunk of meat / mapper generated delicious sandwich on the table which the AI nibbles every now and then. This could be used for nobles as well, since the AI is not dropping apple cores to the floor. (Suitable behavior for thugs.)


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

I looked how the bottle is placed down in the def:

	// Tels: Put the drinking bottle down. Detaching it should restore idle animations.
// TODO: anim is a placeholder
anim bottle_putdown		models/md5/chars/guards/proguard/playcards_idle_draw.md5anim
{ 
	no_random_headturning
	frame 25		sound		tdm_bottle_slosh
	frame 80		putdown		bottle
}

 

Here there is the cryptic order "putdown" rather than "drop".

drop means the AI just lets go and the object falls and putdown means that the object appears in its original place on the table?

 

AAAH good catch. I did not document "putdown" on the wiki page, my bad :blush: And yes "putdown" restores the original position and angle of the object.

 

r3873 | tels | 2010-04-14 16:26:05 +0200 (Wed, 14 Apr 2010) | 1 line
Changed paths:
  M /trunk/game/actor.cpp
  M /trunk/game/anim/anim.h
  M /trunk/game/anim/anim_blend.cpp

fix crash due to "destroy"/"drop" frame commands; implement "putdown" including restoring position; add BindNotify() and UnbindNotify() calls so animations can get properly replaced

 

Note the date :)

 

If it is so, maybe the eating behavior could be put to use "putdown," so that objects appear where they were on the table. Then the eating behavior could be used. And when we get new animations for eating, they should update in all the maps, which simply use this animations, right?

 

Yes, but since the .def file is part of TDM; you wouldn't even need to update the maps - unless the maps had their own DEF file because the mapper wants it NOW, then it needs updating and the def to be removed.

 

But yeah, I probably shouldn't be thinking about this since I don't understand the intricacies of these things. I just think it would be cool to have this in basic use while we wait for proper anims.

 

The code support has been there for almost a year and nobody stepped forward to do any (simple) animations, I would not hold my breath to something happen if I was you :)

 

Aye, but howsabout bigger food? There is a single loaf of bread / hunk of meat / mapper generated delicious sandwich on the table which the AI nibbles every now and then. This could be used for nobles as well, since the AI is not dropping apple cores to the floor. (Suitable behavior for thugs.)

 

With a loaf of bread, you could just leave the bread, and make the AI spawn a "piece of bread" and when eating it, just destroy it. We'd need a "already bitten loaf of bread" and "tiny piece of bread", but these models could even be made with DR (e.g. that's something in my reach).


"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

Share this post


Link to post
Share on other sites
The code support has been there for almost a year and nobody stepped forward to do any (simple) animations

 

Well, there wasn't much point when the code wasn't working properly, was there?

 

Now that greebo has fixed it, I'll be able to add more animations that make use of it. Eating animations are certainly near the top of my list, but I'm trying to focus on getting my own mission out first. Though if this is for a new mission of yours, Sotha, I'd be happy to take a break and make something for you.

Share this post


Link to post
Share on other sites

Well, there wasn't much point when the code wasn't working properly, was there?

 

Now that greebo has fixed it, I'll be able to add more animations that make use of it. Eating animations are certainly near the top of my list, but I'm trying to focus on getting my own mission out first. Though if this is for a new mission of yours, Sotha, I'd be happy to take a break and make something for you.

 

Wow! *blush* Thanks! Well the eating thingy is not critical for the map, it was just some more flavour to make things more realistic I would have wanted to do. But this kind of things are really the things which will breathe more 'life' into tdm so if you would do some anims that would be awesome. I'd certainly use 'em.

 

It should work if you have the AI target the alert_idle node directly. The AI will ignore it as long as they're not alert and follow their other pathnodes like they normally would. Once they are alerted and finished searching, they'll return to the closest pathnode that isn't set to idle_only.

 

I tried to make a sleeping AI working with this principle, but I wasn't succesful. How exactly would you make the targettings?

 

AI->walk_to_bed(idle_only)->sleep(idle_only)->patrol_point_after_alerted(alert_idle_only)->etc

resulted the AI to just freeze without a target when he finished searching after alerting him. I think after searching he is targetting an idle_only path_node and won't do anything. :wacko:


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

The only way I've actually done it myself is to have sitting AI ("sitting" "1") who target a path_corner that is set to alert_idle only. The AI stay seated until alerted, and then instead of going back to sit down they go to the path_corner. It works well and should work the same way with sleeping AI.

 

If the sleeping is part of a patrol, that might be slightly different. I haven't tried it, but I would put idle_only flags on each pathnode you want them to use normally, and idle_alert flags on each pathnode they use while alert. The key is to target the AI at TWO pathnodes--one of the alert ones and one of the idle ones.

 

Once they go alert, they'll ignore all the idle nodes and then switch to their alert only target.

Share this post


Link to post
Share on other sites

The only way I've actually done it myself is to have sitting AI ("sitting" "1") who target a path_corner that is set to alert_idle only. The AI stay seated until alerted, and then instead of going back to sit down they go to the path_corner. It works well and should work the same way with sleeping AI.

 

Ah, brilliant. This is the way to do it. Many thanks.


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

Making some objectives.

 

What does the objective component "Group Identifier (component specific)" mean and do?


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

I believe it means inventory group, ie, inventory category such as keys, readables. So presumably you could have an objective 'acquire any 3 potions' etc.

 

It's interesting that you can create your own categories just by adding the spawnarg inv_category and invent a new name. So say you had ten magic books in a map and you wanted the player to get say any 3 on Easy, 5 on Hard, and 8 on Expert then you could give each of the ten say, inv_category MagicBooks (not sure if spaces are allowed.) Even if they are actually readable they would be listed in the inventory under MagicBooks. Once you had any 5 on Hard then the objective would complete.

 

This is all theory but I would expect it to work that way.

Share this post


Link to post
Share on other sites

I believe it means inventory group, ie, inventory category such as keys, readables. So presumably you could have an objective 'acquire any 3 potions' etc.

 

It's interesting that you can create your own categories just by adding the spawnarg inv_category and invent a new name. So say you had ten magic books in a map and you wanted the player to get say any 3 on Easy, 5 on Hard, and 8 on Expert then you could give each of the ten say, inv_category MagicBooks (not sure if spaces are allowed.) Even if they are actually readable they would be listed in the inventory under MagicBooks. Once you had any 5 on Hard then the objective would complete.

 

This is all theory but I would expect it to work that way.

 

I have an objective where stackable items must be collected a certain amount.

I tried to use this player possesses item/group-thing, but it didn't work. I simply used trigger_count for these objectives and that works well enough. The downside is that the objects cannot be allowed to be dropped, but hey.. Who want's to drop objective objects anyways?


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

Now I remember a problem with stackables in Heart. Originally you had to give Martha any health potion. This just would not work so I had to do a special one. That glitch I think went on tracker. Funnily enough, I now realize that error spawned the main objective for Alchemist - to get a special holy healing potion sort of naturally followed. :)

Share this post


Link to post
Share on other sites

What is the correct way to do locked double doors?

 

I've tried to do all kinds of things but the AI always leave the other door unlocked!

 

Both door locked: Doors are properly locked intially. AI has can_open for both doors. The AI leaves the other door unlocked. The other gets locked.

 

Only one of the door locked: the other is not locked at all, player can just open the unlocked one.


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

I tried to make it like this:

left_door, right_door. Both locked.

Right_door has "frob_master left_door"

 

AI has "can_open left_door"

 

No the AI came to the door and tried to open the wrong one. Nothing happened, door locked. He moved to the left_door and opened both doors. Again, the other door was left unlocked when the AI left.

 

I'm starting to think this is a vicious bug: the AI does not lock both of the double doors when he goes through them and I do not see any way to get this to work. Basically this should just work when the double doors are auto-set-up, right?

 

I remember now that I had reports in knighton manor, where there are the main double doors, that the AI's left the other door closed but unlocked.:(


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

I solved the AI leaving double doors unlocked issue.

 

If anyone wants to do this in the future, it works like this:

left_door and right_door. Both are locked. Give to both spawnarg "auto_setup_double_door 0"

Now the doors behave like individuals single doors, they do not open together anymore. But the AI does not leave unlocked doors behind him! ^_^

 

Remember to give the AI can_open for both the doors. Otherwise the AI might look silly, attempting to open the door he cannot open, and then trying the door he can open and then getting in.


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

I went back and updated all my missions as per NH's ambient_world suggestions.. Thanks NH! The value was actually that good I went through all the missions with it.

 

All the missions have better ambient light for gameplay. In addition, Beleaguered Fence has some minor performance increase in the starting area.

 

Here is the links to the new packages. Could someone please put these to be available in the ingame downloader? Thanks!

 

Beleaguered Fence

http://www.mediafire.com/?1atax7k7aa2qqoa

Glenham Tower

http://www.mediafire.com/?dlzzccd3l7ib6b4

Knighton Manor

http://www.mediafire.com/?k1j211m7w5wou7h

Mandrasola

http://www.mediafire.com/?j3wxczh3mwpba6g

Transaction

http://www.mediafire.com/?3tawaefbownm8pk

 

Going back editing those missions made me realize that my contributions for the passed year has been 5 full missions and one basic geometry finished by someone else. That means 5/38 or 6/38 of our current mission total. I've created 13%-15% of all the available missions for TDM at present. That number is mind staggeringly high when you think about it...

 

I think I've contributed my share for TDM for the time being. I think I've now put all the ideas I had in my mind on the DR canvas. It is time to leave the floor for new mappers. I hope my works will inspire others to make new high quality maps.

 

I'll be around, but mapping will be a definite no no until I regain my motivation. Godspeed for everyone contributing to TDM.

 

Thread closed until further notice.


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

Thanks Sotha. :) Wow. I didn't expect you to go and repackage all your FM's, but I'm certainly glad to hear that the suggestion was helpful to you. I'll run by the team that the default ambient_world setting be changed to 6, instead of 8. We had discussed numbers of 7 and 8 being reasonable, but I thought we had gone with the lower end of the scale in DR.

Share this post


Link to post
Share on other sites

Thanks Sotha. :) Wow. I didn't expect you to go and repackage all your FM's, but I'm certainly glad to hear that the suggestion was helpful to you. I'll run by the team that the default ambient_world setting be changed to 6, instead of 8. We had discussed numbers of 7 and 8 being reasonable, but I thought we had gone with the lower end of the scale in DR.

 

Yes, and it is important for the mappers to know this too: if people use similar ambient lights, there is no need for the players to adjust gamma between missions. Consistency is good here.


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites
I went back and updated all my missions as per NH's ambient_world suggestions

 

Which suggestions?

Share this post


Link to post
Share on other sites

In the Mandrasola thread. I suggested an ambient of 6 instead of 8 to balance the AI visual acuity. I was ghosting the mission and getting nailed even when I was crouching. When I offset the lightgem with lightgem_adjust -1 or -1.5, the gameplay felt far more balanced.

 

Visually, ambient levels of 6 to 8 don't look all that different. It's frustrating when lighting essentially looks the same, but you're being spotted in light that, at a glance, looks just like the light in the previous mission.

 

An ambient level of 6 appears to be the real sweet spot. The lightgem is just barely affected while standing, so you still get the crouching bonus...and the AI react in what feels like a realistic manner.

 

With a lower setting, like 4 or 5, the gem is completely dark while standing..making the AI too easy...which is something I have noticed in missions like Business as usual and Thieves.

Share this post


Link to post
Share on other sites

[...]

I think I've contributed my share for TDM for the time being. I think I've now put all the ideas I had in my mind on the DR canvas. It is time to leave the floor for new mappers. I hope my works will inspire others to make new high quality maps.

 

I'll be around, but mapping will be a definite no no until I regain my motivation. Godspeed for everyone contributing to TDM.

 

heaven, earth and hell... NOOO!!! ohmy.gif

 

well, but it's indeed better to quit (mapping) for some time instead of "burning" out... however, i will miss you (on the editors' side), you really built some pretty maps.

 

Don't stay off too long! *wave*

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...