Skip to content

Instantly share code, notes, and snippets.

@pardeike
Created May 29, 2017 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pardeike/8f879e54d8d179e50c8ddc9f00ed8bd4 to your computer and use it in GitHub Desktop.
Save pardeike/8f879e54d8d179e50c8ddc9f00ed8bd4 to your computer and use it in GitHub Desktop.
Read-Write mod ids
public static List<string> ReadModIDs(string filepath) {
Scribe.loader.InitLoadingMetaHeaderOnly(filepath);
ScribeMetaHeaderUtility.LoadGameDataHeader(ScribeMetaHeaderUtility.ScribeHeaderMode.Map, false);
Scribe.loader.FinalizeLoading();
return ScribeMetaHeaderUtility.loadedModIdsList;
}
public static void Test() {
List<string> modIDs = ReadModIDs(file);
ModsConfig.Reset();
foreach (string identifier in modIDs) {
ModsConfig.SetActive(identifier, true);
}
ModsConfig.Save();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment