All forum data (this website) will be deleted unless you vote to keep the forum.

TerrariaChatRelay-TShock Port

Discussion in 'Plugin Release Discussion' started by Panini, Mar 8, 2020.

  1. Panini

    Plugin Developer

    Joined:
    Jul 1, 2014
    Messages:
    6
    [​IMG]
    Click here to visit the TCR-tModLoader forum post

    Self-serving Terraria Chat Relay with extensible chat service support
    Send messages from Terraria to your favorite Chat Services!

    Currently supports:
    Discord​

    The beta has been released! Please report any issues you find on the GitHub issue tracker, Discord, or this forum post!

    Hi Everyone! [​IMG]
    I present to you a port of my former tModLoader mod, TerrariaChatRelay!
    It will allow you to send chat from Terraria to multiple Chat Services (such as Discord) and vice versa.
    I host a Discord community where I like to host game servers for my members.

    What's Done:
    • Terraria <-> Discord Chat!
      Send chat from Terraria to Discord and vice versa!
    • Extensible Eventing Framework!
      Helps other developers easily add on to the code so they can help out!
    • Self-serving relay!
      No additional installations required. All you need is the mod installed!
    • Server-side only design!
      No need to waste other people's resources, only the servers!
    To-do:
    • Allow sending of Terraria server console commands straight from Chat Services
    Download: TerrariaChatRelay - Beta 0.9.1.1
    GitHub SourceCode: xPanini/TCR-TerrariaChatRelay
    Mod Discord: Join the Panini Mods Discord Server!


    Post-Release Plans
    • Allow generation of multiple instances on any type
    • Add support for other chat services (Slack, IRC, Terraria to Terraria server maybe?)
    • Allow reload from console
    • General/Admin privilege Chat Service commands
      See who is playing on the server
      See current ping to server
      See world information (size, corrupt/crimson, hardmode or not, etc.)
    If you want to suggest a chat service, prioritize another, or contribute some code, please feel free to say so!

    Changelog:
    Bugfixes:

    -Add retry code to re-connect DCR if it disconnects

    -Re-adjust how hooks fire so other mods hooks can fire

    -Prevent DCR from crashing server when the socket is closed



    New Server Features:

    -Add server start and server stop messages

    -Move config files into a new TerrariaChatRelay folder

    -Make console logging prettier and more identifiable

    -New version checker that notifies you when a new version is available

    -Add comments in DCR config to help users understand how to use it

    -Add configurations to change formatting of messages



    Dev stuff:

    -Decouple all DCR classes from TCR

    -Add DCR only configuration options to independent config file

    -Re-order DCR configuration properties to keep it easy to read and clean

    -Add base class for future Reflection based decoupling

    -Reorder some properties into a Global class

    -Reorder some files into a new Core folder

    -Add comments

    Discord:
    -Add command support
    -Set compression flag to true in case it works
    --(Should speed up connection and reduce bandwidth usage)

    Screenshots:

    [​IMG]
     
    • Like Like x 2
    #1 Panini, Mar 8, 2020
    Last edited: Mar 8, 2020
  2. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    659
    Working nicely, though I'm getting a good chunk of duplicated event messages.
     
  3. Panini

    Plugin Developer

    Joined:
    Jul 1, 2014
    Messages:
    6
    Mind joining the support server? I can help bug smash better there. :) Otherwise, a screenshot or an explanation of which events are being duped would be great!
     
  4. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    659
    I've just joined the Discord server. Don't know yet where to write about this specific port, though. In the meantime...
    [​IMG]
    Ahem... On exhibit 1, I get a somewhat constant flood of ghost "... has disconnected" messages, whereas on console no one has really disconnected. I think it may have something to do with an existing TShock issue which causes it to constantly save if the "save on last player disconnection" option is turned on, even when there are still players around. Also, the "Destroyer has awakened" message, which consistently appears twice whenever it is summoned. Other bosses appear with a single message (didn't check them all though), but both Destroyer and Queen Bee were consistently producing more than one message. The only thing those two have in common AFAIK is that neither will despawn when away from the screen.

    [​IMG]
    And on exhibit 2, some more disconnection flood, plus some more in the form of team joining messages getting repeated lots of times. Sometimes it was just two or three. Sometimes over six times. Not very consistent behaviour there.

    By the way, when I first set it up, two-way communication was working, but after 20 minutes or so Discord-to-TShock stopped working; only TShock-to-Discord was available. Restarting the server didn't work either.

    After getting those issues I stopped using the plugin, but if you want me to help troubleshooting I can set it up again.
     
  5. Panini

    Plugin Developer

    Joined:
    Jul 1, 2014
    Messages:
    6
    After working with Kojiro, the bugs have all been smashed and he reports zero issues after 24 hours of running! Woohoo!
     
    • Like Like x 1