Location based chat with distance effects

I am hoping to dive in to writing my own plugins soon, so I might answer my own request, but I figured I’d get the idea out to get opinions about it.

I’d like a chat plugin that primarily supports local, location-based chat. When a player speaks in chat, only players within X distance can hear them.

That’s the simple version. Ideas for enhancements abound.

  • Players can /yell to increase the distance they can be heard. OR MAYBE JUST TYPE IN ALL CAPS
  • Players can /whisper to decrease the distance they can be heard.
  • For some distance beyond X you can hear people, but you can’t make out what they say
    • For example: CatFive: ...............
  • Except it’s easy to pick out your name, even if you can’t understand the rest.
    • CatFive: ... MrDude ...............
  • Add in a range of decay, using some awesome algorithm, depending on distance
    • CatFive: Hey MrDude there is a creeper outside your house!
    • CatFive: ....MrDude............creeper outside......house!
    • CatFive: ....MrDude.......................................
    • CatFive: .................................................
    • .......: .................................................
  • Some way to determine if you’ve ‘met someone’, until you do, their name is a mystery.
  • Incorporate line-of-sound and block material effects (cloth lined room for maximum privacy)
  • or maybe just a simple line-of-sound check for /whispers so you and a friend can hide behind a wall and talk without the baddie on the other side hearing.

I could do this all day, but what do you think?

Nethack did something interesting for written word decay. I don’t think it really make sense for what’s supposed to be audio, but it inspired the idea.

https://nethackwiki.com/wiki/Source:NetHack_3.4.3/src/engrave.c#Rubout_table

I was about to reply and go, that’s silly, they have a 1:1 mapping! that means it would be trivially easy to reverse it back to what it was.

Then I realized that it was the entire point.

@Cat5IntheCradle It would work pretty well, but I think you would have to add another stage afterwards where the rubouts are replaced with whitespace or dots or something over even further distances.