Attack bonus advice

Attack Bonus(ab) could be the single most important aspect of a melee character. Although you can always overcome armour class(AC) about 1 time in 20, if you are relying upon this and your opponent is hitting you regularly you will be at a huge disadvantage, being able to hit on a 19 would almost double your damage potential.

Attack bonus consists of four factors. Base attack bonus BAB is dependent upon levels and classes. One of your attributes will also affect your ab, though which attribute this is can change depending upon feats and weapons. Feats and abilities can grant bonuses depending upon your classes and feats. And also you can gain magical bonuses, which can come from many different sources but can often become confusing due to stacking rules and limits.

Base attack bonus depends entirely upon your classes and levels. Real BAB only happens in the first 20 levels of a characters development and is affected by class. Classes come in three different varieties: 1BAB per Level, 3/4 BAB per level, and 1/2 BAB per level. If a class gives you martial weapon proficiency it will probably be 1BAB per level, but if it gives you simple proficiency and no other proficiencies it is probably only 1/2BAB per level. Real BAB is tracked separately for each class, and doesn't share fractions, and only whole numbers count so 3 levels of a 3/4 class and 1 level each in two 1/2 classes would result in (3x3/4=2+1/4)=2 (1x1/2=1/2)=0 (1x1/2=1/2)=0 for a total of 2, instead of x3/4+1x1/2+1x1/2=3+1/4, or you could just draw up tables for which levels each class gives you a point of BAB... You get extra attacks based upon how much BAB you have. Your fist attack will use all of your BAB and each successive attack will be made as though you had 5 fewer points of BAB and you don't get extra attacks unless they would be made with at least 1 point of BAB, so you gain additional attacks when your BAB reaches 6, 11, and 16(monks using monk weapons only lose 3 points of BAB with successive attacks, so can have many more attacks at the same BAB and are more likely to hit with extra attacks) At epic levels you get an unnamed bonus to ab that is tracked with BAB. This fake BAB increases by one at each odd level but is not affected by classes and does not contribute to getting more attacks.

Your attributes also affect ab. Typically strength will increase melee ab and dexterity will Increase ranged ab, though the feats 'weapon finesse' and 'zen archery' change these to dexterity and wisdom respectively. The relevant attribute can be increased at character creation up to a +4 bonus, by race up to +1, through level bonuses(maximum of + 10 total), magic can add a +6 bonus, and some feats and abilities can also increase attributes. note that it is only possible to acquire 7 'great strength' feats.

There are also feats and abilities that directly affect ab. Notably Epic weapon focus and Epic prowess. These are small and expensive, but stack with everything so are well worth it.

Magic bonuses also contribute to ab. These include weapon enhancement or attack bonuses, the effects of spells like divine favour and true strike, and other things like bard song. These magical bonuses cannot contribute more than 20 points to your ab and the character sheet quite deceptively doesn't take this into account, a much better way of determining your ab is to check the combat logs when you attack something, which should be accurate. While magic cannot directly grant you more that +20 to your ab there are a couple of other ways of using it, spells that increase your attributes can increase your attribute bonus to AB which will stack with magic bonus to ab, though magic bonuses to Attributes only go up to +12(for a +6 bonus to ab) additionally some abilities, such as curse song, called shot, and taunt, can lower a targets AC, either directly or by reducing Attributes that affect AC, which will have the same effect as increasing ab would, but does not count towards the +20 limit.