Difference between revisions of "Headless Client/Server/cs"

From Neos Wiki
Jump to navigation Jump to search
(Created page with "Headless klienti jsou verze Neosu postrádající grafické uživatelské rozhraní, což jim umožňuje běžet efektivně ve scénářích kde není potřeba renderovat (ja...")
(Updating to match new version of source page)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
<div style="font-size:4em;">This file is under deprecation please see [[Headless Client]] for the new file</div>
 +
 +
 
<languages/>
 
<languages/>
 
Headless klienti jsou verze Neosu postrádající grafické uživatelské rozhraní, což jim umožňuje běžet efektivně ve scénářích  kde není potřeba renderovat (jako například při použití jako server). Uživatelé '''Neos Pro''' a patroni třídy a výše mají přístup k headless klientu. Podívejte se na piny v kanálu '''#headless-client''' v [https://discord.com/invite/neosvr Neos Discord serveru], nebo kontaktujte Neos administrátora pro získání vašeho kódu.
 
Headless klienti jsou verze Neosu postrádající grafické uživatelské rozhraní, což jim umožňuje běžet efektivně ve scénářích  kde není potřeba renderovat (jako například při použití jako server). Uživatelé '''Neos Pro''' a patroni třídy a výše mají přístup k headless klientu. Podívejte se na piny v kanálu '''#headless-client''' v [https://discord.com/invite/neosvr Neos Discord serveru], nebo kontaktujte Neos administrátora pro získání vašeho kódu.
  
== Installation ==
+
== Instalace ==
 
 
=== Method 1 ===
 
If using Steam:
 
* Go to Steam, open Neos Properties, and go to the Betas tab
 
* Use your code to activate the beta branch
 
* Switch to the headless-client branch
 
  
 +
=== Metoda 1 ===
 +
Pomocí Steamu:
 +
* Jděte do Steamu, otevřete vlastnosti Neosu a přejděte na záložku Beta verze
 +
* Použijte váš kód pro aktivaci beta větve
 +
* Přepněte na větev headless-client
  
=== Method 2 ===
+
=== Metoda 2 ===
If using SteamCMD:
+
Pomocí SteamCMD:
* Paste the following command into SteamCMD:
+
* Vložte následující příkaz do SteamCMD:
 
* <code>app_update 740250 -beta headless-client -betapassword your_code</code>
 
* <code>app_update 740250 -beta headless-client -betapassword your_code</code>
  
== Configuration ==
+
<div class="mw-translate-fuzzy">
After Steam finishes the update, open the [https://steamcommunity.com/sharedfiles/filedetails/?id=760447682 installation folder]. You can find the headless client in the "Headless Client" subfolder. You can use the Config/DefaultConfig.json file to configure a startup world or to have the server login into an account (please don't use your main Neos account). Here's a sample configuration you can use and modify:
+
== Konfigurace ==
 +
Potom co Steam dokončí aktualizaci, otevřte  [https://steamcommunity.com/sharedfiles/filedetails/?id=760447682 instalační složku]. Headless klient najdete v podsložce '''Headless Client'''. Můžete použít soubor Config/DefaultConfig.json pro konfiguraci světa po spuštění nebo pro přihlášení serveru do účtu (prosíme, nepoužívejte váš hlavní Neos účet). Zde je ukázková modifikace, kterou můžete použít a modifikovat:
 
  {
 
  {
 
   "comment": "",
 
   "comment": "",
Line 63: Line 66:
 
   "metamovieRoles": null
 
   "metamovieRoles": null
 
  }
 
  }
 +
</div>
  
* The <code>loadWorldPresetName</code> attribute loads a world based on Neos world templates. The available templates are "SpaceWorld", "Basic Empty", "GridSpace", "Microworld", "Testing Scaling", "ScratchSpace", "ScratchSpace (mobile)", "Instancing Test", "Physical Locomotion Test" and "UIX Test".
+
<div class="mw-translate-fuzzy">
 +
* Atribut <code>loadWorldPresetName</code> načte svět založený na šabloně Neos světa. Dostupné šablony jsou "SpaceWorld", "Basic Empty", "GridSpace", "Microworld", "Testing Scaling", "ScratchSpace", "ScratchSpace (mobile)", "Instancing Test", "Physical Locomotion Test" a "UIX Test".
 +
</div>
 +
 
 +
<div class="mw-translate-fuzzy">
 +
* Atribut <code>"defaultUserRoles"</code> definuje uživatele a přístupovou úroveň pro svět. Formát je "USERNAME": "ROLE". Dostupné role jsou "Admin", "Builder", "Moderator", "Guest", and "Spectator".
 +
* Spusťte spustitelný soubor pro spuštění klienta.
 +
</div>
 +
 
 +
* The <code>"loginCredential"</code> attribute defines the Neos account to run the server with. It is recommended to create a separate account to run the server as if you wish to join your own server - it is not possible to join a server running with the same account on the client and server.
 +
 
 +
* The <code>"customSessionId"</code> attribute accepts the following formatting: <code>S-[userID]:[anything]</code> where <code>[UserID]</code> is the userID of the account running the headless session, and <code>[anything]</code> is whatever you want to put
 +
 
 +
* Utilized for nested sessions, <code>"parentSessionIds"</code> is recommended to manually configure a custom session ID for parent worlds using the note above as without this, session IDs are dynamic. This allows for nested sessions that do not appear in the public headless server listing.
  
* The <code>"defaultUserRoles"</code> attribute defines the user and access level for the world. The format is "USERNAME": "ROLE". The roles are "Admin", "Builder", "Moderator", "Guest", and "Spectator".
 
 
*  Run the executable to start the client.
 
*  Run the executable to start the client.
  
== Configuration for a Local or Cloud World Save ==
+
== Konfigurace pro Lokální nebo Cloudové uložení světa ==
To configure a Headless client to act as a local storage server, set your world to <code>"saveAsOwner" : "LocalMachine"</code> (will be replaced after first execution with it's unique <code>startWorldURL</code>) as well as <code>"saveOnExit" : true</code> and your desired <code>autoSaveInterval</code>.<br>
+
Ke konfiguraci Headless klienta pro funkci lokálního serveru uložiště, nastavte svět na <code>"saveAsOwner" : "LocalMachine"</code> (bude nahrazeno poprvním spuštění unikátní <code>startWorldURL</code>), <code>"saveOnExit" : true</code>, a váš požadovaný <code>autoSaveInterval</code>.<br>
If you want the world data saved to the cloud (a valid dedicated Neos account will be needed), set <code> "saveAsOwner" : "CloudUser"</code>. <br>
+
Pokud chcetet data světa uložit do cloudu (validní dedikovaný Neos účet bude potřeba), nastavte <code> "saveAsOwner" : "CloudUser"</code>. <br>
Please use the <code>shutdown</code> command to allow the server to save any unsaved changes on shutdown.
+
Prosíme používejte příkaz <code>shutdown</code> pro uložení všech neuložených změn při ukončení.
Config file example:
+
Ukázka konfiguračního souboru:
 
  {
 
  {
 
   "tickRate": 60.0,
 
   "tickRate": 60.0,
Line 99: Line 115:
 
  }
 
  }
  
== Commands ==
+
== Configration using Cloud Variables ==
See [[Headless Client/Commands|Headless Client Commands]] for a list of commands.
+
 
 +
For more details for Cloud Variables, see [[Cloud Variables]].
 +
 
 +
* The <code>roleCloudVariable</code> allows auto-assigning a role based on a cloud variable.
 +
** This lets you define a cloud variable and assign value to users to determine their role in given world.
 +
** The variable needs to be of type string. The value you assign equals the name of the role you want to grant to given user.
 +
** It is STRONGLY recommended to make sure you're using cloud variable that you can write into on behalf of other users (<code>definition_owner</code>), otherwise users might be able to assign themselves a high permission role.
 +
** If no value is set for given user, the usual method to determine default role is used
 +
 
 +
* The <code>allowUserCloudVariable</code> allows using cloud variable to always allow user into a session.
 +
** The cloud variable needs to be of type bool and set to true for given user.
 +
** This is equivalent of the user being sent an invite - they can join regardless of MaxUsers limit and even if the session is set to Private (they need to obtain).
 +
** Same recommendations as above apply, please make sure you use the right cloud variables that you have proper control over.
 +
 
 +
* The <code>denyUserCloudVariable</code> allows denying join access to users via a cloud variable.
 +
** This functions similarly to <code>allowUserCloudVariable</code>, except when the value for given user is true, they will be denied access
 +
** This always takes precedence over other variables
 +
 
 +
* The <code>requiredUserJoinCloudVariable</code> to world startup configuration, which requires a cloud variable to be set to true for given user so they can join
 +
** You can set a custom deny message via requiredUserJoinCloudVariableDenyMessage
 +
** If the variable isn't set to true for given user, they won't be allowed access
 +
** Setting the variable to true won't automatically grant access (unlike <code>allowUserCloudVariable</code>) and will still need to pass other rules - public access, session user limit and so on
 +
** <code>allowUserCloudVariable</code> takes precedence over this one, allowing to always allow given user access
 +
** This variable is useful for controlling access to a session, without bypassing the session max user limit and providing a custom message
 +
 
 +
== Příkazy ==
 +
Podívejte se na stránku [[Headless Client/Commands/cs|Příkazy Headless klienta]] pro seznam příkazů.

Latest revision as of 16:13, 1 December 2021

This file is under deprecation please see Headless Client for the new file


Other languages:
English • ‎français • ‎čeština • ‎日本語 • ‎한국어

Headless klienti jsou verze Neosu postrádající grafické uživatelské rozhraní, což jim umožňuje běžet efektivně ve scénářích kde není potřeba renderovat (jako například při použití jako server). Uživatelé Neos Pro a patroni třídy a výše mají přístup k headless klientu. Podívejte se na piny v kanálu #headless-client v Neos Discord serveru, nebo kontaktujte Neos administrátora pro získání vašeho kódu.

Instalace

Metoda 1

Pomocí Steamu:

  • Jděte do Steamu, otevřete vlastnosti Neosu a přejděte na záložku Beta verze
  • Použijte váš kód pro aktivaci beta větve
  • Přepněte na větev headless-client

Metoda 2

Pomocí SteamCMD:

  • Vložte následující příkaz do SteamCMD:
  • app_update 740250 -beta headless-client -betapassword your_code

Konfigurace

Potom co Steam dokončí aktualizaci, otevřte instalační složku. Headless klient najdete v podsložce Headless Client. Můžete použít soubor Config/DefaultConfig.json pro konfiguraci světa po spuštění nebo pro přihlášení serveru do účtu (prosíme, nepoužívejte váš hlavní Neos účet). Zde je ukázková modifikace, kterou můžete použít a modifikovat:

{
 "comment": "",
 "tickRate": 60.0,
 "maxConcurrentAssetTransfers": 4,
 "usernameOverride": null,
 "loginCredential": null,
 "loginPassword": null,
 "startWorlds": [
   {
     "isEnabled": true,
     "sessionName": "",
     "customSessionId": null,
     "description": null,
     "maxUsers": 12,
     "accessLevel": "Anyone",
     "hideFromPublicListing": false,
     "tags": [
       "test1",
     ],
     "mobileFriendly": false,
     "loadWorldURL": "",
     "saveAsOwner": null,
     "loadWorldPresetName": null,
     "forcePort": null,
     "keepOriginalRoles": false,
     "defaultUserRoles": {
       "User": "Admin"
     },
     "autoInviteUsernames": null,
     "autoInviteMessage": null,
     "autoRecover": true,
     "idleRestartInterval": -1.0,
     "forcedRestartInterval": -1.0,
     "saveOnExit": false,
     "autosaveInterval": -1.0,
     "awayKickMinutes": -1.0,
     "autoSleep": true
   }
 ],
 "dataFolder": null,
 "cacheFolder": null,
 "allowedUrlHosts": null,
 "autoSpawnItems": null,
 "metamovieRoles": null
}
  • Atribut loadWorldPresetName načte svět založený na šabloně Neos světa. Dostupné šablony jsou "SpaceWorld", "Basic Empty", "GridSpace", "Microworld", "Testing Scaling", "ScratchSpace", "ScratchSpace (mobile)", "Instancing Test", "Physical Locomotion Test" a "UIX Test".
  • Atribut "defaultUserRoles" definuje uživatele a přístupovou úroveň pro svět. Formát je "USERNAME": "ROLE". Dostupné role jsou "Admin", "Builder", "Moderator", "Guest", and "Spectator".
  • Spusťte spustitelný soubor pro spuštění klienta.
  • The "loginCredential" attribute defines the Neos account to run the server with. It is recommended to create a separate account to run the server as if you wish to join your own server - it is not possible to join a server running with the same account on the client and server.
  • The "customSessionId" attribute accepts the following formatting: S-[userID]:[anything] where [UserID] is the userID of the account running the headless session, and [anything] is whatever you want to put
  • Utilized for nested sessions, "parentSessionIds" is recommended to manually configure a custom session ID for parent worlds using the note above as without this, session IDs are dynamic. This allows for nested sessions that do not appear in the public headless server listing.
  • Run the executable to start the client.

Konfigurace pro Lokální nebo Cloudové uložení světa

Ke konfiguraci Headless klienta pro funkci lokálního serveru uložiště, nastavte svět na "saveAsOwner" : "LocalMachine" (bude nahrazeno poprvním spuštění unikátní startWorldURL), "saveOnExit" : true, a váš požadovaný autoSaveInterval.
Pokud chcetet data světa uložit do cloudu (validní dedikovaný Neos účet bude potřeba), nastavte "saveAsOwner" : "CloudUser".
Prosíme používejte příkaz shutdown pro uložení všech neuložených změn při ukončení. Ukázka konfiguračního souboru:

{
 "tickRate": 60.0,
 "usernameOverride": null,
 "loginCredential": null,
 "loginPassword": null,
 "startWorlds": [
   {
     "sessionName": "My World 1",
     "description": null,
     "maxUsers": 32,
     "accessLevel": "LAN",
     "tags": null,
     "mobileFriendly": false,
     "loadWorldPresetName": "BasicEmpty",
     "saveAsOwner" : "LocalMachine",
     "autoRecover": true,
     "saveOnExit" : true,
     "autoSaveInterval" : 240,
     "forcedRestartInterval": -1.0
   }
 ],
 "dataFolder": null,
 "cacheFolder": null
}

Configration using Cloud Variables

For more details for Cloud Variables, see Cloud Variables.

  • The roleCloudVariable allows auto-assigning a role based on a cloud variable.
    • This lets you define a cloud variable and assign value to users to determine their role in given world.
    • The variable needs to be of type string. The value you assign equals the name of the role you want to grant to given user.
    • It is STRONGLY recommended to make sure you're using cloud variable that you can write into on behalf of other users (definition_owner), otherwise users might be able to assign themselves a high permission role.
    • If no value is set for given user, the usual method to determine default role is used
  • The allowUserCloudVariable allows using cloud variable to always allow user into a session.
    • The cloud variable needs to be of type bool and set to true for given user.
    • This is equivalent of the user being sent an invite - they can join regardless of MaxUsers limit and even if the session is set to Private (they need to obtain).
    • Same recommendations as above apply, please make sure you use the right cloud variables that you have proper control over.
  • The denyUserCloudVariable allows denying join access to users via a cloud variable.
    • This functions similarly to allowUserCloudVariable, except when the value for given user is true, they will be denied access
    • This always takes precedence over other variables
  • The requiredUserJoinCloudVariable to world startup configuration, which requires a cloud variable to be set to true for given user so they can join
    • You can set a custom deny message via requiredUserJoinCloudVariableDenyMessage
    • If the variable isn't set to true for given user, they won't be allowed access
    • Setting the variable to true won't automatically grant access (unlike allowUserCloudVariable) and will still need to pass other rules - public access, session user limit and so on
    • allowUserCloudVariable takes precedence over this one, allowing to always allow given user access
    • This variable is useful for controlling access to a session, without bypassing the session max user limit and providing a custom message

Příkazy

Podívejte se na stránku Příkazy Headless klienta pro seznam příkazů.