Flamestrike
Legend
Actually, it's not surprise at all. The greatsword guy was aware of dagger guy, and alert to a possible threat.What you've described here, is essentially surprise. The outcome is not in doubt BECAUSE the greatsword guy didn't anticipate the dagger guy drawing and throwing.
If greatsword guy was his best friend, or husband and they were having a pleasant chat, and the attack occured, we could talk (but even then, there would be a preliminary insight check involved)
He doesnt need to know what the dagger guy intends to do on his first turn of the first round.If the greatsword guy doesn't know that the dagger guy is drawing and throwing - then 5e handles that with surprise.
He only needs to know that there is a potential threat in front of him.
Unless greatsword guy is hidden when combat starts (and combat starts when he declares his hostile act, which then triggers initiative, with the declared action - or any other action for that matter - happening in turn order) or otherwise observed by dagger guy, but there is literally no way dagger guy could anticipate a possible attack, then it's initiative as normal.
Scenario:
The PCs have an audience with the King. Halfway through the discussions, the pompous King makes an offhand remark about 'unwashed Barbarians'. The (PC) Barbarian takes insult:
King (DM, nonchalantly sipping his wine): I wish for you to track down some Bandits for the Crown. I will pay you each 500gp for this task should you end this menace to the realm. These scum are likely filthy outlanders, Barbarians of the foulest sort...
Grog Facesmasher (Player, to the horror of the other PCs at the table): DM, on hearing that remark, I suddenly flip the table, enter Rage, draw my Axe and attack the King!
In this example, there is no surprise. The King has literally zero reason to trust the PCs, and every reason not to. It's initiative as normal. It goes like this:
DM (pauses to think a second): Err OK Grog. With a howl of anger, you all see Grog reach for his Axe, with bloodlust in his eyes, fixated on the King! The King looks on aghast, ready to call for his guards, who start advancing towards the Party, hands on weapons! Roll initiative.
In our example assume:
Should another PC (say the Wizard) go first:
Quadratic Simulacrumwisher (PC Wizard, initiative count 20, first to act in turn 1): DM, as I see Grog go for his weapon I quickly cast sleep on Grog, seeking to knock hm out and diffuse the situation.
Should the King go first:
DM (as the King): The King, fearful of your rage, leaps from his table and races off towards a door in the back of the room, screaming out "Guards, protect me!!'' (takes the dodge action, and moves 30' away)
That's how it works mate. There are no combat actions 'outside of combat' and there is no surprise when a DM declares combat sequencing starts (so before any hostile acts have taken place) and at the time the DM declares combat is starting, all sides are aware of the other, and the possibility they may be a potential threat (in the broadest possible way).