Server Manual

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (Blanked the page)
Line 1: Line 1:
__TOC__
 
<translate>
 
  
== Scripting Language ==
 
Squirrel is a high level imperative/OO programming language, designed to be a powerful scripting tool that fits in the size, memory bandwidth, and real-time requirements of applications like games. Squirrel is inspired by languages like Python, Javascript and especially Lua. Squirrel's syntax is similar to C/C++/Java etc. but the language has a very dynamic nature like Python/Lua.
 
 
Scripting in Liberty Unleashed uses a wide range of Squirrel's object-oriented features. Most internal data types have been exported to Squirrel via classes with their own methods and members which resemble the inner structures of LU and GTA. Events are the way LU discusses with scripts when something happens in the game. Many of these events can be manipulated using different return values.
 
 
All functions and events listed here will work with both Liberty Unleashed and Vice Unleashed unless stated otherwise. Some of them might require additional modules which are provided to you with the server package. Server-side scripting can be expanded further using the C/C++ module SDK and third party modules.
 
 
 
== Installing the server == <!--T:1-->
 
 
<!--T:2-->
 
Download the corrent server package for your operating system from the homepage [http://liberty-unleashed.co.uk/ http://liberty-unleashed.co.uk/]. This package includes the server binary, default Squirrel modules as well as basic configuration files and scripts. 3rd party modules and scripts can be downloaded from the [http://forum.liberty-unleashed.co.uk/index.php#6 scripting boards]. Copyrighted files such as GTA data files are not included with the server.
 
 
<!--T:3-->
 
* '''Windows server:''' Make sure that you have ''Updater.exe'' in your server root directory if you wish to use automatic updates.
 
* '''Linux server:''' Make sure that the server binary is executable (''chmod u+x Server.bin'').
 
 
 
== Configuring the server == <!--T:4-->
 
 
<!--T:5-->
 
A default file structure for a Liberty Unleashed server would look like this:
 
 
<!--T:6-->
 
* server.conf
 
* Logs/
 
* LU/
 
** LU/Anticheat.uac
 
** LU/content.xml
 
** LU/data/
 
*** LU/data/carcols.dat
 
*** LU/data/handling.cfg
 
*** LU/data/surface.dat
 
*** LU/data/weapon.dat
 
* Modules/
 
* Sounds/
 
* Scripts/
 
 
 
<!--T:7-->
 
''server.conf'' controls the core settings for your server. ''LU/'' is the main content folder for Liberty Unleashed, and ''content.xml'' controls the game-specific contents for your server. These are the main config files of your server.
 
 
 
=== server.conf === <!--T:8-->
 
 
<!--T:9-->
 
'''''server.conf''''' controls the game-independent configuration options of your server. These include for example the name of your server, the game your server is running, and many network related settings. A more detailed description of the file is available [[server.conf|here]].
 
 
 
=== content.xml === <!--T:10-->
 
 
<!--T:11-->
 
'''''content.xml''''' contains the main game-dependent content (such as vehicles, pickups, scripts). More detailed info about the file and modifying it, click [[content.xml|here]].
 
 
 
=== Unleashed Anticheat === <!--T:12-->
 
 
<!--T:13-->
 
Unleashed Anticheat allows you to add custom file checks for any client-side game data files. These filechecks are controlled by '''''Anticheat.uac''''', which is located in server content folder (''LU/'' for Liberty Unleashed). ''Anticheat.uac'' is a list of files located within ''data/'' folder, separated by line breaks. If UAC has been enabled, it will read the file list from ''Anticheat.uac'' and calculate checksums for the specified files. These checksums are then compared to the ones of every incoming client. This feature allows server owners to run servers for GTAIII / VC mods and total conversions without a fear that any of the clients who connect the server might not be using correct files for the mod.
 
 
 
=== GTA data files === <!--T:14-->
 
 
<!--T:15-->
 
It is possible to sync some of the core GTA data files (located in ''data/'') for all clients. These files are automatically loaded and shared to all clients when they are placed in ''LU/data'' folder:
 
 
 
<!--T:16-->
 
* [[carcols.dat|'''carcols.dat''']] - Defines the default colours used by GTA when spawning vehicles and sets allowed random colour IDs for every vehicle model.
 
* [[handling.cfg|'''handling.cfg''']] - Vehicle handling settings. Controls many performance and behaviour values for each vehicle model.
 
* [[surface.dat|'''surface.dat''']] - Controls traction values for different surface types.
 
* [[weapon.dat|'''weapon.dat''']] - Settings for weapons. Defines weapon properties like caused damage, fire rate etc.
 
 
 
<!--T:17-->
 
For more information about each file and the values they control, click on the file name. Most data within these files can also be changed run-time via scripts.
 
 
 
== Squirrel scripts == <!--T:18-->
 
 
 
=== Squirrel modules === <!--T:19-->
 
 
 
<!--T:20-->
 
You can extend the server-side scripting using official or 3rd party [[Modules|Squirrel modules]]. These modules should be located within the ''Modules/'' folder. There they can be loaded by individual scripts using the built-in function [[Squirrel/Server/Functions/Scripts/LoadModule|LoadModule]].
 
 
 
=== Custom files === <!--T:21-->
 
 
<!--T:22-->
 
A set of custom sounds and images can be loaded on server start for scripts to use. These files will be downloaded by the client upon connect. Custom files, such as modules, are controlled by scripts.
 
 
 
== Running the server == <!--T:23-->
 
 
 
=== Windows === <!--T:24-->
 
 
 
<!--T:25-->
 
After you have configured the server and uploaded scripts and files, as well as made sure Updater.exe exists in the server root directory, just run Server.exe.
 
 
 
=== Linux === <!--T:26-->
 
 
<!--T:27-->
 
After you have configured the server and uploaded scripts and files, as well as made sure the server has correct permissions, just execute Server.bin: ''./Server.bin''<br>
 
'''NOTES:''' If you are connected to server via SSH, use [http://www.gnu.org/software/screen/ GNU Screen] for run server in the background.
 
 
 
=== Command line arguments === <!--T:28-->
 
 
 
<!--T:29-->
 
When launching the server it is possible to pass some optional launch arguments:
 
 
 
<!--T:30-->
 
* '''-noinput''' - Does not print messages to the server console.
 
* '''-maxplayers''' ''<players>'' - Forces the max player count. When used the max player count can't be set over this value using the config file or scripting functions.
 
* '''-port''' ''<port>'' - Forces the port to listen on the one specified, ignoring the one set in the configuration file.
 
* '''-bindip''' ''<IP>'' - Binds the server to the specified IP.
 
* '''-appendname''' ''<string>'' - Adds the specified string on the end of the server name. E.g. -appendname "[Host: VRocker-Hosting.co.uk]".
 
* If there are other arguments than the ones mentioned above, the first one will be the server config file. This allows you to run multiple servers with different configs using the same binary and script files.
 
 
 
=== Server commands === <!--T:31-->
 
 
 
<!--T:32-->
 
You can control your server by typing commands to the server console while it's running. Everything listed in [[server.conf|''server.conf'']] is a valid console command. In addition, a few extra commands can be used:
 
 
 
<!--T:33-->
 
* '''say''' ''<message>'' - Sends an admin message in-game.
 
* '''quit''' - Shuts down the server.
 
* '''load_script''' ''<script folder>'' - Loads a script folder located in ''Scripts/''.
 
* '''unload_script''' ''<script folder>'' - Unloads a script folder located in ''Scripts/''.
 
* '''reload_scripts''' - Reloads all scripts loaded from ''content.xml''.
 
* '''reload_content''' - Reloads ''content.xml''.
 
* '''checkupdates''' - Checks if there are any updates for the server.
 
</translate>
 
<br/>
 
<languages/>
 

Revision as of 23:02, 25 January 2017

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox