<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://journeywiki.wolf109909.top/index.php?action=history&amp;feed=atom&amp;title=Text_Output</id>
	<title>Text Output - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://journeywiki.wolf109909.top/index.php?action=history&amp;feed=atom&amp;title=Text_Output"/>
	<link rel="alternate" type="text/html" href="https://journeywiki.wolf109909.top/index.php?title=Text_Output&amp;action=history"/>
	<updated>2026-06-06T03:07:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://journeywiki.wolf109909.top/index.php?title=Text_Output&amp;diff=181&amp;oldid=prev</id>
		<title>Alazar88: /* Print to a console window */</title>
		<link rel="alternate" type="text/html" href="https://journeywiki.wolf109909.top/index.php?title=Text_Output&amp;diff=181&amp;oldid=prev"/>
		<updated>2021-10-22T23:18:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Print to a console window&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:18, 22 October 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l18&quot;&gt;Line 18:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 18:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here is a basic injectable script which opens a non-interactive console window the first time you execute it, and then whenever you use print() it prints text in the console; could be changed to use a function name other than print() if you don&amp;#039;t want to see the stuff the game normally uses &amp;quot;print&amp;quot; for.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here is a basic injectable script which opens a non-interactive console window the first time you execute it&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, without pausing the game&lt;/ins&gt;, and then whenever you use print() it prints text in the console; could be changed to use a function name other than print() if you don&amp;#039;t want to see the stuff the game normally uses &amp;quot;print&amp;quot; for.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Good for simply viewing stuff that you don&amp;#039;t need to save, and barely slows down the game at all.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Good for simply viewing stuff that you don&amp;#039;t need to save, and barely slows down the game at all.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l31&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Print to a file ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Print to a file ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Alazar88</name></author>
	</entry>
	<entry>
		<id>https://journeywiki.wolf109909.top/index.php?title=Text_Output&amp;diff=180&amp;oldid=prev</id>
		<title>Alazar88: Created page with &quot;There are a number of ways to get Lua to output data from the game to readable text. Right now this page just includes basics but there are a lot of specialized functions in t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://journeywiki.wolf109909.top/index.php?title=Text_Output&amp;diff=180&amp;oldid=prev"/>
		<updated>2021-10-22T22:00:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;There are a number of ways to get Lua to output data from the game to readable text. Right now this page just includes basics but there are a lot of specialized functions in t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;There are a number of ways to get Lua to output data from the game to readable text. Right now this page just includes basics but there are a lot of specialized functions in the game made by TGC, which would probably be useful to document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== print() ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Probably just the default Lua print function, which outputs to stdout, although so far no way is known to view this without changing how the print() function works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DebugPrint() ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A custom TGC function that does print() if the global variable CONFIG equals anything other than &amp;quot;Gold&amp;quot;, &amp;quot;PublicBeta&amp;quot;, or &amp;quot;Demo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Print to a console window ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a basic injectable script which opens a non-interactive console window the first time you execute it, and then whenever you use print() it prints text in the console; could be changed to use a function name other than print() if you don&amp;#039;t want to see the stuff the game normally uses &amp;quot;print&amp;quot; for.&lt;br /&gt;
&lt;br /&gt;
Good for simply viewing stuff that you don&amp;#039;t need to save, and barely slows down the game at all.&lt;br /&gt;
&lt;br /&gt;
(Copied from a post in stackoverflow or something, can&amp;#039;t remember)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
local out = io.popen(&amp;#039;find /v &amp;quot;&amp;quot; &amp;gt; con&amp;#039;, &amp;quot;w&amp;quot;)&lt;br /&gt;
function print(s)&lt;br /&gt;
  out:write(s..&amp;quot;\r\n&amp;quot;) --\r because windows&lt;br /&gt;
  out:flush()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Print to a file ===&lt;br /&gt;
&lt;br /&gt;
Here is a basic injectable function which prints to a file in your Journey directory, with the filename and extension being whatever &amp;quot;name&amp;quot; is. Might slow down the game if a lot is getting printed, and possibly crash if it&amp;#039;s too much at once. It is probably good to use a function name other than &amp;quot;print&amp;quot; if you are using SpawnEvent or ActivateTriggerByName a lot, unless you modify those functions to remove the parts of them that print stuff, or else it might slow down your game a lot and rapidly grow the stdout.txt file.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
function PrintToFile( s, name )&lt;br /&gt;
    name = name or &amp;quot;stdout.txt&amp;quot;&lt;br /&gt;
    file = io.open(name, &amp;quot;a&amp;quot;)&lt;br /&gt;
    io.output(file)&lt;br /&gt;
    io.write(s..&amp;quot;\n&amp;quot;)&lt;br /&gt;
    file:close()&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DebugOut trigger ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Seems like it is a trigger type that SHOULD print its &amp;quot;stdoutMessage&amp;quot; Var string to stdout whenever the trigger is activated, but simply changing the print() function doesn&amp;#039;t make it print anything with that, and also setting CONFIG = &amp;quot;Debug&amp;quot; doesn&amp;#039;t seem to help - so either the code that makes it work was removed, or some other unknown thing needs to be enabled and/or it prints to a different &amp;quot;stdout&amp;quot; that we don&amp;#039;t know how to access yet.&lt;/div&gt;</summary>
		<author><name>Alazar88</name></author>
	</entry>
</feed>