The BONUS_TYPE_ constants defined in the first few lines in ingame/campaign/campaignbonuses_shared.lua should be global instead of local, because they are also used ZO_CampaignBonuses_AbilitySlot_OnMouseEnter defined in ingame/campaign/campaignbonuses.lua:124. The tooltips for scrolls and emperor boni are not working because of this.