I'm building a map generator for an islands map. Till now I just used --generate-map-preview to test the code resulting in this:
But when I start the game for real and generate a map preview in the GUI I get this:
When I start the game the map actually has all those dark blue squares in it which totally destroys the feel of the map.
Why does the command line map preview differ from the GUI preview and game? All the map generator code is in prototypes/map-gen-settings.lua.
Note: I made the screenshots with mode mods loaded but the problem remains with just cargo-ships. Map looks different but equally broken.
[Bilka] [0.18.45] Map generator goes haywire
[Bilka] [0.18.45] Map generator goes haywire
- Attachments
-
- cargo-ships_0.0.54.zip
- cargo-ships mod with map generator
- (58.09 MiB) Downloaded 186 times
Re: [0.18.45] Map generator goes haywire
Small update. I had to turn off prototype-caching in config.ini because it made my character sprite from I, Robot disappear and let me walk on water. With that option commented out I still see the corruption in the map preview but when I generate the map for real it seems to be OK.
I turned off sprite/atlas caching too but that didn't fix the map preview. So something is really broken.
I turned off sprite/atlas caching too but that didn't fix the map preview. So something is really broken.
Re: [0.18.45] Map generator goes haywire
The command line option to generate a preview uses a bunch of special different logic compared to what the game actually uses.
I've thought about just deleting it and replacing it with what the preview screen uses but it's not a 1-1 replacement because the preview doesn't do 'scaling' (zooming out) of the results like the existing command line one 'can' do. however, that's near useless because it isn't the actual code that runs when you make a new game so it's never going to be perfect - and may have ohter bugs (as you're seeing).
Additionally the person who wrote the command line version no longer works for Wube and as far as I know none of us are interested in maintaining the command line version.
So I guess that leaves 2 options:
1. Don't use the command line option or accept it may be different from what the game actually does
2. I delete the existing command line option and replace it with what the preview GUI does
I've thought about just deleting it and replacing it with what the preview screen uses but it's not a 1-1 replacement because the preview doesn't do 'scaling' (zooming out) of the results like the existing command line one 'can' do. however, that's near useless because it isn't the actual code that runs when you make a new game so it's never going to be perfect - and may have ohter bugs (as you're seeing).
Additionally the person who wrote the command line version no longer works for Wube and as far as I know none of us are interested in maintaining the command line version.
So I guess that leaves 2 options:
1. Don't use the command line option or accept it may be different from what the game actually does
2. I delete the existing command line option and replace it with what the preview GUI does
If you want to get ahold of me I'm almost always on Discord.
Re: [0.18.45] Map generator goes haywire
Hey, the corruption is most likely related to the if-else-chain that you are using. I have a simpler reproduction for this, but no promises for a fix for now.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: [0.18.45] Map generator goes haywire
Rseding91 wrote: ↑Mon Aug 24, 2020 7:59 pm The command line option to generate a preview uses a bunch of special different logic compared to what the game actually uses.
I've thought about just deleting it and replacing it with what the preview screen uses but it's not a 1-1 replacement because the preview doesn't do 'scaling' (zooming out) of the results like the existing command line one 'can' do. however, that's near useless because it isn't the actual code that runs when you make a new game so it's never going to be perfect - and may have ohter bugs (as you're seeing).
Additionally the person who wrote the command line version no longer works for Wube and as far as I know none of us are interested in maintaining the command line version.
So I guess that leaves 2 options:
1. Don't use the command line option or accept it may be different from what the game actually does
2. I delete the existing command line option and replace it with what the preview GUI does
That doesn't really address the problem. The preview GUI is the one that's buggy. The CLI and game (with prototype caching off) do the right thing.
Is the preview GUI different from the real game generator or is it pure luck the game generates right?
Re: [Bilka] [0.18.45] Map generator goes haywire
Thanks for the report, fixed for version 1.1.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.