ter_transform does not set the roof until after a save/load cycle
Describe the bug
When using a ter_transform to transform terrain with a defined roof, the roof does not actually appear until after the game is saved and loaded.
Attach save file
Steps to reproduce
- Load game.
- Open the spellcasting menu and cast the "The Forest Offers Shelter" spell, and use the "Grow Wood Wall" sub-effect on the square next to you
- Teleport up on top of that square. Despite being
t_triffid_bark_wallwhich has"roof": "t_barkfloor",set, you will fall after waiting one turn. - Save and quit
- Re-enter the game.
- Attempt to teleport up on top of the wooden wall again and wait a turn.
- Terrain now has a roof, you do not fall.
Expected behavior
Roof is set at the same time the terrain is transformed.
Screenshots
Versions and configuration
- OS: Windows
- OS Version: 10.0.19045.3803 (22H2)
- Game Version: 2a67568 [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth], Xedra Evolved [xedra_evolved] ]
Additional context
Xedra Evolved used to get a convenient ter_transform effect to demonstrate the bug.
Update - nothing does
upd: okay i thought nest also don't spawn the roof for this exact reason, but it is only related to the terrain/furniture defined roof
for example, roof, that is added when you climb, stops spawning at some point
reloading helps to fix it and, for some reason, debug long range teleportation
/confirm
Can you not just transform the z1 terrain at the same time? As far as I'm aware that field is purely for auto-roofs and shouldn't be relied upon in any situation where it's not necessary. Related issue where I discuss auto-roofs with PatrickLundell: #70603
I semi-addressed this problem with monster stomach, baby, and milk cycles by simply adding a manual check every couple of hours. That wouldn't be a perfect fix here, but if we ran it a bit more often (ten minutes or so) it might solve most of the issue.
I had a weird experience last week which might be related:
Raided a tower lab which was infested with fungus, burned the rooms which had the fungus in it; after the burning was done, I revisited the rooms - only to find that all the floors were gone, and all the items (especially the ash) had fallen to the level below. Thought that that was working as intended, and left. When I returned a couple of days later, the floors were there again.
Can you not just transform the z1 terrain at the same time? As far as I'm aware that field is purely for auto-roofs and shouldn't be relied upon in any situation where it's not necessary. Related issue where I discuss auto-roofs with PatrickLundell: #70603
Unfortunately not--spell-effect-based ter_transforms can't affect multiple Z-levels at once, and EoC-based ones can't be targeted at arbitrary areas of ground, only the caster or a monster or NPC target.
Yikes :c Can you make a spell trigger two spells that transform 1 each or something gross to work around that?
and EoC-based ones can't be targeted at arbitrary areas of ground
You can't use location_variable_adjust? https://github.com/CleverRaven/Cataclysm-DDA/issues/69193#issuecomment-1822489938
Additionally, check out how I assigned the var here: https://github.com/CleverRaven/Cataclysm-DDA/blob/74771e195489cf73125afc53c2f0710a3c3583c1/data/json/monsters/zed_lieutenant.json#L143-L154
What you are describing should be plenty doable, although maybe a bit unwieldy.