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, 09:03 AM   #1
Malifax
Member
 
Join Date: Mar 2006
Posts: 108
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, 10: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, 06:03 PM   #3
erdos
 
Posts: n/a
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, 06: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
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).

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, 06: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, 07:57 AM   #6
Jazuela
Senior Member
 
Join Date: Apr 2002
Location: New England
Posts: 849
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, 05:01 PM   #7
erdos
 
Posts: n/a
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, 06: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
KaVir is offline   Reply With Quote
Old 12-05-2006, 10:56 PM   #9
erdos
 
Posts: n/a
  Reply With Quote
Old 12-06-2006, 03: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
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".

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.

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, 10: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, 05:43 PM   #12
Jazuela
Senior Member
 
Join Date: Apr 2002
Location: New England
Posts: 849
Jazuela will become famous soon enoughJazuela will become famous soon enough
Jazuela is offline   Reply With Quote
Old 12-09-2006, 11:17 PM   #13
erdos
 
Posts: n/a
  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:23 AM.


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