add: all achievements, a script to generate them
This commit is contained in:
28
Scripts/generate_achievements.py
Normal file
28
Scripts/generate_achievements.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""
|
||||
This file will generate a list of achievements that can be used by the Unlock.Achievements function of the cheat.
|
||||
|
||||
files :
|
||||
script.json -> all the functions/strings/data in the game, generated by https://github.com/Perfare/Il2CppDumper
|
||||
out.cs -> final list of achievements in the form : string[] achievements = { "XXX" ...};
|
||||
"""
|
||||
import json
|
||||
|
||||
# Opening JSON file
|
||||
f = open('script.json')
|
||||
data = json.load(f)
|
||||
|
||||
o = open('out.cs', 'a')
|
||||
o.write("string[] achievements = {")
|
||||
tot = 0
|
||||
for i in data['ScriptString']:
|
||||
v = i["Value"]
|
||||
if "ACH_" in v :
|
||||
o.write('"'+v+'", ')
|
||||
tot+=1
|
||||
|
||||
o.write("};")
|
||||
print(f"{tot} achievements")
|
||||
|
||||
# Closing files
|
||||
o.close()
|
||||
f.close()
|
||||
Reference in New Issue
Block a user