Traits which add to attributes reapply that bonus everytime gender is changed

Summary:
A trait can have, in json, a bonus to body/spirit/mind. However, in the embark window, if a hearthling with this trait has their gender toggled, this bonus gets re-applied

Steps to reproduce:

  1. Download example mod
  2. (Optional) look through the three json files, verify there is no lua or any other wierdness
  3. Go to embark window, all hearthlings with have the new “+10 body” trait, and will correctly have a body stat between 11 and 16
  4. Repeatedly change the gender of the hearlthings

Expected Results:
All stats should remain the same

Actual Results:
Stats (sometimes?) increment by 10 each time gender is toggled

Notes:
I have gone out my way to make this as painless as possible for y’all to fix, as it is affecting my beloved mod

Also I hope its nice to receive a bug report where the steps to reproduce are actually steps that reproduce the issue :wink:

Attachments:
https://steamcommunity.com/sharedfiles/filedetails/?id=1447052068

Version Number and Mods in use:
Debug Mod,
And the example mod in question

System Information:
N/A

Thanks for the detailed repro! This is fixed in the next release.

4 Likes