tModLoader Server warping mod via in-game portal

owned2055

Terrarian
Hi everyone!

I've been playing Terraria for years. I often host annual servers for me and my friends. Each time I host I really wish that there were a way to "link" multiple servers via in-game portals similar to how Bungee Cord works in Minecraft.

I've been experimenting using tModLoader and have been able to create a proof of concept. I'm looking for some assistance in polishing this project up. I'm not super well versed in C# and certainly am no expert in Terraria and tModLoader's libraries.

I've attached a gif that demonstrates the functionality I currently have.

How this works:
  • Server owner spins up multiple Terraria instances
  • Server owner creates a warps.txt file that points to the other Terraria instances. (Should only be a port change)
  • Player types "/warp list" command to retrieve a list of "warps"
  • Player types "/warp {warpname}" command
  • Server receives command and sends a packet with the server's details to the player
  • Player's client disconnects from the current server and reconnects to the new server
This process essentially just automates the player's manual process of exiting a server and then reconnecting to a new one.

What I'm asking of the community.
  • Is this mod something people are interested in using?
  • Assistance optimizing the C# side of things by answering some of these questions
    • Is this safe to do?
    • How bad is the existing code?
    • Could the code be improved?
  • Someone who could make an in-game placeable object which allows a user to assign a warp name and when right-clicked, portal to the assigned server.
    • Would be awesome to have some nice animations.
Here's the github repository: GitHub - RCady/terraria-server-portal
 

Attachments

  • ezgif.com-gif-maker.gif
    ezgif.com-gif-maker.gif
    7.8 MB · Views: 41
I actually thought about this on my own the other day and have been thinking about it until I decided to look it up and found your forum page just now. I don't really think I could help because I've never made a Terraria mod or used C# before, but at the very least you should know that I'm interested and would like to see this made.
 
Back
Top Bottom