; ==============================================================================
; Sample Server Configuration
; ==============================================================================

; Most important stuff is here.  If you're hosting your own server, you'll need to
; change SimulatorAddress to reflect the IP address or domain that is hosting the server.
; Change HTTPBaseFolder to locate where the CAR assets are distributed.
; Make sure all ports (RouterPort, SimulatorPort, HTTPListenPort) are available and open
; to the network/internet (may need port forwarding).

; The address which is advertised to clients via the 'router' service.  This address
; must be resolvable by clients and may either be a hostname or IP address. When blank
; the first public IP address that the simulator service is bound to is used. 
;SimulatorAddress=localhost

; The address to which the server will bind the simulator and router services. If left
; blank, all detected network interfaces will be used.
;BindAddress=1.2.3.4

;Protocol version should match the client
; 0.06a = 19 
; 0.06b = 20 
; 0.8.6 = 33    Maximum compatibility, the server was derived from this.
; 0.8.8 = 37    Last Sparkplay version.
; 0.8.9 = 38    Ikimonogatari/EER.

ProtocolVersion=33

; ==============================================================================
; Authentication
; ==============================================================================

AuthMode=1                 ; 0 = Two-factor (unsupported), 1 = admin (use this)
AuthKey=key                ; Salt to the client's password hash. Will break existing accounts if changed.

; ==============================================================================
; Simulator Configuration
; ==============================================================================

RouterPort=4242            ; Port to listen to router connections (login screen connect)
SimulatorPort=4300         ; Port to listen for simulator connections

; ==============================================================================
; HTTP Server Server configuration
; ==============================================================================

HTTPListenPort=8080        ; Port to listen to HTTP requests.  Set as zero to disable.

; Maximum number of connections waiting to be accepted by the server operating system. 
; Internally, this parameter is passed to the "listen" socket/system call.
HTTPBacklog=200

; Number of worker threads. CivetWeb handles each incoming connection in a separate thread. 
; Therefore, the value of this option is effectively the number of concurrent HTTP
; connections CivetWeb can handle.
HTTPThreads=50

; Maximum number of accepted connections waiting to be dispatched by a worker thread.
HTTPConnectionQueue=20

 ;Whether or not to serve CAR assets
HTTPServeAssets=1	

; Whether or not to validate the domain name in request
;HTTPAuthDomainCheck=1

; The domain name to check against if HTTPAuthDomainCheck is true. When blank
; the SimulatorAddress will be used. 
;HTTPAuthDomain=

; Whether to allow Legacy Accounts. I.e. those managed by using registration keys
;LegacyAccounts=1

; Authentication token for the administrative web panel and legacy API. The default token
; of '*' will prevent the Legacy API being used. YOU MUST SET YOUR OWN VERY STRONG
; TOKEN OF AT LEAST 10 CHARACTERS IN LENGTH.

;APIAuthenticationToken=*

; Directory Listing. Whether the web server should return directory listings for
; the resources it serves. Only recommended for development / debugging.
; DirectoryListing=1


; ==============================================================================
; Timers And Delays
; ==============================================================================

ThreadSleep=1              		; Sleep time for simulator and router threads
MainSleep=1                		; Sleep time for the main window thread
ErrorSleep=5000            		; Sleep time for some thread errors
RebroadcastDelay=18000     		; Milliseconds to wait between sending constant object updates
SceneryAutosaveTime=5000   		; Milliseconds between autosaving modified scenery pages
ForceUpdateTime=1500      		; Milliseconds after a character stops moving to force an exact position update
PartyPositionSendInterval=10000 ; Milliseconds between sending party positions
WarpMovementBlockTime=5000		; Milliseconds to block movement updates from the client after performing an explicit zone or position warp. 

; ==============================================================================
; Other Configuration
; ==============================================================================

; As of version 19, the item override can be either:
; -1 to ignore, 0 to clear all, 1 to clear bindonpickup, 2 to clear bindonequip
ItemBindingTypeOverride=2  ; Always use this value, or -1 for no override.
ItemArmorTypeOverride=-1    ; Always use this value, or -1 for no override.
ItemWeaponTypeOverride=-1   ; Always use this value, or -1 for no override.    
;ItemWeaponTypeOverride=8   ; Always use this value, or -1 for no override.    

MOTD_Name=Server
MOTD_Channel=*SysChat

ProperSceneryList=1          ; Use a proper scenery response (longer loading screens, but low chance of getting stuck in props as they're loading)

IdleCheckVerification=0
IdleCheckFrequency=1200000
IdleCheckDistance=50
IdleCheckCast=6
IdleCheckCastInterval=60000
IdleCheckDistanceTolerance=100
VerifyMovement=0
VerifySpeed=0

DebugPingServer=0
DebugPingClient=0
DebugPingFrequency=1000
DebugPingClientPollInterval=60
DebugPingServerLogThreshold=1000
DebugLogAIScriptUse=0

ForceMaxPacketSize=1000
SceneryAuditDelay=20000
SceneryAuditAllow=1

; The number of threads to assign for Redis connections
;RedisWorkers=10

; The number of threads to assign for scheduled game tasks (auction house and other timers)
;SchedulerThreads=4

; Sends heartbeat messages even during lobby to detect disconnects before gameplay stage.
; MODDED CLIENT REQUIRED
;UseLobbyHeartbeat=1    

; MODDED CLIENT REQUIRED
;UseIntegerHealth=1

; MODDED CLIENT REQUIRED
;UseMessageBox=1

; If UseMessageBox=0
;InvalidLoginMessage=Account not found.  Check username and password.

; If UseMessageBox=1
InvalidLoginMessage=<font size="24"><b>Account not found. Check your username and password.</b></font>

; MODDED CLIENT REQUIRED
;UseStopSwim=1

; If true, weather systems will be enabled - MODDED CLIENT REQUIRED -
;UseWeather=1

; Whether or not to enable user agent protection. When enabled, HTTP access for most paths are
; only allowed by clients that use the Sparkplayer user agent string ['ire3d(VERSION)' or 'EETAW']. Enabled by default 
;UseUserAgentProtection=1

; A script to execute when the server has crashed
ShutdownHandlerScript=

; ==============================================================================
; Location of data files and assets
;==============================================================================

; For the HTTP server, this is the base folder that contains files that can
; be served over HTTP (such as web control panel, password reset etc). 
HTTPBaseFolder=/usr/share/tawd/Web

; Fot the HTTP server, this is the folder that contains the Client Assets that can
; be server over HTTP (CAR files). For example, if the client requests the following file:
;     /Release/Current/EarthEternal.car
; And HTTPCARFolder is set to this exact path:
;     /EarthEternal/ClientAssets
; Then this file must exist in the exact path:
;     /EarthEternal/ClientAssets/Release/Current/EarthEternal.car 
HTTPCARFolder=/usr/share/tawd

; The address to advertise as this nodes HTTP base URL. When not supplied, will be
; derived from the simulator address (and this node will have to be server assets)
;HTTPAddress=http://myserver:8080/Release/Current

; The location of static data files. These are files that do not change during at all
; during the run time of the server.
StaticDataPath=/usr/share/tawd/Static

; The location of variable data files. These are files that are not changed during the
; normal running of the server, but may change when admin or developer tools are used.
; Includes things such as Scenery and Credit Shop
VariableDataPath=/var/lib/tawd/Variable

; The location of variable temporary data files. These are files that may change or be created 
; on this cluster node only. The contents of this directory may safely be deleted while the
; server is shutdown.
TmpDataPath=/tmp

; The location of ancilliary log files. NOTE, this does not including the primary 
; logs, it mainly is used for locations of logs of 3rd party components such as 
; Civet web logs. 
LogPath=/var/log/tawd/Server

; API authentication. The secret to use for HTTP API requests. Please use a VERY strong
; secret. The secret shoud be in the format username:password where either can be any
; string with any characters except for ':'.
;
; Commenting out this item prevents the API from being used (the default).
;APIAuthentication=apiuser:apisecret

; The URL that supplies the website integration API. This server will send messages
; to this URL for various reasons, such as  authentication, sending private messages
; etc
;ServiceAuthURL=http://www.yourserver.com/rest

; The GitHub token for posting in-game bug reports
;GitHubToken=XXXXXXXXXXXXXXXXXXXXXXXXXXX

; The exit status to use to signal a restart is required. Defaults to 1. 
;RestartExitStatus=1
