Difference between revisions of "FFA/FFABot/Instructions"

From Armagetron
Line 10: Line 10:
 
===Executable===
 
===Executable===
 
For Windows:
 
For Windows:
Click [http://latech.edu/~jmg075/WindowsFFABot.exe here] to download the executable file.
+
Click [https://app.box.com/s/lo8qeyl86zipgkuz6w0n here] to download the executable file.
  
 
For Linux:
 
For Linux:
Line 20: Line 20:
 
The source can be found at [http://github.com/joshuagranger/cIRC my GitHub page]. However, I have provided you with a zip file in these instructions. If you wish to download it straight from GitHub, simply click "Download .ZIP file" on the lower right hand side. The benefit of using my zip file is that it is potentially easier to navigate through and understand than downloading it from GitHub. Simply extract my zip and open the Solution file. I had to deal with a lot of extra folders when using the GitHub zip files. You are free to do whichever you wish.
 
The source can be found at [http://github.com/joshuagranger/cIRC my GitHub page]. However, I have provided you with a zip file in these instructions. If you wish to download it straight from GitHub, simply click "Download .ZIP file" on the lower right hand side. The benefit of using my zip file is that it is potentially easier to navigate through and understand than downloading it from GitHub. Simply extract my zip and open the Solution file. I had to deal with a lot of extra folders when using the GitHub zip files. You are free to do whichever you wish.
 
====Windows====
 
====Windows====
1. Optain the source code from GitHub or from [http://www.latech.edu/~jmg075/WindowsFFABot.zip this .zip file].
+
1. Optain the source code from [https://github.com/JoshuaGranger/cIRC/archive/master.zip GitHub].
  
 
2. Open the Solution file (.sln) and make sure it loads properly inside your IDE. Recommended IDE for this process is Visual Studio.
 
2. Open the Solution file (.sln) and make sure it loads properly inside your IDE. Recommended IDE for this process is Visual Studio.

Revision as of 15:05, 24 August 2014

Preliminary Information

This is meant to be a complete guide to using the FFABot. This article should leave you with full understanding of how to use it.

Step 1: Installation (Obtaining an executable of the program)
Step 2: Running the program
Step 3: Communicating with the bot

Installation

Before you utilize this bot, you must first have the working program on your computer. There are two options when it comes to this regard: you can build the program yourself from source or you can download the executable file and simply click on it. Below you will find the executable files for Linux and Windows, as well as the source for both. There is no need to have an "installer" as it is a standalone application which has no external settings.

Executable

For Windows: Click here to download the executable file.

For Linux: Click here to download the executable file. *Note: it was built from Kubuntu, but I imagine it should still work on most distros.

In both cases, be sure to click save file rather than "open", or "run"

Build from Source

The source can be found at my GitHub page. However, I have provided you with a zip file in these instructions. If you wish to download it straight from GitHub, simply click "Download .ZIP file" on the lower right hand side. The benefit of using my zip file is that it is potentially easier to navigate through and understand than downloading it from GitHub. Simply extract my zip and open the Solution file. I had to deal with a lot of extra folders when using the GitHub zip files. You are free to do whichever you wish.

Windows

1. Optain the source code from GitHub.

2. Open the Solution file (.sln) and make sure it loads properly inside your IDE. Recommended IDE for this process is Visual Studio.

3. Click "Build."

4. Navigate to the output folder and you should have a built executable file.

Linux

1. Optain the source code from GitHub or from this .zip file.

1*. If you download the file from GitHub, you may run into problems (I did). Instead, I recommend getting the source from the .zip file I have provided you in the previous line. It has been set up to load properly with MonoDevelop.

2. Open the Solution file (.sln) (preferably using MonoDevelop).

3. Click "Build."

4. Assuming no errors, you should be able to navigate to the output folder and see an executable file.

Instructions

Running the program

By now, you should have a working copy of your program. Either you built it on your own, or you downloaded the executable file. Here are the instructions for loading the program.

Windows

This is pretty straightforward. Click the executable file and a console window should open.

The program then prompts you with the following:

Superior Administrator (IRC Nick):

At this point, you enter YOUR IRC nick. The nick that YOU have registered with IRC and that YOU will be using in the #armagetron.ffa channel. The program will recognize you as the administrator, and will take commands from you and you only. (Unless, of course, you add someone else as an administrator via the command). After you enter your IRC nick, the program will boot and the bot will join the #armagetron.ffa channel. The bot's IRC nick is FFABot.

Linux

This is also pretty straightforward. Instead of clicking the executable file, you should run the progam from the terminal. To do this, open your terminal and navigate to the folder that contains the executable. If you downloaded the executable, it may be stored in something like "/home/[user]/Downloads/LinuxFFABot.exe". So, you need to run the following in the terminal:

cd /home/[user]/Downloads
LinuxFFABot.exe

or

/home/[user]/Downloads/LinuxFFABot.exe

Both of these should run the program in the terminal. You will be prompted with this as soon as you execute the program:

Superior Administrator (IRC Nick):

At this point, you enter YOUR IRC nick. The nick that YOU have registered with IRC and that YOU will be using in the #armagetron.ffa channel. The program will recognize you as the administrator, and will take commands from you and you only. (Unless, of course, you add someone else as an administrator via the command). After you enter your IRC nick, the program will boot and the bot will join the #armagetron.ffa channel. The bot's IRC nick is FFABot.

Communicating with the bot

Unlike the previous steps, there is no deviation between Windows and Linux at this point. The program will function the same.

At this point, you should have started running the bot. It then prompted you to enter your IRC nick, and then the bot joined #armagetron.ffa as FFABot.

Setting up the Players & Captains

First, a list of players and a list of captains must be loaded into the bot. The list of 48 players should be gathered from the FFA page.

Using the list of 48 players, first you should add them into the bot's list.

$addrange Player_1 Player_2 Player_3 Player_4 [...] Player_24
$addrange Player_25 Player_26 [....] Player_48

Notice that I added them 24 players at a time. It's to reduce the possibility of names being cut off due to the character limit of IRC. Do NOT add all 48 players at once. Split them into two groups of 24.

Once all 48 players have been added as players via the $addrange command, you should add the 8 captains, linking their already existing Player name to their IRC nick.

$addcaptain IRCNick1 Player_1
$addcaptain IRCNick2 Player_2
$addcaptain IRCNick3 Player_3
$addcaptain IRCNick4 Player_4
$addcaptain IRCNick5 Player_5
$addcaptain IRCNick6 Player_6
$addcaptain IRCNick7 Player_7
$addcaptain IRCNick8 Player_8

Notice that each IRC nick is being linked to an already-added player. Also make sure that you do it in the correct order. IRCNick and then PlayerName.

At this point, all captains and players should be loaded into the program. You can verify this using the $who command.

Next, ensure that all captains are present and ready to begin the picking process.

Picking Teams

When all captains are ready, use the command

$start

to begin the picking process.


At this point, each captain will be randomly assigned a number between 1 and 8. The bot is programmed to know which captain contains which picks and will automatically prompt them to choose their player when it is their turn.

The command $players can be used at any time to view a list of remaining players.

The command for captains to pick players is $pick <playername>

Finalizing

Once all players have been chosen, the bot will automatically finish the process and output a list of the final teams. The teams should be copied from the IRC channel to the wiki page.

Wrap-Up

If at this point there is something that you didn't understand, there are two options.

First: Check out this sample page that demonstrates how to set the bot up. It shows you ALL commands that would have been used to pick teams for the FFA 1. This should clear up any confusion on what commands to use.

Second: If you're still in doubt, message me on the arma forums here.