Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Yahoo!

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWFOTE FUSS » Emote code
Forum Rules | Mark all | Recent Posts

Emote code
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Feb 7, 2008, 10:41 am
Go to the top of the page
Go to the bottom of the page

Krylan
Fledgling
GroupMembers
Posts39
JoinedApr 14, 2005

So, I've got a few ideas on modifying emote and I wanted to see what people though.

I want to add support for language to emote. What I mean is so when someone puts quotations its converted to language.
Example.
Emote stands up and chuckles as he begins speaking, "Yes blah blah blah."

So if someone doesn't understand that language, they text is scrambled like in say.

Also, I was thinking about adding support for directing something towards someone. such as

emote stands and turns to @soandso. This would show to the room the PERS of that person that way someones name isn't given away.

And then the last idea was the ability to attach a command at the end.

Emote takes a seat and begins speaking. #sit

So essentially all these could be added together for a complex emote

emote stands and turns to @bob and begins speaking, "Ladies and gentleman." #stand

I dunno, just a few ideas I wanted to hear some feedback on. And I'm not sure how to add all this together and make it work.
       
Post is unread #2 Feb 14, 2008, 5:06 am
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

Sounds exactly like what I did. I just parse the input from the player for special tokens. So if @bob is encountered the PERS of the character (in the room) called Bob would inserted. If there are no one called Bob, the player will get feedback as appropriate. Similarly I use # for items, either in the room, or in the player's inventory (or worn, for that matter). If " is encountered, everything up to the next " is considered speech. I have yet to add support for language scrambling, but that's not difficult once the rest is in place.

Of course when searching for @bob in the room, you have to use PERS again, because the person using the emote won't always know the real name.

It's not too hard to do this, but it's easy to get too many rounds of parsing, costing you CPU time. Something to consider.

I hope this helps.
       
Post is unread #3 Feb 14, 2008, 5:11 am
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

For clarity, I also suggest using colour tags to make speech stand out. This is purely down to personal taste, of course.
       
Post is unread #4 Feb 14, 2008, 5:17 am   Last edited Feb 14, 2008, 5:17 am by Caius
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

Just thought I'd post my EMOTE helpfile to show exactly how it works:

The EMOTE is your most important tool in roleplaying. It allows you to create
customized messages to the room you're in. The '@' character denotes a
Character keyword, the '#' character denotes an Object/Item keyword, and the
'"' (double quote) donotes an inline say. The entire EMOTE is automatically
coloured to be consistent with other roleplaying commands.

Example:

emote looks at @bob and says, "Good morning.", then sits down

This is what is displayed:

1st: Caius looks at Bob and says, "Good morning.", then sits down.
2nd: Caius looks at you and says, "Good morning.", then sits down.
3rd: A male human looks at a male Zabrak and says, "Good morning.", then sits down.

Legend: 1st is you, 2nd is Bob, and 3rd are any other characters in the room,
who in this example doesn't know neither you nor Bob.

Example with object keyword:

emote takes a sip of #ale then passes out

Caius takes a sip of a bottle of Corellian ale then passes out.

You can also reference yourself with the @self keyword. This will have the effect
that your name is not shown at the beginning of the emote:

emote in a spur of joy @self shouts, "Huzza!", then jumps up and down.

In a spur of joy Caius shouts, "Huzza!", then jumps up and down.
In a spur of joy a male human shouts, "Huzza!", then jumps up and down.

Tip: You can reference any combination of characters and objects in the same emote.


The inline speech is coloured, which of course you can't see in this posting.
       
Post is unread #5 Feb 14, 2008, 2:38 pm
Go to the top of the page
Go to the bottom of the page

Krylan
Fledgling
GroupMembers
Posts39
JoinedApr 14, 2005

Haha, if I can get the MUD to start, I'm going to start working on that. Extended bitvectors are kicking my tail.
       
Pages:<< prev 1 next >>