Skip to content

Commit 4840573

Browse files
LunNovaInfernio
andcommitted
Skyrim VR Support
Infernio: - Edited to keep up to date with recent changes. - Updated for 'Rework game version calculation' - Updated for 'Move allBethFiles to game/*/vanilla_files.py' - Updated for 'Refactor se.steam_exe, kill SteamInstall setting' - Updated for 'Support .esu plugins' Co-authored-by: Infernio <infernio@icloud.com>
1 parent 43aa3b5 commit 4840573

14 files changed

Lines changed: 348 additions & 3 deletions

Mopy/bash/_games_lo.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,14 @@ def _fixed_order_plugins(self):
12121212
format_date(master_mtime)))
12131213
return add
12141214

1215+
class SkyrimVR(SkyrimSE):
1216+
must_be_active_if_present = (bolt.GPath(u'Update.esm'),
1217+
bolt.GPath(u'Dawnguard.esm'),
1218+
bolt.GPath(u'Hearthfires.esm'),
1219+
bolt.GPath(u'Dragonborn.esm'),
1220+
bolt.GPath(u'SkyrimVR.esm'),)
1221+
_ccc_filename = u''
1222+
12151223
# Game factory
12161224
def game_factory(game_fsName, mod_infos, plugins_txt_path,
12171225
loadorder_txt_path=None):
@@ -1221,6 +1229,8 @@ def game_factory(game_fsName, mod_infos, plugins_txt_path,
12211229
return Enderal(mod_infos, plugins_txt_path, loadorder_txt_path)
12221230
elif game_fsName == u'Skyrim Special Edition':
12231231
return SkyrimSE(mod_infos, plugins_txt_path)
1232+
elif game_fsName == u'Skyrim VR':
1233+
return SkyrimVR(mod_infos, plugins_txt_path)
12241234
elif game_fsName == u'Fallout4':
12251235
return Fallout4(mod_infos, plugins_txt_path)
12261236
elif game_fsName == u'Fallout4VR':

Mopy/bash/bosh/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def readHeader(self):
609609
ins, True)
610610
except struct.error as rex:
611611
raise ModError(self.name,u'Struct.error: %s' % rex)
612-
if bush.game.fsName == u'Skyrim Special Edition':
612+
if bush.game.fsName in (u'Skyrim Special Edition', u'Skyrim VR'):
613613
if tes4_rec_header.form_version != \
614614
RecordHeader.plugin_form_version:
615615
modInfos.sse_form43.add(self.name)

Mopy/bash/bosh/bsa_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ def get_bsa_type(game_fsName):
653653
return OblivionBsa
654654
elif game_fsName in (u'Enderal', u'Fallout3', u'FalloutNV', u'Skyrim'):
655655
return SkyrimBsa
656-
elif game_fsName == u'Skyrim Special Edition':
656+
elif game_fsName in (u'Skyrim Special Edition', u'Skyrim VR'):
657657
return SkyrimSeBsa
658658
elif game_fsName in (u'Fallout4', u'Fallout4VR'):
659659
return Fallout4Ba2

Mopy/bash/bosh/mods_metadata.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ def getLootApiGameType(fsName):
326326
return loot_api.GameType.tes5
327327
elif fsName == 'Skyrim Special Edition':
328328
return loot_api.GameType.tes5se
329+
elif fsName == 'Skyrim VR':
330+
return loot_api.GameType.tes5vr
329331
elif fsName == 'Fallout3':
330332
return loot_api.GameType.fo3
331333
elif fsName == 'FalloutNV':

Mopy/bash/bosh/save_headers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,8 @@ def get_save_header_type(game_fsName):
495495
""":rtype: type"""
496496
if game_fsName == u'Oblivion':
497497
return OblivionSaveHeader
498-
elif game_fsName in (u'Enderal', u'Skyrim', u'Skyrim Special Edition'):
498+
elif game_fsName in (u'Enderal', u'Skyrim', u'Skyrim Special Edition',
499+
u'Skyrim VR'):
499500
return SkyrimSaveHeader
500501
elif game_fsName in (u'Fallout4', u'Fallout4VR'):
501502
return Fallout4SaveHeader
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
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
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
# Import all constants from Skyrim SE then edit them as needed
26+
27+
from ..skyrimse.constants import *
28+
29+
bethDataFiles = {
30+
u'skyrim.esm',
31+
u'update.esm',
32+
u'dawnguard.esm',
33+
u'dragonborn.esm',
34+
u'hearthfires.esm',
35+
u'skyrimvr.esm',
36+
u'skyrim - animations.bsa',
37+
u'skyrim - interface.bsa',
38+
u'skyrim - meshes0.bsa',
39+
u'skyrim - meshes1.bsa',
40+
u'skyrim - misc.bsa',
41+
u'skyrim - patch.bsa',
42+
u'skyrim - shaders.bsa',
43+
u'skyrim - sounds.bsa',
44+
u'skyrim - textures0.bsa',
45+
u'skyrim - textures1.bsa',
46+
u'skyrim - textures2.bsa',
47+
u'skyrim - textures3.bsa',
48+
u'skyrim - textures4.bsa',
49+
u'skyrim - textures5.bsa',
50+
u'skyrim - textures6.bsa',
51+
u'skyrim - textures7.bsa',
52+
u'skyrim - textures8.bsa',
53+
u'skyrim - voices_en0.bsa',
54+
u'skyrim_vr - main.bsa'
55+
}
56+
57+
# xEdit menu string and key for expert setting
58+
xEdit_expert = (_(u'TES5VREdit Expert'), 'tes5vrview.iKnowWhatImDoing')
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
from ..skyrimse.default_tweaks import *
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
"""This package contains the Skyrim VR specific patchers. This module
26+
contains the data structures that are dynamically set on a per game basis in
27+
bush."""
28+
29+
gameSpecificPatchers = {}
30+
gameSpecificListPatchers = {}

Mopy/bash/game/skyrimvr/records.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
from ..skyrimse.records import *

0 commit comments

Comments
 (0)