Game Development Community

Modifying masterserver domain/ip address

by Nick Burr · in Torque 3D Beginner · 01/05/2016 (7:39 pm) · 4 replies

I'm trying to change the default garagagames.com as Master0 or the default masterserver, but each time the game generates the server prefs.cs file it always defaults to garagegames.com. I have read that this server is not accepting or pinging new connections so anyway, where can I completely modify this domain so it reflects to my own domain/server when it generates a prefs.cs file?

I tried finding all the .CS, .CPP and .H files and still no luck.

#1
01/05/2016 (9:47 pm)
<game>/core/scripts/client/defaults.cs - look for $pref::Master[0]
<game>/scripts/client/prefs.cs - look for $pref::Master0


Replace "2:master.garagegames.com:28002" with whatever your server address is. I can't recall what the 2 is for, I'm sure if you dig a little it'll become apparent.
#2
01/05/2016 (9:56 pm)
You'll need to change the $pref::Master variable in two separate files, make sure your Torque game is not running when you edit these files:
<T3Dpath>My Projects/<yourGame>/game/core/scripts/server/defaults.cs ~line 26.
<T3Dpath>My Projects/<yourGame>/game/scripts/client/prefs.cs ~line 20.

Note that $pref::Master is an array, so $pref::Master0 (seen in prefs.cs) and $pref::Master[0] (seen in defaults.cs) mean the same thing.
#3
01/06/2016 (7:18 am)
Oh, shit - right - I don't know why I missed the server scripts - thanks Nathan!
#4
01/06/2016 (3:47 pm)
Thank you Richard and Nathan. I completely ignored the core/script/server/default.cs part as it is commented by default.