properties of commands

 
Post new topic   Reply to topic    mudlab.org Forum Index -> Design
View previous topic :: View next topic  
Author Message
Kjartan



Joined: 13 May 2005
Posts: 110

PostPosted: Thu Jul 20, 2006 2:41 pm    Post subject: properties of commands Reply with quote

I recently added a spell-effect-like-thing to my mud which was "tied up", and in the process I went through all of our 500 or so commands and decided for each "could you do this if you were tied up?". I think a nicer solution would be to come up with a list of flags for each command and just set them once, if possible. For instance, the stuff I can't do when I'm tied up and the stuff I can't do when an ogre has grappled me is pretty similar.

What's a good list of general flags of interest for all commands? Has anyone implemented this? Here's what I've thought of so far:

- do you need to be able to move your limbs?
- do you need to not be anchored to the ground?
- do you need to be able to see?
- do you need to be able to hear?
- does this make a racket if not done stealthily?
- does this make a racket regardless?
- do you need to be able to make noise for this to work (e.g. "say")?

My "tied up" effect would block anything that needed you to be able to move your limbs, or to not be anchored to the ground.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Kaz



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

PostPosted: Thu Jul 20, 2006 3:22 pm    Post subject: Reply with quote

Slightly related - one of the designs I've been playing around with is having the result of actions broadcast sensory packets. For example, the clash of steel on steel in a swordfight would broadcast a noise packet on a volume similar so that of a yell, whereas someone sneaking around while wearing felt footwear could broadcast noise packets on the level of a whisper.

The next stage is to have each broadcast to be of several different types of sensory information. It's no use sneaking in felt footwear if you're wearing a harlequin outfit in broad daylight - you'll be spotted instantly. Then this is filtered for the capabilities of those in the detection radius, and the most appropriate sensory information used. For most, this would mean displaying the "sight" sensory packet, but if you're not in line of sight or, say, blinded by a spell, then the "auditory" sensory packet is used instead. This means that the information necessary for a normal person, a blind person and a deaf person is contained in the same packet.

It also allows things such as partial-sightedness to be implemented easily - simply scale down the "volume" of the sight portions of a sensory packet.

As I said, it's only slightly related - your method is based upon which actions are appropriate for a given scenario, whereas mine are based on what information is appropriate for a given scenario, yet the two can co-exist:

In The Sims, for example, I believe that it is objects which broadcast their capabilities and requirements (and animations, etc.) to characters, rather than the characters being all-knowing.
Back to top
View user's profile Send private message
Author Message
Kjartan



Joined: 13 May 2005
Posts: 110

PostPosted: Thu Jul 20, 2006 3:47 pm    Post subject: Reply with quote

That's much fancier than what I was looking at. Some of my flags would be analogous to your sense packets, except they wouldn't have a magnitude or any sort of "type" info - in my flag system either an action makes noise or it doesn't, and if it does then you can hear it in the same room but not anywhere else. Certainly there are louder types of action like "shout" but those are not handled by general flags but by the code associated with the command itself.

Much of this code was written by me and other people who didn't know what they were doing. The result is we have stuff like the "silence" spell, which is implemented as a separate check in every single command function that needs you to make noise, making hundreds of lines of code for what could be done in five lines if these flags were there. I think the flags is a better design also because it makes it easy to change the messages for silence effect depending on whether you have a "silence" spell on you, your vocal cords have been cut, your mouth is full of goo from a slime elemental, or whatever.
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: Thu Jul 20, 2006 3:48 pm    Post subject: Reply with quote

Quote:
What's a good list of general flags of interest for all commands?


Here some that I find useful:

* Must be in a specific location.

Example: You only have the 'restore' command while on your home plane.

* Must belong to a specific class.

Example: All vampires have a 'claws' command to extend claws from their fingertips.

* Must have a specific power/talent.

Example: You only have the 'rage' command if you have the Berserker Rage talent or a rage-oriented class power.

* Must be in a specific shape.

Example: You only have the tail-based combat commands if you actually have a tail.

* Must be mounted.

Example: You only have the 'tack' command while riding a mount.

* Must have a specific config option set.

Example: You only have the 'kill' command if you have the Combat Shortcuts config option enabled.


Quote:
The next stage is to have each broadcast to be of several different types of sensory information. It's no use sneaking in felt footwear if you're wearing a harlequin outfit in broad daylight - you'll be spotted instantly. Then this is filtered for the capabilities of those in the detection radius, and the most appropriate sensory information used. For most, this would mean displaying the "sight" sensory packet, but if you're not in line of sight or, say, blinded by a spell, then the "auditory" sensory packet is used instead. This means that the information necessary for a normal person, a blind person and a deaf person is contained in the same packet.


I do much the same thing, eg:

A huge bugbear draws his maul from across his back with his right hand.

You close your eyes.

You hear something whistling through the air towards your head.
You duck under it.

You feel something smash into your face.


However the information needs to be filterable for any combination of the six senses - a blind and deaf person will still feel the impact of a blow, while a numb and blind person will still hear the sound of their flesh being torn...and someone with ESP may still sense the incoming attack.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Atyreus



Joined: 15 Jun 2005
Posts: 5

PostPosted: Thu Jul 20, 2006 4:05 pm    Post subject: Reply with quote

I've implemented something similar to this. Before a command method is actually called, the command object is queried to see that the acting character meets the basic set of criteria needed to attemp the command. Currently I test for the following:

-Does the character need to see?
-Does the character need to hear?
-Does the character need to speak?
-Does the character need to be free to move?
-Must the character be conscious/awake?
-Is the character's mental state sufficient for the task?
-May the character be mounted?
-May the character be in flight?
-Must the character be in a specific position (sitting, standing, etc)?
-Is the character already busy doing something else (and, if so, will the previous action abort itself or block this action)?

I suppose the free to move/mounted/in flight tests might be better handled as a single test (say, a test for a character's freedom-of-movement rating or somesuch). I don't test for touch because at this point a character's ability to touch is completely dependent upon what is being touched (a spectral character, for example, being able to touch another spectral character).

I also use a socials/emotes system which flags emotes for many of the same tests. The "laugh" social, for example requires that the actor be able to vocalize, and the resulting message will not be received by characters that have lost both the ability to hear and to see.
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: Thu Jul 20, 2006 10:08 pm    Post subject: Reply with quote

Atyreus wrote:
I also use a socials/emotes system which flags emotes for many of the same tests. The "laugh" social, for example requires that the actor be able to vocalize, and the resulting message will not be received by characters that have lost both the ability to hear and to see.


Something I'd really like to do is to have form-specific socials - for example a character in wolf form shouldn't be able to 'bow', but they should be able to 'wag' (which wouldn't be an option for humanoids, unless they also had a tail). Someone transformed into a swarm of insects could have some really wierd socials (such as forming insulting patterns in the air), while those with multiple limbs could probably pull off some pretty cool combos (a quadruple salute?).
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
Page 1 of 1

 
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