Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit bd57039

Browse files
committed
Various updates
- Disable LOOT sorting by default with option to enable - Update length of INI strings for archive parsing - Fix issues with plugin list state based on various scenarios - Allow disabling plugin management checks for diagnoses - Use active plugin management method to determine when to read/write plugins.txt - Translation file
1 parent 3ada212 commit bd57039

File tree

5 files changed

+122
-27
lines changed

5 files changed

+122
-27
lines changed

src/game_starfield_en.ts

Lines changed: 92 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,106 @@
44
<context>
55
<name>GameStarfield</name>
66
<message>
7-
<location filename="gamestarfield.cpp" line="107"/>
7+
<location filename="gamestarfield.cpp" line="113"/>
88
<source>Starfield Support Plugin</source>
99
<translation type="unfinished"></translation>
1010
</message>
1111
<message>
12-
<location filename="gamestarfield.cpp" line="117"/>
12+
<location filename="gamestarfield.cpp" line="123"/>
1313
<source>Adds support for the game Starfield.</source>
1414
<translation type="unfinished"></translation>
1515
</message>
1616
<message>
17-
<location filename="gamestarfield.cpp" line="129"/>
18-
<source>Turn on plugin management. As of Starfield 1.7.33 this REQUIRES fixing &apos;plugins.txt&apos; with a SFSE plugin. This will do nothing otherwise.</source>
19-
<oldsource>Turn on plugin management. As of Starfield 1.7.33 this REQUIRES SPECIAL WORKAROUNDS.</oldsource>
17+
<location filename="gamestarfield.cpp" line="136"/>
18+
<source>Show a warning when ESP plugins are enabled in the load order.</source>
19+
<translation type="unfinished"></translation>
20+
</message>
21+
<message>
22+
<location filename="gamestarfield.cpp" line="140"/>
23+
<source>Show a warning when light plugins are enabled in the load order.</source>
24+
<translation type="unfinished"></translation>
25+
</message>
26+
<message>
27+
<location filename="gamestarfield.cpp" line="143"/>
28+
<source>Show a warning when overlay-flagged plugins ar enabled in the load order.</source>
29+
<translation type="unfinished"></translation>
30+
</message>
31+
<message>
32+
<location filename="gamestarfield.cpp" line="147"/>
33+
<source>Show a warning when plugins.txt management is invalid.</source>
34+
<translation type="unfinished"></translation>
35+
</message>
36+
<message>
37+
<location filename="gamestarfield.cpp" line="150"/>
38+
<source>As of this release LOOT Starfield support is minimal to nonexistant. Toggle this to enable it anyway.</source>
39+
<translation type="unfinished"></translation>
40+
</message>
41+
<message>
42+
<location filename="gamestarfield.cpp" line="444"/>
43+
<source>You have active ESP plugins in Starfield</source>
44+
<translation type="unfinished"></translation>
45+
</message>
46+
<message>
47+
<location filename="gamestarfield.cpp" line="446"/>
48+
<source>You have active ESL plugins in Starfield</source>
49+
<translation type="unfinished"></translation>
50+
</message>
51+
<message>
52+
<location filename="gamestarfield.cpp" line="448"/>
53+
<source>You have active overlay plugins</source>
54+
<translation type="unfinished"></translation>
55+
</message>
56+
<message>
57+
<location filename="gamestarfield.cpp" line="450"/>
58+
<source>sTestFile entries are present</source>
59+
<translation type="unfinished"></translation>
60+
</message>
61+
<message>
62+
<location filename="gamestarfield.cpp" line="452"/>
63+
<source>Plugins.txt Enabler missing</source>
64+
<translation type="unfinished"></translation>
65+
</message>
66+
<message>
67+
<location filename="gamestarfield.cpp" line="461"/>
68+
<source>&lt;p&gt;ESP plugins are not ideal for Starfield. In addition to being unable to sort them alongside ESM or master-flagged plugins, certain record references are always kept loaded by the game. This consumes unnecessary resources and limits the game&apos;s ability to load what it needs.&lt;/p&gt;&lt;p&gt;Ideally, plugins should be saved as ESM files upon release. It can also be released as an ESL plugin, however there are additional concerns with the way light plugins are currently handled and should only be used when absolutely certain about what you&apos;re doing.&lt;/p&gt;&lt;p&gt;Notably, xEdit does not currently support saving ESP files.&lt;/p&gt;&lt;h4&gt;Current ESPs:&lt;/h4&gt;&lt;p&gt;%1&lt;/p&gt;</source>
69+
<translation type="unfinished"></translation>
70+
</message>
71+
<message>
72+
<location filename="gamestarfield.cpp" line="476"/>
73+
<source>&lt;p&gt;Light plugins work differently in Starfield. They use a different base form ID compared with standard plugin files.&lt;/p&gt;&lt;p&gt;What this means is that you can&apos;t just change a standard plugin to a light plugin at will, it can and will break any dependent plugin. If you do so, be absolutely certain no other plugins use that plugin as a master.&lt;/p&gt;&lt;p&gt;Notably, xEdit does not currently support saving or loading ESL files under these conditions.&lt;p&gt;&lt;h4&gt;Current ESLs:&lt;/h4&gt;&lt;p&gt;%1&lt;/p&gt;</source>
74+
<translation type="unfinished"></translation>
75+
</message>
76+
<message>
77+
<location filename="gamestarfield.cpp" line="489"/>
78+
<source>&lt;p&gt;Overlay-flagged plugins are not currently recommended. In theory, they should allow you to update existing records without utilizing additional load order slots. Unfortunately, it appears that the game still allocates the slots as if these were standard plugins. Therefore, at the moment there is no real use for this plugin flag.&lt;/p&gt;&lt;p&gt;Notably, xEdit does not currently support saving or loading overlay-flagged files under these conditions.&lt;/p&gt;&lt;h4&gt;Current Overlays:&lt;/h4&gt;&lt;p&gt;%1&lt;/p&gt;</source>
79+
<translation type="unfinished"></translation>
80+
</message>
81+
<message>
82+
<location filename="gamestarfield.cpp" line="500"/>
83+
<source>&lt;p&gt;You have plugin managment enabled but you still have sTestFile settings in your StarfieldCustom.ini. These must be removed or the game will not read the plugins.txt file. Management is still disabled.&lt;/p&gt;</source>
84+
<translation type="unfinished"></translation>
85+
</message>
86+
<message>
87+
<location filename="gamestarfield.cpp" line="505"/>
88+
<source>&lt;p&gt;You have plugin management turned on but do not have the Plugins.txt Enabler SFSE plugin installed. Plugin file management for Starfield will not work without this SFSE plugin.&lt;/p&gt;</source>
89+
<translation type="unfinished"></translation>
90+
</message>
91+
</context>
92+
<context>
93+
<name>StarfieldModDataContent</name>
94+
<message>
95+
<location filename="starfieldmoddatacontent.h" line="29"/>
96+
<source>Materials</source>
97+
<translation type="unfinished"></translation>
98+
</message>
99+
<message>
100+
<location filename="starfieldmoddatacontent.h" line="30"/>
101+
<source>Geometries</source>
102+
<translation type="unfinished"></translation>
103+
</message>
104+
<message>
105+
<location filename="starfieldmoddatacontent.h" line="31"/>
106+
<source>Video</source>
20107
<translation type="unfinished"></translation>
21108
</message>
22109
</context>

src/gamestarfield.cpp

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ QString GameStarfield::description() const
125125

126126
MOBase::VersionInfo GameStarfield::version() const
127127
{
128-
return VersionInfo(1, 0, 0, VersionInfo::RELEASE_CANDIDATE);
128+
return VersionInfo(1, 0, 0, VersionInfo::RELEASE_FINAL);
129129
}
130130

131131
QList<PluginSetting> GameStarfield::settings() const
@@ -142,7 +142,14 @@ QList<PluginSetting> GameStarfield::settings() const
142142
<< PluginSetting("enable_overlay_warning",
143143
tr("Show a warning when overlay-flagged plugins ar enabled "
144144
"in the load order."),
145-
true);
145+
true)
146+
<< PluginSetting("enable_management_warnings",
147+
tr("Show a warning when plugins.txt management is invalid."),
148+
true)
149+
<< PluginSetting("enable_loot_sorting",
150+
tr("As of this release LOOT Starfield support is minimal to "
151+
"nonexistant. Toggle this to enable it anyway."),
152+
false);
146153
}
147154

148155
MappingType GameStarfield::mappings() const
@@ -294,14 +301,15 @@ QStringList GameStarfield::CCPlugins() const
294301

295302
IPluginGame::SortMechanism GameStarfield::sortMechanism() const
296303
{
297-
if (testFilePlugins().isEmpty())
304+
if (!testFilePresent() &&
305+
m_Organizer->pluginSetting(name(), "enable_loot_sorting").toBool())
298306
return IPluginGame::SortMechanism::LOOT;
299307
return IPluginGame::SortMechanism::NONE;
300308
}
301309

302310
IPluginGame::LoadOrderMechanism GameStarfield::loadOrderMechanism() const
303311
{
304-
if (testFilePlugins().isEmpty())
312+
if (!testFilePresent() && pluginsTxtEnablerPresent())
305313
return IPluginGame::LoadOrderMechanism::PluginsTxt;
306314
return IPluginGame::LoadOrderMechanism::None;
307315
}
@@ -330,10 +338,12 @@ std::vector<unsigned int> GameStarfield::activeProblems() const
330338
if (m_Organizer->pluginSetting(name(), "enable_overlay_warning").toBool() &&
331339
activeOverlay())
332340
result.push_back(PROBLEM_OVERLAY);
333-
if (testFilePresent())
334-
result.push_back(PROBLEM_TEST_FILE);
335-
else if (pluginsTxtEnabler())
336-
result.push_back(PROBLEM_PLUGINS_TXT);
341+
if (m_Organizer->pluginSetting(name(), "enable_management_warnings").toBool()) {
342+
if (testFilePresent())
343+
result.push_back(PROBLEM_TEST_FILE);
344+
else if (!pluginsTxtEnablerPresent())
345+
result.push_back(PROBLEM_PLUGINS_TXT);
346+
}
337347
}
338348
return result;
339349
}
@@ -419,14 +429,12 @@ bool GameStarfield::testFilePresent() const
419429
return false;
420430
}
421431

422-
bool GameStarfield::pluginsTxtEnabler() const
432+
bool GameStarfield::pluginsTxtEnablerPresent() const
423433
{
424-
if (sortMechanism() != SortMechanism::NONE) {
425-
auto files = m_Organizer->findFiles("sfse\\plugins", {"sfpluginstxtenabler.dll"});
426-
if (files.isEmpty())
427-
return true;
428-
}
429-
return false;
434+
auto files = m_Organizer->findFiles("sfse\\plugins", {"sfpluginstxtenabler.dll"});
435+
if (files.isEmpty())
436+
return false;
437+
return true;
430438
}
431439

432440
QString GameStarfield::shortDescription(unsigned int key) const

src/gamestarfield.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class GameStarfield : public GameGamebryo, public MOBase::IPluginDiagnose
7373
bool activeESL() const;
7474
bool activeOverlay() const;
7575
bool testFilePresent() const;
76-
bool pluginsTxtEnabler() const;
76+
bool pluginsTxtEnablerPresent() const;
7777

7878
private:
7979
static const unsigned int PROBLEM_ESP = 1;

src/starfielddataarchives.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ QStringList StarfieldDataArchives::archives(const MOBase::IProfile* profile) con
8181
"sResourceStartUpArchiveList",
8282
"sResourceEnglishVoiceList"};
8383
for (auto setting : archiveSettings) {
84-
auto archives = getArchivesFromKey(customIniFile, setting, 1023);
84+
auto archives = getArchivesFromKey(customIniFile, setting, 4096);
8585
if (archives.isEmpty())
86-
archives = getArchivesFromKey(defaultIniFile, setting, 1023);
86+
archives = getArchivesFromKey(defaultIniFile, setting, 4096);
8787
result.append(archives);
8888
}
8989

src/starfieldgameplugins.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ bool StarfieldGamePlugins::overridePluginsAreSupported()
1414
void StarfieldGamePlugins::writePluginList(const IPluginList* pluginList,
1515
const QString& filePath)
1616
{
17-
if (m_Organizer->managedGame()->sortMechanism() !=
18-
MOBase::IPluginGame::SortMechanism::NONE) {
17+
if (m_Organizer->managedGame()->loadOrderMechanism() ==
18+
MOBase::IPluginGame::LoadOrderMechanism::PluginsTxt) {
1919
CreationGamePlugins::writePluginList(pluginList, filePath);
2020
}
2121
}
2222

2323
QStringList StarfieldGamePlugins::readPluginList(MOBase::IPluginList* pluginList)
2424
{
25-
if (m_Organizer->managedGame()->sortMechanism() !=
26-
MOBase::IPluginGame::SortMechanism::NONE) {
25+
if (m_Organizer->managedGame()->loadOrderMechanism() ==
26+
MOBase::IPluginGame::LoadOrderMechanism::PluginsTxt) {
2727
return CreationGamePlugins::readPluginList(pluginList);
2828
}
2929
return {};

0 commit comments

Comments
 (0)