fps-cap

#7 - published 2 years ago

FPS Cap

This plugin allows you to set a default TPS and to modify the server\’s max TPS on the fly.

Up to just a couple weeks ago, the unturned server had a TPS/FPS cap of 60, but it was removed for some reason, causing the server to use as much TPS as the cpu can allow, which would waste a lot of cpu cycles if the server didn\’t need it. Also from my experience having a TPS above 60 doesn\’t really have any positive affect for a server, as far as apparent lag on the server is concerned. This plugin also readds the TPS command that was removed from rocket in the 4.6 update.

Commands
  • tps – Shows the server\’s current TPS, when the server was started, and how long it has been running for.
  • limittps <0 or 10-…> – Changes the server\’s TPS on the fly, using 0 disables the cap. The alias for this command is ltps.
Permissions
  • tps – For the tps command.
  • limittps and/or ltps – Both are for the limittps command, the second is to use the alias of the command.
Config Options
  • defaultTPS 60 – Allows you to set the default tps that the server will run at when the plugin loads on start, the cap can be disabled by setting this to 0. For instance, if you only wanted the plugin for the TPS command and not the cap.

Default configuration


<?xml version="1.0" encoding="utf-8"?>
<FPSCapConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <defaultTPS>60</defaultTPS>
</FPSCapConfig>

Default english translation


<?xml version="1.0" encoding="utf-8"?>
<Translations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Translation Id="invalid_arg" Value="Invalid Arguments." />
  <Translation Id="tps_set" Value="Server TPS has been set to: {0} TPS." />
  <Translation Id="ltps_command_help" Value="&lt;TPS&gt; - Limits the server tps/fps to the value set in the command. 0 disables the TPS cap." />
  <Translation Id="tps_tps" Value="TPS: {0}" />
  <Translation Id="tps_running_since" Value="Running since: {0} UTC, running for: {1}" />
</Translations>

Commands and permissions


/tps

Permissions: tps

Shows the server's current TPS.


/limittps <TPS>

Permissions: limittps

Limits the server tps/fps to the value set in the command. 0 disables the TPS cap.


Git changelog


8d004577980fdd4 2017-01-20 18:06:49

libs

    18e1d9c1bd0ee0b 2016-10-07 23:54:04

    Update to compile with newer unity version.

      26fdf21c07f124d 2016-06-19 00:31:28

      Libs

        d4a44b644690206 2015-12-24 02:55:01

        Updated to work on Rocket 4.8.

          a5f43dafc448185 2015-07-31 23:39:08

          Fix for the LoadDefaults rocket update.

            26e9b8f2cfb0256 2015-07-28 22:28:23

            Added the TPS command to the plugin, to see what TPS the server is getting.

              1ad28ee3bdcf6a3 2015-07-27 22:59:56

              Small fix, since caller is no longer null when ran from the console.

                0d1b21494185a12 2015-07-27 18:42:17

                Update for Rocket v4.6

                  9a6485d68ccda93 2015-07-18 21:19:22

                  Added translations, and added a success message for the ltps command.

                    Download

                    Build #7
                    By downloading this file, you agree to our license terms.

                    Repository

                    github.com

                    License

                    MIT

                    Author

                    cartman-2000