[Bilka] [0.18.45] Map generator goes haywire

This subforum contains all the issues which we already resolved.
Post Reply
mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

[Bilka] [0.18.45] Map generator goes haywire

Post by mrvn »

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:
462892369.png
462892369.png (254.25 KiB) Viewed 3550 times
But when I start the game for real and generate a map preview in the GUI I get this:
gui.png
gui.png (1.96 MiB) Viewed 3550 times
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.
Attachments
cargo-ships_0.0.54.zip
cargo-ships mod with map generator
(58.09 MiB) Downloaded 164 times

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.18.45] Map generator goes haywire

Post by mrvn »

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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.18.45] Map generator goes haywire

Post by Rseding91 »

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
If you want to get ahold of me I'm almost always on Discord.

Bilka
Factorio Staff
Factorio Staff
Posts: 3132
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.18.45] Map generator goes haywire

Post by Bilka »

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.

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.18.45] Map generator goes haywire

Post by mrvn »

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?

Bilka
Factorio Staff
Factorio Staff
Posts: 3132
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [Bilka] [0.18.45] Map generator goes haywire

Post by Bilka »

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.

Post Reply

Return to “Resolved Problems and Bugs”