-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathwrite_mod.py
More file actions
118 lines (90 loc) · 4.57 KB
/
write_mod.py
File metadata and controls
118 lines (90 loc) · 4.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
from pathlib import Path
from clear_working_folder import clear_working_folder
from write_files_to_working import write_files_to_working
from write_enemy_drop_rewards import write_enemy_drop_rewards
from write_bambi_rewards import write_bambi_rewards
from write_chests_and_rewards import write_chests_and_rewards
from write_level_up_rewards import write_level_up_rewards
from write_mod_zip import write_mod_zip
from write_static_items import write_static_items
from write_keyblade_stats import write_keyblade_stats
from write_item_sort_order_and_sell_price import write_item_sort_order_and_sell_price
from write_map_prizes import write_map_prizes
from write_exp_chart import write_exp_chart
from write_toggleable_luas import write_toggleable_luas
from write_seed import write_seed
from write_icon import write_icon
from write_starting_accessories import write_starting_accessories
from write_spell_info import write_spell_info
from write_gummi_items import write_gummi_items
from write_gummi_item_buy_and_sell_price import write_gummi_item_buy_and_sell_price
from write_augments import write_augments
from write_settings_file import write_settings_file
from write_seed_file import write_seed_file
from write_globals import write_globals
from validate_evdl_data import validate_evdl_data
from unzip_ap_output import unzip_ap_output
def write_mod(ap_zip_file_name, kh1_data_path):
ap_zip_file_name = Path(ap_zip_file_name)
kh1_data_path = Path(kh1_data_path)
print("Unzipping AP Output File...")
json_path = unzip_ap_output(ap_zip_file_name)
item_location_map_file = json_path / "item_location_map.json"
keyblade_stats_file = json_path / "keyblade_stats.json"
settings_file = json_path / "settings.json"
ap_cost_file = json_path / "ap_costs.json"
mp_cost_file = json_path / "mp_costs.json"
print("Item Location Map File: " + str(item_location_map_file))
print("Keyblade Stats File: " + str(keyblade_stats_file))
print("Settings File: " + str(settings_file))
print("AP Costs File: " + str(ap_cost_file))
print("MP Costs File: " + str(mp_cost_file))
print("Validating KH1 data...")
validate_evdl_data(kh1_data_path = kh1_data_path)
print("Clearing working folder...")
clear_working_folder()
print("Writing necessary files to working directory...")
write_files_to_working(kh1_data_path = kh1_data_path)
print("Writing static items...")
write_static_items(seed_json_file = item_location_map_file)
print("Writing enemy drops...")
write_enemy_drop_rewards()
print("Writing bambi drops...")
write_bambi_rewards()
print("Writing chests and rewards...")
write_chests_and_rewards(seed_json_file = item_location_map_file)
print("Writing level up rewards...")
write_level_up_rewards(seed_json_file = item_location_map_file)
print("Writing weapon stats...")
write_keyblade_stats(seed_json_file = keyblade_stats_file)
print("Writing item sort order and sell price...")
write_item_sort_order_and_sell_price(settings_file = settings_file)
print("Writing map prizes...")
write_map_prizes(seed_json_file = item_location_map_file)
print("Writing EXP chart...")
write_exp_chart(settings_file = settings_file)
print("Writing toggleable luas...")
write_toggleable_luas(settings_file = settings_file)
print("Writing starting accessories...")
write_starting_accessories(seed_json_file = item_location_map_file, settings_file = settings_file)
print("Writing spell info...")
write_spell_info(settings_file = settings_file, mp_cost_file = mp_cost_file)
print("Writing gummi items...")
write_gummi_items(settings_file = settings_file)
print("Writing gummi item buy and sell price...")
write_gummi_item_buy_and_sell_price()
print("Writing augment data...")
write_augments(seed_json_file = item_location_map_file, settings_file = settings_file)
print("Write globals...")
write_globals(settings_file = settings_file, mp_cost_file = mp_cost_file, seed_json_file = item_location_map_file, ap_cost_file = ap_cost_file)
print("Writing settings file...")
write_settings_file(settings_file = settings_file)
print("Writing seed file...")
write_seed_file(seed_json_file = item_location_map_file)
print("Writing seed...")
write_seed(settings_file = settings_file)
print("Writing icon...")
write_icon()
print("Writing mod zip...")
write_mod_zip(settings_file = settings_file)
print("All jobs complete! Enjoy!")