G1R:MP Forum Alpha
Log in Join
Gothic 1 Remake Multiplayer

The Colony Forum

News, support, development discussions, server communities, and stories from beyond the Barrier.

Colony discussion

Default chat script understanding

Started by Xardas0327 in Scripting Help

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
08-31-2026, 09:35 PM (This post was last modified: 09-07-2026, 08:08 PM by Xardas0327.)
#1
I try to understand the default/free resources, which are in the current G1RMP-Server-Protocol26-Win64 build.
I have started the research with the chat resource, because it looks simple.
So, I have turned off all resources, except the chat.
Update: I have checked in the G1RMP-Server-Protocol32-Win64 too.

But I have some questions, because I don't understand a couple part of the code. Big Grin

  1. Why I can open the chat with the "T" Key? I don't see any bindKey function.
    Is it a default behaviour because of guiRegisterChat?
  2. I don't understand, how the message sending work.
    The server side looks clear for me. If the message is not command and there is no subscribed function for onPlayerChat event,
    then it will call the outputChatBox function (chat/server.lua line 145).
    But I don't understand, how the client catch the message.
    I see the CHAT_EVENT_OUTPUT (value=g1r:chatOutput chat/client.lua line 6 and line 63) custom event catchs the message.
    But the server never call this event. How does the outputChatBox function know it have to call the CHAT_EVENT_OUTPUT event?
    Update: It looks the g1r:chatOutput is the important. If I change the string, the chat doesn't work.
    Is this string/event hardcoded in the server? I haven't found it in the documentation.
  3. Update: Where is the time coming from on the chat?
+1: Where can I see the outputDebugString logs from client side? The Wiki say it is available on client-side and the script use it.
Forum Jump: