Forum Announcement, Click Here to Read More From EA_Cade.

num_blacklist_allowed Issue in TraitTest

ScumbumboScumbumbo Posts: 148 Member
Was helping out another modder to figure out the num_blacklist_allowed behavior in a trait test, and we noticed a discrepency between the way the TDESC is worded and what actually occurs. The TDESC states this value should be tuned to the number of blacklisted traits which are allowed for the subject to have without triggering failure; however due to the use of >= in the Python code rather than just >, the actual behavior is that tuned value is the threshold of blacklisted traits which triggers a failure.

In other words, if you have a list of three blacklisted traits, but you want a Sim to be allowed to have 2 of them without it failing (only fails if the Sim has all three blacklisted traits) you would tune num_blacklisted_allowed to 3. If tuned to having 2 traits allowed, the test will fail as soon as the code sees the Sim has 2 of the blacklisted traits.

I suppose this really is a bug, but having figured out how it works it would be nice if things stay that way. We've noticed that the tunings in the game do appear to account for this improperly worded behavior, so fixing the "bug" would require all of those to be rewritten.

@SimGuruModSquad It would be nice if the TDESC was clarified to indicate that it is the threshold for the test to fail, rather than actually being the number allowed before a failure is triggered.

Comments

Sign In or Register to comment.
Return to top