Exemple #1
0
    def __init__(self, ggpk_path):
        reader_opts = {'use_dat_value': False, 'auto_build_index': True}

        self.dat_reader = RelationalReader(path_or_ggpk=ggpk_path,
                                           read_options=reader_opts)
        self.ot_files = OTFileCache(path_or_ggpk=ggpk_path)
        self.translations = TranslationFileCache(path_or_ggpk=ggpk_path,
                                                 merge_with_custom_file=True)
Exemple #2
0
def create_translation_file_cache(ggpk):
    return TranslationFileCache(path_or_ggpk=ggpk)
Exemple #3
0
def create_translation_file_cache(file_system):
    return TranslationFileCache(path_or_file_system=file_system)
# Path data is extracted to, only need Metadata/Data
path = 'D:/Temp/'

# speed things up
opt = {
    'use_dat_value': False,
    'auto_build_index': True,
}

r = RelationalReader(
    path_or_ggpk=path,
    read_options=opt,
)

tc = TranslationFileCache(path_or_ggpk=path)

r['Maps.dat'].build_index('Regular_WorldAreasKey')
r['Maps.dat'].build_index('Unique_WorldAreasKey')
r['PantheonSouls.dat'].build_index('BaseItemTypesKey')

for node in r['AtlasNode.dat']:
    map = r['Maps.dat'].index['Regular_WorldAreasKey'].get(
        node['WorldAreasKey'])
    unique = False
    if map is None:
        map = r['Maps.dat'].index['Unique_WorldAreasKey'].get(
            node['WorldAreasKey'])
        unique = True
    if map is None:
        print('Missing: %s' % node['WorldAreasKey']['Id'])