Say the party is smooth-talking a guard, and the rogue loses patience and throws a dagger. Combat ensues...is the next step to roll initiative? If so, does the rogue's thrown dagger not count as his first round attack?
The rogue starts to throw a dagger
The rogue's attempt to attack initiates combat, with all the normal rules. The actual throwing of the dagger happens on the rogue’s turn (if they still can and want to).
Surprise is a possibility if the DM decides that the guard (and the other players) "doesn't notice a threat". Potentially this could use the rogue’s Deception rather than Stealth to resolve, since it's more about hiding intentions than just hiding.
Initiative is then rolled and combat proceeds in initiative order. The guard might beat the rogue in initiative, representing quick reflexes and the rogue getting his fingers tangled with his belt, or anything else you care to describe.
As mentioned in the answer of Dale M, rolling initiative happens before the combat starts. The "I throw my dagger" has to be interpreted as an intention, somewhat against the intuition of many (new) players.
There are possible complications:
- If the guard did not notice the threat, they are surprised, as mentioned by Dale M.
- To figure out whether the guard is surprised, you might want to have the rogue roll deception (to keep their hostile intentions secret) or sleight of hand (to draw the dagger very fast or unseen), but only if appropriate in the situation and given the intentions of the player.
- Alternatively, you can apply advantage and disadvantage to the initiative roll of some or all characters. If the conversation is very intense, maybe those who are involved in it roll initiative with disadvantage, or maybe the rogue rolls it with advantage. This is not as powerful as surprise, but still gives some benefit to quick and decisive action, or reflects the difficulty of being alert to danger while engaged in a serious conversation.