Skip to content

Commit

Permalink
Merge pull request #397 from Wolfy76700/game/bh
Browse files Browse the repository at this point in the history
BH: Added a batch of characters
  • Loading branch information
Wolfy76700 authored Oct 26, 2023
2 parents 179f0dd + 62cc93c commit 2dc143c
Show file tree
Hide file tree
Showing 23 changed files with 203 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ utilities/get_icons_from_inkipedia/spl3/*
utilities/convert_webp_to_png/out/*
utilities/convert_webp_to_png/source/*
utilities/translate_pokemon_names/source/*
*.bak
*.bak
utilities/mass_update/*.json
59 changes: 55 additions & 4 deletions games/bh/base_files/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@
"Hattori": {
"codename": "Hattori"
},
"Heatwave": {
"codename": "Heatwave"
},
"Hellboy": {
"codename": "Hellboy"
},
Expand Down Expand Up @@ -318,6 +315,60 @@
},
"Po": {
"codename": "Po"
},
"Red Rapton": {
"codename": "RedRaptor"
},
"Loki": {
"codename": "Loki"
},
"King Knight": {
"codename": "KingKnight"
},
"The Rock": {
"codename": "TheRock"
},
"Roman Reigns": {
"codename": "RomanReigns"
},
"Macho Man": {
"codename": "MachoMan"
},
"The Undertaker": {
"codename": "Undertaker"
},
"Stevonnie": {
"codename": "Stevonnie"
},
"Garnet": {
"codename": "Garnet"
},
"Heatblast": {
"codename": "Heatblast"
},
"Chun-Li": {
"codename": "ChunLi"
},
"Akuma": {
"codename": "Akuma"
},
"Dhalsim": {
"codename": "Dhalsim"
},
"The Master Chief": {
"codename": "MasterChief"
},
"The Arbiter": {
"codename": "Arbiter"
},
"Devil Jin": {
"codename": "DevilJin"
},
"Nina Williams": {
"codename": "NinaWilliams"
},
"Yoshimitsu": {
"codename": "Yoshimitsu"
}
},
"credits": "",
Expand Down Expand Up @@ -350,5 +401,5 @@
"codename": "Fangwild2"
}
},
"version": "0.2"
"version": "0.3"
}
118 changes: 110 additions & 8 deletions games/bh/full/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"full"
],
"credits": "@Sand_Wic for extracting the assets from the game",
"version": "0.2",
"version": "0.3",
"eyesights": {
"Aang": {
"0": {
Expand Down Expand Up @@ -211,12 +211,6 @@
"y": 971
}
},
"Heatwave": {
"0": {
"x": 989,
"y": 797
}
},
"Hellboy": {
"0": {
"x": 1238,
Expand Down Expand Up @@ -607,7 +601,7 @@
},
"Zariel": {
"0": {
"x": 1333,
"x": 1146,
"y": 695
}
},
Expand Down Expand Up @@ -652,6 +646,114 @@
"x": 803,
"y": 710
}
},
"RedRaptor": {
"0": {
"x": 1199,
"y": 770
}
},
"Loki": {
"0": {
"x": 1179,
"y": 946
}
},
"KingKnight": {
"0": {
"x": 842,
"y": 743
}
},
"TheRock": {
"0": {
"x": 902,
"y": 722
}
},
"RomanReigns": {
"0": {
"x": 734,
"y": 761
}
},
"MachoMan": {
"0": {
"x": 1061,
"y": 608
}
},
"Undertaker": {
"0": {
"x": 962,
"y": 683
}
},
"Stevonnie": {
"0": {
"x": 908,
"y": 818
}
},
"Garnet": {
"0": {
"x": 923,
"y": 710
}
},
"Heatblast": {
"0": {
"x": 860,
"y": 875
}
},
"ChunLi": {
"0": {
"x": 1019,
"y": 824
}
},
"Akuma": {
"0": {
"x": 1037,
"y": 995
}
},
"Dhalsim": {
"0": {
"x": 947,
"y": 734
}
},
"MasterChief": {
"0": {
"x": 908,
"y": 728
}
},
"Arbiter": {
"0": {
"x": 1085,
"y": 833
}
},
"DevilJin": {
"0": {
"x": 1289,
"y": 848
}
},
"NinaWilliams": {
"0": {
"x": 992,
"y": 686
}
},
"Yoshimitsu": {
"0": {
"x": 1034,
"y": 884
}
}
},
"uncropped_edge": [
Expand Down
Binary file added games/bh/full/file_Akuma_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_Arbiter_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_ChunLi_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_DevilJin_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_Dhalsim_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_Garnet_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_Heatblast_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed games/bh/full/file_Heatwave_0.png
Binary file not shown.
Binary file added games/bh/full/file_KingKnight_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_Loki_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_MachoMan_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_MasterChief_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_NinaWilliams_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_RedRaptor_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_RomanReigns_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_Stevonnie_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_TheRock_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_Undertaker_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/bh/full/file_Yoshimitsu_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions utilities/mass_update/mass_generate_new_files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import json
import os

game_codename = "bh"

config_path = f"../../games/{game_codename}/base_files/config.json"
asset_pack = "full"
asset_config_path = f"../../games/{game_codename}/{asset_pack}/config.json"

with open(config_path, "rt", encoding="utf-8") as config_file:
config = json.loads(config_file.read())

with open(asset_config_path, "rt", encoding="utf-8") as asset_config_file:
asset_config = json.loads(asset_config_file.read())

characters = config.get("character_to_codename")

eyesights_dict = {}
new_file_list = []

for character_name in characters.keys():
codename = characters[character_name].get("codename")
prefix = asset_config.get("prefix")
postfix = asset_config.get("postfix")
file_path = f"../../games/{game_codename}/{asset_pack}/{prefix}{codename}{postfix}0.png"
if not os.path.exists(file_path):
new_file_list.append(f"{file_path}")
if codename not in asset_config.get("eyesights").keys():
eyesights_dict[codename] = {0: {"x": 0, "y": 0}}

with open("eyesights.json", "wt", encoding="utf-8") as eyesights_file:
eyesights_file.write(json.dumps({"eyesights": eyesights_dict}, indent=2))

for file_path in new_file_list:
with open(file_path, "wb") as new_file:
new_file.write(bytearray())

0 comments on commit 2dc143c

Please sign in to comment.