Firstly I've searched on here, through the source (as best I could -- need to get something better than Windows search) and the web.
In the file 'module_scripts.py' you get blocks of code that define an NPC companions morality, personality etc. For the most part it seems to be used with the NPC dialog entries in 'module_strings.py' to generate what NPCs say and when. Anyway here goes.
I can't for the life of me work out exactly what each morality type in 'slot_troop_morality_type' (which can be tmt_aristocratic, tmt_egalitarian, tmt_humanitarian, tmt_honest, or tmt_pious) does, what 'slot_troop_morality_value' (I'm guessing maybe a start morality value) is used for, and why there's also a secondary lot of morality settings (for only some of the NPCs) in 'slot_troop_2ary_morality_type' and 'slot_troop_2ary_morality_value'.
With regards to the morality settings I suspect they are used in various places to determine a companion NPCs response in certain situations eg. you attack a town and decide to ransack it. I'm probably way off, but I suspect the value is kept track of and when it reaches zero or something, that's when the NPC kicks up a stink and leaves your party. Maybe. I realise I could just cut and paste blindly, but as I'm designing a series of companion NPCs in a way to fit them into the game properly, I'm wanting to decipher that entire block entry made up of 'troop_set_slot' commands used for each NPC in 'module_scripts.py'.
Come to think of it I'm not entirely sure what 'slot_troop_town_with_contacts' and 'slot_lord_reputation_type' do either (although I can guess with the latter that it has something to do with their personality type when made a fief or something).
Everything else has been a piece of cake. Sort of.

Edit: They seem to tie in with calls to a script called 'script_objectionable_action', which is called in various places in different situations. eg. (call_script, "script_objectionable_action", tmt_egalitarian, "str_men_unpaid"), or (call_script, "script_objectionable_action", tmt_egalitarian, "str_men_hungry"), or (call_script, "script_objectionable_action", tmt_honest, "str_fail_quest"). However I'm yet to find where this script actually is.

Edit: Anyway after installing a half decent file search tool and trying again I got the following.
module_dialogs.py:
(call_script, "script_objectionable_action", tmt_honest, "str_squander_money"),
(call_script, "script_objectionable_action", tmt_humanitarian, "str_murder_merchant"),
(call_script, "script_objectionable_action", tmt_humanitarian, "str_round_up_serfs"),
(call_script, "script_objectionable_action", tmt_humanitarian, "str_round_up_serfs"),
module_game_menus.py:
(call_script, "script_objectionable_action", tmt_aristocratic, "str_flee_battle"),
(call_script, "script_objectionable_action", tmt_aristocratic, "str_flee_battle"),
(call_script, "script_objectionable_action", tmt_egalitarian, "str_excessive_casualties"),
(call_script, "script_objectionable_action", tmt_aristocratic, "str_flee_battle"),
(call_script, "script_objectionable_action", tmt_humanitarian, "str_steal_from_villagers"),
(call_script, "script_objectionable_action", tmt_humanitarian, "str_loot_village"),
(call_script, "script_objectionable_action", tmt_humanitarian, "str_loot_village"),
module_presentations.py:
(call_script, "script_objectionable_action", tmt_egalitarian, "str_men_unpaid"),
module_scripts.py:
(call_script, "script_objectionable_action", tmt_honest, "str_fail_quest"),
module_simple_triggers.py:
(call_script, "script_objectionable_action", tmt_egalitarian, "str_men_hungry"),
Which covers: tmt_aristocratic, tmt_egalitarian, tmt_humanitarian, tmt_honest. However tmt_pious obviously isn't used.
Oh dear. The script that covers all this is _RIGHT UNDERNEATH_ the blocks that define NPC companion behaviour. Whoops... I forgot that the actual script name would be 'objectionable_action', minus the 'script_'. Anyway attempting to decipher that (my background is mostly languages like C, Python is new to me) I think I have a vague understanding as to how it works. I'm still not sure whether a higher morality value is good or bad. Looks to me as if it adds or multiplies the value when bad things happen, rather than decreasing it.
The secondary morality type and value is simply (I now feel stupid for asking) to allow an NPC to have more than one type of morality check in place.
Amazingly all it took was for me to get off my backside and find a decent file search tool. Using that I've worked out more in the last five minutes than the previous few hours.

Edit: Basically the morality types work thusly.
'Honest':
- Squander Money: From the debt collection quest, if you don't repay
the quest giver the total amount owed, you risk upsetting an
honest NPC.
- Quest Failure: Certain quests if failed will upset an honest NPC.
'Humanitarian':
- Murder a Merchant: If the player completes this quest
they will upset a humanitarian NPC.
- Round Up Serfs: If the player completes this quest, which
involves rounding up serfs that have escaped from a noble,
then they risk upsetting a humanitarian NPC.
- Steal From Villagers: If you select the 'Take hostile
action' while in a town and then select 'Force the peasants
to give you supplies', you will risk upsetting this NPC.
- Loot A Village: If you choose to loot a village, this NPC
will become upset.
'Aristocratic':
- Flee From Battle: This NPC will likely get upset any time
you choose to flee from battle.
'Egalitarian':
- Excessive Casualties: This NPC may get upset if you take an
excessive number of casualties during a battle. They are
more lenient if the battle has a good outcome.
- Men Unpaid: If you are unable to pay your men when pay day
arrives, this NPC will get upset.
- Men Hungry: If you have no food supplies and therefore
unable to feed your men, this NPC will get upset.
The only real question I have left is whether or not a high morality value is good or bad.