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.

73 lines
3.6 KiB

#!/usr/bin/env python3
import toml
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 get_area_percents():
for episode in episodes:
print('episode: {}'.format(episode))
for difficulty in difficulties:
print('difficulty: {}'.format(difficulty))
for sectionid in sectionids:
#print('sectionid: {}'.format(sectionid))
area_toml = toml.load('{}/{}/{}/{}/area_percent_pattern.toml'.format(base_dir, episode, difficulty, sectionid))
keys = list(area_toml.keys())
attrs1 = [0,0,0,0,0,0,0,0,0,0]
attrs2 = [0,0,0,0,0,0,0,0,0,0]
attrs3 = [0,0,0,0,0,0,0,0,0,0]
for i in range(0, len(keys)):
if 'attribute1' in area_toml[keys[i]]:
attrs1[i] = area_toml[keys[i]]['attribute1']
if 'attribute2' in area_toml[keys[i]]:
attrs2[i] = area_toml[keys[i]]['attribute2']
if 'attribute3' in area_toml[keys[i]]:
attrs3[i] = area_toml[keys[i]]['attribute3']
#print('episode: {}, difficulty: {}, sectionid: {}'.format(episode, difficulty, sectionid))
print('{}\n{}\n{}'.format(attrs1,attrs2,attrs3))
print('\n\n')
# print('episode: {}, difficulty: {}, sectionid: {}, key: {}\ntoml: {}'.format(episode, difficulty, sectionid, key, area_toml[key]))
# if 'attribute1' in area_toml[key]:
# print('attribute1,{}'.format(area_toml[key]['attribute1']), sep=',', end=',')
# if 'attribute2' in area_toml[key]:
# print('attribute2,{}'.format(area_toml[key]['attribute2']), sep=',', end=',')
# if 'attribute3' in area_toml[key]:
# print('attribute3,{}'.format(area_toml[key]['attribute3']), sep=',', end='')
# print()
def get_percent_patterns():
for episode in episodes:
# print('episode: {}'.format(episode))
for difficulty in difficulties:
# print('difficulty: {}'.format(difficulty))
for sectionid in sectionids:
print('{}, {}, {}'.format(episode, difficulty, sectionid))
percent_toml = toml.load('{}/{}/{}/{}/percent_rate.toml'.format(base_dir, episode, difficulty, sectionid))
keys = list(percent_toml.keys())
for key in percent_toml.keys():
print('percent_toml[{}]: '.format(key), sep='', end='')
for p in range(5,95,5):
print(' p{}: {}'.format(p, percent_toml[key]['p' + str(p)] / 100.0), sep=',', end=',')
print()
print()
pattern1 = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
pattern2 = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
pattern3 = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
pattern4 = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
pattern5 = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
pattern6 = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
pass
def main():
#get_area_percents()
get_percent_patterns()
if __name__ == '__main__':
main()