So dfhack has an alpha out (I can't compile or shit with my system as unstable as it is currently) so I can finally do some testing I've been curious about, still haven't tracked down the "you know these dances" stuff yet, but I did find some stuff for needs.
Under your unit.status.current_soul.personality.unk_v4201_1a will be entries for each of your needs, each one has a few values under it, unk_0 seems to be the id of a need, unk_4 I'm not sure about yet, looks like it might be related to when the need was gained(?), unk_c I have no clue about atm, but unk_8 is how fulfilled it is.
I tested the first obviously controllable thing I could find, attack accuracy (unit.actions[k].attack.attack_accuracy), aiming an attack at the same cat with the same difficulty (red/white, difficult/not square I think?) I checked a couple of sets of values.
This character only needed to pray originally, at some point she picked up a drinking problem, no clue how, but either way she now has two needs, pray and booze.
Focused! unk_8: 400
Focused! unk_8: 400
Accuracy: 30989 (she's rather heavily buffed/very highly skilled to boot)
Focused unk_8: 203
Focused unk_8: 203
Accuracy: 22596
Neutral unk_8: <100 >0
Neutral unk_8: <100 >0
Accuracy: 13923
Distracted unk_8: -1320
Distracted unk_8: -2640
Accuracy: 10319
Deleted the alchohol need, it didn't come back, so that's interesting, and then waited until I was really unfocused,unk_8: -2805, aimed at attack under the same conditions, accuracy was down to 9609, prayed once and I'm back to Focused! and unk_8: 400 which makes sense for a faithful (or was it ardent) worship need, but accuracy only goes back up to 21000 or so... rats, having more needs fulfilled does indeed give a larger bonus, the boost from two needs was 10k more accuracy than the boost from one.