[Request] Screenshot / mapping mod
[Request] Screenshot / mapping mod
This mod should add a button to the game that generates a google map in the script output directory. Scripting interface already supports this for some time:
https://forums.factorio.com/wiki/inde ... screenshot
https://forums.factorio.com/wiki/inde ... e#makefile
(I'm too busy / lazy to do this myself :-) )
https://forums.factorio.com/wiki/inde ... screenshot
https://forums.factorio.com/wiki/inde ... e#makefile
(I'm too busy / lazy to do this myself :-) )
Re: [Request] Screenshot / mapping mod
slpwnd mentioned google map export before. I doubt that it would be too hard to do, but I failed to find any information what it actually is.
Re: [Request] Screenshot / mapping mod
Yeah, I couldn't find too much details about the format too, but imho it will be just multi resolution tiles with some json or xml metadata.
Re: [Request] Screenshot / mapping mod
I've found a way to generate a map with the Google API, and I'm now trying to get the screenshots in. One thing I can't find: is there a way to determine if a tile is generated (to determine the edge of the map)? Something like "ischunkgenerated"? If not, how hard would it be to put it in 0.10.10?
*puppyeyes, and something with sugar on top*
![Image](http://www.dfs-pet-blog.com/wp-content/uploads/2011/03/puppy-look.jpg)
*puppyeyes, and something with sugar on top*
![Image](http://www.dfs-pet-blog.com/wp-content/uploads/2011/03/puppy-look.jpg)
Re: [Request] Screenshot / mapping mod
I need a break from MP, I'll do it now.
Re: [Request] Screenshot / mapping mod
Would these work?cube wrote:I need a break from MP, I'll do it now.
Goes in LuaGameScript:
Code: Select all
int32_t LuaGameScript::luaIsChunkGenerated(lua_State* L)
{
luaL_argcheck(L, lua_gettop(L) == 2, 0, "Wrong number of arguments.");
lua_pushboolean(L, !!this->getMap().getTileOptional(RealPosition(luaL_checknumber(L, -2), luaL_checknumber(L, -1))));
return 1;
}
Code: Select all
int32_t LuaPlayer::luaIsChunkCharted(lua_State* L)
{
luaL_argcheck(L, lua_gettop(L) == 2, 0, "Wrong number of arguments.");
SubChart* subChart = this->map.getForceData(this->player->forceID)->chart->getSubChart(RealPosition(luaL_checknumber(L, -2), luaL_checknumber(L, -1)));
lua_pushboolean(L, !(subChart == NULL || subChart->videoSprite == NULL));
return 1;
}
If you want to get ahold of me I'm almost always on Discord.
Re: [Request] Screenshot / mapping mod
Yes, but you wouldn't know boundaries of the area to test, I'm thinking about iterator over generated chunks. Also the charted test should be a part of force, not player.
But something like what you wrote will definitely be there. Will you make a pull request, or should I put it in myself?
But something like what you wrote will definitely be there. Will you make a pull request, or should I put it in myself?
Re: [Request] Screenshot / mapping mod
It's a simple mater to find all generated chunks by starting at chunk 0,0 and searching outwards fractaly. That can be done in LUA without any issues provided the "ischunkgenerated"/"ischunkcharged" function exists. I use a similar method myself to find all connecting water tiles for a given body of water in the Landfill 2 mod.cube wrote:Yes, but you wouldn't know boundaries of the area to test, I'm thinking about iterator over generated chunks. Also the charted test should be a part of force, not player.
But something like what you wrote will definitely be there. Will you make a pull request, or should I put it in myself?
Regarding the pull request: you can put it in yourself. I'm working on a bunch of other modding interfaces and I'll submit them all at once when they're ready.
If you want to get ahold of me I'm almost always on Discord.
- Skellitor301
- Fast Inserter
- Posts: 158
- Joined: Mon Aug 04, 2014 10:04 pm
- Contact:
Re: [Request] Screenshot / mapping mod
You do realize you can already make labeled markers in the game right?
![Image](https://forums.factorio.com/images/ext/922a8e5bf6ca72bca3eb3187c6aeaf32.png)
Just place a single track and put down a trainstop next to it, then remove the track, and finally rename the stop.
![Image](https://forums.factorio.com/images/ext/922a8e5bf6ca72bca3eb3187c6aeaf32.png)
Just place a single track and put down a trainstop next to it, then remove the track, and finally rename the stop.
Re: [Request] Screenshot / mapping mod
It is done. (Well, a first version is
). https://forums.factorio.com/forum/vie ... =14&t=5812
![Wink ;)](./images/smilies/icon_e_wink.gif)