Special Training Cases
If a character has the experience for a new level, acquires the services of a trainer and spends the appropriate time with the trainer, the chance of success is 100%. So, Tommy the Sneak gets 1000 XP, finds a rogue to train him for 2nd level, pays his gold and does his time and now he has all the abilities of a 2nd level character.
However, there may be times when a character expects to be able to achieve the experience for a level soon but is leaving a place where he can find a trainer and doesn't want to be stuck in the wilderness with the XP for a level and no training. Or there may be circumstances, such as a local disaster, where trainers are not available. In these cases, a character can prepare for the abilities of a new level before reaching the level or try to master new abilities without a trainer. This can be done but in these cases, there is a chance of failure.
Leveling Without a Trainer
There may be times when a character has to master the features of a new level without a trainer. In this case, no attempt may be made ahead of a level. As with training ahead, each new class feature is separately resolved. For instance, Ulfons can try to learn his 5th features without a master wizard but he must resolve 3rd level spell casting and the metamagic feat separately. Success is determined when the necessary time and materials have been expended in practice. That is, unlike training ahead, you know whether you are successful right away.
Naturally, it is much harder to master a class feature without a trainer and typically, a character will not be able to do it without a trainer without either a lot of time and money, or without gaining XP that puts him well past the level he is trying to master.
Resolving Special Training Cases
For each attempt (for a specific class feature), the character makes a d20 roll versus a training DC. The DC is:
5 + «class level of feature»/2 rounded up + «XP modifier»
The class level of the feature is the level at which you would get the feature. For instance, for wizards, 3rd level spell casting is a 5th level wizard ability. So you add 3 for that (5/2 rounded up).
For prestige classes, the class level of the feature is the prestige class level plus the level of the character needed to qualify for the prestige class. Ex: A rogue shadow dancer normally qualifies at level 8. For a 2nd level shadow dancer feature, the class level is 10: 8 (qualifying class) + 2(prestige class level).
The XP modifier is a modifier that is a function of the character's XP versus the class level of the feature he is trying to acquire as shown in the table below:
|Level||Train-Ahead Modifier||Without Trainer Modifier|
|Target Level -2||+10 + (percent XP from next level)*10|
|Target Level -1||(percent XP from next level)*10|
|Target Level||+10 + (percent XP from next level)*10|
|Target Level + 1||(percent XP from next level)*10|
|Target Level + 2||—||0|
For spell casting features, the character may add their ability modifier to the roll for that spell casting feature (e.g., intelligence modifer for wizards, wisdom modifier for clerics, etc.). All other rolls have no modifier.
Remember: the success roll for training ahead is not made until the character has the XP to use the feature. Record the DC at the time of training and resolve it when you hit the necessary level to use the feature.
You can find several examples here.