Skip to content

Client Data

Tip

If you are looking to understand what Client Data is, navigate to the overview page.

Extracting Client Data

Client data is extracted from the game client and provided to the emulator server. To extract this data, you can use the extractor tools included in the container image, which analyzes the game client to generate the necessary data files for the emulator. Assuming you are in the folder containing the game client, open a terminal and run the following command:

docker run --rm -v .:/client -v ./client-data:/output ghcr.io/thoriumlxc/cmangos-tbc:extractor-2025.02.23
Extracting the data

extracting the data from the game client

This command can be explained as:

  • docker run - Starts a new container.
  • --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. This is the folder containing the game client.
  • -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.
  • ghcr.io/thoriumlxc/cmangos-tbc:2025.02.23 - Specifies the container image to use, which contains the software for extracting client data.

The extract files should look roughly like the following:

Tip

*.m2 means that the files in the folder are M2 files. Similar for *.wmo. The below is just to offer a rough idea of what kind of file extensions exist in that extracted folder. The number of files is an approximate.

.
├── MaNGOSExtractor.log
├── MaNGOSExtractor_detailed.log
├── Buildings
│   ├── *.m2
│   ├── *.wmo
│   ├── dir_bin
│   └── temp_gameobject_models
├── Cameras
│   ├── *.m2
│   └── *.m2
├── dbc
│   ├── *.dbc
│   └── *.dbc
├── maps
│   ├── *.map
│   └── *.map
├── mmaps
│   ├── *.mmap
│   ├── *.mmtile
│   └── *.mmtile
└── vmaps
    ├── *.vmtree
    ├── *.vmtile
    ├── *.wmo.vmo
    ├── *.m2.vmo
    ├── *.m2
    └── temp_gameobject_models

6 directories, 14610 files

Client Data in Docker

Client data can be stored in named volumes to simplify management. Named volumes act like shared folders you can reference by name, making it easy to extract data once without worrying about specific file paths when mounting the data for the servers. This is especially useful when frequently restarting or recreating the server.

You can create a named volume called cmangos-tbc-map-data by running the following command:

docker volume create cmangos-tbc-map-data

The extracted game client data can now be loaded into the named volume by running the following command:

docker run --rm -v cmangos-tbc-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.
  • --rm - Automatically deletes the container after it finishes running.
  • -v cmangos-tbc-map-data:/data - Shares the named volume cmangos-tbc-map-data with the container at the /data location. The extracted client data will be copied into this volume.
  • -v ./client-data:/input - Shares the current folder (on your computer) with the container at the /input location. This is the folder containing the extracted client data.
  • 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 extracted client data) to /data (the named volume), preserving file properties.

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

You can then reference this named volume (like a shared folder) called cmangos-tbc-map-data in a Docker Compose file. This will be expected by the default Docker Compose configuration files, which is done like this:

services:
  mangosd:
    image: ghcr.io/thoriumlxc/cmangos-tbc:2025.02.23
    volumes:
      # This uses the named volume 'cmangos-tbc-map-data', and makes it
      # available to the emulator server at the directory '/opt/mangos/storage/data'
      #
      # The :ro at the end means to only allow the emulator server to read from this
      # named volume. No writing allowed.
      - cmangos-tbc-map-data:/opt/mangos/storage/data:ro

volumes:
  # This tells Docker Compose that a named volume called 'cmangos-tbc-map-data'
  # is expected, but is created outside of this configuration file.
  cmangos-tbc-map-data:
    external: true

Client Data from Container Image

Danger

If you’re not familiar with Docker, this approach is discouraged.

Alternatively, you may receive already extracted client data in the form of a container image. This is a container image that when run will copy the client data files into a directory or named volume. This container works by running a decompression program (7zip, unzip), writing the extracted files to a specified directory.

These images may be downloaded using docker pull, or downloaded by other means and loaded into docker by running the command: docker load < cmangos-tbc-extracted-client-data.tar.

Running one of these container images to extract files to a named volume called cmangos-tbc-map-data works like so:

docker run --rm -v cmangos-tbc-map-data:/output cmangos-tbc-extracted-client-data
Tip

Alternatively you can extract these files to a folder on your machine, by running the modified variant of the above command as:

docker run --rm -v ./client-data:/output cmangos-tbc-extracted-client-data

You may persist your own extracted client data by creating one of these images, but that is outside the scope of this guide.

Should you do so, you will be able to create & populate the named volume using the following commands:

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