Welcome! Log In Create A New Profile

Advanced

Rconnect 4.1, Highlights: Map management, Player voting.

Posted by Bruno_007 
Rconnect 4.1, Highlights: Map management, Player voting.
October 08, 2012 09:52PM
Hey. Since the MWLL forums are down and I reached a point where I have accounted for a sort of things for it to remain stable enough (I hope tongue sticking out smiley), I'm posting here a new version of Rconnect, which I started from the 4.007 version to see what I could do of new with it.

New Features:

Requirements:
  • http_password and http_startserver set in the MWLL server and here in Rconnect, to enable remote management of the server;
  • Access to the server.log file and it set here (optional, but important for voting and improved end round detection, which is a must in a ticket based game).

Download: Rconnect 4.1 | Source code (not required)



So, some things are permanently disabled in the GUI because I haven't coded them yet. They're there to remember me to finish that.

Also if anyone wants to take a look at my code, most of it is in a folder called MWLL Stuff. I made very little changes to the existing 4.007 code, most were to bring compatibility with MWLL, and are often marked with a # NEW # comment before the actual change.

Now I'm off to play some MWLL. smiling bouncing smiley



Edited 2 time(s). Last edit at 10/08/2012 10:01PM by Bruno_007.
Re: Rconnect 4.1, Highlights: Map management, Player voting.
October 09, 2012 07:39PM
avatar
Both map voting and conditional rotation are things I might just have to steal from you for my own scripts.

How do you detect when the map is about to end and when it has ended? Timeleft works only when no other condition is capable of triggering mapchanges (score limit, tickets, etc.) and even then tends to be unreliable (15 mins on the timeleft counter are not 15 mins in real life)

Right now, I can only check for map changes when the server has already started changing the map. I inject an invalid command for each map in the levelrotation and then check the log file for "unknown command: MARK"



If the radiance of a thousand suns
were to burst, at once, into the sky
It would be like the splendor of the Mighty One...
I am become Death, the shatterer of worlds.



Edited 2 time(s). Last edit at 10/09/2012 08:00PM by haarp.
Re: Rconnect 4.1, Highlights: Map management, Player voting.
October 09, 2012 08:38PM
Quote
haarp
Both map voting and conditional rotation are things I might just have to steal from you for my own scripts.

No problem at all. tongue sticking out smiley

Quote
haarp
How do you detect when the map is about to end and when it has ended? Timeleft works only when no other condition is capable of triggering mapchanges (score limit, tickets, etc.) and even then tends to be unreliable (15 mins on the timeleft counter are not 15 mins in real life)

I have two ways there:
  • Polling the server every X seconds with the status message, which retrieves servers settings like the remaining time of the round;
  • Monitoring the server.log file for this message:
    "GameSpy Stats : Cannot report session: init : nil login : false haveconnection : false"

So the first one yes, it will pretty much only work in non ticket games. It doesn't requires access to server.log though.

The second one should work in all cases. Everytime the end screen that shows the scores of each player is about to show up, with log_verbosity at 2 that message will appear in the server console.

If you poll the server.log file frequently and catch that message, it means a round has just ended. From the moment the message appears you have like 10 seconds left before it tries to load a map from the levelrotation. That's a reliable way to know the right moment to change to your prefered map.

Here's a short version of it, from the source:
If Data.Contains( "GameSpy Stats : Cannot report session: init : nil login : false haveconnection : false" ) Then
     Waiting = True
     MicrosoftWait.Wait(10)
     ChangeToMapFromQueue()
     Waiting = False
End If

(...)

Public Shared Sub ChangeToMapFromQueue()
     For Each CVAR As String In QueueNextMapCommands
          Core.sendServerCommandNow(ServerConnection.serverTcpClient, CVAR)
     Next
     (...)
End Sub



Edited 1 time(s). Last edit at 10/09/2012 08:42PM by Bruno_007.
Re: Rconnect 4.1, Highlights: Map management, Player voting.
October 09, 2012 08:41PM
avatar
log_verbosity 2? Mother of Kerensky.

DefaultBeam spam everywhere. That's not really an option if I intend to keep sane logs. thumbs down
Besides, I'm running sv_gs_trackstats = 0 anyway. Oh well.



If the radiance of a thousand suns
were to burst, at once, into the sky
It would be like the splendor of the Mighty One...
I am become Death, the shatterer of worlds.



Edited 1 time(s). Last edit at 10/09/2012 08:42PM by haarp.
Re: Rconnect 4.1, Highlights: Map management, Player voting.
October 09, 2012 08:49PM
Uhum, yes. You can keep them out of the mwll server window with log_fileVerbosity at 2, but yeah your logs will be double their size. tongue sticking out smiley

Rconnect creates its own logs with just important messages, like the players chat or when new rounds start, etc., or you can do yourself a filtered log with just the messages you wanna see.

Oh and yeah I haven't tried if that cvar, sv_gs_trackstats = 0, disables that message.



Edited 1 time(s). Last edit at 10/09/2012 08:52PM by Bruno_007.