data_classes.py
def load_files(self) -> None:
        """
        load all the relevant files from base mod config file
        """
        # Load AIC file
        if self.base_file['AIC']:
            with codecs.open(os.path.join(self.base_dir, self.base_file['AIC']), 'r', 'utf-8-sig') as f:
                self.aic = json.load(f, strict=False)
        else:
            # load Vanilla AIC
            with open(os.path.join(self.vanilla_path, 'vanilla_aic.json'), 'r') as f:
                self.aic = json.load(f, strict=False)

        # Load Troops file
        if self.base_file['Troops']:
            with codecs.open(os.path.join(self.base_dir, self.base_file['Troops']), 'r', 'utf-8-sig') as f:
                self.troops = json.load(f, strict=False)
        else:
            # load Vanilla Troops
            with open(os.path.join(self.vanilla_path, 'vanilla_troops.json'), 'r') as f:
                self.troops = json.load(f, strict=False)

        # Load AIV file
        if self.base_file['AIV']:
            with open('char_aiv.json', 'r') as f:
                self.aiv = json.load(f, strict=False)
                for char in self.aiv.keys():
                    for item in self.aiv[char].items():
                        self.aiv[char][item[0]] = os.path.join(os.path.abspath(self.base_file['AIV']), item[1])
        else:
            # load Vanilla AIV
            with open(os.path.join(self.vanilla_path, 'vanilla_aiv.json'), 'r') as f:
                self.aiv = json.load(f, strict=False)
                for char in self.aiv.keys():
                    for item in self.aiv[char].items():
                        self.aiv[char][item[0]] = os.path.join(self.vanilla_path, item[1])

        # Load Assets file
        if self.base_file['Assets']:
            with open(os.path.join(self.base_dir, self.base_file['Assets']), 'r') as f:
                self.assets = json.load(f, strict=False)
        else:
            # load Vanilla Assets
            with open(os.path.join(self.vanilla_path, 'vanilla_assets.json'), 'r') as f:
                self.assets = json.load(f, strict=False)
                for char in self.assets.keys():
                    for item in self.assets[char]['Speech'].items():
                        self.assets[char]['Speech'][item[0]] = os.path.join(self.vanilla_path, 'assets', item[1])
                    for item in self.assets[char]['Binks'].items():
                        self.assets[char]['Binks'][item[0]] = os.path.join(self.vanilla_path, 'assets', item[1])

        load all the relevant files from base mod config file
        
load all the relevant files from base mod config file
load all the relevant files from base mod config file
def load_files(self) -> None:
        if self.base_file['AIC']:
            with codecs.open(os.path.join(self.base_dir, self.base_file['AIC']), 'r', 'utf-8-sig') as f:
                self.aic = json.load(f, strict=False)
        else:
            with open(os.path.join(self.vanilla_path, 'vanilla_aic.json'), 'r') as f:
                self.aic = json.load(f, strict=False)
        if self.base_file['Troops']:
            with codecs.open(os.path.join(self.base_dir, self.base_file['Troops']), 'r', 'utf-8-sig') as f:
                self.troops = json.load(f, strict=False)
        else:
            with open(os.path.join(self.vanilla_path, 'vanilla_troops.json'), 'r') as f:
                self.troops = json.load(f, strict=False)
        if self.base_file['AIV']:
            with open('char_aiv.json', 'r') as f:
                self.aiv = json.load(f, strict=False)
                for char in self.aiv.keys():
                    for item in self.aiv[char].items():
                        self.aiv[char][item[0]] = os.path.join(os.path.abspath(self.base_file['AIV']), item[1])
        else:
            with open(os.path.join(self.vanilla_path, 'vanilla_aiv.json'), 'r') as f:
                self.aiv = json.load(f, strict=False)
                for char in self.aiv.keys():
                    for item in self.aiv[char].items():
                        self.aiv[char][item[0]] = os.path.join(self.vanilla_path, item[1])
        if self.base_file['Assets']:
            with open(os.path.join(self.base_dir, self.base_file['Assets']), 'r') as f:
                self.assets = json.load(f, strict=False)
        else:
            with open(os.path.join(self.vanilla_path, 'vanilla_assets.json'), 'r') as f:
                self.assets = json.load(f, strict=False)
                for char in self.assets.keys():
                    for item in self.assets[char]['Speech'].items():
                        self.assets[char]['Speech'][item[0]] = os.path.join(self.vanilla_path, 'assets', item[1])
                    for item in self.assets[char]['Binks'].items():
                        self.assets[char]['Binks'][item[0]] = os.path.join(self.vanilla_path, 'assets', item[1])
def load_files ( self ) -> None : if self . base_file [ 'AIC' ] : with codecs . open ( os . path . join ( self . base_dir , self . base_file [ 'AIC' ] ) , 'r' , 'utf-8-sig' ) as f : self . aic = json . load ( f , strict = False ) else : with open ( os . path . join ( self . vanilla_path , 'vanilla_aic.json' ) , 'r' ) as f : self . aic = json . load ( f , strict = False ) if self . base_file [ 'Troops' ] : with codecs . open ( os . path . join ( self . base_dir , self . base_file [ 'Troops' ] ) , 'r' , 'utf-8-sig' ) as f : self . troops = json . load ( f , strict = False ) else : with open ( os . path . join ( self . vanilla_path , 'vanilla_troops.json' ) , 'r' ) as f : self . troops = json . load ( f , strict = False ) if self . base_file [ 'AIV' ] : with open ( 'char_aiv.json' , 'r' ) as f : self . aiv = json . load ( f , strict = False ) for char in self . aiv . keys ( ) : for item in self . aiv [ char ] . items ( ) : self . aiv [ char ] [ item [ 0 ] ] = os . path . join ( os . path . abspath ( self . base_file [ 'AIV' ] ) , item [ 1 ] ) else : with open ( os . path . join ( self . vanilla_path , 'vanilla_aiv.json' ) , 'r' ) as f : self . aiv = json . load ( f , strict = False ) for char in self . aiv . keys ( ) : for item in self . aiv [ char ] . items ( ) : self . aiv [ char ] [ item [ 0 ] ] = os . path . join ( self . vanilla_path , item [ 1 ] ) if self . base_file [ 'Assets' ] : with open ( os . path . join ( self . base_dir , self . base_file [ 'Assets' ] ) , 'r' ) as f : self . assets = json . load ( f , strict = False ) else : with open ( os . path . join ( self . vanilla_path , 'vanilla_assets.json' ) , 'r' ) as f : self . assets = json . load ( f , strict = False ) for char in self . assets . keys ( ) : for item in self . assets [ char ] [ 'Speech' ] . items ( ) : self . assets [ char ] [ 'Speech' ] [ item [ 0 ] ] = os . path . join ( self . vanilla_path , 'assets' , item [ 1 ] ) for item in self . assets [ char ] [ 'Binks' ] . items ( ) : self . assets [ char ] [ 'Binks' ] [ item [ 0 ] ] = os . path . join ( self . vanilla_path , 'assets' , item [ 1 ] )
load all the relevant files from base mod config file
load all the relevant files from base mod config file
"""
        load all the relevant files from base mod config file
        """ # Load AIC file # load Vanilla AIC # Load Troops file # load Vanilla Troops # Load AIV file # load Vanilla AIV # Load Assets file # load Vanilla Assets
self