Please help a beginner to understand how a critical hit works.
From the Pathfinder Game Master’s Guide:
Whenever a creature’s attack roll is a 20 on the d20, the attack might be a critical hit. Make another attack roll for the creature, just like the first one. If this second attack roll would hit the target, the original attack is a critical hit and does double damage—roll the damage for the weapon twice (including modifiers) and add the rolls together to find out how much damage you do. […]
To me this explanation sounds ambiguous, so please help me to understand this right. I'll give you an example fight. Let's assume a Goblin is fighting against Valeros the Fighter. Valeros hits first. The stats are as follows:
Armor Class: 16
Valeros the Fighter
Attack Bonus: +4
Weapon Damage: 1d8+4
What I understand is how a critical hit may fail.
Failing Critical Hit
Valeros rolls a 20 on a d20, so his attack might be critical. He rolls again, but only a 11 on the d20. Even with his attack bonus of +4 his roll is lower than the Goblin's armor. The critical hit fails, but since the first roll was highter than the Goblin's armor, Valeros will deal 1d8+4 damage.
How much damage does Valeros do on a critical hit?
Valeros rolls a 20 on a d20, so his attack might be critical. He rolls again, this time 15 on the d20. With his attack bonus of +4 his roll is higher than the Goblin's armor.
The manual says that "the original attack is a critical hit and does double damage". At this point I haven't rolled for any damage. I would assume that the damage roll I do next will double. So 1d8+4 times two could be 2x(8+4)=24.
In the same sentence I read that I have to "roll the damage for the weapon twice". So I could also roll (8+4)(1+4)=17.
So what is true? How do I roll for damage?