Skip to content

Post Install Guide

Zach Toogood edited this page Aug 5, 2022 · 8 revisions

== Executing a MySQL Query == Linux and Windows users with MySQL in their PATH can execute a query from the terminal using the following format:

mysql -u xi -ppassword xidb -e "QUERY"

Where xi, password, xidb, and QUERY are changed to your needs. Windows users can also use the query tab in HeidiSQL (default keybind is ctrl+t).

== Making a Game Master Character == After creating your first character you'll want to make it a GM by executing the following MySQL query, replacing Name with your character name:

UPDATE chars SET gmlevel = 4 WHERE charname = "Name";

Available commands are [https://github.com/LandSandBoat/server/tree/release/scripts/commands found in the scripts/commands/ folder], and a description of each command can be found at the top of the script. Commands can be used in-game using the script name with a preceding !, and removing .lua. For example, promote.lua is ran in game using !promote. This is the command you would use to make additional GMs.

== Changing Game Settings == Various details about the game can be changed via editing the settings files. Some settings are located in server/conf/map.conf and require a server reboot to apply. Other settings are found in server/scripts/globals/settings.lua and only require a GM command to reload, !reloadglobal settings (although some settings still require a reboot for full effect). Other files in the server/scripts/globals/ folder can be changed in the same way.

== Changing the Server IP Address == To make the server accessible over a network, the zoneip must be changed in the zone_settings table. You can do this with a simple MySQL query.

UPDATE zone_settings SET zoneip = 'IP';

Replace IP with the desired IP. To access the game only on the same machine, this should be 127.0.0.1. If you're accessing the server from another machine on the network, it should be the local IP address of the host, e.g. 192.168.0.11. If you want to access it over the internet, it needs to be your public IP which can be gathered from various websites such as https://www.whatismyip.com/.

;Note :zone_settings is not a protected table, so this change can be overwritten during an update. It is recommended to save this query in a .sql file in server/sql/backups/ then import it after an update. See [Database-Management#making-persistent-changes Database Management].

=== Port Forwarding === Make sure you have the following ports forwarded by your router and open in any firewall software if accessing the server over a network:

TCP ports: 54230, 54231, 54001, 54002
UDP port: 54230

== Database Management == By default, dbtool will backup your whole database into server/sql/backups/ whenever it performs an update. You can turn this off and do manual backups either with the TUI, or by running python3 dbtool.py backup (Windows: py -3 dbtool.py backup). You can create a backup of only sensitive player data by using python3 dbtool.py backup lite (Windows: py -3 dbtool.py backup lite). The tables it backs up with the lite argument are defined in server/tools/config.yaml (created automatically by dbtool the first time you run it). The backups can be imported using the Restore/Import command in dbtool.

== See Also == [Miscellaneous-(Server) Common Issues and Tweaks]

[Useful-SQL-queries Useful SQL Queries]

[Database-Management Database Management]

[Debugging Debugging]

Clone this wiki locally