This is an old revision of the document!
The API macros that have been implemented for the game enforce a way of handling combat, especially initiative and surprise.
In many situations, each side in a combat will be aware of each other at the point that combat begins. In this case everybody rolls initiative normally, and there is no surprise round.
Initiative is rolled at the point combat begins - not whilst preparing or waiting. As soon as it is possible for a combat action to occur, initiative is rolled, and not before. e.g., if one side is waiting to open a door to charge in and attack the other side, then initiative is rolled when the door is opened.
If there is one creature that clearly begins the combat, then they get surprise and also get to take 20 on their initiative check. This doesn't guarantee that they will go first, but greatly increases the likelihood. Situations where one creature begins the combat can include:
This is implemented in the scripts by starting combat with a single token. If only one token is added at the start of combat, then that token takes 20 and has surprise.
Everybody else then gets added to the initiative, with a possibility of either being surprised, or having surprise.
In an ambush, the initiator makes a Stealth check, and anyone who was not aware of them makes a Perception check against that. If they succeed, they are not surprised. If they fail (get lower than the Stealth roll), then they are surprised. In either case they roll initiative and are added to the combat track.
In an ambush situation, one person on the ambushing team must be designated as the initiator. The rest of the team don't need to make a surprise check - they automatically have surprise and roll initiative.
Where everyone is aware of each other, but the initiator surprises people by suddenly starting a fight, then they instead make a Bluff check. Everyone else makes a Sense Motive check, and on success get to act in the surprise round, otherwise they are surprised.
What happens if someone readies an action before combat begins?