L0laapk3 / FactorioMaps

L0laapk3's FactorioMaps mod
https://mods.factorio.com/mod/L0laapk3_FactorioMaps
Other
121 stars 22 forks source link

Lightorio incompability #4

Closed azak1r closed 5 years ago

azak1r commented 5 years ago

Nevermind my steam messed up.

L0laapk3 commented 5 years ago

It should support all mods. Are you using the steam factorio version or non steam? Steam hijacks the child process, so there will be no output other than that from factorio itself. Also, if the game is not starting up at all, thats because everytime the script tries to start factorio with command line arguments, you will have to confirm it in steam. It should display an alert, but sometimes it does not gain focus properly. Can you please look at that?

azak1r commented 5 years ago

im using the steam version and indeed i needed to confirm it. It now runs but throws a error at some point. Here is the console output:

λ python auto.py
D:\SteamLibrary\steamapps\common\Factorio\bin\x64\factorio.exe
backing up autorun.lua
enabling FactorioMaps mod
..\..\script-output\FactorioMaps\Fresh_Start
cleaning up
creating autorun.lua from autorun.template.lua
starting factorio
   0.000  Initializing Steam API.
Cropping Fresh_Start 11 nauvis day images
waiting for crop.txt
waiting for done.txt
Crossreferencing Fresh_Start 11 nauvis day images
found 942 new images
scanning 0 chunks for neighbour cropping
keeping 0 neighbouring images
deleting 0, keeping 942 of 942 existing images
removing identical images
creating render index
creating client index
found 0 new images
scanning 0 chunks for neighbour cropping
keeping 0 neighbouring images
deleting 0, keeping 0 of 0 existing images
removing identical images
creating render index
creating client index
downsampling Fresh_Start 11 nauvis day images
11 nauvis day ['11']
20-20 (total: 1472):
0%
100%
finishing up: 20-17 (total: 23)
Cropping Fresh_Start 11 nauvis night images
left: 135
Traceback (most recent call last):
  File "crop.py", line 52, in <module>
    files = filter(lambda x: x, pool.map(partial(work, imgsize=imgsize, folder=folder), files, 128))
  File "C:\Python27\lib\multiprocessing\pool.py", line 253, in map
    return self.map_async(func, iterable, chunksize).get()
  File "C:\Python27\lib\multiprocessing\pool.py", line 572, in get
    raise self._value
ValueError: invalid literal for int() with base 10: '332.875'
disabling FactorioMaps mod
reverting autorun.lua
Traceback (most recent call last):
  File "auto.py", line 124, in <module>
    if 0 != call('python crop.py %s %s' % (screenshot, basepath)): raise RuntimeError("crop failed")
RuntimeError: crop failed
L0laapk3 commented 5 years ago

Can you please try again with a clean output directory? (Delete script-output/FactorioMaps/Fresh-Start or whatever the output folder is named) If the problem still occurs, can you please attach outputfolder/Images/11/nauvis/day/crop.txt?

azak1r commented 5 years ago

tried that allready and gives the same error. Could it have something todo with the fact that i added my factorio location in the auto.py file?

crop.txt output :

512
L0laapk3 commented 5 years ago

No, that shouldnt be a problem.

Are you ok with uploading your savefile? It doesn't seem to be anything obvious, so I'd like to mess around with it myself

azak1r commented 5 years ago

There you go. Don't worry about the mess, just playing around with some stuff on this save

Fresh_Start.zip

L0laapk3 commented 5 years ago

Can you also add a zip of your mods? I made a snapshots of the base loaded in vanilla with no problem. But that deleted a lot of entities, I have a suspicion for what caused the error.

azak1r commented 5 years ago

i would be able to zip the mods but that will be a 1.22gb file. not sure if that would be a smart idea. i do think you can just sync the mods from the save though except maybe some mods that i modified/made myself.

L0laapk3 commented 5 years ago

I think the problem is in outputfolder/Images/11/nauvis/night/crop.txt. I think that a mod added some light entity with an arbitrary position offset. Please send me any mods that add light entities to the game :)

azak1r commented 5 years ago

hmm let me try something think lightorio might be the problem

azak1r commented 5 years ago

Looks like it ran completly fine now. Disabled lightorio

λ python auto.py
D:\SteamLibrary\steamapps\common\Factorio\bin\x64\factorio.exe
backing up autorun.lua
enabling FactorioMaps mod
..\..\script-output\FactorioMaps\Fresh_Start
cleaning up
creating autorun.lua from autorun.template.lua
starting factorio
   0.000  Initializing Steam API.
Cropping Fresh_Start 11 nauvis day images
waiting for crop.txt
waiting for done.txt
Traceback (most recent call last):
  File "C:\Python27\lib\multiprocessing\util.py", line 277, in _run_finalizers
    finalizer()
  File "C:\Python27\lib\multiprocessing\util.py", line 207, in __call__
    res = self._callback(*self._args, **self._kwargs)
  File "C:\Python27\lib\multiprocessing\pool.py", line 518, in _terminate_pool
    p.terminate()
  File "C:\Python27\lib\multiprocessing\process.py", line 140, in terminate
    self._popen.terminate()
  File "C:\Python27\lib\multiprocessing\forking.py", line 312, in terminate
    _subprocess.TerminateProcess(int(self._handle), TERMINATE)
WindowsError: [Error 5] Toegang geweigerd
Crossreferencing Fresh_Start 11 nauvis day images
found 942 new images
scanning 0 chunks for neighbour cropping
keeping 0 neighbouring images
deleting 0, keeping 942 of 942 existing images
removing identical images
creating render index
creating client index
found 0 new images
scanning 0 chunks for neighbour cropping
keeping 0 neighbouring images
deleting 0, keeping 0 of 0 existing images
removing identical images
creating render index
creating client index
downsampling Fresh_Start 11 nauvis day images
11 nauvis day ['11']
20-20 (total: 1472):
0%
100%
finishing up: 20-17 (total: 23)
Cropping Fresh_Start 11 nauvis night images
left: 48
killing factorio
SUCCESS: Sent termination signal to the process "factorio.exe" with PID 18464.
Crossreferencing Fresh_Start 11 nauvis night images
found 0 new images
scanning 0 chunks for neighbour cropping
keeping 0 neighbouring images
deleting 0, keeping 0 of 0 existing images
removing identical images
creating render index
creating client index
found day surface, reuse results from ref.py from there
found 942 new images
scanning 0 chunks for neighbour cropping
keeping 0 neighbouring images
deleting 0, keeping 942 of 942 existing images
removing identical images
creating render index
creating client index
downsampling Fresh_Start 11 nauvis night images
11 nauvis night ['11']
20-20 (total: 1472):
0%
100%
finishing up: 20-17 (total: 23)
generating mapInfo.js
copying index.html
disabling FactorioMaps mod
reverting autorun.lua
azak1r commented 5 years ago

yup i can now confirm it works completly fine, aslong as i keep lightorio disabled.

L0laapk3 commented 5 years ago

I'm taking care of it :)

azak1r commented 5 years ago

testing the latest version now with lightorio enabled

azak1r commented 5 years ago

image Appears to be working as intended now. No errors in the console, and the picture is taken from the images.

L0laapk3 commented 5 years ago

By the way, if you have suggestions for common factorio executable locations, I can always add them to the list

azak1r commented 5 years ago

most locations in there seem to be okay, im just using a different location due to the HDD being hot-swap