[MUD-Dev] Re: A new combat system

Thinus Barnard thinus_barnard at hotmail.com
Tue Jul 11 18:01:11 New Zealand Standard Time 2000


Hi.

Dragat123 at aol.com wrote:
> I am toying with the idea of making a server based on
> these ideas, so I really need your ideas as well...

I am working on my own mud server, who isn't?

> In Diablo, every 0.05 seconds an update event occurs, this is similar to
> a 'turn'.  During this update the order goes Player, Monsters, Magical
> effects, such as arrows.

I think this will depend on how your mud handles events. Do you want a
seperate combat system or do you want the combat system to tie in with your
event handler? My approach is to have a priority tree into which all events
are dumped. This includes ALL events. The event will have a "time to
trigger", a type and a data section. The event handler will run all the
time, my main loop. It will check the event at the top of the tree, if it is
time to trigger the event it will remove it from the tree and trigger it,
the tree will be updated and the event at the top of the tree checked etc.

For combat the event type will be COMBAT or something equally descriptive :)
The events will be further sub-classed though, for instance COMBAT_ATTACK,
or COMBAT_BLOCK.

> Each living thing exists in one of several states.  These include
> walking, standing, attacking, casting spells, doing hit recovery and being
> stoned.  One must finish their current action before they may start a new
> one, unless they get hit.

I have a character status along these lines, except I allow the character to
interrupt an action although it will have a time and balance penalty. As
soon as a ATTACK event is triggered the status of the character is set to
attacking and the character is examined to determine the weapon, the weapon
speed, the time factor of the specific attack, the skill of the player, etc.
It basically calculates values for power, accuracy and speed of the attack.
(I also allow the player to decide how hard or fast or accurate he wants to
hit, the faster you attack the less accurate it will be, the less accurate
it is the less damage it does.) After the calculations are done a new event
is submitted to the priority tree, a COMBAT_RESOLVE_ATTACK event for
instance. The time to trigger for this event will be the time it takes to
complete the attack. Once this event is triggered it will examine the
accuracy of the hit, whether the other character is blocking, armour, etc.
Once the attack has been resolved an attack recovery event will be triggered
for the attacker and a hit recovery event for the defender. I am toying with
the idea of using balance. The better your balance the more accurate your
movements including attacks. As soon as you get hit or mishit your balance
is decreased, if your balance goes below zero you fall, if it goes below 10
your current action fails.

If anybody wants a more lengthy description of how it all works let me know
and I'll type one up.

> Combat is divided into the following steps

> Pre-hit- checks to make sure it is a valid target
Who cares? If the character wants to hit the ground or air or tree why not
let him? You can even do skill adjustments or the like if the character
practices his combat moves a lot...

> To-hit- Check to see if a hit is done
> Blocking- Check to see if opponent blocked
> Damage- calculate the damage
> hit consequences- life and mana stealing, death so on

> Hit consequences include loss of durability etc.

Seems pretty clear. It might be a bit restrictive if you want to do more
complicated combat. I used to play Tekken 2 extensively in the arcades. Love
the game. I got the idea for combat strings from there. Why not do it in a
mud? You can create your own combat string of 10 moves or whatever. The more
you practice it the better it gets up to a ceiling value for practice. With
get better I mean faster and more accurate, better balance. It doesn't have
to be just attacking moves it can be focus moves, positional moves,
defensive moves etc. So once the player has set up a combat string he can
name it and use it in combat. The more he uses it the better he will get at
it. He can teach the string to other characters or they can learn it by
watching although this should be much harder to do.

> Basically each weapon would have a base time.   Each character would have
a
> multiplier.  That is how long it takes to 'swing' the weapon.  So for
> instance I could swing my sword more times than you could swing your big
> axe, because mine has a faster base time...  This would make it
interesting...
> Any ideas on how to make it better, i.e adding spells and the such...

The basic approach is that you have a character object with certain
properties. All combat does is manipulate some of those properties. Same for
spells. The one difference though is that spells add some properties related
only to spells, for instance the spells you know or how well you know a
spell etc.

I am a firm believer in a completely skill based system. Everything is
treated as skills. All combat moves should be skills, all spells should be
skills, all character abilities should be skills. Even a character's health
and strength should be a skill, it can be improved if worked on and it can
worsen if neglected. The skills can be limited by physical limitations
determined by race and gender etc. If a character specializes in combat the
character will be strong and healthy and will have numerous combat skills.
If the character then starts to dabble in magic the unused combat skills
would grow weaker, the health would go down, the strength will fade but the
magical skills will increase. This will give the characters the flexibility
to be whatever they want to be without having to worry about class
restrictions.

The drawback is that a huge list of skills needs to be maintained for every
character. This can be done quite effectively with objects I believe. If
anyone wants to hear about my skills as objects approach let me know.

Ok, all for now, have to pretend I am working again...

Cheers
Thinus




_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list