StringToTxtFile

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

A command for Pluggy.

Syntax:

StringToTxtFile FilenameStringID StringID:long LineEnd:short

Writes a string onto the end of Filename. If the file does not exist, it will be created.

  • Unless LineEnd is specifed as 0, the function will automatically write an end of line after the string.
  • The file is stored relative to "My Documents\My Games\Oblivion\Pluggy\User Files\"
    • Use the Filename to specify a folder for the file to be stored in. So, if Filename is "MyMod\DebugInfo.txt", the file will be stored in "My Documents\My Games\Oblivion\Pluggy\User Files\MyMod\"
  • Compared to most Oblivion functions, StringToTxtFile is relatively slow (due to the disk access). It should be used as sparingly as possible.
    • If you need to write multiple strings to the same file, you should use StringCat to combine them so that only one StringToTxtFile call is needed.