Skip to content

Resources

Varion server logic is organized into resources. A resource can contain server code, client scripts, assets, streamed files or a native module integration.

Full field references live on their own pages:

  • resource.toml — every resource descriptor and stream.toml field (canonical source).
  • server.toml — every server configuration key.

This page covers structure and concepts only.

server-data Layout

text
server.toml
resources/
  mymode/
    resource.toml
    server/
    client/
cache/
data/
modules/
sdk/
include/

What a resource contains

  • resource.toml — the descriptor (see resource.toml).
  • Server entry (main) — only type = "js" is executed by the current server.
  • Client entry (client-main) and client-files — delivered to the client via the manifest.
  • stream.toml — streamed game files (see the canonical reference).

Resource Types

TypePurposeDocs
jsServer and/or client JavaScriptJavaScript
csharpServer C# (preview, not executed by the current server)C#
goServer Go (preview)Go
asset-packStatic files served over HTTPresource.toml
dlc / rpfStreamed game filesresource.toml

Only js (with a non-empty main) starts a server host, and the JS host auto-starts for those resources. You do NOT list them in server.tomlmodules — the modules/loadModules key has nothing to do with running JavaScript.

Selection and dependencies

  • server.tomlresources: an empty list loads EVERY subfolder of resourcesDir that has a resource.toml (resources with enabled = false are skipped). A non-empty list loads exactly those folders by exact name, in the given order. Wildcards (*, dir/*) are not expanded in this list.
  • Dependencies are declared in deps (alias dependencies) and published in the manifest, but the current loader does not reorder resources by them — order comes from the resources list.
  • Client permissions required-permissions / optional-permissions may appear in descriptors, but the current server does not parse them (reserved).

Resource config

js
// server
const cfg = varion.getResourceConfig();
// client
const cfg = varion.getResourceConfig('mymode');

Varion Multiplayer Platform