What is new in version 4.0?
What is this?
It's automatic map image generator [for website view 'like GoogleMaps'].
It generates OTS map .png images (each 8x8 tiles).
-- BINARY (.EXE) ATTACHED! YOU DO NOT HAVE TO COMPILE! --
To run binary you may need to install Microsoft VS 2019 Redist x64 first:
It contains configured JavaScript and HTML to view map on website like this:
How to use?
1. Download otclient_mapgen from GitHub:
GitHub - gesior/otclient_mapgen: Open Tibia map images generator [good for Leaflets]. Loads .otbm file and generate .png images 256x256 px
and compile it like normal OTClient:
Compiling on Windows · edubart/otclient Wiki · GitHub
Compiling on Linux · edubart/otclient Wiki · GitHub
Compiling on Mac OS X · edubart/otclient Wiki · GitHub
Compiling for Android · edubart/otclient Wiki · GitHub
OR DOWNLOAD BINARY (.EXE) ATTACHED
2. Copy your server client .spr and .dat files to OTClient folder: data/things/HERE_PROTOCOL_VERSION/
3. Copy your server data/items/items.otb file to OTClient folder: data/things/HERE_PROTOCOL_VERSION/
4. Copy your server data/world/MAP_NAME.otbm file to OTClient folder: data/map.otbm
5. Run otclient.exe
6. Type in client terminal command like:
prepareClient(1076, '/things/1076/items.otb', '/map.otbm', 8, 5)
[Paths are relational, so start path with '/' to start in folder 'data', access to other folders in computer is blocked]
7. OTClient will show in 10-50 seconds (it will freez client, do not close it, just wait) something like:
8. Type in client terminal command:
generateMap('all', 30)
OTClient will report progress in terminal.
9. Your map images will appear in your system 'user' directory
%HOMEPATH%/otclient - Windows, open it in folder explorer
$({HOME}/.otclient - Linux, 'cd' to it, this folder is invisible, but you can navigate to it
10. Copy folder map from folder metioned in previous step to folder website_and_php_files of otclient_mapgen.
--- NEXT STEPS REQUIRE PHP INSTALLED IN SYSTEM ---
--- LINUX: FOR GENERATION TIME, SET FOLDER website_and_php_files RIGHTS TO 777 ---
11. Linux
1. If you got Git BASH installed
12. Move folder website_and_php_files/map_viewer to your webserver - it contains all images and website scripts to view them (Leaflet Map).
13. Configure map_viewer. Config is at start of map.js file:
- You can keep images on other webserver. Set imagesUrl to URL of this server like: 'http://myserver.com/map_images/'
GENERATE HOUSE IMAGES
Example house image - tiles outside house are 30% darker:
GENERATE FULL MINIMAP FOR OTCLIENT
Most of released OTClient .exe files are 32-bit and they got limit around 2 GB RAM. It means that you cannot generate minimap from .otbm bigger than ~60MB.
Attached binary is 64-bit version of OTClient. It can load any size .otbm into RAM. To export full minimap, you got to load whole map.
- website view with NPCs and monsters search
- configurable town names and positions - big names visible on map
- possibility to link NPCs and monsters ex. mymap.com/#npc,Xodet , mymap.com/#monster,Dragon+Lord
- scripts to run 'zoom levels' and 'compression' on 16 cores on windows (for linux it was in version 3.0)
- house images generator - generate images of houses that you can use on 'houses' page in acc. maker
- minimap generator - you can generate full minimap and use it with any OTClient
- sources updated for new linuxes (new openssl) and newest Visual Studio project from edubart/otclient (vcpkg)
Release Map generator v4 - Windows x64 · gesior/otclient_mapgen
Open Tibia map images generator [for LeafletJS]. Loads .otbm file and generate .png images 256x256 px - Release Map generator v4 - Windows x64 · gesior/otclient_mapgen
github.com
What is this?
It's automatic map image generator [for website view 'like GoogleMaps'].
It generates OTS map .png images (each 8x8 tiles).
-- BINARY (.EXE) ATTACHED! YOU DO NOT HAVE TO COMPILE! --
To run binary you may need to install Microsoft VS 2019 Redist x64 first:
It contains configured JavaScript and HTML to view map on website like this:
How to use?
1. Download otclient_mapgen from GitHub:
GitHub - gesior/otclient_mapgen: Open Tibia map images generator [good for Leaflets]. Loads .otbm file and generate .png images 256x256 px
and compile it like normal OTClient:
Compiling on Windows · edubart/otclient Wiki · GitHub
Compiling on Linux · edubart/otclient Wiki · GitHub
Compiling on Mac OS X · edubart/otclient Wiki · GitHub
Compiling for Android · edubart/otclient Wiki · GitHub
OR DOWNLOAD BINARY (.EXE) ATTACHED
2. Copy your server client .spr and .dat files to OTClient folder: data/things/HERE_PROTOCOL_VERSION/
3. Copy your server data/items/items.otb file to OTClient folder: data/things/HERE_PROTOCOL_VERSION/
4. Copy your server data/world/MAP_NAME.otbm file to OTClient folder: data/map.otbm
5. Run otclient.exe
6. Type in client terminal command like:
prepareClient(1076, '/things/1076/items.otb', '/map.otbm', 8, 5)
- with you client protocol version,
- valid paths to items.otb and map.otbm,
- number of threads to run (in example it's 8),
- number of map parts (OTC will split map to parts to reduce maximum RAM usage)
[Paths are relational, so start path with '/' to start in folder 'data', access to other folders in computer is blocked]
7. OTClient will show in 10-50 seconds (it will freez client, do not close it, just wait) something like:
Now just type (lower levels shadow 30%)
ALL PARTS OF MAP:
generateMap('all', 30)
ONLY PARTS 2 AND 3 OF MAP:
generateMap({2, 3}, 30)
8. Type in client terminal command:
generateMap('all', 30)
OTClient will report progress in terminal.
9. Your map images will appear in your system 'user' directory
%HOMEPATH%/otclient - Windows, open it in folder explorer
$({HOME}/.otclient - Linux, 'cd' to it, this folder is invisible, but you can navigate to it
10. Copy folder map from folder metioned in previous step to folder website_and_php_files of otclient_mapgen.
--- NEXT STEPS REQUIRE PHP INSTALLED IN SYSTEM ---
--- LINUX: FOR GENERATION TIME, SET FOLDER website_and_php_files RIGHTS TO 777 ---
11. Linux
- Execute (in terminal):
sh linux_run_all.sh
1. If you got Git BASH installed
- Execute (in system terminal):
./windows_run_1_pre_tile_generator.sh
- Execute:
./windows_run_2_tile_generator.sh
Watch CPU usage (by php.exe). Wait until it finish.
- Execute:
./windows_run_3_pre_compress.sh
- Execute:
./windows_run_4_compress.sh
Watch CPU usage (by php.exe). Wait until it finish.
- Execute (in system terminal):
php 1_pre_tile_generator.php
- Execute (command parameter is map 'floor'):
- You can execute these commands in any order.
- You can open few terminals and run few commands at once to generate it faster (use all CPU cores).
php 2_tile_generator.php 0
php 2_tile_generator.php 1
php 2_tile_generator.php 2
php 2_tile_generator.php 3
php 2_tile_generator.php 4
php 2_tile_generator.php 5
php 2_tile_generator.php 6
php 2_tile_generator.php 7
php 2_tile_generator.php 8
php 2_tile_generator.php 9
php 2_tile_generator.php 10
php 2_tile_generator.php 11
php 2_tile_generator.php 12
php 2_tile_generator.php 13
php 2_tile_generator.php 14
php 2_tile_generator.php 15
php 2_tile_generator.php 16
- Execute:
php 3_pre_compress.php
- Execute (command parameter is map 'floor'):
- You can set compression quality in file 4_compress.php (line: $quality = 80
- You can execute these commands in any order.
- You can open few terminals and run few commands at once to generate it faster (use all CPU cores).
php 4_compress.php 0
php 4_compress.php 1
php 4_compress.php 2
php 4_compress.php 3
php 4_compress.php 4
php 4_compress.php 5
php 4_compress.php 6
php 4_compress.php 7
php 4_compress.php 8
php 4_compress.php 9
php 4_compress.php 10
php 4_compress.php 11
php 4_compress.php 12
php 4_compress.php 13
php 4_compress.php 14
php 4_compress.php 15
php 4_compress.php 16
12. Move folder website_and_php_files/map_viewer to your webserver - it contains all images and website scripts to view them (Leaflet Map).
13. Configure map_viewer. Config is at start of map.js file:
- You can keep images on other webserver. Set imagesUrl to URL of this server like: 'http://myserver.com/map_images/'
Code:
imagesUrl: 'map/', // URL to folder with 'zoom levels' (folders with names 0-16)
imagesExtension: '.jpg',
mapName: 'RL MAP?',
startPosition: {x: 1000, y: 1000, z: 7},
startZoom: 14,
minZoom: 4,
maxZoom: 18, // maximum zoom with full quality is 16
GENERATE HOUSE IMAGES
- Do steps 1-6 from How to use? instruction (above).
- Type in client terminal command:
generateHouses(30, false)- 30 - shadow percent for tiles around house (they will be darker)
- false - load whole map at once, requires much RAM, set it to true to load map by parts, it's much slower, but will use little amount of RAM to generate house images
- It will freez client for house generation time! Don't close it. If you want watch progress run OTClient by windows/linux console (not by clicking .exe):
./otclient
'Freezed' client will show messages about generated houses in system console. - Your house images will appear in your system 'user' directory:
%HOMEPATH%/otclient/house/ - Windows, open it in folder explorer
${HOME}/.otclient/house/ - Linux, 'cd' to it, this folder is invisible, but you can navigate to it
Example house image - tiles outside house are 30% darker:
GENERATE FULL MINIMAP FOR OTCLIENT
Most of released OTClient .exe files are 32-bit and they got limit around 2 GB RAM. It means that you cannot generate minimap from .otbm bigger than ~60MB.
Attached binary is 64-bit version of OTClient. It can load any size .otbm into RAM. To export full minimap, you got to load whole map.
- Do steps 1-6 from How to use? instruction (above).
- Type in client terminal command:
saveMinimap('minimap.otmm') - Your minimap will appear in your system 'user' directory:
%HOMEPATH%/otclient/ - Windows, open it in folder explorer
${HOME}/.otclient/ - Linux, 'cd' to it, this folder is invisible, but you can navigate to it - Copy it to folder data in your normal OTClient. It must be closed when you place there new minimap!
- Run your OTClient, login to game, you should see full minimap.
Attachments
-
otclient_mapgen_v4_win-x64.zip8 MB · Views: 160 · VirusTotal