The official Bethesda tutorial only really covers quest specific topics, so that won't help much other than help you grasp the basics.
This might be a great thing for me to cover, as I'm not aware of any others (Haven't looked) out there in the community with tutorials on this.
It can get as complex as you'd like, but basically you can break it down to these simple steps:
1. Make a quest that always runs in the background. Like "AntstubellGuardDialogue" (Or whatever) Make sure it can start up, 'start game enabled' is checked.
2. Who can talk? If it's guards for a large group, I recommend making a dialogue faction, placing them all into it, then setting it as the condition on the first tab of the quest.
3. Make dialogue lines. Under the Misc tab you can set up two types of relevant dialogue:
- Idle: This is said at random whenever the conditions on the topic are met, and the actor is running a package with the 'allow idle pvssyr' box checked. This is usually things like coughing, humming, or thinking aloud to one's self. "Did I remember to... yes, I definitely did..."
- Hello: Greetings the actors can say. They are either said when the player interacts with them and enters dialogue, or as the player passes by. Things like the arrow to the knee line are hellos that the guards say. I recommend checking the 'Can Move While Greeting' box on most of these. This allows them to continue walking while they talk. Otherwise you get the guard on patrol who stops moving every time he says something and it looks weird.
That covers probably 95% of the generic dialogue heard by the player. Setting those up can bring your world to life, the transition really is incredible.
I may have missed something, but that's what I could think up off the top of my head.
Feel free to ask any other questions. This may actually be good review for me if I were to make a tutorial video on it.
- AV
EDIT: Two important things I forgot:
1. Make sure you check 'random' on all of the topics for both of those, or else it will only pick the topmost valid info, and your NPC's wont say nearly as much, and they'll say the stuff up top mostly. Checking random on all of them puts them into a giant pool to be chosen from (at random), which is what you want.
2. For the IDLE lines, on every single one of them put a condition with "GetRandomPercent < 5" or a similar number. As idles are almost always valid and most NPC's have the package condition checked, not doing this will result in your NPC's never shutting the hell up. Adding this means that every chance it tries to play them, there's a 5% (Or whatever, I usually do between 3-10%) chance that the line is valid. The result is that your actors 'say' random idle lines far less, and it isn't incredibly irritating.