Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with mods loaded in a different world #47932

Closed
wapcaplet opened this issue Mar 7, 2021 · 4 comments · Fixed by #47938
Closed

Errors with mods loaded in a different world #47932

wapcaplet opened this issue Mar 7, 2021 · 4 comments · Fixed by #47938
Assignees
Labels
<Bug> This needs to be fixed Character / World Generation Issues and enhancements concerning stages of creating a character or a world Mods: Magiclysm Anything to do with the Magiclysm mod Mods Issues related to mods or modding

Comments

@wapcaplet
Copy link
Contributor

wapcaplet commented Mar 7, 2021

Describe the bug

When starting a new game in a new world, the mods in other worlds may cause error messages.

Here is one such message:

 DEBUG    : Harvest list owlbear has invalid entry: owlbear_stone and adrenal_gland_large

 FUNCTION : static void harvest_list::check_consistency()
 FILE     : src/harvest.cpp
 LINE     : 149

Others include:

 DEBUG    : Harvest list owlbear_cub has invalid entry: owlbear_stone
 DEBUG    : Harvest list bulette has invalid entry: bulette_plate, bulette_pearl, and adrenal_gland_large
 DEBUG    : Harvest list demon_spider has invalid entry: demon_chitin_piece, demon_chitin_plate, and demon_spider_fang
 DEBUG    : Harvest list human_large_leather has invalid entry: adrenal_gland_large
 DEBUG    : Harvest list dragon_black has invalid entry: dragon_blood, meat_dragon, dragon_black_scale, and black_dragon_hide_raw
 DEBUG    : Harvest list lemure has invalid entry: tainted_blood
 DEBUG    : Harvest list demon_spider_queen has invalid entry: demon_chitin_piece, demon_chitin_plate, and demon_spider_fang

Steps To Reproduce

  1. Create a new world (A) with "Magiclysm" mod enabled (all other mods and settings at default)
  2. Create a new character in the Magiclysm world (A), then save and exit
  3. Create another new world (B) without enabling the Magiclysm mod
  4. Try to create a new character in the second world (B) - get lots of errors related to Magiclysm

Expected behavior

Mods added to world (A) should have no effect on world (B).

Screenshots

Versions and configuration

  • OS: Linux
    • OS Version: Distributor ID: Pop; Description: Pop!_OS 20.04 LTS; Release: 20.04; Codename: focal;
  • Game Version: 0.E-9956-gf6f104a441 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Bionic Professions [package_bionic_professions],
    Magiclysm [magiclysm]
    ]

Additional context

Found when investigating #47924

@wapcaplet wapcaplet added <Bug> This needs to be fixed Character / World Generation Issues and enhancements concerning stages of creating a character or a world Mods: Magiclysm Anything to do with the Magiclysm mod labels Mar 7, 2021
@OromisElf
Copy link
Contributor

this also happens with other mods - I have a world with quite some mods and then two for testing stuff where I only have one or so mods; I didn't look terribly deep into the json errors I got but from what I can tell, having aftershock, dinomod or sweet cataclysm in a different world and not in yours also affects your current world at least to some degree

@anothersimulacrum
Copy link
Member

Harvest lists (and possibly other things) need something like #33312

@wapcaplet wapcaplet added the Mods Issues related to mods or modding label Mar 7, 2021
@wapcaplet wapcaplet self-assigned this Mar 8, 2021
wapcaplet added a commit to wapcaplet/Cataclysm-DDA that referenced this issue Mar 8, 2021
Harvest data from the previously loaded world was not reset, leading to
a bunch of errors from unrelated mods in a different world.

Add a harvest_list::reset() method to clear the previously loaded
harvest list, and call it from unload_data().

Fix CleverRaven#47932
@PatrikLundell
Copy link
Contributor

I've had it happen the other way around as well:
I saved the "real" game and created a world with one or both of the stats from kills/XP mods, existed that world and loaded the "real" game, only to see that my character had inflated stats. That happened with 0.E2 stable.

@wapcaplet
Copy link
Contributor Author

I saved the "real" game and created a world with one or both of the stats from kills/XP mods, existed that world and loaded the "real" game, only to see that my character had inflated stats. That happened with 0.E2 stable.

I can reproduce this in 0.E-3, but not in experimental 0.E-9956. It looks like this one was probably fixed last year by #40047.

Ramza13 pushed a commit to Ramza13/Cataclysm-DDA that referenced this issue Apr 12, 2021
Harvest data from the previously loaded world was not reset, leading to
a bunch of errors from unrelated mods in a different world.

Add a harvest_list::reset() method to clear the previously loaded
harvest list, and call it from unload_data().

Fix CleverRaven#47932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Character / World Generation Issues and enhancements concerning stages of creating a character or a world Mods: Magiclysm Anything to do with the Magiclysm mod Mods Issues related to mods or modding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants