CleverRaven / Cataclysm-DDA

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

Hobbies can exceed trait limit if selected last #52746

Closed Terrorforge closed 11 months ago

Terrorforge commented 2 years ago

Describe the bug

You are normally only allowed 12 points of positive and 12 points of negative traits, but if you select your traits first and then go back and select a hobby that gives you traits, those will be added on top. If you do it the other way around, the hobby traits do count towards your max.

Steps To Reproduce

  1. Start new game
  2. Select 12 points of positive and/or negative traits
  3. Select hobbies that bring you over the the trait total, in such a way that the end result is still +/-0.
  4. Start the game to verify the game considers this stat spread valid.

Expected behavior

I don't think Hobby traits should count towards your max at all. And many of them don't, because they don't select traits that are already in the trait list.

However, the least I would expect is that whether hobby traits do or don't let you go over the max, it shouldn't matter when you select the hobby.

Screenshots

image I have 15 points of negative traits here due to selecting the "Butchering" hobby after already having selected 12 points of negative traits

Versions and configuration

Additional context

No response

hexagonrecursion commented 2 years ago

Confirmed: You can't take the genetic downward spiral trait if you have sleeping pill dependence, but you can take sleeping pill dependence even if you already have genetic downward spiral resulting in -14/-12

Traits we get from professions and scenarios do not count toward the cap, but we forgot to also exclude backgrounds (previously known as hobbies). https://github.com/CleverRaven/Cataclysm-DDA/blob/c7004d1567e9b0c717ddc722c6a95f8abe720eb2/src/newcharacter.cpp#L1248-L1267

I-am-Erk commented 2 years ago

I don't know if it's worth fixing this, as the trait cap is a feature we would like to phase out in the long run.

Terrorforge commented 11 months ago

Trait limit was removed, this no longer matters.