Raised This Month: $32 Target: $400
 8% 

[TF2] Match Recorder


Post New Thread Reply   
 
Thread Tools Display Modes
Author
carbon
Junior Member
Join Date: May 2009
Location: Tampere, Finland
Plugin ID:
884
Plugin Version:
0.4
Plugin Category:
All
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    The plugin automatically records demos when the tournament mode is active
    Old 05-18-2009 , 17:23   [TF2] Match Recorder
    Reply With Quote #1

    Description

    This plugin will automatically start SourceTV recording after both teams are ready in the tournament mode and the game is automatically restarted. The recording will be stopped when win conditions are met (timelimit or roundlimit).

    The plugin has no configuration options so it should be extremely easy to use. :)

    Changelog

    0.4
    * Recording will now be stopped when mp_windifference is reached

    0.3
    * Fixed demo filenames being cut short

    0.2
    * Recording is now stopped when all players leave the server (thanks jasonfrog!)

    0.1
    * Initial release

    Known issues
    • In cp_gravelpit and similar maps, mp_maxrounds should be set to 4 to end the game when 2 pairs have been played (or to 2 if you want 2 separate demos when playing with ABBA rules)
    • The plugin assumes that SourceTV is connected to the server. There is NO check for this!
    • tv_autorecord 1 or manual interference with tv_record/tv_stoprecord will mess things up
    Other stuff

    As this is my first plugin, i would highly appreciate any comments you might have on the implementation. Also, if you have any suggestions for new features, lets hear them!

    If you need more advanced functionality, please consider this fork of the plugin.
    Attached Files
    File Type: sp Get Plugin or Get Source (matchrecorder.sp - 3811 views - 4.1 KB)

    Last edited by carbon; 09-27-2009 at 11:26. Reason: new version of the plugin
    carbon is offline
    Twisted_
    New Member
    Join Date: May 2009
    Old 05-19-2009 , 00:47   Re: [TF2] Match Recorder
    Reply With Quote #2

    I made a plugin to do the same thing however yours is much more effective, I made some changes for personal preferences that I had. Mainly to start a new server log file at the same time and close it at the end for stat parsing purposes, aswell as printing the demo name to the chat.

    Don't know if you want to add them in future versions or options to enable logging as not everyone would use it, but i'm sure alot of people will find this plugin really useful.

    Actually this might not be possible but you might have a better idea, would it be possible to have the filename of the demo it recorded printed at the end? mainly I want to have the direct link to the file printed to the chat.

    Last edited by Twisted_; 05-19-2009 at 01:55.
    Twisted_ is offline
    carbon
    Junior Member
    Join Date: May 2009
    Location: Tampere, Finland
    Old 05-19-2009 , 04:57   Re: [TF2] Match Recorder
    Reply With Quote #3

    Quote:
    Originally Posted by Twisted_ View Post
    Actually this might not be possible but you might have a better idea, would it be possible to have the filename of the demo it recorded printed at the end? mainly I want to have the direct link to the file printed to the chat.
    Yes I tried that, but I didn't see any advantage in printing the filename. As the demos are named YYYYMMDD-HHMM-map.dem (almost like with stv autorecord), the correct one should be easy to find. I also tried putting those changeable team names into the demo filename, but that turned out to be useless feature as almost no-one changed the default name (RED/BLU) to their real clan name.

    What I have planned for the next version, is the ability to move completed demos into some other directory for easy processing. For example, I dont have apache running on my game server so I want to download all the completed demos to some other server and make them available.

    Last edited by carbon; 05-19-2009 at 06:42. Reason: typo fix
    carbon is offline
    jasonfrog
    Senior Member
    Join Date: Mar 2008
    Old 05-19-2009 , 09:14   Re: [TF2] Match Recorder
    Reply With Quote #4

    This should sort the issue of "When players leave the server while the match is on, recording is not stopped immediately."

    Code:
    public OnMapStart()
    {
        CreateTimer(30.0, CheckPlayers, 0, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
    }
    
    
    public Action:CheckPlayers(Handle:timer, any:useless) {
        if (recording)
        {
            for(new i=1;i<=MaxClients;i++) {
                if(IsClientConnected(i) && !IsFakeClient(i)) {
                    return;
                }
            }
            StopRecording();
        }
    }

    It will stop recording within 30 seconds of the last person leaving.
    Attached Files
    File Type: sp Get Plugin or Get Source (matchrecorder.sp - 1362 views - 3.7 KB)
    jasonfrog is offline
    carbon
    Junior Member
    Join Date: May 2009
    Location: Tampere, Finland
    Old 05-19-2009 , 10:52   Re: [TF2] Match Recorder
    Reply With Quote #5

    Quote:
    Originally Posted by jasonfrog View Post
    This should sort the issue of "When players leave the server while the match is on, recording is not stopped immediately."
    Patch applied and switched to version 0.2. Thanks!
    carbon is offline
    Vader_666
    Member
    Join Date: Feb 2008
    Old 06-21-2009 , 08:00   Re: [TF2] Match Recorder
    Reply With Quote #6

    Is there a way to have the demo record with name like this ? :

    Team_Blu_Name-Team_Red_Name-timestamp-map.dem

    It will be very usefull
    Vader_666 is offline
    carbon
    Junior Member
    Join Date: May 2009
    Location: Tampere, Finland
    Old 06-21-2009 , 16:35   Re: [TF2] Match Recorder
    Reply With Quote #7

    Quote:
    Originally Posted by Vader_666 View Post
    Is there a way to have the demo record with name like this ? :

    Team_Blu_Name-Team_Red_Name-timestamp-map.dem

    It will be very usefull
    Yeah I experimented with that, but it turned out to be useless since almost no-one changed the default team name (or if they changed, it was to something like ":-D"). It's still possible to implement it by modifying TeamStateEvent function to track the name changes. The event structure holds the newname field.
    carbon is offline
    Molo
    Junior Member
    Join Date: Jul 2009
    Old 07-25-2009 , 16:02   Re: [TF2] Match Recorder
    Reply With Quote #8

    Very nice idea to do this plugin, many thanks for that!
    Quote:
    It's still possible to implement it by modifying TeamStateEvent function to track the name changes. The event structure holds the newname field.
    Can't you write piece of code to do this thing? I don't know how, but i need it, ty again
    Molo is offline
    CloudHO
    New Member
    Join Date: Jul 2009
    Old 07-26-2009 , 06:34   Re: [TF2] Match Recorder
    Reply With Quote #9

    Been having a read, great plugin, but the idea Twisted had of recording a new log file and ending it at the same time as the demo, would be VERY useful, would it be possible to implement?

    Also, if I manually run mp_tournament_restart, will it stop the demo?
    CloudHO is offline
    Molo
    Junior Member
    Join Date: Jul 2009
    Old 07-27-2009 , 01:05   Re: [TF2] Match Recorder
    Reply With Quote #10

    Yes, it will be stopped
    Molo is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 05:08.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode