diff --git a/scripts/stats_schema_achievement_gen/achievements_gen.py b/scripts/stats_schema_achievement_gen/achievements_gen.py old mode 100644 new mode 100755 index 3bfb30c6..5c6a6f42 --- a/scripts/stats_schema_achievement_gen/achievements_gen.py +++ b/scripts/stats_schema_achievement_gen/achievements_gen.py @@ -64,7 +64,10 @@ def generate_stats_achievements(schema, config_directory): for s in stats_out: default_num = 0 if (s['type'] == 'int'): - default_num = int(s['default']) + try: + default_num = int(s['default']) + except ValueError: + default_num = int(float(s['default'])) else: default_num = float(s['default']) output_stats += "{}={}={}\n".format(s['name'], s['type'], default_num)