# Faction Bonuses

## Current Bonuses:

### Princess:

- Spellpower bonus for Shal'ille, Faren, Jala (Base: 10 spellpower)
- Learn bonus Shal'ille, Faren, Jala (Base: 10% bonus to improve)
- Defense bonus (Base: 200 points defense)
- Regenerate mana (Base: 700 ms less per tick)
- Constant: Small price discount (5% discount on purchases).

### Duke:

- Spellpower bonus for Riija, Qor, Kraanan (Base: 10 spellpower)
- Learn bonus for Riija, Qor, Kraanan (Base: 10% bonus to improve)
- Lessened vigor use (Base: 30% less exertion added)
- Constant: Able to buy in stores even if a murderer.

### Rebel:

- Learn bonus to Skills (Base: 10% bonus to improve)
- Hitroll bonus (Base: 125 bonus offensive)
- Regenerate health (Base: 700 ms less per tick)
- Constant: Damage bonus (2 points).

### Unfactioned

Unfactioned get 25% of all non-constant bonuses, calculated with the power and population of the unfactioned as a whole.

### Non-intriguing (below 40 hps)

Non-intriguing players get small bonuses in all non-constant powers, without regard to size or power. These bonus are usually about 20-30% of the bases listed above.

### Comments about current bonuses:

Fairly balanced. Mana regen was moved to Princess from Duke, and the vigor bonus was added to Duke. We’ll see how it survives contact with the playerbase.

## How the bonuses work:

The code for faction bonuses is defined in /blakston/util/parlia.kod. The code for the faction games are found in the /blakston/util/factgame/ directory.
Faction powers scale with faction power (tokens, territory, etc) and faction membership. As power increases, power increases. As membership increases, power decreases.
To understand the equations behind these values, you have to understand the concept of the "balance point". The balance point is where the factions are all balanced against each other. This isn't necessarily the point where the factions "should be" or are most powerful, but rather the arbitrary point where things are split equally. This point is defined in parlia.kod, as the variable piBalanceFactor. It is currently set at 25%. This means that each faction is expected to have about 25% of the power and the intriguing population of the server. It's important to note that the balance for the unfactioned is not set by this balance varaible, but rather is 100 - (3 * piBalanceFactor). For the current setting, this happens to also be 25%. The balance point is the same numeric value for both power and membership, but has a different impact on each part, as described below.
Each variable faction bonus has a base value that it alters according to a function of the power and membership. If everything is at balance, the system will return 100% of this value. As things change, the percent of this value returned is altered.
Power: Power is gained by the token and territory faction games. Each game can provide up to 1000 points for a faction.
If power is less than or equal to the balance point, then the percent contributed is defined by the line between -10% at 0 power and 100% at balance. In the code, this equation is defined as ((110 * iPower) / iBalance) - 10, where iPower is the faction's power points and iBalance is the number of points at balance.. If power is greater than the balance point, then the percent contributed is defined by the line between 100% at balance and 150% at twice the balance point; in other words, you can only get benefit up 50% of the points available (at current settings). In the code, this equation is defined as 100 + ((50 * (iPower - iBalance)) / iBalance). This value is bound to -10% at the low end and 150% at the high end.
The goal is that it should be quick to get full power at balance, but pushing beyond the balance point gives diminishing returns. But, it's still possible to gain a bit of power at the expense of someone else's power. This encourages the loser faction to fight back (in theory ;).
Membership: Membership is a count of all players in the faction who have been active (who have previous logged on within a certain period of time). The balance point for membership is determined by the total number of intriguing players in the game. With the current setting of 25%, this means that in a game with 500 intriguting players the balance point is 125 members.
If membership is less than or equal to the balance point, then the percent is 100%. This means the underdog will always have maximum power for whatever they gain. If membership is greater than the balance point, then the percent contribute is defined by the line between 100% at balance and 25% at 2.5 times balance. In the code, this equation is defined as ((-50 * iMembers) / iBalance) + 150, where iMembers is the number of members in the faction and iBalance is the balance point in members. This value is bound between 25% at the low end and 100% at the high end.
Total: The total is the result of these two factors. So, if power contributes 110% and membership contributes 90%, then the final value will be 99% of the base value.

### Constant bonuses:

###

The lines labeled “Constant” above are constant bonuses for the faction. For example, the Princess’ followers get a small constant discount when buying items. This power does not fluctuate with faction power or membership as other bonuses do.

## Historical view:

Originally there were only Duke and Princess factions. Princess was focused on spells; she gave you more improves per time period (improves had a harder upper limit), she gave a bonus to all spell power, and gave a bonus to defense. Duke focused on weapon play, giving bonuses to hit, to damage, and to prices. The faction powers only scaled by the number of councilors swayed to the faction. The strategy was to have everyone join the same faction and swing all the councilors that direction. Most people chose Duke because it gave more bonuses for built characters; the Princess' bonus for improves were not useful to a character that was full built.
During Trinity, lots of things about factions changed. First, the Rebel faction was added. The Rebel faction got most of the fighter-type bonuses whereas magic was divided between the new Duke and the existing Princess factions. The Rebel faction was simply too powerful with the “pure fighter” theme of Weaponcraft and Kraanan bonuses. The damage bonus could add up to 3 points of damage (I believe) to melee weapons, the same as Duke could before, depending on faction settings. It made the faction incredibly powerful and vastly popular. Princess was a distant second, with Duke slightly behind.
Also during Trinity, the concept of a bonus to improve was added during this time, instead of the Princess' old power of allowing more imps per time period. We also gave the token game another state for councilors to be, "dedicated" in addition to the previous "strong" and "weak" states. The territory game was also added during this time to add more depth to the faction battles. Faction power also became a function of population in addition to raw faction support by councilors and territory.
Resurrection saw the rebalancing of the schools between factions. Jonas lost Kraanan to focus much more on weaponcraft skills, and the damage bonus was reduced. Spell bonuses were distributed between the Duke and Princess more evenly. Soldier shields were introduced as a high-powered optional PvP event. We also restricted the territory game to only be fought between faction soldiers. The mana regeneration was briefly changed to be calculated AFTER the first lower bounding of the mana regen time, meaning that the Duke's mana regeneration could regenerate mana faster than otherwise possible without the 5th level Jala spell Rejuvenate.
Overall, the damage bonus is viewed as incredibly powerful by the playerbase because it could be so large in the past. In addition, mana regeneration is viewed as powerful because of the faster-than-possible mechanics described above. Players generally have long memories of when something is overpowered and will stick with conventional wisdom even after it is no longer correct.