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

A Mutation overriding an enchantment-given mutation causes a crash #5992

Open
RobbieNeko opened this issue Jan 27, 2025 · 1 comment
Open
Labels
bug needs verification Does this bug (still) happen? Needs independent reproduction.

Comments

@RobbieNeko
Copy link
Collaborator

RobbieNeko commented Jan 27, 2025

Describe the bug

When a mutation is provided by a enchantment (attached to a bionic), any attempt to mutate a conflicting mutation type (I.E. SKIN, CLAWS) will crash the game.

Steps To Reproduce

  1. Create a bionic that has an "always" enchantment effect that provides a mutation
  2. Via mutagens or debugging, attempt to mutate a mutation that conflicts with the first

Screenshots

No response

Versions and configuration

OS: Windows
OS Version: 10.0.19045.5371 (22H2)
Game Version: 0.7.0[64-bit]
Graphics Version: Tiles
LAPI Version: 2

(BaronOhShi)

Additional context

Here is my a quick example of a bionic I was using if needed:

 {
    "id": "pcbm_robo_fur",
    "copy-from": "bionic_general",
    "type": "BIONIC_ITEM",
    "name": { "str": "Metal Fur Coat PCBM" },
    "looks_like": "bio_tools",
    "description": "A near full body covering of alloyed hair with subdermal circuitry, while it doesn't actively do much, it's a useful support system for other bionics and other bio-mechanical integrations. Protects against wet and provides a small trickle of power while in sunlight.",
    "price": "12000 USD",
    "difficulty": 12
  },
  {
    "id": "pcbm_robo_fur",
    "type": "bionic",
    "name": { "str": "Metal Fur Coat" },
    "description": "A fine layer of fuzz coats your joints, limbs and head. This artificial fur generates energy from the sun and protects a bit from bash attacks and the rain.",
    "occupied_bodyparts": [ [ "torso", 5 ], [ "head", 8 ], [ "arm_l", 4 ], [ "arm_r", 4 ], [ "hand_l", 1 ], [ "hand_r", 1 ] ],
"canceled_mutations": [ "DOWN", "LIGHTFUR", "FUR", "URSINE_FUR", "LUPINE_FUR", "FELINE_FUR", "LYNX_FUR", "PATCHSKIN1", "PATCHSKIN2", "CHITIN" , "CHITIN2" , "CHITIN3", "CHITIN_FUR", "CHITIN_FUR2", "CHITIN_FUR3", "PLANTSKIN", "BARK", "LEAVES" , "LEAVES2", "LEAVES3"  ],
"fuel_options": [ "sunlight" ],
    "fuel_efficiency": 1,
    "time": 1,
"enchantments": [ "PCBM_furmut" ],
    "flags": [ "BIONIC_SHOCKPROOF", "BIONIC_POWER_SOURCE" ]
  },  
        {
    "type": "enchantment",
    "id": "PCBM_furmut",
    "condition": "ALWAYS",
"mutations": [ "PCBM_metal_fur", "pcbm_robo_ruff" ]
  },
    {
    "type": "mutation",
    "id": "PCBM_metal_fur",
    "name": { "str": "Energised Fur" },
    "points": -2,
"valid": false,
    "visibility": 4,
    "ugliness": -1,
    "description": "Metaphorically thrumming with power, this metal covering efficiently gathers power from the sun and routes power throughout the body. It also covers up your natural scent with the smell of ozone.",
    "types": [ "SKIN", "SCENT" ],
    "category": [ "ROBOT" ],
    "scent_intensity": -2000,
    "armor": [ { "parts": "ALL", "bash": 3 } ],
"mixed_effect": false,
"wet_protection": [
      { "part": "head", "ignored": 1 },
      { "part": "leg_l", "ignored": 5 },
      { "part": "leg_r", "ignored": 5 },
      { "part": "foot_l", "ignored": 1 },
      { "part": "foot_r", "ignored": 1 },
      { "part": "arm_l", "ignored": 4 },
      { "part": "arm_r", "ignored": 4 },
      { "part": "hand_l", "ignored": 1 },
      { "part": "hand_r", "ignored": 1 },
      { "part": "torso", "ignored": 10 }
    ]
  }
14:07:28.877 ERROR DEBUGMSG : src/main_menu.cpp:1020 [bool main_menu::load_character_tab(const string&)] (error message will follow backtrace)
  #0
    (dbghelp: @0x7ff65f3abba4[cataclysm-bn-tiles.exe+0x2fbba4]), 
    (libbacktrace: Z21debug_write_backtraceRSo+0x9e@0x1402fbba4),
    0x1402fbba4    src/debug.cpp:1072    debug_write_backtrace(std::ostream&)
  #1
    (dbghelp: @0x7ff65f3af29a[cataclysm-bn-tiles.exe+0x2ff29a]), 
    (libbacktrace: ZN6detail12realDebugLogE2DL2DCPKcS3_S3_+0x1ff@0x1402ff29a),
    0x1402ff29a    /opt/mxe/usr/x86_64-w64-mingw32.static.gcc11/include/time.h:230    time
    0x1402ff29a    src/debug.cpp:1417    detail::realDebugLog(DL, DC, char const*, char const*, char const*)
  #2
    (dbghelp: @0x7ff65f3aeb65[cataclysm-bn-tiles.exe+0x2feb65]), 
    (libbacktrace: Z12realDebugmsgPKcS0_S0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x181@0x1402feb65),
    0x1402feb65    src/debug.cpp:468    realDebugmsg(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
  #3
    (dbghelp: @0x7ff65fe8c525[cataclysm-bn-tiles.exe+0xddc525]), 
    (libbacktrace: Z12realDebugmsgIJPKcEEvS1_S1_S1_S1_DpOT_+0x85@0x140ddc525),
    0x140ddc525    /opt/mxe/usr/lib/gcc/x86_64-w64-mingw32.static.gcc11/11.2.0/include/c++/bits/basic_string.h:671    ~basic_string
    0x140ddc525    /opt/mxe/usr/lib/gcc/x86_64-w64-mingw32.static.gcc11/11.2.0/include/c++/bits/basic_string.h:671    std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
    0x140ddc525    src/debug.h:84    void realDebugmsg<char const*>(char const*, char const*, char const*, char const*, char const*&&)
  #4
    (dbghelp: @0x7ff65f66b2c7[cataclysm-bn-tiles.exe+0x5bb2c7]), 
    (libbacktrace: ZN9main_menu18load_character_tabERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x8e5@0x1405bb2c7),
    0x1405bb2c7    src/main_menu.cpp:1022    main_menu::load_character_tab(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
  #5
    (dbghelp: @0x7ff65f66e9d7[cataclysm-bn-tiles.exe+0x5be9d7]), 
    (libbacktrace: ZN9main_menu14opening_screenEv+0xf01@0x1405be9d7),
    0x1405be9d7    src/main_menu.cpp:811    main_menu::opening_screen()
  #6
    (dbghelp: @0x7ff6607836f3[cataclysm-bn-tiles.exe+0x16d36f3]), 
    (libbacktrace: main+0x1bc7@0x1416d36f3),
    0x1416d36f3    src/main.cpp:779    main
  #7
    (dbghelp: @0x7ff65f0b13c1[cataclysm-bn-tiles.exe+0x13c1]), 
    (libbacktrace: _tmainCRTStartup+0x231@0x1400013c1),
    0x1400013c1    /opt/mxe/tmp-gcc-x86_64-w64-mingw32.static.gcc11/gcc-11.2.0.build_/mingw-w64-v9.0.0/mingw-w64-crt/crt/crtexe.c:323    __tmainCRTStartup
  #8
    (dbghelp: @0x7ff65f0b14d6[cataclysm-bn-tiles.exe+0x14d6]), 
    (libbacktrace: 

Reporting this bug on behalf of BaronOhShi in the Discord (they were having issues with their email on github), I have not personally experienced or tested this bug (yet)

@RobbieNeko RobbieNeko added bug needs verification Does this bug (still) happen? Needs independent reproduction. labels Jan 27, 2025
@Ignaramico
Copy link

same happens when you equip an item with relic data giving a mutation, and you equip another one that cancels it, well i was testing a way to erase spell classes so maybe it had something to do with the spells being erased too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs verification Does this bug (still) happen? Needs independent reproduction.
Projects
None yet
Development

No branches or pull requests

2 participants