CleverRaven / Cataclysm-DDA

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

Mods that modify existing mutations cause unrecoverable errors if they modify an enchantment of a mutation. #72244

Open NancokPS2 opened 6 months ago

NancokPS2 commented 6 months ago

Describe the bug

If a mod tries to modify a mutation trough the use of copy-from, altering its enchantments prevents a world with the mod from running.
This does not happen if the enchantment field in the mutation is untouched.

Attach save file

N/A

Steps to reproduce

  1. Make a mod that modifies enchantments of a mutation
  2. Create a character for a world with the mod
  3. Error

Expected behavior

The game runs like usual, letting the mod modify the enchantment like it modifies every other field.

Screenshots

image
image

Versions and configuration

Additional context

crash.log debug.log

NancokPS2 commented 6 months ago

Update: defining the enchantments beforehand (instead of doing it in-line) serves as a work around:
image

It is currently unknown if this has any side-effects.

jwgrawe commented 5 months ago

Seems to happen in general when mod files try to modify existing inline enchantments. Delaying the building of inline enchantments until after loading all mod files might help, I suppose (but might also cause a lot of other shenanigans).

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.