livemaps

#17 - published lessthan a minute ago

Livemaps

This plugin was developed using Rocket Mod libraries for the Steam game Unturned. The Rocket Mod plugin collects server, player, and chat data recurrently, and then saves the retrieved data to a user-configured MySQL database. The API provides an AJAX interface for retrieving the latest JSON-encoded server data. Livemap API responses are then used to update the WebUI maps.

The WebUI portion of this plugin is optional, and is intended only as a default theme for this project. The API may be used independently to support fully custom livemap themes and features.

Livemap Loading

Current Source Code Release

How-to Install

There are three parts to this plugin:

  1. Rocket Mod Plugin (livemap.dll)
  2. API – how the WebUI gets updates from the server
  3. WebUI – the website files

Rocket Mod Plugin

  1. Copy the compiled Livemap.dll to your Rocket Mod plugin directory
  2. Start/stop your server to generate Livemap.configuration.xml
  3. Edit Livemap.configuration.xml and configure MySQL database settings
  4. Add a Rocket Mod permission for the /livemap command by adding it to your Permissions.config.xml
    1. Example<Permission Cooldown="0">livemap</Permission>
  5. Start Unturned Server

Web Interface (WebUI)

  1. Copy the complete contents of the www folder to your web server.

API

  1. Edit www/api/config.api.php and configure your MySQL database settings
    1. Note: For standalone API usage, copy only the www/api folder to your web server

How to View Livemaps

  1. For a complete list of all active servers currently running the Livemap plugin, navigate your browser to the www/ directory you’ve added previously.
    1. Example: http://nexisrealms.com/www/
  2. Show a specific Livemap by passing your server instance name to the id URL parameter
    1. Example: http://nexisrealms.com/www/?id=pei, http://nexisrealms.com/www/?id=server01,  etc.

Live development Demo

Permissions

The following command is used by players to hide their location on the Livemaps. Hiding and cooldown duration settings are configurable via Livemap.configuration.xml.

  • <Permission Cooldown="0">livemap</Permission>

Requirements:

  • PHP 5.6.+
  • MySQL 5.6.5+
    • It is required to have a minimum MySQL version of 5.6.5 to use this plugin. This is to support the use of tables with multiple timestamp fields.

Notes

  • Release #14: If you receive the following error, it is because: You Must Configure Livemap.configuration.xml with your MySQL database information FIRST 😉
  • Release #5: Fixed the download to include the www folder


author: Nexis (steam:iamtwidget) <nexis@nexisrealms.com>

Default configuration


<?xml version="1.0" encoding="utf-8"?>
<LivemapConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <LivemapEnabled>true</LivemapEnabled>
  <LivemapStatusEnabled>true</LivemapStatusEnabled>
  <LivemapRefreshInterval>10</LivemapRefreshInterval>
  <WorldChatEnabled>true</WorldChatEnabled>
  <PlayerHideEnabled>true</PlayerHideEnabled>
  <PlayerHideCooldownEnabled>true</PlayerHideCooldownEnabled>
  <PlayerHideDuration>300</PlayerHideDuration>
  <PlayerHideCooldownDuration>600</PlayerHideCooldownDuration>
  <PlayerDefaultSteamAvatar>images/avatars/unknown.png</PlayerDefaultSteamAvatar>
  <DatabaseHost>localhost</DatabaseHost>
  <DatabaseUser>unturned</DatabaseUser>
  <DatabasePass>password</DatabasePass>
  <DatabaseName>unturned</DatabaseName>
  <DatabasePort>3306</DatabasePort>
  <DatabaseTableLivemapServer>livemap_server</DatabaseTableLivemapServer>
  <DatabaseTableLivemapData>livemap_data</DatabaseTableLivemapData>
  <DatabaseTableLivemapChat>livemap_chat</DatabaseTableLivemapChat>
</LivemapConfiguration>

Default english translation


<?xml version="1.0" encoding="utf-8"?>
<Translations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Translation Id="livemap_command_usage" Value="Usage: Type: /livemap to toggle hiding yourself from the Livemap." />
  <Translation Id="livemap_hidden_disabled" Value="Livemap hiding is currently disabled! :(" />
  <Translation Id="livemap_hidden_true" Value="Your location is hidden on the Livemap for the next {0}!" />
  <Translation Id="livemap_hidden_false" Value="Your location is now visible to anyone on the Livemap!" />
  <Translation Id="livemap_hidden_cooldown" Value="You must wait {0} before you can hide your location on the Livemap again!" />
  <Translation Id="livemap_hidden_cooldown_end" Value="Livemap cooldown expired! You can hide your location again!!" />
  <Translation Id="livemap_hidden_cooldown_start" Value="Livemap hiding expired! You must wait {0} to hide again!" />
  <Translation Id="livemap_hidden_cooldown_remaining" Value="You must wait {0} before you can hide yourself on the Livemap again!" />
</Translations>

Commands and permissions


/livemap /livemap

Permissions: livemap

This command toggles hiding your character location from the website Livemap.


Git changelog


e50d3db9ca69340 2017-08-12 17:39:55

Added Options to Enable/Disable Livemaps

  • Added config option to enable/disabled a certain Livemap
  • Added config option to enabled/disable a certain status badge
  • Added update sql file to update existing databases from previous version
  • Updated Rocket Mode libraries

Download

Build #17
By downloading this file, you agree to our license terms.

Repository

github.com

License

MIT

Author

Nexis