Dedicated server for TMF, version 2008-06-10 beta

This is the place where you can find everything related to the dedicated server, control scripts and community tools.

Moderators: Pit Crew, TM-Patrol

xbx
Developer
Developer
Posts: 452
Joined: 12 Aug 2005 14:42
Contact:

Dedicated server for TMF, version 2008-06-10 beta

Post by xbx » 10 Jun 2008 16:37

Here is the dedicated for Trackmania United Forever and Trackmania Nations Forever.

You can download it from
http://files2.trackmaniaforever.com/Tra ... -06-10.zip
or
http://files2.trackmaniaforever.com/Tra ... -10.tar.gz

(both contain the same files, and windows and linux executable.)

Changes:
  • Configurable ladder limits (in dedicated_cfg.txt). You have to restart the server to change them.
  • Spectator relay mode.
  • SetForceShowAllOpponents() & friends now take a integer argument to specify the minimum visible players.
  • GetCurrentRankings() now return a rank of '0' for the players that are pure spectators.
  • GetPlayerList() can now optionally return the server(s) as well, and the flags now contain this information.
  • GetDetailedPlayerInfo() has an added field, with the client version. (for instance the spectator target issues have been fixed in the client, so you can know what to expect. or tell the user to update... ;)
  • new methods: ManualFlowControlIsEnabled() et ManualFlowControlGetCurTransition()
  • other little crash fixes
I hope I didn't forget something.

About the "Spectator relay"/ManiaChannel thing:
This allows to create a relay server that connects to a game server, that allows many spectators to view what's going on in the race without disturbing the match. And that helps with P2P of players on the server.

How to use it:
1) run the game server as usual, but:
* set the maxplayers and maxspectators to small values.
* enable the "allow_spectator_relays" option in the config file. !!! when this option is activated, you cannot change the maxplayers and spectators settings.
2) run others servers (with an other login), with a command line resembling:

Code: Select all

TrackmaniaServer /dedicated_cfg=dedicated_cfg.txt /join=the_login_of_the_game_server /joinpassword=spectator_password_of_the_game_server_if_needed 
Now the spectators can connect to this other server and will be able to see everything going on on the game server, and they will be abale to chat with each others (but the players on the game server will not see them).

the maximum spectators on the relays is 250-(maxplayers+maxspectators) on the game server.

to write xml-rpc plugins dealing with this:
* you have IsRelayServer() to know where you are.
* you can know for each player whether it is local to the server or comming from an other server (=game server)
* you can use TunnelSendDataToLogin() to communicate with the game server from the relay or the other way around.

please report any issues or missing features for this new mode of use.

xavier.

edit: fixed the second link.
Last edited by xbx on 11 Jun 2008 05:23, edited 2 times in total.

Gekko
speedy pilot
speedy pilot
Posts: 550
Joined: 03 Sep 2006 18:20
Owned TM-games: ALL
Location: Naples - Italy
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by Gekko » 10 Jun 2008 16:43

Thx great!!

User avatar
Phhere
sunday driver
sunday driver
Posts: 65
Joined: 16 Oct 2006 21:01
Owned TM-games: TMS, TMU
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by Phhere » 10 Jun 2008 17:12

Great day :)
Thx to the whole team of nadeo :)

It is like christmas :)

:lovenadeo:
*Sorry for my english*
webSPELL Development
Image

User avatar
Generator
speedy pilot
speedy pilot
Posts: 339
Joined: 18 Apr 2008 00:35
Owned TM-games: TMNF - TMUF
Manialink(s): Generator
Location: Lancashire, England
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by Generator » 10 Jun 2008 17:21

Thanx alot xbx :gobananas:

P.s. your second link dont seem to work here.
Customize your virtual world to the max! >> http://www.virtualcustoms.net
3D Models, 2D skins & horns on my Manialink >> Generatorcolor>

User avatar
TrabTowN
Pit Crew
Pit Crew
Posts: 789
Joined: 03 Nov 2005 14:30
Owned TM-games: TMS,tmn,TMU
Location: Ireland/orginal SACHSE^^
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by TrabTowN » 10 Jun 2008 18:03

yet another bananadance

:gobananas: :gobananas: :gobananas: :gobananas:

...

btw. linux link is not working

Code: Select all

Not Found

The requested URL /TrackmaniaServer_2008-06-10.tgz was not found on this server.
100²% addicted
Image
Image

LaBBe-
sunday driver
sunday driver
Posts: 61
Joined: 26 Oct 2007 22:18
Owned TM-games: TMUF
Location: Naantali, Finland
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by LaBBe- » 10 Jun 2008 18:06

nice, will update as soon as im home.. btw do i need to change anything else than the binary and add the new settings in the config file?
Image

User avatar
TrabTowN
Pit Crew
Pit Crew
Posts: 789
Joined: 03 Nov 2005 14:30
Owned TM-games: TMS,tmn,TMU
Location: Ireland/orginal SACHSE^^
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by TrabTowN » 10 Jun 2008 19:13

huston i have a problem xD

.... when i try to start the "SpecRelay" Server, it just stops without a "understandable" error...
Console Log:

Code: Select all

[2008/06/10 21:09:16] Initializing...
[2008/06/10 21:09:16] Configuration file : 40.cfg
[2008/06/10 21:09:16] Loading system configuration...
[2008/06/10 21:09:16] ...system configuration loaded
[2008/06/10 21:09:16] Loading cache...
[2008/06/10 21:09:18] ...OK
[2008/06/10 21:09:18] Listening for xml-rpc commands on port 5015.
[2008/06/10 21:09:18] Loading dedicated server configuration...
[2008/06/10 21:09:18] ...Dedicated server configuration loaded
[2008/06/10 21:09:18] No match settings file
[2008/06/10 21:09:18] Starting relay on internet
[2008/06/10 21:09:18] Connecting to master server...
[2008/06/10 21:09:19] ...OK
[2008/06/10 21:09:19] Identifying on master server...
[2008/06/10 21:09:20] ...OK
[2008/06/10 21:09:20] URL: tmtp://#spectate=sa15
[2008/06/10 21:09:20] Please wait, loading...
[2008/06/10 21:09:22] Starting server...
[2008/06/10 21:09:22] ...Server stopped
[2008/06/10 21:09:22] Server not running, exiting.
[2008/06/10 21:09:23] Exiting...
Start Log:

Code: Select all

Starting TmForever v2008-06-10...
Initializing...
Configuration file : 40.cfg
Loading system configuration...
...system configuration loaded
Loading cache...
...OK
Listening for xml-rpc commands on port 5015.
Trackmania server daemon started with pid=5327 (parent=5326).
Start Param:

Code: Select all

./TrackmaniaServer /dedicated_cfg=40.cfg /join=sa18 /joinpassword=klingeling
Server Config (40.cfg)(i am shure there are some stuff that can go):

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>	
<dedicated>
 <authorization_levels>
   <level>
   <name>SuperAdmin</name>
   <password>xxxxxxx</password>
  </level>
  <level>
   <name>Admin</name>
   <password>xxxxx</password>
  </level>
  <level>
   <name>User</name>
   <password>xxxxx</password>
  </level>
 </authorization_levels>
	
 <masterserver_account>
  <login>SA15</login>
  <password>xxxxxxx</password>
 </masterserver_account>
	
 <server_options>
  <name>-SpecRelay-</name>
<comment></comment>

  <max_spectators>200</max_spectators>
  <password_spectator></password_spectator>
		
  <ladder_mode>forced</ladder_mode>	
		<ladder_serverlimit_min>0</ladder_serverlimit_min>	
		<ladder_serverlimit_max>50000</ladder_serverlimit_max>								
		
  <enable_p2p_upload>True</enable_p2p_upload>
  <enable_p2p_download>True</enable_p2p_download>
		
  <callvote_timeout>60000</callvote_timeout>
  <callvote_ratio>0.5</callvote_ratio>
		
  <allow_challenge_download>True</allow_challenge_download>
 </server_options>
	
 <system_config>
  <connection_uploadrate>100000000</connection_uploadrate>     <!-- KBps -->
  <connection_donwloadrate>100000000</connection_donwloadrate> <!-- KBps -->

  <force_ip_address></force_ip_address>
  <server_port>2357</server_port>
  <server_p2p_port>3467</server_p2p_port>
  <client_port>0</client_port>
  <bind_ip_address></bind_ip_address>
  <use_nat_upnp></use_nat_upnp>
		
  <xmlrpc_port>5015</xmlrpc_port>
  <xmlrpc_allowremote>true</xmlrpc_allowremote>					
		
  <blacklist_url></blacklist_url>
  <guestlist_filename></guestlist_filename>
  <blacklist_filename></blacklist_filename>
		
  <use_proxy>False</use_proxy>
  <proxy_login></proxy_login>
  <proxy_password></proxy_password>
  <packmask>united</packmask>
  <allow_spectator_relays>True</allow_spectator_relays>
 </system_config>
</dedicated>            
and finaly the server that is "Spec-ed":

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>

<dedicated>
    <authorization_levels>
        <level>
            <name>SuperAdmin</name>
            <password>xxxxxx</password>
        </level>
<level>
            <name>Admin</name>
            <password>xxxxx</password>
        </level>
    </authorization_levels>
    
    <masterserver_account>
        <login>SA18</login>
        <password>xxxxx</password>
    </masterserver_account>
    
    <server_options>
        <name>$o$w$f00SA:$0f0test</name>
        <comment>test</comment>
        
        <max_players>6</max_players>
        <password>xxx</password>
        
        <max_spectators>1</max_spectators>
        <password_spectator>klingeling</password_spectator>
        
        <ladder_mode>forced</ladder_mode>
		<ladder_serverlimit_min>0</ladder_serverlimit_min>	
		<ladder_serverlimit_max>50000</ladder_serverlimit_max>	
        
        <enable_p2p_upload>True</enable_p2p_upload>
        <enable_p2p_download>True</enable_p2p_download>
        
        <callvote_timeout>60000</callvote_timeout>
        <callvote_ratio>0.5</callvote_ratio>
        
        <allow_challenge_download>True</allow_challenge_download>
    </server_options>
    
    <system_config>
        <connection_uploadrate>100000000</connection_uploadrate>
        <connection_donwloadrate>100000000</connection_donwloadrate>

        <force_ip_address></force_ip_address>
        <server_port>2368</server_port>
        <server_p2p_port>3468</server_p2p_port>
        <client_port>0</client_port>
        <bind_ip_address></bind_ip_address>
        <use_nat_upnp></use_nat_upnp>
        
        <xmlrpc_port>5019</xmlrpc_port>
        <xmlrpc_allowremote>true</xmlrpc_allowremote>
        
        <blacklist_url></blacklist_url>
        <guestlist_filename></guestlist_filename>
        <blacklist_filename></blacklist_filename>
        
        <use_proxy>False</use_proxy>
        <proxy_login></proxy_login>
        <proxy_password></proxy_password>
        
		<allow_spectator_relays>True</allow_spectator_relays>
		
    </system_config>
</dedicated>
 
...hope someone can help :)

TRAB
100²% addicted
Image
Image

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: Dedicated server for TMF, version 2008-06-10

Post by w1lla » 10 Jun 2008 19:25

hmmm got the same error as trabtown!!!!

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by Slig » 10 Jun 2008 19:29

I did not test, but probably that <allow_spectator_relays> should not be true on the relay server but only on the main one.

User avatar
TrabTowN
Pit Crew
Pit Crew
Posts: 789
Joined: 03 Nov 2005 14:30
Owned TM-games: TMS,tmn,TMU
Location: Ireland/orginal SACHSE^^
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by TrabTowN » 10 Jun 2008 19:33

Slig wrote:I did not test, but probably that <allow_spectator_relays> should not be true on the relay server but only on the main one.
though that myself, unfortunately it makes no difference ... but thx
100²% addicted
Image
Image

Xymph
Pit Crew
Pit Crew
Posts: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by Xymph » 10 Jun 2008 20:05

It seems a bug was introduced in the TrackMania.PlayerChat callback: previously such callbacks from server messages (ChatSendServerMessage etc) always had PlayerUid = 0, and in this build it's 250. This breaks code that checks for the server id in order to skip (or process) such messages. xbx, can you fix this soon? I'm getting close to a major new XAseco release, but that bug breaks various pieces in the system.

Or is the server now always id 250? I noticed the first two players joining my test server always get id's 249 and 248, so it appears to be counting down now. What happens on servers with more than 249 players, or are those impossible?
If the numbering change was intentional, I still hope you can revert it, because it seems an unnecessary break in compatibility.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

xbx
Developer
Developer
Posts: 452
Joined: 12 Aug 2005 14:42
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by xbx » 10 Jun 2008 20:48

TrabTowN wrote:
Slig wrote:I did not test, but probably that <allow_spectator_relays> should not be true on the relay server but only on the main one.
though that myself, unfortunately it makes no difference ... but thx
hum...
everything seems fine in the conf.

maybe it's just you should just wait one or two minutes so that the relay can find the server on the master server?

xbx
Developer
Developer
Posts: 452
Joined: 12 Aug 2005 14:42
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by xbx » 10 Jun 2008 21:02

Xymph wrote:It seems a bug was introduced in the TrackMania.PlayerChat callback: previously such callbacks from server messages (ChatSendServerMessage etc) always had PlayerUid = 0, and in this build it's 250. This breaks code that checks for the server id in order to skip (or process) such messages. xbx, can you fix this soon? I'm getting close to a major new XAseco release, but that bug breaks various pieces in the system.

Or is the server now always id 250? I noticed the first two players joining my test server always get id's 249 and 248, so it appears to be counting down now. What happens on servers with more than 249 players, or are those impossible?
If the numbering change was intentional, I still hope you can revert it, because it seems an unnecessary break in compatibility.
aaaaargh. I didn't think of that...

unfortunatly, that value can vary depending on the player count and whether relays are activated.
I'll try to think of something.
Last edited by Assembler Maniac on 10 Jun 2008 21:05, edited 1 time in total.
Reason: fixed the quoting

xbx
Developer
Developer
Posts: 452
Joined: 12 Aug 2005 14:42
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by xbx » 10 Jun 2008 21:39

ok. so..
1) I'm afraid that the coincidence that was making the server uid always 0 is gone for good (because of the relay server thing), and I don't think I can get it back.
2) The only solution I can think of (alas not very simple) is:

pseudo code:

Code: Select all

$ServerUid = 0;  // value for older servers.
if (GetVersion() >= "2008-06-10") {
  $ServerPlayer = GetPlayerList(1,0,2);  // the first one is always the server. I think.
  // This should always be true: Assert (($ServerPlayer[Flags] / 100000)%10 = 1);   100000= is server or relay
  $ServerUid = $ServerPlayer[PlayerId];
}

.. compare  id with $ServerUid.

(the version check is needed because of the last paremeter of GetPlayerList(). )

sorry for the breakage and "short" notice...

If that doesn't work, just
if GetVersion() == "2008-06-10") exit("unupported version")
and advise against updgrading the server until we can find a better solution.

(The problem is that I won't be in office until next week.)

Florent
Developer
Developer
Posts: 1594
Joined: 09 Aug 2005 14:07
Contact:

Re: Dedicated server for TMF, version 2008-06-10

Post by Florent » 10 Jun 2008 21:43

go catch your plane xbx :roflol:

Post Reply