Better-Scenes / RimConnect-mod

A Twitch integration for the game RimWorld
GNU General Public License v3.0
15 stars 8 forks source link

Add more variety to bought good/bad colonists #43

Closed dispencerr closed 11 months ago

dispencerr commented 1 year ago

I added several additional traits that I felt were objectively good/bad to the pawn "good trait" and "bad trait" list used when good/bad colonists are purchased. "Night owl" is also added as a good trait for variety, as although it can result in a mood debuff if awake during the day, the constant mood bonus from being awake at night and the fact that they will use workbenches when other pawns are normally asleep is a net positive. All other new traits are objectively positive/negative only.

In addition, previously both trait lists only had degree "2" traits, so I added the degree "1" traits in both directions for more variety. I adjusted the code to use a traitType "dictionary" to pull traits from, preventing it from randomly choosing both the degree "1" and degree "2" trait on the same pawn.

dispencerr commented 1 year ago

@InfinitySamurai I created a SelectRandomTraits function that takes the dictionary and number of traits and returns a list of traitDefs to apply to the colonist as suggested, removing repeated code. I also created a function to initialize the good and bad trait dictionaries based on the lists.