This is a script that is how I get the data to work on. Originally created by douglasg14b. Addons are nowhere near complete but include an alliance temple and military retrievers, as well as a way to limit amount of players loaded per load operation. Still need to have more to work on, but going well.
The basic outline of this project follows the format of a backend system that loads in data from csv files and updates the currently stored maps, and a more 'front-end' portion for a GUI that has quite a bit of functionality which includes just looking through alliances.
Functions Include:
- Basic Sorting and Printing functions for alliances and players
- Computing controlled continents
- Computing shrines per continents
- Figuring shrines per alliances
- Attack Generator (only water currently)
- Water/Land castles on Continents
- Basic data structures for storing and constructing data
The GUI has a lot of these functionalities including a visualization with a scroll screen for alliances and players.
If anyone has any suggestions/remarks/bugs/etc please let me know!
Note: This project still needs to be fully documented... and tested...
Before beginning, this project does not have any documentation and was purely experimental while I was playing with it. The numbers are quite theoretically and were tinkered with while in use.
In directory src/cotg/data, there are many constant files that are obtainable via the "RankingsExporter.user.js" tampermonkey script. (Note that I don't know if this is allowed by cotg or not, use at your own risk ;) ) The files that are essential for attacks are 1) DATA.csv and 2) playerData.csv. Consider these files inputs to the program. They are what determines what gets generated by the scripts when generating files. DATA.csv represents the inputed player statistics (@2) and playerData.csv is a files that gets generated by the tampermonkey script if you download all the player data (you will have to do this everytime). Ultimately you can specify different files in the code, but these are the current definitions. There are other files that can provide different statistics, but these are the only files necessary for the naval attacks. (To NOTE: if you are adding new worlds/data sets, deleting "all_data.txt" and "alliances.txt" would be a smart choice, as these are dynamically generated datasets to reduce load.)
@2 - the csv headers: "Timestamp","In-Game Name","Vanquisher/Galley Castles [Senator Capable]","Vanquisher/Galley Castles [Not Senator Capable]","Horseman/Galley Castles [Senator Capable]","Horseman/Galley Castles [Not Senator Capable]","Sorcerer/Galley Castles [Senator Capable]","Sorcerer/Galley Castles [Not Senator Capable]","Druid/Galley Castles [Senator Capable]","Druid/Galley Castles [Not Senator Capable]","Warship Castles [Senator Capable]","Warship Castles [Not Senator Capable]","Fakes [Senator Capable]","Fakes [Not Senator Capable]"
In the actual code, the generator is under "AttackCreator.java". This will be the method to run when running the program. Currently there is a very basic method being called in 'main' (caller method) of that java class called "simpleAttack" which takes in a few arguments and spits back a list of randomized targets. (it spits it back in the output.txt file)
Hopefully this is enough to go on, if you have any issues feel free to either post comments/issues.
Another note is that the RankingExport.user.js file requires to be updated if you need to run it on another world. Just Replace the current world with whatever world you are now playing on. (Should just be control-replace https://w9.crownofthegods.com/includes/gPi.php with w9->your new world)