Giter Club home page Giter Club logo

Comments (12)

Palats avatar Palats commented on May 26, 2024

I'm not too familiar on how Factorio manages the difference surfaces in details, but that should be largely doable I imagine. Currently, the mod only generates for nauvis indeed. The take_screenshot calls allow to specify the surface to render, so it should be possible to do a render per surface. As far as I can tell, it is also possible to automatically list surface.

Some metadata would be needed in mapshot.json files but that would be trivial. Some thoughts would be needed for exact UI, but the UI library used (leaflet) has support for multiple layers, so something should be doable (it would be a different base layers, which is different from overlays, but still).

[to be clear - I have no immediate plan to write this feature myself for now though]

from mapshot.

drdozer avatar drdozer commented on May 26, 2024
/c for _, s in pairs(game.surfaces) do game.take_screenshot{surface = s, daytime = 1.0, path = s.name .. ".png" } end

This worked as expected after a bit of coaching from discord. I'll take a look at the mod code and see if it is beyond my noob lua skills to fix.

from mapshot.

drdozer avatar drdozer commented on May 26, 2024

If you are on discord we could have a conversation. Otherwise, I'm looking at control.lua. There are a few things to be done I think.

  1. Decompose mapshot into two functions, one that deals with 'all' the data, and one that deals with a particular surface
  2. Modify gen_layer to take the surface and use it in the take_screenshot call
  3. Put the layer name into file names

The simplest version of this would simply generate a uniquely named mapshot instance per layer per game. The more complex version would bundle up the layers for a single game into a flipbook of maps.

from mapshot.

Palats avatar Palats commented on May 26, 2024

Ok, I started digging a bit in the code to remember the details, one thing led to another and now there is support for other surfaces in https://github.com/Palats/mapshot/tree/surfaces ( 202364c ).

This is not in the main branch for now as I don't have anything to test it with - would you have by any chance a modded save with non default surfaces that you can give me for me to test?

from mapshot.

drdozer avatar drdozer commented on May 26, 2024

Yes, I do. Sorry for the delay - real life happened. What's the best way to share some saves with you?

from mapshot.

drdozer avatar drdozer commented on May 26, 2024

Also, is there an 'all' option?

from mapshot.

Palats avatar Palats commented on May 26, 2024

For sharing the save - any file sharing thing like google drive, dropbox or microsoft onedrive would do the trick. If you prefer to not have a public link, you can send it to my mail (I've updated my github profile with it) - though in that case, please indicate whether it is fine or not to share screenshot of that save.

For the all option - yeah, that would make sense. I might change the final approach a tiny bit, which will make it more natural to have a all option.

from mapshot.

Palats avatar Palats commented on May 26, 2024

Actually, with mod https://mods.factorio.com/mod/ParallelWorlds I can easily do some basic testing of multi-surfaces (without having to do a run with SpaceExploration that is :) .

from mapshot.

drdozer avatar drdozer commented on May 26, 2024

Try this one:

https://drive.google.com/file/d/1PMYjI8orR1edLyavYDr6gJcPYYZGBj74/view?usp=sharing

Feel free to share anything about or from this save. Use it for screenshots for your mod for all I care. It should have several surfaces, each with something there to look at. The nauvis world also has a range of scales that seems to not work super well with the default map rendering settings - at some zooms it appears a bit too pixelated or blurry. I've not figured out exactly what setting tweaks will fix that though.

from mapshot.

Palats avatar Palats commented on May 26, 2024

Thanks for the save!
I have now a better version of the support for surfaces, which will render all surfaces by default. I haven't uploaded it yet, as I still need to update the viewer UI to allow switching between those.

(for the zoom level at which it is blurry - the default settings of mapshot are fairly conservative to avoid prohibitive rendering time, so the most zoom tiles are not that detailed. That can be changed by changing the tilemin setting to a smaller value.)

from mapshot.

Palats avatar Palats commented on May 26, 2024

Ok, so release 0.0.14 which I just uploaded should now render all surfaces by default and allow to switch between them in the viewer.

There might be some corner cases where some of the surfaces do not render - when I tried on the save provided in #14 (comment) (which was very useful, thanks), some screenshots do not render it seems. I think that's because I do not have all the necessary mods installed, though I'm not 100% sure - there might be some way the surfaces are used in the mods that I do not understand.

from mapshot.

drdozer avatar drdozer commented on May 26, 2024

It is possible that one or more of the special interstellar map views do magics rather than the usual map gen stuff, so I am not surprised that one or more of them may be entirely blank.

from mapshot.

Related Issues (20)

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.