Skip to content

Commit ea78589

Browse files
committed
- Renamed AppProfile.externalFiles to AppProfile.externalFilesCache.
- Added `AppData.verifyProfileOnStart` setting to control profile verification on app startup. - Mod deployment no longer depends on `AppProfile.externalFilesCache`.
1 parent 0969fc3 commit ea78589

File tree

16 files changed

+81
-34
lines changed

16 files changed

+81
-34
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ To install Starfield Mod Loader, simply download the latest release from the [re
5454
> * [**External plugin files**](#external-plugins)
5555
> * [**Backup/restore load order**](#backuprestore-plugin-order)
5656
> * [**Config file management**](#config-file-management)
57+
> * [**App settings**](#app-settings)
5758
> * [**Launching games**](#launch-the-game)
5859
> * [**Troubleshooting**](#troubleshooting)
5960
@@ -177,6 +178,8 @@ You can backup and restore the plugin load order using the buttons at the top ri
177178

178179
If you enabled the **Manage Config/INI Files** option for your profile, you will be able to select the "Config" option from the dropdown at the top of the Plugins list. From this section you can edit your profile-specific config/INI files.
179180

181+
If profile-managed config/INI files are disabled, you will see an option in the "Actions" section to view external config files if any are found.
182+
180183
## Activate your mods
181184

182185
To enable mods in the game you must first activate them. Press the **Activate Mods** button in the **Actions** section and your mods will be deployed to the **Mod Base Directory**.
@@ -185,7 +188,11 @@ Mods will now remain active until you press the **Deactivate Mods** button, even
185188

186189
**IMPORTANT NOTE:** If Link Mode is disabled for the profile and you update any of the profile's mod files externally (i.e. in a text editor) while mods are deployed, make sure to press the **Refresh Files** button after, otherwise your changes will not be applied.
187190

188-
**Tip (Linux):** It is recommended to enable the **Normalize path case** option under **File > Preferences** when using Linux with a case-sensitive file system. See [here](#normalizePathCase) for more info.
191+
## App settings
192+
193+
App settings can be changed via **File > Preferences** from the menu bar.
194+
195+
**Tip (Linux):** It is recommended to enable the **Normalize path case** setting when using Linux with a case-sensitive file system. See [here](#normalizePathCase) for more info.
189196

190197
## Launch the game
191198

@@ -219,6 +226,10 @@ bEnableMessageOfTheDay=0
219226
sPhotoModeFolder=Photos
220227
```
221228

229+
### The app sits on the "Verifying Profile..." loading screen for a long time during startup
230+
231+
This can happen when very large profiles are activated. If profile verification is taking too long, you can disable verification on app startup via the menu bar under **File > Preferences**.
232+
222233
### **(Linux)** Some mods are not loading/strange behavior when loading some mods <a name="normalizePathCase"></a>
223234

224235
Some mods may use different casing for their files/folders (i.e. `Interface` vs `interface`) and this can cause issues on case-sensitive file systems, which are often used on Linux. To prevent this issue, you can enable the **Normalize path case** option under **File > Preferences**. When this setting is enabled, Starfield Mod Loader will automatically convert all activated mod files and folders to lowercase when appropriate.

src/app/components/app-preferences/app-preferences.component.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
<form #preferencesForm="ngForm" id="preferences-form" (ngSubmit)="onFormSubmit$.next(preferencesForm)">
22
<ng-container *ngIf="!!formModel">
33
<span>
4-
<mat-checkbox name="pluginsEnabled" [(ngModel)]="formModel.pluginsEnabled" />
5-
<mat-label>Plugins Enabled</mat-label>
4+
<mat-checkbox name="normalizePathCasing"
5+
[(ngModel)]="formModel.normalizePathCasing">
6+
Normalize mod file path
7+
&nbsp;<mat-icon matTooltip="Recommended for Linux">help</mat-icon>
8+
</mat-checkbox>
69
</span>
710

811
<span>
9-
<mat-checkbox name="normalizePathCasing" [(ngModel)]="formModel.normalizePathCasing" />
10-
<mat-label>Normalize Mod File Path Case</mat-label>
12+
<mat-checkbox name="verifyProfileOnStart" [(ngModel)]="formModel.verifyProfileOnStart">
13+
Verify active profile on app startup
14+
&nbsp;<mat-icon matTooltip="Disable this if verification is taking too long during startup">help</mat-icon>
15+
</mat-checkbox>
16+
</span>
17+
18+
<span>
19+
<mat-checkbox name="pluginsEnabled" [(ngModel)]="formModel.pluginsEnabled">
20+
Enable game plugins
21+
</mat-checkbox>
1122
</span>
1223

1324
<mat-form-field appearance="fill">

src/app/components/app-preferences/app-preferences.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import { MatFormFieldModule } from "@angular/material/form-field";
55
import { MatInputModule } from "@angular/material/input";
66
import { MatButtonModule } from "@angular/material/button";
77
import { MatIconModule } from "@angular/material/icon";
8-
import { AppPreferencesComponent } from "./app-preferences.component";
98
import { MatSelectModule } from "@angular/material/select";
109
import { MatCheckboxModule } from "@angular/material/checkbox";
10+
import { MatTooltipModule } from "@angular/material/tooltip";
11+
import { AppPreferencesComponent } from "./app-preferences.component";
1112

1213
@NgModule({
1314
declarations: [
@@ -22,7 +23,8 @@ import { MatCheckboxModule } from "@angular/material/checkbox";
2223
MatButtonModule,
2324
MatIconModule,
2425
MatSelectModule,
25-
MatCheckboxModule
26+
MatCheckboxModule,
27+
MatTooltipModule
2628
],
2729
exports: [
2830
AppPreferencesComponent

src/app/components/mod-installer/mod-installer.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,9 @@ export class AppModInstallerComponent extends BaseComponent {
454454
return of(fileState === ModInstaller.DependencyState.Active);
455455
}
456456

457-
const externalModFiles = this.activeProfile.externalFiles?.modDirFiles ?? [];
457+
const externalModFiles = this.activeProfile.externalFilesCache?.modDirFiles ?? [];
458458
if (this.importRequest.root) {
459-
externalModFiles.push(...this.activeProfile.externalFiles?.gameDirFiles ?? []);
459+
externalModFiles.push(...this.activeProfile.externalFilesCache?.gameDirFiles ?? []);
460460
}
461461

462462
const externalMatch = externalModFiles?.find((externalFile) => {

src/app/components/profile-mod-list/profile-mod-list.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ export class AppProfileModListComponent extends BaseComponent {
7979
"showManualMods"
8080
)).subscribe(([profile, root, showManualMods]) => {
8181
this.externalModFiles = (root
82-
? profile.externalFiles?.gameDirFiles
83-
: profile.externalFiles?.modDirFiles) ?? [];
82+
? profile.externalFilesCache?.gameDirFiles
83+
: profile.externalFilesCache?.modDirFiles) ?? [];
8484

8585
// Create list entries
8686
let modIndex = 0;

src/app/models/app-data.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface AppData {
99
gameDb: GameDatabase;
1010
pluginsEnabled: boolean;
1111
normalizePathCasing: boolean;
12+
verifyProfileOnStart: boolean;
1213
modListColumns?: string[];
1314
deployInProgress?: boolean;
1415
}

src/app/models/app-profile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ export interface AppProfile {
1313
mods: AppProfile.ModList;
1414
rootMods: AppProfile.ModList;
1515
plugins: GamePluginProfileRef[];
16-
externalFiles?: AppProfile.ExternalFiles;
1716
manageExternalPlugins?: boolean;
1817
manageConfigFiles?: boolean;
1918
linkMode?: boolean;
2019
deployed: boolean;
20+
externalFilesCache?: AppProfile.ExternalFiles;
2121
}
2222

2323
export type AppProfileVerificationResult = AppProfile.VerificationResult;

src/app/models/app-settings-user-cfg.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ export interface AppSettingsUserCfg {
55
pluginsEnabled: boolean;
66
normalizePathCasing: boolean;
77
modListColumns?: string[];
8+
verifyProfileOnStart: boolean;
89
}

src/app/pages/mods-overview/mods-overview.page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
<mat-icon class="button-menu-icon">arrow_drop_down</mat-icon>
5656
</button>
5757

58-
<button mat-icon-button color="accent" matTooltip="Open Profile Mods Folder" (click)="showProfileModsDirInFileExplorer()">
58+
<button mat-icon-button color="accent" matTooltip="Explore Profile Mod Files" (click)="showProfileModsDirInFileExplorer()">
5959
<mat-icon>folder_open</mat-icon>
6060
</button>
6161

6262
<button mat-icon-button color="accent" matTooltip="Verify Profile" (click)="profileManager.verifyActiveProfile()">
63-
<mat-icon>error_outline</mat-icon>
63+
<mat-icon>find_replace</mat-icon>
6464
</button>
6565

6666
<button mat-icon-button color="accent" matTooltip="Profile Settings" (click)="profileManager.showProfileSettings()">

src/app/services/app-state-behavior-manager.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,14 @@ export class AppStateBehaviorManager {
143143
stateActions.push(new AppActions.setNormalizePathCasing(settings.normalizePathCasing));
144144
}
145145

146+
if (settings?.verifyProfileOnStart !== undefined) {
147+
stateActions.push(new AppActions.setVerifyProfileOnStart(settings.verifyProfileOnStart));
148+
}
149+
146150
if (stateActions.length > 0) {
147-
return this.store.dispatch(stateActions).pipe(map(() => settings));
151+
return this.store.dispatch(stateActions).pipe(
152+
map(() => settings)
153+
);
148154
} else {
149155
return of(settings);
150156
}
@@ -238,7 +244,8 @@ export class AppStateBehaviorManager {
238244
activeProfile: _.pick(appData.activeProfile ?? {}, "name", "gameId") as AppProfile.Description,
239245
pluginsEnabled: appData.pluginsEnabled,
240246
normalizePathCasing: appData.normalizePathCasing,
241-
modListColumns: appData.modListColumns
247+
modListColumns: appData.modListColumns,
248+
verifyProfileOnStart: appData.verifyProfileOnStart
242249
};
243250
}
244251
}

0 commit comments

Comments
 (0)