Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > Advanced MUD Concepts
Click here to Register

Reply
 
Thread Tools
Old 02-22-2005, 11:45 AM   #1
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
A combat-related problem I've come across recently is that of deadlock - two creatures fight each other, but neither can win. For example, a skeleton fighting a swarm of killer bees:

The skeleton draws its longsword with its right hand.
The skeleton unslings its target shield from across its back with its left hand.

The swarm of killer bees fly around the skeleton, buzzing angrilly.
The skeleton ignores the bees.

The skeleton slashes at the swarm of killer bees with its longsword.
Its blade passes harmlessly through the swarm of killer bees.

The swarm of killer bees fly around the skeleton, buzzing angrilly.
The skeleton ignores the bees.


In theory the skeleton might kill one or two, but not enough to make any real difference to the bees. Equally, the bees can't exactly sting the skeleton to death, as their poison doesn't affect it, and their stings aren't strong enough to do any real damage.

I suppose you could argue that, eventually, the skeleton would kill the bees, or they'd give up and leave of their own accord (although with the skeleton constantly provoking them I've no idea how long that would take). But the same problem applies to other scenarios as well - eg:

The zombie throws a clumsy left punch at the wraith's stomach.
Its fist passes harmlessly through the wraith.

The wraith reaches towards the zombie with its left hand.
The zombie ignores the wraith's chilling touch.

The zombie says, 'Braaaaaiiiinnnsssss.'

The zombie snaps at the wraith with its powerful jaws.
Its bite passes harmlessly through the wraith.


In this case, neither the zombie nor the wraith are likely to give up, as both are mindless undead.

One option might be to say that mobs can recognise when a fight is futile, and walk away - but what about scenarios where the mobs have been deliberately ordered to fight? For example, in a magical duel Bubba the Pyromancer might call forth a powerful fire elemental to attack Boffo the Demonologist. Boffo might then respond by summoning a balrog to keep the fire elemental at bay - as both mobs use fire magic and are immune to fire magic, neither could hurt the other. But as the elemental has to get past the balrog to complete its orders, and the balrog has to kill the elemental to complete its orders, they can't very well just wander off.

In the case of summoned mobs, they could likely be held in place by a limited duration on their summoning. But what about mobs that are being controlled?

The best approach I can think of is to say that if two mobs cannot hurt each other, they will ignore each other, unless being controlled (in which case they will attempt to fight for the duration of that control).

But what about scenarios where one mob can hurt the other, but that other mob can't hurt them back? A swarm of bees cannot hurt a fire elemental, but the fire elemental could certainly destroy the bees. A goblin cannot hurt a wraith, but that wraith could easily drain the life from the goblin. And so on.

Thus I propose that mobs respond to an attacker they cannot defeat based on their intelligence level, as follows:

1) Mindless mobs (skeletons, golems, etc) ignore attackers they can't hurt, going about their business as usual.

2) Mobs with animal-level intelligence flee attackers they can't hurt.

3) Smart (human-level intelligence) mobs flee non-smart mobs they can't hurt (they know they'll get no mercy from a big green slimy blob).

4) Smart mobs attempt to surrender to or beg mercy from smart mobs they can't hurt, and flee if that fails to work.

However there may be some exceptions to the above, based on skills and knowledge. A human with some sort of animal empathy ability might try to use that before fleeing a rabid wolf, while that same human - having just witnessed a vampire massacre his entire village - might decide to skip the begging and go straight for the fleeing.

Then of course there's the motivational aspects to consider. It's seems reasonable for skeletons and wraiths to ignore each other, but what about mobs that have no real reason for knowing they can't hurt their opponent? Imagine a big slimy blob that homed in on vibrations, covering (and killing) most creatures. What would it do when it encountered an acid-proof golem? Just cover it and effectively follow it around? That could get pretty annoying as well, as the golem might end up collecting a huge following of such creatures.

There's also other problems to consider when it comes to smart mobs - the villagers may not be able to kill the vampire themselves, but perhaps they know the local church has a supply of holy water. Should the smart mobs therefore take that into consideration, and flee for the church? What if they have to go through other dangers to reach the church?

A typical villager or citizen would probably just want to get away, while a warrior would be more interested in arming themselves appropriately and coming back - for most cases this could simply be represented by a "wolf or sheep" boolean flag, i.e., do they have the fighting spirit or not?

But even that isn't going to hold true in all situations, nor does it account for the fact that smart mobs might choose to sacrifice themselves. A villager protecting their family might well come back once properly armed, or even throw themselves into a fight they knew they couldn't win, just to give their loved ones time to escape. Come to think of it, certain animals might do the same as well (eg those with young to protect). Equally, even some seasoned soldiers might decide to flee rather than fight a battle they probably couldn't win. Perhaps some sort of courage rating, adjusted by circumstances, might do the job...

But all of this ends up adding a large amount of complexity to a relatively simple problem. Thus I'd propose simplifying the process down to the following:

1) If you're being controlled, or are berserk/frenzied, you attack regardless of the situation, otherwise:

2) If you can't hurt your opponent, and you're both smart, and they are not 'merciless' (a reputation-based flag) or berserk, you surrender, otherwise:

3) If you can't hurt your opponent, you flee (or ignore them if you're mindless).

4) If you're fleeing, and you know about an appropriate counter-measure for the attacker, you head towards the location required to achieve that counter-measure (which might typically involve passing the attacker information to another mob - eg specialised cityguard).

Any special cases (animal empathy on the rabid wolf, hiding in the forest because you've got a high stealth skill, etc) should be exceptions outside of the standard approach.

Such a system could later be tweaked to supply more believable behaviour - for example, you could give each mob a 'will to fight' stat based on the situation, ranging from 0% (you've no wish or reason to fight) to 100% (you're fighting to protect loved ones). Smart or animal-intelligence mobs could then use the 'will to fight' to determine when they've had enough of the fight, with the typical citizen running off to find a cityguard straight away, the cityguard running off to find the elite guard after a severe beating, etc.

Thoughts?
KaVir is offline   Reply With Quote
Old 02-23-2005, 01:01 AM   #2
TheTrollCop
New Member
 
Join Date: Feb 2005
Posts: 13
TheTrollCop is on a distinguished road
Quite a well thought out and well designed system you've got here KaVir. Is mobile combat going to be a large part of your MUD? Will players bet on mobile fights in Arenas, or be able to train up creatures to fight other creatures?

If not, I'm not sure I see the point in implementing such a complex system, if the players get no gain from it. Is this just something that you personally would like to see? The system itself sounds well designed, but it also sounds like a bit of overkill unless the player is going to gain something from it.

Your ordered versus free-will mobile fight side of the system intrigues me as well. In the end, I'm assuming the majority of players would only end up seeing the system from charmed, or "ordered" side of things. There for the extra work going into the mobile reactions system would be moot, would it not?

Is any of this system developed and able to be viewed somewhere?
TheTrollCop is offline   Reply With Quote
Old 02-23-2005, 04:47 AM   #3
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
Possibly, but the main reason is that I don't like to distinguish too heavily between PCs and mobs.

The same approach would apply to players as well. If a player transformed into a swarm of insects, or died and came back as a wraith, they could find themselves in deadlock with an opponent. Sure, they could just walk away, but it would get very annoying to have a bunch of mobs wandering after you and constantly trying to attack you - and rather silly if you could hurt them but they couldn't hurt you back, yet they decided to just hang around and fight it out anyway.

I need to decide what happens when two opposed mobs meet. I'd rather avoid the typical Diku approach of having them ignore each other, as I really dislike that - I'm sure you've seen those situations, where mobs that should be mortal enemies wander around ignoring each other (then join forces against you when you attack one of them).

It shouldn't be something that would occur often, but players might occasionally stumble into a war zone or encounter a predator taking down its prey.

As I pointed out before, the same logic could be applied to mobs attacking (or being attacked by) players.

No, just some ideas I was throwing around to deal with the deadlock problem.
KaVir is offline   Reply With Quote
Old 02-23-2005, 07:34 AM   #4
TheTrollCop
New Member
 
Join Date: Feb 2005
Posts: 13
TheTrollCop is on a distinguished road
Aha, now we're getting somewhere. All things considered this sounds like quite the system you've got in mind. I'll admit at first I wasn't aware the problem you were trying to address with this system, which is why I questioned the reasons for implementing it.

I can definately see the capabilities of such a system, as far as player transformations, and even a sort of pseudo-ecosystem. Could make for quite a nice system for roleplay within the MUD, especially if you had warring factions of mobiles. Reminds me of the old Diku days on the chessboard, although that was a pathetic implementation if I do say so myself.

Speaking of implementation, what do you have in mind? Are you going to have "Faction" flags, for specific type of mobiles? Such as UNDEAD, INSECTS, LYCANTHROPE, FACTIONA, FACTIONB, etc? Will you have a mobile affects system which might decide how the mobile is affected by hits, such as "Etheral" or "Swarm"? Or will you be using more complicated procedures for implementation, such as neural nets?

If you ever do get a system like this in place, drop me a line and I'll be sure to pop in and check it out. I'm interested in hearing more about your implementation ideas for the system. Is there going to be room within your system for builders to create their own special reactions for mobiles based upon set flags or variables?
TheTrollCop is offline   Reply With Quote
Old 02-23-2005, 08:38 AM   #5
Greetmir
New Member
 
Join Date: Dec 2004
Location: Belgium
Posts: 16
Greetmir is on a distinguished road
Smile

I just wanna say ... WOW ... you are really analyzing this problem to death ... it seems obvious that you will come up with some sort of super solution.

Congrats to you and your determination and coherence.

Quite the problem and concept to remedy it, indeed.

The "will to fight" sounds very very interesting and the idea of giving up if futile is another great idea ... You are way over my head but I just wanna congratulate you for your analysis of the problem so far.

Those are my thoughts.
Greetmir is offline   Reply With Quote
Old 02-23-2005, 12:53 PM   #6
Burr
Member
 
Join Date: Apr 2002
Posts: 123
Burr is on a distinguished road
The skeleton shouldn't have reacted to the bees in the first place. If the bees aren't harming or impeding the skeleton in any way, then they aren't really being "aggressive" towards it -- despite what the bees themselves might think. To the skeleton, they are probably just another part of the scenery.

The bees may well fight the skeleton so long and only so long as the skeleton's presence is actually provoking them -- i.e., causing a perceived harm or potential harm. If for instance, the skeleton is carrying their hive (perhaps to satisfy some necromancer's sweet tooth), then the jostling of the skeleton's steps, and hence of the hive, may well incite the bees to war for however long it takes for the jostling to stop and the skeleton to leave the immediate area of the hive. The war should not cease until that time. The necromancer should have either a spell or plenty of salve ready when the skeleton shows up at his door.

Balrog vs. Elemental. Why <i>shouldn't</i> their fight continue? Some player who hunts beings of fire may hear about this fight and see this as an opportunity for killing two birds with one stone. Or else the beings' masters may realize what a waste of their resources this fight is and attempt to end the fight themselves at some point. The only reason for the two beings' to end it themselves would be if one wins via an unexpected means (such as pushing other into a cold, deep river), or if following their masters' orders ceases to seem important to either one of them. In the latter case, at least one being would make an attempt to do whatever it would have done had the order been rescinded, and then react to the other being's next action, probably by fleeing at the next advantageous time to do so.

If a zombie and a wraith cannot affect each other in the slightest, then they shouldn't fight in the first place, excepting when they have not yet realized their inability to affect one another. Maybe they would instead scowl, or maybe insult one other if they have the intelligence to do so. But why fight if you can't hurt the other? And why flee if the other can't hurt you?

Maybe a quick feasibility study could be built into any action on the part of NPCs, as part of a cost vs. benefit analysis. I.e., how many times or how long would I have to perform this action to have a significant chance of success? What is this chance? How undesireable is the performance of each action. How desireable is the intended result?
Burr is offline   Reply With Quote
Old 02-23-2005, 05:38 PM   #7
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
My main goal is to keep the system simple yet believable - it's not intended to become a main focus of the game.

Providing mob factions would be a good idea, but I don't think it could be combined so well with mob type. Two swarms of ants would be of the same mob type, but (unless they came from the same nest) they'd most likely attack each other on sight. Equally, two completely unrelated mob types might reasonably form an alliance of sorts, effectively joining the same faction.

One possibility I've been toying with is the idea of creature 'templates' (a bit like in D&D). These could be things such as 'undead', 'swarm', 'ethereal', etc, and any mob could inherit one or more such templates. A swarm of bees could thus be transformed into a swarm of ghost bees, while a reanimated goblin could simply be given the appropriate extra template (instead of being converted into a zombie).

This would fit quite well into the deadlock system, as each template could be responsible for handling immunities, and also for determining how the creature should respond to other creatures. It might get a bit tricky with multiple templates though...

Unsure, but probably not, particularly as I'm not planning to have builders. But that's a story for another thread...
KaVir is offline   Reply With Quote
Old 02-23-2005, 05:46 PM   #8
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
Agreed.

Other than potential performance problems? No reason.

Also agreed.

However all of the above are conclusions to specific cases - what I'm trying to address is the decisions that allow the mud to reach those conclusions. Unlike a human being, it can't simply apply common sense.

Possibly, although I think that's perhaps a little too calculated for many scenarios. A zombie is unlikely to think through such a situation - its far more likely to just attack, and then wander off if it doesn't get any results.
KaVir is offline   Reply With Quote
Old 02-23-2005, 07:20 PM   #9
Burr
Member
 
Join Date: Apr 2002
Posts: 123
Burr is on a distinguished road
Well, for a start, here is how I would expand your categories of relevant fighter attributes:


1.a) Those who are mindless (e.g., zombie)
1.b) Those who are careless (e.g., berzerker)
1.b) Those who are instinctive (e.g., werewolf)
1.c) Those who are intuitive (e.g., thug)
1.c) Those who are calculative (e.g., assassin)


2.a) Those who are notably threatened
2.b) Those who aren't notably threatened

3.a) Those who can notably threaten
3.b) Those who can't notably threaten


4.a) Those who perceive their opposition as short-term rivals
4.b) Those who perceive their opposition as long-term enemies

5.a) Those who believe their opposition perceives them as short-term rivals
/*5.b) Those who believe their opposition perceives them as long-term enemies*/


Hopefully some of the combinations can be collapsed, as there are 80 total combinations at present.

*Edit: Actually, 5.b can probably be ignored. If you perceive that your opposition perceives you as a long-term enemy, then you probably will treat your opposition as the same as a matter of practicality, even if that is not how you would prefer it. A pacifist may disagree, but what few pacifists there are in a combat-heavy mud could be handled as special cases.

5.a cannot be similarly ignored for all cases, at least not on first inspection, because someone who perceives their opposition as a long-term enemy, but believes themselves to be perceived otherwise, may take advantage of this in their strategy and tactics.

4.a and 4.b can be ignored when in combination with 2.b, as neither will be relevant to someone who can't be threatened by their opposition in the first place.
Burr is offline   Reply With Quote
Reply


Thread Tools


Combat deadlock and mob responses - Similar Threads
Thread Thread Starter Forum Replies Last Post
MUD Combat systems Hadoryu Advanced MUD Concepts 156 08-21-2006 02:59 AM
Do you like combat? KaVir Advertising for Players 0 06-22-2006 04:00 AM
Combat system Blade MUD Coding 3 11-07-2003 08:03 PM
New Combat Systems Derk Advanced MUD Concepts 8 10-31-2003 10:52 AM
non combat xp Pris Advanced MUD Concepts 6 06-27-2003 03:53 AM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 05:56 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022