No announcement yet.

How to test hitreg in ns2

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to test hitreg in ns2

    This thread is meant to instruct you on how to correctly test hitreg in ns2.

    We now have new tools we can all use to objectively test hitreg. The game now has a console command called "hitreg" that outputs data about how and if you hit your target.
    Here is an example of the hitreg output from my log file with both a no reg and then a false positive against a fade.
    Client  : 1068.079224 : Hitreg: No data for key '32083-1' found
    Client  : 1068.311157 : 32090-1: Diff found for attack on Fade-1899 (physTime 1068.211): 
       srv.trace_fraction:             0.071534
       cli.trace_fraction:            0.0097454
       srv.trace_start.y:              -1.3020
       cli.trace_start.y:              -1.2316
       srv.trace_end.y:               4.8236
       cli.trace_end.y:               4.8941
    Client  : 1068.375366 : 32092-1: Diff found for attack on Fade-1899 (physTime 1068.275): 
       srv.hit:                false
       cli.hit:                 true
       srv.trace_fraction:              0.94083
       cli.trace_fraction:              0.42324
       srv.trace_start.y:              -1.3020
       cli.trace_start.y:              -1.0717
       srv.trace_start.x:              17.8133
       cli.trace_start.x:              17.8006
       srv.trace_start.z:            -142.8070
       cli.trace_start.z:            -142.8590
       srv.trace_end.y:              -0.0017
       cli.trace_end.y:               0.2286
       srv.trace_end.x:             116.9316
       cli.trace_end.x:             116.9189
       srv.trace_end.z:            -129.6209
       cli.trace_end.z:            -129.6728
    Client  : 1068.408203 : Hitreg: No data for key '32093-1' found
    Client  : 1068.408203 : Server data nil
    Client  : 1068.482910 : 32095-1: Diff found for attack on Fade-1899 (physTime 1068.383): 
       srv.hit:                 true
       cli.hit:                false
       srv.trace_fraction:            0.0073419
       cli.trace_fraction:              0.92640
       srv.trace_start.y:              -1.3020
       cli.trace_start.y:              -1.0808
       srv.trace_start.x:              17.8192
       cli.trace_start.x:              17.8297
       srv.trace_start.z:            -143.0782
       cli.trace_start.z:            -143.1285
       srv.trace_end.y:               4.3246
       cli.trace_end.y:               4.5459
       srv.trace_end.x:              83.3361
       cli.trace_end.x:              83.3466
       srv.trace_end.z:             -67.7398
       cli.trace_end.z:             -67.7901
    Client  : 1068.544800 : 32097-1: Diff found for attack on Fade-1899 (physTime 1068.445): 
       srv.trace_fraction:            0.0061197
       cli.trace_fraction:             0.013319
       srv.trace_start.y:              -1.3020
       cli.trace_start.y:              -1.1728
       srv.trace_start.z:            -143.2422
       cli.trace_start.z:            -143.2582
       srv.trace_end.y:               3.0647
       cli.trace_end.y:               3.1940
    Client  : 1068.581299 : Hitreg: No data for key '32098-1' found
    Client  : 1068.581299 : Server data nil
    Client  : 1068.649414 : 32100-1: no diffs found for attack on Fade-1899 (hit=false)
    Client  : 1068.707520 : 32102-1: no diffs found for attack on Fade-1899 (hit=false)
    Client  : 1068.742310 : Hitreg: No data for key '32103-1' found
    Client  : 1068.742310 : Server data nil
    Client  : 1068.816284 : 32105-1: no diffs found for attack on Fade-1899 (hit=false)
    Client  : 1068.880127 : 32107-1: no diffs found for attack on Fade-1899 (hit=false)
    Client  : 1068.913086 : Hitreg: No data for key '32108-1' found
    Client  : 1068.913086 : Server data nil
    retraced killed Nordic with Swipe

    How to use the hitreg command:
    The hitreg command can not be used on any server. It must first be enabled by a server admin. This means you will need to run your own server, or ask your favorite server admin to enable it for you.
    The server admin can enable hitreg to be turned on with the following console command. "sv_tests 1"
    Once a server admin has done that, a client can then type "hitreg" in console to begin recording data to the log.
    "sv_tests 1" and "hitreg" will need to be re-enabled after each map change.

    The client will see the following in his console confirming that hitreg has been turned on.
    Client  : 412.793579 : hitreg checking on, prec 2
    Server operators and admins, sv_tests should not be used for fun. It is similar to cheats, but instead of allowing anything it only allows a few debug tools to be turned on. Think before you turn on tests. The hitreg command does not give anyone an advantage, but it does dramatically increase the clients bandwidth usage. I would only allow a couple individual players to test hitreg at a time so that you do not stress the server.

    So now you have used the hitreg enabled. Look for "srv.hit" and "cli.hit" in your console or log to see if you actually had a hitreg issue.
    While viewing the log I typically press Control -> F and search for "srv.hit" to find the hitreg issues. Your log is found in your "C:\Users\YOURUSERNAME\AppData\Roaming\Natural Selection 2" folder. You may see a lot of "diffs found" but those are unimportant. There is not a hitreg issue unless there is a discrepancy between srv.hit" and "cli.hit" such that one is true and the other is false. I have two examples shown below.

    This is a no reg on a fade. The server (srv.hit) says it was a miss, and my client (cli.hit) says it was a hit.
    Client  : 1068.375366 : 32092-1: Diff found for attack on Fade-1899 (physTime 1068.275): 
       srv.hit:                false
       cli.hit:                 true
    This is a false positive on a fade. The server (srv.hit) says it was a hit, and my client (cli.hit) says it was a miss.
    Client  : 1068.482910 : 32095-1: Diff found for attack on Fade-1899 (physTime 1068.383): 
       srv.hit:                 true
       cli.hit:                false

    How to provide data to the developers about hitreg:
    The developers are looking for a video similar to this. (demonstrates one of the few remaining hitreg issues)(Video by Ironhorse)
    Or similar to this video I made showing the fade hitreg issues I have used in my examples above.

    As was done in the examples, you need to make a video with the following traits:
    • The video shows you getting a no reg or false positive.
    • Shortly after you get the no reg or false positive, the console in shown in the video. You can open up the console with the tilda "~" key which is right above the tab key.
    • Video must be high quality. The developers need to be able to see what was going on.
    • Video ideally would be 60 fps. This makes it easier for the developers to see what was happening.
    • Uploaded to a place the developers can access the video. Youtube works great because it allows 60fps videos.

    If you wanted to above and beyond in gathering data for hitreg, it would be nice if you provided the log along with the video. The developers do not need the whole log, but just posting a portion of it like the example I gave at the beginning of this post would be nice. If you post it here, please put a spoiler around it. You could also upload your log to and link it here. If you do not want to post your log publicly I would private message [MENTION=74534]IronHorse[/MENTION] at the UWE forums.

    It did not take me long at all to record and upload that video. Not counting time playing ns2, it probably takes me about 5 minutes to set up, edit, upload, and post a video like above.

    If you do not know how to record your gameplay, don't worry it is easy. There is a lot of free software available to use. I would start by reading this reddit guide to pc gamplay recording.
    I personally use the free softwares, Open Broadcaster with avidemux video editor. If you need any help recording your gameplay to capture hitreg feel free to ask.

    When all of that is done, post your video in this thread at the UWE forums
    Last edited by james888; 01-17-2016, 09:31 PM.

  • #2
    Re: How to test hitreg in ns2

    If someone contacts me via either Steam IM or game server admin chat while I'm on the game server, I'm happy to enable sv_tests for you quietly. I'll make sure it doesn't too often negatively impact server performance. Don't hesitate to ask. If you're trying to gather data you intend to share with UWE, I want to enable that.
    Steam Community? Add me. | Free Remote, Encrypted Backup

    Darkilla: In short, NS is pretty much really fast chess. With guns. Apophis: I haven't seen anyone say that SM's are better than non-SMs. Nordbomber: This is THE first server I've seen where either side can comeback from out of seemingly nowhere with the right teamwork. en4rcment: I have NEVER experienced the type of gameplay that I have found here. Nightly I am amazed at the personalities and gaming talent. Zephyr: Apophis is clearly a highly sophisticated self-aware AI construct that runs on a highly modified toaster oven in Wyzcrak's basement.


    • #3
      Bump because I also bumped the performance thread.




      TeamSpeak 3 Server


      Twitter Feed