Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   Advanced MUD Concepts (http://www.topmudsites.com/forums/forumdisplay.php?f=7)
-   -   Calling characters what you want (http://www.topmudsites.com/forums/showthread.php?t=6860)

Orion 10-19-2012 10:19 AM

Calling characters what you want
 
I am trying to think of a way that the short description of a character, for example..

'a tall man'

..could shows up in the emotes and actions of a character to other characters as a name instead, if other characters have chosen to name them.

So if you were to type something like 'recog #tall Joe,' they would show up to your character as 'Joe' from then onwards, and not 'a tall man.'

I don't really know how to implement this, although I have seen it on a number of other RPI's.

Would anyone be willing to share any code or suggestions that may be helpful in adding something like this to my MUD?

Ide 10-19-2012 11:41 AM

Re: Calling characters what you want
 
Just a quick note, these systems are usually of two kinds. There are introduction systems, and then there are naming systems which is like your example. An introduction system is easier to implement so you might want to start there. You can't assign your own name in an intro system, the game just replaces the character's short desc with their name after they introduce themselves.

Orion 10-19-2012 01:44 PM

Re: Calling characters what you want
 
If an introduction system would be simpler, then it would probably be better for me to start there, yeah. Would that require the character whose name is unknown to introduce themselves to each individual character they want their name to show up to?

Ghostcat 10-19-2012 04:13 PM

Re: Calling characters what you want
 
Yeah. It's usually done through a command combined with roleplay.

People have a basic short description, usually with gender, race, and possibly a distinguishing feature such as eye color or size.

This shows by default, until a player uses the command. After this, the person he used the command on sees their name instead.

camlorn 10-20-2012 09:38 AM

Re: Calling characters what you want
 
Do note:

Implementing either of these will require rewriting a whole lot of code. You can do the actual implementation--does x know y?--but you then have to go fix every single message that doesn't already use whatever the codebase you're using considers the default for name lookup. I'd say this isn't particularly difficult--either of them--but there's going to be lots and lots of broken messages that still force player names, probably, or that just look odd with the new non-introduced descriptions. Diku and such like to copy the name directly from the character struct (char_data, I think, but it's been a while). All of the ch->name have to be replaced with a function call, just as an example (I don't know what codebase. lpc may make this slightly easier).

The only truly hard thing is probably saving whom a player knows to the player savefile; typically, the saving code isn't the most pretty/straightforward, and in some codebases...well. The issue with this: doing it wrong breaks player savefiles.

Kinjiru 04-11-2013 11:48 AM

Re: Calling characters what you want
 
Of commonly available codebases/engines, I am really only familiar with LambdaMOO / WinMOO, but it doesn't seem to hard to this in that case.

For messaging/etc, you can modify the :title() verb on objects to look up whatever name the player has given to that other player (or other object).

For command parsing, it's just a matter of assigning an alias. I've personally written my own parsing methods instead of using the built in MOO stuff, but any way you go, this seems fine.

Generally in MOO, you're much better off to use verbs like :title() instead of properties like .name, anyway, for just this sort of reason. If you had built a game already but used the verb you can easily add such a feature without changing tons of code.

Threshold 04-11-2013 10:18 PM

Re: Calling characters what you want
 
Throwing this in:

I think in general it is better when short or brief descriptions of items do not include articles.

They look weird.


All times are GMT -4. The time now is 02:01 PM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022