Skip to content

Understanding Client Data

Concept of Client Data

Client data refers to the game files extracted from the game client, including crucial elements such as mmaps, vmaps, and map data. This data is vital for the server to accurately replicate the game environment.

  • MMaps, short for Movement Maps, provide the emulator server with an understanding of the world that enables creature path-finding. They are organized into individual maps, which, in practice, prevent creatures from falling off the face of the world.

  • VMaps, short for Vertex Map Physics Info, are responsible for enabling creatures and units to determine line-of-sight and generate random movement patterns. This prevents them from using abilities through walls or randomly phasing through them.

  • Maps contain information about map tiles, such as height maps and liquid maps. This allows the emulator server to accurately represent the game world.

Extracting Client Data

Tip

This is an overview, if you are looking for a specific guide, navigate to the emulator project page

To extract client data, you can use the extractor tools in conjunction with a game client to analyze the game world and generate the necessary client data. Assuming you are in the directory containing the game client, you would open a terminal and run a one of the extractor images, using a command like this:

Warning

This is a mock (placeholder/example) command, and will not work!

docker run --rm -v .:/client -v ./client-data:/output thoriumlxc/placeholder-extractor

This command can be explained as:

  • docker run - Starts a new container (an isolated environment) from an image.
  • --rm - Automatically deletes the container after it finishes running.
  • -v .:/client - Shares the current folder (on your computer) with the container at the /client location.
  • -v ./client-data:/output - Shares the client-data folder (on your computer) with the container at the /output location. The extracted client data will be written here.
  • thoriumlxc/placeholder-extractor - Specifies the Docker image to use, which contains the software for extracting the client data.

Client Data in Docker

In Docker, client data can be stored in named volumes, simplifying management and transfer. This approach makes it easy to share the extracted data between different systems or Docker containers.

A named volume called map-data can be created by running the following command:

docker volume create map-data

This allows referencing all of the client data to a container using the name map-data. This can be done like so:

services:
  mangosd:
    image: cmangos-classic
    volumes:
      - map-data:/opt/mangos/storage/data:ro

volumes:
  map-data:
    external: true

You can load data from within a folder into a named volume by running the following command:

docker run --rm \
  -v map-data:/data \
  -v ./client-data:/input \
  alpine sh -c "cp -a /input/. /data"

This command can be explained as:

  • docker run - Starts a new container (an isolated environment) from an image.
  • --rm - Automatically deletes the container after it finishes running.
  • -v map-data:/data - Mounts a Docker-managed volume called "map-data" to the container's /data folder, that will load data in.
  • -v ./client-data:/input - Mounts a local folder named "client-data" (from your extracted set) into the container at /input, allowing file sharing between your computer and the container.
  • alpine - Specifies the Docker image to use; Alpine is a very lightweight Linux distribution.
  • sh -c "cp -a /input/. /data" - Runs a shell command inside the container that copies all files (and directories) from /input (your local folder) to /data (the Docker volume), preserving file properties.

In short, the command sets up a temporary container to transfer client data files from your local folder into a Docker volume, and then it cleans up the container automatically when done.

Client Data from Container Image

Alternatively, you may receive the extracted client data from as a self-extracting container image. This container image works by including a decompression program (7zip, unzip) along with compressed client data, which it can extract into named volumes.

These images may be downloaded using docker pull, or downloaded by other means and loaded into docker by running docker load < name-of-image.tar.

Info

ThoriumLXC does not make any images available with extracted client data.

Running one of these container images works like so:

docker run --rm -v map-data:/output client-data-extractor

These pre-extracted map data containers are not typically available for download on container registries. You are more likely to find them as .tar.gz files downloaded from other sources or created for backup purposes, which you can load into your Docker service like this:

docker load < cmangos-classic-map-data.tar.gz
docker volume create map-data
docker run --rm -v map-data:/output cmangos-classic-map-data