Idea: Injectable Traits

Started by InfinityKage, February 08, 2015, 09:12:11 AM

Previous topic - Next topic

InfinityKage

You know how you have the neural transmitters that let you inject skills? How about some that let you inject traits? Like if you want someone to be an optimist or a cannibal or whatever you just fine a transmitter with that trait and have them inject it and BAM! Now they have that trait.

Wastelander

That would be cool. Shouldn't be too hard, either;

1) Copy the thingDef for Neurotrainer from items_exotic.xml
2) the Neurotrainer class it references decompiles nicely, it picks a random skill in PostMake(), and in UsedBy() it applies the skill bump
3) You can add a trait by: pawn.story.traits.GainTrait()

I think the only wrinkle is that some traits can't be applied to everyone (for example I think I remember seeing Bloodthirsty can't be applied to colonists who refuse violence) so you might want to make sure the trait gets applied before destroying the neurotrainer.

InfinityKage

Quote from: Wastelander on February 09, 2015, 06:42:32 PM
That would be cool. Shouldn't be too hard, either;

1) Copy the thingDef for Neurotrainer from items_exotic.xml
2) the Neurotrainer class it references decompiles nicely, it picks a random skill in PostMake(), and in UsedBy() it applies the skill bump
3) You can add a trait by: pawn.story.traits.GainTrait()

I think the only wrinkle is that some traits can't be applied to everyone (for example I think I remember seeing Bloodthirsty can't be applied to colonists who refuse violence) so you might want to make sure the trait gets applied before destroying the neurotrainer.

Now all we need is someone who actually knows how to do this.

blaze7736

I will take a look and see if i can pull it together but this afternoon

InfinityKage

Quote from: blaze7736 on February 10, 2015, 03:49:43 PM
I will take a look and see if i can pull it together but this afternoon

You're doing God's work son.

InfinityKage

Quote from: InfinityKage on February 10, 2015, 09:10:51 PM
Quote from: blaze7736 on February 10, 2015, 03:49:43 PM
I will take a look and see if i can pull it together but this afternoon

You're doing God's work son.

You ever come up with anything Blaze?

Here's an idea:

[Joywire Artist
"[Character] worked in an urbworld lab developing cutting-edge joywire software to maximize user pleasure."
"When the local government imposed harsh restrictions on joywire manufacturing, he began selling his products on the black market."]

SilverTitch

This is a great idea. No more sending pessimest's to cryosleep because of stupid drone, inject with sanguin / optimist. And more importantly, no more forgetting to let them back out when psychic drone is away.


><

InfinityKage

Quote from: SilverTitch on March 05, 2015, 07:40:08 AM
This is a great idea. No more sending pessimest's to cryosleep because of stupid drone, inject with sanguin / optimist. And more importantly, no more forgetting to let them back out when psychic drone is away.


><

Yep. Helps with making a spacific type of colony. Like blood thirsty pirates or something.

MsMeiriona

... I foresee entire colonies of cannibal joggers in my future.


By the by, dev mode does have a "give trait" tool, so the code might already be there

InfinityKage

Quote from: MsMeiriona on March 06, 2015, 05:15:33 AM
... I foresee entire colonies of cannibal joggers in my future.


By the by, dev mode does have a "give trait" tool, so the code might already be there

The only thing worst than a cannibal...

blaze7736

Yes sorry i have not looked into this more exams have hit me hard hence i have had to put modding to the side for awail

InfinityKage

Quote from: blaze7736 on March 06, 2015, 09:30:04 PM
Yes sorry i have not looked into this more exams have hit me hard hence i have had to put modding to the side for awail

Fair enough. Not like I'm doing any good.

MsMeiriona

Quote from: Wastelander on February 09, 2015, 06:42:32 PM
That would be cool. Shouldn't be too hard, either;

1) Copy the thingDef for Neurotrainer from items_exotic.xml
2) the Neurotrainer class it references decompiles nicely, it picks a random skill in PostMake(), and in UsedBy() it applies the skill bump
3) You can add a trait by: pawn.story.traits.GainTrait()

I think the only wrinkle is that some traits can't be applied to everyone (for example I think I remember seeing Bloodthirsty can't be applied to colonists who refuse violence) so you might want to make sure the trait gets applied before destroying the neurotrainer.
There's two types of traits, too, singular and spectrum, I think you can't have more than one trait on a spectrum.

RawCode

you can set pawn data to anything, including invalid combinations, but game may refuse to work in such case.

suggestion is fun, but it does not fit game concept - there is no drama possible when you allowed to "brainwash" your colonists into perfect killing machines.