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

Reply
 
Thread Tools
Old 12-04-2006, 10:03 AM   #1
Malifax
Member
 
Join Date: Mar 2006
Posts: 106
Malifax is on a distinguished road
I'm in the process of enhancing the emotion mechanics of Inferno. In other games, when using a marker for subject substitution, do the mechanics also substitute the first person pronoun and correct the verb? If so, do the mechanics just use more markers to identify the verbs?

For example:

emote With a big grin, @ turns and walks away.

yields:

With a big grin, Malifax turns and walks away.

Do you use a marker to identify the verb, like:

emote With a big grin, @ >turns and >walks away.

Which gives you:

With a big grin, you turn and walk away.

for the enactor and:

With a big grin, Malifax turns and walks away.

for everyone else? Or do you just use a name/sDesc?

Thanks!

-Mal
Malifax is offline   Reply With Quote
Old 12-04-2006, 11:38 AM   #2
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
I use 'your character' instead of the name. In the past I tried changing it to 'you' and automatically working out the verbs, but it got messy and complicated, and the code often made mistakes.

I don't think I'd want to make the player add extra tags to each verb, either, as that's a lot of additional typing effort for something that only the author of the emote will see, but I suppose you could make it optional.

I do still use some substitution though. For example:

> emote @man grins at you, throws a stick at you, kicks your dog and wonders what you're going to do about it

Your character grins at the crusty old man, throws a stick at him, kicks his dog and wonders what he is going to do about it.
KaVir is offline   Reply With Quote
Old 12-04-2006, 07:03 PM   #3
erdos
 
Posts: n/a
Quote:
Originally Posted by (KaVir @ Dec. 04 2006,10:38)
I use 'your character' instead of the name. In the past I tried changing it to 'you' and automatically working out the verbs, but it got messy and complicated, and the code often made mistakes.

I don't think I'd want to make the player add extra tags to each verb, either, as that's a lot of additional typing effort for something that only the author of the emote will see, but I suppose you could make it optional.

I do still use some substitution though. For example:

> emote @man grins at you, throws a stick at you, kicks your dog and wonders what you're going to do about it

Your character grins at the crusty old man, throws a stick at him, kicks his dog and wonders what he is going to do about it.
How do you handle quotes? Consider:

emote @man glares at you and snarls 'Now you shall die'.

And the rarer but still conceivable recursive quotes:

emote @man peers at you and ponders, 'Did you really just say "you stink" to the king?'

Incidentally, kind of off on a tangent, but in most DIKU style MUDs, most MUD-generated actions (as opposed to emotes) let an act function handle all the name-expanding stuff. So it wouldn't be very hard to set up a pronoun system which would extend beyond single lines. Compare:

The guard's slash wounds you.
The guard's slash wounds you.

To:
The guard's slash wounds you.
His slash wounds you.

The violence function would be sending the same data twice to the action function, but the action function would detect that in the 2nd line, the guard is already the subject.

I'm not saying whether such a system would be _better_ or not, just different, and I've thought about coding it in as a configurable option.. though the same trouble with quotes arises there as well
  Reply With Quote
Old 12-04-2006, 07:15 PM   #4
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
Quote:
Originally Posted by (erdos @ Dec. 05 2006,12:03)
How do you handle quotes?  Consider:

emote @man glares at you and snarls 'Now you shall die'.
I don't handle quotes (I use the 'say' command for that sort of stuff), but it would be fairly straightforward to do so - just don't do any substitutions when between quotes (i.e., toggle substition on and off each time you encounter a quote).

Quote:
Originally Posted by
And the rarer but still conceivable recursive quotes:

emote @man peers at you and ponders, 'Did you really just say "you stink" to the king?'
If you're differentiating between single and double quotes then you can handle them separately without a problem. However it becomes ambigious if you want to use recursive quotes of the same type, because this is a quote within a quote:

emote @man peers at you and ponders, "Did you really just say "you stink" to the king?"

While this is two separate quotes:

emote @man peers at you and ponders, "Did you really just say to the king?". He scratches his beard and continues, "The king won't be happy if he finds out."

And it's going to be difficult for the mud to work out which is which unless you can be sure that the players will follow a specific syntax (such as placing a comma before a new quote).
KaVir is offline   Reply With Quote
Old 12-04-2006, 07:30 PM   #5
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
In regard to "The guard's slash wounds you." vs "His slash wounds you.", you may end up with rather ambigious messages. As a simple example, what happens when a wolf attacks the guard? The word 'his' could refer to either the guard or the wolf, depending on whether the subject is changed during the message or after. If the subject is only changed after a message has been sent then you could end up with something like "A timber wolf bites at his right leg". But if you automatically change the subject during the message you could also end up with something like "A timber wolf lunges at the guard, sinking a timber wolf's fangs into the guard's right leg".
KaVir is offline   Reply With Quote
Old 12-05-2006, 08:57 AM   #6
Jazuela
Senior Member
 
Join Date: Apr 2002
Location: New England
Posts: 843
Jazuela will become famous soon enoughJazuela will become famous soon enough
Regarding combat: Using pronouns would make things really confusing if there was more than 1 attacker and more than 1 attackee. How would everyone know which "him" is doing which damage? Better to leave it a little clunky and avoid the confusion.

As for including communications (talking) within emotes, I prefer those games which provide the reverse: including emotes with communications. That gives the coder more flexibility in coded language development. If your game has coded languages, then bypassing that code by including quotations in emotes would have to be against the rules. It isn't a difficult rule to follow as long as you have the coded ability to include emoting in talking. So:

emote waves at @man, saying, "Hello there!"

would be replaced with

tell man (waving at @man) Hello there!

That way, if an onlooker doesn't speak that language, he'll end up seeing something like:

Waving at the man, the woman says something.

and everyone who does understand the language would see:

Waving at the man, the woman says, "Hello there!"

Of course all of that is a matter of trust between staff and players; if your playerbase isn't trustworthy to maintain the integrity of the tools provided to them, you're better off not having a detailed emoting system at all and just sticking with canned socials.

To answer Mal's question directly: In Armageddon at least, it's left clunky. You write the emote out similarly to how you would use act in Inferno, except with the added benefit of dynamic symbols. So in Inferno, Niclas' player might type:

act waves at the group, his eyes sparkling with mirth as he reaches for his gem-studded neuvaldian dagger and says, "Spencer, ladies, gents, everyone else".

He is writing in the third person, as if Niclas was someone else. The same would happen in the dynamic emote (or in this case, the dynamic say-emote):

say (to @spencer, with a wave at the group, his eyes sparkling with mirth as he reaches for @dagger) Spencer, ladies, gents, everyone else.

So if there's a misalen in the crowd and he doesn't speak common, he will see only:

To Spencer, with a wave to the group, his eyes sparkling with mirth as he reaches for his gem-studded neuvaldian dagger, Niclas says something in an unknown language.

Maybe if the misalen has only 2 ranks of common, he might hear something like:

....Spen--, la----- g----, -ver--n- e-s-."

or even random letters replacing the correct ones, until his skill is good enough to understand the whole thing.
Jazuela is offline   Reply With Quote
Old 12-05-2006, 06:01 PM   #7
erdos
 
Posts: n/a
Quote:
Originally Posted by (KaVir @ Dec. 04 2006,6:30)
In regard to "The guard's slash wounds you." vs "His slash wounds you.", you may end up with rather ambigious messages.  As a simple example, what happens when a wolf attacks the guard?  The word 'his' could refer to either the guard or the wolf, depending on whether the subject is changed during the message or after.  If the subject is only changed after a message has been sent then you could end up with something like "A timber wolf bites at his right leg".  But if you automatically change the subject during the message you could also end up with something like "A timber wolf lunges at the guard, sinking a timber wolf's fangs into the guard's right leg".
Obviously any time the subject changes, the full name would be used.  The MUD would keep a running tally for each individual player of who the most recent male and female and neutered subjects were, and pronouns like "him", "his", "he" would only be used when the subject of the current line was the same as the subject of the previous one.

Example.
The female guard's punch bruises the female slave!
The female guard's kick pelts the female slave!
The male guard's slash wounds the female slave!
His stab cuts her!
He changes his target to the male slave!
The male guard's slash devastates the male slave!
The male guard changes his target to the female slave!
His stab maims her!
The slavemaster's whip massacres her!
She is DEAD!
He takes 5 gold coins from her corpse*.

There is no ambiguity here:  each time a pronoun is used, it refers to the agent of appropriate gender who most recently had their name expanded to the viewer.  Thus in line 4, there is no doubt that "her" is the female slave, not the female guard.  The ordering is based on line number and ignores position within the line, so in line 3, the MUD sees that there are two candidates tied for "generic female" role, and so does not use the pronoun.  In line 5, the male guard is still unchallenged as generic male, because the male slave's claim to that position won't come into effect until AFTER this line.  Hence the word "he".  In line 6, both actors' names are fully expanded, because they are tied as most recent.

*the final line illustrates a less trivial, more ambitious extension of the idea to objects.  Certain specific objects indicate ownership in their shortdescs, eg corpses, Godwars style soulblades, etc.  With more work, pronouns could be extended to these as well.  Which brings up another point, some mobs would need to be specifically flagged as nonpronoun, for example "the king's guard".  Otherwise the following would be ambiguous:

The king's guard's slash hits you!
His pierce cuts you!

In the second line, whose pierce is cutting you -- the king's guard, or the king himself?


EDIT: on further reflection, I think for certain objects it'd be worth doing this project even if the larger project were not done. For example, "Erdos stops using his soulblade" looks much better than "Erdos stops using Erdos's soulblade", no matter how you consider it. To someone who can't see Erdos, "Someone stops using Erdos's soulblade" gives away too much info (as would "Someone stops using his soulblade", since invisibility masks gender too. A better line would be "Someone stops using their soulblade")
  Reply With Quote
Old 12-05-2006, 07:49 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
Quote:
Originally Posted by
The female guard's punch bruises the female slave!
The female guard's kick pelts the female slave!
The male guard's slash wounds the female slave!
His stab cuts her!
He changes his target to the male slave!
The male guard's slash devastates the male slave!
The male guard changes his target to the female slave!
His stab maims her!
The slavemaster's whip massacres her!
She is DEAD!
He takes 5 gold coins from her corpse*.
Perhaps it might be nice as a toggable feature, but personally I'd find that hard to keep track of, as it requires reading a lot more text. Normally I just skim over the combat messages and mentally pull out the important information, but when I see something like "His stab maims her" I then have to read back over earlier messages to try and work out who "his" and "her" refer to.

Your usage of the word 'the' also raises another point. If there's only one guard fighting, then it's fairly obvious who "the male guard" is. But what if there are two or three male guards? You could call them things like "the second guard" and "the third guard", but that would have to be done relative to the viewer (eg perhaps the second guard is invisible) - and that in turn could prove more confusing than cool for the players.

Unless the mob is unique, I always refer to them as "a male guard" or whatever - the only exception is your current opponent, who would be referred to as "the male guard"/etc.

Quote:
Originally Posted by
on further reflection, I think for certain objects it'd be worth doing this project even if the larger project were not done. For example, "Erdos stops using his soulblade" looks much better than "Erdos stops using Erdos's soulblade", no matter how you consider it.
Perhaps...but:

> l erdos
You look at Erdos.

You see Erdos, blah blah blah.

He is wearing:
A white cotton shirt on his neck, body, back and arms.
A pair of brown leather trousers on his groin and legs.
A pair of black leather boots on his feet.
His soulblade in his right hand.


That reads a bit strangely to me. I honestly think it would read better if it said "Erdos's soulblade in his right hand". "A soulblade" would read even better still, but then the viewer can't see that it's specifically yours, and that might be important from a gameplay perspective.

In regard to using the weapon, I refer to every item you're wearing or wielding as 'your'. Thus "You draw your soulblade from across your back with your right hand", "You sheathe your soulblade across your back", "You slash at the air with your soulblade", etc. The only exception to this is body parts, which use 'a' or 'an' (because "You bash at the air with your severed head" makes it look like you're using your own severed head). I even extend this to plurals (eg "You reach down and draw your knives from your boots").

However what you're suggesting becomes particularly nice when you're talking about personalised items which aren't being carried by anyone. For example if someone slices off your arm, it looks a lot nicer to see "Your severed arm falls to the ground" than "Erdos's severed arm falls to the ground". I did actually have this partially working within my mud at one point, but it's currently commented out due to various problems I had with it. I really should go over it again some time and fix it.

Quote:
Originally Posted by
To someone who can't see Erdos, "Someone stops using Erdos's soulblade" gives away too much info (as would "Someone stops using his soulblade", since invisibility masks gender too. A better line would be "Someone stops using their soulblade")
Well if you're invisible, surely they shouldn't see anything at all? Perhaps a better example would be some sort of "blur" spell which leaves you partially visible, but prevents people from recognising your name or gender.

On the other hand, if I've stolen your soulblade and am wielding it, it's fairly reasonable that you would recognise it even if you didn't recognise me
KaVir is offline   Reply With Quote
Old 12-05-2006, 11:56 PM   #9
erdos
 
Posts: n/a
Quote:
Originally Posted by
Your usage of the word 'the' also raises another point. If there's only one guard fighting, then it's fairly obvious who "the male guard" is. But what if there are two or three male guards? You could call them things like "the second guard" and "the third guard", but that would have to be done relative to the viewer (eg perhaps the second guard is invisible) - and that in turn could prove more confusing than cool for the players.
Hey, I never thought of this that way before. You have a very fine insight into MUDs, KaVir On most DIKU MUDs (like SMAUG, which is my specialty), the mud isn't hardcoded to generate "the"'s, rather they are manually built into the mob short descriptions. So this problem is left to builders. Builders don't actually use "the" that often in shortdescs, especially when the mob ISN'T distinct; usually they use "an" or "a" instead, so the example I made up above is kind of pathological. Nonetheless, I wonder how things _could_ be made less ambiguous in a natural way. The "second guard" thing would not be very natural. Maybe this is a fundamental flaw of text which cannot really be dealt with in any nice way.

On the subject of duplicate mobs, it was pretty easy on Aethar to set up an mcombine system so that on look, for example,

A stern guard watches the gate.
A stern guard watches the gate.
A stern guard watches the gate.

...gets changed to

A stern guard watches the gate. (3)

I'm really surprised Aethar seems to be about the only MUD to do this-- the analogous system for combining objects is almost all-pervasive by now.


EDIT: the "second guard" thing reminds me of a subtler problem with MUDs in general, which is that the whole world is keenly impacted by this mysterious force called "room order". It's mostly invisible when you don't know what to look for, but a veteran MUDder can figure out ways to exploit it. In Realms of Despair we did tricks to manipulate room order to make major changes to battles, sometimes borderline outright cheating. Ideally, low level details like the specific order of linked lists should have no tangible in-game effects, but that would require some kind of CPU-intensive randomization stuff to fix...
  Reply With Quote
Old 12-06-2006, 04:58 AM   #10
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
Quote:
Originally Posted by
Builders don't actually use "the" that often in shortdescs, especially when the mob ISN'T distinct; usually they use "an" or "a" instead, so the example I made up above is kind of pathological. Nonetheless, I wonder how things _could_ be made less ambiguous in a natural way.
Well one option that can help is to add additional keywords to each mob, selected from a list appropriate to that mob, and avoiding duplicates as much as possible. So rather than three versions of "a stern guard" you might get "a tall muscular guard", "a fat dark-haired guard" and "a thin pock-faced guard".

Quote:
Originally Posted by
The "second guard" thing would not be very natural.
If it were relative to the viewer I don't think it would be that bad - you're fighting a guard and another walks in, so he gets called "the second guard" while the first is now called "the first guard". However I think it would get really confusing if there were lots of mobs and they were moving around during the fight.

Quote:
Originally Posted by
On the subject of duplicate mobs, it was pretty easy on Aethar to set up an mcombine system so that on look, for example,

A stern guard watches the gate.
A stern guard watches the gate.
A stern guard watches the gate.

...gets changed to

A stern guard watches the gate. (3)
A good idea, although personally I'd rather see something like:

Three stern guards watch the gate.

Obviously that would require the addition of a plural description for each mob, but I already do that for objects and I think it was worth the effort.

I didn't bother doing this for creatures because:

1. I use randomised keywords, so you're unlikely to have two guards with the same name.

2. It's not common to encounter more than one mob at a time.

3. I include distance/direction, so both mobs would need to be standing on the exact same spot.

What I've considered in the past as an alternative is to provide some sort of grouping mechanism for mobs, so that I could take my three guards ("a tall muscular guard", "a fat dark-haired guard" and "a thin pock-faced guard") and put them into a container called "Three stern guards" that patrols the city, and spits out its individual guards when they're needed for a fight, grouping them back together afterwards.
KaVir is offline   Reply With Quote
Old 12-09-2006, 11:32 AM   #11
spindiggy
New Member
 
Join Date: Apr 2005
Posts: 6
spindiggy is on a distinguished road
Hello,

In regards to the emote scripting and all. Have you looked at the mobprog functions mpemote and such to see how they pass variables? I know I've also seen different versions of these like the dg scripts for circle. There are already tons of examples for that.

In regards to, A stern gate guard is here. (3)

I don't know if you are running a diku deriv'd mud but if so, the code you need for that is already there in show_char_to_char. Look at the PLR_COMBINE section of the code where it consolidates objects. All you have to do is add a check for if IS_NPC and then do the same thing as the object code.

Just my ideas,
Chris
spindiggy is offline   Reply With Quote
Old 12-09-2006, 06:43 PM   #12
Jazuela
Senior Member
 
Join Date: Apr 2002
Location: New England
Posts: 843
Jazuela will become famous soon enoughJazuela will become famous soon enough
I rather like the way Armageddon does it. Instead of

a burly gate guard is here (3)

which is pretty distracting from an RP perspective, from the perspective of someone who wants to be immersed in a "novelesque" atmosphere...

A few burly gate guards are here.

seems much more fluid to me. Plus there are "drop" descriptions so if you put 20 green widgets on the floor, you'd see:

Many green widgets are here.

but the player dropping them can make it look, instead, like this:

Many green widgets, each covered with dried spattered blood, are stacked up against the west wall.

The command if I remember is something like this:

drop widget ~, each covered with dried spattered blood, are stacked up against the west wall.

If there's only 1 widget left after someone steals the other 19 it'll look stupid but chances are no one's going to steal exactly 19
Jazuela is offline   Reply With Quote
Old 12-10-2006, 12:17 AM   #13
erdos
 
Posts: n/a
Hey, interesting idea about having the player indicate the longdesc as they drop the object.  In a big powergaming MUD that would lead to lots of abuse, but I can see how that would be pretty awesome in a smaller RP mud.

As far as "RP distraction" goes, I think the same would be said about combining objects, if that weren't already standard.  That's an interesting phenomenon in MUDs, the things we are raised around (combined objects but not combined mobs) seem so natural, "how on earth could it ever be different?"  And yet if we were raised without them, they'd be absurd or silly.  A good example is the "sanctuary" spell on most hacknslash MUDs.  Imagine if sanctuary had never been invented, and today in 2006 someone on a huge 1000 player hacknslash MUD posted a suggestion for a spell which reduces all damage by 50%.  It would be the laughingstock of the week!  

Spindiggy:  there ARE a few things different between combining mobs and combining objects.  On the typical diku-deriv MUD, the object's longdesc is totally static, possibly with the exception of some flags like "(Magic)" which only show up if the player detects them.  Mobs, on the other hand, have very dynamic longdescriptions.  If one of the gate guards is attacking the player in question, and the other is asleep, you definitely don't want to combine them. And then the real thing which makes mobs different, is the famous "spell effect indicated by line after longdesc", eg, "The guard is shrouded in a holy aura" to indicate sanctuary. One must pluralize this appropriately, to get something like this:
Quote:
Originally Posted by
The holy guard watches the temple. (4)
They are shrouded in holy auras.
But, yeah, nevertheless it is still a pretty easy thing to code, which is why I'm surprised so few have done it  
  Reply With Quote
Reply


Thread Tools


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 06:53 PM.


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