Mitigation for the exploding phantom tree bug - #1605
Open
SilasD wants to merge 3 commits into
Open
Conversation
verified that this runs ok.
chdoc
reviewed
Aug 16, 2026
chdoc
left a comment
Member
There was a problem hiding this comment.
This looks technically solid, I just had some comments on the documentation. You went a bit overboard on paragraphs. If a sentence uses references like "these" to expand on a previous sentence, I wouldn't put a paragraph break in between.
Comment on lines
+1
to
+23
| -- removes "phantom" trees before they can explode. | ||
| --[====[ | ||
| fix/exploding-trees | ||
| =================== | ||
|
|
||
| By default, this script runs once a month by the Control Panel's Bug Fixes tab. | ||
|
|
||
| This script mitigates a longstanding Dwarf Fortress bug. | ||
|
|
||
| Once a year, trees check if they should grow. The exact day and time of this | ||
| growth is different for every tree. | ||
|
|
||
| Occasionally, when a tree is cut down or otherwise removed from the game, the | ||
| game engine doesn't remove the tree's data from the list of plants. The exact | ||
| details of this are not currently understood. | ||
|
|
||
| For some reason, these "phantom" trees will sometimes collapse during this | ||
| growth. This can stun, injure, or kill units which happen to be near this | ||
| collapse. | ||
|
|
||
| This script finds those trees and sets their dead flag, preventing them from | ||
| growing and collapsing. | ||
| --]====] |
Member
There was a problem hiding this comment.
There is no need for duplicating the documentation.
Suggested change
| -- removes "phantom" trees before they can explode. | |
| --[====[ | |
| fix/exploding-trees | |
| =================== | |
| By default, this script runs once a month by the Control Panel's Bug Fixes tab. | |
| This script mitigates a longstanding Dwarf Fortress bug. | |
| Once a year, trees check if they should grow. The exact day and time of this | |
| growth is different for every tree. | |
| Occasionally, when a tree is cut down or otherwise removed from the game, the | |
| game engine doesn't remove the tree's data from the list of plants. The exact | |
| details of this are not currently understood. | |
| For some reason, these "phantom" trees will sometimes collapse during this | |
| growth. This can stun, injure, or kill units which happen to be near this | |
| collapse. | |
| This script finds those trees and sets their dead flag, preventing them from | |
| growing and collapsing. | |
| --]====] |
| end | ||
| end | ||
|
|
||
| suppress_phantom_exploding_trees() No newline at end of file |
| :summary: Removes "phantom" trees before they can explode. | ||
| :tags: fort bugfix | ||
|
|
||
| By default, this script runs once a month by the Control Panel's Bug Fixes tab. |
Member
There was a problem hiding this comment.
Suggested change
| By default, this script runs once a month by the Control Panel's Bug Fixes tab. | |
| By default, this script is run once a month by the control panel. This can be disabled in the ``Bug Fixes`` tab. |
|
|
||
| By default, this script runs once a month by the Control Panel's Bug Fixes tab. | ||
|
|
||
| This script mitigates a longstanding Dwarf Fortress bug. |
Member
There was a problem hiding this comment.
Suggested change
| This script mitigates a longstanding Dwarf Fortress bug. | |
| This script mitigates the "exploding trees" bug in Dwarf Fortress. |
Comment on lines
+12
to
+17
| Once a year, trees check if they should grow. The exact day and time of this | ||
| growth is different for every tree. | ||
|
|
||
| Occasionally, when a tree is cut down or otherwise removed from the game, the | ||
| game engine doesn't remove the tree's data from the list of plants. The exact | ||
| details of this are not currently understood. |
Member
There was a problem hiding this comment.
Suggested change
| Once a year, trees check if they should grow. The exact day and time of this | |
| growth is different for every tree. | |
| Occasionally, when a tree is cut down or otherwise removed from the game, the | |
| game engine doesn't remove the tree's data from the list of plants. The exact | |
| details of this are not currently understood. | |
| Once a year, trees check if they should grow. The exact day and time of this | |
| growth is different for every tree. Occasionally, when a tree is cut down or | |
| otherwise removed from the game, the game engine doesn't remove the tree's | |
| data from the list of plants. The exact details of this are not currently understood. |
Comment on lines
+19
to
+24
| For some reason, these "phantom" trees will sometimes collapse during this | ||
| growth. This can stun, injure, or kill units which happen to be near this | ||
| collapse. | ||
|
|
||
| This script finds those trees and sets their dead flag, preventing them from | ||
| growing and collapsing. |
Member
There was a problem hiding this comment.
Suggested change
| For some reason, these "phantom" trees will sometimes collapse during this | |
| growth. This can stun, injure, or kill units which happen to be near this | |
| collapse. | |
| This script finds those trees and sets their dead flag, preventing them from | |
| growing and collapsing. | |
| These "phantom" trees will sometimes collapse during this growth. This | |
| can stun, injure, or kill units which happen to be near this collapse. This | |
| script finds those trees and sets their dead flag, preventing them from | |
| growing and collapsing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is closely based on ab9rf's work:
https://discord.com/channels/793331351645323264/807444515194798090/1537901782515318876
more discussion in DFHack Discord #feature-discuss
https://discord.com/channels/793331351645323264/807444515194798090/1537577051073290281
and in Kitfox Discord #bug-discussion
https://discord.com/channels/329272032778780672/1049402643342168114/1537342125543530507
verified that this runs ok.
accidentally pushed directly to the main scripts repo.
guess that's because I have privileges now.
glad I was in a new branch. guess I'll continue.