Aside from the fact this should be in the modding sub-forum I can give you some basic answers.
Most creature defined in the raws will have a [CASTE:NAME] tag, for most creatures caste just seems to define male from female, here is the caste definition from creature_standard for humans.
[CASTE:FEMALE]
[FEMALE]
[MULTIPLE_LITTER_RARE]
[CASTE:MALE]
[MALE]
[SET_BP_GROUP:BY_TYPE:LOWERBODY][BP_ADD_TYPE:GELDABLE]
[BODY_DETAIL_PLAN:FACIAL_HAIR_TISSUE_LAYERS]
[SELECT_CASTE:ALL]
[SET_TL_GROUP:BY_CATEGORY:HEAD:HAIR]
[PLUS_TL_GROUP:BY_CATEGORY:HEAD:CHEEK_WHISKERS]
[PLUS_TL_GROUP:BY_CATEGORY:HEAD:CHIN_WHISKERS]
[PLUS_TL_GROUP:BY_CATEGORY:HEAD:MOUSTACHE]
[PLUS_TL_GROUP:BY_CATEGORY:HEAD:SIDEBURNS]
[PLUS_TL_GROUP:BY_CATEGORY:HEAD:EYEBROW]
[PLUS_TL_GROUP:BY_CATEGORY:EYELID:EYELASH]
Humans are the "default" so there is nothing defined in there other then gender/sex, you can add almost any thing into the caste and then every member of that caste will have those quality's here is an example from a mod abbreviated as fufo, I forget what its actually called... furry something I think, that I modified a little my self, a mod of a mod if you will.
[CASTE:DRONE]
[MALE]
[POP_RATIO:10]
[PHYS_ATT_RANGE:STRENGTH:150:600:800:900:1000:1100:1500] -
[PHYS_ATT_RANGE:AGILITY:150:600:800:900:1000:1100:1500] -
[MENT_ATT_RANGE:WILLPOWER:450:950:1150:1250:1350:1550:2250] +
[MENT_ATT_RANGE:INTUITION:450:950:1150:1250:1350:1550:2250] +
[MENT_ATT_RANGE:LINGUISTIC_ABILITY:450:950:1150:1250:1350:1550:2250] +
[MENT_ATT_RANGE:SOCIAL_AWARENESS:450:950:1150:1250:1350:1550:2250] +
[PERSONALITY:CURIOUS:0:35:70]
[PERSONALITY:EXCITEMENT_SEEKING:0:35:70]
[PERSONALITY:DUTIFULNESS:25:65:100]
[PERSONALITY:LUST_PROPENSITY:70:85:100]
[PERSONALITY:ALTRUISM:0:55:100]
[PERSONALITY:SWAYED_BY_EMOTIONS:0:55:100]
[PERSONALITY:LOVE_PROPENSITY:0:55:100]
[PERSONALITY:POLITENESS:0:60:100]
[PERSONALITY:FRIENDLINESS:0:55:100]
[PERSONALITY:ASSERTIVENESS:25:60:100]
[PERSONALITY:SINGLEMINDED:0:55:100]
[PERSONALITY:STRESS_VULNERABILITY:0:55:100]
[PERSONALITY:BRAVERY:0:55:100]
[PERSONALITY:VIOLENT:0:45:100]
[SKILL_LEARN_RATE:CONVERSATION:125]
[SKILL_LEARN_RATE:CONSOLE:115]
[SKILL_LEARN_RATE:PACIFY:115]
[SKILL_LEARN_RATE:NEGOTIATION:105]
[SKILL_LEARN_RATE:JUDGING_INTENT:105]
[SKILL_LEARN_RATE:PERSUASION:105]
[MAXAGE:90:180]
[BODY_SIZE:0:0:10000]
[BODY_SIZE:3:0:20000]
[BODY_SIZE:6:0:40000]
[BODY_SIZE:12:0:80000]
[BABY:3]
[BABYNAME:formicine drone larva:formicine drone larvae]
[CHILD:12]
[CHILDNAME:formicine drone youth:formicine drone youths]
[CASTE_NAME:formicine drone:formicine drones:formicine drone's]
[INTELLIGENT]
[ORIENTATION:MALE:70:20:10]
[ORIENTATION:FEMALE:10:20:70]
[PERSONALITY:Personality_quality:0:50:100]
Determines what personality traits this caste/creature can have and at what level's they'll have them, the first number is the minimum that they can have, the last number is the maximum and the middle is the where the "majority" falls.
So to make men more emotionally angry you would add something like [PERSONALITY:ANGER_PROPENSITY:0:60:100] to the male caste under what ever creature/race you want to have this trait and then they'll have and increased propensity for anger, you'll have to add every emotion individually as each emotion is a different facet of personality, a couple of examples are CHEER_PROPENSITY, HATE_PROPENSITY ect.
You can find a full list of personality facets here
http://dwarffortresswiki.org/index.php/DF2014:Personality_trait, beliefs are cultural and are set in the entity_default file not the creature file.
[ORIENTATION:MALE:70:20:10]
[ORIENTATION:FEMALE:10:20:70]
Determines sexuality, the first number is the chance that they'll be uninterested in that gender, the second number is the chance they'll be lovers but not marry and the last number is the chance that they'll get married, as it stands only married couples produce children.
NOTE: I could be wrong as I'm not the best DF modder, I mostly mod to prepare for the myth gen release so that I can mod Dominions 4 style magic into DF.