diff --git a/02_loot_generator_parallel.py b/02_loot_generator_parallel.py index 9f84f1c..7017a0b 100644 --- a/02_loot_generator_parallel.py +++ b/02_loot_generator_parallel.py @@ -21,17 +21,18 @@ from src.loose_loot import preprocess_looseloot, LooseLootProcessor with open('config/config.yaml', 'r') as fin: config = yaml.load(fin, Loader=yaml.FullLoader) -with open(f'config/{config["config"]["static"]["forced_static_yaml"]}', 'r') as fin: - FORCED_STATIC = yaml.load(fin, Loader=yaml.FullLoader) +with open(f'config/{config["config"]["static"]["forced_yaml"]}', 'r') as fin: + forced_static_yaml = yaml.load(fin, Loader=yaml.FullLoader) -with open(f'config/{config["config"]["static"]["forced_loose_yaml"]}', 'r') as fin: +STATIC_WEAPON_IDS = forced_static_yaml['static_weapon_ids'] +FORCED_STATIC = forced_static_yaml['forced_items'] + +with open(f'config/{config["config"]["loose"]["forced_yaml"]}', 'r') as fin: FORCED_LOOSE = yaml.load(fin, Loader=yaml.FullLoader) with open(f'config/{config["server"]["map_directory_mapping_yaml"]}', 'r') as fin: loose_loot_dir_map = yaml.load(fin, Loader=yaml.FullLoader) -STATIC_WEAPON_IDS = config["config"]["static"]["static_weapon_ids"] - tarkov_server_dir = Path(config["server"]["location"]) loot_dump_archive = Path(config["archives"]["target_folder"]) / config["archives"]["loot_filename"] @@ -93,7 +94,8 @@ def main(): archive_files = set(archive.getnames()) with futures.ProcessPoolExecutor() as executor: print("Gathering dumps") - for result in list(tqdm(executor.map(parse_dumps, archive.read(archive_files).items()), total=len(archive_files))): + for result in list( + tqdm(executor.map(parse_dumps, archive.read(archive_files).items()), total=len(archive_files))): if result is not None: gather_loot_results.append(result) # get the newest dump per map @@ -110,7 +112,6 @@ def main(): result["basic_info"]["fname"] ) - print(f"Reading dumps took {time.time() - time_start} seconds.") dump_count = len(gather_loot_results) diff --git a/README.md b/README.md index 1630dbc..097fa2b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ tools: server: # SPT-AKI Server location (to store the generated json) location: 'C:/GAMES/SPT_AKI_Dev/Server/' - # The map names in the loot dump do not directly corresond to the server database structure, this is the mapping + # The map names in the loot dump do not directly correspond to the server database structure, this is the mapping map_directory_mapping_yaml: map_directory_mapping.yaml archives: @@ -29,12 +29,9 @@ archives: backup_file: 'D:/Games/SPT_Dev/map_dumps/12.12_unused/complete.7z' config: static: - # ids for static weapons - static_weapon_ids: - - 5d52cc5ba4b9367408500062 - - 5cdeb229d7f00c000e7ce174 # we have a separate yaml that defined forced static loot per map - forced_static_yaml: forced_static.yaml + forced_yaml: forced_static.yaml + loose: # known quest items per map for validation - forced_loose_yaml: forced_loose.yaml + forced_yaml: forced_loose.yaml ```` \ No newline at end of file diff --git a/config/forced_static.yaml b/config/forced_static.yaml index 782386a..b2cfb42 100644 --- a/config/forced_static.yaml +++ b/config/forced_static.yaml @@ -1,5 +1,11 @@ --- -Customs: -# unknown key -- containerId: custom_multiScene_00058 - itemTpl: 593962ca86f774068014d9af \ No newline at end of file +static_weapon_ids: + # ids for static weapons + - 5d52cc5ba4b9367408500062 + - 5cdeb229d7f00c000e7ce174 + +forced_items: + Customs: + # unknown key + - containerId: custom_multiScene_00058 + itemTpl: 593962ca86f774068014d9af \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b63b413 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +numpy~=1.20.3 +py7zr~=0.18.0 +pyyaml~=6.0 \ No newline at end of file