<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://te4.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dekar</id>
		<title>Tales of Maj'Eyal - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://te4.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dekar"/>
		<link rel="alternate" type="text/html" href="https://te4.org/wiki/Special:Contributions/Dekar"/>
		<updated>2026-05-06T08:02:50Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://te4.org/w/index.php?title=Resources_for_Addons_and_Modules&amp;diff=9893</id>
		<title>Resources for Addons and Modules</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Resources_for_Addons_and_Modules&amp;diff=9893"/>
				<updated>2015-11-17T08:33:13Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page for adding and of course using various resources for ToME addons and modules.&lt;br /&gt;
&lt;br /&gt;
* [[GFX Resources]]&lt;br /&gt;
* Free icons: http://game-icons.net/&lt;br /&gt;
* Icon Making Howto: http://te4.org/blogs/jotwebe/2015/09/icons/icon-making-howto&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Addons&amp;diff=9764</id>
		<title>Addons</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Addons&amp;diff=9764"/>
				<updated>2015-08-11T06:59:13Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Development]][[Category:Addons]]&lt;br /&gt;
Addons are way for third parties to modify existing modules inside t-engine. Since the game Tales of Maj'Eyal is a t-engine module, this is how you write addons for ToME, just like the ones in the Steam Workshop.&lt;br /&gt;
&lt;br /&gt;
==Intro==&lt;br /&gt;
&lt;br /&gt;
You're making an addon. The addon is named &amp;quot;coolstuff&amp;quot;. The first thing you do is make a directory &amp;quot;tome-coolstuff&amp;quot; inside your Steam install of ToME. On my mac, that path is:&lt;br /&gt;
 ~/Library/Application Support/Steam/SteamApps/common/TalesMajEyal/game/addons/&lt;br /&gt;
&lt;br /&gt;
And on Windows, it's usually something like&lt;br /&gt;
 C:\Program Files (x86)\Steam\SteamApps\common\TalesMajEyal\game\addons&lt;br /&gt;
&lt;br /&gt;
On Linux, the path is&lt;br /&gt;
 ~/.steam/steam/SteamApps/common/TalesMajEyal/game/addons&lt;br /&gt;
&lt;br /&gt;
Your addons directory should have these files in it already:&lt;br /&gt;
 tome-addon-dev.teaa&lt;br /&gt;
 tome-items-vault.teaa&lt;br /&gt;
 tome-stone-wardens.teaa&lt;br /&gt;
&lt;br /&gt;
If you can't find the directory, search for one of those file names.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Getting Started===&lt;br /&gt;
&lt;br /&gt;
Every addon has an &amp;lt;nowiki&amp;gt;init.lua&amp;lt;/nowiki&amp;gt; file. The &amp;lt;nowiki&amp;gt;init.lua&amp;lt;/nowiki&amp;gt; file looks like this:&lt;br /&gt;
&lt;br /&gt;
 -- My Cool Addon&lt;br /&gt;
 -- tome-coolstuff/init.lua&lt;br /&gt;
 &lt;br /&gt;
 long_name = &amp;quot;My Awesome Addon&amp;quot;&lt;br /&gt;
 short_name = &amp;quot;coolstuff&amp;quot; -- Determines the name of your addon's file.&lt;br /&gt;
 for_module = &amp;quot;tome&amp;quot;&lt;br /&gt;
 version = { 1, 3, 1 }&lt;br /&gt;
 addon_version = { 1, 0, 0 }&lt;br /&gt;
 weight = 100 -- The lower this value, the sooner your addon will load compared to other addons.&lt;br /&gt;
 author = { 'coolguy@invalid.com' }&lt;br /&gt;
 homepage = 'iamsocool.geocities.com'&lt;br /&gt;
 description = [[Oh my god this stuff is so totally cool.&lt;br /&gt;
 Holy crap I mean it's really super cool, like, wow.&lt;br /&gt;
 ]] -- the [[ ]] things are like quote marks that can span multiple lines&lt;br /&gt;
 tags = {'cool', &amp;quot;stuff&amp;quot;, 'cool stuff'} -- tags MUST immediately follow description&lt;br /&gt;
 &lt;br /&gt;
 hooks = true&lt;br /&gt;
 overload = true&lt;br /&gt;
 superload = false&lt;br /&gt;
 data = true&lt;br /&gt;
&lt;br /&gt;
Those last four are super important, because they determine what directories in your addon ToME will look at.&lt;br /&gt;
&lt;br /&gt;
===Directory Structure===&lt;br /&gt;
&lt;br /&gt;
* '''overload''': Files in this directory will automatically replace files in the base game. This is very powerful but also incredibly dangerous. (Of course, replacing things like icons is less dangerous than replacing code.)&lt;br /&gt;
* '''superload''': Files in this directory will be read and executed after the base game's file of the same name. This is very powerful but much less dangerous. This is a great way to add content (like new Artifact items) or tweak content (modify a talent's cost or requirements) without accidentally stepping on other tweaks or future content updates.&lt;br /&gt;
* '''data''': Files in this directory will just sit there and be ignored unless you explicitly tell the game to read them. Files in this area live in their own &amp;quot;namespace&amp;quot; and filenames here will never interfere with other addons or the base game. This is a great place to put new classes, talent trees, or races.&lt;br /&gt;
* '''hooks''': Only one file in this directory is automatically executed: &amp;lt;nowiki&amp;gt;load.lua&amp;lt;/nowiki&amp;gt;. This file is a great way to get your &amp;quot;data&amp;quot; files executed at the proper time. It's also a way to augment some parts of the game which specifically support hooks: the Example module shows how the &amp;quot;Actor:takeHit&amp;quot; function is hooked to make the tourist take no damage.  You can also use hooks to load add-on data in to the module, eg. new talents. Find a list of available hooks [[hooks|here]].&lt;br /&gt;
&lt;br /&gt;
The Example addon can be found here: http://te4.org/dl/tmp/tome-example.teaa&lt;br /&gt;
&lt;br /&gt;
A .teaa file is simply a renamed zip that contains the whole addon, so feel free to rename and unzip your favorite addon to see a living example of all the stuff discussed in this article. The &amp;lt;nowiki&amp;gt;tome-example.teaa&amp;lt;/nowiki&amp;gt; addon illustrates how to add a new class, new talents, new timed effects and how to hook onto a few useful locations in the code. (Note that it's a bit old, though.)  When zipping, make sure to zip the files but not the folder.  For example, tome-addonname.zip/init.lua, not tome-addonname.zip/tome-addonname/init.lua.&lt;br /&gt;
&lt;br /&gt;
You can also just put a folder 'tome-addonname' in addons and it will be loaded directly, no need to zip or rename.&lt;br /&gt;
&lt;br /&gt;
== Grammar and Syntax ==&lt;br /&gt;
* The addon folder must be in the format &amp;lt;nowiki&amp;gt;[ModuleName]-[AddonShortName]&amp;lt;/nowiki&amp;gt;. For you, that means &amp;lt;nowiki&amp;gt;tome-coolstuff&amp;lt;/nowiki&amp;gt; is your folder name.&lt;br /&gt;
&lt;br /&gt;
===Overloading===&lt;br /&gt;
Each &amp;lt;nowiki&amp;gt;.teaa&amp;lt;/nowiki&amp;gt; file is just a zip file. The main ToME game code is stored in &amp;lt;nowiki&amp;gt;game/modules/tome.team&amp;lt;/nowiki&amp;gt;, and it is also just a renamed zip file.&lt;br /&gt;
&lt;br /&gt;
Copy &amp;lt;nowiki&amp;gt;tome.team&amp;lt;/nowiki&amp;gt; somewhere, rename it to &amp;lt;nowiki&amp;gt;tome-1.1.5.zip&amp;lt;/nowiki&amp;gt; and unzip it.&lt;br /&gt;
&lt;br /&gt;
You'll see two directories: &amp;quot;data&amp;quot; and &amp;quot;mod&amp;quot;. Most of the stuff you'll want to mess with at first is in &amp;quot;data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When you use overload to replace a file, the path and name must match exactly the structure in &amp;lt;nowiki&amp;gt;tome.team&amp;lt;/nowiki&amp;gt;. So for example, to replace the types of leather boots in the game, I'd look in the unzipped ToME code and find:&lt;br /&gt;
 tome-1.1.5/data/general/objects/leather-boots.lua&lt;br /&gt;
... and so to overload that, I'd create a file in my addon:&lt;br /&gt;
 tome-coolstuff/overload/data/general/objects/leather-boots.lua&lt;br /&gt;
&lt;br /&gt;
===Superloading===&lt;br /&gt;
&lt;br /&gt;
Just like overloading, superloading requires that you know the file structure of the game so you can make your files get read and executed at the right time. When the game reads in your superload file, you can get access to the previous file's contents using the &amp;lt;nowiki&amp;gt;loadPrevious(...)&amp;lt;/nowiki&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
For example, if we wanted to add a new boot ego, we could do something like this. First, we'd find the boot ego code:&lt;br /&gt;
 data/general/objects/egos/light-boots.lua&lt;br /&gt;
&lt;br /&gt;
Next, we'd make a file in our &amp;lt;nowiki&amp;gt;superload&amp;lt;/nowiki&amp;gt; directory:&lt;br /&gt;
 tome-coolstuff/superload/data/general/objects/egos/light-boots.lua&lt;br /&gt;
&lt;br /&gt;
... and we'd make sure that our &amp;lt;nowiki&amp;gt;init.lua&amp;lt;/nowiki&amp;gt; file had the line:&lt;br /&gt;
 superload = true&lt;br /&gt;
&lt;br /&gt;
We're ready to add the boot ego!&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 local _M = loadPrevious(...)&lt;br /&gt;
 &lt;br /&gt;
 newEntity{&lt;br /&gt;
 	power_source = {arcane=true},&lt;br /&gt;
 	name = &amp;quot; of sensing&amp;quot;, suffix=true, instant_resolve=true,&lt;br /&gt;
 	keywords = {sensing=true},&lt;br /&gt;
 	level_range = {1, 50},&lt;br /&gt;
 	rarity = 4,&lt;br /&gt;
 	cost = 2,&lt;br /&gt;
 	wielder = {&lt;br /&gt;
 		see_invisible = resolvers.mbonus_material(20, 5),&lt;br /&gt;
 		see_stealth = resolvers.mbonus_material(20, 5),&lt;br /&gt;
 		blind_immune = resolvers.mbonus_material(30, 20, function(e, v) v=v/100 return 0, v end),&lt;br /&gt;
 	},&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 return _M&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Modifying mod Stuff====&lt;br /&gt;
&lt;br /&gt;
Hold on, that example still didn't use _M at all! So what is _M for? Since most things in the &amp;lt;nowiki&amp;gt;data&amp;lt;/nowiki&amp;gt; directory are stored in easily accessible structures, you don't need _M to get them. _M is generally used for stuff in the &amp;lt;nowiki&amp;gt;mod&amp;lt;/nowiki&amp;gt; directory: the most dangerous stuff to modify. Here's an example which modifies the &amp;quot;levelup&amp;quot; function in &amp;lt;nowiki&amp;gt;mod/Actor.lua&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 local _M = loadPrevious(...)&lt;br /&gt;
 local base_levelup = _M.levelup&lt;br /&gt;
 &lt;br /&gt;
 function _M:levelup()&lt;br /&gt;
   -- Do stuff &amp;quot;before&amp;quot; loading the original file&lt;br /&gt;
 &lt;br /&gt;
   -- execute the original function&lt;br /&gt;
   local retval = base_levelup(self)&lt;br /&gt;
 &lt;br /&gt;
   -- Do stuff &amp;quot;after&amp;quot; loading the original file&lt;br /&gt;
 &lt;br /&gt;
   -- return whatever the original function would have returned&lt;br /&gt;
   return retval&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 return _M&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uploading your Addon==&lt;br /&gt;
&lt;br /&gt;
You've been playing around with your addon, making changes and copying stuff from other popular addons. You've tested your stuff, and you're pretty satisfied that it won't crash the game. Good job! Now you want to share your work.&lt;br /&gt;
&lt;br /&gt;
* In days of yore, you needed to post in this thread to be granted addon upload powers by DarkGod: http://forums.te4.org/viewtopic.php?f=50&amp;amp;t=31374&lt;br /&gt;
** If you have any trouble uploading, make a post in that thread.&lt;br /&gt;
* Main Menu -&amp;gt; Options -&amp;gt; Developer Mode (bottom option)&lt;br /&gt;
* Start a new game.&lt;br /&gt;
** Note that being in Developer Mode puts an extra screen between &amp;quot;New Game&amp;quot; and building a character. Pick the top option (&amp;quot;ToME&amp;quot;).&lt;br /&gt;
* Hit ctrl+a and pick the bottom option (just hit the up arrow)&lt;br /&gt;
* MD5s are now calculated automatically. You will probably never need to get an MD5. Ignore that unless you know why you need one.&lt;br /&gt;
* You will only need to register your addon ONCE, so after you do that the first time, you can ignore that option too.&lt;br /&gt;
* If you've already registered your addon, pick &amp;quot;Publish Addon to te4.org&amp;quot;. This is the option you'll pick over and over as you create new versions.&lt;br /&gt;
* If you're using Steam, then after you upload to te4.org, hit ctrl+d again and this time pick &amp;quot;Publish Addon to Steam Workshop&amp;quot;&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Advanced_Debugging&amp;diff=9750</id>
		<title>Advanced Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Advanced_Debugging&amp;diff=9750"/>
				<updated>2015-07-19T20:26:11Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: /* WARNING: THIS IS JUST AN OUTDATED / IN PROGRESS OF BEING REWORKED GUIDE HERE TO CONSERVE IT IN CASE THE OLD WIKI BECOMES UNAVAILABLE. DO NOT LINK TO IT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WARNING: THIS IS JUST AN OUTDATED / IN PROGRESS OF BEING REWORKED GUIDE HERE TO CONSERVE IT IN CASE THE OLD WIKI BECOMES UNAVAILABLE. DO NOT LINK TO IT ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download this: http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/gdb/x86_64-w64-mingw32-gdb-7.1.90.20100730.zip/download&lt;br /&gt;
&lt;br /&gt;
Unpack it so you have C:\mingw64\bin\gdb.exe (different path is ok but you have to adjust it later and it shouldnt contain any special characters or spaces).&lt;br /&gt;
&lt;br /&gt;
Open your ToME folder and create a textfile in it with the content:&lt;br /&gt;
C:\mingw64\bin\gdb.exe t-engine.exe&lt;br /&gt;
&lt;br /&gt;
pause&lt;br /&gt;
&lt;br /&gt;
Save it, and rename it to debug.bat (make sure your file names are showing the ending so you can change it or it will stay a text file).&lt;br /&gt;
&lt;br /&gt;
Doubleclick the debug.bat.&lt;br /&gt;
&lt;br /&gt;
It should show some text and end with &amp;quot;&amp;lt;gdb&amp;gt;&amp;quot;. Write &amp;quot;run&amp;quot; (without &amp;quot;&amp;quot;) and press enter. This should start the game. &lt;br /&gt;
&lt;br /&gt;
If the game crashes, type info stack to get a stack trace of the issue (apparently backtrace works well too).&lt;br /&gt;
&lt;br /&gt;
Post the stack trace.&lt;br /&gt;
You can copy text from the command window by right-clicking, selecting &amp;quot;Mark&amp;quot; from the menu, dragging a box around the text you want to copy and then right-clicking again. You can then paste the text into a forum post.&lt;br /&gt;
&lt;br /&gt;
Locate gdb.txt in the tome directory, and send that.&lt;br /&gt;
&lt;br /&gt;
When finished, type quit to exit out of GDB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As I dont have a crashing game I couldnt test all of this, so please tell me if anything is not working as described.&lt;br /&gt;
&lt;br /&gt;
== Running ToME with GDB ==&lt;br /&gt;
GDB is a debugging tool that can help the developers of Tome track down difficult bugs. If you find something that makes the game crash, you can help out by catching this crash inside a GDB session and sending the details to the dev team. This will pinpoint the section of code which caused the crash, allowing the team to focus on the source of the problem.&lt;br /&gt;
&lt;br /&gt;
=== Installing and using GDB on Windows ===&lt;br /&gt;
Download it from the MinGW GDB sourceforge download page&lt;br /&gt;
Install it by creating a directory at C:\MinGW\ and extracting the archive to this location (other MinGW software installs itself to this location automatically so it is good to keep it all together)&lt;br /&gt;
Open a command prompt inside your tome4 directory and load t-engine.exe into GDB by typing this: C:\mingw\bin\gdb.exe t-engine.exe&lt;br /&gt;
Run the game by simply typing run&lt;br /&gt;
If the game crashes, type info stack to get a stack trace of the issue (apparently backtrace works well too)&lt;br /&gt;
Send the stack trace to the developers or post it on the forum.&lt;br /&gt;
Locate gdb.txt in the tome directory, and send that, or&lt;br /&gt;
You can copy text from the command window by right-clicking, selecting &amp;quot;Mark&amp;quot; from the menu, dragging a box around the text you want to copy and then right-clicking again. You can then paste the text into a forum post.&lt;br /&gt;
When finished, type quit to exit out of GDB&lt;br /&gt;
At the time of writing, the latest version of GDB available on the download page is gdb-7.1-2-mingw32-bin.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
tome4 user reenen: Any way I can save the stack trace to a .txt file? It kinda sucks that I got to manually copy and paste it. (via a cmd shell which is extremely sucky in windows)&lt;br /&gt;
tome4 user shoob: Yes, use **set logging on** before you type **run**, it will copy the log to gdb.txt (edited the above to show this too)&lt;br /&gt;
&lt;br /&gt;
tome4 user netzakh: Notes on installing and running GDB as of 20100628:&lt;br /&gt;
MinGW installer does NOT include GDB;&lt;br /&gt;
GDB requires libexpat-1.dll, which is NOT included into either the GDB tarball or MinGW installation so it has to be downloaded separately from the expat subfolder;&lt;br /&gt;
backtrace can be followed by a number //n// to show first //n// calls in the stack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using gdb on Linux ===&lt;br /&gt;
If you're running...&lt;br /&gt;
&lt;br /&gt;
Gentoo&lt;br /&gt;
See &amp;quot;Segmentation fault&amp;quot; (Is That Good?) under Gentoo.&lt;br /&gt;
&lt;br /&gt;
Other&lt;br /&gt;
This applies equally well to any other Unix-like system (FreeBSD, etc.). Installing gdb is generally trivial (use your operating system's package manager or ports system, or build it directly from upstream source if necessary). There are too many Unix-like variants to cover installation here.&lt;br /&gt;
&lt;br /&gt;
There are a few different ways to use gdb to help debug ToME. The first is to attach to a &amp;quot;running&amp;quot; (or stuck) ToME process at need.&lt;br /&gt;
Open up a terminal window. If you can't open a terminal for some reason, you can ssh or telnet in from another machine. You'll need to be the same user who's running t-engine.&lt;br /&gt;
Find the process ID of the running (or stuck) t-engine process. On most systems, the easiest way to do this is pgrep t-engine but if that doesn't work, you can try ps auxw | grep t-engine or ps -ef | grep t-engine instead.&lt;br /&gt;
Change directory to wherever you would normally be sitting when you launch t-engine.&lt;br /&gt;
Type gdb path/to/t-engine (for example gdb ./bin/Debug/t-engine). This tells gdb to load the program into memory, but will not execute it.&lt;br /&gt;
At the (gdb) prompt, type attach PID where PID is the process ID of the t-engine process.&lt;br /&gt;
Use bt or any other gdb commands you need (see the Windows section above for general tips).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another way is to run ToME under gdb's control from the start. This is overkill most of the time, and has been known to cause an occasional problem that doesn't actually happen when running normally. However, for certain extremely rare problems, this has a chance of catching the problem as it happens, before the stack has been irrevocably corrupted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instead of running ./bin/Debug/t-engine &amp;gt;&amp;gt;logfile 2&amp;gt;&amp;amp;1, run gdb ./bin/Debug/t-engine (note that you don't put any redirections on the gdb line).&lt;br /&gt;
At the (gdb) prompt, type run &amp;gt;&amp;gt;logfile 2&amp;gt;&amp;amp;1 (or whatever redirections you would normally have used from the shell prompt). If t-engine took any command-line arguments, they would also go here, rather than on the gdb command.&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Advanced_Debugging&amp;diff=9749</id>
		<title>Advanced Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Advanced_Debugging&amp;diff=9749"/>
				<updated>2015-07-19T20:25:40Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WARNING: THIS IS JUST AN OUTDATED / IN PROGRESS OF BEING REWORKED GUIDE HERE TO CONSERVE IT IN CASE THE OLD WIKI BECOMES UNAVAILABLE. DO NOT LINK TO IT ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download this: http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/gdb/x86_64-w64-mingw32-gdb-7.1.90.20100730.zip/download&lt;br /&gt;
&lt;br /&gt;
Unpack it so you have C:\mingw64\bin\gdb.exe (different path is ok but you have to adjust it later and it shouldnt contain any special characters or spaces).&lt;br /&gt;
&lt;br /&gt;
Open your ToME folder and create a textfile in it with the content:&lt;br /&gt;
C:\mingw64\bin\gdb.exe t-engine.exe&lt;br /&gt;
pause&lt;br /&gt;
&lt;br /&gt;
Save it, and rename it to debug.bat (make sure your file names are showing the ending so you can change it or it will stay a text file).&lt;br /&gt;
&lt;br /&gt;
Doubleclick the debug.bat.&lt;br /&gt;
&lt;br /&gt;
It should show some text and end with &amp;quot;&amp;lt;gdb&amp;gt;&amp;quot;. Write &amp;quot;run&amp;quot; (without &amp;quot;&amp;quot;) and press enter. This should start the game. &lt;br /&gt;
&lt;br /&gt;
If the game crashes, type info stack to get a stack trace of the issue (apparently backtrace works well too).&lt;br /&gt;
&lt;br /&gt;
Post the stack trace.&lt;br /&gt;
You can copy text from the command window by right-clicking, selecting &amp;quot;Mark&amp;quot; from the menu, dragging a box around the text you want to copy and then right-clicking again. You can then paste the text into a forum post.&lt;br /&gt;
&lt;br /&gt;
Locate gdb.txt in the tome directory, and send that.&lt;br /&gt;
&lt;br /&gt;
When finished, type quit to exit out of GDB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As I dont have a crashing game I couldnt test all of this, so please tell me if anything is not working as described.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ToME with GDB ==&lt;br /&gt;
GDB is a debugging tool that can help the developers of Tome track down difficult bugs. If you find something that makes the game crash, you can help out by catching this crash inside a GDB session and sending the details to the dev team. This will pinpoint the section of code which caused the crash, allowing the team to focus on the source of the problem.&lt;br /&gt;
&lt;br /&gt;
=== Installing and using GDB on Windows ===&lt;br /&gt;
Download it from the MinGW GDB sourceforge download page&lt;br /&gt;
Install it by creating a directory at C:\MinGW\ and extracting the archive to this location (other MinGW software installs itself to this location automatically so it is good to keep it all together)&lt;br /&gt;
Open a command prompt inside your tome4 directory and load t-engine.exe into GDB by typing this: C:\mingw\bin\gdb.exe t-engine.exe&lt;br /&gt;
Run the game by simply typing run&lt;br /&gt;
If the game crashes, type info stack to get a stack trace of the issue (apparently backtrace works well too)&lt;br /&gt;
Send the stack trace to the developers or post it on the forum.&lt;br /&gt;
Locate gdb.txt in the tome directory, and send that, or&lt;br /&gt;
You can copy text from the command window by right-clicking, selecting &amp;quot;Mark&amp;quot; from the menu, dragging a box around the text you want to copy and then right-clicking again. You can then paste the text into a forum post.&lt;br /&gt;
When finished, type quit to exit out of GDB&lt;br /&gt;
At the time of writing, the latest version of GDB available on the download page is gdb-7.1-2-mingw32-bin.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
tome4 user reenen: Any way I can save the stack trace to a .txt file? It kinda sucks that I got to manually copy and paste it. (via a cmd shell which is extremely sucky in windows)&lt;br /&gt;
tome4 user shoob: Yes, use **set logging on** before you type **run**, it will copy the log to gdb.txt (edited the above to show this too)&lt;br /&gt;
&lt;br /&gt;
tome4 user netzakh: Notes on installing and running GDB as of 20100628:&lt;br /&gt;
MinGW installer does NOT include GDB;&lt;br /&gt;
GDB requires libexpat-1.dll, which is NOT included into either the GDB tarball or MinGW installation so it has to be downloaded separately from the expat subfolder;&lt;br /&gt;
backtrace can be followed by a number //n// to show first //n// calls in the stack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using gdb on Linux ===&lt;br /&gt;
If you're running...&lt;br /&gt;
&lt;br /&gt;
Gentoo&lt;br /&gt;
See &amp;quot;Segmentation fault&amp;quot; (Is That Good?) under Gentoo.&lt;br /&gt;
&lt;br /&gt;
Other&lt;br /&gt;
This applies equally well to any other Unix-like system (FreeBSD, etc.). Installing gdb is generally trivial (use your operating system's package manager or ports system, or build it directly from upstream source if necessary). There are too many Unix-like variants to cover installation here.&lt;br /&gt;
&lt;br /&gt;
There are a few different ways to use gdb to help debug ToME. The first is to attach to a &amp;quot;running&amp;quot; (or stuck) ToME process at need.&lt;br /&gt;
Open up a terminal window. If you can't open a terminal for some reason, you can ssh or telnet in from another machine. You'll need to be the same user who's running t-engine.&lt;br /&gt;
Find the process ID of the running (or stuck) t-engine process. On most systems, the easiest way to do this is pgrep t-engine but if that doesn't work, you can try ps auxw | grep t-engine or ps -ef | grep t-engine instead.&lt;br /&gt;
Change directory to wherever you would normally be sitting when you launch t-engine.&lt;br /&gt;
Type gdb path/to/t-engine (for example gdb ./bin/Debug/t-engine). This tells gdb to load the program into memory, but will not execute it.&lt;br /&gt;
At the (gdb) prompt, type attach PID where PID is the process ID of the t-engine process.&lt;br /&gt;
Use bt or any other gdb commands you need (see the Windows section above for general tips).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another way is to run ToME under gdb's control from the start. This is overkill most of the time, and has been known to cause an occasional problem that doesn't actually happen when running normally. However, for certain extremely rare problems, this has a chance of catching the problem as it happens, before the stack has been irrevocably corrupted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instead of running ./bin/Debug/t-engine &amp;gt;&amp;gt;logfile 2&amp;gt;&amp;amp;1, run gdb ./bin/Debug/t-engine (note that you don't put any redirections on the gdb line).&lt;br /&gt;
At the (gdb) prompt, type run &amp;gt;&amp;gt;logfile 2&amp;gt;&amp;amp;1 (or whatever redirections you would normally have used from the shell prompt). If t-engine took any command-line arguments, they would also go here, rather than on the gdb command.&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Advanced_Debugging&amp;diff=9747</id>
		<title>Advanced Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Advanced_Debugging&amp;diff=9747"/>
				<updated>2015-07-19T18:39:12Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: Created page with &amp;quot;== WARNING: THIS IS JUST AN OUTDATED / IN PROGRESS OF BEING REWORKED GUIDE HERE TO CONSERVE IT IN CASE THE OLD WIKI BECOMES UNAVAILABLE. DO NOT LINK TO IT ==    == Running ToM...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WARNING: THIS IS JUST AN OUTDATED / IN PROGRESS OF BEING REWORKED GUIDE HERE TO CONSERVE IT IN CASE THE OLD WIKI BECOMES UNAVAILABLE. DO NOT LINK TO IT ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ToME with GDB ==&lt;br /&gt;
GDB is a debugging tool that can help the developers of Tome track down difficult bugs. If you find something that makes the game crash, you can help out by catching this crash inside a GDB session and sending the details to the dev team. This will pinpoint the section of code which caused the crash, allowing the team to focus on the source of the problem.&lt;br /&gt;
&lt;br /&gt;
=== Installing and using GDB on Windows ===&lt;br /&gt;
Download it from the MinGW GDB sourceforge download page&lt;br /&gt;
http://sourceforge.net/projects/mingw/files/MinGW/&lt;br /&gt;
Looking for the latest version? Download mingw-get-setup.exe (86.5 kB)&lt;br /&gt;
&lt;br /&gt;
Open File - Install&lt;br /&gt;
With graphical user interface&lt;br /&gt;
Continue&lt;br /&gt;
wait until 100% done&lt;br /&gt;
continue&lt;br /&gt;
on the left click on &amp;quot;All Packages&amp;quot;&lt;br /&gt;
search the list for &amp;quot;mingw32-gdb    bin&amp;quot;&lt;br /&gt;
mingw32-libggc&lt;br /&gt;
rightclick it - mark for isntallation&lt;br /&gt;
top left Installation - Apply Updates&lt;br /&gt;
&lt;br /&gt;
click apply&lt;br /&gt;
close and quit everything&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install it by creating a directory at C:\MinGW\ and extracting the archive to this location (other MinGW software installs itself to this location automatically so it is good to keep it all together)&lt;br /&gt;
Open a command prompt inside your tome4 directory and load t-engine.exe into GDB by typing this: C:\mingw\bin\gdb.exe t-engine.exe&lt;br /&gt;
Run the game by simply typing run&lt;br /&gt;
If the game crashes, type info stack to get a stack trace of the issue (apparently backtrace works well too)&lt;br /&gt;
Send the stack trace to the developers or post it on the forum.&lt;br /&gt;
Locate gdb.txt in the tome directory, and send that, or&lt;br /&gt;
You can copy text from the command window by right-clicking, selecting &amp;quot;Mark&amp;quot; from the menu, dragging a box around the text you want to copy and then right-clicking again. You can then paste the text into a forum post.&lt;br /&gt;
When finished, type quit to exit out of GDB&lt;br /&gt;
At the time of writing, the latest version of GDB available on the download page is gdb-7.1-2-mingw32-bin.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
tome4 user reenen: Any way I can save the stack trace to a .txt file? It kinda sucks that I got to manually copy and paste it. (via a cmd shell which is extremely sucky in windows)&lt;br /&gt;
tome4 user shoob: Yes, use **set logging on** before you type **run**, it will copy the log to gdb.txt (edited the above to show this too)&lt;br /&gt;
&lt;br /&gt;
tome4 user netzakh: Notes on installing and running GDB as of 20100628:&lt;br /&gt;
MinGW installer does NOT include GDB;&lt;br /&gt;
GDB requires libexpat-1.dll, which is NOT included into either the GDB tarball or MinGW installation so it has to be downloaded separately from the expat subfolder;&lt;br /&gt;
backtrace can be followed by a number //n// to show first //n// calls in the stack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using gdb on Linux ===&lt;br /&gt;
If you're running...&lt;br /&gt;
&lt;br /&gt;
Gentoo&lt;br /&gt;
See &amp;quot;Segmentation fault&amp;quot; (Is That Good?) under Gentoo.&lt;br /&gt;
&lt;br /&gt;
Other&lt;br /&gt;
This applies equally well to any other Unix-like system (FreeBSD, etc.). Installing gdb is generally trivial (use your operating system's package manager or ports system, or build it directly from upstream source if necessary). There are too many Unix-like variants to cover installation here.&lt;br /&gt;
&lt;br /&gt;
There are a few different ways to use gdb to help debug ToME. The first is to attach to a &amp;quot;running&amp;quot; (or stuck) ToME process at need.&lt;br /&gt;
Open up a terminal window. If you can't open a terminal for some reason, you can ssh or telnet in from another machine. You'll need to be the same user who's running t-engine.&lt;br /&gt;
Find the process ID of the running (or stuck) t-engine process. On most systems, the easiest way to do this is pgrep t-engine but if that doesn't work, you can try ps auxw | grep t-engine or ps -ef | grep t-engine instead.&lt;br /&gt;
Change directory to wherever you would normally be sitting when you launch t-engine.&lt;br /&gt;
Type gdb path/to/t-engine (for example gdb ./bin/Debug/t-engine). This tells gdb to load the program into memory, but will not execute it.&lt;br /&gt;
At the (gdb) prompt, type attach PID where PID is the process ID of the t-engine process.&lt;br /&gt;
Use bt or any other gdb commands you need (see the Windows section above for general tips).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another way is to run ToME under gdb's control from the start. This is overkill most of the time, and has been known to cause an occasional problem that doesn't actually happen when running normally. However, for certain extremely rare problems, this has a chance of catching the problem as it happens, before the stack has been irrevocably corrupted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instead of running ./bin/Debug/t-engine &amp;gt;&amp;gt;logfile 2&amp;gt;&amp;amp;1, run gdb ./bin/Debug/t-engine (note that you don't put any redirections on the gdb line).&lt;br /&gt;
At the (gdb) prompt, type run &amp;gt;&amp;gt;logfile 2&amp;gt;&amp;amp;1 (or whatever redirections you would normally have used from the shell prompt). If t-engine took any command-line arguments, they would also go here, rather than on the gdb command.&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Zone_order&amp;diff=9622</id>
		<title>Zone order</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Zone_order&amp;diff=9622"/>
				<updated>2015-03-19T16:02:22Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Guides]]&lt;br /&gt;
&lt;br /&gt;
It's quite difficult to recommend a safe [[zone]] order since version 1.0.3 introduced alternative zone layouts. &lt;br /&gt;
&lt;br /&gt;
==Early game==&lt;br /&gt;
In the early game you don't have many tactical options.  In many cases you are quite literally restricted to &amp;quot;move toward the monster and hit it with my weapon&amp;quot;.  In some cases, you may have a single choice, such as &amp;quot;move toward the monster, and then either hit it with my weapon, or use my extra-strength attack talent if it's strong&amp;quot;.  Characters with ranged attack talents have more flexibility, but are also typically more fragile, and will wish to keep ''away'' from monsters.&lt;br /&gt;
&lt;br /&gt;
Defensively, you will typically have either a [[inscriptions|physical Wild infusion]] plus a Regeneration infusion, or a Shielding rune plus a Phase Door rune, depending on your race.  This means you can either absorb 100 points of damage, or heal faster and remove one physical [[effect]] such as poison or stun.&lt;br /&gt;
&lt;br /&gt;
So, what you're looking for in the early game are relatively safe zones.  You don't want too many monsters that have ranged attacks (especially ''powerful'' ranged attacks), or more than one disabling ability.  If you're a ranged character, you'd also like to avoid monsters that can rush toward you.&lt;br /&gt;
&lt;br /&gt;
This leaves us with very few choices:&lt;br /&gt;
&lt;br /&gt;
*[[Trollmire]], up through [[Prox the Mighty]], is pretty safe.  It's fully lit, and has very few ranged attackers.  The trolls are somewhat strong in melee, but have no special moves.  The trees can be annoying for ranged characters, because they may allow monsters to &amp;quot;ambush&amp;quot; you at close range.&lt;br /&gt;
**'''Don't''' go into [[Bill]]'s lair yet.  Save that until you're higher level.&lt;br /&gt;
*[[Norgos' Lair]], in the standard layout, is even better.  The monsters are mostly animals with no ranged attacks.  It has lots of long straight corridors for shooting things (or facing things one at a time in melee).  It's fully lit, and the clearings are roughly circular, so it's virtually impossible for anything to sneak up on you.&lt;br /&gt;
**The alternative layout for Norgos' Lair, unfortunately, is much more dangerous.  There are cold elementals (Shivgoroths) that have ranged capabilities, and so does the frozen version of Norgos.  Nevertheless, it's still one of the safest zones (definitely the safest ''alternative'' layout).&lt;br /&gt;
*[[The agent of the arena]] quest, in [[Derth]], should be OK for any level 5 character, although certainly not a trivial fight.  The first opponent can shoot you; the second can rush you; and the third can burn you.  A little bit of caution should be enough.&lt;br /&gt;
&lt;br /&gt;
I would not recommend moving on to any other zone until you've completed these three (plus any racial starter zone(s) you have to escape from).&lt;br /&gt;
&lt;br /&gt;
Once you've survived these things, you should be level 5 or 6, or higher for [[Yeek]]s.  You'll have a couple of your second tier talents, and hopefully some useful equipment.  You probably don't have enough [[gold]] to buy anything useful yet, so whatever dropped is all you've got.  (If you somehow got lucky with gold, you may want to consider buying the strongest Regeneration infusion you can find.)&lt;br /&gt;
&lt;br /&gt;
Now it's time to look at the remaining tier 1 zones, and try to decide which one is least likely to kill you.&lt;br /&gt;
&lt;br /&gt;
*[[Heart of the Gloom]] is typically not too bad.  You'll take a constant barrage of mind damage from pretty much everything, but it's mostly ''small amounts''.  A good Regeneration infusion or two should get most characters through it.&lt;br /&gt;
*The [[Scintillating Caves]] have crystals that shoot you with magic projectiles, and then blink away when you try to walk over to them.  Very annoying, and dangerous if there are more than 1-2 of them in sight.  Ranged characters will find this zone ''much'' easier than melee characters, as you can typically outshoot the crystals.  Melee characters will find great benefit in talents like [[Rush]], although it's also possible to get through it with standard walk-up-to-it-and-hit-it tactics if you're persistent enough.&lt;br /&gt;
**The alternative layout isn't much different from the standard layout.&lt;br /&gt;
*The ruins of [[Kor'Pul]] are generally easy until you get to the boss.  But there are skeleton mages to watch out for (especially if you're being hit by one you can't see due to the long dark hallways).  For the boss (standard layout), dig through the wall to the south instead of approaching from the east or west.&lt;br /&gt;
**Not sure about the alternative layout yet....&lt;br /&gt;
*The [[Rhaloren Camp]] is the worst of the tier 1 zones, by a long shot.  It's full of mages that hit you with lots of spells, and sometimes appear in groups.  It also has Circle [[vault]]s which can contain ''level 25'' blood mages.  (Simple strategy: don't open the Circle vaults.)&lt;br /&gt;
*Taking [[Bill]] should be easy enough once you're level 10 or so.  Usually.  Unless you're particularly fragile against strong rushing melee opponents.  He's certainly not to be taken lightly.&lt;br /&gt;
&lt;br /&gt;
== Old stuff ==&lt;br /&gt;
'''Ignore this table.'''&lt;br /&gt;
&lt;br /&gt;
{| class = &amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Order !! Zone name !! Notes&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot; bgcolor=&amp;quot;A4A4A4&amp;quot;|'''''Maj'Eyal: Tier 1 Zone(s)'''''&lt;br /&gt;
|-&lt;br /&gt;
| 1. || [[Trollmire]] || You might want to wait until you are stronger before taking on [[Bill]].&lt;br /&gt;
|-&lt;br /&gt;
| 2. || [[Norgos' Lair]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 3. || [[The agent of the arena|The Arena]] || You need to talk to the shady cornac in the northeast of [[Derth]].&lt;br /&gt;
|-&lt;br /&gt;
| 4. || [[Heart of the Gloom]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 5. || [[Scintillating Caves]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 6. || [[Rhaloren Camp]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 7. || [[Kor'Pul]] ||&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot; bgcolor=&amp;quot;A4A4A4&amp;quot;|'''''Maj'Eyal: Tier 2 Zone(s)'''''&lt;br /&gt;
|-&lt;br /&gt;
| 1. || [[Old Forest]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 2. || [[Lake of Nur]] || Found at level four of [[old forest|the Old Forest]]. &lt;br /&gt;
|-&lt;br /&gt;
| 3. || [[Sandworm Lair]] || Blindness immunity is recommended for final boss. Also, watch out for the collapsing tunnels. It is recommended to have some form of teleportation so that you can escape a collapsed tunnel. &lt;br /&gt;
|-&lt;br /&gt;
| 4. || [[The Maze]] || Confusion immunity is recommended for the final boss and the other minotaurs. You might want to also have some poison immunity because there are a lot of rogues. &lt;br /&gt;
|-&lt;br /&gt;
| 5. || [[Lumberjack Village]] || Triggered by running to the north of [[Last Hope]].&lt;br /&gt;
|-&lt;br /&gt;
| 6. || [[Unknown Tunnels]] || Triggered by running around the north. Poison immunity is recommended&lt;br /&gt;
|-&lt;br /&gt;
| 7. || [[Ruined Halfling Complex]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 8. || [[Ruined Dungeon]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 9. || [[Golem Graveyard]] || The final boss can't be activated until much later in the game &lt;br /&gt;
|-&lt;br /&gt;
| 10. || [[Daikara]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 11. || [[Temporal Rift]] || It is found in the third level of [[Daikara]]. &lt;br /&gt;
|-&lt;br /&gt;
| 12. || [[Last Hope Graveyard]] || It is triggered by talking to Ungrol (the alchemist) inside [[Last Hope]]. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot; bgcolor=&amp;quot;A4A4A4&amp;quot;|'''''Maj'Eyal: Tier 3 Zone(s)'''''&lt;br /&gt;
|-&lt;br /&gt;
| 1. || [[Dreadfell]] ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Addon_Uploading&amp;diff=7521</id>
		<title>Addon Uploading</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Addon_Uploading&amp;diff=7521"/>
				<updated>2014-08-05T19:41:26Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Once your addon works and you want to world to see it you need to follow some simple steps to get it up on te4.org (and Steam Workshop if you on ToME on Steam):&lt;br /&gt;
* Check to make sure your addon has tags specified in the init.lua file (tags = { 'races', 'human', 'challenge'}).  The tags should be descriptive to assist searching on the te4.org website.&lt;br /&gt;
* Create a folder with the format &amp;quot;tome-[short_name]&amp;quot;, where the short_name is the same as that specified in the init.lua (tome-humansextended).&lt;br /&gt;
* Place your addon folder in the [TOME install folder]/game/addons folder, and copy into it all of your addon files (init.lua, data folder, hooks folder, overload folder, superload folder).&lt;br /&gt;
* Make sure developer mode is on (from the main menu: Options &amp;gt;&amp;gt; Developer mode &amp;gt;&amp;gt; Yes).&lt;br /&gt;
* Make sure you are logged in-game.&lt;br /&gt;
* Make a new character with the addon enabled.&lt;br /&gt;
* Enter debug menu (ctrl+a if you didn't re-bind it), and choose the Addon Developer menu.&lt;br /&gt;
* Select the option to register a new addon if this is the first time uploading this addon.&lt;br /&gt;
* Select the option to publish the addon to the te4.org website.&lt;br /&gt;
* Wait as the game packages and uploads your addon.&lt;br /&gt;
* Optional: do the same thing with the Steam upload.&lt;br /&gt;
* You're done, your addon should now appear on [http://te4.org/addons/tome te4.org addons list].&lt;br /&gt;
* Optional (but recommended): Create a te4.org forum account and start a new topic in the Addons section to give players a place to provide feedback about your addon and link to the topic from the te4.org addon page created for your addon.  You will have to wait for a moderator to approve your topic before you can link to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unverified info:  Edit your addon on your profile page to be able to enter the addon steam workshop id (check workshop page url for id), allowing you to update your old workshop entry.&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Mark_of_the_Spellblaze&amp;diff=6919</id>
		<title>Mark of the Spellblaze</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Mark_of_the_Spellblaze&amp;diff=6919"/>
				<updated>2014-06-19T16:44:18Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Zone&lt;br /&gt;
|name=Mark of the Spellblaze&lt;br /&gt;
|guardian=[[Grand Corruptor]]&lt;br /&gt;
|floors=2&lt;br /&gt;
|min_level=25&lt;br /&gt;
|max_level=35&lt;br /&gt;
|min_ilevel=2&lt;br /&gt;
|max_ilevel=3&lt;br /&gt;
|width=50&lt;br /&gt;
|height=50&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Zone Information==&lt;br /&gt;
The Mark of the Spellblaze is a zone that can be found randomly inside the Charred Scar (an area just west of [[Dreadfell]]). It appears as a red magic circle and is easily identifiable.&lt;br /&gt;
&lt;br /&gt;
The zone has a number of enemies, including cultists, blood mages, carrion worms, Gwelgoroths and the occasional lesser or greater Faeros in the early sections, with [[corruptor]]s joining the list further in.&lt;br /&gt;
&lt;br /&gt;
The terrain is mostly rocky with magma on the deeper floors with burnt trees breaking LOS. The terrain effects in the area include Spellblaze Scars (bonus to spell crit. chance and extra fire and blight damage).&lt;br /&gt;
&lt;br /&gt;
The boss of the zone is the [[Grand Corruptor]], a tough spell caster with support from surrounding enemies. If you yourself are a spell caster with enough spells (20 talents with &amp;quot;Is spell=true&amp;quot; in their description), around halfway through the fight he will make you an offer. He will ask you to attack the Ziguranth base of [[Zigur]], claiming he has been massing forces for an attack for some time now. If you agree he will teleport you into Zigur, where you will have to kill the inhabitants, including their leader, a powerful boss. Completing this quest will [[unlock]] the [[Corruptor]] class for character creation in future games.&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Speed&amp;diff=6904</id>
		<title>Speed</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Speed&amp;diff=6904"/>
				<updated>2014-06-08T21:33:34Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Game Mechanics]]&lt;br /&gt;
&lt;br /&gt;
THIS ARTICLE IS OUTDATED!!! DISPLAYED WEAPON SPEED IS NOW ABOVE 100% FOR FASTER WEAPONS!!!&lt;br /&gt;
&lt;br /&gt;
==The Effects of Speed on Combat.==&lt;br /&gt;
&lt;br /&gt;
===Hits Per Turn===&lt;br /&gt;
&lt;br /&gt;
Three variables affect your speed in combat and together they combine to give your number ofhits per turn(HPT). The variables are global speed, attack speed, and weapon speed.&lt;br /&gt;
&lt;br /&gt;
The game mechanics use ''energy'' to track all this. 100% global speed gives you 1000 energy points per turn (EPT), and a regular attack costs 1000 energy points per hit (EPH).&lt;br /&gt;
&lt;br /&gt;
So for a normal character at 100% global speed, with regular 100% attack speed, and with a regular weapon at 100% weapon speed, you simply get exactly 1 hit per turn (1000 EPT/ 1000 EPH = 1.00 HPT).&lt;br /&gt;
&lt;br /&gt;
Naturally, we can eliminate 1000 from this formula, as the 1000 number is arbitrary. The hits per turn formula is therefore simply&lt;br /&gt;
&lt;br /&gt;
Hits Per Turn = Global_Speed x (1 + Attack_Speed) / Weapon_Speed.&lt;br /&gt;
&lt;br /&gt;
But if Weapon Speed is slower than 100% (a negative number in the Character Sheet, it is counted as zero). This can happen with talents like Aim and Precise Strikes. So strictly the formula is:&lt;br /&gt;
&lt;br /&gt;
Hits Per Turn = Global_Speed x MAX [ (1 + Attack_Speed)/Weapon_Speed), (1 + Attack_Speed) ].&lt;br /&gt;
&lt;br /&gt;
However, I find it helpful to think using 1000 energy, so I'll stick with this in the calculations below. Also, and more importantly, the addon uses this as the 1000 base for energy/speed, rather than as percentages, so it is important to know where the figures come from.&lt;br /&gt;
&lt;br /&gt;
Weapon speed and Attack speed both affect Energy per Hit EPH. We will look at these first.&lt;br /&gt;
&lt;br /&gt;
===The effect of weapon speed===&lt;br /&gt;
Weapon speed is listed on the weapon as 100% for regular melee weapons, 90% for quick weapons, 80% for regular shooters, 70% for swiftstrike shooters, and gauntlets vary from 50% to 80%.&lt;br /&gt;
&lt;br /&gt;
This percentage is multiplied by the energy per hit (EPH). Thus a sling at 80% weapon speed costs 800 EPH.&lt;br /&gt;
&lt;br /&gt;
Example 1: Regular bow/sling at 80% weapon speed. 1000 EPT / 800 EPH = 1.25 HPT.&lt;br /&gt;
Example 2: Quick weapon at 90% weapon speed. 1000 EPT / 900 EPH = 1.11 HPT&lt;br /&gt;
&lt;br /&gt;
===The effect of attack speed===&lt;br /&gt;
Attack speed also reduces/increases the amount of energy per hit EPH. Attack speed is reduced/increased by many talents, such as Rapid Shot, Precise Strikes, and equipment differences (e.g. gloves vs gauntlets, amulets of enraging, etc). So rapid shot at 5/5 for at talent level 1.3 gives 65% increase in attack speed. To calculate the energy required, divide 1000 by 1 + the percent increase. So 65% increase gives 1000 / 1.65 = 606 energy points per turn (as indicated by lukep's addon).&lt;br /&gt;
&lt;br /&gt;
Some talents decrease attack speed, such as precise strikes and aim. In this case, the EPH increases.&lt;br /&gt;
&lt;br /&gt;
Example 3: Rapid shot gives 65% attack speed increase and an (hypothetical) bow at 100% weapon speed (as they have lower than this, see next section). 1000 EPT / 606 EPH = 1.65 HPT.&lt;br /&gt;
&lt;br /&gt;
The effect of attack speed and weapon speed combined&lt;br /&gt;
Attack speed and weapon speed stack, so, using my example, rapid shot at 5/5 gives me 606 EPH and weapon speed of 80% gives 0.8 x 606 = 485 EPH. Thus the hits per turn are 1000 EPT / 485 EPH = 2.06 HPT.&lt;br /&gt;
&lt;br /&gt;
However, when weapon speed is over 100%, as in Precise Strikes on a regular weapon, or for Aim, EPH is not multipled again (otherwise it would be calculated twice in the equation). This is example 1 below.&lt;br /&gt;
&lt;br /&gt;
So precise strikes of 10% decrease in attack speed with no other mods is 1000 EPT / (1 - 0.1) = 1111 EPH. Thus the hits per turn are 1000 EPT / 1111 EPH = 0.9 HPT.&lt;br /&gt;
&lt;br /&gt;
Example 4: Precise Strikes at 10% decrease to attack speed, with regular weapon. 1000 EPT / (1 - 0.1) = 1111 EPH. 1000 EPT / 1111 EPH = 0.9 HPT.&lt;br /&gt;
Example 5: Rapid Shot at 65% increase to attack speed, with swiftstrike bow at 70% weapon speed. 1000 EPT / 0.7 x 606 EPH = 2.36 HPT&lt;br /&gt;
Example 6: Rapid Shot at 65% increase to attack speed, with Precise Strikes 10% decrease to attack speed, giving attack speed of 48.5% in char sheet, with regular bow at 80% weapon speed. EPH = 1000 / 1.485 = 674. 1000 EPT / 674 EPH = 1.86 HPT. This makes sense, as it is slightly lower HPT than without precise strikes (2.06 HPT, see above)&lt;br /&gt;
&lt;br /&gt;
Incidentally, if you want to calculate how to get the 48.5%, it is Increase - (Decrease x (1 + Increase)). (e.g. 0.65 - (0.1 x (1.65) = 0.485). That is, you decrease based on the increased amount.&lt;br /&gt;
&lt;br /&gt;
===The effect of global speed===&lt;br /&gt;
Global speed increases the amount of energy per turn EPT. So 40% increase gives you 1400 EPT. So you get more time (= energy) to do stuff.&lt;br /&gt;
&lt;br /&gt;
Equipment and talents can increase global speed, some temporarily and some permanently.&lt;br /&gt;
&lt;br /&gt;
Eden's Guile for instance, gives you 29% increase to global speed. We simply then change EPT to 1290 and calculate accordingly. This is where we see significant changes to HPT.&lt;br /&gt;
&lt;br /&gt;
Example 7: Eden's Guile at 129% global speed, regular weapon. 1290 EPT / 1000 EPH = 1.29 HPT.&lt;br /&gt;
Example 8: Eden's Guile at 129% global speed, regular shooter at 80% weapon speed. 1290 EPT / 800 EPH = 1.61 HPT&lt;br /&gt;
Example 9: Eden's Guile at 129% global speed, swiftstrike shooter at 70% weapon speed, Rapid shot at 65% increase attack speed. 1290 EPT / 424 EPH = 3.04 HPT.&lt;br /&gt;
Example 10: Blinding Speed at 141% incrase, swiftstrike shooter at 70% weapon speed, Rapid Shot at 65% increase attack speed. 1410 EPT / 424 EPH = 3.31 HPT&lt;br /&gt;
&lt;br /&gt;
===Theoretical Maximum for HPT===&lt;br /&gt;
This is hard to estimate precisely.&lt;br /&gt;
&lt;br /&gt;
I think it would be a Yeek Archer: Yeek (global speed 15% increase) + global speed prodigy (15% increase), Rapid Shot with extra talent point + Ring of War Master + enraging amulet at 10% increase would give close to 100% attack speed increase I think. Randart sling with double swiftstrike for 60% attack speed (is this possible?) and 5% global speed increase, with offhand blazebringer at 5% global speed increase. Blinding Speed (but not with extra talent point, as to get global speed prodigy you need 20 in equi, which requires 2 unlocks, and we've spent 2 already), so 41% increase, to base of 140% global speed of yeek 15% + prodigy 15% + sling 5% + offhand 5%, giving total (temporary) global speed of 97.4% increase.&lt;br /&gt;
&lt;br /&gt;
That is, hypothetically, you might get temporarly 97.4% increase in global speed, 100% increase in attack speed, and 60% increase in weapon speed!&lt;br /&gt;
&lt;br /&gt;
This would give then, using generic formula above 1.974 * (1 + 1) / 0.6 = 6.58 hits per turn!&lt;br /&gt;
&lt;br /&gt;
The other class that might outdo this even is a Yeek Brawler, but I'll leave it to someone else to calculate.&lt;br /&gt;
&lt;br /&gt;
The 3.31 HPT (example 10 above) with max Blinding Speed, Swiftstrike, and max Rapid Shot, can be achieved by an archer by about lvl 17, if you save class points for this effect, and find a swiftstrike, which are quite rare. When your ammo has on hit effects, this means you increase your chance of landing one of these per turn.&lt;br /&gt;
&lt;br /&gt;
===When do I get my extra hits per turn?===&lt;br /&gt;
You have to accumulate the energy to the point when you have enough to do more than one action per turn. For example, you have weapon speed of 80% and no other modifier. In turn one you'll accumlate 200 energy, then 400, then 600, then 800. At this stage, you use 800 for your first shot, using up your spare energy and then you get your second shot. You can see this by putting on a regen infusion, and shooting randomly, and seeing when you get two shots per turn.&lt;br /&gt;
&lt;br /&gt;
So then, can you assume that you have to wait, in such an example when HPT = 1.25, for 4 turns before an extra shot? No, because the complication is that you can accumlate energy from all sorts of places. You might have movement speed increase, and so you move, giving you some spare energy each move. Move 3 times, to pump up your stock, and then shoot twice. Hard to coordinate, but it happens. So in practice, the extra shot appears anywhere in the 5 turn period.&lt;br /&gt;
&lt;br /&gt;
But this also illustrates why getting HPT 2 is so valuable. In this case, you always get 2 and sometimes 3 shots in a turn. And if you get to example 10, which can be done by about lvl 17, you can get HPT = 3.31 HPT. In 4 turns you'll shoot about 13 times with Blinding Speed! And that makes a BIG difference.&lt;br /&gt;
&lt;br /&gt;
===Acknowledgements===&lt;br /&gt;
The clock addon by lukep, and the many forums posts on speed and on Rapid Shot vs Aim, and some code delving, and running lots of archers, finally gave me the tools to figure this out properly I hope.&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
I hope this guide helps you understand more how speed affects combat in the game, as of version 1.0 of Tome.&lt;br /&gt;
&lt;br /&gt;
Please post any corrections or comments or clarifications, and I'll do my best to answer them. I've probably made some errors, but I did check everything as carefully as possible.&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Tales_of_Maj%27Eyal_Wiki&amp;diff=6902</id>
		<title>Tales of Maj'Eyal Wiki</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Tales_of_Maj%27Eyal_Wiki&amp;diff=6902"/>
				<updated>2014-06-07T17:36:27Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
'''Tales of Maj'Eyal 4''' (aka ToME 4) is an RPG Roguelike game, written as a module that runs in [[T-Engine 4]]. Download T-Engine and ToME for a myriad of Operating Systems from http://www.te4.org/download&lt;br /&gt;
&lt;br /&gt;
[[T-Engine 4]] is the reboot and complete rewrite of T-Engine, released in beta form on May 11, 2010.&lt;br /&gt;
----&lt;br /&gt;
* [[tome history|History of ToME]]&lt;br /&gt;
* [[tome faq|Frequently Asked Questions]]&lt;br /&gt;
* [[tome glossary|Glossary of terms in ToME]]&lt;br /&gt;
&lt;br /&gt;
'''Want to contribute to the ToME wiki?''' [[How To Contribute To The Wiki|Click here]] for how to get started.&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; style=&amp;quot;margin:0em 0em 1em 0em; width:100%; background-color:white&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:50%; vertical-align:top; border:1px solid;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border-bottom:1px solid; background-color:#FFB473; padding:0.2em 0.5em 0.2em 0.5em; font-size:110%; font-weight:bold;&amp;quot;&amp;gt;Character Info&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border-bottom:0px solid; padding:0.4em 1em 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Classes]]&lt;br /&gt;
* [[Races]]&lt;br /&gt;
* [[Stats]]&lt;br /&gt;
* [[Talents]]&lt;br /&gt;
* [[Prodigies]]&lt;br /&gt;
* [[Resources]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
| style=&amp;quot;width:50%; vertical-align:top; border:1px solid;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border-bottom:1px solid; background-color:#FFB473; padding:0.2em 0.5em 0.2em 0.5em; font-size:110%; font-weight:bold;&amp;quot;&amp;gt;Game Info&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border-bottom:0px solid; padding:0.4em 1em 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Campaigns]]&lt;br /&gt;
* [[Achievements]]&lt;br /&gt;
* [[Backup Guardians]]&lt;br /&gt;
* [[Bosses]]&lt;br /&gt;
* [[Guides]]&lt;br /&gt;
* [[Quests]]&lt;br /&gt;
* [[Unlockables]]&lt;br /&gt;
* [[Vaults]]&lt;br /&gt;
* [[Zones]]&lt;br /&gt;
* [[Escorts]]&lt;br /&gt;
* [[Difficulty]]&lt;br /&gt;
* [[Permadeath]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; style=&amp;quot;margin:0em 0em 1em 0em; width:100%; background-color:white&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:50%; vertical-align:top; border:1px solid;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border-bottom:1px solid; background-color:#FFB473; padding:0.2em 0.5em 0.2em 0.5em; font-size:110%; font-weight:bold;&amp;quot;&amp;gt;Game Mechanics&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border-bottom:0px solid; padding:0.4em 1em 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Character sheet]]: power, damage, saves, armor&lt;br /&gt;
* [[Combat Damage]]&lt;br /&gt;
* [[Effects]]&lt;br /&gt;
* [[Experience]]&lt;br /&gt;
* [[egos|Ego Items and their Effects]]&lt;br /&gt;
* [[Resources]]&lt;br /&gt;
* [[Vision]]&lt;br /&gt;
* [[Damage Types]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
| style=&amp;quot;width:50%; vertical-align:top; border:1px solid;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border-bottom:1px solid; background-color:#FFB473; padding:0.2em 0.5em 0.2em 0.5em; font-size:110%; font-weight:bold;&amp;quot;&amp;gt;Items&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border-bottom:0px solid; padding:0.4em 1em 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Items]]&lt;br /&gt;
* [[Artifacts]]&lt;br /&gt;
* [[Gems]]&lt;br /&gt;
* [[Item_list|Full List of all Items]]&lt;br /&gt;
* [[Materials|Item materials]]&lt;br /&gt;
* [[Mindstars]]&lt;br /&gt;
* [[Item sets]]&lt;br /&gt;
* [[Inscriptions]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; style=&amp;quot;margin:0em 0em 1em 0em; width:100%; background-color:white&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:50%; vertical-align:top; border:1px solid;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border-bottom:1px solid; background-color:#FFB473; padding:0.2em 0.5em 0.2em 0.5em; font-size:110%; font-weight:bold;&amp;quot;&amp;gt;Development&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border-bottom:0px solid; padding:0.4em 1em 1em 1em;&amp;quot;&amp;gt;&lt;br /&gt;
* [[Source Setup]]&lt;br /&gt;
* [[How to compile]]&lt;br /&gt;
* [[Lua|Lua: The language of ToME4]]&lt;br /&gt;
* [[Addons]]&lt;br /&gt;
** [[Hooks|Hooks and what they do]]&lt;br /&gt;
** [[Callback|List of Callbacks]]&lt;br /&gt;
** [[Resources_for_Addons_and_Modules|Addon Resources]]&lt;br /&gt;
** [[Addon Uploading]]&lt;br /&gt;
* [[Modules]]&lt;br /&gt;
** [[T4 Modules Howto Guide|Module creation guides]]&lt;br /&gt;
** [[Resources_for_Addons_and_Modules|Module Resources]]&lt;br /&gt;
* [[Debugging]]&lt;br /&gt;
* [[Command Line Arguments]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Callback&amp;diff=6901</id>
		<title>Callback</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Callback&amp;diff=6901"/>
				<updated>2014-06-07T17:35:29Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of callbacks in 1.2.1:&lt;br /&gt;
&lt;br /&gt;
callbackOnActBase&lt;br /&gt;
&lt;br /&gt;
callbackOnAct&lt;br /&gt;
&lt;br /&gt;
callbackOnMove&lt;br /&gt;
&lt;br /&gt;
callbackOnHeal&lt;br /&gt;
&lt;br /&gt;
callbackOnHit&lt;br /&gt;
&lt;br /&gt;
callbackOnDealDamage&lt;br /&gt;
&lt;br /&gt;
callbackOnDeath&lt;br /&gt;
&lt;br /&gt;
callbackOnKill&lt;br /&gt;
&lt;br /&gt;
callbackOnStatChange&lt;br /&gt;
&lt;br /&gt;
callbackOnWear&lt;br /&gt;
&lt;br /&gt;
callbackOnTakeoff&lt;br /&gt;
&lt;br /&gt;
callbackOnRest &lt;br /&gt;
&lt;br /&gt;
callbackOnMeleeAttack &lt;br /&gt;
&lt;br /&gt;
callbackOnMeleeHit &lt;br /&gt;
&lt;br /&gt;
callbackOnMeleeMiss &lt;br /&gt;
&lt;br /&gt;
callbackOnArcheryAttack &lt;br /&gt;
&lt;br /&gt;
callbackOnArcheryHit &lt;br /&gt;
&lt;br /&gt;
callbackOnArcheryMiss &lt;br /&gt;
&lt;br /&gt;
callbackOnCrit &lt;br /&gt;
&lt;br /&gt;
callbackOnTakeDamage&lt;br /&gt;
&lt;br /&gt;
callbackOnTalentPost&lt;br /&gt;
 &lt;br /&gt;
callbackBreakOnTalent&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Callback&amp;diff=6900</id>
		<title>Callback</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Callback&amp;diff=6900"/>
				<updated>2014-06-07T17:34:06Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: Created page with &amp;quot;List of callbacks in 1.2.1:  callbackOnActBase callbackOnAct callbackOnMove callbackOnHeal callbackOnHit callbackOnDealDamage callbackOnDeath callbackOnKill callbackOnStatChan...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of callbacks in 1.2.1:&lt;br /&gt;
&lt;br /&gt;
callbackOnActBase&lt;br /&gt;
callbackOnAct&lt;br /&gt;
callbackOnMove&lt;br /&gt;
callbackOnHeal&lt;br /&gt;
callbackOnHit&lt;br /&gt;
callbackOnDealDamage&lt;br /&gt;
callbackOnDeath&lt;br /&gt;
callbackOnKill&lt;br /&gt;
callbackOnStatChange&lt;br /&gt;
callbackOnWear&lt;br /&gt;
callbackOnTakeoff&lt;br /&gt;
callbackOnRest &lt;br /&gt;
callbackOnMeleeAttack &lt;br /&gt;
callbackOnMeleeHit &lt;br /&gt;
callbackOnMeleeMiss &lt;br /&gt;
callbackOnArcheryAttack &lt;br /&gt;
callbackOnArcheryHit &lt;br /&gt;
callbackOnArcheryMiss &lt;br /&gt;
callbackOnCrit &lt;br /&gt;
callbackOnTakeDamage&lt;br /&gt;
callbackOnTalentPost &lt;br /&gt;
callbackBreakOnTalent&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Tome_faq&amp;diff=6269</id>
		<title>Tome faq</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Tome_faq&amp;diff=6269"/>
				<updated>2013-12-12T17:44:47Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please try to avoid explicit spoilers on this page. This is a general FAQ for new players.&lt;br /&gt;
 &lt;br /&gt;
== General Gameplay ==&lt;br /&gt;
====Why can't I play a Mage?====&lt;br /&gt;
Many classes and races have to be unlocked before you can play them.  There are two reasons for this (and one way of getting around it):&lt;br /&gt;
:1. Allowing only the basic classes at the beginning keeps the game simple at first, and reveals greater complexity later, when you've mastered the basics.&lt;br /&gt;
:2. According to the game's backstory, the &amp;quot;true mages&amp;quot; are in hiding. They are reviled by the people of Maj'Eyal because of their role in the Spellblaze. You'll learn more about this as you progress through the game.&lt;br /&gt;
:3. Those who absolutely CANNOT wait may read the [[unlockables|unlockables spoiler page]] - though your playing experience may be less enjoyable for it.)&lt;br /&gt;
====Where are my save files?====&lt;br /&gt;
It depends on your operating system.  On Windows, they're in '''C:\Documents and Settings\yourusername\T-Engine\4.0\tome\save'''.  On Linux, they're in '''~/.t-engine/4.0/tome/save/'''.   On Mac OS X, they are in '''users/yourname/library/application support/T-Engine/4.0/tome/save'''. Since v1.0.1 you can run the game &amp;lt;code&amp;gt;t-engine --home YOURHOME&amp;lt;/code&amp;gt;&lt;br /&gt;
====But if I do that, won't I lose my unlocks and achievements?====&lt;br /&gt;
No.  Your unlocks and achievements and saved games are all stored in your home directory, not in the ToME directory.&lt;br /&gt;
====Then why can't I load my character in the new release?====&lt;br /&gt;
Click the &amp;quot;Show incompatible&amp;quot; button, and your old saves will show. Be warned, use at own risk.&lt;br /&gt;
====How do I talk to this NPC?====&lt;br /&gt;
Move onto the NPC.  If it's one you can talk to, this will open a dialog.  If it's not, then you'll switch places.&lt;br /&gt;
====What are these weird diagonal streaks I see in the Old Forest?====&lt;br /&gt;
It's raining.&lt;br /&gt;
====What do the golden numbers mean on the items dropped by monsters?====&lt;br /&gt;
The number indicates how many items are stacked on that tile, ''including gold''.  So, by the time you step on it (and automatically pick up the gold), the number of items in the stack may be quite a bit lower.&lt;br /&gt;
====What does [[resources-fatigue|Fatigue]] do?====&lt;br /&gt;
It increases the resource cost of talents.  Resources are the bars like Stamina, Mana, and so on.  If you have 20% Fatigue, a talent costs 1.20 or 1.40 times as much to use, depending on the specific resource -- so something that normally costs 30 would cost 36 or 42.&lt;br /&gt;
====What does Mastery do?====&lt;br /&gt;
For most talents, Mastery acts as a multiplier on the talent points you've invested.  For example, if you have Mastery 1.30 in a category and spend 4 talent points on a talent in that category, you have an effective level of 5.20 in that talent.&lt;br /&gt;
There are a few talents that ignore Mastery, and simply use the raw talent point level, for balance reasons.&lt;br /&gt;
====What's the difference between [[Armour|Armor]] and [[Defense]]?  And what is Armour Hardiness?====&lt;br /&gt;
Defense makes attacks less likely to hit.  Armor reduces the damage from a successful attack.  Armor works on weapon (melee) hits and most projectiles (such as arrows), but not spells.&lt;br /&gt;
Armour Hardiness is related to Armour (obviously).  It refers to the maximum percent of the attack your Armour can affect.  For example, if you have Armour Hardiness of 30%, your Armour can never absorb more than 30% of each attack.&lt;br /&gt;
====Why doesn't my Mana regenerate?====&lt;br /&gt;
Arcane Blades and Shadowblades haven't studied magic with a real teacher.  They just use it instinctively, so they don't have the disciplines necessary to draw power from the world around them the same way an Archmage does.  You can use a Manasurge rune to restore Mana.  Later, you may also find equipment that gives a little bit of Mana regeneration per turn.&lt;br /&gt;
&lt;br /&gt;
== User interface issues ==&lt;br /&gt;
====What are the key bindings?====&lt;br /&gt;
There are very few key bindings compared to ToME 2.  Most of the item-type-specific commands like &amp;quot;quaff&amp;quot; or &amp;quot;read&amp;quot; have been merged into a single &amp;quot;use&amp;quot; command, for example.  You can press ''ESC'' and select ''Key Bindings'' to bring up the key bindings screen.  From there, you can see all of them, and change them.  Note that the list is larger than the window; use the arrow keys to scroll up and down.&lt;br /&gt;
====How do I chat?====&lt;br /&gt;
Press ''space'' to bring up the chat text entry box.  Press ''ctrl-M'' to view the chat log (as well as the game log -- they're separate tabs on the same screen).&lt;br /&gt;
Right-click a monster to link it in chat.&lt;br /&gt;
Left-click an item in inventory to link it in chat.  You can't link items that you haven't got in your inventory.&lt;br /&gt;
====Why can't I link things in chat any more?  It used to work.====&lt;br /&gt;
You can only link things in chat if your game has been ''validated''.  There are several things that could cause the validation to fail:&lt;br /&gt;
:1. You are playing a modified, unofficial, or development build, rather than a release.&lt;br /&gt;
:2. You extracted a new release in the same directory as an old release.&lt;br /&gt;
:3. Sometimes there is a glitch in the communication with the servers.  If you suspect this, save and exit, and then try again.  Be sure to wait for ToME to say &amp;quot;beta XXX is available&amp;quot; on the left side of the screen before loading the game.&lt;br /&gt;
====How do I scroll the map?====&lt;br /&gt;
Hold ''Shift'' on the keyboard, and drag with the first (left) mouse button.&lt;br /&gt;
Press Caps Lock, then scroll with the movement keys.&lt;br /&gt;
====I need more than 12 hotkeys for all my skills.====&lt;br /&gt;
You can use ''Page Up'' and ''Page Down'' to cycle through the sets of hotkeys.&lt;br /&gt;
You can increase (or decrease) the size of the hotkey bar, too.  By default, the bar is locked in place.  In the lower right corner of the screen, click the lock icon to unlock it.  This puts a grabber on the hotkey bar (in the lower right corner of it).  Use the grabber to resize or move the bar.  When you're done, click the lock again to lock it in place.&lt;br /&gt;
If you make the hotkey bar taller, it may cover the game log and chat log, so you may also need to move them.  This works the same way as moving the hotkey bar, but the grabbers for the log windows might be hidden behind the hotkey bar.  So, move the hotkey bar out of the way, then move the log windows, then move the hotkey bar back into place.&lt;br /&gt;
====How do I change the hotkeys?====&lt;br /&gt;
From the '''m''' (Use Talents) screen, you can hover the mouse over a skill or talent, and then press the hotkey you want to assign to it.  From the '''i''' (Inventory) screen, you can hover over an item, and press the hotkey you want to assign to it.&lt;br /&gt;
You can unassign hotkeys by clicking the ''right'' mouse button on the hotkey.&lt;br /&gt;
====How do I target places that aren't monsters?====&lt;br /&gt;
When you use a targeted skill/talent and the target indicator appears, you can hold ''Shift'' and use the arrow keys to move it around one tile at a time.  Or, you can use the mouse.&lt;br /&gt;
====My 11th hotkey says RIGHTPAREN but that doesn't work, and doesn't make sense on my keyboard.====&lt;br /&gt;
Press ''ESC'' and select ''Key Bindings''.  Click on the binding you want to change.  When the box pops up, press the key you want to use.  Don't forget to do this for all three versions of that hotkey (there's one with Ctrl and one with Shift too).&lt;br /&gt;
====The colored tactical borders around the monsters disappeared.  How do I get them back?====&lt;br /&gt;
Press Shift-T.  It cycles through three different settings.&lt;br /&gt;
====How do I rest for X turns? I want to use a skill again, but I'm already fully healed.====&lt;br /&gt;
Press ''r'' to rest until you are at full Life (or until a monster comes into view).&lt;br /&gt;
Press ''5'' on the keypad (or left-click your character) to rest for one turn.&lt;br /&gt;
Using ''r'' to rest with full Life and resources will cause you to rest until all talents are off of cooldown.&lt;br /&gt;
====How do I equip things in my Second weapon set?====&lt;br /&gt;
Press ''q'' to swap weapon sets, and then equip whatever you want.  Press ''q'' again to swap back.  Swapping takes a turn.&lt;br /&gt;
(In older betas, press ''x'' instead of ''q''.)&lt;br /&gt;
 &lt;br /&gt;
== Platform issues ==&lt;br /&gt;
====How do I view stdout on a Mac?====&lt;br /&gt;
Run Terminal.&lt;br /&gt;
You need to navigate to the ''Contents/MacOS'' directory inside the T-Engine.app bundle.  This will depend on where you installed T-Engine to; if it's in ''/Applications'', then type'''cd /Applications/T-Engine.app/Contents/MacOS'''&lt;br /&gt;
Run T-Engine by typing'''./T-Engine'''&lt;br /&gt;
Information logged to stdout will then appear in the terminal window.&lt;br /&gt;
If you want to save stdout for later, you can redirect it to a file using ''&amp;gt;''. e.g. ''./T-Engine &amp;gt; ~/tome-stdout.txt''.&lt;br /&gt;
====Can I move my saved game from one machine to another?====&lt;br /&gt;
Yes.  Simply copy the entire '''.../tome/save/'''''charactername'' subdirectory (see the top of this page).  You probably also want to copy the ''charactername'''''.hotkeys''' file.&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=6253</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=6253"/>
				<updated>2013-11-29T13:36:44Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Debugging: Figuring out what went wrong ===&lt;br /&gt;
&lt;br /&gt;
==== Updating your configuration ====&lt;br /&gt;
Enabling cheat/development mode will grant you access to the internal Lua console and some additional dialogs/options useful for debugging.  It will stop you from uploading characters online, though, but you can always turn this mode off.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the corresponding configuration directory (replace HOME with your home directory).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Windows || HOME\T-Engine\4.0\settings &lt;br /&gt;
|-&lt;br /&gt;
| Linux || HOME/.t-egine/4.0/settings &lt;br /&gt;
|-&lt;br /&gt;
| Mac OSX || HOME\Library\Application Support\T-Engine\4.0\settings &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a file called ''cheat.cfg'' in that directory, and put the following text in that file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cheat = true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
To turn cheat/development mode off, just change ''true'' to ''false'' or delete the ''cheat.cfg'' file.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Inside of ToME ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key Shortcut !! Result&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+L || Lua console &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+A || Debug dialog &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+S || save the game &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Alt+Shift+R || Reload the last save &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
NOTE: The keybinding may not be set, in this case you have to bind it yourself first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Lua console ====&lt;br /&gt;
&lt;br /&gt;
Summary of features:&lt;br /&gt;
* Inspect values and execute code&lt;br /&gt;
* Cursor positioning&lt;br /&gt;
* Tab auto-completion&lt;br /&gt;
* Copy and paste with system clipboard&lt;br /&gt;
&lt;br /&gt;
The Lua console drops you into the global namespace and gives you access to [[t4modules engine structure|the engine]].  If you want to inspect values, start the line with an equal sign.  For example, say you want to inspect the player:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
=game.player&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The console has cursor positioning so you can use the Left and Right arrows, as well as Home and End to move to the beginning and end of the current line, respectively.  You can paste the clipboard's contents to the cursor position with Ctrl+V (note, not Apple+V on Mac).  The current line can be copied to the clipboard with Ctrl+C (again, not Apple+C).&lt;br /&gt;
&lt;br /&gt;
Here are some useful commands to know.&lt;br /&gt;
;Level up to level 50&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:forceLevelup(50)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Remove godmode invulnerability&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.invulnerable=0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your damage bonus&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.inc_damage.all=&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your resistance&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.resists.all=&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Learn a new talent (1 level in Slash in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:learnTalent(game.player.T_SLASH, true, 1)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change category mastery&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:setTalentTypeMastery(&amp;quot;cunning/survival&amp;quot;, 1.5)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change base stat - up to 100 max (reduce strength by 20 in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:incStat(&amp;quot;str&amp;quot;, -20)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change stat bonus (set Cunning bonus to 50 in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.inc_stats[game.player.STAT_CUN] = 50&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Apply an effect on the player (frozen for 10 turns)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:setEffect(game.player.EFF_FROZEN, 10, {})&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your max HP&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.max_life=1&lt;br /&gt;
game.player:resetToFull()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Teleport (to the Assassin Lord)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game:changeLevel(2,&amp;quot;thieves-tunnels&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Add 5000 gold&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:incMoney(5000)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unassigned class skills&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_talents=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused stat points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_stats=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself an extra stat point each level (default=3)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.stats_per_level=4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused generic points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_generics=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused category points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_talents_types=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 lives:&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.easy_mode_lifes=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Lua Code====&lt;br /&gt;
&lt;br /&gt;
To output values into the log file you can use 2 different functions:&lt;br /&gt;
&lt;br /&gt;
;Print any text&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
print(&amp;quot;yourmessage&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Display the content of an object. This lists all variables contained in the object foo.&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
table.print(foo)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Output log text to file immediately (Only needed on Windows) ===&lt;br /&gt;
&lt;br /&gt;
Without this, you have to close the game for the log file to be updated!&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a shortcut to t-engine.exe.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click the shortcut and select Properties.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the command to the end of the &amp;quot;Target&amp;quot; line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
--flush-stdout&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The end of the Target line should look like this then: &amp;lt;pre&amp;gt;\t-engine.exe --flush-stdout&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be used in combination with a [http://en.wikipedia.org/wiki/Tail_(Unix) tail] program that shows the content of the log file in realtime.&lt;br /&gt;
&lt;br /&gt;
=== Load module and create character on startup ===&lt;br /&gt;
&lt;br /&gt;
You can create a character once then use the premade from the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
t-engine -Mtome -n -E&amp;quot;auto_quickbirth='player'&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if your premade was named &amp;quot;player.&amp;quot;  (Or create a shortcut in Windows, similarly to the instructions above for outputting log text to a file.)&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=6138</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=6138"/>
				<updated>2013-09-18T20:39:16Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: /* Output log text to file immediately (Only needed on Windows) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Debugging: Figuring out what went wrong ===&lt;br /&gt;
&lt;br /&gt;
==== Updating your configuration ====&lt;br /&gt;
Enabling cheat/development mode will grant you access to the internal Lua console and some additional dialogs/options useful for debugging.  It will stop you from uploading characters online, though, but you can always turn this mode off.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the corresponding configuration directory (replace HOME with your home directory).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Windows || HOME\T-Engine\4.0\settings &lt;br /&gt;
|-&lt;br /&gt;
| Linux || HOME/.t-egine/4.0/settings &lt;br /&gt;
|-&lt;br /&gt;
| Mac OSX || HOME\Library\Application Support\T-Engine\4.0\settings &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a file called ''cheat.cfg'' in that directory, and put the following text in that file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cheat = true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
To turn cheat/development mode off, just change ''true'' to ''false'' or delete the ''cheat.cfg'' file.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Inside of ToME ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key Shortcut !! Result&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+L || Lua console &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+A || Debug dialog &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+S || save the game &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Alt+Shift+R || Reload the last save &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
NOTE: The keybinding may not be set, in this case you have to bind it yourself first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Lua console ====&lt;br /&gt;
&lt;br /&gt;
Summary of features:&lt;br /&gt;
* Inspect values and execute code&lt;br /&gt;
* Cursor positioning&lt;br /&gt;
* Tab auto-completion&lt;br /&gt;
* Copy and paste with system clipboard&lt;br /&gt;
&lt;br /&gt;
The Lua console drops you into the global namespace and gives you access to [[t4modules engine structure|the engine]].  If you want to inspect values, start the line with an equal sign.  For example, say you want to inspect the player:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
=game.player&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The console has cursor positioning so you can use the Left and Right arrows, as well as Home and End to move to the beginning and end of the current line, respectively.  You can paste the clipboard's contents to the cursor position with Ctrl+V (note, not Apple+V on Mac).  The current line can be copied to the clipboard with Ctrl+C (again, not Apple+C).&lt;br /&gt;
&lt;br /&gt;
Here are some useful commands to know.&lt;br /&gt;
;Level up to level 50&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:forceLevelup(50)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Remove godmode invulnerability&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.invulnerable=0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your damage bonus&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.inc_damage.all=&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your resistance&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.self.resists.all=&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Learn a new talent (1 level in Slash in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:learnTalent(game.player.T_SLASH, true, 1)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change category mastery&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:setTalentTypeMastery(&amp;quot;cunning/survival&amp;quot;, 1.5)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change base stat - up to 100 max (reduce strength by 20 in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:incStat(&amp;quot;str&amp;quot;, -20)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change stat bonus (set Cunning bonus to 50 in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.inc_stats[game.player.STAT_CUN] = 50&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Apply an effect on the player (frozen for 10 turns)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:setEffect(game.player.EFF_FROZEN, 10, {})&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your max HP&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.max_life=1&lt;br /&gt;
game.player:resetToFull()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Teleport (to the Assassin Lord)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game:changeLevel(2,&amp;quot;thieves-tunnels&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Add 5000 gold&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:incMoney(5000)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unassigned class skills&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_talents=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused stat points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_stats=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself an extra stat point each level (default=3)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.stats_per_level=4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused generic points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_generics=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused category points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_talents_types=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 lives:&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.easy_mode_lifes=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Output log text to file immediately (Only needed on Windows) ===&lt;br /&gt;
&lt;br /&gt;
Without this, you have to close the game for the log file to be updated!&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a shortcut to t-engine.exe.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click the shortcut and select Properties.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the command to the end of the &amp;quot;Target&amp;quot; line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
--flush-stdout&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The end of the Target line should look like this then: &amp;lt;pre&amp;gt;\t-engine.exe --flush-stdout&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be used in combination with a [http://en.wikipedia.org/wiki/Tail_(Unix) tail] program that shows the content of the log file in realtime.&lt;br /&gt;
&lt;br /&gt;
=== Load module and create character on startup ===&lt;br /&gt;
&lt;br /&gt;
You can create a character once then use the premade from the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
t-engine -Mtome -n -E&amp;quot;auto_quickbirth='player'&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if your premade was named &amp;quot;player.&amp;quot;  (Or create a shortcut in Windows, similarly to the instructions above for outputting log text to a file.)&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=6137</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=6137"/>
				<updated>2013-09-18T20:39:01Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: /* Output log text to file immediately (Only needed for Windows) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Debugging: Figuring out what went wrong ===&lt;br /&gt;
&lt;br /&gt;
==== Updating your configuration ====&lt;br /&gt;
Enabling cheat/development mode will grant you access to the internal Lua console and some additional dialogs/options useful for debugging.  It will stop you from uploading characters online, though, but you can always turn this mode off.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the corresponding configuration directory (replace HOME with your home directory).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Windows || HOME\T-Engine\4.0\settings &lt;br /&gt;
|-&lt;br /&gt;
| Linux || HOME/.t-egine/4.0/settings &lt;br /&gt;
|-&lt;br /&gt;
| Mac OSX || HOME\Library\Application Support\T-Engine\4.0\settings &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a file called ''cheat.cfg'' in that directory, and put the following text in that file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cheat = true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
To turn cheat/development mode off, just change ''true'' to ''false'' or delete the ''cheat.cfg'' file.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Inside of ToME ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key Shortcut !! Result&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+L || Lua console &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+A || Debug dialog &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+S || save the game &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Alt+Shift+R || Reload the last save &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
NOTE: The keybinding may not be set, in this case you have to bind it yourself first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Lua console ====&lt;br /&gt;
&lt;br /&gt;
Summary of features:&lt;br /&gt;
* Inspect values and execute code&lt;br /&gt;
* Cursor positioning&lt;br /&gt;
* Tab auto-completion&lt;br /&gt;
* Copy and paste with system clipboard&lt;br /&gt;
&lt;br /&gt;
The Lua console drops you into the global namespace and gives you access to [[t4modules engine structure|the engine]].  If you want to inspect values, start the line with an equal sign.  For example, say you want to inspect the player:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
=game.player&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The console has cursor positioning so you can use the Left and Right arrows, as well as Home and End to move to the beginning and end of the current line, respectively.  You can paste the clipboard's contents to the cursor position with Ctrl+V (note, not Apple+V on Mac).  The current line can be copied to the clipboard with Ctrl+C (again, not Apple+C).&lt;br /&gt;
&lt;br /&gt;
Here are some useful commands to know.&lt;br /&gt;
;Level up to level 50&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:forceLevelup(50)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Remove godmode invulnerability&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.invulnerable=0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your damage bonus&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.inc_damage.all=&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your resistance&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.self.resists.all=&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Learn a new talent (1 level in Slash in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:learnTalent(game.player.T_SLASH, true, 1)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change category mastery&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:setTalentTypeMastery(&amp;quot;cunning/survival&amp;quot;, 1.5)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change base stat - up to 100 max (reduce strength by 20 in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:incStat(&amp;quot;str&amp;quot;, -20)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change stat bonus (set Cunning bonus to 50 in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.inc_stats[game.player.STAT_CUN] = 50&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Apply an effect on the player (frozen for 10 turns)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:setEffect(game.player.EFF_FROZEN, 10, {})&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your max HP&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.max_life=1&lt;br /&gt;
game.player:resetToFull()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Teleport (to the Assassin Lord)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game:changeLevel(2,&amp;quot;thieves-tunnels&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Add 5000 gold&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:incMoney(5000)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unassigned class skills&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_talents=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused stat points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_stats=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself an extra stat point each level (default=3)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.stats_per_level=4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused generic points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_generics=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused category points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_talents_types=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 lives:&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.easy_mode_lifes=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Output log text to file immediately (Only needed on Windows) ===&lt;br /&gt;
&lt;br /&gt;
Without this, you have to close the game for the log file to be updated on Windows machines!&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a shortcut to t-engine.exe.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click the shortcut and select Properties.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the command to the end of the &amp;quot;Target&amp;quot; line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
--flush-stdout&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The end of the Target line should look like this then: &amp;lt;pre&amp;gt;\t-engine.exe --flush-stdout&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be used in combination with a [http://en.wikipedia.org/wiki/Tail_(Unix) tail] program that shows the content of the log file in realtime.&lt;br /&gt;
&lt;br /&gt;
=== Load module and create character on startup ===&lt;br /&gt;
&lt;br /&gt;
You can create a character once then use the premade from the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
t-engine -Mtome -n -E&amp;quot;auto_quickbirth='player'&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if your premade was named &amp;quot;player.&amp;quot;  (Or create a shortcut in Windows, similarly to the instructions above for outputting log text to a file.)&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=6136</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=6136"/>
				<updated>2013-09-18T20:38:31Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: /* Output log text to file immediately */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Debugging: Figuring out what went wrong ===&lt;br /&gt;
&lt;br /&gt;
==== Updating your configuration ====&lt;br /&gt;
Enabling cheat/development mode will grant you access to the internal Lua console and some additional dialogs/options useful for debugging.  It will stop you from uploading characters online, though, but you can always turn this mode off.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the corresponding configuration directory (replace HOME with your home directory).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Windows || HOME\T-Engine\4.0\settings &lt;br /&gt;
|-&lt;br /&gt;
| Linux || HOME/.t-egine/4.0/settings &lt;br /&gt;
|-&lt;br /&gt;
| Mac OSX || HOME\Library\Application Support\T-Engine\4.0\settings &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a file called ''cheat.cfg'' in that directory, and put the following text in that file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cheat = true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
To turn cheat/development mode off, just change ''true'' to ''false'' or delete the ''cheat.cfg'' file.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Inside of ToME ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key Shortcut !! Result&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+L || Lua console &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+A || Debug dialog &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+S || save the game &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Alt+Shift+R || Reload the last save &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
NOTE: The keybinding may not be set, in this case you have to bind it yourself first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Lua console ====&lt;br /&gt;
&lt;br /&gt;
Summary of features:&lt;br /&gt;
* Inspect values and execute code&lt;br /&gt;
* Cursor positioning&lt;br /&gt;
* Tab auto-completion&lt;br /&gt;
* Copy and paste with system clipboard&lt;br /&gt;
&lt;br /&gt;
The Lua console drops you into the global namespace and gives you access to [[t4modules engine structure|the engine]].  If you want to inspect values, start the line with an equal sign.  For example, say you want to inspect the player:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
=game.player&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The console has cursor positioning so you can use the Left and Right arrows, as well as Home and End to move to the beginning and end of the current line, respectively.  You can paste the clipboard's contents to the cursor position with Ctrl+V (note, not Apple+V on Mac).  The current line can be copied to the clipboard with Ctrl+C (again, not Apple+C).&lt;br /&gt;
&lt;br /&gt;
Here are some useful commands to know.&lt;br /&gt;
;Level up to level 50&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:forceLevelup(50)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Remove godmode invulnerability&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.invulnerable=0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your damage bonus&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.inc_damage.all=&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your resistance&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.self.resists.all=&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Learn a new talent (1 level in Slash in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:learnTalent(game.player.T_SLASH, true, 1)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change category mastery&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:setTalentTypeMastery(&amp;quot;cunning/survival&amp;quot;, 1.5)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change base stat - up to 100 max (reduce strength by 20 in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:incStat(&amp;quot;str&amp;quot;, -20)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change stat bonus (set Cunning bonus to 50 in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.inc_stats[game.player.STAT_CUN] = 50&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Apply an effect on the player (frozen for 10 turns)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:setEffect(game.player.EFF_FROZEN, 10, {})&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your max HP&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.max_life=1&lt;br /&gt;
game.player:resetToFull()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Teleport (to the Assassin Lord)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game:changeLevel(2,&amp;quot;thieves-tunnels&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Add 5000 gold&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:incMoney(5000)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unassigned class skills&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_talents=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused stat points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_stats=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself an extra stat point each level (default=3)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.stats_per_level=4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused generic points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_generics=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused category points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_talents_types=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 lives:&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.easy_mode_lifes=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Output log text to file immediately (Only needed for Windows) ===&lt;br /&gt;
&lt;br /&gt;
Without this, you have to close the game for the log file to be updated on Windows machines!&lt;br /&gt;
&lt;br /&gt;
Instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a shortcut to t-engine.exe.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click the shortcut and select Properties.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the command to the end of the &amp;quot;Target&amp;quot; line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
--flush-stdout&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The end of the Target line should look like this then: &amp;lt;pre&amp;gt;\t-engine.exe --flush-stdout&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be used in combination with a [http://en.wikipedia.org/wiki/Tail_(Unix) tail] program that shows the content of the log file in realtime.&lt;br /&gt;
&lt;br /&gt;
=== Load module and create character on startup ===&lt;br /&gt;
&lt;br /&gt;
You can create a character once then use the premade from the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
t-engine -Mtome -n -E&amp;quot;auto_quickbirth='player'&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if your premade was named &amp;quot;player.&amp;quot;  (Or create a shortcut in Windows, similarly to the instructions above for outputting log text to a file.)&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=6135</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=6135"/>
				<updated>2013-09-18T20:37:34Z</updated>
		
		<summary type="html">&lt;p&gt;Dekar: /* Output log text to file immediately */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Debugging: Figuring out what went wrong ===&lt;br /&gt;
&lt;br /&gt;
==== Updating your configuration ====&lt;br /&gt;
Enabling cheat/development mode will grant you access to the internal Lua console and some additional dialogs/options useful for debugging.  It will stop you from uploading characters online, though, but you can always turn this mode off.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the corresponding configuration directory (replace HOME with your home directory).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Windows || HOME\T-Engine\4.0\settings &lt;br /&gt;
|-&lt;br /&gt;
| Linux || HOME/.t-egine/4.0/settings &lt;br /&gt;
|-&lt;br /&gt;
| Mac OSX || HOME\Library\Application Support\T-Engine\4.0\settings &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a file called ''cheat.cfg'' in that directory, and put the following text in that file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cheat = true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
To turn cheat/development mode off, just change ''true'' to ''false'' or delete the ''cheat.cfg'' file.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Inside of ToME ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key Shortcut !! Result&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+L || Lua console &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+A || Debug dialog &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+S || save the game &lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Alt+Shift+R || Reload the last save &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
NOTE: The keybinding may not be set, in this case you have to bind it yourself first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Lua console ====&lt;br /&gt;
&lt;br /&gt;
Summary of features:&lt;br /&gt;
* Inspect values and execute code&lt;br /&gt;
* Cursor positioning&lt;br /&gt;
* Tab auto-completion&lt;br /&gt;
* Copy and paste with system clipboard&lt;br /&gt;
&lt;br /&gt;
The Lua console drops you into the global namespace and gives you access to [[t4modules engine structure|the engine]].  If you want to inspect values, start the line with an equal sign.  For example, say you want to inspect the player:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
=game.player&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The console has cursor positioning so you can use the Left and Right arrows, as well as Home and End to move to the beginning and end of the current line, respectively.  You can paste the clipboard's contents to the cursor position with Ctrl+V (note, not Apple+V on Mac).  The current line can be copied to the clipboard with Ctrl+C (again, not Apple+C).&lt;br /&gt;
&lt;br /&gt;
Here are some useful commands to know.&lt;br /&gt;
;Level up to level 50&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:forceLevelup(50)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Remove godmode invulnerability&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.invulnerable=0&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your damage bonus&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.inc_damage.all=&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your resistance&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.self.resists.all=&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Learn a new talent (1 level in Slash in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:learnTalent(game.player.T_SLASH, true, 1)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change category mastery&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:setTalentTypeMastery(&amp;quot;cunning/survival&amp;quot;, 1.5)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change base stat - up to 100 max (reduce strength by 20 in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:incStat(&amp;quot;str&amp;quot;, -20)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change stat bonus (set Cunning bonus to 50 in the example)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.inc_stats[game.player.STAT_CUN] = 50&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Apply an effect on the player (frozen for 10 turns)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:setEffect(game.player.EFF_FROZEN, 10, {})&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Change your max HP&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.max_life=1&lt;br /&gt;
game.player:resetToFull()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Teleport (to the Assassin Lord)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game:changeLevel(2,&amp;quot;thieves-tunnels&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Add 5000 gold&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player:incMoney(5000)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unassigned class skills&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_talents=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused stat points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_stats=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself an extra stat point each level (default=3)&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.stats_per_level=4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused generic points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_generics=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 unused category points&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.unused_talents_types=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
;Give yourself 10 lives:&lt;br /&gt;
: &amp;lt;code&amp;gt;&lt;br /&gt;
game.player.easy_mode_lifes=10&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Output log text to file immediately ===&lt;br /&gt;
&lt;br /&gt;
Without this, you have to close the game for the log file to be updated on Windows machines!&lt;br /&gt;
&lt;br /&gt;
Sample instructions for Windows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a shortcut to t-engine.exe.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Right-click the shortcut and select Properties.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the command to the end of the &amp;quot;Target&amp;quot; line:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
--flush-stdout&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The end of the Target line should look like this then: &amp;lt;pre&amp;gt;\t-engine.exe --flush-stdout&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can be used in combination with a [http://en.wikipedia.org/wiki/Tail_(Unix) tail] program that shows the content of the log file in realtime.&lt;br /&gt;
&lt;br /&gt;
=== Load module and create character on startup ===&lt;br /&gt;
&lt;br /&gt;
You can create a character once then use the premade from the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
t-engine -Mtome -n -E&amp;quot;auto_quickbirth='player'&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if your premade was named &amp;quot;player.&amp;quot;  (Or create a shortcut in Windows, similarly to the instructions above for outputting log text to a file.)&lt;/div&gt;</summary>
		<author><name>Dekar</name></author>	</entry>

	</feed>