You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ModAPI.Common/SporePath.cs
+57-11Lines changed: 57 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -105,31 +105,77 @@ public static bool SporeIsInstalledOnSteam()
105
105
returnresult!=null&&((int)result!=0);
106
106
}
107
107
108
+
/// <summary>
109
+
/// Returns true if the game is installed such that all data folders share the same parent folder.
110
+
/// Usually this doesn't matter, but as of early 2026, Steam may install multiple copies of the game due to differing app IDs. This can result in mods being installed to the wrong copy, so this function checks if this is the case.
111
+
/// </summary>
112
+
privatestaticboolIsDataDirsSameParent()
113
+
{
114
+
// Get the data paths
115
+
varsporeDataPath=GetDataPath(Game.Spore);
116
+
varccDataPath=GetDataPath(Game.CreepyAndCute);// null if not installed
// Make sure Spore and GA share the same parent folder
125
+
if(sporeParent!=gaParent)
126
+
{
127
+
returnfalse;
128
+
}
129
+
130
+
// If CC is installed, it should also share the same parent
131
+
if(ccParent!=null&&sporeParent!=ccParent)
132
+
{
133
+
returnfalse;
134
+
}
135
+
136
+
returntrue;
137
+
}
138
+
108
139
/// <summary>
109
140
/// Returns true if Spore and GA are properly installed.
110
141
/// If either game is not properly installed, returns false, and optionally shows an error message to the user. If the game is installed from Steam but hasn't been launched to complete the installation, shows a specific error message about launching the game on Steam.
// For Steam only, check that all data dirs are in the same parent folder
165
+
// As of early 2026, Steam may install multiple copies of the game due to differing app IDs. This can result in mods being installed to the wrong copy.
166
+
// The "current" copy (Spore vs C&C vs GA) used is the most recent one launched from Steam. If we detect mixed folders, it means that non-GA has been launched, and the user should be told to launch GA to force everything to use GA's copy of the data.
167
+
// Prior to early 2026, Steam only installed one copy, and they were all in the same folder, so this check will still pass.
168
+
// NOTE: This may need to be changed in the future, if Steam changes anything again.
0 commit comments