Nucleus handler tools › Docs › Context › ModifySaveFile
Context.ModifySaveFile
Open in the workbench (search, and try it in a handler)
Context.ModifySaveFile(
installSavePath: string | number | boolean,
saveFullPath: string | number | boolean,
type: Nucleus.SaveType | number | boolean,
info: Nucleus.SaveInfo
): boolean
Edits keys in an INI/CFG file. Example: Context.ModifySaveFile(path, path, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("Section", "Key", "Value")]);
✎ AI-written, based on Nucleus GenericContext.cs. Not from the official docs. Is it wrong? Tell us
installSavePath: Full path of the source file to read. For INI it is copied to saveFullPath first when the two paths differ (the copy fails if saveFullPath already exists).saveFullPath: Full path where the edited file is written; may be the same as installSavePath to edit in place.type: File format: Nucleus.SaveType.INI or Nucleus.SaveType.CFG (Source-engine style cfg); any other value throws.info: One or more entries to set, new Nucleus.IniSaveInfo(section, key, value) for INI or new Nucleus.CfgSaveInfo(section, key, value) for CFG; other kinds are ignored.
✎ Parameters: AI-written from the Nucleus source.
Is this right?
Tell us what's wrong