Forums » Suggestions
Hidden escape sequence for embedding data in chat
Could you add a non-printing character, escape sequence (similar to \127 for color changes in IUP), or tag that could be used to embed data in messages?
The specific use-case I have in mind for this is the ability to provide an item link in chat, so that players can click on the link and it could bring up a window displaying relevant item information.
The existing UI half supports this, by allowing a player to drag an item from their inventory to the chat window to paste the name of that item into chat. This feature would allow the item ID to be transmitted as well, allowing the receiving chat handler to render it into a link to be interacted with.
Example: Hey, check out this fancy new \e[188024242]Free Power Cell\e I just got.
Depending upon how this is implemented, it may be possible to create counterfeit links that link to items that don't match the link name. But that's mostly just some harmless fun.
To prevent passing any arbitrary data, I figure this could be made to operate similar to \127, which accepts only a limited number of inputs following it, of specific values or patterns.
The specific use-case I have in mind for this is the ability to provide an item link in chat, so that players can click on the link and it could bring up a window displaying relevant item information.
The existing UI half supports this, by allowing a player to drag an item from their inventory to the chat window to paste the name of that item into chat. This feature would allow the item ID to be transmitted as well, allowing the receiving chat handler to render it into a link to be interacted with.
Example: Hey, check out this fancy new \e[188024242]Free Power Cell\e I just got.
Depending upon how this is implemented, it may be possible to create counterfeit links that link to items that don't match the link name. But that's mostly just some harmless fun.
To prevent passing any arbitrary data, I figure this could be made to operate similar to \127, which accepts only a limited number of inputs following it, of specific values or patterns.
Another use for this could be to pass sector IDs to allow a chat handler to render links that could set a navroute when clicked. Though fake links here could be viewed as less than harmless fun.
The point is to be able to pass IDs of things for the sharing of information. Should these characters by their very nature render a link, rather than being processed and potentially customized? Afterall, it would be handy if they could also render in an <input>. If the render of the character is handled outside the API, there should be less chance of foul-play.
The point is to be able to pass IDs of things for the sharing of information. Should these characters by their very nature render a link, rather than being processed and potentially customized? Afterall, it would be handy if they could also render in an <input>. If the render of the character is handled outside the API, there should be less chance of foul-play.