Ludeon Forums

RimWorld => Mods => Help => Topic started by: Zombie_Striker on April 26, 2020, 03:35:20 PM

Title: How do I give a pawn a random trait that does not conflict with other traits?
Post by: Zombie_Striker on April 26, 2020, 03:35:20 PM
Basically, just the title. Since the mod I'm working on makes sure a list of trait is always added to the pawn, if a is already generated with the trait, I want to basically re-roll the trait to something else. How do I make sure that the trait selected does not conflict with any of the traits the pawn already has?
Title: Re: How do I give a pawn a random trait that does not conflict with other traits?
Post by: Jiruharudo on April 30, 2020, 01:44:45 PM
I'm interested as well

I tried figuring it out with mods that add traits somehow, but it seems that all of these are C+ coding, which I'm not good at, unfortunately
Title: Re: How do I give a pawn a random trait that does not conflict with other traits?
Post by: NRFBToyStore on May 02, 2020, 03:41:23 AM
Quote from: Zombie_Striker on April 26, 2020, 03:35:20 PM
Basically, just the title. Since the mod I'm working on makes sure a list of trait is always added to the pawn, if a is already generated with the trait, I want to basically re-roll the trait to something else. How do I make sure that the trait selected does not conflict with any of the traits the pawn already has?

This is a basic function, just download any trait mod and look at the code. It's a very simple "if A exists, ignore B/C", just don't have code off top of my head.