Modding NPC dialogue

I’m trying to learn how to add dialogue options to NPCs. For example I’d like to add an option “Let’s have a drink” if the player has alcohol in their inventory, then have a persuation and intimidation check options, then if successful add a boost to mood and raise/lower NPC opinion depending on the choice.

If you can point me to the right direction or give me an example I’d be extremely grateful, right now I have zero understanding on how this works and I really want to learn how to fleshen out NPC interaction.