More-Wrong / Factorio-True-Nukes

A factorio mod adding realistic nuclear blasts, and more nuclear options.
MIT License
3 stars 8 forks source link

Nuclear water generating in world #4

Closed LuminaSapphira closed 2 years ago

LuminaSapphira commented 2 years ago

Steps to recreate issue

  1. Generate a world with a large amount of water, specifically islands.
  2. Some islands will have a small amount of crater water nuclear-deep-fill generated around the edge Map exchange string that demonstrates issue is below.

I did a bit of debugging and fighting with poorly documented world generation stuff and it seems to be related to allowed_neighbors. When the mod copies the table from data.raw["tile"]["water"], it doesn't change the property. It's unclear to me what exactly allowed_neighbors is used for, but it seems to be used in world generation to create (in-world, not graphical) transitions between tiles. I created a tiny debug mod that simply sets data.raw["tile"]["nuclear-deep-fill"].allowed_neighbors = {}, and it seems to fix the issue. Why this only occurs with deep-fill and not the other water tiles is beyond me though.

Map exchange string

Issue occurs at around [315, -170] (and many other places)

>>>eNpjZGBksGUAgwZ7BoYDDhwsyfmJORAeBHMl5xcUpBbp5helIgtz
JheVpqTq5meiKk7NS82t1E1KLEZRzJFZlJ+HbgJrcUl+HqpISVFqajG
yCHdpUWJeZmkuul4GRvPJa5obWuQYQPh/PYPC//8gDGQ9APoFhBkYGy
AqgWIwwJqck5mWxsCg4AjETiBpRkbGapF17g+rptgzQtToOUAZH6AiB
5JgIp4whp8DTikVGMMEyRxjMPiMxIBYWgK0AqqKwwHBgEi2gCQZGXvf
bl3w/dgFO8Y/Kz9e8k1KsGc0dBV598FonR1Qkh3kTyY4MWsmCOyEeYU
BZuYDe6jUTXvGs2dA4I09IytIhwiIcLAAEge8mRkYBfiArAU9QEJBhg
HmNDuYMSIOjGlg8A3mk8cwxmV7dH8AA8IGZLgciDgBIsAWwl3GCGE69
DswOsjDZCURSoD6jRiQ3ZCC8OFJmLWHkexHcwhmRCD7A01ExQFLNHCB
LEyBEy+Y4a4BhucFdhjPYb4DIzOIAVL1BSgG4YFkYEZBaAEHcHAzMyA
AMG0UqElKAAD0Y6B5<<<
More-Wrong commented 2 years ago

Hi, thanks for the bug report. I wasn't really sure how to make the graphical transitions work, so there may be... spandrels of the process, and that may be one of them - I originally set it to something different, in the hopes that it would help, then gave up on it when it didn't seem to do anything. On those grounds, I have no problem at all with adding code to do this. However, in the interests of solving the bug, I tried to find the crater in the world you gave, and I couldn't. See if that lines up with what you see in the map. NoDeepCrater Since we seem to be getting different results, what other mods were you using at the time, and what version of the mod, and Factorio, were you using?

LuminaSapphira commented 2 years ago

My apologies, I managed to give you the wrong coordinate from my list of coordinates to check. [314, -170] should be the correct one. For copy/paste: game.player.print(game.player.surface.get_tile{314, -170}.name)

The nuclear fill actually looks identical to water, only becoming obvious when used with Alien Biomes, where transitions were not properly generated (this is on the Alien Biomes, side, do not worry). This caused me to believe it was a minor conflict between Alien Biomes and True Nukes. However, I was able to verify that the nuclear-deep-fill does generate in worlds without Alien Biomes. My full mod list is

base @ 1.1.61
Delete-Chunk-Tool @ 1.0.1
test_mod @ 0.0.0
True-Nukes @ 0.2.10
True-Nukes-Graphics @ 0.0.1

test_mod is the aforementioned debug mod that executed the allowed_neighbors fix.

When locating the tiles, I used the Map Editor Tiles > Variations functionality to highlight the tiles, the results of which are below.

image

More-Wrong commented 2 years ago

Yeah, I've got that now. It turns out that I was messing with the allowed_neighbors it's just I was doing it badly in so many ways, and I didn't know what it did. Anyway, I'll fix it in the next release.

More-Wrong commented 2 years ago

Check the new version, that should fix everything.