The main page for character sheet macros is this one: https://wiki.roll20.net/Pathfinder_Community_Sheet
Config:Advanced:Display Advanced roll-time macro fields must be active to display the macro fields
Each attack made will let you chose to use Power Attack/Deadly Aim.
Attack insert Macro
-[[ ?{Power Attack or Deadly Aim?|Yes,1|No,0}*(1+floor(@{bab}/4)) ]]
Damage insert Macro
[[ ?{Power Attack or Deadly Aim?|Yes,1|No,0}*(1+floor(@{bab}/4))*2 ]]
Damage insert Macro for two-handed (not applicable for Deadly Aim)
[[ ?{Power Attack or Deadly Aim?|Yes,1|No,0}*(1+floor(@{bab}/4))*3 ]]
To add favored enemy bonus to attacks use these macros for all weapons it affects.
Each attack made will let you chose to use Favorite enemy bonus.
Attack insert Macro
[[ ?{Favored enemy?|No,0|Level 1,1|Level 5,2|Level 10,3|Level 15,4|Level 20,5}*2 ]]
Damage insert Macro
[[ ?{Favored enemy?|No,0|Level 1,1|Level 5,2|Level 10,3|Level 15,4|Level 20,5}*2 ]]
In cobination with Power attack/Deadly Aim it looks like this
Attack insert Macro
[[ ?{Power Attack?|Yes,1|No,0}*(1+floor(@{bab}/4))*(-1) + ?{Favored enemy?|No,0|Level 1,1|Level 5,2|Level 10,3|Level 15,4}*2 ]]
-[[ ?{Power Attack?|Yes,1|No,0}*(1+floor(@{bab}/4)) ]] [[ ?{Favored enemy?|No,0|Level 1,1|Level 5,2|Level 10,3|Level 15,4|Level 20,5}*2 ]]
Damage insert Macro
[[ ?{Power Attack?|Yes,1|No,0}*(1+floor(@{bab}/4))*2 + ?{Favored enemy?|No,0|Level 1,1|Level 5,2|Level 10,3|Level 15,4}*2 ]]
[[ ?{Power Attack?|Yes,1|No,0}*(1+floor(@{bab}/4))*2 ]] [[ ?{Favored enemy?|No,0|Level 1,1|Level 5,2|Level 10,3|Level 15,4|Level 20,5}*2 ]]
Damage insert Macro for two-handed
[[ ?{Power Attack?|Yes,1|No,0}*(1+floor(@{bab}/4))*3 + ?{Favored enemy?|No,0|Level 1,1|Level 5,2|Level 10,3|Level 15,4}*2 ]]
[[ ?{Power Attack?|Yes,1|No,0}*(1+floor(@{bab}/4))*3 ]] [[ ?{Favored enemy?|No,0|Level 1,1|Level 5,2|Level 10,3|Level 15,4|Level 20,5}*2 ]]
We are going to use a Buff instead of using macros on each weapon.
The Buff must be Enabled before making a roll.
You need to create a new buff for each favored enemy and set the Buff calc to the right bonus.
NOTE: You can only toggle buffs on the character sheet. Not possible by macros or buttons. Therefore is the standard alternative beter for now.