commit old updates for mhw, gu

This commit is contained in:
Bryce Allen
2021-03-04 11:12:35 -05:00
parent 084870858e
commit b4c9023a32
12 changed files with 1692 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
"""
Script to generate static rewards files for all items.
"""
@@ -33,11 +33,16 @@ if __name__ == '__main__':
err_out = get_utf8_writer(sys.stderr)
# TODO: doesn't work if script is symlinked
db_path = os.path.dirname(sys.argv[0])
db_path = os.path.join(db_path, "..", "db", "mh4u.db")
db = MHDB(db_path)
#db_path = os.path.dirname(sys.argv[0])
#db_path = os.path.join(db_path, "..", "db", "mh4u.db")
# Determinen game from MHAPI_GAME and path based on game.
db = MHDB()
items = db.get_items(rewards.ITEM_TYPES)
if db.game == "gu":
items = db.get_items(exclude_types=[
"Palico Armor", "Palico Weapon", "Weapon", "Armor", "Decoration"])
else:
items = db.get_items(rewards.ITEM_TYPES)
# write all names json to /items.json
items_file = os.path.join(outdir, "items.json")

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
import sys
import argparse
@@ -203,6 +203,9 @@ def parse_args(argv):
parser.add_argument("-g", "--monster-hunter-gen", action="store_true",
default=False,
help="Assume weapons are true attack, use MHGen values")
parser.add_argument("--mhw", "--monster-hunter-world", action="store_true",
default=False,
help="Adjusted attack, use MHWorld values")
parser.add_argument("-m", "--match", nargs="*",
help="WEAPON_TYPE,ELEMENT_OR_STATUS_OR_RAW"
+" Include all matching weapons in their final form."
@@ -392,8 +395,11 @@ def main():
comps = True
else:
comps = False
db = MHDB(game="gen", include_item_components=comps)
db = MHDB(game="gu", include_item_components=comps)
game_uses_true_raw = True
elif args.monster_hunter_world:
db = MHDBX(game="mhw")
game_uses_true_raw = False
else:
db = MHDB(game="4u")
motiondb = MotionValueDB(_pathfix.motion_values_path)

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
import os
import json