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

  1. #!/usr/bin/env python3
  2. import toml, os
  3. # TODO
  4. # print summary of all drops (all eps/diffs/ids)
  5. # figure out a format for summary
  6. # print specific monster info (ie: all falz drops for all ids, or only a specific id, or only an episode)
  7. # search for specific item drop rate across all eps/diffs/ids
  8. # 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
  9. episodes = ['ep1', 'ep2', 'ep4']
  10. difficulties = ['normal', 'hard', 'veryhard', 'ultimate']
  11. sectionids = ['viridia', 'greenill', 'skyly', 'bluefull', 'purplenum', 'pinkal', 'redria', 'oran', 'yellowboze', 'whitill']
  12. base_dir = '../data/drops' # assumes script is running from /path/to/elseware/tools
  13. def print_all_drops():
  14. for episode in episodes:
  15. for difficulty in difficulties:
  16. for sectionid in sectionids:
  17. rare_rates = toml.load('{}/{}/{}/{}/rare_rate.toml'.format(base_dir, episode, difficulty, sectionid))
  18. dar_rates = toml.load('{}/{}/{}/{}/monster_dar.toml'.format(base_dir, episode, difficulty, sectionid))
  19. for key in rare_rates.keys():
  20. monster = key
  21. item = rare_rates[key][0]['item']
  22. droprate = rare_rates[key][0]['rate'] * (dar_rates[key]['dar']/100)
  23. print('{},{},{},{},{},{:.4f}'.format(episode, difficulty, sectionid, monster, item, droprate * 100))
  24. def main():
  25. print_all_drops()
  26. if __name__ == '__main__':
  27. main()