Description:

*The maximum Empire-size is determined by the leader's guild headquarter level. However, the players themselves need to increase their ranks for the Empire's actual member-capacity to reach this theoretical maximum (obtainable only when all members are at the "Emperor" rank).*

This encourages teamwork, and allows BasTijs to easily play with the numbers if the Empire-sizes are too high

Also, an Empire consisting mostly of low-level players will not be able to approach its maximum Empire-size (determined by the guild headquarter upgrades) until the players gain ranks by completing objectives!
I believe that the max is currently 60 members?

Basing it on the guild headquarters realllly hurts the leader (I've experienced it personally).

**The following information is **__incorrect__. All up-to-date algorithms are on a simplified Excel-file.
How about...

A guild initially starts with 3 maximum members (including the leader).

Players can increase this by increasing their rank (so that players increase the maximum-size, not the leader's upgrades). The number will round to the nearest whole number. So if I want the max to be 50... Then (50 - 0.5 - 3)/(50 - 1) ≈ 0.9490

Where 50 is the max, 0.5 is the rounding-value, and 3 is the starting-value (for no bonuses), and 50-1 is the number of players with maxxed-rankings needed to acquire the 50th member (so that the 50th member will not increase the alliance-size over 50 due to rounding-down).

An Emperor/Empress increases the max alliance-size by (50members - 0.5members - 3members)/(# of Emperors in alliance) ≈ 0.949members/Emperor which allows a maximum of 49.5 players (rounds-up to 50).

**Ranking ≈ Size Bonus to Empire per Member at this Ranking --> (Size Bonus to Empire per Member at this Ranking)*(Max Number of Members at this Ranking in an alliance consisting of all players at this Ranking) + 3**
Knight ≈ 0.722 --> 9.5 members

Baron ≈ 0.821 --> 14.5 members

Count ≈ 0.881 --> 21.5 members

Duke ≈ 0.900 --> 25.5 members?

Grand Duke 0.926 -->39.5 members?

King ≈ 0.942 --> 43.5 members

Emperor ≈ 0.949--> 49.5 members

(0.5 rounds-up to the nearest integer)

I propose this because I get annoyed upgrading buildings when few people contribute... So increasing the max-size of your Empire really makes the gameplay automatically encourage co-operation (which is good, because co-operation is a skill I would like to see expressed more in real-life and games).

Aside:

let y = max number of members if everyone is at the Ranking, so

y = size bonus*(y-0.5)+3

size bonus = ?

size bonus = (y-3)/(y-0.5)

Example, if we want the max-size to be 100 members, then y = 100 and size-bonus (per maxxed-ranked player) = 97/99.5 ≈ 0.975members/Emperor

Idea: We don't have to use my idea, but we don't have to not use it!!

What if we set y-3 = y-g(x), where g(x) is a function of x, and x corresponds to the guild headquarters? We know 1<=x<=30, so Ie. g(1) = 3 and g(30) = 33 then at a level 1 guild headquarters, the above equations apply, but at a level x headquarters, the size-bonus for Emperors would be (y-g(30))/(y-0.5) = (50-33)/(50-0.5) ≈ 0.343

**Or even more fun: **
We know: size bonus = (y-3)/(y-0.5)

y =

**f(rank)**, where rank a rank from serf to Emperor/Empress. Therefore f(rank) = number of players who can join an Empire which consists solely of players of the said rank. We need arbitrary f(rank) such that f(serf) < f(squire) < f(knight < ... < f(Emperor). Ie. Max Empire-size increases when a member gains a rank.

Now we want two things:

1)

**The guild headquarters to affect the maximum size of the Empire.**
2)

**The rankings of each player affect the maximum size of the Empire.**
3)

** A newly-founded alliance has a maximum of g(x) members, where x is arbitrary** (for the sake of simplicity, assume g(x) = 3 for all x).

let "size bonus" =

**h(rank)**
h(rank) now represents [this is "a function at the value of 'rank'", not a name. Units of h(rank) be "max Empire-members per member of said-rank"]

let

**g(x)** be the maximum number of members for a newly-founded alliance (I suggest 1 to 4)

If we have y = f(rank) then we can substitute h(rank), g(x), and f(rank) into the equation:

**size bonus = (y-3)/(y-0.5)**
As we know that: "size bonus" per member of a certain rank = h(rank)

and

3 equals g(x) (as g(x) is currently arbitrary)

y = f(rank)

**So:**
h(rank) = ((f(rank)) - (g(x))) / ((f(rank)) - 0.5) where 0.5 is a constant necessary to STOP rounding-errors from raising the maximum member-capacity of an Empire consisting of f(rank) members above f(rank) (as this breaks our definition of f(rank), which is our definition of y; the max number of members if everyone is at the same "rank").

We are now done our analysis.

Or wait - not yet!

We said that the ranking of each player

*affects* the maximum Empire-size, but we said that the maximum Empire-size is actually determined by guild headquarters level!

The above equation only applies for one level of the guild headquarters. As we upgrade the guild headquarters, the f(rank) will increase. E.g. If want a level 30 guild headquarters to never contain more than 300 members, then we change f(Emperor) to 300.

There is a simpler way to do this.

Wait - no, there isn't.

Thus, we need another variable for the level of the guild headquarters.

Ok, for simplicity, I am setting g(x) to zero. Nevermind; this makes it too difficult to found an Empire (since you can only recruit one member, no matter your headquarters level).

So we only need to (1) set a value for g(x) [I recommend a constant between 1-4, or g(x) can correspond to the level of the headquarters], (2) set a value for f(rank), and then (3) get the server to calculate h(rank) and multiply h(rank) by the number of members in the Empire at the "rank" and add-up the values for all ranks (Serf to Emperor/Empress), and (4) save the rounded-integer (rounded to the nearest whole-number) on the database, which (5) becomes the maximum member-capacity of the Empire!

Simple as 3.14!

__Sources of error:__ The code may produce rounding errors. Therefore we may need to reduce the magnitude of our constant 0.5 (in our above equation) to ensure that the code does not round-incorrectly (ie. 0.5 becomes 0.4999999).

Also, g(x) must be greater than 0, or our equation does not work (we cannot have negative alliance-sizes).

let k = 300 members

This lets the coder decide on the value of:

g(x) ≈ 3

f(Serf) ≈ (undecided)

f(Squire) ≈ (undecided)

f(Knight) ≈ 0.203*k/(guild HQ level)

f(Baron) ≈ 0.303*k/(guild HQ level)

f(Count) ≈ 0.443*k/(guild HQ level)

f(Duke) ≈ 0.523*k/(guild HQ level)

f(Grand Duke) ≈ 0.803*k/(guild HQ level)

f(King) ≈ 0.880*k/(guild HQ level)

f(Emperor) ≈ 1.00k/(guild HQ level)

The "≈" approximations are based on the assumptions that:

1) "biggest Empire at a level 1 guild headquarter = f(Emperor) when guild headquarter is level 1 ≈ 50

2) biggest Empire possible = f(Emperor) when guild headquarter is level 30 ≈ 300

3) rankings of each player affect the maximum size of the Empire.

*Super Recap*: h(rank) = ((f(rank)) - (g(x))) / ((f(rank)) - 0.5)

*"kalemati":*

you can have an aliance 10X30=300 and i think that is a solid amount of players.

Ok, so let's use that for the value of "k" (see above).

I'll set the biggest Empire possible at a level 1 HQ to be 50, which gives us all the decimal numbers...

Who has read the bolded-parts of the above post?

- Thanks for asking!