Difference between revisions of "Scribe"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Shademe
imported>Shademe
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:


'''Syntax:'''
'''Syntax:'''
  (nothing) Scribe formatString:string var1 var2 ... var20 printToConsole:bool scribeOperation:integer
  (nothing) Scribe formatString:string var1 var2 ... var20 printToConsole:bool


Primary output function. Prints output to a log file and, optionally, to the console.
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.
{| style="width: 35%; border-collapse: collapse" border="2"
!| Scribe Operation
!| Integer
|-
| Post to Script Log
| 0
|-
| Post to Registered Log
| 1
|}




==Notes==
==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>''.
* 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.
    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.
* String variables can be passed using the '''%z''' format specifier.
* The pipe '''|''' character must '''not''' be used in the message unless one is added to the end as the log name delimiter. The plugin automatically assumes the string following the last pipe character 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==
==Example==
Line 31: Line 21:
begin gameMode
begin gameMode
   scribe "This will be printed to the Script log, but not to the console" 0
   scribe "This will be printed to the Script log, but not to the console" 0
   scribe "This will be printed to the console alone" 1
  registerLog "Log A"
  registerLog "Log B" 1
   scribe "This will be printed to the default log, Log B" 1


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


   scribe "This will be printed to the registered log, if any" 1 1
   scribe "This will be printed to the script log|script" 1
end
end
</pre>
</pre>
Line 44: Line 36:


[[Category: ConScribe]]
[[Category: ConScribe]]
<!-- Begin Search Terms
Scribe
End Search Terms -->

Latest revision as of 03:18, 11 May 2013

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[edit | edit source]

  • 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.
  • String variables can be passed using the %z format specifier.
  • The pipe | character must not be used in the message unless one is added to the end as the log name delimiter. The plugin automatically assumes the string following the last pipe character 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[edit | edit source]

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[edit | edit source]

RegisterLog