7DTD-ScriptingMod icon indicating copy to clipboard operation
7DTD-ScriptingMod copied to clipboard

Trigger commands through chat messages and print output in chat

Open djkrose opened this issue 7 years ago • 0 comments

There needs to be the possibility to trigger commands from the game chat instead from console.

Multiple options to parse a chat message would be nice, like:

  • startsWith "/home" - To listen for chat messages that start with this text; interpreting everything after that as parameters.
  • contains "djkrose" - To listen for the text "djkrose" anywhere in the message, passing the whole message as parameter.
  • regex "item:(.+?)\b" - To check for a regular expression match and return the matched groups as parameters.

Additional requirements and ideas:

  • Colors (added by previous mods or mod managers) must be filtered out when parsing the chat.
  • Option to hide the chat message itself from the chat, or to modify it before passing along to the chat.
  • Option to hide all chat messages starting with a specific character like /or !.
  • Permission check must be applied manually, in the same way as it happens in console.
  • This also requires that there is a convenient method available to print output back to the chat.

t.b.c.

djkrose avatar Sep 14 '17 13:09 djkrose