Posted December 23, 2017 (edited) WurmMapGen Interactive tile map generator for Wurm Unlimited servers Download latest release | Install instructions | Github repository Based on WurmMapGen by Garrett94, this updated version adds a lot of new features and configuration options, coupled with a major rewrite of most of the underlying code. I plan to add even more features and options in the future, based on my own ideas and on suggestions from the community. Instant search - Find deeds, players, structures... Real time player markers - If enabled, shows where every player is on the map as they move around. Uses WurmWebRMI. Extensive configuration options - Choose what data should be shown and how the map should look. See all configuration options. Multiple marker types - Don't like the markers? Use labels instead! Read more. Modern UI - The UI is constantly being improved based on player feedback. If you encounter any bugs, be sure to report them either through the forum or as an issue on Github. Edited December 23, 2017 by LordOfAwesomnia 6 Share this post Link to post Share on other sites
Posted December 26, 2017 Highly recommend use memory limits when render, like: start /wait java -Xmx5G -jar MapGen.jar. Share this post Link to post Share on other sites
Posted December 26, 2017 And request, add Paths to configs to fast integration in web sites Share this post Link to post Share on other sites
Posted December 26, 2017 (edited) Sugestions: 1. Add support of towers from 2. double-click make copy of coorinats 3. Make another css-class for Permament deeds to fast change params 4. Add custom.json for custom map markers where admins can add markers (with icons?) manualy Edited December 26, 2017 by DiWorm 1 Share this post Link to post Share on other sites
Posted December 26, 2017 Great update to the map generator! Being able to toggle portal locations would be a nice feature. 1 Share this post Link to post Share on other sites
Posted December 27, 2017 Thanks for the feedback and suggestions! Kingdom towers shouldn't be too difficult to add, I'll check it out Copy / sharing coordinates is on the roadmap so should be added soon Adding other items (e.g. portals) to the map is also on the roadmap, though I may need to do some more testing to get this one working I'm looking at the best way to add custom icons, it should be added soon as well On 12/26/2017 at 9:15 AM, DiWorm said: Highly recommend use memory limits when render, like: start /wait java -Xmx5G -jar MapGen.jar. This is something the user should do, correct? If you want, you can add it to the information on the wiki, otherwise I'll look into it when I get a chance, and add some recommendations to the wiki myself. On 12/26/2017 at 9:31 AM, DiWorm said: add Paths to configs to fast integration in web sites I'm not entirely sure what you mean by this, could you elaborate? On 12/26/2017 at 11:08 AM, DiWorm said: Make another css-class for Permament deeds to fast change params The map renderer doesn't use CSS classes for styling, rather it is configured through Javascript code. I'll see if I can add some more configuration values to customise how the permanent deeds are rendered. 1 Share this post Link to post Share on other sites
Posted December 27, 2017 17 minutes ago, LordOfAwesomnia said: Kingdom towers shouldn't be too difficult to add, I'll check it out He just back another ID's of towers, you can add custom tower id's to config for example, like: custom_towers: [id, id, id, id, ...] 19 minutes ago, LordOfAwesomnia said: This is something the user should do, correct? Yep, but rendering going down with "out of memmory" exception without params. 72Gb RAM, 2 CPU * 12 Cores =) 21 minutes ago, LordOfAwesomnia said: On 26.12.2017 at 11:31 AM, DiWorm said: add Paths to configs to fast integration in web sites I'm not entirely sure what you mean by this, could you elaborate? Ehm.. Ok, I try.. Your script involves using the map as the root partition of web-sitem or simple web-site. But what's if you want do integrate it with some CMS / Fraemwork etc. I mean -- I can rewrite config for me and set custom location of JS/CSS/IMGs folders.. nwm, It is rather a proposal for simplification with integration. 24 minutes ago, LordOfAwesomnia said: The map renderer doesn't use CSS classes for styling, rather it is configured through Javascript code. I'll see if I can add some more configuration values to customise how the permanent deeds are rendered. You can simple do this, coz after load params to JSON villages have param: permanent: true/false. Simple you can add in div class="permanent", if village have permanent: true in config. It will be cool for showing Capitals on map. Please add custom markers first. It's very important for huge maps For custom icons you can again use a json, like: ./data/custom.json markers: { [ type: "portal", borders: true/false borders_zone: "1234 1234 1234 1234", ... ] } and using type of markers for including class in HTML, like a <div class={TYPE}> and we then can use this class for own styles, icons etc =) Share this post Link to post Share on other sites
Posted January 3, 2018 I just published WurmMapGen v2.3.0, which adds portal markers and mod support for the kingdom items mod and the new portals mod. Check the download link & info in the first post. Thanks to @DiWormfor the tower mod suggestion. On 12/27/2017 at 1:31 PM, DiWorm said: Your script involves using the map as the root partition of web-site In most cases, you should be able to use a subdirectory independently from your CMS. For example, if I have a Wordpress installation at example.com/wordpress, I can set the output path of the map generator to example.com/wordpress/livemap and the webserver should serve all the files just fine from that location. If not, you may need to add a flag to your .htaccess file (or the equivalent for your server software). Adding configurable paths for each different type of asset (images, stylesheets, scripts) is not something I am planning to add, as it is quite a lot of work compared to the limited benefits, and I prefer to spend my time on adding features that more people will find useful. That being said, if this is important to you, I encourage you to fork the Github repository and add the feature yourself. I welcome pull requests that add more features and options to the map generator. On 12/27/2017 at 1:31 PM, DiWorm said: You can simple do this, coz after load params to JSON villages have param: permanent: true/false. Simple you can add in div class="permanent", if village have permanent: true in config Here's the problem with that: the map is not made with <div> elements. The map is built up with a combination of <img> tags for the markers, and <svg> paths for the borders. This all happens through the Leaflet.js library and I cannot control the generated html code directly, so I can't "just add a class to a div" like you suggest. I may look at some more detailed options for customisation in the future, but it won't be any time soon. For now, you can always edit the template source files to suit your needs, the code you need should be in resources/template/app/map.js and resources/template/app/markers.js. 2 Share this post Link to post Share on other sites
Posted January 4, 2018 15 hours ago, LordOfAwesomnia said: I just published WurmMapGen v2.3.0, which adds portal markers and mod support for the kingdom items mod and the new portals mod. Check the download link & info in the first post. Thanks to @DiWormfor the tower mod suggestion. In most cases, you should be able to use a subdirectory independently from your CMS. For example, if I have a Wordpress installation at example.com/wordpress, I can set the output path of the map generator to example.com/wordpress/livemap and the webserver should serve all the files just fine from that location. If not, you may need to add a flag to your .htaccess file (or the equivalent for your server software). Adding configurable paths for each different type of asset (images, stylesheets, scripts) is not something I am planning to add, as it is quite a lot of work compared to the limited benefits, and I prefer to spend my time on adding features that more people will find useful. That being said, if this is important to you, I encourage you to fork the Github repository and add the feature yourself. I welcome pull requests that add more features and options to the map generator. Here's the problem with that: the map is not made with <div> elements. The map is built up with a combination of <img> tags for the markers, and <svg> paths for the borders. This all happens through the Leaflet.js library and I cannot control the generated html code directly, so I can't "just add a class to a div" like you suggest. I may look at some more detailed options for customisation in the future, but it won't be any time soon. For now, you can always edit the template source files to suit your needs, the code you need should be in resources/template/app/map.js and resources/template/app/markers.js. Nice work, thanks! What's about custom markers? Share this post Link to post Share on other sites
Posted January 4, 2018 (edited) Ah. in this version not exist portals.json in data folder. But we use forked version, with custom mod name... Can you give portal.json scheme? UPD. Maybe I do somthing wrong, but custom kingdom towers dont generated for me.. Edited January 4, 2018 by DiWorm Share this post Link to post Share on other sites
Posted January 4, 2018 1 hour ago, DiWorm said: in this version not exist portals.json in data folder It seems I forgot to add an empty portals.json in case no portals are loaded, thanks for letting me know! Fix should be published soon. For the kingdom towers, it should look up the tower template names in the modsupport.db database. Did you change the template names? You can view the template IDs and template names that the map generator looks for in DatabaseHandler.java. Can you double check these with your mods? I tested with the latest version of kingdom items and new portals but maybe the IDs are different in your version. 1 hour ago, DiWorm said: What's about custom markers? Custom markers currently have the same issue with the map markers being handled through the Leaflet.js library, so they require a lot more than just a datafile. This is something I may look into later. You can always add your own changes in the template though, it shouldn't be too difficult to add a new marker type in the client Javascript code. Share this post Link to post Share on other sites
Posted January 4, 2018 (edited) 5 minutes ago, LordOfAwesomnia said: Did you change the template names? Nope, use default names from Kingdom Items mode. "22707" "ITEMTEMPLATE" "org.takino.tower.Horde of the Summoned" "22708" "ITEMTEMPLATE" "org.takino.tower.Mol-Rehan" "22709" "ITEMTEMPLATE" "org.takino.tower.Jenn-Kellon" 2 hours ago, DiWorm said: Can you give portal.json scheme? Or example for future? Coz our mod possibly will not be work with map gen and I'll just add the portals manually Edited January 4, 2018 by DiWorm Share this post Link to post Share on other sites
Posted January 4, 2018 Can you share the logging output of the map generator? Run it with verbose logging enabled (java -jar WurmMapGen.jar --verbose) and then copy the logging output into a pastebin or similar. The portal data has only the properties name, x, and y. See PortalFileGen.java. Can you tell me why your mod wouldn't work with the map generator? Did you change the portal template IDs? Share this post Link to post Share on other sites
Posted January 4, 2018 31 minutes ago, LordOfAwesomnia said: Can you share the logging output of the map generator? Run it with verbose logging enabled (java -jar WurmMapGen.jar --verbose) and then copy the logging output into a pastebin or similar. V:\wurm\_mg>java -Xmx6G -jar WurmMapGen.jar --verbose WurmMapGen Developed and maintained by woubuc Based on original code by garrett94 More info: github.com/woubuc/WurmMapGen Properties file: V:\wurm\_mg\WurmMapGen.properties Template directory: V:\wurm\_mg\template Verbose logging enabled Properties Loading properties file Map path: V:/wurm/PvE Save path: C:/servers/_scripts/wurm_map Loaded properties file Temp files copied эт 04, 2018 12:53:11 PM com.wurmonline.mesh.MeshIO open INFO: C:\Users\836D~1\AppData\Local\Temp\2\WurmMapGen\1515059591110\top_layer.map size is 268436480 MeshIO connection opened Database connections opened Images directory created Map tiles generated in 608069ms Template asset files copied Rendered index.html Created config.json Created config.php Created villages.json Created guardtowers.json Database connections closed Connection closed Temp directory deleted Map generated in 610672 ms V:\wurm\_mg> 32 minutes ago, LordOfAwesomnia said: Can you tell me why your mod wouldn't work with the map generator? Coz it dont use modsupport.db, it use wurmitems directly, like: "103424087556354" "5000" "Spawn Zone" "" "NULL" "99.0" "99.0" "NULL" "-10" "56108175" "56108175" "0" "-10" "1158251185664" "NULL" "16716.05859375" "19920.12890625" "25.0" "179.0" "8397" "0.0" "100" "100" "100" "100000" "21" "-10" "0" "0" "0" "0" "1" "0" "-10" "-1" "0" "0" "0" "0" "Admin" "0" "0" "-10" "805307392" Share this post Link to post Share on other sites
Posted January 5, 2018 @DiWormThanks for the logging output! It made me realise there's a bug with the verbose setting, because it should normally output a lot more. Could you try the latest release (v2.3.1) from Github, and then share the verbose logging output again? It should include a lot more information this time around. As for the custom items - I see you're using different template IDs than the mod does (new portals uses IDs 4001-4016, your example uses ID 5000), so that's why it doesn't work out of the box. I will add a way to configure your custom IDs for portals and towers, but it may take some time for me to get around to implementing this. Share this post Link to post Share on other sites
Posted January 5, 2018 5 minutes ago, LordOfAwesomnia said: @DiWormThanks for the logging output! It made me realise there's a bug with the verbose setting, because it should normally output a lot more. Could you try the latest release (v2.3.1) from Github, and then share the verbose logging output again? It should include a lot more information this time around. As for the custom items - I see you're using different template IDs than the mod does (new portals uses IDs 4001-4016, your example uses ID 5000), so that's why it doesn't work out of the box. I will add a way to configure your custom IDs for portals and towers, but it may take some time for me to get around to implementing this. 2.3.1 log V:\wurm\_mg>java -Xmx6G -jar WurmMapGen.jar --verbose WurmMapGen Developed and maintained by woubuc Based on original code by garrett94 More info: github.com/woubuc/WurmMapGen Properties file: V:\wurm\_mg\WurmMapGen.properties Template directory: V:\wurm\_mg\template Verbose logging enabled Properties Loading properties file Map path: V:/wurm/PvE Save path: C:/servers/_scripts/wurm_map OK Loaded properties file Create temp file copies Created directory C:\Users\836D~1\AppData\Local\Temp\2\WurmMapGen\15151474 75517 Loading required files Copying files to temp directory -> top_layer.map -> wurmzones.db -> wurmzones.db-wal -> wurmzones.db-shm -> wurmitems.db -> wurmitems.db-wal -> wurmitems.db-shm -> wurmplayers.db -> wurmplayers.db-wal -> wurmplayers.db-shm -> modsupport.db OK Temp files copied Open Wurm MeshIO connection эт 05, 2018 1:17:55 PM com.wurmonline.mesh.MeshIO open INFO: C:\Users\836D~1\AppData\Local\Temp\2\WurmMapGen\1515147475517\top_layer.ma p size is 268436480 OK MeshIO connection opened Open db connections Connecting to wurmzones.db OK Connection established Connecting to wurmitems.db OK Connection established Connecting to wurmplayers.db OK Connection established Connecting to modsupport.db OK Connection established OK Database connections opened Map generation Creating images directory C:\servers\_scripts\wurm_map\images OK Images directory created Server map size: 8192 x 8192 Interactive map tile size: 256 x 256 OK Map tiles generated in 558662ms Template assets Copying directory app Copying directory css Copying directory data Copying directory dist Copying directory includes Copying directory markers OK Template asset files copied Template Assembling template data Compiling index.html OK Rendered index.html JSON Config data Writing C:\servers\_scripts\wurm_map\data\config.json OK Created config.json PHP config data Writing C:\servers\_scripts\wurm_map\includes\config.php OK Created config.php Village data Loading villages from wurmzones.db OK Loaded data for 52 villages Writing C:\servers\_scripts\wurm_map\data\villages.json OK Created villages.json Guard tower data Loading guard towers from wurmitems.db OK Loaded data for 37 guard towers Writing C:\servers\_scripts\wurm_map\data\guardtowers.json OK Created guardtowers.json Portal data Loading portals from wurmitems.db OK Loaded data for 0 portals SKIP No portals found Close db connections Disconnecting from wurmzones.db OK Connection closed Disconnecting from wurmitems.db OK Connection closed Disconnecting from wurmplayers.db OK Connection closed Disconnecting from modsupport.db OK Connection closed OK Database connections closed Close Wurm MeshIO connection OK Connection closed Remove temp file copies OK Temp directory deleted Map generated in 561031 ms V:\wurm\_mg> I dont use custom id of towers from AddKingdomItemsMod. It's default ids from mod... I thinks it's autoincriment option in modsupport.db Share this post Link to post Share on other sites
Posted January 5, 2018 (edited) On 04.01.2018 at 0:32 PM, LordOfAwesomnia said: Can you share the logging output of the map generator? Run it with verbose logging enabled (java -jar WurmMapGen.jar --verbose) and then copy the logging output into a pastebin or similar. The portal data has only the properties name, x, and y. See PortalFileGen.java. Can you tell me why your mod wouldn't work with the map generator? Did you change the portal template IDs? While I manual add portal to portal.json: What's wrong I do? https://yadi.sk/i/m2CukW8h3RCzEq https://yadi.sk/i/BFYZLOW83RCzDc UPD. It's problem with map markerType = 3, temporary change to 2 { "portals": [{"name":"TEST","x":500,"y":500}], "USER_DO_NOT_EDIT": "This file will be overwritten by the map generator. You should not make any changes to this file." } Edited January 5, 2018 by DiWorm Share this post Link to post Share on other sites
Posted January 6, 2018 @DiWormI've been looking over my code for several hours but I can't seem to find any reason why your modded towers wouldn't appear. I'm testing with the mod on my local server and it works perfectly, so I'm kind of at a loss. I've added some more logging output in the latest release so hopefully that will lead to something. Could you also share some records from your wurmitems database with guard towers that don't show up on the map? Along with the table schema. Perhaps it's an issue with my queries, or your database is set up differently in some way. The bug with markerType 3 portals should be fixed in the latest release (v2.3.2), that I just published on Github. Thanks for reporting! Share this post Link to post Share on other sites
Posted January 6, 2018 (edited) 22 minutes ago, LordOfAwesomnia said: @DiWormI've been looking over my code for several hours but I can't seem to find any reason why your modded towers wouldn't appear. I'm testing with the mod on my local server and it works perfectly, so I'm kind of at a loss. I've added some more logging output in the latest release so hopefully that will lead to something. Could you also share some records from your wurmitems database with guard towers that don't show up on the map? Along with the table schema. Perhaps it's an issue with my queries, or your database is set up differently in some way. The bug with markerType 3 portals should be fixed in the latest release (v2.3.2), that I just published on Github. Thanks for reporting! Ok, I do this in few hours when back to PC Edited January 6, 2018 by DiWorm Share this post Link to post Share on other sites
Posted January 6, 2018 (edited) On 04.01.2018 at 0:23 PM, DiWorm said: Nope, use default names from Kingdom Items mode. "22707" "ITEMTEMPLATE" "org.takino.tower.Horde of the Summoned" "22708" "ITEMTEMPLATE" "org.takino.tower.Mol-Rehan" "22709" "ITEMTEMPLATE" "org.takino.tower.Jenn-Kellon" "69834071081218" "22708" "Mol-Rehan tower" 3 hours ago, LordOfAwesomnia said: latest release (v2.3.2) V:\wurm\_mg>java -Xmx10G WurmMapGen.jar Error: Could not find or load main class WurmMapGen.jar Another Suggestion: draw player altars (4 types, 3 gods) and Altar of Three \ Black altar on map with ranges =) Edited January 6, 2018 by DiWorm 1 Share this post Link to post Share on other sites
Posted January 6, 2018 (edited) 5 hours ago, DiWorm said: java -Xmx10G WurmMapGen.jar I think you're missing -jar in there? 5 hours ago, DiWorm said: draw player altars (4 types, 3 gods) and Altar of Three \ Black altar on map with ranges I'll add it to the roadmap! Right now focus is on getting the current version working though Edited January 6, 2018 by LordOfAwesomnia 1 Share this post Link to post Share on other sites
Posted January 6, 2018 (edited) 3 hours ago, LordOfAwesomnia said: I think you're missing -jar in there? My bad V:\wurm\_mg>java -Xmx10G -jar WurmMapGen.jar --verbose WurmMapGen v2.3.2 Developed and maintained by woubuc Based on original code by garrett94 More info: github.com/woubuc/WurmMapGen Properties file: V:\wurm\_mg\WurmMapGen.properties Template directory: V:\wurm\_mg\template Verbose logging enabled Properties Loading properties file Map path: V:/wurm/PvE Save path: C:/servers/_scripts/wurm_map OK Loaded properties file Create temp file copies Created directory C:\Users\836D~1\AppData\Local\Temp\2\WurmMapGen\15152738 66255 Loading required files Copying files to temp directory -> top_layer.map -> wurmzones.db -> wurmzones.db-wal -> wurmzones.db-shm -> wurmitems.db -> wurmitems.db-wal -> wurmitems.db-shm -> wurmplayers.db -> wurmplayers.db-wal -> wurmplayers.db-shm -> modsupport.db OK Temp files copied Open Wurm MeshIO connection эт 07, 2018 12:24:26 AM com.wurmonline.mesh.MeshIO open INFO: C:\Users\836D~1\AppData\Local\Temp\2\WurmMapGen\1515273866255\top_layer.ma p size is 268436480 OK MeshIO connection opened Open db connections Connecting to wurmzones.db OK Connection established Connecting to wurmitems.db OK Connection established Connecting to wurmplayers.db OK Connection established Connecting to modsupport.db OK Connection established OK Database connections opened Map generation Creating images directory C:\servers\_scripts\wurm_map\images OK Images directory created Server map size: 8192 x 8192 Interactive map tile size: 256 x 256 OK Map tiles generated in 559164ms Template assets Copying directory app Copying directory css Copying directory data Copying directory dist Copying directory includes Copying directory markers OK Template asset files copied Template Assembling template data Compiling index.html OK Rendered index.html JSON Config data Writing C:\servers\_scripts\wurm_map\data\config.json OK Created config.json PHP config data Writing C:\servers\_scripts\wurm_map\includes\config.php OK Created config.php Village data Loading villages from wurmzones.db OK Loaded data for 53 villages Writing C:\servers\_scripts\wurm_map\data\villages.json OK Created villages.json Guard tower data Loading modded template IDs from modsupport.db -> org.takino.tower.Jenn-Kellon (22709) -> org.takino.tower.Mol-Rehan (22708) -> org.takino.tower.Horde of the Summoned (22707) OK Loaded 3 mod templates Loading guard tower items from wurmitems.db -> Tower IDs: [384, 430, 528, 638, 996, 22709, 22708, 22707] OK Loaded data for 38 guard towers Writing C:\servers\_scripts\wurm_map\data\guardtowers.json OK Created guardtowers.json Portal data Loading portal items from wurmitems.db -> Portal IDs: [603, 604, 605, 637, 606, 607, 732, 733, 855, 4002, 4003, 4 004, 4010, 4011, 4015] OK Loaded data for 0 portals SKIP No portals found Close db connections Disconnecting from wurmzones.db OK Connection closed Disconnecting from wurmitems.db OK Connection closed Disconnecting from wurmplayers.db OK Connection closed Disconnecting from modsupport.db OK Connection closed OK Database connections closed Close Wurm MeshIO connection OK Connection closed Remove temp file copies OK Temp directory deleted Map generated in 561570 ms V:\wurm\_mg> Portals still not generated to portals.json, I added manually. Towers -- same. Another suggestion: Highlight highways and waystones =) Edited January 6, 2018 by DiWorm 1 Share this post Link to post Share on other sites
Posted January 9, 2018 On 1/6/2018 at 10:38 PM, DiWorm said: Another suggestion: Highlight highways and waystones Noted As for the issues you're having, I'm not sure what's going on there. Are you certain there are more items on your server than the ones that are being loaded and displayed on the map? Would you mind sharing your wurmitems.db file with me (and the accompanying db-wal and db-shm files)? So I can run some tests to see if this is an issue on the side of WurmMapGen or if it's perhaps something with your database. Share this post Link to post Share on other sites
Posted January 9, 2018 10 hours ago, LordOfAwesomnia said: Noted As for the issues you're having, I'm not sure what's going on there. Are you certain there are more items on your server than the ones that are being loaded and displayed on the map? Would you mind sharing your wurmitems.db file with me (and the accompanying db-wal and db-shm files)? So I can run some tests to see if this is an issue on the side of WurmMapGen or if it's perhaps something with your database. Send you files in PM Share this post Link to post Share on other sites
Posted January 10, 2018 I love the work you have done here. I am not utilizing the portal portion of the new generator because we just have to many portals and towers. Adding them all is just going to make it seem super cluttered. But that is just personal preference on how our map looks. I may modify it so it pulls our new caravan stations but not sure yet since that could easily get cluttered up as well. 2 Share this post Link to post Share on other sites