|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# |
| 3 | +# GPL License and Copyright Notice ============================================ |
| 4 | +# This file is part of Wrye Bash. |
| 5 | +# |
| 6 | +# Wrye Bash is free software; you can redistribute it and/or |
| 7 | +# modify it under the terms of the GNU General Public License |
| 8 | +# as published by the Free Software Foundation; either version 2 |
| 9 | +# of the License, or (at your option) any later version. |
| 10 | +# |
| 11 | +# Wrye Bash is distributed in the hope that it will be useful, |
| 12 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | +# GNU General Public License for more details. |
| 15 | +# |
| 16 | +# You should have received a copy of the GNU General Public License |
| 17 | +# along with Wrye Bash; if not, write to the Free Software Foundation, |
| 18 | +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 19 | +# |
| 20 | +# Wrye Bash copyright (C) 2005-2009 Wrye, 2010-2019 Wrye Bash Team |
| 21 | +# https://github.com/wrye-bash |
| 22 | +# |
| 23 | +# ============================================================================= |
| 24 | + |
| 25 | +"""GameInfo override for TES V: Skyrim VR.""" |
| 26 | + |
| 27 | +from ..skyrimse import SkyrimSEGameInfo |
| 28 | +from ... import brec |
| 29 | +from ...brec import MreGlob |
| 30 | + |
| 31 | +class SkyrimVRGameInfo(SkyrimSEGameInfo): |
| 32 | + displayName = u'Skyrim VR' |
| 33 | + fsName = u'Skyrim VR' |
| 34 | + altName = u'Wrye VRash' |
| 35 | + launch_exe = u'SkyrimVR.exe' |
| 36 | + game_detect_file = [u'SkyrimVR.exe'] |
| 37 | + version_detect_file = [u'SkyrimVR.exe'] |
| 38 | + regInstallKeys = ( |
| 39 | + u'Bethesda Softworks\\Skyrim VR', |
| 40 | + u'Installed Path' |
| 41 | + ) |
| 42 | + |
| 43 | + vanilla_string_bsas = { |
| 44 | + u'skyrim.esm': [u'Skyrim - Patch.bsa', u'Skyrim - Interface.bsa'], |
| 45 | + u'update.esm': [u'Skyrim - Patch.bsa', u'Skyrim - Interface.bsa'], |
| 46 | + u'dawnguard.esm': [u'Skyrim - Patch.bsa', u'Skyrim - Interface.bsa'], |
| 47 | + u'hearthfires.esm': [u'Skyrim - Patch.bsa', u'Skyrim - Interface.bsa'], |
| 48 | + u'dragonborn.esm': [u'Skyrim - Patch.bsa', u'Skyrim - Interface.bsa'], |
| 49 | + u'skyrimvr.esm': [ |
| 50 | + u'Skyrim - Patch.bsa', |
| 51 | + u'Skyrim - Interface.bsa', |
| 52 | + u'Skyrim_VR - Main.bsa' |
| 53 | + ], |
| 54 | + } |
| 55 | + |
| 56 | + espm_extensions = SkyrimSEGameInfo.espm_extensions - {u'.esl'} |
| 57 | + check_esl = False |
| 58 | + |
| 59 | + allTags = SkyrimSEGameInfo.allTags | {u'NoMerge'} |
| 60 | + patchers = ( |
| 61 | + u'CellImporter', u'GmstTweaker', u'GraphicsPatcher', |
| 62 | + u'ImportInventory', u'ListsMerger', u'PatchMerger', u'SoundPatcher', |
| 63 | + u'StatsPatcher', u'NamesPatcher', |
| 64 | + ) |
| 65 | + |
| 66 | + class se(SkyrimSEGameInfo.se): |
| 67 | + se_abbrev = u'SKSEVR' |
| 68 | + long_name = u'Skyrim VR Script Extender' |
| 69 | + exe = u'sksevr_loader.exe' |
| 70 | + ver_files = [u'sksevr_loader.exe', u'sksevr_steam_loader.dll'] |
| 71 | + |
| 72 | + SkipBAINRefresh = {u'tes5vredit backups', u'tes5vredit cache'} |
| 73 | + |
| 74 | + @classmethod |
| 75 | + def init(cls): |
| 76 | + cls._dynamic_import_modules(__name__) |
| 77 | + # First import from skyrimse.records file |
| 78 | + from .records import MreWthr, MreMato, MreLtex, MreWatr, MreWeap, \ |
| 79 | + MreStat, MreAmmo, MreVoli, MreLens |
| 80 | + # then import rest of records from skyrim.records |
| 81 | + from ..skyrim.records import MreAact, MreAchr, MreActi, MreAddn, \ |
| 82 | + MreAlch, MreAnio, MreAppa, MreArma, MreArmo, MreArto, MreAspc, \ |
| 83 | + MreAstp, MreAvif, MreBook, MreBptd, MreCams, MreCell, MreClas, \ |
| 84 | + MreClfm, MreClmt, MreCobj, MreColl, MreCont, MreCpth, MreCsty, \ |
| 85 | + MreDebr, MreDial, MreDlbr, MreDlvw, MreDobj, MreDoor, MreDual, \ |
| 86 | + MreEczn, MreEfsh, MreEnch, MreEqup, MreExpl, MreEyes, MreFact, \ |
| 87 | + MreFlor, MreFlst, MreFstp, MreFsts, MreFurn, MreGmst, MreGras, \ |
| 88 | + MreHazd, MreHdpt, MreHeader, MreIdle, MreIdlm, MreImad, MreImgs, \ |
| 89 | + MreInfo, MreIngr, MreIpct, MreIpds, MreKeym, MreKywd, MreLcrt, \ |
| 90 | + MreLctn, MreLgtm, MreLigh, MreLscr, MreLvli, MreLvln, MreLvsp, \ |
| 91 | + MreMatt, MreMesg, MreMgef, MreMisc, MreMovt, MreMstt, MreMusc, \ |
| 92 | + MreMust, MreNpc, MreOtft, MreProj, MreQust, MreRegn, MreRela, \ |
| 93 | + MreRevb, MreRfct, MreScrl, MreShou, MreSlgm, MreSmbn, MreSmen, \ |
| 94 | + MreSmqn, MreSnct, MreSndr, MreSopm, MreSoun, MreSpel, MreSpgd, \ |
| 95 | + MreTact, MreTree, MreTxst, MreVtyp, MreWoop, MreWrld |
| 96 | + cls.mergeClasses = ( |
| 97 | + # MreAchr, MreDial, MreInfo, MreFact, |
| 98 | + MreAact, MreActi, MreAddn, MreAlch, MreAmmo, MreAnio, MreAppa, |
| 99 | + MreArma, MreArmo, MreArto, MreAspc, MreAstp, MreAvif, MreBook, |
| 100 | + MreBptd, MreCams, MreClas, MreClfm, MreClmt, MreCobj, MreColl, |
| 101 | + MreCont, MreCpth, MreCsty, MreDebr, MreDlbr, MreDlvw, MreDobj, |
| 102 | + MreDoor, MreDual, MreEczn, MreEfsh, MreEnch, MreEqup, MreExpl, |
| 103 | + MreEyes, MreFlor, MreFlst, MreFstp, MreFsts, MreFurn, MreGlob, |
| 104 | + MreGmst, MreGras, MreHazd, MreHdpt, MreIdle, MreIdlm, MreImad, |
| 105 | + MreImgs, MreIngr, MreIpct, MreIpds, MreKeym, MreKywd, MreLcrt, |
| 106 | + MreLctn, MreLgtm, MreLigh, MreLscr, MreLtex, MreLvli, MreLvln, |
| 107 | + MreLvsp, MreMato, MreMatt, MreMesg, MreMgef, MreMisc, MreMovt, |
| 108 | + MreMstt, MreMusc, MreMust, MreNpc, MreOtft, MreProj, MreRegn, |
| 109 | + MreRela, MreRevb, MreRfct, MreScrl, MreShou, MreSlgm, MreSmbn, |
| 110 | + MreSmen, MreSmqn, MreSnct, MreSndr, MreSopm, MreSoun, MreSpel, |
| 111 | + MreSpgd, MreStat, MreTact, MreTree, MreTxst, MreVtyp, MreWatr, |
| 112 | + MreWeap, MreWoop, MreWthr, MreVoli, MreLens, |
| 113 | + ####### for debug |
| 114 | + MreQust, |
| 115 | + ) |
| 116 | + # Setting RecordHeader class variables -------------------------------- |
| 117 | + brec.RecordHeader.topTypes = [ |
| 118 | + 'GMST', 'KYWD', 'LCRT', 'AACT', 'TXST', 'GLOB', 'CLAS', 'FACT', |
| 119 | + 'HDPT', 'HAIR', 'EYES', 'RACE', 'SOUN', 'ASPC', 'MGEF', 'SCPT', |
| 120 | + 'LTEX', 'ENCH', 'SPEL', 'SCRL', 'ACTI', 'TACT', 'ARMO', 'BOOK', |
| 121 | + 'CONT', 'DOOR', 'INGR', 'LIGH', 'MISC', 'APPA', 'STAT', 'SCOL', |
| 122 | + 'MSTT', 'PWAT', 'GRAS', 'TREE', 'CLDC', 'FLOR', 'FURN', 'WEAP', |
| 123 | + 'AMMO', 'NPC_', 'LVLN', 'KEYM', 'ALCH', 'IDLM', 'COBJ', 'PROJ', |
| 124 | + 'HAZD', 'SLGM', 'LVLI', 'WTHR', 'CLMT', 'SPGD', 'RFCT', 'REGN', |
| 125 | + 'NAVI', 'CELL', 'WRLD', 'DIAL', 'QUST', 'IDLE', 'PACK', 'CSTY', |
| 126 | + 'LSCR', 'LVSP', 'ANIO', 'WATR', 'EFSH', 'EXPL', 'DEBR', 'IMGS', |
| 127 | + 'IMAD', 'FLST', 'PERK', 'BPTD', 'ADDN', 'AVIF', 'CAMS', 'CPTH', |
| 128 | + 'VTYP', 'MATT', 'IPCT', 'IPDS', 'ARMA', 'ECZN', 'LCTN', 'MESG', |
| 129 | + 'RGDL', 'DOBJ', 'LGTM', 'MUSC', 'FSTP', 'FSTS', 'SMBN', 'SMQN', |
| 130 | + 'SMEN', 'DLBR', 'MUST', 'DLVW', 'WOOP', 'SHOU', 'EQUP', 'RELA', |
| 131 | + 'SCEN', 'ASTP', 'OTFT', 'ARTO', 'MATO', 'MOVT', 'SNDR', 'DUAL', |
| 132 | + 'SNCT', 'SOPM', 'COLL', 'CLFM', 'REVB', 'LENS', 'VOLI'] |
| 133 | + #-> this needs updating for Skyrim |
| 134 | + brec.RecordHeader.recordTypes = set( |
| 135 | + brec.RecordHeader.topTypes + ['GRUP', 'TES4', 'REFR', 'ACHR', |
| 136 | + 'ACRE', 'LAND', 'INFO', 'NAVM', |
| 137 | + 'PHZD', 'PGRE']) |
| 138 | + brec.RecordHeader.plugin_form_version = 44 |
| 139 | + brec.MreRecord.type_class = dict((x.classType,x) for x in ( |
| 140 | + MreAchr, MreDial, MreInfo, MreAact, MreActi, MreAddn, MreAlch, |
| 141 | + MreAmmo, MreAnio, MreAppa, MreArma, MreArmo, MreArto, MreAspc, |
| 142 | + MreAstp, MreAvif, MreBook, MreBptd, MreCams, MreClas, MreClfm, |
| 143 | + MreClmt, MreCobj, MreColl, MreCont, MreCpth, MreCsty, MreDebr, |
| 144 | + MreDlbr, MreDlvw, MreDobj, MreDoor, MreDual, MreEczn, MreEfsh, |
| 145 | + MreEnch, MreEqup, MreExpl, MreEyes, MreFact, MreFlor, MreFlst, |
| 146 | + MreFstp, MreFsts, MreFurn, MreGlob, MreGmst, MreGras, MreHazd, |
| 147 | + MreHdpt, MreIdle, MreIdlm, MreImad, MreImgs, MreIngr, MreIpct, |
| 148 | + MreIpds, MreKeym, MreKywd, MreLcrt, MreLctn, MreLgtm, MreLigh, |
| 149 | + MreLscr, MreLtex, MreLvli, MreLvln, MreLvsp, MreMato, MreMatt, |
| 150 | + MreMesg, MreMgef, MreMisc, MreMovt, MreMstt, MreMusc, MreMust, |
| 151 | + MreNpc, MreOtft, MreProj, MreRegn, MreRela, MreRevb, MreRfct, |
| 152 | + MreScrl, MreShou, MreSlgm, MreSmbn, MreSmen, MreSmqn, MreSnct, |
| 153 | + MreSndr, MreSopm, MreSoun, MreSpel, MreSpgd, MreStat, MreTact, |
| 154 | + MreTree, MreTxst, MreVtyp, MreWatr, MreWeap, MreWoop, MreWthr, |
| 155 | + MreCell, MreWrld, MreVoli, MreLens, # MreNavm, MreNavi |
| 156 | + ####### for debug |
| 157 | + MreQust, MreHeader, |
| 158 | + )) |
| 159 | + brec.MreRecord.simpleTypes = ( |
| 160 | + set(brec.MreRecord.type_class) - {'TES4', 'ACHR', 'CELL', 'DIAL', |
| 161 | + 'INFO', 'WRLD', }) |
| 162 | + |
| 163 | +GAME_TYPE = SkyrimVRGameInfo |
0 commit comments