(Solved) Server Problem: How do I generate a new invite code?

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
Nick_B
Engineer
Engineer
Posts: 11
Joined: 08 May 2021 22:56

(Solved) Server Problem: How do I generate a new invite code?

Post by Nick_B »

How do I generate a new invite code for a server? I'm getting the same one over and over again and want to run multiple servers in parallel but can't do that since they ALL use the same invite code
Last edited by Nick_B on 28 Sep 2023 23:33, edited 1 time in total.
Nick_B
Engineer
Engineer
Posts: 11
Joined: 08 May 2021 22:56

Re: Server Problem: How do I generate a new invite code?

Post by Nick_B »

Is the invite code now attached to the device? If that's the case that kinda stinks as it makes it impossible to run multiple servers on the same device like you used to be able to.
User avatar
jfs
Tycoon
Tycoon
Posts: 1764
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Server Problem: How do I generate a new invite code?

Post by jfs »

Each of the servers you're running do have different (internet-facing) IP-addresses and/or port numbers, right?


Edit: You can see how the Game Coordinator generates the invite codes here:
https://github.com/OpenTTD/game-coordin ... te_code.py
In short, it should assign a random one to each new server that registers itself with the Game Coordinator. The only reason two different servers might get the same invite code, is if the GC somehow thinks they're the same.
Nick_B
Engineer
Engineer
Posts: 11
Joined: 08 May 2021 22:56

Re: Solved

Post by Nick_B »

SOLVED: So the invite code is stored in "private.cfg" and I just copied the entire OpenTTD install meaning that exact config was copied with it. The easiest way I found to fix this is to just blank out or change the invite code in the config folder mentioned to something else. The game on startup will automatically generate a new invite code and that'll be it. You still can't run 2 instances/servers in the same install though as you can't have multiple "private.cfg" configs in them.
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 21 guests