Page 4 of 5

Re: [0.11.x] Factorio Maps

Posted: Tue Mar 17, 2015 9:38 pm
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!

Re: [0.11.x] Factorio Maps

Posted: Fri Mar 27, 2015 2:39 am
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.

Re: [0.11.x] Factorio Maps

Posted: Fri Mar 27, 2015 3:56 am
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.

Re: [0.11.x] Factorio Maps

Posted: Sat Mar 28, 2015 11:40 am
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.

Re: [0.11.x] Factorio Maps

Posted: Sat Mar 28, 2015 2:36 pm
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.

Re: [0.11.x] Factorio Maps

Posted: Sun Mar 29, 2015 1:04 am
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.

Re: [0.11.x] Factorio Maps

Posted: Wed Jul 01, 2015 3:22 pm
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.

Re: [0.11.x] Factorio Maps

Posted: Sat Jul 04, 2015 10:23 pm
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.

Re: [0.11.x] Factorio Maps

Posted: Wed Jul 08, 2015 8:22 pm
by Smarty
[Moved to helper mods by Smarty]

Re: [0.11.x] Factorio Maps

Posted: Thu Jul 09, 2015 10:03 am
by A_Factorio457
I can't find the generate image button. Help?

Re: [0.11.x] Factorio Maps

Posted: Thu Jul 23, 2015 8:18 pm
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.

Re: [0.11.x] Factorio Maps

Posted: Thu Aug 06, 2015 5:12 pm
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>

Re: [0.11.x] Factorio Maps

Posted: Thu Aug 06, 2015 7:50 pm
by cengbrecht

Re: [0.11.x] Factorio Maps

Posted: Thu Aug 06, 2015 8:05 pm
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

Re: [0.11.x] Factorio Maps

Posted: Thu Aug 06, 2015 8:45 pm
by cengbrecht
Well I may not be one for coding, but troubleshooting I am somewhat proficient. :P

Re: [0.11.x] Factorio Maps

Posted: Thu Oct 01, 2015 5:58 am
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

Re: [0.11.x] Factorio Maps

Posted: Thu Oct 01, 2015 6:40 am
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.

Re: [0.11.x] Factorio Maps

Posted: Thu Oct 01, 2015 6:52 am
by Ezzue
Hm.. damn! I really want to share it.. people are requesting it! :D

Problem while starting or loading game

Posted: Sun Apr 17, 2016 2:29 pm
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…

Re: [0.11.x] Factorio Maps

Posted: Sun Apr 17, 2016 4:39 pm
by jeroon
You might be better of trying the 0.12 version of the mod :)

viewtopic.php?f=92&t=14582