Startup Config File: Difference between revisions

From Resonite Wiki
No edit summary
No edit summary
Line 32: Line 32:
| lnlConfig || See [[#LNL Config]]
| lnlConfig || See [[#LNL Config]]
|}
|}
=== LNL Config ===
The <code>lnlConfig<code> item allows you to specify additional configuration options that specifically affect [[LNL]].
==== Ports ====
Currently there is only one property <code>ports</code>. Ports allows you to specify the minimum and maximum port number that can be used by [[LNL]].
For example:
<syntaxhighlight lang="json">
...
"ports": {
    "min": 3000,
    "max": 3100
}
...
</syntaxhighlight>
Would restrict [[LNL]] to use ports from 3000 to 3100. Both Minimum and Maximum are '''inclusive'', which means that in the above example the first port to be allocated to an [[LNL]] connection would be 3001 and the last port allocated would be 3100.
If Resonite gets to the end of the available port range, it will also try the default behaviour(if this option was not defined) which is to allow the operating system to select a port itself. This is a last resort designed to allow a session to continue to proceed even if it might not be able to be connected to by another user.
We recommend that the number of ports covered by your range is at least 10, just in-case.
However, to aid you in determining a suitable number of ports for the range, keep in mind the following:
# Each session you host consumes a Port.
#* So if you load the Local and Cloud Home, you have already used 2.
#* The Local home is included because it is possible to open this world up to other users
# Each session you join consumes a Port.
So in the event that you open Resonite with default settings to join a friend then you'd need a total of 3 ports in the range. Then add 1 to the length of this range for every additional session you wish to join.
'''Closing a session, will free up the port that was used.'''


== Sample File ==
== Sample File ==

Revision as of 03:26, 11 July 2024

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


When launching Resonite, you can use a configuration file to edit some advanced features and settings that will control your Resonite session.

Usage

To use a config file you have two options.

Using the default Config file

If a file exists in the same directory as the main Resonite executeable(Resonite.exe), that is named "Config.json", it will be used.

Using a custom Config file

Start Resonite with the -EngineConfig command line argument. Following the argument enter a space and then the file path to your config file. Example: -EngineConfig "C:\Cheese\cheese.json"

Configuration Properties

Property Description
noUI Identical to the -NoUI command line flag, hides any user space UI.
inputs allows you to tweak trigger dead zones and axis dead zones
universeId Specifies the UniverseId for this session
disableDesktop completely disabling the Desktop functionality in Resonite
unsafeModeWhiteList TODO
autoStartWorlds Identical to the "startWorlds" parameter of a headless session configuration
proxy Specifies a Proxy Server for Resonite to use, see Proxy Support for full details.
lnlConfig See #LNL Config

LNL Config

The lnlConfig item allows you to specify additional configuration options that specifically affect LNL.

Ports

Currently there is only one property ports. Ports allows you to specify the minimum and maximum port number that can be used by LNL.

For example:

...
"ports": {
    "min": 3000,
    "max": 3100
}
...

Would restrict LNL to use ports from 3000 to 3100. Both Minimum and Maximum are 'inclusive, which means that in the above example the first port to be allocated to an LNL connection would be 3001 and the last port allocated would be 3100.

If Resonite gets to the end of the available port range, it will also try the default behaviour(if this option was not defined) which is to allow the operating system to select a port itself. This is a last resort designed to allow a session to continue to proceed even if it might not be able to be connected to by another user.

We recommend that the number of ports covered by your range is at least 10, just in-case.

However, to aid you in determining a suitable number of ports for the range, keep in mind the following:

  1. Each session you host consumes a Port.
    • So if you load the Local and Cloud Home, you have already used 2.
    • The Local home is included because it is possible to open this world up to other users
  2. Each session you join consumes a Port.

So in the event that you open Resonite with default settings to join a friend then you'd need a total of 3 ports in the range. Then add 1 to the length of this range for every additional session you wish to join.

Closing a session, will free up the port that was used.

Sample File

This is a sample file:

{
  "noUI": true,
  "disableDesktop": false,
  "inputs": {
    "triggerDeadZone": 0,
    "axisDeadZone": 0
  },
  "universeId": "cheese",
  "unsafeModeWhiteList":["a","b"],
  "autoStartWorlds": [
    {
      "sessionName": "The Cheese Dimension",
      "customSessionId": "cheese-dimension",
      "description": "Cheese for all!",
      "maxUsers": 32,
      "accessLevel": "Anyone",
      "hideFromPublicListing": false,
      "tags": ["cheese", "dimension"],
      "mobileFriendly": false,
      "loadWorldUrl": "resrec:///U-Cheese/R-c59ca2b2-2239-492d-98ee-b37cefbb6ba7",
      "loadWorldPresetName": "GridSpace",
      "forcePort": 4020,
      "keepOriginalRoles": true,
      "defaultUserRoles": {
        "CheeseLord": "Admin"
      },
      "awayKickMinutes": 5
    }
  ]
}

See Also