Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Hi guys,

for some reason a fleeing AI in my WIP does not alert guards. The setup is as follows: I have set a flee point (with the correct team number, just to be sure) near a couple of guards (i.e. the "card players" prefab). However, when an unarmed AI (also with the team set to the same as the guards) flees to said point, the card playing AI do not react to him fleeing. According to the Wiki, the fleeing AI should alert the other AIs. Is this a bug or am I missing something?

Link to comment
Share on other sites

I've noticed too that fleeing AI does not always alert other AI. It works if the AI is walking on normal patrol, but is more unreliable if the AI is sleeping or playing cards.

 

 

Grayman knows better than I, but perhaps the AI needs to see the fleeing AI? If they are absorbed in their cards, it is more unlikely?

 

What if you make the card players stop playing and just stand idly. Does the fleeing AI then get their attention more reliably?

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

On slanted doors:

 

aympnXb.jpg

I figured it out!

 

It is the BINDING that resets the object rotation axis.

 

In the picture above is a model door prefabs, which have been rotated 45 degrees so that they are slanted. They have rotate 0 90 0 and 0 -90 0. So rotate 90 degrees along z axis. If you now open them, they will open along the WORLD z axis, which is not correct.

 

If I add a goblet (or any model), rotate it 45 degrees, just like the doors, and BIND the doors onto the goblet, they start turning according to the GOBLET z axis (which is now rotated). The slanted doors open as they should.

 

Test map for analysis:

https://drive.google.com/file/d/0BwR0ORZU5sracWR4eHNzdGFKR1E/view?usp=sharing

 

Enjoy!

 

I am still quite certain that the AI cannot use the door. But one more mystery solved.

  • Like 4

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Hi guys,

for some reason a fleeing AI in my WIP does not alert guards. The setup is as follows: I have set a flee point (with the correct team number, just to be sure) near a couple of guards (i.e. the "card players" prefab). However, when an unarmed AI (also with the team set to the same as the guards) flees to said point, the card playing AI do not react to him fleeing. According to the Wiki, the fleeing AI should alert the other AIs. Is this a bug or am I missing something?

 

If everything's set up correctly, it's a bug. It might be a bug that's particular to your setup, because this stuff has been extensively tested before.

 

Can you send me that section of the WIP so I can verify everything's set up correctly?

Link to comment
Share on other sites

Congratulations on solving that old problem, Sotha.

Please add it to the Doors wiki page so it's documented where people can find it.

 

You might fake the AI using the door with some trigger brush or s/r or the like that opens them when when an AI is in proximity and closes them when the AI is distant.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

You might fake the AI using the door with some trigger brush or s/r or the like that opens them when when an AI is in proximity and closes them when the AI is distant.

Or you can try to use a "nodraw" substitute door linked to the slanted door as discussed with Dragofer in this thread two pages ago.

 

 

 

If everything's set up correctly, it's a bug. It might be a bug that's particular to your setup, because this stuff has been extensively tested before.

 

Can you send me that section of the WIP so I can verify everything's set up correctly?

I will cut it together for you and send you a PM.

Link to comment
Share on other sites

Ok, after cutting it together and testing the part for leaks, it worked without a problem. When I tried it again in the map, the AI had problems handling the door, it has to pass and when it finally got out of the room and arrived at the flee point, the other AI were slightly alerted, but not enough to actually stand up. When I changed the flee point's location a bit, all worked fine. I will try a couple of times further, but apparently I did something wrong first, that I have now corrected by accident...

 

Edit: So, after replaying the part a couple of times, the AI appears to ignore the flee point in 50-60% of cases. This seems to happen more often, when I have "noclip" still active in order to quickly get to the AI.

 

Edit2: I tried again, a couple of times and noticed that there are two independent errors: One thing that can go wrong can be attributed to "noclip" (which should be no problem while playing): Apparently, the AI is not able to correctly give the position of the player, if he is not standing on the ground, which is why the guards don't get up as they don't know where to go. This happened in the cut down mission as well as the whole mission (I did not notice before, because for the cut down part, I did not use "noclip" before). The second part may be, that the fleeing AI deems the flee point not safe in some cases, which is why it ignores the point and just runs past. In this case the AI sometimes got up, sometimes they didn't, but this might again be due to the "noclip" problem. When I tested today, the AI always stopped, so the flee point appears to be working fine.

Edited by Destined
Link to comment
Share on other sites

Another question: Do AI always drop light sources when they get alarmed or is there a way to prevent this? I have one AI with a def-attached lantern and it is quite counter intuitive that he drops his best means to search for an intruder as soon as he first sees the intruder...

Link to comment
Share on other sites

Another question: Do AI always drop light sources when they get alarmed or is there a way to prevent this? I have one AI with a def-attached lantern and it is quite counter intuitive that he drops his best means to search for an intruder as soon as he first sees the intruder...

 

There's a spawnarg in prop entity defs called something like 'drop_on_alert_index' that could be overwritten in DR. Though there's probably some bug or reason for why it was decided to let AIs drop things as soon as they're disturbed.

  • Like 1
Link to comment
Share on other sites

Thanks, I will have a look this evening. It might be that I just accidentally took the wrong lantern... For other items it makes sense, that they are dropped. Bottles, playing cards, etc are no help while searching or fighting, but light sources actually help, which is why they should not be dropped.

  • Like 1
Link to comment
Share on other sites

The correct lantern to use is atdm:prop_lantern_on. Put it in the left hand of armed AI. Unarmed AI can carry it in either hand.

 

The lantern spawnarg in question is "unbindOnalertIndex". It's set to "4" by default, which means the lantern gets dropped when the AI reaches Agitated Searching. This is when he searches with a drawn weapon.

 

The reason for this is to free the hands for the animations to draw weapons. (Not a bug.)

 

That said, it probably warrants a bit of a look, because an AI carrying a torch and a melee weapon doesn't drop the torch when he draws the melee weapon. He'll drop it when he enters Combat, though.

 

And I suppose an unarmed AI would have no reason to drop a lantern when reaching Agitated Searching, so that's also something that should be looked at again.

 

I'm guessing the rules can be loosened a bit to provide a more realistic experience.

 

We already have a bugtracker request (#4357) for an AI to be able to pick up a lantern. That's related to this discussion, so I'll add a few words in there about this situation.

  • Like 1
Link to comment
Share on other sites

Thanks for the explanation! I am not sure, which lantern I used (it was the one named on the Wiki, but as it is currently down again, I cannot look up the name until I get home), but it is most likely this one. If the lantern has problems with the weapon drawing animation, I might just switch to the torch... After thinking about it a bit, an AI with a non-extinguishable light source might be very challenging for the player, as he cannot hide in the shadows after being seen once and has to run quite a bit to hide. If it can at least be extinguished with a water arrow, this is a bit easier.

 

If I understand the "unbindOnalertIndex" correctly, it could just be set to higher values for unarmed AI so it would not get dropped. This should not be easy enough. Maybe we could use a new entity def, specifically for the "not-dropped" lantern with a description of how best to use it in the entity descrition and on the Wiki page. This should suffice for mappers to find.

 

Regarding the "picking up": Obsttorte has a script for AI picking up lanterns and torches while searching, but I am not sure, how well tested it is. Also, we recently discussed the ability for unarmed AI to pick up weapons lying around. I think the two are very closely related, as both need a similar code for identifying the object on the ground and the same animation for picking it up (although we would need for the left and one for the right hand). However, Obsttorte already said, that in case of the weapon the AI will have to be set to be no civilian any more or it will not be able to actually use the weapon, so the latter is more difficult.

Edited by Destined
  • Like 1
Link to comment
Share on other sites

The problem with civilians picking up weapons is this: how do you explain a civilian (who has chosen to go around unarmed) suddenly acquiring the skills needed to wield the weapon with exactly the same expertise of an armed character? Sounds a bit Matrix-y to me. ("Oh, there's a helicopter! Let me jump into the cockpit and immediately understand how to fly it!")

 

And we can't have AI picking up bows, because they'd also have to find a quiver of arrows, and we'd need an anim for putting the quiver on their back.

  • Like 1
Link to comment
Share on other sites

I don't think believability is problematic (or insofar as it is, that's down to the mapper's choice of which AI to use this with): I have a friend who used to shoot clays, and it's not as though she carries a gun around ordinarily. But it does raise questions about how objectives that restrict violence towards 'innocents' should work, and how that gets communicated to the player.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

The problem with civilians picking up weapons is this: how do you explain a civilian (who has chosen to go around unarmed) suddenly acquiring the skills needed to wield the weapon with exactly the same expertise of an armed character? Sounds a bit Matrix-y to me. ("Oh, there's a helicopter! Let me jump into the cockpit and immediately understand how to fly it!")

As we discussed this, I also suggested that it should be optional. A lordling who had fencing lessons might have the experience to wiled a sword, a random poor maid, on the other hand may not. It is definitely something I would not make available for all AI, but only for ones where it makes sense. As the discussion continued, we thought that it might be possible to disarm an AI (e.g. by hitting the weapon hand/arm), so they have to pick up the weapon, which gives the player some time to flee. However, this idea was hampered by the fact that we are not able to read out the hit zone of the AI (it is in the code for determining damage, but does not appear to be accessible otherwise).

 

And we can't have AI picking up bows, because they'd also have to find a quiver of arrows, and we'd need an anim for putting the quiver on their back.

To be honest, I only thought about melee weapons, when we discussed this. You are right, this would be a problem, but as I have recently started to dabble in animations, I would be more than willing to try to create such an animation, if this was the only missing part (although I am not sure, if I could really do it). But I think there are other burdens that would have to be cleared first...

 

But it does raise questions about how objectives that restrict violence towards 'innocents' should work, and how that gets communicated to the player.

I agree, this was also one thought I have stumbled upon. The question would arise: Is each armed AI automatically no civilian? If not, it would drastically increase the difficulty as it would be extremely hard to distinguish between civilian and non-civilian.

 

Anyway, it was just an idea, because I had one AI that I thought I could pick up arms after fleeing and the topic of AI picking up stuff reminded me of it...

Link to comment
Share on other sites

You can get creative hacking it, I bet.

 

My current thinking is start with an armed AI set to a non-hostile team or otherwise non-weapon-using and carrying an invisible weapon. Then a scripted animation towards a sword on a table deletes the table sword, makes the AI sword visible (or switches it out, whatever works), and switches the AI team to hostile or otherwise sword-using. Something along those lines.

 

It seems in the same neighborhood as team switching, so a similar script-based solution seems like the appropriate way to do it anyway.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Hm, I feared that it is not too easy. Well, nothing we can do then...

 

Edit: Just saw your post, demagogue. Thanks for the suggestion, but I think this may be one of the things, that is not really worth the effort. In my case, it is the owner of the builing and I thought, it would be nice if he would defend his property. So I wanted him to flee at first and then arm himself and start to patrol. But I think, the will just start to patrol and call the guards again as soon as he sees the player. This is another possible way to defend his property.

Edited by Destined
Link to comment
Share on other sites

@Destined, the easiest thing you could do is use an armed nobel, and then do a team change from commoner to armed nobel, since that's already an established mechanic with a script or procedure somewhere out there. Look at the Team Relations wiki page probably. Then he'll run away at first sight. Then you can script his team change at any point you like. That's the easy part.

 

And IIRC I still think it's easy to make a model switch from invisible to visible with a script command too. I think having him just running to a sword rack in an armory room with a AI-go-here-box for an invisible objective call (or however) to a script with just with those 2 commands, switch team & render sword, would sell the trick just fine.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Thanks, I will have a look at this. A "nodraw" weapon is done easy enough. And I already had thought about using the "use_right_hand" animation with an additional frame command to attach the weapon. In this case I will just have to remove the invisible weapon first, but this should not be discernible, anyway.

Still, this whole thing might be futile, as the AI will most likely not be alarmed, but rather KOed, before it can do anything. Hm, maybe I should try to change the scenery a bit, so it is more difficult to get past it undetected. The whole scene is not mandatory, so it can be ignored, but if I change it, so that the AI has to be alerted, it would make a 100% loot with perfect stealth score impossible... On the other hand, there are not too many people who aim for this. Anyway, I will stop rambling about now and will see, if I can get it to work that way.

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

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...