Giter Site home page Giter Site logo

factoriomods_factoriomaps's Introduction

Factorio Maps

This Factorio mod makes a Google Map of your factory! You can view the map locally or upload it to a web server.

How to Install

  1. Open Factorio and open the "Mod" menu
  2. Search for and install the "Google Maps Factorio Style" mod.

How to Use

  1. Open your save then click the FactorioMaps button in the upper left-hand side.
  2. Configure settings
  3. Generate your map.
  4. Open the Factorio script-output directory and open the FactorioMaps folder.
  5. Upload your map to a server or use it locally!

Known Limitations

Factorio Mods can not take screenshots on a headless server. This is an unfortunate limitation of Factorio itself.

factoriomods_factoriomaps's People

Contributors

credomane avatar heiltec avatar justin-gerhardt avatar liam1241 avatar narc0tiq avatar ypetremann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

factoriomods_factoriomaps's Issues

Feature Request - GMaps API key as configuration

Rather than having to hand-wrangle the index.html each time I export the map, can I provide the API key as part of the Advanced Configuration (and for it to persist) such that when the index is written out the key is automatically included?

0.15 Support

With the release of 0.15 last week, I would love to use this for the recent version.

I don't know Lua otherwise I would offer to help update.

Support zero-interaction mode

I want to make a service where people just upload maps and my service uses this mod to generate the map and hosts it for them. I know this will get to be large fast, but I want to do anyways.

I understand that I can't do this on a headless instance but I'd like to run it on a full factorio install (with graphics obviously). I just need it to not require any user action. Could the mod be made to allow itself to run immediately on load, export a map with some preset settings and then exit factorio?

That would be super awesome and allow me to make the service.

My existing maps are here:
https://storage.googleapis.com/factorio-1209k-maps/index.html

I did those with a simple tool to create the index and exporting each map by hand.

"FILE_NOT_FOUND" Error in all browsers

Using Factorio 0.14.19
Mod version 0.7.2

Settings:
Day,
Show Entity
Folder Name : "BobsMods"
Size: -1024x-1024 to 1024x1024
jpeg
Medium grid size.

Generated 5461 images for 256 MB.

Opening in any browser and works fine, but the moment I drag or zoom, it crashes with "FILE_NOT_FOUND"

Testing in Chrome,Firefox,Internet Explorer,Edge.

Any advice?

No zoom...

When you open the index.html you can pan around but you cant zoom in and out.

0.16 support

Hi,

any chance to get this working with the current version? :)

Can't generate map on large maps

On large maps it only creates a single zoom level.
The index.html shows this:

CustomMapType.prototype.minZoom = 2;
CustomMapType.prototype.maxZoom = 2;

Any way to fix this?

How do you automate?

I can setup a header server, but is there a process to automate maps production, like daily?

Incorrect Maths to determine Total Width and Total Height in generateMap.lua

Using Top Left X/Y of -377, -6145 and Bottom Right X/Y of 0, -5700 as an example, your maths concludes the variables inGameTotalWidth of 377, and inGameTotalHeigh of 11845.
The correct results should be 377, and 445.
You have to Minus the Bottom Right X/Y from Top Left X/Y to find out the width / height.

I've tested, and updated my local generateMap.lua to the following to reflect the fix required instead.

local inGameTotalWidth = math.ceil(data.bottomRight.x - data.topLeft.x)
local inGameTotalHeight = math.ceil(data.bottomRight.y - data.topLeft.y)

Also, to stop the FILE NOT FOUND messages due to missing jpg layer files, i've also updated the following lines. Please note, I have only tested with "Huge" grid size setting.
As you zoom in however, it crops the edges off (still has the zoom level detail based on your Top Left / Bottom right co-ords)

--for y = 0, numVScreenshots - 1 do
to
for y = -1, numVScreenshots do

and

--for x = 0, numHScreenshots - 1 do
to
for x = -1, numHScreenshots do

Don't put all images in a single folder

I've been hosting large maps and have found that storing 100k files in a single folder is not great - file systems aren't very good at that.

I've been using a custom version of the mod that uses Z/X/Y instead of Z_X_Y and have had noticeable improvement with moving them around.

It also makes it a lot easier to host them because I can easily cache the lower zoom levels while loading higher levels directly from object storage (b2). My script does this by listing the zoom levels for a save, which is just a few folders. Rather than having to list all files to figure out how many zoom levels there are (expensive). (Yes I could parse index.html but that's harder than listing subfolders in /Images/)

0.15 HD zoom level

Similar to #7 and its corresponding commit 68ed262, it would be great to have a feature for one more zoom level larger than the current "Extra Zoom", so that you get full resolution from the new HD sprites in 0.15. The current "extra zoom" option gets you full resolution for the old low-res sprites.

I tried adding it myself but couldn't figure it out, even with the pointers suggested in #7.

Use Leaflet instead of Google Maps?

Are you interested in using different maps Javascript for the browser UI? Thinking specifically of Leaflet. The main advantage is Leaflet doesn't require a Google API key to view online; the files will just work when copied. Leaflet is also open source and pretty nice to work with, I have a lot of experience with it.

If it interests you I could knock out a quick demo of how it'd work for you to look at, then work with you to submit a pull request for the alternative.

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.