-
Notifications
You must be signed in to change notification settings - Fork 757
Mapcache
Utilising the mapcache allows you to process the maps you've configured in the db
and conf
folder, with respect to the conf/grf-files.txt
. Building the mapcache allows you to:
- make custom maps,
- edit existing maps,
- allows your server to recognize the maps found in the client,
- allows your server and client to agree on map information (passable and non-passable terrain among other information),
- stores this information in a cache format easily usable by your server executables.
Back in eAthena and rAthena days, mapcache was a separate executable file mapcache.exe
that you run to process the client.
In Hercules, the mapcache tool is incorporated as a Hercules Plugin, which is run using the map-server.exe
as a loaded plugin that processes the maps as the map-server is starting up.
To be able to use the mapcache tool, you must:
- Configure the mapcache plugin for your server
- Recompile the plugins to build the mapcache plugin
- On a terminal or command prompt, run the
map-server
with the the mapcache plugin loaded and instructions to rebuild the cache.
-
Determine what your operating system is. Is it Windows? Unix? This will determine which guides you should follow on compiling and running the command line/terminal scripts.
-
Configure the mapcache plugin. To do so, you must read about how plugins are compiled.
-
Next, you need to compile your server.
-
Configure your
conf/grf-files.txt
so that the server knows where to find the client-side map files. -
On your server, configure your
db/map_index.txt
andconf/map/maps.conf
so that you can include your custom maps. Read and follow the Configuring thegrf-files.txt
section below. -
On your client, ensure that your custom map is included in the
data/resnametable.txt
file, and that the correspondingyourmap.gnd
,yourmap.rsw
, andyourmap.gat
is found in the data folder of your client. -
Open your command prompt or terminal to your root server folder, and run the following command:
map-server --load-plugin mapcache --rebuild-mapcache
-
That will execute the
map-server
executable with themapcache
plugin and instructing it to rebuild the mapcache. -
Once it has finished running, your mapcache has been rebuilt and your server and client agree on the data about the maps. Go and test whether your map exists.
- Open
conf/grf-files.txt
- Add your data folder path.
- Do not include the data folder itself in the path (see example).
Can I use the GRF files option?
No. GRF files are no longer supported by the mapcache
tool, so use only the data folder option.
But I need to use the GRF cause my files are there!
If you have files in the GRF which you have to include, use a GRF extraction tool to obtain its data folder.
Examples:
data_dir: C:\Users\JohnD\Documents\Data Folder\
This will refer to the data folder found at C:\Users\JohnD\Documents\Data Folder\data
.