Giter VIP home page Giter VIP logo

7dtd-leaflet's Introduction

7DTD-leaflet

Merge 7DTD discovered map in html

The python script map_reader.py will extract dans merge all .map files of a random world. The result is then saved into png files.

A javascript code (Leaflet) merge all this png files while browsing the big map.

7DTD forum post https://7daystodie.com/forums/showthread.php?14947-Export-discovered-map-to-png

How to use

From source

Install:

Run map_reader.py by double clicking on this file. A gui will ask you the path of the .map folder. (for me this is in C:\Users\cumu\AppData\Roaming\7DaysToDie\Saves\Random Gen\testalpha\Player)

Using prebuilt binary

You will find windows binary in the releases. Place the .exe file into the extracted source file (along index.html file) https://github.com/nicolas-f/7DTD-leaflet/releases

Then double click on the exe. A gui will ask you the path of the .map folder. (for me this is in C:\Users\cumu\AppData\Roaming\7DaysToDie\Saves\Random Gen\testalpha\Player)

How to view the result

A sub directory named tiles will be created.

Open index.html in your browser (Firefox or Chrome).

Enjoy !

Command line

You can also use it in command line.

python map_reader.py -g "C:\Users\CUMU\Documents\7 Days To Die\Saves\Random Gen\ver91\Player"

Available parameters:

-g "C:\\Users..\" The folder that contain .map files
-t "tiles" The folder that will contain tiles (Optional)
-z 8 Zoom level 4-n. Number of tiles to extract around position 0,0 of map. It is in the form of 4^n tiles.It will extract a grid of 2^n*16 tiles on each side.(Optional)
-n Keep track of updates and write the last version of tiles. This will show players bases on map.

Additonnal content

You can run simple_server.py with python to give access on http://localhost:8000 .

Remember that python files are under GPLv3 license and then you need to redistribute your modifications.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.