Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions src/xeConfiguration.pas
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface

const
{$region 'Game modes'}
GameArray: array[0..5] of TGameMode = (
GameArray: array[0..7] of TGameMode = (
( longName: 'Fallout New Vegas'; gameName: 'FalloutNV'; gameMode: gmFNV;
regName: 'FalloutNV'; appName: 'FNV'; exeName: 'FalloutNV.exe';
appIDs: '22380,2028016'; ),
Expand All @@ -55,7 +55,13 @@ interface
exeName: 'SkyrimSE.exe'; appIDs: '489830'; ),
( longName: 'Fallout 4'; gameName: 'Fallout4'; gameMode: gmFO4;
regName: 'Fallout4'; appName: 'FO4'; exeName: 'Fallout4.exe';
appIDs: '377160'; )
appIDs: '377160'; ),
( longName: 'Skyrim VR'; gameName: 'Skyrim'; gameMode: gmTES5VR;
regName: 'Skyrim VR'; appName: 'TES5VR';
exeName: 'SkyrimVR.exe'; appIDs: '611670'; ),
( longName: 'Fallout 4 VR'; gameName: 'Fallout4'; gameMode: gmFO4VR;
regName: 'Fallout 4 VR'; appName: 'FO4VR';
exeName: 'Fallout4VR.exe'; appIDs: '611660'; )
);
{$endregion}
{$region 'TES4Languages'}
Expand Down Expand Up @@ -105,15 +111,15 @@ function GetGameIniPath(myGamesPath: String; GameMode: TGameMode): String;
function GetLanguage: String;
begin
Result := Language;
if (wbGameMode = gmFO4) and (slLanguageMap.IndexOfName(Result) > -1) then
if (wbGameMode in [gmFO4, gmFO4VR]) and (slLanguageMap.IndexOfName(Result) > -1) then
Result := slLanguageMap.Values[Result];
end;

function GetLanguageEncoding: TwbStringEncoding;
begin
Result := seCP1252;
if (slUTF8Languages.IndexOf(Language) > -1)
or ((wbGameMode in [gmSSE, gmFO4]) and (Language <> 'English')) then
or ((wbGameMode in [gmSSE, gmFO4, gmTES5VR, gmFO4VR]) and (Language <> 'English')) then
Result := seUTF8;
end;

Expand Down Expand Up @@ -142,10 +148,10 @@ procedure SetGame(id: integer);
wbGameMode := GameMode.gameMode;
wbAppName := GameMode.appName;
wbDataPath := dataPath;
wbVWDInTemporary := wbGameMode in [gmSSE, gmTES5, gmFO3, gmFNV];
wbVWDAsQuestChildren := wbGameMode = gmFO4;
wbArchiveExtension := IfThen(wbGameMode = gmFO4, '.ba2', '.bsa');
wbLoadBSAs := wbGameMode in [gmFO4, gmSSE, gmTES5, gmTES4];
wbVWDInTemporary := wbGameMode in [gmTES5VR, gmSSE, gmTES5, gmFO3, gmFNV];
wbVWDAsQuestChildren := wbGameMode in [gmFO4VR, gmFO4];
wbArchiveExtension := IfThen(wbGameMode in [gmFO4VR, gmFO4], '.ba2', '.bsa');
wbLoadBSAs := wbGameMode in [gmFO4VR, gmFO4, gmTES5VR, gmSSE, gmTES5, gmTES4];
wbSimpleRecords := False;
wbDisplayLoadOrderFormID := True;
wbSortSubRecords := True;
Expand All @@ -165,8 +171,10 @@ procedure SetGame(id: integer);

// load definitions
case wbGameMode of
gmSSE: DefineTES5;
gmFO4VR: DefineFO4;
gmFO4: DefineFO4;
gmTES5VR: DefineTES5;
gmSSE: DefineTES5;
gmTES5: DefineTES5;
gmFNV: DefineFNV;
gmTES4: DefineTES4;
Expand Down
25 changes: 22 additions & 3 deletions src/xeSetup.pas
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ procedure LoadResources;
begin
wbContainerHandler.AddFolder(wbDataPath);
bExact := wbGameMode in [gmTES5];
bModIni := wbGameMode in [gmTES5, gmSSE];
bModIni := wbGameMode in [gmTES5, gmSSE, gmTES5VR];
slBSAFileNames := TStringList.Create;
try
slErrors := TStringList.Create;
Expand Down Expand Up @@ -465,7 +465,7 @@ procedure LoadPluginsList(const sLoadPath: String; var sl: TStringList; noDelete
sPath := sLoadPath + 'plugins.txt';
if FileExists(sPath) then begin
sl.LoadFromFile(sPath);
if (wbGameMode = gmSSE) or (wbGameMode = gmFO4) then
if wbGameMode in [gmFO4VR, gmFO4, gmTES5VR, gmSSE] then
ProcessPluginsFormat(sl, noDelete);
end
else
Expand All @@ -481,7 +481,7 @@ procedure LoadLoadOrder(const sLoadPath: String; var slLoadOrder, slPlugins: TSt
sPath: String;
begin
sPath := sLoadPath + 'loadorder.txt';
if (wbGameMode <> gmSSE) and (wbGameMode <> gmFO4)
if not (wbGameMode in [gmFO4VR, gmFO4, gmTES5VR, gmSSE])
and FileExists(sPath) then
slLoadOrder.LoadFromFile(sPath)
else
Expand Down Expand Up @@ -621,6 +621,14 @@ procedure AddBaseMasters(var sl: TStringList);
FixLoadOrder(sl, 'Dragonborn.esm', index);
AddCCPlugins(sl, index);
end
else if (wbGameMode = gmTES5VR) then begin
FixLoadOrder(sl, 'Update.esm', index);
FixLoadOrder(sl, 'Dawnguard.esm', index);
FixLoadOrder(sl, 'HearthFires.esm', index);
FixLoadOrder(sl, 'Dragonborn.esm', index);
FixLoadOrder(sl, 'SkyrimVR.esm', index);
AddCCPlugins(sl, index);
end
else if (wbGameMode = gmFO4) then begin
FixLoadOrder(sl, 'DLCRobot.esm', index);
FixLoadOrder(sl, 'DLCworkshop01.esm', index);
Expand All @@ -630,6 +638,17 @@ procedure AddBaseMasters(var sl: TStringList);
FixLoadOrder(sl, 'DLCNukaWorld.esm', index);
FixLoadOrder(sl, 'DLCUltraHighResolution.esm', index);
AddCCPlugins(sl, index);
end
else if (wbGameMode = gmFO4VR) then begin
FixLoadOrder(sl, 'Fallout4_VR.esm', index);
FixLoadOrder(sl, 'DLCRobot.esm', index);
FixLoadOrder(sl, 'DLCworkshop01.esm', index);
FixLoadOrder(sl, 'DLCCoast.esm', index);
FixLoadOrder(sl, 'DLCworkshop02.esm', index);
FixLoadOrder(sl, 'DLCworkshop03.esm', index);
FixLoadOrder(sl, 'DLCNukaWorld.esm', index);
FixLoadOrder(sl, 'DLCUltraHighResolution.esm', index);
AddCCPlugins(sl, index);
end;
end;

Expand Down