How do I give a pawn a random trait that does not conflict with other traits?

Started by Zombie_Striker, April 26, 2020, 03:35:20 PM

Previous topic - Next topic

Zombie_Striker

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?

Jiruharudo

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

NRFBToyStore

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.