CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
9.98k stars 4.08k forks source link

Places where I can't build scaffolding but should. And places where I can but shouldn't #73324

Closed IdleSol closed 2 months ago

IdleSol commented 2 months ago

Describe the bug

I've encountered several places where I can't build scaffolding. I don't know what exactly fails the test.

Normal tile, nothing on it. There is no ceiling (or it is invisible). So I assume that there is either a bug in the map generation here, or a bug in one of the pre_special validation functions.

And also places where I could have built scaffolding. But I shouldn't have, because there were foreign objects there.

The modified constr_scaffolding_pipe_up construction was used for testing. Construction time and required materials were reduced (1 minute and 1 pipe).

The save number corresponds to the description paragraph and screenshots

  1. You can't build scaffolding on tiles. It occurs where there are a lot of trees. I encountered a field on OMT, but it had a group of trees, a row of which had construction problems. Maybe something with the crowns of the trees? test 1-1 test 1-2

  2. Tall grass. In my opinion this is a mistake. In terms of the game, maybe not. test 2

  3. Bamboo. Can be built. So can the next paragraph. I consider it a mistake because you can't build on most other plants. test 3

  4. Fern. test 4

  5. Mi-Go roof. You can build on most tiles. But there are some where you can't. test 5

  6. Fortified Fort. The area above the entrance. No scaffolding may be built. test 6

  7. Sewage Treatment Plant test 7-1 test 7-2 test 7-3

  8. Wind Turbine. Construction on level 9. But you can't climb them. test 8-1 test 8-2

Attach save file

1.test-trimmed.tar.gz 2.test-trimmed.tar.gz 3.test-trimmed.tar.gz 4.test-trimmed.tar.gz 5.test-trimmed.tar.gz 6.test-trimmed.tar.gz 7.test-trimmed.tar.gz 8.test-trimmed.tar.gz

Steps to reproduce

n/a

Expected behavior

n/a

Screenshots

No response

Versions and configuration

Additional context

You can't build on upturned dirt. I don't think it's a mistake, but maybe you have a different opinion. Fungal bed. Can we build on it? You can't build on it now.

PatrikLundell commented 2 months ago

Thanks. I'll look at it tomorrow. It's most probably an issue with the pre_special definitions. I can't rule out issues with some pre_specials themselves, but it might be a matter of an unsuitable set of them.

PatrikLundell commented 2 months ago
  1. Very lucky/unlucky placement. There are sewage pipes below ground here. The single support check fails because there's not enough support from below (the scaffolding would presumably crash through the ground).
  2. Tall grass does not have the "FLAT" flag, which causes the empty check to fail. This is a very common check...
  3. Bamboo has the "FLAT" flag, except for the tall bamboo (somewhat like tall grass).
  4. Fern has the "FLAT" flag. The reason you can't build on plants is that the empty check rejects places with items on them, and plants are generally items. Grass, bamboo, and fern are terrain, in contrast.
  5. It's the single support requirement kicking in again. There are walls beneath the two accepted tiles, but a roof at the level below for the others.
  6. Single support again. There's wall under the legal tiles, but a space under the others.
  7. Sewage under the illegal tiles in the first case. Glass walls under the second case legal tiles, while rooms under the illegal ones. Wall and door under the legal ones in the last case, with rooms under the others.
  8. The construction issue is again due to the single support requirement. The issue with not being able to go up seems to be a bug in the game: The code assumes the map goes up to and including Z=10, but you can't actually go higher than Z=9. You can't look up to Z=10, and the debug functionality to modify the map doesn't allow me to look at Z=10 either. Something is wrong in the game. #73353 produced.

I'm still considering whether to remove the support requirement or whether to tell the player about it. I'm not going to do anything about bamboo/grass/fern, as that's a standard construction check. If you think that should be changed, feel free to write a suggestion or bug report (this is a borderline case between the two).

Fungal mass and fungal clump both lack the "FLAT" flag, and I assume that's the case with upturned dirt as well.

GuardianDll commented 2 months ago

should this be closed as fixed by #73380? might be easier to edit the issue to mention one that are still need to be fixed