Skip to main content

Tunables

tunables.ready

Returns true if there are tunables available, false otherwise.

  • Return:

    TypeDescription
    booleanReturns true if tunables are available; otherwise, returns false.
  • Methods:

    • tunables.ready()

tunables.get_int

Allows specifying a request key, which can be either a tunable name or a tunable hash, and an optional default value.

  • Parameters:

    NameTypeDescription
    requeststringnumber
    defaultinteger?Optional default value to return if the tunable is not found.
  • Return:

    TypeDescription
    integerReturns the integer value of the tunable if found; otherwise, returns the default value or 0 if no default is provided.
  • Methods:

    • tunables.get_int(request, default)

tunables.get_float

Allows specifying a request key, which can be either a tunable name or a tunable hash, and an optional default value.

  • Parameters:

    NameTypeDescription
    requeststringnumber
    defaultnumber?Optional default value to return if the tunable is not found.
  • Return:

    TypeDescription
    numberReturns the float value of the tunable if found; otherwise, returns the default value or 0.0 if no default is provided.
  • Methods:

    • tunables.get_float(request, default)

tunables.get_bool

Allows specifying a request key, which can be either a tunable name or a tunable hash, and an optional default value.

  • Parameters:

    NameTypeDescription
    requeststringnumber
    defaultboolean?Optional default value to return if the tunable is not found.
  • Return:

    TypeDescription
    booleanReturns the boolean value of the tunable if found (true if non-zero); otherwise, returns the default value or false if no default is provided.
  • Methods:

    • tunables.get_bool(request, default)

tunables.set_int

Allows specifying a request key, which can be either a tunable name or a tunable hash, and the value to set.

  • Parameters:

    NameTypeDescription
    requeststringnumber
    valueintegerThe integer value to set for the tunable.
  • Return:

    TypeDescription
    booleanReturns true if the value was successfully set; otherwise, returns false.
  • Methods:

    • tunables.set_int(request, value)

tunables.set_float

Allows specifying a request key, which can be either a tunable name or a tunable hash, and the value to set.

  • Parameters:

    NameTypeDescription
    requeststringnumber
    valuenumberThe float value to set for the tunable.
  • Return:

    TypeDescription
    booleanReturns true if the value was successfully set; otherwise, returns false.
  • Methods:

    • tunables.set_float(request, value)

tunables.set_bool

Allows specifying a request key, which can be either a tunable name or a tunable hash, and the value to set.

  • Parameters:

    NameTypeDescription
    requeststringnumber
    valuebooleanThe boolean value to set for the tunable.
  • Return:

    TypeDescription
    booleanReturns true if the value was successfully set; otherwise, returns false.
  • Methods:

    • tunables.set_bool(request, value)

tunables.get_all

Each entry in the table maps a hash key to its corresponding offset.

  • Return:

    TypeDescription
    tableReturns a table where each key is a hash and the value is the corresponding offset.
  • Methods:

    • tunables.get_all()

tunable

If the specified key does not match any tunable, returns nil.

  • Parameters:

    NameTypeDescription
    requeststringnumber
  • Return:

    TypeDescription
    ScrVarnil
  • Methods:

    • tunable(request)