| 
1 |  | -.PHONY: clean install-deps all mapping.json rewards translations.json item_to_name_mappings.json season_rewards.json twitch_rewards.json platform_rewards.json  | 
 | 1 | +.PHONY: clean install-deps all mapping.json rewards translations.json item_to_name_mappings.json season_rewards.json twitch_rewards.json platform_rewards.json extract_pcbank_metadataetc extract_pcbank_precache  | 
2 | 2 | 
 
  | 
3 |  | -VERSION := 6.12-BREACH-28.October.2025  | 
 | 3 | +MBIN_COMPILER_VERSION := v6.13.0-pre1  | 
4 | 4 | 
 
  | 
5 | 5 | all: clean install-deps mapping.json rewards  | 
6 | 6 | 
 
  | 
7 | 7 | clean:  | 
8 |  | -	rm -f ./season_rewards.json ./twitch_rewards.json ./item_to_name_mappings.json ./translations.json ./mapping.json  | 
 | 8 | +	rm -f ./season_rewards.json ./twitch_rewards.json ./item_to_name_mappings.json ./translations.json ./mapping.json ./platform_rewards.json  | 
9 | 9 | 	rm -rf ./EXTRACTED  | 
10 | 10 | 	rm -f ./MBINCompiler-linux  | 
11 | 11 | 	rm -rf ./HGPAKtool  | 
12 | 12 | 	rm -f ./*.log  | 
13 | 13 | 	rm -f ./*.MXML  | 
14 | 14 | 
 
  | 
15 | 15 | install-deps:  | 
16 |  | -	curl -sSL https://github.com/monkeyman192/MBINCompiler/releases/download/v6.13.0-pre1/MBINCompiler-linux-dotnet6  -o ./MBINCompiler-linux  | 
 | 16 | +	curl -sSL https://github.com/monkeyman192/MBINCompiler/releases/download/$(MBIN_COMPILER_VERSION)/MBINCompiler-linux-dotnet6  -o ./MBINCompiler-linux  | 
17 | 17 | 	git clone https://github.com/monkeyman192/HGPAKtool.git ./HGPAKtool  | 
18 | 18 | 	chmod +x ./MBINCompiler-linux  | 
19 | 19 | 
 
  | 
20 | 20 | mapping.json:  | 
21 |  | -	curl -sSL https://github.com/monkeyman192/MBINCompiler/releases/latest/download/mapping.json -o ./mapping.json  | 
 | 21 | +	curl -sSL https://github.com/monkeyman192/MBINCompiler/releases/download/$(MBIN_COMPILER_VERSION)/mapping.json -o ./mapping.json  | 
22 | 22 | 	jq '.Mapping | map({(.Key): .Value}) | add' ./mapping.json > ../src/data/mapping.json  | 
23 | 23 | 	npx prettier --write ../src/data/mapping.json --config ../.prettierrc  | 
24 | 24 | 
 
  | 
25 |  | -translations.json:  | 
 | 25 | +extract_pcbank_metadataetc:  | 
26 | 26 | 	python ./HGPAKtool/HGPAKTool/hgpaktool.py ./PCBANKS/NMSARC.MetadataEtc.pak  | 
 | 27 | + | 
 | 28 | +extract_pcbank_precache:  | 
 | 29 | +	python ./HGPAKtool/HGPAKTool/hgpaktool.py ./PCBANKS/NMSARC.Precache.pak  | 
 | 30 | + | 
 | 31 | +translations.json: extract_pcbank_metadataetc  | 
27 | 32 | 	for f in EXTRACTED/language/*_usenglish.mbin; do \  | 
28 | 33 | 		echo "Decoding $$f"; \  | 
29 | 34 | 		./MBINCompiler-linux -y -d ./EXTRACTED/language/ "$$f"; \  | 
30 | 35 | 	done  | 
31 | 36 | 	python ./extract_translations.py  | 
32 | 37 | 
 
  | 
33 |  | -item_to_name_mappings.json: translations.json  | 
34 |  | -	curl -sSL "https://github.com/NMSCD/nms-archive/raw/refs/heads/main/$(VERSION)/METADATA/REALITY/TABLES/NMS_REALITY_GCPRODUCTTABLE.MXML" -o ./NMS_REALITY_GCPRODUCTTABLE.MXML  | 
35 |  | -	curl -sSL "https://github.com/NMSCD/nms-archive/raw/refs/heads/main/$(VERSION)/METADATA/REALITY/TABLES/NMS_BASEPARTPRODUCTS.MXML" -o ./NMS_BASEPARTPRODUCTS.MXML  | 
 | 38 | +item_to_name_mappings.json: translations.json extract_pcbank_precache  | 
 | 39 | +	./MBINCompiler-linux -y -d ./ ./EXTRACTED/metadata/reality/tables/nms_reality_gcproducttable.mbin  | 
 | 40 | +	./MBINCompiler-linux -y -d ./ ./EXTRACTED/metadata/reality/tables/nms_basepartproducts.mbin  | 
36 | 41 | 	python ./extract_item_names.py  | 
37 | 42 | 
 
  | 
38 |  | -season_rewards.json: item_to_name_mappings.json  | 
39 |  | -	curl -sSL "https://github.com/NMSCD/nms-archive/raw/refs/heads/main/$(VERSION)/METADATA/REALITY/TABLES/UNLOCKABLESEASONREWARDS.MXML" -o ./UNLOCKABLESEASONREWARDS.MXML  | 
 | 43 | +season_rewards.json: item_to_name_mappings.json extract_pcbank_precache  | 
 | 44 | +	./MBINCompiler-linux -y -d ./ ./EXTRACTED/metadata/reality/tables/unlockableseasonrewards.mbin  | 
40 | 45 | 	python ./extract_season_rewards.py  | 
41 | 46 | 	cp ./season_rewards.json ../src/data/rewards/season.json  | 
42 | 47 | 	npx prettier --write ../src/data/rewards/season.json --config ../.prettierrc  | 
43 | 48 | 
 
  | 
44 |  | -twitch_rewards.json: item_to_name_mappings.json  | 
45 |  | -	curl -sSL "https://github.com/NMSCD/nms-archive/raw/refs/heads/main/$(VERSION)/METADATA/REALITY/TABLES/UNLOCKABLETWITCHREWARDS.MXML" -o ./UNLOCKABLETWITCHREWARDS.MXML  | 
 | 49 | +twitch_rewards.json: item_to_name_mappings.json extract_pcbank_precache  | 
 | 50 | +	./MBINCompiler-linux -y -d ./ ./EXTRACTED/metadata/reality/tables/unlockabletwitchrewards.mbin  | 
46 | 51 | 	python ./extract_twitch_rewards.py  | 
47 | 52 | 	cp ./twitch_rewards.json ../src/data/rewards/twitch.json  | 
48 | 53 | 	npx prettier --write ../src/data/rewards/twitch.json --config ../.prettierrc  | 
49 | 54 | 
 
  | 
50 |  | -platform_rewards.json: item_to_name_mappings.json  | 
51 |  | -	curl -sSL "https://github.com/NMSCD/nms-archive/raw/refs/heads/main/$(VERSION)/METADATA/REALITY/TABLES/UNLOCKABLEPLATFORMREWARDS.MXML" -o ./UNLOCKABLEPLATFORMREWARDS.MXML  | 
 | 55 | +platform_rewards.json: item_to_name_mappings.json extract_pcbank_precache  | 
 | 56 | +	./MBINCompiler-linux -y -d ./ ./EXTRACTED/metadata/reality/tables/unlockableplatformrewards.mbin  | 
52 | 57 | 	python ./extract_platform_rewards.py  | 
53 | 58 | 	cp ./platform_rewards.json ../src/data/rewards/platform.json  | 
54 | 59 | 	npx prettier --write ../src/data/rewards/platform.json --config ../.prettierrc  | 
 | 
0 commit comments