[0.11.x] Factorio Maps

Topics and discussion about specific mods
User avatar
Kalabint
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Nov 06, 2014 5:43 pm
Contact:

Re: [0.11.x] Factorio Maps

Post by Kalabint »

Hi there
just one thing: OMG.

This Mod filled my SSD with 34k PNG files à 51 GB... :D
Well its now down to 25GB of JPG files :P

Enjoy my Map

Sidenote: I dont know why, but when you zoom out, then the Images in the edges look as when i took them in the Night. Does anyone knows why?
Also i think the AltInfo Checkbox isnt always working correct.

btw: Thanks for modding!
Last edited by Kalabint on Tue Mar 31, 2015 6:07 am, edited 1 time in total.
User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 421
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: [0.11.x] Factorio Maps

Post by y.petremann »

For putting progression, I had some idea since we can't put a progress bar ... :
  • Print the progress with print() so peoples that start factorio in a terminal can see messages, also a trace would be made in the logs
  • Write a html file that embed an invisible iframe, refresh it each 5 second and get and process it's content with javascript (don't forget to sandbox the function to avoid error if the data is incorrect).
    This iframe contains some raw json that is written by the mod.
    You could put some informations like the progress, messages ... that would be shown to the user.
    Once finished, make it load the map.
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: [0.11.x] Factorio Maps

Post by n9103 »

https://forums.factorio.com/wiki/inde ... BarElement
Haven't seen this removed in the changelogs, so should still be there for use.
Just needs to be implemented in the mod.
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.
User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 421
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: [0.11.x] Factorio Maps

Post by y.petremann »

n9103 wrote:https://forums.factorio.com/wiki/inde ... BarElement
Haven't seen this removed in the changelogs, so should still be there for use.
Just needs to be implemented in the mod.
The ProgressbarElement can't be used because the map is generated in a single tick but can take long time to implement, the first fact make it impossible to cancel or to track progress from the interface because it doesn't update.
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: [0.11.x] Factorio Maps

Post by n9103 »

Ah. Didn't know it was a single tick.
Perhaps that in itself should be adjusted?
Have the script take a pause for a tick after it exports a full chunk or something, that way you can use a progressbar, without taking much longer.
Good to know though.
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.
User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 421
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: [0.11.x] Factorio Maps

Post by y.petremann »

n9103 wrote:Ah. Didn't know it was a single tick.
Perhaps that in itself should be adjusted?
Have the script take a pause for a tick after it exports a full chunk or something, that way you can use a progressbar, without taking much longer.
Good to know though.
And for me since we generate an html document, an html progressbar could be usefull and can possiblyy made.
User avatar
bigyihsuan
Filter Inserter
Filter Inserter
Posts: 299
Joined: Thu Jan 01, 2015 12:57 pm
Contact:

Re: [0.11.x] Factorio Maps

Post by bigyihsuan »

Is there any way to put the HTML file onto the internet without having to put it into a website somehow? I just want to post a link here and on the subreddit.
ljdp
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Wed Jul 01, 2015 12:33 am
Contact:

Re: [0.11.x] Factorio Maps

Post by ljdp »

y.petremann wrote:
n9103 wrote:https://forums.factorio.com/wiki/inde ... BarElement
Haven't seen this removed in the changelogs, so should still be there for use.
Just needs to be implemented in the mod.
The ProgressbarElement can't be used because the map is generated in a single tick but can take long time to implement, the first fact make it impossible to cancel or to track progress from the interface because it doesn't update.
Have a look into lua coroutines. They let you compute complicated algorithms over several frames. I use them a lot in my mods.
User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: [0.11.x] Factorio Maps

Post by Smarty »

[Moved to helper mods by Smarty]
A_Factorio457
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed May 27, 2015 7:11 am
Contact:

Re: [0.11.x] Factorio Maps

Post by A_Factorio457 »

I can't find the generate image button. Help?
jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [0.11.x] Factorio Maps

Post by jeroon »

With the help of Oxyd en RSeding91 I've update the code for 0.12, it generates the images again, only problem is, the .html doesn't show anything. I'll try to fix it this weekend, until then, this is what I've got so far.
cengbrecht
Burner Inserter
Burner Inserter
Posts: 18
Joined: Mon May 12, 2014 7:11 am
Contact:

Re: [0.11.x] Factorio Maps

Post by cengbrecht »

jeroon wrote:With the help of Oxyd en RSeding91 I've update the code for 0.12, it generates the images again, only problem is, the .html doesn't show anything. I'll try to fix it this weekend, until then, this is what I've got so far.
To fix the map loading in HTML just change the last line like this:
Original

Code: Select all

<body on_load="initialize()">
<div id="map_canvas" style="background: #1B2D33;"></div>
</body>
</html>
New Edit removed _ from onload

Code: Select all

<body onload="initialize()">
<div id="map_canvas" style="background: #1B2D33;"></div>
</body>
</html>
cengbrecht
Burner Inserter
Burner Inserter
Posts: 18
Joined: Mon May 12, 2014 7:11 am
Contact:

Re: [0.11.x] Factorio Maps

Post by cengbrecht »

jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [0.11.x] Factorio Maps

Post by jeroon »

good catch, mixing lua and javascript's baaad, mmkay :D

looks like the mod's ready for 0.12 :) tnx!!

[MOD 0.12.x] Factorio Maps
cengbrecht
Burner Inserter
Burner Inserter
Posts: 18
Joined: Mon May 12, 2014 7:11 am
Contact:

Re: [0.11.x] Factorio Maps

Post by cengbrecht »

Well I may not be one for coding, but troubleshooting I am somewhat proficient. :P
User avatar
Ezzue
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Sep 21, 2014 7:54 pm
Contact:

Re: [0.11.x] Factorio Maps

Post by Ezzue »

Hey!
I seem to be the only one with this problem..
But how do you share your world? Upload it to a website?
Thanks in advance! :D
jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [0.11.x] Factorio Maps

Post by jeroon »

You're not the only one :D

Yeah, you upload it to a website. Only thing I've tried so far is Dropbox, and it doesn't (seem to) work. Most shared maps I see are on private serverspace.
User avatar
Ezzue
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Sep 21, 2014 7:54 pm
Contact:

Re: [0.11.x] Factorio Maps

Post by Ezzue »

Hm.. damn! I really want to share it.. people are requesting it! :D
Acamat
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Apr 17, 2016 2:05 pm
Contact:

Problem while starting or loading game

Post by Acamat »

Hi there,

i'd just activated Factorio Maps and encountered the following error while starting/loading a game:

Code: Select all

__FactorioMaps__/control.lua:2:
__FactorioMaps__/Files/control.lua.3:
attempt to index global 'game' (a nil value)

Factorio 0.12.29 (Build 17931, linux64, steam)
FactorioMaps 0.4.1
Any help is appreciated, thx…
jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [0.11.x] Factorio Maps

Post by jeroon »

You might be better of trying the 0.12 version of the mod :)

viewtopic.php?f=92&t=14582
Post Reply

Return to “Mods”