#Are gm only html elements possible?

1 messages · Page 1 of 1 (latest)

cunning fox
#

Hello. I have a pretty complex HTML output, which i post into the chat. Some Informations there should be only visible to the GM or a specific user only. Is there a way to mark HTML elements to be visible to specific users only.

Im aware of the possibility to broadcast() 2 different message to "gm" and "not-gm". But how would i split a message for "Jack, GM" and "everyone else"? It would be great if would not have to split up my message into different broadcasts().

young rose
#

That's how I do it. I have 2 output variables. One for owners and one for others. If it's only for gm and not-gm, that's even easier.

#

I have an example macro chat() here: #archived-am-macro-js-tidbits message

It allows you to specify players or use keywords like owner or other for specific groups. It's also compatible with the current broadcast designations. You can also post as other names and alternate images, but it still looks like normal chat text. The difference is the post is labeled with a time stamp and Player name as well.

#

chatbox() is the same but with the option for background images, which is a few posts down.

cunning fox
#

I also have a similiar UDF sendTo() in my framework, which takes a message and a option to send it to GM/Self/whatever.

#

The problem is it sends all the output only to 1 type of recipients.

#

I would like to mark specific parts of my output as gm-only. Here is an example of a pretty complex HTML-Box, that appears after a charakter has been seriously wounded after his defense failed:

#

There is a button to Undo the damage. This could be useful if the player decides to use a fate point. I do not want other players to see this button. This should be visible to the GM only and/or the corresponding player. Since there is more output in my HTML-Box i cannot split my output into multiple broadcasts. I think this will mess up the formatting of my output.

#

It would be great to have something like <div visibility=gm>UndoButton</div>

young rose
#

You can just not generate output and just send data to each client who would then generate output. Basically, using execLink or execFunction, pass the data, generate output based on data, then output locally in a frame or self-chat.