Program The-West Fort Battle Importer

Discussion in 'External Sites Discussion' started by jarograv, Jan 31, 2016.

Share This Page

  1. jarograv

    jarograv Well-Known Member

    Joined:
    Sep 24, 2008
    Messages:
    268
    Likes Received:
    124
    Better, faster, scriptier version can now be found here:
    https://forum.the-west.net/index.php?threads/fortbattle-export.57533/#post-763936

    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.
    [​IMG]
    [​IMG][/spoil]
    2. Extract the contents from the zip file using winrar, 7zip, or a similar program.
    [​IMG]
    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.
    [​IMG]
    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.
    [​IMG]
    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.
    [​IMG]
    [​IMG]
    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: http://www.howtogeek.com/howto/13336/working-with-pivottables-in-excel/. 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.
    [​IMG]
    [​IMG]

    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:
    Diggo11
    Pnevma
    Jamie Westen
    WestForts


    Translations:
    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
    2016-01-29
    + Reverted a change that printed debugging info

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

    2016-03-19
    + Added Polish Translation

    2016-02-27
    + 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

    2016-02-08
    v0.95
    + Added Turkish Translation
    + Now displays the battle date range when generating a player report
    + Added Spanish Translation

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

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

    2016-01-29
    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
    2016-01-29

    v0.92
    + 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

    2016-01-28
    v0.91
    + Fixed bug that did not allow saving in .exe form
    + Fixed various formatting errors
    + Improved some error handling for language support

    2016-01-27
    v0.9
    + 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: Oct 8, 2017
    HALCON DE ORO likes this.
  2. jarograv

    jarograv Well-Known Member

    Joined:
    Sep 24, 2008
    Messages:
    268
    Likes Received:
    124
    <Reserved>
     
  3. pepe100

    pepe100 New Member

    Joined:
    Sep 27, 2008
    Messages:
    2
    Likes Received:
    1
    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.
     
    HALCON DE ORO likes this.
  4. jarograv

    jarograv Well-Known Member

    Joined:
    Sep 24, 2008
    Messages:
    268
    Likes Received:
    124
    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: Sep 30, 2017
  5. pepe100

    pepe100 New Member

    Joined:
    Sep 27, 2008
    Messages:
    2
    Likes Received:
    1
    Thank you very much.