Personality tags in raws - see
Creature token#personality.
Ex [PERSONALITY:ANGER_PROPENSITY:25:75:100].
Inebiration - see material_template_default.txt. In particular, the tag [CE_CHANGE_PERSONALITY:FACET:BASHFUL:-50:FACET:PRIVACY:-50:FACET:BRAVERY:25:FACET:CONFIDENCE:25:FACET:POLITENESS:-25:FACET:THOUGHTLESSNESS:25:PROB:100:SIZE_DILUTES:START:10:PEAK:120:END:480:DWF_STRETCH:4]. Werebeast/vampire syndrome provides example to make it only occur once.
Modifying unit values - first you have to get the unit, i.e. iterate over df.global.world.units.active and check if unit race and caste match what you want.
Then you have to either modify/remove the preexising values or add new ones with unit.status.current_soul.personality.values:insert('#',newvalue), where newvalue = df.unit_personality.T_values:new() with type and strength set to what you want (valid values are between 50 and -50, in game text noted in
Personality trait wiki page).
You can get quick list of value types and names with :lua @df.value_type.
You can find various governing things (civilizations, site governments, performance troupes, etc.) in df.global.world.entities. I'm not sure which type is bandit one, though, and I don't know anyone who could tell you how to handle site creation and movement properly (bandits build camps, so...)
Simulating ethics... It's a PITA, but for, say, the goblin buthering example you can create new jobs (gui/gm-editor dfhack.gui.getSelectedJob() will give you an example what a job looks like internally) and link them to job list, remove dead_dwarf flag from the corpse and assign the goblin to the job. (If you just set the dead_dwarf on corpse to false, then anyone will pick up task to butcher it (as shown
in this script).