Program The-West Fort Battle Importer


Well-Known Member
Better, faster, scriptier version can now be found here:

Hello everybody,
I am excited to (finally) announce the release of a program I have designed to help players who want to analyse fort battle data over a period of time. This program works with all servers (fr, ru, en, etc.) except for beta (zz & xx). It has currently only been tested on Windows (8.1 Enterprise) and I am not sure if it will run on Mac or Linux. Feel free to reply if you are able to run it on either of those operating systems :)

>>>DOWLOAD v0.98.2<<<
Last updated January 29, 2017

What the program does
  • Import battles over a period of time in a relatively short period of time. For one year of battles it takes approximately 20 minutes and for a month of battles it takes about 1 to 2 minutes.
  • Create personalized stats for yourself or others based on the data imported right in the program (No Excel needed!).
  • Work with the data in Excel or another spreadsheet program to create charts and other information such as attendance by town or ranking players based on ghost count, dodges, hits taken or nearly any other piece of information through the use of pivot tables. There are a total of 47 fields of data, so there are plenty of creative charts that can be made!
  • Currently the program does not support having a field for alliances as it appears that information is not stored anywhere. It is however possible to setup a vLookup in excel to perform a similar function. However, depending on how recent the data is, using a town/alliance list received from somewhere such as tw-db may provide some incorrect information if a town has since changed alliances.

How it works
1. Visit the link above to download the .7z zipped folder. If dropbox prompts you to enter user details, just click "No thanks" at the bottom of the popup.
2. Extract the contents from the zip file using winrar, 7zip, or a similar program.
3. (Optional) Read the READ ME file
4. Run the .exe file contained titled "Fort Battle Import v#.##.exe". Ignore the security warnings that will likely appear, this appears as the program is made with python and runs through the command prompt.
5. Follow the onscreen instructions to begin importing battles. Depending on the length of time you choose, this may take anywhere from 5 seconds to 20 minutes. Generally it takes imports about 40 battles per minute.
6. Generate a player report or skip to step #7. To create a player report follow the onscreen instructions and save the file if you want to.
7. Working with data in excel. Open the .csv file titled "Fort Battle Data - ########-#######", the numbers represent the date and time that you performed the import. Click anywhere on the data table then go to the insert tab and select pivot table and click "OK". This will create a new tab with a pivot table on it. I won't go over everything that you can do with a pivot table because that would take ages, but here is a post that explains most functions quite well: I have also provided an example of a sample pivot table below in the second hidden image. Please note that to save any pivot tables you cannot save the file as a .csv or you will lose information. You must save the file as a .xls or other file type depending on the spreadsheet software you are using.

Currently some users are experiencing issues when opening the .csv file in excel which is causing the file to not be comma delimited. There are 2 ways to fix this.
1. Right click -> Open the file in notepad++ and add a line at the top with the following:
2. Open a blank excel file. In the data tab import data from external text file then select the .csv. In that menu you will be able to select comma delimited and follow the steps there.

Languages Currently Supported
Although not all languages are supported, the tool can still however be used on other language servers!
  • English
  • French/Français
  • Portuguese/Portugues
  • Danish/Danske
  • Spanish/Española
  • Turkish/Türkçe
  • Polish

Special Thanks
Program Design:
Jamie Westen

Pnevma - Portuguese Translation
irem* - Turkish Translation
Gunsmoke 4ever - Danish Translation
Pepe100 - Spanish Translation
Wojcieszy77 - Polish Translation
You! As the first users you have the chance to report bugs and issues to me so that I can fix them and make the program easier to use and enjoy by more people. Thank-you all!

Change Log
+ Reverted a change that printed debugging info

+ Fixed a bug due to http/https changes which resulted in no battles being returned

+ Added Polish Translation

+ Fixed a bug which caused battles with ids shorter than 5 numbers to cause crashes
+ Added instructions on how to exit program for ES, PT, TR translations
+ Fixed a bug which did not allow for saving player reports that contained the characters >:"/\|?* in the player name

+ Added Turkish Translation
+ Now displays the battle date range when generating a player report
+ Added Spanish Translation

+ Optimized buffer added in v0.93
+ Added buffer for users with 90+MBps connections to reduce the chance of server errors

+ Optimized buffer added in v0.93
+ Added buffer for users with 90+MBps connections to reduce the chance of server errors

v0.93 - (Unreleased)
+ Added a buffer time to avoid sending too many server requests too quicky. This should fix issues for users attempting to import data that starts on page 150+ of WestForts

+ Addded Danish translation
+ Fixed a bug where running two or more imports during one execution resulted only the last import import being saved
+ Fixed a bug that did not allow for importing of battles with the phrase " vs " as part of the fort name
+ Fixed a bug where total kills was displayed incorrectly
+ Improved error handling when player is not found during report generation

+ Fixed bug that did not allow saving in .exe form
+ Fixed various formatting errors
+ Improved some error handling for language support

+ Squashed many bugs
+ Combined both programs into one file
+ Added translation capability
+ Added French translation
+ Added Portuguese translation

Forum Threads for Other Languages
Last edited:


Hi, I want to import battles of world ts1, but I only get the following file "battle_id_getter150.txt" with this content "Too many requests". However in other worlds I have no problem.Could you fix it?

Best Regards.


Well-Known Member
Hi, I want to import battles of world ts1, but I only get the following file "battle_id_getter150.txt" with this content "Too many requests". However in other worlds I have no problem.Could you fix it?

Best Regards.
Found the issue, I will wait until after todays battles to release the update (assuming it works). Currently battleid's only go up to 7, I want to test it on double digit battle id's as well. Previously the script did some spaghetti coded work to find the battle id.

EDIT: No idea what the issue is now... I got it handling the short battleid's but for some reason now it wont save the necessary files. Looking into it.
Last edited: