ID:2238341
 
Problem description:

I'm looking to create a system where players are strangers to each other until they formally meet and trade names. The players will ideally just change the name of the person in their "Contacts" menu. One of my hangups is from an immersion factor: I'm making use of the context (right-click) menus for some of the verbs. This shows the player's name. Is there any workaround for this, so that it shows up as "Stranger" until they name the person, in which case the target's name in a menu would be updated to reflect the new entry.

Is this at all possible, or am I going to need to scrap context menus?

It's kind of possible using override /image objects per-player, but it's a pain to maintain.
I thought so. I'm not really ready to try building context menus into my HUD system yet, so I think I'll scrap it for now. Thanks.
I actually have a context menu lib. Maybe it'll help you:
http://www.byond.com/developer/Kidpaddle45/CustomContextMenu

I also got this idea just now, needs to be tested tho:
At login everyone has their name set to "Stranger". Then you overwrite the built in right click proc to check and see if the user has that player in his contacts; If yes, turn the player's name to the actual real name real quick and sleep(1) and turn it back to "Stranger" so other players cant see the name again. (With that quick change back to "Stranger" the context menu wont update the name back to Stranger and would show you his name as it appears in the contacts)
The built-in context menu won't show up if you override the built-in right click. No way around it without a custom context menu.

One of the BYOND's real weaknesses is the lack of per-client control you get. The networking model is sort of a closed system.
In response to Ter13
Ter13 wrote:
The built-in context menu won't show up if you override the built-in right click. No way around it without a custom context menu.

One of the BYOND's real weaknesses is the lack of per-client control you get. The networking model is sort of a closed system.

NUuuuuuuuu!! T_T oh well...
I was hoping we'd at least get a way to custom-build the menus when 4.0 came out (so that a set list would appear and execute the commands attached), but it never really got out of the 'I wonder how that'd work' phase. I didn't even care if it was a per-atom menu, just a way to generate the thing myself in some way.

My idea was basically a client list in the format:

client.menu_items = list("One"="VerbOne","Two"="VerbTwo","Three"="VerbThree")


With sub-items being nested lists and that outright overriding the existing popup and being handled on the client end unless the list was changed. This was before I got big into datum usage though so I'd probably do that instead of crazy nested lists now.

It's not the most flexible thing, but it could work as long as the only communication with the server was if the list got updated, and executing the verb attached to the menu item. Developers would be in charge of making sure the person should actually be able to use that verb or not.

I wonder what happened to that old request, if only I could search for it somehow...

You could actually pull it off now with a screen object with mouse_opacity = 2 and a dynamic list of verbs, but that'd be so insanely ugly and hacky.
Ah man. I developed that with my old system for certain commands, and it worked fine, but it wasn't a context menu that appeared on right click. It was a main menu that was expanded when clicking an "Options" button.

It was pretty nice, but that whole hud system needs redone, and I'm not willing to put in the work yet to fully develop it (too many other things to focus on atm.)

Interesting idea.