NPC targetting methods
Goto page 1, 2  Next
 
Post new topic   Reply to topic    mudlab.org Forum Index -> Design
View previous topic :: View next topic  
Author Message
Grem



Joined: 15 May 2005
Posts: 36
Location: Maryland

PostPosted: Thu Jun 02, 2005 9:44 pm    Post subject: NPC targetting methods Reply with quote

What kind of methods have you guys used when targetting mobs in the room with the same exact name?

Lets say there are two orc warriors in the room, but you want to attack the second one because it's attacking your friend. What do your players type to attack the second orc in the room? What if there are 17 orcs in the room? How can we make it easier for players to attack the 12th orc?

Diku used a system similar to 'kill 12.orc', which is nice, but the player has to count the number of the orcs in the display prompt (and if an orc walks out of the room, it resets the entire number!). Perhaps mobs should have ID numbers that display to the players? What about commands like 'kill orc attacking bob', or 'kill wounded orc'. How can we differentiate between the mobs? This is truly a hurdle for me, and im seeking solutions!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Author Message
cron0s



Joined: 13 May 2005
Posts: 34
Location: UK

PostPosted: Thu Jun 02, 2005 11:25 pm    Post subject: Reply with quote

I like the system of using the name and a unique number as a compound name, so you could have orc1, orc2, orc562, orc7429 etc. It's also very easy to match on just orc or on the complete name. You would also need a special command to list the full compound name of all objects in the location, so under normal conditions the players would only see 'A band of 12 Orc warriors are here' or whatever.

The first mud I ever played used a system like this, and after that I could never really get used to the Diku 12.orc syntax. I am not sure either way is really very satisfactory though.
Back to top
View user's profile Send private message
Author Message
Ciwell



Joined: 19 May 2005
Posts: 2
Location: Orlando, FL, USA

PostPosted: Fri Jun 03, 2005 6:20 pm    Post subject: Reply with quote

I played a MUD where the combat system automatically targeted the weakest mob in the room for you and all you had to do was type <attack>. Of course you could still target other mobs in the same room as well by just attacking them and they would be automatically targetted to where you needed to, once again, only type <attack> instead of <attack x>. Perhaps this can offer a solution.

Also, although the ID number idea sounds promising, it can be distracting to see Orc Warrior(532432) walk into the room. Of course, if the MUD in question is pure HnS, then I suppose that does not matter too much.

Ah well, rambling over with. Smile
Back to top
View user's profile Send private message AIM Address
Author Message
eiz



Joined: 11 May 2005
Posts: 152
Location: Florida

PostPosted: Fri Jun 03, 2005 6:25 pm    Post subject: Reply with quote

How about just showing a numbered listing and sticking with a Diku-ish approach? Instead of:

a foo.
a foo.
Bubba.

You'd have:

1. a foo.
2. a foo.
3. Bubba.

Or even letters like roguelikes use for inventory management. Then you could just 'get 2', 'kill 3', etc. Of course the numbering would change if someone left the room, but I think that's a less common issue than just finding the item you want, and it's a bit nicer (IMO) than typing out some long number or symbol. Objects would still stack if they were identical, of course.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Kjartan



Joined: 13 May 2005
Posts: 110

PostPosted: Fri Jun 03, 2005 7:22 pm    Post subject: Reply with quote

I really like the idea of "wounded orc" from the first post. The fact is that unless there's a reason to distinguish, you aren't so likely to care about 3.orc vs 4.orc anyhow.

I would think that the examples there (kill wounded orc, kill orc attacking bob) coupled with just a few more adjectives and a 7.orc system for backup would pretty much handle everything players might need.

What else might be needed? "new orc", the orc that just arrived. "orc with halberd", the orc that has the halberd (but, "kill orc with halberd" is a bit ambiguous, hmm). "an orc" = pick one at random, because that is how little you care. Maybe "most wounded orc", "uninjured orc".

I am greatly saddened by the fact that my diku does MSDOS-style argument parsing (that is, every command parses its own arguments rather than having a central parser) and I therefore can't easily implement this myself.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Jimorie



Joined: 18 May 2005
Posts: 10
Location: Gothenbrg, Sweden

PostPosted: Fri Jun 03, 2005 11:12 pm    Post subject: Reply with quote

If the ordinal is displayed together with the description, you avoid the problem of having to count to find out which orc is attacking your friend. So if there are many orcs in the room, you would in my mud see:

Code:
The first orc smiles happily at you.

The second orc lands a crushing blow on Bob's left arm!


It reads a bit stilted though, and it would be a nice addition with the sort of dynamically updated descriptions/keywords mentioned earlier with wounded orc, etc.. It gets a bit silly when you get things like the twenty-seventh orc.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Fri Jun 03, 2005 11:14 pm    Post subject: Reply with quote

Well, ideally, you should never have exact clone mobiles in a room together anyway.

On SoI we have a system that generates random short and long descriptions based on the race of the mob, in the form of "an X, Y <gender> <race/name>", "a Y, X <gender> <race/name>", or "a Y <gender> <race/name>", "an X <gender> <race/name>".

So you have essentially the same exact mob with stats and skills that are slightly randomized from the baseline prototype for variety's sake, with unique descriptions and keywords that can then be targetted without having to worry about counting up to 12.orc. (Though that can still be done in a pinch, barring any other unique keyword you can use.)
Back to top
View user's profile Send private message Visit poster's website
Author Message
KaVir



Joined: 11 May 2005
Posts: 565
Location: Munich

PostPosted: Sat Jun 04, 2005 11:49 am    Post subject: Reply with quote

Jimorie wrote:
The first orc smiles happily at you.

The second orc lands a crushing blow on Bob's left arm!


I thought about doing something like that, but I think it could get really confusing - what if an orc left? Would the others renumber themselves? What if the one that had left then came back - would it be added back in the last position, or inserted back? What if one orc was invisible - would you see the "first orc" and "third orc", and thus be able to work out that there was also a second? Or would the numbering be relative to the viewer? And if the latter, what happens when Bob starts shouting for everyone to attack the third orc (but he's being attacked by the second, isn't he?)?

I think I'd rather just have a list of extra words that could be added to each mob type (an ugly orc, a smelly orc, a green orc, a large orc, etc), and just try to avoid situations where you could have too many in the same room. It's not perfect, but I think it would be okay.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Jimorie



Joined: 18 May 2005
Posts: 10
Location: Gothenbrg, Sweden

PostPosted: Sat Jun 04, 2005 1:23 pm    Post subject: Reply with quote

In my code, the numbering is relative to the viewer. All the other problems you mention is there though. If Bob is aware of the potential problem (he knows he is seeing an orc hiding behind the bushes), he could do something like 'point orc 3 and say Attack him!', which would then be displayed correctly to his friends. But in the end, yea, it can get really confusing. Especially when they start walking in and out of the room.

Sad

Added: Actually, I think I will have a try at what you have said here. There is nothing that prevents having both systems at once. If you really run out of fitting adjectives to uniquely describe an orc, then you can just let it go and the orc will still atleast be uniquely numbered when displayed in an action.
Back to top
View user's profile Send private message Visit poster's website
Author Message
cron0s



Joined: 13 May 2005
Posts: 34
Location: UK

PostPosted: Sun Jun 05, 2005 9:14 am    Post subject: Reply with quote

Ciwell wrote:

Also, although the ID number idea sounds promising, it can be distracting to see Orc Warrior(532432) walk into the room. Of course, if the MUD in question is pure HnS, then I suppose that does not matter too much.


In the implementation I was talking about you didn't see the numbers unless you used a special command to list all the objects in the room with their number. The numbers weren't visible when using look, examine etc. Of course the drawback is then that you don't have a way to specifically identify the wounded orc or the orc that's attacking Bob etc.
Back to top
View user's profile Send private message
Author Message
Cornelius



Joined: 13 May 2005
Posts: 42
Location: Florida

PostPosted: Sun Jun 05, 2005 8:48 pm    Post subject: Reply with quote

Quote:
Of course the drawback [to using a special command to see 'orc28373'] is then that you don't have a way to specifically identify the wounded orc or the orc that's attacking Bob etc


sure you do...:

Code:

> lookspec

In the room you see:
orc3764 standing here.
orc2947 lying here, mortally wounded.
orc39 standing here, fighitng bob.

>
Back to top
View user's profile Send private message AIM Address
Author Message
Jaregarde



Joined: 13 May 2005
Posts: 4
Location: California, USA

PostPosted: Sun Jun 05, 2005 10:28 pm    Post subject: Reply with quote

Sometimes a problem can also happen if the game looks first for the best match for the keyword when multiple keywords would work. Err, let me try and explain.
Quote:

look

An elite orc warrior is here.

attack orc

You swing your sword at an elite orc warrior.

An elite orc warrior hits you in the face with his mace.

An orc villager in from the south.

attack orc

You swing your sword at an orc villager.

An orc villager slashes you with a short knife.

An elite orc warrior nearly severs your head with a vicious swing.


And then you end up fighting two monsters instead of one, because the 'orc' keyword targets the best match, the regular orc, instead of the warrior. I've had this problem before and it's not always pleasant. Sad

But to answer the question, I think you need to ask yourself another: Why would you need to target a specific NPC instead of several other nearly identical ones? Then when you answer that question you can tailor your game to have an answer for it; (for example, make a 'defend bob' command to attack the orc he's fighting).
Back to top
View user's profile Send private message Send e-mail
Author Message
Kaz



Joined: 05 Jun 2005
Posts: 24
Location: Hampshire, UK

PostPosted: Sun Jun 05, 2005 10:45 pm    Post subject: Reply with quote

Perhaps the original post is being viewed from the wrong angle. instead of having to work out which orc to attack (although that is an issue in and of itself), perhaps you should just be able to type "defend bob", and attack a creature that is attacking Bob.
Back to top
View user's profile Send private message
Author Message
Alayla



Joined: 11 May 2005
Posts: 88
Location: Prague

PostPosted: Sun Jun 05, 2005 10:50 pm    Post subject: Reply with quote

Kaz wrote:
Perhaps the original post is being viewed from the wrong angle. instead of having to work out which orc to attack (although that is an issue in and of itself), perhaps you should just be able to type "defend bob", and attack a creature that is attacking Bob.


Well, I think the issue discussed here is indeed working out which orc to attack*. You may want to take out the orc wielding the big maul first, so that you can use it to kill the other orcs. Or you know that the orcs will gang up on you once you attack any of them, so you want to get rid of the wounded one first... There's a whole lot of reasons.

Personally, I like the "wounded orc" idea best. It seems intuitive and natural. If mobs had additional keywords depending on state (not just health, could be dirty orc), that would go a long way towards making mobs of the same kind distinct...

*Edit: And not just attack - you may want to charm a particular orc (the strongest one), you may want to talk to the orc that's carrying a special item etc.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Tyche



Joined: 13 May 2005
Posts: 176
Location: Ohio, USA

PostPosted: Mon Jun 06, 2005 12:50 am    Post subject: Reply with quote

Just click on the one you want with the mouse, or select with the keyboard. I mean this is 1987 right? We have the technology.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    mudlab.org Forum Index -> Design All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
BBTech Template by © 2003-04 MDesign