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

New random characters are babies (e.g. 2 years old) #68059

Closed
pwalsh0 opened this issue Sep 9, 2023 · 2 comments · Fixed by #68099
Closed

New random characters are babies (e.g. 2 years old) #68059

pwalsh0 opened this issue Sep 9, 2023 · 2 comments · Fixed by #68099
Labels
<Bug> This needs to be fixed Good First Issue This is a good first issue for a new contributor Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@pwalsh0
Copy link

pwalsh0 commented Sep 9, 2023

Describe the bug

Start a new random game, look at characters age.

Attach save file

N/A

Steps to reproduce

Start a new game with default scenario.

Expected behavior

Characters should be some minimum age at least - not babies.

Screenshots

No response

Versions and configuration

  • OS: Linux
    • OS Version: Distributor ID: Pop; Description: Pop!_OS 22.04 LTS; Release: 22.04; Codename: jammy;
  • Game Version: a1c4973 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

Additional context

No response

@pwalsh0 pwalsh0 added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Sep 9, 2023
@ZhilkinSerg ZhilkinSerg added <Bug> This needs to be fixed (S2 - Confirmed) Bug that's been confirmed to exist Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Sep 9, 2023
@ZhilkinSerg
Copy link
Contributor

diff --git a/src/profession.cpp b/src/profession.cpp
index a46f97414bd..b18f7ac8ba0 100644
--- a/src/profession.cpp
+++ b/src/profession.cpp
@@ -195,8 +195,8 @@ void profession::load( const JsonObject &jo, const std::string_view )
         _description_male = to_translation( "prof_desc_male", desc_male );
         _description_female = to_translation( "prof_desc_female", desc_female );
     }
-    optional( jo, was_loaded, "age_lower", age_lower );
-    optional( jo, was_loaded, "age_upper", age_upper );
+    optional( jo, was_loaded, "age_lower", age_lower, 16 );
+    optional( jo, was_loaded, "age_upper", age_upper, 55 );

     if( jo.has_string( "vehicle" ) ) {
         _starting_vehicle = vproto_id( jo.get_string( "vehicle" ) );

@NetSysFire NetSysFire added the Good First Issue This is a good first issue for a new contributor label Sep 9, 2023
casswedson added a commit to casswedson/Cataclysm-DDA that referenced this issue Sep 11, 2023
@kevingranade
Copy link
Member

This issue has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/where-are-the-feral-children-and-what-happened-to-the-unborn-ones/28081/22

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 Good First Issue This is a good first issue for a new contributor Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants