You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.5 KiB

#!/usr/bin/env python3
import toml, os
# TODO
# print summary of all drops (all eps/diffs/ids)
# figure out a format for summary
# print specific monster info (ie: all falz drops for all ids, or only a specific id, or only an episode)
# search for specific item drop rate across all eps/diffs/ids
# search for specific item in a specific criteria (ie: only look for vjaya drops in ep1, or only for specific section id, or specific episode
episodes = ['ep1', 'ep2', 'ep4']
difficulties = ['normal', 'hard', 'veryhard', 'ultimate']
sectionids = ['viridia', 'greenill', 'skyly', 'bluefull', 'purplenum', 'pinkal', 'redria', 'oran', 'yellowboze', 'whitill']
base_dir = '../data/drops' # assumes script is running from /path/to/elseware/tools
def print_all_drops():
for episode in episodes:
for difficulty in difficulties:
for sectionid in sectionids:
rare_rates = toml.load('{}/{}/{}/{}/rare_rate.toml'.format(base_dir, episode, difficulty, sectionid))
dar_rates = toml.load('{}/{}/{}/{}/monster_dar.toml'.format(base_dir, episode, difficulty, sectionid))
for key in rare_rates.keys():
monster = key
item = rare_rates[key][0]['item']
droprate = rare_rates[key][0]['rate'] * (dar_rates[key]['dar']/100)
print('{},{},{},{},{},{:.4f}'.format(episode, difficulty, sectionid, monster, item, droprate * 100))
def main():
print_all_drops()
if __name__ == '__main__':
main()