ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]
:toc: left
:toclevels: 5

= Documentation

== Deployment

=== Installation

Clone the repository or download the master https://github.com/ImagicTheCat/vRP/archive/master.zip[archive] and copy the `vrp` directory to the resources folder. Add `vrp` to the loading resource list.

=== Configuration

WARNING: Only the files in the `cfg/` directory should be modified. 

There is one required file to configure before launching the server, `cfg/base.lua`, to setup the MySQL database credentials, but it also depends on the DB driver used.

There is a lot to configure in vRP, everyone can make his unique server. +
See the vRP documentation and configuration files, default stuff is here as an example.

==== Database

To run vRP, we also need to install a DB driver, it is a resource/extension used to communicate with a MySQL database.

NOTE: Some maintained DB drivers: https://github.com/ImagicTheCat/vRP-db-drivers +
`ghmattimysql` bridge is recommended.

DB drivers will register themselves with a specific name to use in `cfg/base.lua`. Since there is no guarantee about when the driver will be registered, all queries will be cached until that moment. 

NOTE: `[vRP] DB driver "driver_name" not initialized yet (X prepares cached, Y queries cached).` is not an error, but a warning that the driver is not registered yet and will stop being outputted if the driver is loaded (a message will also say that the driver is loaded).

==== VoIP

See link:dev/modules/audio.adoc[audio module].

=== Update

.A good way to update:
. use git to clone vRP to create your own version of it, checkout the wanted branch, create a branch from it
. create a symbolic link (or an update script) to `vrp/` in the fxserver resources directory
. (repeat) configure, commit your changes, stay updated with the vRP repository, solve conflicts

This way, you will know when config files should be updated and what exactly has been updated.

.A more primitive way to update:
. save your `cfg/` folder somewhere
. copy all new files in `vrp/`
. compare your old `cfg/` folder with the new one, fill the gaps
. replace the new `cfg/` folder with the old modified `cfg/` folder

== Developement

In-depth documentation, vRP concepts and API reference: developement link:dev/README.adoc[documentation].
