Author Topic: Auto-Balance Teams for Linebattles [Added Tips for Faster Use]  (Read 18591 times)

0 Members and 1 Guest are viewing this topic.

Offline WhiteEagle

  • Sergeant
  • *
  • Posts: 152
  • Forward march!
    • View Profile
  • Nick: 9th_Life_Oberst*_WhiteEagle
  • Side: Neutral
Automatically balances teams for linebattles and other events! No math required!
*Now with a graphical interface!*






WhiteEagle's Team Balancer: Background Information

Spoiler
The team balancing program was developed by myself as a way to help out the great NW community. With a decent background in Python, I have been able to develop a program capable of balancing 8 special unit classes (4 on each team, arty, cav, skirms, lights) as well as any number of regular line infantry regiments within a margin of error of 10 men. The program can be used by organizers to sort teams for each server in under 3 minutes!
[close]




About the Program

  • Works with any size server
  • Balances 8 special class units (1 arty, cav, skirm, and light unit on each team)
  • Automatically generates teams for each server at a time, capable of balancing to within 10 men at the most, usually achieves 2-3 men balances




Download Info


June 14, 2013



This new program features:
-a graphical user interface
-copy paste functionality to eliminate manual rewriting of the balanced teams
-more accurate, glitch free balancing
-the ability to select exactly what regiments and classes you want to enter


How to download and run:
1. download the zip file
2. unzip to a directory of your choice
3. inside the unzipped folder, run the shortcut called "WhiteEagle'sNewTeamBalancer - Run"

How to use:
1. just follow the instructions in the dialog boxes that appear, its an easy to use graphical user interface with just regular text boxes to enter
2. when you are done, click finish and close and the program

THE PROGRAM WILL NOW CREATE A TEXTFILE IN THE SAME FOLDER IN WHICH YOU RAN IT FROM CALLED "balanced_teams.txt". THIS TEXT FILE CONTAINS THE BALANCED TEAMS. THIS ALLOWS YOU TO JUST COPY AND PASTE THE TEAMS BALANCED BY THE PROGRAM DIRECTLY FROM THE TEXT FILE INSTEAD OF MANUALLY WRITING THEM DOWN.

*please note: the text file is rewritten every time you run the program (to save storage space and reduce file clutter) so if you are balancing more than one server, copy the previous server's info from the text file before running it for the next server*


Step by step how-to guide



1. Once unzipped, double click the shortcut with the star icon to launch the program.

2. Click continue to begin.



3. Select the number of slots your server has. If it has more or less slots than the predefined values hit "Let me specify" and enter a number manually. There is no limit to server size but you will not be able to enter negative values.



4. Select the classes involved in your linebattle by clicking on each one individually. Alternatively, you can hit the "Select All" button in the top right corner and select all of them. The program will close automatically if you do not select any of them. For this demonstration, I have artillery, cavalry, and line infantry in my battle.



5. Enter the name of each specialty regiment and its numbers. Name first, numbers second. First enter all specialty classes for team 1 followed by all specialty classes for team 2. The program will automatically check that they can all fit on the server.



6. Enter the name of each line infantry regiment and its numbers. Name first, numbers second. You can enter them in any order. The program will automatically check that they can all fit on the server. You can leave empty slots if you do not need that many.



7. You will be prompted to enter another round of line infantry regiments if there is space on the server (in case you had more than was offered on the first screen. Once again, it will check that they can all fit and you may leave empty slots if you do not need them. In this demonstration, I did not need to enter extra line infantry regiments and so I hit "No" to skip this step.



8. The program will now balance the teams for you. Click finish to close the window. It will tell you to look in the folder you ran the program from to find the text file with the balanced teams. You can copy and paste from this textfile directly into teamspeak or whatever you are using to organize the linebattle.



9. Find the textfile called "balanced_teams.txt". It contains the balanced teams for you to copy and paste.



10. The textfile will contain the following:



That's it! This takes no longer than 1-3 minutes, at most. If you have another server to balance, copy and paste the information from the textfile before you run the program again as it will overwrite the textfile with the next server's balanced teams.


Feel free to contact me by replying to this thread or by personal messaging me for help as well as finding me on steam at: https://steamcommunity.com/id/SerbianWhiteEagles

The thread will be updated as news comes along, so expect to see changes over time.



TIPS:
1. If you are given an estimate rather than a solid number as to how many men certain regiments will be bringing, input a number exactly halfway between their low estimate and high estimate or as close to that number as possible.

2. Always remember to copy paste the previous balance results before moving on to another server for the same event. This is because it will be overwritten the next time you run the program.

Suggestions for future updates:
Please leave a reply with any possible suggestions which I will list here and check off as they are added.

WhiteEagle :)

Last update: July 31, 2013
« Last Edit: April 30, 2014, 02:26:16 am by WhiteEagle »
Better not shoot for the officers...

Try my NEW Team Balancer Program for Event Organizers: https://www.fsegames.eu/forum/index.php?topic=6278.0

Offline WhiteEagle

  • Sergeant
  • *
  • Posts: 152
  • Forward march!
    • View Profile
  • Nick: 9th_Life_Oberst*_WhiteEagle
  • Side: Neutral
Re: Auto-Balance Teams for Linebattles
« Reply #1 on: June 14, 2013, 07:45:41 pm »
Reserved
Better not shoot for the officers...

Try my NEW Team Balancer Program for Event Organizers: https://www.fsegames.eu/forum/index.php?topic=6278.0

Offline DoctorWarband

  • Colonel
  • *
  • Posts: 4019
  • Hello.
    • View Profile
  • Nick: DoctorWarbandHD
  • Side: Union
Re: Auto-Balance Teams for Linebattles
« Reply #2 on: June 14, 2013, 07:51:28 pm »
Saw that on TaleWorlds, nice!
Good luck with it ;)
The Dankest of Memes, start in the simplest of words. Wombo combo.

Offline Archduke Sven

  • Brigadier General
  • *
  • Posts: 6012
  • I have over 1000 warning points, be careful.
    • View Profile
  • Nick: regimentless sven
  • Side: Union
Re: Auto-Balance Teams for Linebattles
« Reply #3 on: June 14, 2013, 09:14:23 pm »
Hey Eagle! Nice program.


told that bih don't @ me

Offline WhiteEagle

  • Sergeant
  • *
  • Posts: 152
  • Forward march!
    • View Profile
  • Nick: 9th_Life_Oberst*_WhiteEagle
  • Side: Neutral
Re: Auto-Balance Teams for Linebattles
« Reply #4 on: June 14, 2013, 09:49:05 pm »
Hey Eagle! Nice program.

Haha, Svenny! Thank you, thank you! I saw your post on the "How you got to be a leader" or whatever thread. That pic you uploaded of the 9th Life marching brought back some good memories. :)

Saw that on TaleWorlds, nice!
Good luck with it ;)

Yeah I guess they both have the same purpose but this is a completely different program. Most obviously because of the GUI. I didn't recycle any of the old code. Thanks for the comment mate
Better not shoot for the officers...

Try my NEW Team Balancer Program for Event Organizers: https://www.fsegames.eu/forum/index.php?topic=6278.0

Offline The Nutty Pig

  • Donator
  • *
  • Posts: 3431
  • It wasn't easy being cheesy.
    • View Profile
  • Side: Neutral
Re: Auto-Balance Teams for Linebattles
« Reply #5 on: June 14, 2013, 10:13:25 pm »
Gonna give it a go!

Offline ExTa

  • First Lieutenant
  • *
  • Posts: 567
    • View Profile
  • Nick: Clew_ExTa
  • Side: Confederacy
Re: Auto-Balance Teams for Linebattles
« Reply #6 on: June 14, 2013, 10:13:39 pm »
Good luck, Nice btw !

Offline Emperor Napoleon

  • Colonel
  • *
  • Posts: 1647
    • View Profile
  • Nick: 1erMar/IrishNap
  • Side: Union
Re: Auto-Balance Teams for Linebattles
« Reply #7 on: June 14, 2013, 10:14:50 pm »
Great Idea! Goodluck with it

Offline WhiteEagle

  • Sergeant
  • *
  • Posts: 152
  • Forward march!
    • View Profile
  • Nick: 9th_Life_Oberst*_WhiteEagle
  • Side: Neutral
Re: Auto-Balance Teams for Linebattles
« Reply #8 on: June 14, 2013, 10:16:46 pm »
Better not shoot for the officers...

Try my NEW Team Balancer Program for Event Organizers: https://www.fsegames.eu/forum/index.php?topic=6278.0

Offline Skyz

  • Second Lieutenant
  • *
  • Posts: 736
  • The Hour Kills the Patient
    • View Profile
  • Side: Union
Re: Auto-Balance Teams for Linebattles
« Reply #9 on: June 14, 2013, 10:39:57 pm »
Its a shame it dosnt balance the skill of the regiments.

Offline Menelaos

  • Brigadier General
  • *
  • Posts: 4000
    • View Profile
  • Side: Union
Re: Auto-Balance Teams for Linebattles
« Reply #10 on: June 14, 2013, 10:41:08 pm »
Its a shame it dosnt balance the skill of the regiments.
That's a good factor! I loved the 9y's skill helping making a 5 man difference no difference at all when they got into melee.

Offline WhiteEagle

  • Sergeant
  • *
  • Posts: 152
  • Forward march!
    • View Profile
  • Nick: 9th_Life_Oberst*_WhiteEagle
  • Side: Neutral
Re: Auto-Balance Teams for Linebattles
« Reply #11 on: June 14, 2013, 10:46:15 pm »
Its a shame it dosnt balance the skill of the regiments.

Skills are a tricky thing. Its easy enough to write the code for something like that, it basically just priority handling.

The tricky part is who decides who is better than who? And on what basis? And how much better? And if they are better in melee, they could be beaten in volleys.

So for the organizers, its easier to leave it up to probability sorting things out. :)
Better not shoot for the officers...

Try my NEW Team Balancer Program for Event Organizers: https://www.fsegames.eu/forum/index.php?topic=6278.0

Offline Thorgrim

  • Corporal
  • *
  • Posts: 104
    • View Profile
  • Side: Neutral
Re: Auto-Balance Teams for Linebattles
« Reply #12 on: June 14, 2013, 10:48:22 pm »
Nice work Mr Eagle.


https://www.fsegames.eu/forum/index.php?topic=3605.0
The Siberian Grenadier Regiment ~ From Russia with love

Offline MrSt3fan

  • Donator
  • *
  • Posts: 6364
    • View Profile
  • Nick: 33rd_Col_MrSt3fan
  • Side: Neutral
Re: Auto-Balance Teams for Linebattles
« Reply #13 on: June 14, 2013, 11:52:06 pm »
Looking very good ! l'll give it a shot !

Offline WhiteEagle

  • Sergeant
  • *
  • Posts: 152
  • Forward march!
    • View Profile
  • Nick: 9th_Life_Oberst*_WhiteEagle
  • Side: Neutral
Re: Auto-Balance Teams for Linebattles
« Reply #14 on: June 14, 2013, 11:54:27 pm »
Looking very good ! l'll give it a shot !

Great!
Better not shoot for the officers...

Try my NEW Team Balancer Program for Event Organizers: https://www.fsegames.eu/forum/index.php?topic=6278.0