Code Monkey home page Code Monkey logo

clashmate's Introduction

Clashmate

Clashmate: a tool for Clash of Clans leaders to manage, tracking, and evaluate clan members.

Clashmate is a CLI Python program using the Clash of Clans (mobile game) developer API. The program is designed to identify actively participating and frequently contributing players in your clan, in order to assist the clan leader in choosing who deserves which clan roles.

Developed by Jayden Houghton, 2023

The program:

  1. Retrieves the clan member list
  2. Retrieves player data for each member in the clan
  3. Accepts manual data inputs for more accurate data.
  4. Calculates a ranking score for each player depending on their stats and clan contribution
  5. Outputs the players and their score in order of highest to lowest

Setup

  1. Download the most recent release from this repository.
  2. This program uses the Python requests module and will require it to be installed.
  3. Open the files in a code editor such as VS Code (with a Python extension) or PyCharm.
  4. Remove "example_" from the name of the config and player_data files.
  5. Generate a CoC API token from the developer page: https://developer.clashofclans.com/#/register and copy to the config file.
  6. (optional) Run the program and choose option 2, then add any manual data to player_data.txt. The default values are 0. The program can be run without this data, however these stat fields will not be taken into account during calculation so the overall ratings will not be as accurate to the player's actual contribution.
  7. Run the program and choose option 1 for clan evaluation.
  8. Update the manual data over time.

Notes:

  • The clan tag is hardcoded in the program. This is to avoid repetitively inputting the same tag every time the program is run for the clan you manage.
  • If your computer uses a dynamic ip address, you will need to create a new CoC API token and update the config file every time it changes. Alternately, switch to a static ip address.

Evaluation Equation Justification

The purpose of the rating is to give a rough idea of how much a player contributes to the clan. The equation is designed to mainly emphasise participation, however greater scores are given for higher level and higher skilled players as this benefits the clan.

A high level and well contributing player should have a score of around 100. There is no max value, as stats such as donations have no limit.

Example Player Stats:

  • Hall: 11, trophies: 3,000, donations: 1,000, league: 15 (Masters 1), capital gold: 200,000, cwl: 2 star for each of 7 days, war: 5 starts over 2 attacks over 4 wars, raid: 10,000 for 4 raids, clan games: 4,000
  • Rating = hall: 11, trophies: 10, donations: 10, leaguePenalty: 0, capital gold: 10, cwl: 10.5 , war: 12.5, raid: 13, clan games: 10 = 76
  • clashmate's People

    Contributors

    jayify avatar

    Stargazers

    晓泊 avatar Gustavo Schip avatar

    Watchers

    Kostas Georgiou avatar  avatar

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.