Difference between revisions of "Scribe"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Shademe
(Updated with the newer details)
imported>Shademe
Line 14: Line 14:
* The calling mod must have a log registered to use scribe operation 1.
* The calling mod must have a log registered to use scribe operation 1.
* String variables can be passed using the '''%z''' format specifier.
* String variables can be passed using the '''%z''' format specifier.
* The pipe '''|''' character mustn't be used in the message unless the log name is to be passed. The plugin automatically considers the string following the delimiter to be the log name.
* The pipe '''|''' character must '''not''' be used in the message unless the log name is to be passed. The plugin automatically considers the string following the delimiter to be the log name.
* The command may be forced to write to the script log by passing the string "Script" as the log name.
* The command may be forced to write to the script log by passing the string "Script" as the log name.


==Example==
==Example==

Revision as of 22:42, 3 February 2010

A command for ConScribe.

Syntax:

(nothing) Scribe formatString:string var1 var2 ... var20 printToConsole:bool

Primary output function. Prints output to a log file and, optionally, to the console. The log name can optionally be passed after the message, following a | delimiter, to write to a particular log.

When calling the command without a log name, the plugin will look for a default log registered by the mod. If it finds one, it will write the output to it. If not, it will write the output to a script log.


Notes

  • Script logs are created in the ConScribe Logs > Per-Script folder. Logs names follow the convention: <Mod Name> - [XX]<Calling script's truncated formID>.

    Registered logs are created in the ConScribe Logs > Per-Mod folder.

  • The calling mod must have a log registered to use scribe operation 1.
  • String variables can be passed using the %z format specifier.
  • The pipe | character must not be used in the message unless the log name is to be passed. The plugin automatically considers the string following the delimiter to be the log name.
  • The command may be forced to write to the script log by passing the string "Script" as the log name.

Example

string_var svLog

begin gameMode
   scribe "This will be printed to the Script log, but not to the console" 0
   registerLog "Log A"
   registerLog "Log B" 1
   scribe "This will be printed to the default log, Log B" 1

   let svLog := "Con" + $player + "Scribe"
   scribe "String Var - %z. Will be printed to the Log A|Log A" svLog 1

   scribe "This will be printed to the script log|script" 1
end

See also

RegisterLog