Ok so my idea is composed of 1) Way to do it , 2) Reason to do it. I invite anyone who is willing to contribute to add their opinion or constructive criticism.
I'll start with "Way to do it", so the devs can see how easy this would be at least in terms of abstraction.
1) Way to do it:
Ok so what im suggesting is to give each character a variable called BG Rating. This does not need to exist in the client (visualizable to the player within the game) and can be easily added to the website under the armory page.
Now. How to get this value? Well, this is where we gota think about the best way to do it. Personally, i would make it something between win/losses for BG, HKs (not killing blows please) per BG. perhaps we can also add "objectives captured/completed" but that would be something to discuss further.
So basically what im thinking off is creating average values of performance in battlegrounds. So mathematically you would go like this:
Wins - Losses = win ratio. (Potentially not decrease BG rating on deserting. The only beneficial way of exploiting this system is to downgrade your rating).
HKs (in bg) / bgs played (once this is integrated, not historical) = kill ratio. (Kill ratio is something that could be exploited by joining a bg and not killing anything just to decrease your rating, so maybe not use this value at all).
" Wait i just joined!": To fix this we can add a multiplier. "Time played". Calculated as a percentage of played time from the time you played the bg as opposed to 100% which would be the BG duration (from beginig to end). So if you played all the game, you get a x1 multiplier. If you played 80% of the game, you get a 1.2 multiplier (adds %20). With a perhaps minimum playtime of 50% of the bg duration. if you go lower than 50% it could be argued that your win/lose ratio should not be modified. perhaps 40% is more accurate? the number should be significant to what a player can do to change an outcome on a given amount of time. This would apply to both win ratio and kill ratio. A cap to this multiplier can be stated so players dont exploit playing only already started bgs. But i wouldnt worry so much about this since an average HK amount of a top score player is maybe 30-50 kills (depending on bg) . so 30*1.5 = 45. but this "30" would be applicable to players that played the entire game, so we could state that a player joining at half the match would get half the kills. so we get 15*1.5 = 22.5. Of course, if a player is joining a bg that he already left (case of AV) , he would have a multiplier of x1.
So one way to go is just to make an addition with those 2
BG Rating = win ratio + kill ratio.
So once you got that, you add it to the character table (Db) and query for it when displaying the armory/realm/character
2) Why to do it:
This is going to be a hate fest but i ll explain my case anyways.
You've implemented the BG ids for random bg, i understood your reasoning and found it a great modification to the realms. It adds to the gaming experience in several levels.
Continuing in that path, of making bgs a competition and not a /faceroll fest, i think characters should have , without exclusion, a BG rating. Even when joining random, or particular bgs.
Then based on this new bg rating, players will be matched with each other and against opposite faction players that are as close as possible to a BG rating value, calculated from 3 averages:
averageAllliance: average bg rating within joining members to the BG.
averageHorde: same as above.
averageTotal: (averageAlliance + averageHorde)/2
These values will get modified dynamically as each member of any faction joins a bg since a new bg rating value is added to a faction's average-> totalAverage.
So lets go by phases:
Phase 1) Player joins bg on X faction. No player has joined faction Y. One player is inside the BG right now.
averageX = playerBgRating.
averageY = <notSet>.
averageTotal = playerBgRating.
Optional: We could stablish a minimum number of players before calculating and determinig who should join first next. Lets say we wait until 2 players have joined on each faction. So we have 4 players that joined randomly (not even half of a warsong match on each side). If its decided not to use this optional clause, i guess all values will be calculated upon the first player who entered the match. Leaving the following numbers:
averageX = player1_factionX
averageY = 0
averageTotal = (player1_factionX + 0 )/2 . Basically the player's bg rating divided by 2. Wouldnt be too problematic to just use this value and not use the optional clause. But this could be changed i guess based on what people do to cheat this "system".
So if we go with the optional clause of waiting for 2 playes on each faction <inside> the bg (not queued only) then we have
averageX = (player1_factionX + player2_factionX)/2
averageY = (player1_factionY + player2_factionY)/2
averageTotal = (averageX + averageY)/2
averageTotal is what we want to be using to determine who enters next.
Premade Case (up to 5man allowed for this case):
We simply take the optional clause stated above and change the minimum player amount per faction to 5. Solved.
Phase 2) Who enters next?
To decide who enters next, we have the averageTotal to take from, which has been modified before (after optional clause?). So we get players to any of the factions that are queued and closer to this value on their BG Rating.
So lets go with an example: 3 players from X and Y faction queues. The player whos closer to the averageTotal value will enter the BG. Tnhen the averageTotal will be recalculated, and this process keeps on going until the BG fills up.
Keep in mind the idea is to be pretty close to what arena ratings use, so we would take the variable "time" to determine proximity to the averageTotal. The further the "time" variable advances the further we can go from the averageTotal value in order to get people inside the bg wihtout making them wait too long.
Note:
Keep in mind this would work for any number of BG Rating. So this will end up creating a better competitive scenario for "new comers" (low gear) and "capped geared or close to it" players. So with this, we have a lot more chances of having great deals of fun ( or my idea of fun at least, which is competition (as fair as it can get), even if you just started, or if you are sitting with a toon with BIS gear and queueing with a premade.
P.S.: Again, the way to do it can be discussed. You or someone could have better ideas on how to determine a character's bg rating. But i think the "why to do it" is pretty solid to my understanding. I hope this is considered.
Additional notes: The premade (5 man ) factor is still somethin im trying to figure out. Im open to ideas.
solution 1) one way to solve it is by calculating the average BG rating of that premade (5 man group) from the top 2 . This will prevent people building premades with 2 or 3 lows just so they lower their "group" average rating. once the group joins ( or any indiviual member, no need to wait for any number of joined characters, just do it with one as they join in) modify the averageX faction and then translate to averageTotal. But we would indeed wait for the top 2 to join before doing the math over to the faction average -> total average. This would be to prevent people from telling the 3 lows in their group to join first and thus reducing the totalAverage of the BG, so the top 2 face very low opponents (averaged ofc).