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

[L4D2] Movement Reader


Post New Thread Reply   
 
Thread Tools Display Modes
Author
n491
Junior Member
Join Date: Sep 2015
Plugin ID:
6194
Plugin Version:
1.5.21
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Records and playbacks player's movement.
    Old 07-14-2018 , 21:52   [L4D2] Movement Reader
    Reply With Quote #1

    Records and playbacks player's movement. May be useful for scripted or TAS speedruns. Recorded movement will be saved in this "Path_SM/plugins/disabled/movements/default.txt" directory, in format "buttons:pitch:yaw:weapon:origin:velocity:flag". Note that, plugin works with movements named as "default*.txt" and will overwrite it in case of a new record (file is temporary). Always re-name a successful movement to avoid losing progress.

    Installation
    Make sure, that you put signatures to SourceMod folder (sourcemod/gamedata/st_signs.txt) before use; or download Speedrunner Tools Full Pack for convenience, the archive contains all useful speedrun-related stuff and includes STFP for 2.1.5.5 and other pre-TLS old game versions as well.

    Commands
    • stmr – Show Movement Reader menu.
    • stmr2 – Show Movement Reader advanced menu.

    • st_mr_stop – Stop any record/playback.
    • st_mr_get_frame – Get current playback frame from the file for debugging.
    • st_mr_goto – Move to specific line during playback (usage: st_mr_goto 150 "filename"). Specify only line to manage current playback.
    • st_mr_tracker – Draw the movement path with info to console.
    • st_mr_tracker_clear – Clear the movement path.
    • st_mr_save – Creates a copy of "default.txt" movement and overrides "quicksave.txt" with it. Hold SHIFT+R in menu to load the last save.

    ConVars
    • st_mr_record – Specify client index to record (def. "0").
    • st_mr_play – Specify client index to playback (def. "0").
    • st_mr_split – Specify client index to split his playback and record new one (def. "0").
    • st_mr_force_file – Force custom file name to playback (def. "default").
    • st_mr_no_teleport – Prohibit teleportation before playback (def. "0").
    • st_mr_stop_player – Stop any record/playback for a specific player (def. "0").
    • st_mr_exrec – Allow record position and velocity vectors (def. "1").
    • st_mr_explay – Allow playback position and velocity vectors (def. "1").
    • st_mr_debug – Enable debug mode (def. "0").
    • st_mr_ffa – Activate the free-for-all mode, which allows each player to playback their own default movement (def. "1").
    • st_mr_allow_record_idle – Allow IDLE bits recording (def. "1").
    • st_mr_allow_free_angle – Allow record and playback with free angle (for debugging only) (def. "0").
    • st_mr_allow_host_inputs – Allow sending client inputs to the host console (def. "0").
    • st_mr_allow_playback_special_helpers – Allow special helpers while using Play option. Such as: timer reset and removing all infected (def. "1").
    • st_mr_tweak_delay – Set the delay time before record/split (def. "1.2").
    • st_mr_tweak_timescale – Set the timescale value after record/split (def. "0.25").
    • st_mr_tracker_text_level – Specify how should we display the text (0 - off; 1 - only text; 2 - text with time delimiters) (def. "1").

    Hooks
    • OnPlayEnd called when movement playback was fully ended.
      Code:
      void OnPlayEnd(int client, const char[] name) //SourceMod
      ::OnPlayEnd <- function(hPlayer, sFileName) //VScript
    • OnPlayLine called on each movement file line.
      Code:
      void OnPlayLine(int client, const char[] name, int tick, int buttons) //SourceMod
      ::OnPlayLine <- function(hPlayer, sFileName, tick, buttons) //VScript
    Usage
    Operate with the plugin through the binds or menu. The way depends on the user's preferences.

    • Menu:
      Quite comfy, a single keybind. Perhaps, there are some chances to face limitations, unless the options are binded to the buttons directly. Also, it's recommended in conjunction with the menu to add at least a bind #3 that listed below, as it a very useful commands set.


      *Legacy Mode means, that exrec/explay features won't be used during record or playback.
      *Tracker option may draw the path not fully, tap it again where missing.


    • Binds:
      User may bind even more commands to the keyboard. For convenience, add them to the autoexec.cfg config file.

      1) Does split and slows the time.
      2) Toggles between normal and slow time.
      3) Frame-by-frame interaction toggler (very useful).
      4) Playbacks movement from specified frame and starts HUD timer.
      Code:
      bind "MOUSE4" "st_mr_split 1; host_timescale 0.25";
      bind "v" "toggle host_timescale 0.25 1; st_mr_get_frame";
      bind "0" "toggle host_timescale 0.01 0.25; st_mr_get_frame";
      bind "x" "nb_delete_all; host_timescale 1; say !dbg start; st_mr_goto 200";

    Links
    Download ST: http://steamcommunity.com/sharedfile.../?id=510955402
    Download Speedrunner Tools: https://forums.alliedmods.net/showthread.php?t=304789
    Download Auto Bunnyhop: https://forums.alliedmods.net/showthread.php?t=291999
    Download Auto Commonboost: https://forums.alliedmods.net/showthread.php?t=302498
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_amovement_reader.sp - 11 views - 66.8 KB)
    File Type: txt st_signs.txt (777 Bytes, 372 views)

    Last edited by n491; 03-30-2024 at 20:50. Reason: See the changelog inside script-file...
    n491 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 23:32.


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