Probably Simple Trait Mod Question

For specific technical issues and questions.

Probably Simple Trait Mod Question

PostPosted by foxwillow » Tue Apr 04, 2017 19:41

testing, i made a trait that's basically a copy of fair:

Code: Select all
beautiful = { #ATTRACTIVENESS +2
   birth = 5000
   random = yes
   
   sex_appeal_opinion = 40
   
   opposites =  {
      ugly
   }
   
   diplomacy = 1
      
   female_compliment = COMPL_BEAUTY
   female_compliment_adj = COMPL_FAIR
   male_compliment = COMPL_CHARMER
   male_compliment_adj = COMPL_HANDSOME
   child_compliment_adj = COMPL_PRETTY
}


i did everything that the http://www.ckiiwiki.com/Trait_modding#Potential page says (except i havent bothered making the potential women-only, but i want to make sure i get that working, too.

no one is being generated or born with this trait. but i can console it, and i can also have it assigned via event. yes birth 5000 is insane, but that was just for testing and even that didnt work.
foxwillow
Mod Team
 
Posts: 134
Joined: Sun Mar 08, 2015 04:14
Location: MI

Re: Probably Simple Trait Mod Question

PostPosted by blackninja9939 » Tue Apr 04, 2017 20:05

All traits are random = yes by default, the actual mechanics behind getting a random trait are not known to us IIRC.
As for birth = 5000 that should still work but remember it only happens for babies born not characters generated, at birth = 5000 you only have a 50% chance of each character being born with it so try setting it even higher.
Graduate Content Designer on Project Caligula

My amazingly empty Twitter account: @blackninja9939

Posts edited in this colour were done by me for moderation.

My Sub-Mods:
Bloodlines
More Decisions
Colonise Valyiria and Challenge to Duel
More Bookmarks
User avatar
blackninja9939
Moderator
 
Posts: 5696
Joined: Tue Oct 01, 2013 10:50
Location: England

Re: Probably Simple Trait Mod Question

PostPosted by foxwillow » Tue Apr 04, 2017 20:53

yeah, i fast-birthed like 25 kids, none had it.

this thread was last resort for the record, i tested for around 7 hours before deciding i have to be missing something. :lol:

i know random = yes is default, i was just trying to cover bases.

i'm stumped cause this guy's reddit thread:
https://www.reddit.com/r/CrusaderKings/ ... ayer_only/

but now i'm wondering if maybe generated characters somehow use the player designer/customizer, and if i need to have customizer = yes

which would seem not right, but i'll test that next once i cram like 10 hours of (actual) work into 2 hours to make up for almost missing deadlines cause of this :lol:
foxwillow
Mod Team
 
Posts: 134
Joined: Sun Mar 08, 2015 04:14
Location: MI

Re: Probably Simple Trait Mod Question

PostPosted by foxwillow » Tue Apr 04, 2017 21:21

well that didnt do it

hrmph
foxwillow
Mod Team
 
Posts: 134
Joined: Sun Mar 08, 2015 04:14
Location: MI

Re: Probably Simple Trait Mod Question

PostPosted by foxwillow » Wed Apr 05, 2017 03:40

ok, i literally copied the random reddit user's trait and it works and populates in game at random.

after taking things in and out, it looks like for the game to utilize it, it needs to either have

personality = yes

OR

an inheritance chance

to wind up getting generated. good to know, i guess?
foxwillow
Mod Team
 
Posts: 134
Joined: Sun Mar 08, 2015 04:14
Location: MI

Re: Probably Simple Trait Mod Question

PostPosted by KappaKid » Thu Apr 13, 2017 01:50

Hey, I've been adding a number of traits to the game but how would one go about making a trait gender specific?
KappaKid
 
Posts: 68
Joined: Wed Mar 15, 2017 13:53

Re: Probably Simple Trait Mod Question

PostPosted by blackninja9939 » Thu Apr 13, 2017 11:11

KappaKid wrote:Hey, I've been adding a number of traits to the game but how would one go about making a trait gender specific?

In the potential put is_female = yes, but that only limits who can get is through means other than script
Graduate Content Designer on Project Caligula

My amazingly empty Twitter account: @blackninja9939

Posts edited in this colour were done by me for moderation.

My Sub-Mods:
Bloodlines
More Decisions
Colonise Valyiria and Challenge to Duel
More Bookmarks
User avatar
blackninja9939
Moderator
 
Posts: 5696
Joined: Tue Oct 01, 2013 10:50
Location: England

Re: Probably Simple Trait Mod Question

PostPosted by SinStar87 » Thu Apr 13, 2017 11:15

You can try adding this to the trait's code;
potential = {
female = yes
}
User avatar
SinStar87
 
Posts: 3138
Joined: Sat Feb 09, 2013 17:24

Re: Probably Simple Trait Mod Question

PostPosted by blackninja9939 » Thu Apr 13, 2017 11:43

Pretty sure just female = yes does not work as a trigger, you would need is_female = yes like it is done in the vanilla traits. Just female = yes is only used in the generation of characters to my knowledge.
Graduate Content Designer on Project Caligula

My amazingly empty Twitter account: @blackninja9939

Posts edited in this colour were done by me for moderation.

My Sub-Mods:
Bloodlines
More Decisions
Colonise Valyiria and Challenge to Duel
More Bookmarks
User avatar
blackninja9939
Moderator
 
Posts: 5696
Joined: Tue Oct 01, 2013 10:50
Location: England

Re: Probably Simple Trait Mod Question

PostPosted by foxwillow » Fri Apr 14, 2017 00:54

as posted, potential = { is_female = yes } will make it so only females are generated with the trait. i think it needs to be either inheritance or personality to be generated, i havent played with mechanics much yet

if you make female only personality trait, does the game allow a female guardian with the trait to pass it to their wards?

if so you could make an event to continually remove them from males, would only be present for a few days before it's removed

the only female-only trait i have made is "beautiful" as well as the opposite "handsome," both gender-specific, but also both congenital, so im not sure if a personality trait works differently. obviously people aren't spreading beauty to their wards. :lol:

EDIT: one thing i will note, is that the game seems to generate many more men on immediate startup than it does women. while i made handsome and beautiful, i gave them both birth = 50, and on startup there were usually 6 or so men with handsome, and zero women, leading me to believe i had failed something... turned out that progressing a month or so provided the women, they just weren't generated yet.
foxwillow
Mod Team
 
Posts: 134
Joined: Sun Mar 08, 2015 04:14
Location: MI


Return to Technical Discussion

Who is online

Users browsing this forum: No registered users and 0 guests