The Core Mechanic

For you who never played RPG with d20 system, here is the basic rules:

Note : This mechanic is under the Open Game Licenses by Wizard of the coast Whenever you attempt an action that has some chance of failure, you roll a twenty-sided die (d20). To determine if your character succeeds at a task you do this: If the result equals or exceeds the target number, your character succeeds. If the result is lower than the target number, you fail.
 * Roll a d20.
 * Add any relevant modifiers.
 * Compare the result to a target number.

Dice
Dice rolls are described with expressions such as “3d4+3,” which means “roll three four-sided dice and add 3” (resulting in a number between 6 and 15). The first number tells you how many dice to roll (adding the results together). The number immediately after the “d” tells you the type of die to use. Any number after that indicates a quantity that is added or subtracted from the result.

d%
Percentile dice work a little differently. You generate a number between 1 and 100 by rolling two different ten-sided dice. One (designated before you roll) is the tens digit. The other is the ones digit. Two 0s represent 100.

Modifiers
A modifier is any bonus or penalty applying to a die roll. A positive modifier is a bonus, and a negative modifier is a penalty.

Stacking
In most cases, modifiers to a given check or roll stack (combine for a cumulative effect) if they come from different sources and have different types (or no type at all), but do not stack if they have the same type or come from the same source (such as the same spell cast twice in succession). If the modifiers to a particular roll do not stack, only the best bonus and worst penalty applies. Dodge bonuses and circumstance bonuses however, do stack with one another unless otherwise specified.

Rounding Fractions
In general, if you wind up with a fraction, round down, even if the fraction is one-half or larger.

Exception: Certain rolls, such as damage and hit points, have a minimum of 1.

Multiplying
Sometimes a rule makes you multiply a number or a die roll. As long as you’re applying a single multiplier, multiply the number normally. When two or more multipliers apply to any abstract value (such as a modifier or a die roll), however, combine them into a single multiple, with each extra multiple adding 1 less than its value to the first multiple. Thus, a double (×2) and a double (×2) applied to the same number results in a triple (×3, because 2 + 1 = 3).