<?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=Castler</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=Castler"/>
		<link rel="alternate" type="text/html" href="https://te4.org/wiki/Special:Contributions/Castler"/>
		<updated>2026-05-25T22:21:43Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=11898</id>
		<title>T4 Modules Howto Guide</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=11898"/>
				<updated>2016-03-14T01:42:49Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: Undo revision 11897 by Castler (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to start making a module for the T-Engine 4:&lt;br /&gt;
----&lt;br /&gt;
*[[Getting Started]]&lt;br /&gt;
*[[Directory Structure]]&lt;br /&gt;
*[[Engine Structure]]&lt;br /&gt;
*[[Player Descriptors]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Talents|Talents]]&lt;br /&gt;
*[[Entities]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Zones|Zones]]&lt;br /&gt;
*[[NPCs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/AI|AI]]&lt;br /&gt;
*[[Objects]]&lt;br /&gt;
*[[Inventory Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Traps|Traps]] (not created)&lt;br /&gt;
*[[Dialogs]]&lt;br /&gt;
*[[Character Sheet Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Stores|Stores]] (not created)&lt;br /&gt;
*[[Factions]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Quests|Quests]] (not created)&lt;br /&gt;
*[[T4 Modules Howto Guide/Achievements|Achievements]]&lt;br /&gt;
*[[Chats]]&lt;br /&gt;
*[[Colors]]&lt;br /&gt;
*[[Frame Buffers]]&lt;br /&gt;
*[[Developing a static map using the Tiled plugin]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Resolvers|Resolvers]]&lt;br /&gt;
*[[Particle Effects]]&lt;br /&gt;
*[[Uploading a module]]&lt;br /&gt;
*[[Creating a standalone release]]&lt;br /&gt;
{{Module Guides}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=11897</id>
		<title>T4 Modules Howto Guide</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=11897"/>
				<updated>2016-03-14T01:41:50Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to start making a module for the T-Engine 4:&lt;br /&gt;
----&lt;br /&gt;
*[[Getting Started]]&lt;br /&gt;
*[[Directory Structure]]&lt;br /&gt;
*[[Engine Structure]]&lt;br /&gt;
*[[Player Descriptors]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Talents|Talents]]&lt;br /&gt;
*[[Entities]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Zones|Zones]]&lt;br /&gt;
*[[NPCs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/AI|AI]]&lt;br /&gt;
*[[Objects]]&lt;br /&gt;
*[[Inventory Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Traps|Traps]] (not created)&lt;br /&gt;
*[[Dialogs]]&lt;br /&gt;
*[[Character Sheet Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Stores|Stores]] (not created)&lt;br /&gt;
*[[Factions]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Quests|Quests]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Achievements|Achievements]]&lt;br /&gt;
*[[Chats]]&lt;br /&gt;
*[[Colors]]&lt;br /&gt;
*[[Frame Buffers]]&lt;br /&gt;
*[[Developing a static map using the Tiled plugin]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Resolvers|Resolvers]] (not created)&lt;br /&gt;
*[[Particle Effects]]&lt;br /&gt;
*[[Uploading a module]]&lt;br /&gt;
*[[Creating a standalone release]]&lt;br /&gt;
{{Module Guides}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Resolvers&amp;diff=11896</id>
		<title>T4 Modules Howto Guide/Resolvers</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Resolvers&amp;diff=11896"/>
				<updated>2016-03-14T01:41:23Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Resolvers=&lt;br /&gt;
&lt;br /&gt;
[[Entities]] work with resolvers. Basically, every time you need a given entity to be different from other entities created from the same table. For instance, this allows every orc to have a slightly different equipment - by using an equip resolver.&lt;br /&gt;
&lt;br /&gt;
Resolvers can have a _resolve_last flag set, this means they only get resolved on the last pass in entity creation (after all egos are applied).&lt;br /&gt;
&lt;br /&gt;
Entities can also have an instant_resolve flag, which is especially useful for appending to names and/or egos.&lt;br /&gt;
&lt;br /&gt;
As [http://forums.te4.org/viewtopic.php?f=40&amp;amp;t=45695 explained by DarkGod]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Resolvers basically are there to let you postpone some stuff in entities.&lt;br /&gt;
You *could* write a field like that in an entity:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo = rng.range(1,10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But the call to rng.range would happen when the entity files is loaded and thus set the value in stone for all entities cloned from it.&lt;br /&gt;
If instead you used&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo = resolvers.rngrange(1, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then it would take its value only when the entity has been cloned, making sure every clone has its own random value.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Unremarkable_Cave&amp;diff=6842</id>
		<title>Unremarkable Cave</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Unremarkable_Cave&amp;diff=6842"/>
				<updated>2014-04-28T01:40:19Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: /* Zone Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Zone| name = Unremarkable Cave| floors = 1| min_level = 25| max_level = 35| min_ilevel = 3| max_ilevel = 4| width = 100| height = 50}}&lt;br /&gt;
==Zone Information==&lt;br /&gt;
&lt;br /&gt;
You appear in the Unremarkable Cave immediately upon finishing [[Reknor]] and using the [[Orb of Many Ways]].&lt;br /&gt;
&lt;br /&gt;
You show up in the middle of a fight between an elf from [[Sunwall]] named Fillarel and an orc named Krogar.  Killing Krogar and saving Fillarel will unlock the [[Anorithil]] class.&lt;br /&gt;
&lt;br /&gt;
The rest of the cave is, as implied by the name, unremarkable.  You can explore it for experience and a chance at loot, or you can use the Rod of Recall to teleport to the entrance.&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Achievements&amp;diff=6517</id>
		<title>T4 Modules Howto Guide/Achievements</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Achievements&amp;diff=6517"/>
				<updated>2014-01-06T03:40:22Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: Created page with &amp;quot;'''Work in progress.  Not yet finished or tested.'''  = Adding the World =  T-Engine uses the [http://te4.org/docs/t-engine4/1.0.0/modules/engine.interface.WorldAchievements.h...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Work in progress.  Not yet finished or tested.'''&lt;br /&gt;
&lt;br /&gt;
= Adding the World =&lt;br /&gt;
&lt;br /&gt;
T-Engine uses the [http://te4.org/docs/t-engine4/1.0.0/modules/engine.interface.WorldAchievements.html WorldAchievements] interface to track and grant achievements and stores achievements as part of the [http://te4.org/docs/t-engine4/1.0.0/modules/engine.World.html World] object.  To add these to your own module:&lt;br /&gt;
&lt;br /&gt;
Add a World.lua file in your class directory.  Sample contents (based on [http://git.net-core.org/darkgod/t-engine4/blob/master/game/modules/tome/class/World.lua ToME's]):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
require &amp;quot;engine.class&amp;quot;&lt;br /&gt;
require &amp;quot;engine.World&amp;quot;&lt;br /&gt;
require &amp;quot;engine.interface.WorldAchievements&amp;quot;&lt;br /&gt;
local Savefile = require &amp;quot;engine.Savefile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
module(..., package.seeall, class.inherit(engine.World, engine.interface.WorldAchievements))&lt;br /&gt;
&lt;br /&gt;
function _M:init()&lt;br /&gt;
    engine.World.init(self)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function _M:run()&lt;br /&gt;
    self:loadAchievements()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Requests the world to save&lt;br /&gt;
function _M:saveWorld(no_dialog)&lt;br /&gt;
    -- savefile_pipe is created as a global by the engine&lt;br /&gt;
    savefile_pipe:push(&amp;quot;&amp;quot;, &amp;quot;world&amp;quot;, self)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change load.lua to create a World object as well as a Game object.  To do so, edit the last line.  It should look something like this:&lt;br /&gt;
&lt;br /&gt;
 return { require &amp;quot;mod.class.Game&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Replace it with this:&lt;br /&gt;
&lt;br /&gt;
 return { require &amp;quot;mod.class.Game&amp;quot;, require &amp;quot;mod.class.World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
= Defining Achievements =&lt;br /&gt;
&lt;br /&gt;
Under your module's data directory, create an achievements directory.  Create as many .lua files defining achievements within this directory as you like; each .lua file should call the T-Engine [http://te4.org/docs/t-engine4/1.0.0/modules/engine.interface.WorldAchievements.html#_M:newAchievement newAchievement] function for each achievement to be created.&lt;br /&gt;
&lt;br /&gt;
Here's a sample, based on ToME itself:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newAchievement{&lt;br /&gt;
    name = &amp;quot;Pyromancer&amp;quot;,&lt;br /&gt;
    desc = [[Unlocked Archmage class and did over one million fire damage (with any item/talent/class).]],&lt;br /&gt;
    show = &amp;quot;full&amp;quot;,&lt;br /&gt;
    mode = &amp;quot;world&amp;quot;,&lt;br /&gt;
    can_gain = function(self, who, dam)&lt;br /&gt;
        self.nb = (self.nb or 0) + dam&lt;br /&gt;
        return self.nb &amp;gt; 1000000 and profile.mod.allow_build.mage&lt;br /&gt;
    end,&lt;br /&gt;
    track = function(self) return tstring{tostring(math.floor(self.nb or 0)),&amp;quot; / 1000000&amp;quot;} end,&lt;br /&gt;
    on_gain = function(_, src, personal)&lt;br /&gt;
        game:setAllowedBuild(&amp;quot;mage_pyromancer&amp;quot;, true)&lt;br /&gt;
        local p = game.party:findMember{main=true}&lt;br /&gt;
        if p.descriptor.subclass == &amp;quot;Archmage&amp;quot;  then&lt;br /&gt;
            if p:knowTalentType(&amp;quot;spell/wildfire&amp;quot;) == nil then&lt;br /&gt;
                p:learnTalentType(&amp;quot;spell/wildfire&amp;quot;, false)&lt;br /&gt;
                p:setTalentTypeMastery(&amp;quot;spell/wildfire&amp;quot;, 1.3)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters for newAchievement:&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Parameter&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Name of the achievement&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;id&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Internal ID of the achievement. Optional. If not provided, then name will be used, uppercased and with spaces replaced with underscores.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;desc&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Full description&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;image&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Optional filename for the achievement&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;mode&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&amp;quot;world&amp;quot;, &amp;quot;game&amp;quot;, &amp;quot;player&amp;quot;, or &amp;quot;none&amp;quot;.  Indicates whether the achievement is tracked for the persistent World object, the game object, or the current player. For example, achievements that can only be gained once ever should be world achievements, while per-character achievements should be player.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;huge&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;If true, this achievement is a big deal and gets some extra emphasis when announced.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;show&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Determines how this achievement is listed in the default [http://te4.org/docs/t-engine4/1.0.0/modules/engine.dialogs.ShowAchievements.html ShowAchievements] dialog:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;false, nil, or not provided - The achievement is completely hidden. Only the &amp;quot;Achievements (#received/#total)&amp;quot; display at the top of the dialog gives any clue that it exists.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;quot;none&amp;quot; - The achievement is listed as &amp;quot;???&amp;quot;, and its description is &amp;quot;-- Unknown --&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;quot;name&amp;quot; - The achievement's name is listed, but its description is &amp;quot;-- Unknown --&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;quot;full&amp;quot; (or anything else) - Full details are listed, whether or not you have the achievement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;no_chat_broadcast&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;If provided and true, then don't broadcast to the in-game chat when this achievement is gained.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;can_gain&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Optional function, taking (data, src, ...) arguments (where ... is whatever additional arguments were passed to [http://te4.org/docs/t-engine4/1.0.0/modules/engine.interface.WorldAchievements.html#_M:gainAchievement gainAchievement] or [http://te4.org/docs/t-engine4/1.0.0/modules/engine.interface.WorldAchievements.html#_M:gainPersonalAchievement gainPersonalAchievement]), to be called to check whether the achievement can be gained.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;data is the persistent achievement data: either world.achievement_data, game.achievement_data, or player.achievement_data, depending on mode.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;track&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Optional function, taking (data, src) arguments, giving progress towards the achievement (for display in the [http://te4.org/docs/t-engine4/1.0.0/modules/engine.dialogs.ShowAchievements.html ShowAchievements] dialog).  Should return a tstring.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;on_gain&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;Optional function, taking (self, src, personal) arguments (where self is the achievement definition), to be called when an achievement is gained.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you're finished, add code to your load.lua to load the achievements.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local WorldAchievements = require &amp;quot;engine.interface.WorldAchievements&amp;quot;&lt;br /&gt;
WorldAchievements:loadDefinition(&amp;quot;/data/achievements/&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Showing Achievements =&lt;br /&gt;
&lt;br /&gt;
In your Game.lua, you most likely have a call to engine.dialogs.GameMenu, where you pass in a list of menu items for the in-game main menu.  Add &amp;quot;achievements&amp;quot; to the list of items here.  Then, pressing Esc within the game will include a &amp;quot;Show Achievements&amp;quot; item where you can see the achievements you've defined and whether or not you've received them yet.&lt;br /&gt;
&lt;br /&gt;
{{Module Guides}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Particle_Effects&amp;diff=6516</id>
		<title>Particle Effects</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Particle_Effects&amp;diff=6516"/>
				<updated>2014-01-06T03:17:21Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Particle effects can be used to add pizzazz to your game.  There are two parts to adding particles: invoking the particles from your main Lua code and actually defining them.  We'll cover invoking particle effects first, since it's considerably simpler, and you'll want to be able to invoke your new effects to test them out and tune their parameters.&lt;br /&gt;
&lt;br /&gt;
= Invoking Particles =&lt;br /&gt;
&lt;br /&gt;
Assuming your particle effect is named &amp;quot;my_particle.lua&amp;quot; (see [[#Defining Particles|below]]), there are a few main options for invoking it.  (Other alternatives also exist for more specialized circumstances.)&lt;br /&gt;
&lt;br /&gt;
== On the map ==&lt;br /&gt;
&lt;br /&gt;
The [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Map.html#_M:particleEmitter Map.particleEmitter function] can add a particle effect to the map.  For example, if a talent should display an effect centered on the user, add the following code to your talent's &amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt; function:&lt;br /&gt;
&lt;br /&gt;
    game.level.map:particleEmitter(self.x, self.y, 1, &amp;quot;my_particle&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Make sure that your particle effect limits how many particles it generates; otherwise, it can run forever.&lt;br /&gt;
&lt;br /&gt;
== On an entity ==&lt;br /&gt;
&lt;br /&gt;
A long-lasting particle effect can be added to an entity with [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Entity.html#_M:addParticles Entity.addParticles] and removed with [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Entity.html#_M:removeParticles Entity.removeParticles].  For example, to associate a particle effect with a status condition, add the following to the appropriate &amp;lt;code&amp;gt;newEffect&amp;lt;/code&amp;gt; block in your &amp;lt;code&amp;gt;timed_effects.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
    activate = function(self, eff)&lt;br /&gt;
        eff.particle = self:addParticles(Particles.new(&amp;quot;my_particle&amp;quot;, 1))&lt;br /&gt;
    end,&lt;br /&gt;
    deactivate = function(self, eff)&lt;br /&gt;
        self:removeParticles(eff.particle)&lt;br /&gt;
    end,&lt;br /&gt;
&lt;br /&gt;
== As a projectile ==&lt;br /&gt;
&lt;br /&gt;
See [http://te4.org/docs/t-engine4/1.0.0/modules/engine.interface.ActorProject.html ActorProject].  Specifically:&lt;br /&gt;
&lt;br /&gt;
* To add a particle effect when the projectile hits, pass &amp;lt;code&amp;gt;{type=&amp;quot;my_particle&amp;quot;}&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;particles&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;project&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;projectile&amp;lt;/code&amp;gt;.&lt;br /&gt;
* To add a particle effect for the projectile itself, add a &amp;lt;code&amp;gt;display={particle=&amp;quot;my_particle&amp;quot;}&amp;lt;/code&amp;gt; entry in the table that you pass for the &amp;lt;code&amp;gt;t&amp;lt;/code&amp;gt; parameter.  (This table will often come from a talent's &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; function.)&lt;br /&gt;
&lt;br /&gt;
== Testing your particle effects ==&lt;br /&gt;
&lt;br /&gt;
Note that particle effects files are loaded ''every time'' they're invoked.  This makes it very easy to test your particles: make up a talent that invokes the particles, give it no resource cost and no cooldown, and invoke it as much as you want as you tweak the particle parameters.&lt;br /&gt;
&lt;br /&gt;
= Defining Particles =&lt;br /&gt;
&lt;br /&gt;
To define a new particle effect, create a Lua file under your module's &amp;lt;code&amp;gt;data/gfx/particles&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ToME source code has a huge set of existing particle effects under [http://git.net-core.org/darkgod/t-engine4/tree/master/game/modules/tome/data/gfx/particles game/modules/tome/data/gfx/particles], so you can look there to see how particular effects are implemented.&lt;br /&gt;
&lt;br /&gt;
== Basic concepts ==&lt;br /&gt;
&lt;br /&gt;
Particle effects are processed at 30 frames per second (regardless of the T-Engine's actual frame rate).&lt;br /&gt;
&lt;br /&gt;
A particle effect is a fragment of Lua code that returns the following:&lt;br /&gt;
&lt;br /&gt;
# A table of [[#parameters|parameters]] for each particle.  This table can define parameters directly, or it can contain a &amp;lt;code&amp;gt;generator&amp;lt;/code&amp;gt; function that returns a table of parameters each time it's invoked.&lt;br /&gt;
# An emitter function.  This function is called every frame (i.e., 30 times a second).  Its main job is to call &amp;lt;code&amp;gt;self:ps:emit(N)&amp;lt;/code&amp;gt; (where N is the number of particles to generate for that frame) as appropriate.&lt;br /&gt;
# (Optional) A number giving the maximum number of particles that the system will handle for this particle effect.  Setting this too high will slightly hurt performance.&lt;br /&gt;
# (Optional) A string giving an image filename (minus extension) to load and use in place of the standard dot or spherical image.&lt;br /&gt;
# (Optional) A boolean that can be set to cause the particle system to not be automatically deleted when no more particles exist.  Use with care.&lt;br /&gt;
&lt;br /&gt;
Under normal conditions, a particle system will be automatically deleted when no more particles exist.  The emitter function often limits itself to only running a certain number of times to ensure that particle systems don't go on forever.&lt;br /&gt;
&lt;br /&gt;
Some basic trigonometry may be helpful to convert between x, y coordinates and angles on a circle.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Particle effect code can return a table of parameters directly for use with the T-Engine's simple generator, or it can return a generator function.&lt;br /&gt;
&lt;br /&gt;
=== Simple generator ===&lt;br /&gt;
&lt;br /&gt;
A table for use with the simple generator might look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
    base = 1000,&lt;br /&gt;
        &lt;br /&gt;
    angle = { 0, 360 }, anglev = { 2000, 4000 }, anglea = { 200, 600 },&lt;br /&gt;
        &lt;br /&gt;
    life = { 5, 10 },&lt;br /&gt;
    size = { 3, 6 }, sizev = {0, 0}, sizea = {0, 0},&lt;br /&gt;
        &lt;br /&gt;
    r = {0, 0}, rv = {0, 0}, ra = {0, 0},&lt;br /&gt;
    g = {80, 200}, gv = {0, 10}, ga = {0, 0},&lt;br /&gt;
    b = {0, 0}, bv = {0, 0}, ba = {0, 0},&lt;br /&gt;
    a = {255, 255}, av = {0, 0}, aa = {0, 0},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that each value is given as a pair of numbers; these give the minimum and maximum values for the RNG to randomly generate each particle.  Also note that colors (r, g, b, and a) range from 0 to 255.  Only integers are permitted.&lt;br /&gt;
&lt;br /&gt;
The simple generator is fairly restrictive; it's only really suitable for particles moving outwards from a central point.&lt;br /&gt;
&lt;br /&gt;
=== Generator function ===&lt;br /&gt;
&lt;br /&gt;
The same particle effect expressed as a generator function would look like this: (UNTESTED)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return { generator = function()&lt;br /&gt;
    return {&lt;br /&gt;
        trail = 0,&lt;br /&gt;
&lt;br /&gt;
        life = rng.range(5, 10),&lt;br /&gt;
        size = rng.range(3, 6), sizev = 0, sizea = 0,&lt;br /&gt;
&lt;br /&gt;
        x = 0, xv = 0, xa = 0,&lt;br /&gt;
        y = 0, yv = 0, ya = 0,&lt;br /&gt;
        dir = math.rad(rng.range(0, 360)), dirv = 0, dira = 0,&lt;br /&gt;
        vel = rng.range(2, 4), velv = rng.range(0.2, 0.6), vela = 0,&lt;br /&gt;
&lt;br /&gt;
        r = 0, rv = 0, ra = 0,&lt;br /&gt;
        g = rng.range(80, 200)/255, gv = rng.range(0, 10)/255, ga = 0,&lt;br /&gt;
        b = 0, bv = 0, ba = 0,&lt;br /&gt;
        a = 1, av = 0, aa = 0&lt;br /&gt;
    }&lt;br /&gt;
end }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The generator function invokes the RNG itself and returns floating point numbers.&lt;br /&gt;
&lt;br /&gt;
=== Parameter values ===&lt;br /&gt;
&lt;br /&gt;
Several parameters have ...v and ...a values.  These give velocity and acceleration for that value.  Each frame, velocity is added to the base value, then acceleration is added to velocity (causing velocity to change for future frames).  For example:&lt;br /&gt;
&lt;br /&gt;
    r = 1, rv = -0.1, ra = 0&lt;br /&gt;
    g = 0, gv = 0, ga = 0,&lt;br /&gt;
    b = 0, bv = 0, ba = 0&lt;br /&gt;
&lt;br /&gt;
starts out solid red and fades to black over 10 frames.&lt;br /&gt;
&lt;br /&gt;
As another example:&lt;br /&gt;
&lt;br /&gt;
    y = 0, yv = 0, ya = -0.4&lt;br /&gt;
&lt;br /&gt;
creates a particle that is initially motionless but starts moving up faster and faster.&lt;br /&gt;
&lt;br /&gt;
Details on values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''General settings'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;life&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Number of frames for which the particle will exist&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;size, sizev, sizea&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Size of the particle&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Simple generator only'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;base&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;All velocity and acceleration values are divided by this before being processed (since the default generator can't take fractional values directly).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;angle, anglev, anglea&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Angle along which the particle should move, in degrees, and velocity and acceleration at which it should move along that angle.  Generator functions can use dir and vel for a similar effect.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Generator function only'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;trail&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Used to draw trails from one particle to another.  trail is 0-based, unlike most values in T-Engine.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;x, xv, xa&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;x coordinate, relative to the center of the particle system&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;y, yv, ry&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;y coordinate, relative to the center of the particle system&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;dir, dirv, dira&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Angle along which the particle should move, in radians.  dirv and dira give the rate at which that angle should change.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;vel, velv, vela&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Velocity to move along the angle given by dir, and the &amp;quot;velocity of velocity&amp;quot; (i.e., acceleration) and the &amp;quot;acceleration of velocity.&amp;quot;  Movement can be done via xv, xa, yv, ya or dir, vel (or both at the same time).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Color'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;r, rv, ra&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Red component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;g, gv, ga&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Green component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;b, bv, ba&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Blue component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;a, av, aa&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Alpha component.  255 (for the simple generator) or 1 (for a generator function) means fully opaque, 0 means fully transparent.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Module Guides}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=6515</id>
		<title>T4 Modules Howto Guide</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=6515"/>
				<updated>2014-01-06T03:03:39Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to start making a module for the T-Engine 4:&lt;br /&gt;
----&lt;br /&gt;
*[[Getting Started]]&lt;br /&gt;
*[[Directory Structure]]&lt;br /&gt;
*[[Engine Structure]]&lt;br /&gt;
*[[Player Descriptors]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Talents|Talents]]&lt;br /&gt;
*[[Entities]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Zones|Zones]]&lt;br /&gt;
*[[NPCs]]&lt;br /&gt;
*[[Objects]]&lt;br /&gt;
*[[Inventory Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Traps|Traps]] (not created)&lt;br /&gt;
*[[Dialogs]]&lt;br /&gt;
*[[Character Sheet Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Stores|Stores]] (not created)&lt;br /&gt;
*[[Factions]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Quests|Quests]] (not created)&lt;br /&gt;
*[[T4 Modules Howto Guide/Achievements|Achievements]]&lt;br /&gt;
*[[Chats]]&lt;br /&gt;
*[[Colors]]&lt;br /&gt;
*[[Frame Buffers]]&lt;br /&gt;
*[[Developing a static map using the Tiled plugin]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Resolvers|Resolvers]] (not created)&lt;br /&gt;
*[[Particle Effects]]&lt;br /&gt;
*[[Uploading a module]]&lt;br /&gt;
*[[Creating a standalone release]]&lt;br /&gt;
{{Module Guides}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Creating_a_standalone_release&amp;diff=6514</id>
		<title>Creating a standalone release</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Creating_a_standalone_release&amp;diff=6514"/>
				<updated>2014-01-06T03:00:21Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Creating a standalone release allows people to play your game without having to download ToME, download your module, put it in the right place, etc.  It also allows you to customize the boot module (which handles the startup screen and main menu) so that you can come up with something thematically appropriate for your module.&lt;br /&gt;
&lt;br /&gt;
How to create a standalone release and how to create your own boot module:&lt;br /&gt;
* Download http://te4.org/dl/dev/boot-example.zip as a base for the main menu.&lt;br /&gt;
* Remove the boot module from &amp;lt;code&amp;gt;game/engines/default/modules/boot*&amp;lt;/code&amp;gt;&lt;br /&gt;
* Put your new boot module in place.&lt;br /&gt;
* Edit or replace &amp;lt;code&amp;gt;boot/data/gfx/background/&amp;lt;/code&amp;gt; files with your own splash screen.&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;boot/init.lua&amp;lt;/code&amp;gt; to give it a correct name, change the boot screen's startup background, etc.  (This &amp;lt;code&amp;gt;init.lua&amp;lt;/code&amp;gt; uses the same format as the one you created in [[Getting Started]].)&lt;br /&gt;
* Grab a copy of ToME.  Inside, replace the boot module with yours the tome module with yours.&lt;br /&gt;
{{Module Guides}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=6260</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=6260"/>
				<updated>2013-12-05T03:14:11Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &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;
Enabling cheat mode gives you the following functions:&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;
| (not assigned by default) || Debug menu&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;
! Mouse !! Result&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl-Left click || Teleport to the targeted square&lt;br /&gt;
|-&lt;br /&gt;
| Right click || Right-clicking a monster offers several debug functions, such as the ability to inspect inventory.&lt;br /&gt;
|-&lt;br /&gt;
| Shift-Ctrl-Right click || Instantly kill the targeted creature.  This does work on yourself.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Debug menu ===&lt;br /&gt;
&lt;br /&gt;
Debug menu (aka debug mode) offers a menu with various options like changing zones, creating items, altering quests, etc.  All of this can also be done via the Lua console, but the debug menu is much easier to use.&lt;br /&gt;
&lt;br /&gt;
The keybinding for debug mode may not be assigned by default.  Press Esc and go under Key Bindings to assign it.&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;
== 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>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Qi_Daozei&amp;diff=6259</id>
		<title>Qi Daozei</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Qi_Daozei&amp;diff=6259"/>
				<updated>2013-12-05T03:04:05Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Module&lt;br /&gt;
|name=Qi Daozei&lt;br /&gt;
|developer=[[User:Castler|Castler]]&lt;br /&gt;
|version=0.4.0&lt;br /&gt;
|engine=1.0.5&lt;br /&gt;
|standalone=[http://github.com/joshkel/qdz/releases]&lt;br /&gt;
|page=[http://te4.org/games/qdz]&lt;br /&gt;
|link=[http://forums.te4.org/viewtopic.php?f=40&amp;amp;t=38831]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
An Oriental-themed fantasy roguelike. Fight creatures from folklore and legend and absorb their qi to gain new abilities while fleeing the sinister minions of the Empire and its warlocks.&lt;br /&gt;
&lt;br /&gt;
Qi (pronounced “chee”) is the life energy that flows through all beings and throughout the universe. You are a qi daozei – a “qi rogue” – born with the ability to absorb others' life energy. Your kind is feared and persecuted by the Empire, so for years you've hidden your gifts and tried to live a normal life among the citizenry. Now you've been discovered and must fight your way through caverns and wilderness to escape to safety, knowing that the magics and minions of the Empire are quickly closing in...&lt;br /&gt;
&lt;br /&gt;
Gameplay: To absorb an opponent's qi, weaken them in combat until you can kill them with your next hit, then use your &amp;quot;Focus Qi&amp;quot; technique and deliver the deathblow. Doing so will let you absorb their qi and learn a new technique. What technique you absorb depends on how you deliver the finishing blow; check in-game tooltips or right-click an enemy and choose Inspect Creature for details.&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Getting_Started&amp;diff=6258</id>
		<title>T4 Modules Howto Guide/Getting Started</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Getting_Started&amp;diff=6258"/>
				<updated>2013-12-05T03:00:30Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: /* init.lua */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;In order to start your own module, you need to create a new directory in the /game/modules/ directory, into which you copy the contents of either /game/modules/example/ or /game/modules/example_realtime/, which will give you bare-bones but working base to work off of.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==init.lua==&lt;br /&gt;
&amp;lt;p&amp;gt;The first file you need to customize is the init.lua file. This file has a few things you need to edit to make this module your own:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Setting&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;This is the official name of the module as seen in module selection list.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;long_name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;This is the long name of the module that appears is descriptions.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;short_name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;This is a short name used internal to the module. Preferred to be lower case and should be the same as the folder name.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;author&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Your name or pseudonym and email address.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;homepage&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Optional homepage of the module.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;version&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Module version. Does not automatically update. Change this between releases to differentiate them.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;engine&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Expected engine version.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;description&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;A description of your module. Can be multiple lines and paragraphs.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;starter&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Only change if you know what you are doing. And if you have to ask, you don't.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;show_only_on_cheat&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;If true, prevents this module from appearing in the mods list normally. This is enabled by default on the example module and should be disabled in your module.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;no_get_name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Prevents the new character name dialog from showing up for your module. Use this if you set the character name yourself in your module.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;allow_userchat&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Registers 'space' as a key to talk, joins a channel named &amp;amp;quot;module&amp;amp;quot;, and inits the chat system. If the game implements a game.logChat(str, ...) method it'll send chat listens to there.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;background_name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;A list of filenames (without the extension) of PNG images under the data/gfx/background directory to use as startup screen backgrounds&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;logo_name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;A list of filenames (without the extension) of PNG images under the data/gfx/background directory to use as startup screen logos&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;toc2&amp;quot;&amp;gt;Launching your module using command line parameters&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By now you should be able to start t-engine normally and see your module in the list when you select new game. However, when changing features then quickly wanting to see its effects, this process involves a lot of unneeded clicks and wasted time. For this reason t-engine.exe supports various command line parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Parameter&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;-M&amp;amp;lt;Module&amp;amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Auto-loads the specified module (using the module's short_name).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;-u&amp;amp;lt;name&amp;amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Uses the specified name for the character.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;-n&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Forces a new character, overwriting any old saves with the same name.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;To take advantage of this in windows, you need to right-click on t-engine.exe and select 'Create Shortcut'. On the created shortcut right-click again and select properties. In the dialog add the following to the Target field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;.../t-engine.exe -MMyModule -udefault -n&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Replacing MyModule with your module name and default with whichever character name you desire. Using this shortcut now will launch your module directly, saving you some time while prototyping.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go back to [[T4 Modules Howto Guide]].&lt;br /&gt;
&lt;br /&gt;
{{Module Guides}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Creating_a_standalone_release&amp;diff=6237</id>
		<title>Creating a standalone release</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Creating_a_standalone_release&amp;diff=6237"/>
				<updated>2013-11-22T17:18:24Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Creating a standalone release allows people to play your game without having to download ToME, download your module, put it in the right place, etc.  It also allows you to customize the boot module (which handles the startup screen and main menu) so that you can come up with something thematically appropriate for your module.&lt;br /&gt;
&lt;br /&gt;
How to create a standalone release and how to create your own boot module:&lt;br /&gt;
* Download http://te4.org/dl/dev/boot-example.zip as a base for the main menu.&lt;br /&gt;
* Remove the boot module from &amp;lt;code&amp;gt;game/engines/default/modules/boot*&amp;lt;/code&amp;gt;&lt;br /&gt;
* Put your new boot module in place.&lt;br /&gt;
* Edit or replace &amp;lt;code&amp;gt;boot/data/gfx/background/&amp;lt;/code&amp;gt; files with your own splash screen.&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;boot/init.lua&amp;lt;/code&amp;gt; to give it a correct name, change the boot screen's startup background, etc.  (This &amp;lt;code&amp;gt;init.lua&amp;lt;/code&amp;gt; uses the same format as the one you created in [[Getting Started]].)&lt;br /&gt;
* Grab ToME's archives, inside replace the boot module by yours and tome module by yours.&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Creating_a_standalone_release&amp;diff=6236</id>
		<title>Creating a standalone release</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Creating_a_standalone_release&amp;diff=6236"/>
				<updated>2013-11-22T17:16:23Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: Created page with &amp;quot;How to create a standalone release (how to create your own boot module): * Download http://te4.org/dl/dev/boot-example.zip as a base for the main menu. * Remove the boot modul...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to create a standalone release (how to create your own boot module):&lt;br /&gt;
* Download http://te4.org/dl/dev/boot-example.zip as a base for the main menu.&lt;br /&gt;
* Remove the boot module from &amp;lt;code&amp;gt;game/engines/default/modules/boot*&amp;lt;/code&amp;gt;&lt;br /&gt;
* Put your new boot module in place.&lt;br /&gt;
* Edit or replace &amp;lt;code&amp;gt;boot/data/gfx/background/&amp;lt;/code&amp;gt; files with your own splash screen.&lt;br /&gt;
* Edit &amp;lt;code&amp;gt;boot/init.lua&amp;lt;/code&amp;gt; to give it a correct name, change the boot screen's startup background, etc.  (This &amp;lt;code&amp;gt;init.lua&amp;lt;/code&amp;gt; uses the same format as the one you created in [[Getting Started]].)&lt;br /&gt;
* Grab ToME's archives, inside replace the boot module by yours and tome module by yours.&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=6235</id>
		<title>T4 Modules Howto Guide</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=6235"/>
				<updated>2013-11-22T17:12:27Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to start making a module for the T-Engine 4:&lt;br /&gt;
----&lt;br /&gt;
*[[Getting Started]]&lt;br /&gt;
*[[Directory Structure]]&lt;br /&gt;
*[[Engine Structure]]&lt;br /&gt;
*[[Player Descriptors]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Talents|Talents]]&lt;br /&gt;
*[[Entities]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Zones|Zones]]&lt;br /&gt;
*[[NPCs]]&lt;br /&gt;
*[[Objects]]&lt;br /&gt;
*[[Inventory Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Traps|Traps]] (not created)&lt;br /&gt;
*[[Dialogs]]&lt;br /&gt;
*[[Character Sheet Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Stores|Stores]] (not created)&lt;br /&gt;
*[[Factions]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Quests|Quests]] (not created)&lt;br /&gt;
*[[Chats]]&lt;br /&gt;
*[[Colors]]&lt;br /&gt;
*[[Frame Buffers]]&lt;br /&gt;
*[[Developing a static map using the Tiled plugin]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Resolvers|Resolvers]] (not created)&lt;br /&gt;
*[[Particle Effects]]&lt;br /&gt;
*[[Uploading a module]]&lt;br /&gt;
*[[Creating a standalone release]]&lt;br /&gt;
{{Module Guides}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Lua&amp;diff=6173</id>
		<title>Lua</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Lua&amp;diff=6173"/>
				<updated>2013-10-02T02:33:59Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Development]]&lt;br /&gt;
&lt;br /&gt;
The language of ToME4.&lt;br /&gt;
&lt;br /&gt;
Some of the documentation for T-Engine 4 can be found here: http://te4.org/docs/t-engine4/1.0.0/index.html&lt;br /&gt;
&lt;br /&gt;
Here are some helpful links to learn Lua:&lt;br /&gt;
&lt;br /&gt;
* [http://luatut.com/crash_course.html &amp;quot;The Crash Course to Lua&amp;quot;], courtesy of The.Lua.Tutorial&lt;br /&gt;
* [http://lua-users.org/wiki/LuaDirectory The lua-users wiki]&lt;br /&gt;
* [http://www.lua.org/manual/5.1/manual.html &amp;lt;i&amp;gt;Lua 5.1 Reference Manual&amp;lt;/i&amp;gt;] (available in print and online)&lt;br /&gt;
* [http://www.lua.org/pil/ &amp;lt;i&amp;gt;Programming in Lua&amp;lt;/i&amp;gt;] (links to both print and online versions; the online version is outdated but still useful)&lt;br /&gt;
* http://lua.gts-stolberg.de/en/index.php (possibly outdated but this is an amazing resource, especially for beginners, I wish I would have known about it two years ago)&lt;br /&gt;
* [http://tylerneylon.com/a/learn-lua/ Learn Lua in 15 Minutes]&lt;br /&gt;
&lt;br /&gt;
When learning Lua, it helps to have a Lua environment to play around in.  [http://repl.it/languages/Lua repl.it] provides an online environment where you can type Lua commands and see their results.&lt;br /&gt;
&lt;br /&gt;
Once you know the basics of Lua you can start looking at the code of ToME4 and try to understand it, making small edits and observing if they do what you expect them to do to further increase your understanding.  &lt;br /&gt;
&lt;br /&gt;
Some comments on the talent code can also be found [http://tometalentcomments.blogspot.com/ on this page].&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=6149</id>
		<title>T4 Modules Howto Guide</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=6149"/>
				<updated>2013-09-28T03:13:44Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to start making a module for the T-Engine 4:&lt;br /&gt;
----&lt;br /&gt;
*[[Getting Started]]&lt;br /&gt;
*[[Directory Structure]]&lt;br /&gt;
*[[Engine Structure]]&lt;br /&gt;
*[[Player Descriptors]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Talents|Talents]]&lt;br /&gt;
*[[Entities]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Zones|Zones]]&lt;br /&gt;
*[[NPCs]]&lt;br /&gt;
*[[Objects]]&lt;br /&gt;
*[[Inventory Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Traps|Traps]] (not created)&lt;br /&gt;
*[[Dialogs]]&lt;br /&gt;
*[[Character Sheet Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Stores|Stores]] (not created)&lt;br /&gt;
*[[Factions]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Quests|Quests]] (not created)&lt;br /&gt;
*[[Chats]]&lt;br /&gt;
*[[Colors]]&lt;br /&gt;
*[[Frame Buffers]]&lt;br /&gt;
*[[Developing a static map using the Tiled plugin]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Resolvers|Resolvers]] (not created)&lt;br /&gt;
*[[Particle Effects]]&lt;br /&gt;
*[[Uploading a module]]&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Colors&amp;diff=6148</id>
		<title>Colors</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Colors&amp;diff=6148"/>
				<updated>2013-09-28T03:13:07Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: Created page with &amp;quot;T-Engine provides a number of predefined colors.  There are two ways to refer to these:  * In your Lua code.  For example: &amp;lt;code&amp;gt;code.DARK_GREEN&amp;lt;/code&amp;gt; * Embedded within strin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;T-Engine provides a number of predefined colors.  There are two ways to refer to these:&lt;br /&gt;
&lt;br /&gt;
* In your Lua code.  For example: &amp;lt;code&amp;gt;code.DARK_GREEN&amp;lt;/code&amp;gt;&lt;br /&gt;
* Embedded within strings (using # signs to mark them).  For example: &amp;lt;code&amp;gt;&amp;quot;Hello, #BLUE#world#LAST#!&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following colors are defined by T-Engine 1.0.4:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Red&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Green&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Blue&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Demo&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;BLACK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #000000; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;WHITE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #ffffff; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;SLATE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;140&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;140&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;140&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #8c8c8c; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;ORANGE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;119&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #ff7700; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;RED&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;201&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #c90000; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;GREEN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;134&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;69&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #008645; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;BLUE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;227&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #0000e3; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;UMBER&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;142&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;69&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #8e4500; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;LIGHT_DARK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;80&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;80&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;80&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #505050; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;LIGHT_SLATE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;209&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;209&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;209&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #d1d1d1; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;VIOLET&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;192&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;175&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #c000af; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;YELLOW&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #ffff00; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;LIGHT_RED&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;104&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #ff0068; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;LIGHT_GREEN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #00ff00; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;LIGHT_BLUE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;81&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;221&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #51ddff; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;LIGHT_UMBER&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;215&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;142&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;69&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #d78e45; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;DARK_UMBER&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;87&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;94&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;37&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #575e25; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;DARK_GREY&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;67&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;67&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;67&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #434343; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;GREY&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;127&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;127&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;127&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #7f7f7f; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;ROYAL_BLUE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;65&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;105&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;225&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #4169e1; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;AQUAMARINE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;127&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;212&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #7fffd4; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;CADET_BLUE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;95&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;158&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;160&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #5f9ea0; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;STEEL_BLUE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;70&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;130&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;180&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #4682b4; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;TEAL&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;128&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;128&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #008080; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;LIGHT_STEEL_BLUE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;176&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;196&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;222&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #b0c4de; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;DARK_BLUE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;147&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #000093; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;ROYAL_BLUE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;108&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #006cff; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;PINK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;192&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;203&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #ffc0cb; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;GOLD&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;215&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #ffd700; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;FIREBRICK&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;178&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;34&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;34&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #b22222; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;DARK_RED&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;100&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #640000; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;VERY_DARK_RED&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #320000; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;CRIMSON&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;220&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;60&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #dc143c; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;MOCCASIN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;228&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;181&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #ffe4b5; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;KHAKI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;240&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;230&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;130&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #f0e682; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;SANDY_BROWN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;244&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;164&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;96&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #f4a460; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;SALMON&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;250&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;128&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;114&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #fa8072; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;DARK_ORCHID&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;153&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;204&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #9932cc; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;ORCHID&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;218&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;112&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;214&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #da70d6; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;PURPLE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;128&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;139&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #80008b; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;CHOCOLATE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;210&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;105&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;30&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #d2691e; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;DARK_KHAKI&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;189&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;183&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;107&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #bdb76b; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;TAN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;210&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;180&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;140&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #d2b48c; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;DARK_TAN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;110&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;80&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;40&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #6e5028; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;HONEYDEW&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;240&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;240&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #f0fff0; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;ANTIQUE_WHITE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;250&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;235&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;215&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #faebd7; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;OLD_LACE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;253&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;245&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;230&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #fdf5e6; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;DARK_SLATE_GRAY&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;47&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;79&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;79&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #2f4f4f; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;OLIVE_DRAB&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;107&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;142&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;35&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #6b8e23; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;DARK_SEA_GREEN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;143&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;188&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;143&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #8fbc8f; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;YELLOW_GREEN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;154&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;205&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #9acd32; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;DARK_GREEN&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;77&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;12&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;span style=&amp;quot;background: #324d0c; border: solid 1px black&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Uploading_a_module&amp;diff=6129</id>
		<title>Uploading a module</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Uploading_a_module&amp;diff=6129"/>
				<updated>2013-09-16T02:23:21Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Once your module is complete, you'll want to upload it to http://te4.org/games so that others can play it.  To do so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Request upload permission from http://te4.org/contact, if you haven't already done so.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to http://te4.org and click the &amp;quot;Create a module&amp;quot; link.  Fill out the form there; most of the information here can come straight out of your [[Getting_Started#init.lua|init.lua]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Zip your module up into a &amp;lt;code&amp;gt;.team&amp;lt;/code&amp;gt; file.  A &amp;lt;code&amp;gt;.team&amp;lt;/code&amp;gt; file is simply a zip file, renamed to have a &amp;lt;code&amp;gt;.team&amp;lt;/code&amp;gt; extension.  The &amp;lt;code&amp;gt;.team&amp;lt;/code&amp;gt; file's layout is slightly different than the normal [[Directory_Structure|module directory structure]]; the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; subdirectory remains unchanged, while everything else is placed in a &amp;lt;code&amp;gt;mod&amp;lt;/code&amp;gt; subdirectory.  (You'll probably also want to exclude any development documentation, .gitignore files, scripts, etc.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get the MD5 checksum for your module.  To do so, start ToME, load your newly zipped module, then exit.  Check &amp;lt;code&amp;gt;te4_log.txt&amp;lt;/code&amp;gt; for a line similar to the following:&lt;br /&gt;
  &amp;lt;pre&amp;gt;[MODULE LOADER] module MD5 1234567890abcdef1234567890abcdef&amp;lt;/pre&amp;gt;&lt;br /&gt;
  In this example, &amp;quot;1234567890abcdef1234567890abcdef&amp;quot; is the checksum.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to http://te4.org and click the &amp;quot;Upload a module&amp;quot; link.  Under &amp;quot;File:&amp;quot;, select your &amp;lt;code&amp;gt;.team&amp;lt;/code&amp;gt; file and click Upload.  Fill out the rest of the page and click Save.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to http://te4.org/games and bask in the pleasure of seeing it listed alongside the other T-Engine4 games.  Dream about it becoming the next smash hit.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A script to automate creating the .team file and calculating the MD5 checksum is available at https://github.com/joshkel/qdz/blob/master/dev/release.py.  Although it was written for another T-Engine module, it should work with any module.  Just run it from the command line with the path to your module directory as a command-line parameter.  (You'll need to have Python 2.7 or 3 installed.)&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Uploading_a_module&amp;diff=6128</id>
		<title>Uploading a module</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Uploading_a_module&amp;diff=6128"/>
				<updated>2013-09-16T02:21:32Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: Created page with &amp;quot;Once your module is complete, you'll want to upload it to http://te4.org/games so that others can play it.  To do so:  &amp;lt;ol&amp;gt; &amp;lt;li&amp;gt;Request upload permission from http://te4.org/c...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Once your module is complete, you'll want to upload it to http://te4.org/games so that others can play it.  To do so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Request upload permission from http://te4.org/contact, if you haven't already done so.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to http://te4.org and click the &amp;quot;Create a module&amp;quot; link.  Fill out the form there; most of the information here can come straight out of your [[Getting_Started#init.lua|init.lua]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Zip your module up into a &amp;lt;code&amp;gt;.team&amp;lt;/code&amp;gt; file.  A &amp;lt;code&amp;gt;.team&amp;lt;/code&amp;gt; file is simply a zip file, renamed to have a &amp;lt;code&amp;gt;.team&amp;lt;/code&amp;gt; extension.  The &amp;lt;code&amp;gt;.team&amp;lt;/code&amp;gt; file's layout is slightly different than the normal [[Directory_Structure|module directory structure]]; the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; subdirectory remains unchanged, while everything else is placed in a &amp;lt;code&amp;gt;mod&amp;lt;/code&amp;gt; subdirectory.  (You'll probably also want to exclude any development documentation, .gitignore files, scripts, etc.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Get the MD5 checksum for your module.  To do so, start ToME, load your newly zipped module, then exit.  Check &amp;lt;code&amp;gt;te4_log.txt&amp;lt;/code&amp;gt; for a line similar to the following:&lt;br /&gt;
  &amp;lt;pre&amp;gt;[MODULE LOADER] module MD5 1234567890abcdef1234567890abcdef&amp;lt;/pre&amp;gt;&lt;br /&gt;
  In this example, &amp;quot;1234567890abcdef1234567890abcdef&amp;quot; is the checksum.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to http://te4.org and click the &amp;quot;Upload a module&amp;quot; link.  Under &amp;quot;File:&amp;quot;, select your &amp;lt;code&amp;gt;.team&amp;lt;/code&amp;gt; file and click Upload.  Fill out the rest of the page and click Save.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Go to http://te4.org/games and bask in the pleasure of seeing it listed alongside the other T-Engine4 games.  Dream about it becoming the next smash hit.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=6127</id>
		<title>T4 Modules Howto Guide</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=6127"/>
				<updated>2013-09-16T02:00:59Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to start making a module for the T-Engine 4:&lt;br /&gt;
----&lt;br /&gt;
*[[Getting Started]]&lt;br /&gt;
*[[Directory Structure]]&lt;br /&gt;
*[[Engine Structure]]&lt;br /&gt;
*[[Player Descriptors]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Talents|Talents]]&lt;br /&gt;
*[[Entities]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Zones|Zones]]&lt;br /&gt;
*[[NPCs]]&lt;br /&gt;
*[[Objects]]&lt;br /&gt;
*[[Inventory Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Traps|Traps]] (not created)&lt;br /&gt;
*[[Dialogs]]&lt;br /&gt;
*[[Character Sheet Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Stores|Stores]] (not created)&lt;br /&gt;
*[[Factions]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Quests|Quests]] (not created)&lt;br /&gt;
*[[Chats]]&lt;br /&gt;
*[[Frame Buffers]]&lt;br /&gt;
*[[Developing a static map using the Tiled plugin]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Resolvers|Resolvers]] (not created)&lt;br /&gt;
*[[Particle Effects]]&lt;br /&gt;
*[[Uploading a module]]&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Particle_Effects&amp;diff=6090</id>
		<title>Particle Effects</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Particle_Effects&amp;diff=6090"/>
				<updated>2013-08-26T02:51:44Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Particle effects can be used to add pizzazz to your game.  There are two parts to adding particles: invoking the particles from your main Lua code and actually defining them.  We'll cover invoking particle effects first, since it's considerably simpler, and you'll want to be able to invoke your new effects to test them out and tune their parameters.&lt;br /&gt;
&lt;br /&gt;
= Invoking Particles =&lt;br /&gt;
&lt;br /&gt;
Assuming your particle effect is named &amp;quot;my_particle.lua&amp;quot; (see [[#Defining Particles|below]]), there are a few main options for invoking it.  (Other alternatives also exist for more specialized circumstances.)&lt;br /&gt;
&lt;br /&gt;
== On the map ==&lt;br /&gt;
&lt;br /&gt;
The [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Map.html#_M:particleEmitter Map.particleEmitter function] can add a particle effect to the map.  For example, if a talent should display an effect centered on the user, add the following code to your talent's &amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt; function:&lt;br /&gt;
&lt;br /&gt;
    game.level.map:particleEmitter(self.x, self.y, 1, &amp;quot;my_particle&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Make sure that your particle effect limits how many particles it generates; otherwise, it can run forever.&lt;br /&gt;
&lt;br /&gt;
== On an entity ==&lt;br /&gt;
&lt;br /&gt;
A long-lasting particle effect can be added to an entity with [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Entity.html#_M:addParticles Entity.addParticles] and removed with [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Entity.html#_M:removeParticles Entity.removeParticles].  For example, to associate a particle effect with a status condition, add the following to the appropriate &amp;lt;code&amp;gt;newEffect&amp;lt;/code&amp;gt; block in your &amp;lt;code&amp;gt;timed_effects.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
    activate = function(self, eff)&lt;br /&gt;
        eff.particle = self:addParticles(Particles.new(&amp;quot;my_particle&amp;quot;, 1))&lt;br /&gt;
    end,&lt;br /&gt;
    deactivate = function(self, eff)&lt;br /&gt;
        self:removeParticles(eff.particle)&lt;br /&gt;
    end,&lt;br /&gt;
&lt;br /&gt;
== As a projectile ==&lt;br /&gt;
&lt;br /&gt;
See [http://te4.org/docs/t-engine4/1.0.0/modules/engine.interface.ActorProject.html ActorProject].  Specifically:&lt;br /&gt;
&lt;br /&gt;
* To add a particle effect when the projectile hits, pass &amp;lt;code&amp;gt;{type=&amp;quot;my_particle&amp;quot;}&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;particles&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;project&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;projectile&amp;lt;/code&amp;gt;.&lt;br /&gt;
* To add a particle effect for the projectile itself, add a &amp;lt;code&amp;gt;display={particle=&amp;quot;my_particle&amp;quot;}&amp;lt;/code&amp;gt; entry in the table that you pass for the &amp;lt;code&amp;gt;t&amp;lt;/code&amp;gt; parameter.  (This table will often come from a talent's &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; function.)&lt;br /&gt;
&lt;br /&gt;
== Testing your particle effects ==&lt;br /&gt;
&lt;br /&gt;
Note that particle effects files are loaded ''every time'' they're invoked.  This makes it very easy to test your particles: make up a talent that invokes the particles, give it no resource cost and no cooldown, and invoke it as much as you want as you tweak the particle parameters.&lt;br /&gt;
&lt;br /&gt;
= Defining Particles =&lt;br /&gt;
&lt;br /&gt;
To define a new particle effect, create a Lua file under your module's &amp;lt;code&amp;gt;data/gfx/particles&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ToME source code has a huge set of existing particle effects under [http://git.net-core.org/darkgod/t-engine4/tree/master/game/modules/tome/data/gfx/particles game/modules/tome/data/gfx/particles], so you can look there to see how particular effects are implemented.&lt;br /&gt;
&lt;br /&gt;
== Basic concepts ==&lt;br /&gt;
&lt;br /&gt;
Particle effects are processed at 30 frames per second (regardless of the T-Engine's actual frame rate).&lt;br /&gt;
&lt;br /&gt;
A particle effect is a fragment of Lua code that returns the following:&lt;br /&gt;
&lt;br /&gt;
# A table of [[#parameters|parameters]] for each particle.  This table can define parameters directly, or it can contain a &amp;lt;code&amp;gt;generator&amp;lt;/code&amp;gt; function that returns a table of parameters each time it's invoked.&lt;br /&gt;
# An emitter function.  This function is called every frame (i.e., 30 times a second).  Its main job is to call &amp;lt;code&amp;gt;self:ps:emit(N)&amp;lt;/code&amp;gt; (where N is the number of particles to generate for that frame) as appropriate.&lt;br /&gt;
# (Optional) A number giving the maximum number of particles that the system will handle for this particle effect.  Setting this too high will slightly hurt performance.&lt;br /&gt;
# (Optional) A string giving an image filename (minus extension) to load and use in place of the standard dot or spherical image.&lt;br /&gt;
# (Optional) A boolean that can be set to cause the particle system to not be automatically deleted when no more particles exist.  Use with care.&lt;br /&gt;
&lt;br /&gt;
Under normal conditions, a particle system will be automatically deleted when no more particles exist.  The emitter function often limits itself to only running a certain number of times to ensure that particle systems don't go on forever.&lt;br /&gt;
&lt;br /&gt;
Some basic trigonometry may be helpful to convert between x, y coordinates and angles on a circle.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Particle effect code can return a table of parameters directly for use with the T-Engine's simple generator, or it can return a generator function.&lt;br /&gt;
&lt;br /&gt;
=== Simple generator ===&lt;br /&gt;
&lt;br /&gt;
A table for use with the simple generator might look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
    base = 1000,&lt;br /&gt;
        &lt;br /&gt;
    angle = { 0, 360 }, anglev = { 2000, 4000 }, anglea = { 200, 600 },&lt;br /&gt;
        &lt;br /&gt;
    life = { 5, 10 },&lt;br /&gt;
    size = { 3, 6 }, sizev = {0, 0}, sizea = {0, 0},&lt;br /&gt;
        &lt;br /&gt;
    r = {0, 0}, rv = {0, 0}, ra = {0, 0},&lt;br /&gt;
    g = {80, 200}, gv = {0, 10}, ga = {0, 0},&lt;br /&gt;
    b = {0, 0}, bv = {0, 0}, ba = {0, 0},&lt;br /&gt;
    a = {255, 255}, av = {0, 0}, aa = {0, 0},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that each value is given as a pair of numbers; these give the minimum and maximum values for the RNG to randomly generate each particle.  Also note that colors (r, g, b, and a) range from 0 to 255.  Only integers are permitted.&lt;br /&gt;
&lt;br /&gt;
The simple generator is fairly restrictive; it's only really suitable for particles moving outwards from a central point.&lt;br /&gt;
&lt;br /&gt;
=== Generator function ===&lt;br /&gt;
&lt;br /&gt;
The same particle effect expressed as a generator function would look like this: (UNTESTED)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return { generator = function()&lt;br /&gt;
    return {&lt;br /&gt;
        trail = 0,&lt;br /&gt;
&lt;br /&gt;
        life = rng.range(5, 10),&lt;br /&gt;
        size = rng.range(3, 6), sizev = 0, sizea = 0,&lt;br /&gt;
&lt;br /&gt;
        x = 0, xv = 0, xa = 0,&lt;br /&gt;
        y = 0, yv = 0, ya = 0,&lt;br /&gt;
        dir = math.rad(rng.range(0, 360)), dirv = 0, dira = 0,&lt;br /&gt;
        vel = rng.range(2, 4), velv = rng.range(0.2, 0.6), vela = 0,&lt;br /&gt;
&lt;br /&gt;
        r = 0, rv = 0, ra = 0,&lt;br /&gt;
        g = rng.range(80, 200)/255, gv = rng.range(0, 10)/255, ga = 0,&lt;br /&gt;
        b = 0, bv = 0, ba = 0,&lt;br /&gt;
        a = 1, av = 0, aa = 0&lt;br /&gt;
    }&lt;br /&gt;
end }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The generator function invokes the RNG itself and returns floating point numbers.&lt;br /&gt;
&lt;br /&gt;
=== Parameter values ===&lt;br /&gt;
&lt;br /&gt;
Several parameters have ...v and ...a values.  These give velocity and acceleration for that value.  Each frame, velocity is added to the base value, then acceleration is added to velocity (causing velocity to change for future frames).  For example:&lt;br /&gt;
&lt;br /&gt;
    r = 1, rv = -0.1, ra = 0&lt;br /&gt;
    g = 0, gv = 0, ga = 0,&lt;br /&gt;
    b = 0, bv = 0, ba = 0&lt;br /&gt;
&lt;br /&gt;
starts out solid red and fades to black over 10 frames.&lt;br /&gt;
&lt;br /&gt;
As another example:&lt;br /&gt;
&lt;br /&gt;
    y = 0, yv = 0, ya = -0.4&lt;br /&gt;
&lt;br /&gt;
creates a particle that is initially motionless but starts moving up faster and faster.&lt;br /&gt;
&lt;br /&gt;
Details on values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''General settings'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;life&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Number of frames for which the particle will exist&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;size, sizev, sizea&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Size of the particle&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Simple generator only'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;base&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;All velocity and acceleration values are divided by this before being processed (since the default generator can't take fractional values directly).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;angle, anglev, anglea&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Angle along which the particle should move, in degrees, and velocity and acceleration at which it should move along that angle.  Generator functions can use dir and vel for a similar effect.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Generator function only'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;trail&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Used to draw trails from one particle to another.  trail is 0-based, unlike most values in T-Engine.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;x, xv, xa&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;x coordinate, relative to the center of the particle system&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;y, yv, ry&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;y coordinate, relative to the center of the particle system&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;dir, dirv, dira&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Angle along which the particle should move, in radians.  dirv and dira give the rate at which that angle should change.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;vel, velv, vela&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Velocity to move along the angle given by dir, and the &amp;quot;velocity of velocity&amp;quot; (i.e., acceleration) and the &amp;quot;acceleration of velocity.&amp;quot;  Movement can be done via xv, xa, yv, ya or dir, vel (or both at the same time).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Color'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;r, rv, ra&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Red component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;g, gv, ga&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Green component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;b, bv, ba&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Blue component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;a, av, aa&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Alpha component.  255 (for the simple generator) or 1 (for a generator function) means fully opaque, 0 means fully transparent.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Particle_Effects&amp;diff=6089</id>
		<title>Particle Effects</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Particle_Effects&amp;diff=6089"/>
				<updated>2013-08-26T01:48:16Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Particle effects can be used to add pizzazz to your game.  There are two parts to adding particles: invoking the particles from your main Lua code and actually defining them.  We'll cover invoking particle effects first, since it's considerably simpler, and you'll want to be able to invoke your new effects to test them out and tune their parameters.&lt;br /&gt;
&lt;br /&gt;
= Invoking Particles =&lt;br /&gt;
&lt;br /&gt;
Assuming your particle effect is named &amp;quot;my_particle.lua&amp;quot; (see [[#Defining Particles|below]], there are a few main options for invoking it.  (Other alternatives also exist for more specialized circumstances.)&lt;br /&gt;
&lt;br /&gt;
== On the map ==&lt;br /&gt;
&lt;br /&gt;
The [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Map.html#_M:particleEmitter Map.particleEmitter function] can add a particle effect to the map.  For example, if a talent should display an effect centered on the user, add the following code to your talent's &amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt; function:&lt;br /&gt;
&lt;br /&gt;
    game.level.map:particleEmitter(self.x, self.y, 1, &amp;quot;my_particle&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Make sure that your particle effect limits how many particles it generates; otherwise, it can run forever.&lt;br /&gt;
&lt;br /&gt;
== On an entity ==&lt;br /&gt;
&lt;br /&gt;
A long-lasting particle effect can be added to an entity with [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Entity.html#_M:addParticles Entity.addParticles] and removed with [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Entity.html#_M:removeParticles Entity.removeParticles].  For example, to associate a particle effect with a status condition, add the following to the appropriate &amp;lt;code&amp;gt;newEffect&amp;lt;/code&amp;gt; block in your &amp;lt;code&amp;gt;timed_effects.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
    activate = function(self, eff)&lt;br /&gt;
        eff.particle = self:addParticles(Particles.new(&amp;quot;my_particle&amp;quot;, 1))&lt;br /&gt;
    end,&lt;br /&gt;
    deactivate = function(self, eff)&lt;br /&gt;
        self:removeParticles(eff.particle)&lt;br /&gt;
    end,&lt;br /&gt;
&lt;br /&gt;
== As a projectile ==&lt;br /&gt;
&lt;br /&gt;
See [http://te4.org/docs/t-engine4/1.0.0/modules/engine.interface.ActorProject.html ActorProject].&lt;br /&gt;
&lt;br /&gt;
== Testing your particle effects ==&lt;br /&gt;
&lt;br /&gt;
Note that particle effects files are loaded ''every time'' they're invoked.  This makes it very easy to test your particles: make up a talent that invokes the particles, give it no resource cost and no cooldown, and invoke it as much as you want as you tweak the particle parameters.&lt;br /&gt;
&lt;br /&gt;
= Defining Particles =&lt;br /&gt;
&lt;br /&gt;
To define a new particle effect, create a Lua file under your module's &amp;lt;code&amp;gt;data/gfx/particles&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ToME source code has a huge set of existing particle effects under [http://git.net-core.org/darkgod/t-engine4/tree/master/game/modules/tome/data/gfx/particles game/modules/tome/data/gfx/particles], so you can look there to see how particular effects are implemented.&lt;br /&gt;
&lt;br /&gt;
== Basic concepts ==&lt;br /&gt;
&lt;br /&gt;
Particle effects are processed at 30 frames per second (regardless of the T-Engine's actual frame rate).&lt;br /&gt;
&lt;br /&gt;
A particle effect is a fragment of Lua code that returns the following:&lt;br /&gt;
&lt;br /&gt;
# A table of [[#parameters|parameters]] for each particle.  This table can define parameters directly, or it can contain a &amp;lt;code&amp;gt;generator&amp;lt;/code&amp;gt; function that returns a table of parameters each time it's invoked.&lt;br /&gt;
# An emitter function.  This function is called every frame (i.e., 30 times a second).  Its main job is to call &amp;lt;code&amp;gt;self:ps:emit(N)&amp;lt;/code&amp;gt; (where N is the number of particles to generate for that frame) as appropriate.&lt;br /&gt;
# (Optional) A number giving the maximum number of particles that the system will handle for this particle effect.  Setting this too high will slightly hurt performance.&lt;br /&gt;
# (Optional) A string giving an image filename (minus extension) to load and use in place of the standard dot or spherical image.&lt;br /&gt;
# (Optional) A boolean that can be set to cause the particle system to not be automatically deleted when no more particles exist.  Use with care.&lt;br /&gt;
&lt;br /&gt;
Under normal conditions, a particle system will be automatically deleted when no more particles exist.  The emitter function often limits itself to only running a certain number of times to ensure that particle systems don't go on forever.&lt;br /&gt;
&lt;br /&gt;
Some basic trigonometry may be helpful to convert between x, y coordinates and angles on a circle.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Particle effect code can return a table of parameters directly for use with the T-Engine's simple generator, or it can return a generator function.&lt;br /&gt;
&lt;br /&gt;
=== Simple generator ===&lt;br /&gt;
&lt;br /&gt;
A table for use with the simple generator might look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
    base = 1000,&lt;br /&gt;
        &lt;br /&gt;
    angle = { 0, 360 }, anglev = { 2000, 4000 }, anglea = { 200, 600 },&lt;br /&gt;
        &lt;br /&gt;
    life = { 5, 10 },&lt;br /&gt;
    size = { 3, 6 }, sizev = {0, 0}, sizea = {0, 0},&lt;br /&gt;
        &lt;br /&gt;
    r = {0, 0}, rv = {0, 0}, ra = {0, 0},&lt;br /&gt;
    g = {80, 200}, gv = {0, 10}, ga = {0, 0},&lt;br /&gt;
    b = {0, 0}, bv = {0, 0}, ba = {0, 0},&lt;br /&gt;
    a = {255, 255}, av = {0, 0}, aa = {0, 0},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that each value is given as a pair of numbers; these give the minimum and maximum values for the RNG to randomly generate each particle.  Also note that colors (r, g, b, and a) range from 0 to 255.  Only integers are permitted.&lt;br /&gt;
&lt;br /&gt;
The simple generator is fairly restrictive; it's only really suitable for particles moving outwards from a central point.&lt;br /&gt;
&lt;br /&gt;
=== Generator function ===&lt;br /&gt;
&lt;br /&gt;
The same particle effect expressed as a generator function would look like this: (UNTESTED)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return { generator = function()&lt;br /&gt;
    return {&lt;br /&gt;
        trail = 0,&lt;br /&gt;
&lt;br /&gt;
        life = rng.range(5, 10),&lt;br /&gt;
        size = rng.range(3, 6), sizev = 0, sizea = 0,&lt;br /&gt;
&lt;br /&gt;
        x = 0, xv = 0, xa = 0,&lt;br /&gt;
        y = 0, yv = 0, ya = 0,&lt;br /&gt;
        dir = math.rad(rng.range(0, 360)), dirv = 0, dira = 0,&lt;br /&gt;
        vel = rng.range(2, 4), velv = rng.range(0.2, 0.6), vela = 0,&lt;br /&gt;
&lt;br /&gt;
        r = 0, rv = 0, ra = 0,&lt;br /&gt;
        g = rng.range(80, 200)/255, gv = rng.range(0, 10)/255, ga = 0,&lt;br /&gt;
        b = 0, bv = 0, ba = 0,&lt;br /&gt;
        a = 1, av = 0, aa = 0&lt;br /&gt;
    }&lt;br /&gt;
end }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The generator function invokes the RNG itself and returns floating point numbers.&lt;br /&gt;
&lt;br /&gt;
=== Parameter values ===&lt;br /&gt;
&lt;br /&gt;
Several parameters have ...v and ...a values.  These give velocity and acceleration for that value.  Each frame, velocity is added to the base value, then acceleration is added to velocity (causing velocity to change for future frames).  For example:&lt;br /&gt;
&lt;br /&gt;
    r = 1, rv = -0.1, ra = 0&lt;br /&gt;
    g = 0, gv = 0, ga = 0,&lt;br /&gt;
    b = 0, bv = 0, ba = 0&lt;br /&gt;
&lt;br /&gt;
starts out solid red and fades to black over 10 frames.&lt;br /&gt;
&lt;br /&gt;
As another example:&lt;br /&gt;
&lt;br /&gt;
    y = 0, yv = 0, ya = -0.4&lt;br /&gt;
&lt;br /&gt;
creates a particle that is initially motionless but starts moving up faster and faster.&lt;br /&gt;
&lt;br /&gt;
Details on values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''General settings'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;life&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Number of frames for which the particle will exist&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;size, sizev, sizea&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Size of the particle&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Simple generator only'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;base&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;All velocity and acceleration values are divided by this before being processed (since the default generator can't take fractional values directly).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;angle, anglev, anglea&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Angle along which the particle should move, in degrees, and velocity and acceleration at which it should move along that angle.  Generator functions can use dir and vel for a similar effect.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Generator function only'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;trail&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Used to draw trails from one particle to another.  trail is 0-based, unlike most values in T-Engine.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;x, xv, xa&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;x coordinate, relative to the center of the particle system&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;y, yv, ry&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;y coordinate, relative to the center of the particle system&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;dir, dirv, dira&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Angle along which the particle should move, in radians.  dirv and dira give the rate at which that angle should change.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;vel, velv, vela&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Velocity to move along the angle given by dir, and the &amp;quot;velocity of velocity&amp;quot; (i.e., acceleration) and the &amp;quot;acceleration of velocity.&amp;quot;  Movement can be done via xv, xa, yv, ya or dir, vel (or both at the same time).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Color'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;r, rv, ra&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Red component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;g, gv, ga&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Green component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;b, bv, ba&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Blue component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;a, av, aa&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Alpha component.  255 (for the simple generator) or 1 (for a generator function) means fully opaque, 0 means fully transparent.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Command_Line_Arguments&amp;diff=6053</id>
		<title>Command Line Arguments</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Command_Line_Arguments&amp;diff=6053"/>
				<updated>2013-08-21T03:12:41Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;lt;code&amp;gt;t-engine&amp;lt;/code&amp;gt; executable supports several command-line arguments.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Argument !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| -M''module'' || Automatically load and run ''module'' instead of going to the boot menu&lt;br /&gt;
|-&lt;br /&gt;
| -u''name'' || Use ''name'' for the character name instead of prompting, and either load that character's saved game or create a new game with that name.&lt;br /&gt;
|-&lt;br /&gt;
| -n || Force creating a new game, overwriting any previous saved game for the given character name&lt;br /&gt;
|-&lt;br /&gt;
| -E''args'' || Passes extra arguments to the game module (?)&lt;br /&gt;
|-&lt;br /&gt;
| --xpos ''x'' || Create the game window at the given X coordinate &lt;br /&gt;
|-&lt;br /&gt;
| --ypos ''y'' || Create the game window at the given Y coordinate&lt;br /&gt;
|-&lt;br /&gt;
| --flush-stdout || Write to &amp;lt;code&amp;gt;te4_log.txt&amp;lt;/code&amp;gt; immediately instead of buffering output.  This facilitates debugging but can slow T-Engine4 down.&lt;br /&gt;
|-&lt;br /&gt;
| --no-debug || Disables most output to &amp;lt;code&amp;gt;te4_log.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| --safe-mode || Disables many graphical effects and reverts to minimal screen size and graphics settings&lt;br /&gt;
|-&lt;br /&gt;
| --home ''path'' || Use the given directory instead of your default operating system home directory.  T-Engine's settings and saved games will be saved in a subdirectory under this home directory, as described [[Debugging#Updating_your_configuration|here]].  For example, this can be used to set up a separate directory for developing modules, with cheat enabled and with less &amp;quot;stuff&amp;quot; so it loads faster, without interfering with your regular ToME saved games.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Command_Line_Arguments&amp;diff=6052</id>
		<title>Command Line Arguments</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Command_Line_Arguments&amp;diff=6052"/>
				<updated>2013-08-21T03:10:19Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: Created page with &amp;quot;The t-engine executable supports several command-line arguments.  {| class=&amp;quot;wikitable&amp;quot; ! Argument !! Effect |- | -M''module'' || Automatically load and run ''module'' instead ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The t-engine executable supports several command-line arguments.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Argument !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| -M''module'' || Automatically load and run ''module'' instead of going to the boot menu&lt;br /&gt;
|-&lt;br /&gt;
| -u''name'' || Use ''name'' for the character name instead of prompting, and either load that character's saved game or create a new game with that name.&lt;br /&gt;
|-&lt;br /&gt;
| -n || Force creating a new game, overwriting any previous saved game for the given character name&lt;br /&gt;
|-&lt;br /&gt;
| -E''args'' || Passes extra arguments to the game module (?)&lt;br /&gt;
|-&lt;br /&gt;
| --xpos ''x'' || Create the game window at the given X coordinate &lt;br /&gt;
|-&lt;br /&gt;
| --ypos ''y'' || Create the game window at the given Y coordinate&lt;br /&gt;
|-&lt;br /&gt;
| --flush-stdout || Write to &amp;lt;code&amp;gt;te4_log.txt&amp;lt;/code&amp;gt; immediately instead of buffering output.  This facilitates debugging but can slow T-Engine4 down.&lt;br /&gt;
|-&lt;br /&gt;
| --no-debug || Disables most output to &amp;lt;code&amp;gt;te4_log.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| --safe-mode || Disables many graphical effects and reverts to minimal screen size and graphics settings&lt;br /&gt;
|-&lt;br /&gt;
| --home ''path'' || Use the given directory instead of your default operating system home directory.  T-Engine's settings and saved games will be saved in a subdirectory under this home direcotry, as described [[Debugging#Updating_your_configuration|here]].&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Tales_of_Maj%27Eyal_Wiki&amp;diff=6051</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=6051"/>
				<updated>2013-08-21T02:51:38Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &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.0. 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;
** [[Resources_for_Addons_and_Modules|Addon Resources]]&lt;br /&gt;
* [[Modules]]&lt;br /&gt;
** [[T4 Modules Howto Guide|Create module how to 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>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=6026</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=6026"/>
				<updated>2013-08-07T01:08:02Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &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;
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>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Particle_Effects&amp;diff=5942</id>
		<title>Particle Effects</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Particle_Effects&amp;diff=5942"/>
				<updated>2013-07-19T03:24:27Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: Created page with &amp;quot;Particle effects can be used to add pizzazz to your game.  There are two parts to adding particles: invoking the particles from your main Lua code and actually defining them. ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Particle effects can be used to add pizzazz to your game.  There are two parts to adding particles: invoking the particles from your main Lua code and actually defining them.  We'll cover invoking particle effects first, since it's considerably simpler, and you'll want to be able to invoke your new effects to test them out and tune their parameters.&lt;br /&gt;
&lt;br /&gt;
= Invoking Particles =&lt;br /&gt;
&lt;br /&gt;
Assuming your particle effect is named &amp;quot;my_particle.lua&amp;quot; (see [[#Defining Particles|below]], there are a few main options for invoking it.  (Other alternatives also exist for more specialized circumstances.)&lt;br /&gt;
&lt;br /&gt;
== On the map ==&lt;br /&gt;
&lt;br /&gt;
The [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Map.html#_M:particleEmitter Map.particleEmitter function] can add a particle effect to the map.  For example, if a talent should display an effect centered on the user, add the following code to your talent's &amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt; function:&lt;br /&gt;
&lt;br /&gt;
    game.level.map:particleEmitter(self.x, self.y, 1, &amp;quot;my_particle&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Make sure that your particle effect limits how many particles it generates; otherwise, it can run forever.&lt;br /&gt;
&lt;br /&gt;
== On an entity ==&lt;br /&gt;
&lt;br /&gt;
A long-lasting particle effect can be added to an entity with [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Entity.html#_M:addParticles Entity.addParticles] and removed with [http://te4.org/docs/t-engine4/1.0.0/modules/engine.Entity.html#_M:removeParticles Entity.removeParticles].  For example, to associate a particle effect with a status condition, add the following to the appropriate &amp;lt;code&amp;gt;newEffect&amp;lt;/code&amp;gt; block in your &amp;lt;code&amp;gt;timed_effects.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
    activate = function(self, eff)&lt;br /&gt;
        eff.particle = self:addParticles(Particles.new(&amp;quot;my_particle&amp;quot;, 1))&lt;br /&gt;
    end,&lt;br /&gt;
    deactivate = function(self, eff)&lt;br /&gt;
        self:removeParticles(eff.particle)&lt;br /&gt;
    end,&lt;br /&gt;
&lt;br /&gt;
== As a projectile ==&lt;br /&gt;
&lt;br /&gt;
See [http://te4.org/docs/t-engine4/1.0.0/modules/engine.interface.ActorProject.html ActorProject].&lt;br /&gt;
&lt;br /&gt;
== Testing your particle effects ==&lt;br /&gt;
&lt;br /&gt;
Note that particle effects files are loaded ''every time'' they're invoked.  This makes it very easy to test your particles: make up a talent that invokes the particles, give it no resource cost and no cooldown, and invoke it as much as you want as you tweak the particle parameters.&lt;br /&gt;
&lt;br /&gt;
= Defining Particles =&lt;br /&gt;
&lt;br /&gt;
To define a new particle effect, create a Lua file under your module's &amp;lt;code&amp;gt;data/gfx/particles&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ToME source code has a huge set of existing particle effects under [http://git.net-core.org/darkgod/t-engine4/tree/master/game/modules/tome/data/gfx/particles game/modules/tome/data/gfx/particles], so you can look there to see how particular effects are implemented.&lt;br /&gt;
&lt;br /&gt;
== Basic concepts ==&lt;br /&gt;
&lt;br /&gt;
Particle effects are processed at 30 frames per second (regardless of the T-Engine's actual frame rate).&lt;br /&gt;
&lt;br /&gt;
A particle effect is a fragment of Lua code that returns the following:&lt;br /&gt;
&lt;br /&gt;
# A table of [[#parameters|parameters]] for each particle.  This table can define parameters directly, or it can contain a &amp;lt;code&amp;gt;generator&amp;lt;/code&amp;gt; function that returns a table of parameters each time it's invoked.&lt;br /&gt;
# An emitter function.  This function is called every frame (i.e., 30 times a second).  Its main job is to call &amp;lt;code&amp;gt;self:ps:emit(N)&amp;lt;/code&amp;gt; (where N is the number of particles to generate for that frame) as appropriate.&lt;br /&gt;
# (Optional) A number giving the maximum number of particles that the system will handle for this particle effect.  Setting this too high will slightly hurt performance.&lt;br /&gt;
# (Optional) A string giving an image filename (minus extension) to load and use in place of the standard dot or spherical image.&lt;br /&gt;
# (Optional) A boolean that can be set to cause the particle system to not be automatically deleted when no more particles exist.  Use with care.&lt;br /&gt;
&lt;br /&gt;
Under normal conditions, a particle system will be automatically deleted when no more particles exist.  The emitter function often limits itself to only running a certain number of times to ensure that particle systems don't go on forever.&lt;br /&gt;
&lt;br /&gt;
Some basic trigonometry may be helpful to convert between x, y coordinates and angles on a circle.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Particle effect code can return a table of parameters directly for use with the T-Engine's simple generator, or it can return a generator function.&lt;br /&gt;
&lt;br /&gt;
=== Simple generator ===&lt;br /&gt;
&lt;br /&gt;
A table for use with the simple generator might look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
    base = 1000,&lt;br /&gt;
        &lt;br /&gt;
    angle = { 0, 360 }, anglev = { 2000, 4000 }, anglea = { 200, 600 },&lt;br /&gt;
        &lt;br /&gt;
    life = { 5, 10 },&lt;br /&gt;
    size = { 3, 6 }, sizev = {0, 0}, sizea = {0, 0},&lt;br /&gt;
        &lt;br /&gt;
    r = {0, 0}, rv = {0, 0}, ra = {0, 0},&lt;br /&gt;
    g = {80, 200}, gv = {0, 10}, ga = {0, 0},&lt;br /&gt;
    b = {0, 0}, bv = {0, 0}, ba = {0, 0},&lt;br /&gt;
    a = {255, 255}, av = {0, 0}, aa = {0, 0},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that each value is given as a pair of numbers; these give the minimum and maximum values for the RNG to randomly generate each particle.  Also note that colors (r, g, b, and a) range from 0 to 255.  Only integers are permitted.&lt;br /&gt;
&lt;br /&gt;
The simple generator is fairly restrictive; it's only really suitable for particles moving outwards from a central point.&lt;br /&gt;
&lt;br /&gt;
=== Generator function ===&lt;br /&gt;
&lt;br /&gt;
The same particle effect expressed as a generator function would look like this: (UNTESTED)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return { generator = function()&lt;br /&gt;
    return {&lt;br /&gt;
        trail = 0,&lt;br /&gt;
&lt;br /&gt;
        life = rng.range(5, 10),&lt;br /&gt;
        size = rng.range(3, 6), sizev = 0, sizea = 0,&lt;br /&gt;
&lt;br /&gt;
        x = 0, xv = 0, xa = 0,&lt;br /&gt;
        y = 0, yv = 0, ya = 0,&lt;br /&gt;
        dir = math.rad(rng.range(0, 360)), dirv = 0, dira = 0,&lt;br /&gt;
        vel = rng.range(2, 4), velv = rng.range(0.2, 0.6), vela = 0,&lt;br /&gt;
&lt;br /&gt;
        r = 0, rv = 0, ra = 0,&lt;br /&gt;
        g = rng.range(80, 200)/255, gv = rng.range(0, 10)/255, ga = 0,&lt;br /&gt;
        b = 0, bv = 0, ba = 0,&lt;br /&gt;
        a = 1, av = 0, aa = 0&lt;br /&gt;
    }&lt;br /&gt;
end }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The generator function invokes the RNG itself and returns floating point numbers.&lt;br /&gt;
&lt;br /&gt;
=== Parameter values ===&lt;br /&gt;
&lt;br /&gt;
Several parameters have ...v and ...a values.  These give velocity and acceleration for that value.  Each frame, velocity is added to the base value, then acceleration is added to velocity (causing velocity to change for future frames).  For example:&lt;br /&gt;
&lt;br /&gt;
    r = 1, rv = -0.1, ra = 0&lt;br /&gt;
    g = 0, gv = 0, ga = 0,&lt;br /&gt;
    b = 0, bv = 0, ba = 0&lt;br /&gt;
&lt;br /&gt;
starts out solid red and fades to black over 10 frames.&lt;br /&gt;
&lt;br /&gt;
As another example:&lt;br /&gt;
&lt;br /&gt;
    y = 0, yv = 0, ya = -0.4&lt;br /&gt;
&lt;br /&gt;
creates a particle that is initially motionless but starts moving up faster and faster.&lt;br /&gt;
&lt;br /&gt;
Details on values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''General settings'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;life&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Number of frames for which the particle will exist&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;size, sizev, sizea&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Size of the particle&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Simple generator only'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;base&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;All velocity and acceleration values are divided by this before being processed (since the default generator can't take fractional values directly).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;angle, anglev, anglea&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Angle along which the particle should move, in degrees, and velocity and acceleration at which it should move along that angle.  Generator functions can use dir and vel for a similar effect.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Generator function only'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;trail&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Used to draw trails from one particle to another&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;x, xv, xa&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;x coordinate, relative to the center of the particle system&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;y, yv, ry&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;y coordinate, relative to the center of the particle system&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;dir, dirv, dira&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Angle along which the particle should move, in radians.  dirv and dira give the rate at which that angle should change.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;vel, velv, vela&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Velocity to move along the angle given by dir, and the &amp;quot;velocity of velocity&amp;quot; (i.e., acceleration) and the &amp;quot;acceleration of velocity.&amp;quot;  Movement can be done via xv, xa, yv, ya or dir, vel (or both at the same time).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td colspan=2&amp;gt;'''''Color'''''&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;r, rv, ra&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Red component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;g, gv, ga&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Green component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;b, bv, ba&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Blue component&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;a, av, aa&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Alpha component.  255 (for the simple generator) or 1 (for a generator function) means fully opaque, 0 means fully transparent.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Talents&amp;diff=5937</id>
		<title>T4 Modules Howto Guide/Talents</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Talents&amp;diff=5937"/>
				<updated>2013-07-19T02:15:25Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Talents: Your special skills=&lt;br /&gt;
&lt;br /&gt;
==Talent Definitions==&lt;br /&gt;
&lt;br /&gt;
By default, Talent definitions are stored in the /data/talents.lua file.  This file can include other files through the use of the Load(file) method.&lt;br /&gt;
&lt;br /&gt;
Talent definitions require talent type definitions first.  These are defined in newTalentType{...} blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Important TalentType Variables&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Display name of this talent type.  REQUIRED.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;type&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Identifier of this talent type.  REQUIRED.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;description&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;String description of this talent type.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;points&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Maximum amount of points in this talent type.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Talent definitions are defined in newTalent{...} blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Important Talent Variables&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Displayed Talent name. REQUIRED.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;short_name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Talent identifier.  name is used if unset.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;points&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Maximum amount of points that can be put into the talent.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;require&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Requirements table for adding points.  See the requirements definition below.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;mode&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Talent mode.  One of either: &amp;amp;quot;passive&amp;amp;quot; - always on, &amp;amp;quot;sustained&amp;amp;quot; - can be turned on or off and &amp;amp;quot;activated&amp;amp;quot; - can be used.  Default is &amp;amp;quot;activated&amp;amp;quot;.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;info&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;String description of the talent.  REQUIRED.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;type&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Talent group. REQUIRED.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;cooldown&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Amount of turns to wait before a talent can be used again.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;range&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Range of talent.  May be a number or function, but use getTalentRange(t) below as a getter in that case.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Identifiers for the talents are created by uppercasing the short_name (or name if no short_name is defined), replacing spaces with underscores ('_') and appending T_ in the front.  These can then be accessed statically through [ActorTalents.*].&lt;br /&gt;
&lt;br /&gt;
In this way the talent &amp;amp;quot;Wind Walk&amp;amp;quot; can be accessed by [ActorTalents.T_WIND_WALK].&lt;br /&gt;
&lt;br /&gt;
Some talent variables require functions to be defined.  These are of the form function(self, t), where self is the invoking actor and t is the talent being invoked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Important Talent Functions&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Use&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;action&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;&amp;amp;quot;activated&amp;amp;quot; mode talents only. Function that gets used when talent is activated.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;activate&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;&amp;amp;quot;sustained&amp;amp;quot; mode talents only.  Function that gets used when talent gets turned on.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;deactivate&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;&amp;amp;quot;sustained&amp;amp;quot; mode talents only.  Function that gets used when talent gets turned off.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;on_learn&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Function that gets used when talent is learned.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;on_unlearn&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Function that gets used when talent is unlearned.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to add stat, level or other talent requirements, a requirement table is required.  These are the recognised variables.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Requirement Definition&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Use&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;stat&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Actor must have these stats at these levels.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;level&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Actor must be at least this level.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;talent&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Prerequisite talents.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance if a talent requires another talent and stats you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;require = { stat = { str = 10, dex = 10 }, talent = { Talents.T_STONE_SKIN }, },&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a talent requires that another talent NOT be taken you can use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;require = { talent = { { Talents.T_STONE_SKIN, false }, }, },&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Talent Targeting==&lt;br /&gt;
&lt;br /&gt;
Many activatable talents require some user targeting input.  This is done through a coroutine.  This is an example of the standard targeting and dealing damage case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;local tg = {type=&amp;amp;quot;bolt&amp;amp;quot;, range=self:getTalentRange(t), talent=t}&lt;br /&gt;
local x, y = self:getTarget(tg)&lt;br /&gt;
if not x or not y then return nil end&lt;br /&gt;
self:project(tg, x, y, DamageType.FIRE, 10, nil)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, tg contains the targeting and damage settings.  Possible variables are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Targeting Settings&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;type&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Targeting type. See below.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;range&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Range limit.  Usually always self:getTalentRange(t).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;talent&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;The talent being used.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;friendlyfire&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;(?) Defaults to true.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;no_restrict&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Makes no restrictions regarding targeting&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;stop_block&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Denotes that the projection will be blocked by entities that block move (bolts have this true by default)&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;radius&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;&amp;amp;quot;ball&amp;amp;quot; and &amp;amp;quot;cone&amp;amp;quot; targeting modes use this.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;cone_angle&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;&amp;amp;quot;cone&amp;amp;quot; targeting mode uses this.  Defaults to 55.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;msg&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Message to display during targeting.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The possible targeting modes are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;type&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;hit&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Simple single target.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;bolt&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Hits first thing in path.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;beam&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Hits everything in path.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;ball&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Hits everything in a ball around the target.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;cone&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Hits everything in a cone in the direction.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
getTarget(tg) is a method that is overriden by an AI for NPCs, or by the game module class.&lt;br /&gt;
&lt;br /&gt;
Note that the last parameter of the project() method is the particle system to use.&lt;br /&gt;
&lt;br /&gt;
==ActorTalents Class==&lt;br /&gt;
&lt;br /&gt;
By default, Actors inherit from the ActorTalents class, even in the example module.  This class provides an interface for manipulating and accessing talents.  These are some of the valuable methods.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Useful Talent Related ActorTalents class methods&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Use&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;useTalent(t)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Forces the Actor to use the talent.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;useTalents()&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Shows the use talent dialog.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;knowTalent(t)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Returns true if the talent is known.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;knowTalentType(tt)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Returns true if the talent group is known.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;learnTalent(t, force, nb)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Has an Actor learn a talent.  force prevents a canLearnTalent(t) test. nb is the amount of points to put into the talent.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;unlearnTalent(t)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Makes the Actor forget the talent.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;learnTalentType(tt, v)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Has the Actor learns a Talent Type. (v is true or false?)&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;unlearnTalentType(tt)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Has the Actor forget a Talent Type.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;canLearnTalent(t)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Returns true if the Actor meets the requirements for the talent.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;getTalentLevel(t)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Gets the amount of points in talent.  0 if unlearned.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;isTalentCoolingDown(t)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Returns true if the specified talent is in the process of cooldown.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;getTalentRange(t)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Returns the talent range.  Use this instead of checking the range variable, since this allows the range variable to be either a function or a number.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;cooldownTalents()&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Cools down all talents by 1.  This needs to be in your act() method.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All of the above methods can also be redefined in your own class if their functionality needs to be expanded.  In addition, the following may also be useful to redefine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Method&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Use&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;preUseTalent(t)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Called before an actor uses a talent.  Not returning true stops the talent from invoking.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;postUseTalent(t)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Called after an actor uses a talent.  Not returning true stops stops cooldown or sustained state from happening.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;getTalentFullDescription(t)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Used in Dialogs.  Overload to add more information such as mana use.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go back to [[T4 Modules Howto Guide]]&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=5936</id>
		<title>T4 Modules Howto Guide</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide&amp;diff=5936"/>
				<updated>2013-07-19T02:06:36Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to start making a module for the T-Engine 4:&lt;br /&gt;
----&lt;br /&gt;
*[[Getting Started]]&lt;br /&gt;
*[[Directory Structure]]&lt;br /&gt;
*[[Engine Structure]]&lt;br /&gt;
*[[Player Descriptors]]&lt;br /&gt;
*[[Dev-Talents]]&lt;br /&gt;
*[[Entities]]&lt;br /&gt;
*[[Dev-Zones]]&lt;br /&gt;
*[[NPCs]]&lt;br /&gt;
*[[Objects]]&lt;br /&gt;
*[[Inventory Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Traps|Traps]] (not created)&lt;br /&gt;
*[[Dialogs]]&lt;br /&gt;
*[[Character Sheet Dialogs]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Stores|Stores]] (not created)&lt;br /&gt;
*[[Factions]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Quests|Quests]] (not created)&lt;br /&gt;
*[[Chats]]&lt;br /&gt;
*[[Frame Buffers]]&lt;br /&gt;
*[[Developing a static map using the Tiled plugin]]&lt;br /&gt;
*[[T4 Modules Howto Guide/Resolvers|Resolvers]] (not created)&lt;br /&gt;
*[[Particle Effects]]&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/NPCs&amp;diff=5935</id>
		<title>T4 Modules Howto Guide/NPCs</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/NPCs&amp;diff=5935"/>
				<updated>2013-07-19T02:03:43Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1 id=&amp;quot;toc0&amp;quot;&amp;gt;Actors: NPCs and Monsters&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;toc1&amp;quot;&amp;gt;Important NPC Definitions&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that these are also used in the copy table in a player descriptor. These expand on the properties available to all entities, see [[Entities]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Variable&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Displayed NPC name.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;short_name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;NPC identifier. name is used if unset&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;desc&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Optional description of NPC.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;type&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;NPC Type (No known hardcoded types)&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;subtype&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Better categorization for NPC.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;display&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Character that the NPC is displayed as in text mode.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;faction&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Actor faction.  Defaults to &amp;amp;quot;enemies&amp;amp;quot;.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;ai&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Selects which ai to use for NPC.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;ai_state&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;(?) Depends on AI class.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;rarity&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;How common this NPC is to generate.  Higher is rarer.  If not set will not ever generate.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;level_range&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Minimum and maximum levels for NPC. Read NPC Level Scaling below.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;autolevel&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Which leveling function to use to level up NPC.  Read NPC Level Scaling below.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;max_life&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Max life at level 1.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;energy.mod&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Scales how much energy is gained per tick.  Defaults to 1.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;sight&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Sight radius.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;exp_mod&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Scales how much exp is needed to reach a new level.  Defaults to 1.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;exp_worth&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Indicator of Actor exp value.  By default, exp for killing an Actor is its level times this value.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;egos&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;See ego section in [[Entities]]&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;egos_chance&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;See ego section in [[Entities]]&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These variables are not set in the definitions file, though they can be.  They can be useful to access in code however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Important runtime variables&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;energy.value&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Current energy of this actor. Defaults to 0.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;self.energy.used&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Set to true if some energy was used this tick.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;life&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Current life.  Defaults to max_life.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;dead&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;true if entity is dead.  Different from undead.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;level&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Current Actor level.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;exp&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Current experience.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;max_level&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Maximum level for the Actor.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example module implements several other variables in its Actor class and Combat interface.  These are not hardcoded, but can be used as a base or example for implementing your own module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Variable&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;combat_armor&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Removes this amount from damage taken.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;combat.dam&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;This is added to strength to determine the damage done by attacks.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;toc2&amp;quot;&amp;gt;Actor class important methods&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, read the documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Method&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Purpose&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;act()&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Code that gets executed every time the entity gets to act.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;canSee(actor)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Test if the actor can see the target actor.  This does not check LOS or such, only the actual ability to see it, such as influenced by stealth, invisibility or telepathy.  Returns true or false and a number from 0 to 100 representing the 'chance' to be seen.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;getTarget()&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Gets the Actor target. Redefined by player and AI.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;setTarget(target)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Sets the actor target.  Redefined by player and AI.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;move(x, y, force)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td style=&amp;quot;text-align: left;&amp;quot;&amp;gt;Do NOT manually set the actor's x and y values.  Use this method instead.  Set force to true to not test for the presence of other entities.  Returns true if a move was attempted and energy should propably be used.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;moveDir(dir)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Moves in a certain direction.  Calls move() internally.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;canMove(x, y, terrain_only)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Checks if the Actor can go there.  if terrain_only is true it only checks terrain and ignores the presence of actors and other entities.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;teleportRandom(x, y, dist, min_dist)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Teleports randomly to x,y.  dist is the radius of the effect, min_dist is a minimum radius of the effect and defaults to 0.  Set dist to 0 for precise teleport.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;useEnergy(amount)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Amount of energy to subtract from the actor in energy based time systems.  Often used in the act() method after taking an action that takes time.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;reactionToward(target)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Uses factions to check for hostility.  -100 is fully hostile, 0 is neutral and 100 is friendly.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;addTemporaryValue(prop, v, noupdate)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Changes a property on the actor, but returns an id so the value change can be reversed with a call to removeTemporaryValue(). If noupdate is true the property is not actually changed.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;removeTemporaryValue(prop, id, noupdate)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Reverses a previous call to addTemporaryValue().  Use its returned id to reverse its change.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;onTemporaryValueChange(prop, sub, v)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Does nothing.  Redefine to perform some action when temporary values are applied or removed.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;attr(prop, v, fix)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Non-temporarily increases or decreases an actor property. Use this for compatibility with temporary values above.  If fix is set the property is set to v, not increased or decreased. Commonly, attr(prop) alone is used to check for the existance of a property instead of modifying it.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;isNear(x, y, radius)&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Checks whether the actor is within a certain radius of the passed coordinate.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, defining stats automatically creates a getStat() function.  For example, defining the stat str creates a getStr() function for you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;toc3&amp;quot;&amp;gt;NPC Egos&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;toc4&amp;quot;&amp;gt;NPC Level Scaling&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Depending on the zone settings, the spawned creatures can actually level with the player.  This requires a level_range variable to be properly set and a levelup() method in the Actor class.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The level_range variable defines the possible range the creature can be. The entity will always be leveled up to at least its minimum level in the level range.  It will also never be leveled above that range either.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The leveling method should be defined in Actor.lua.  In ToME this method adds to the life, stamina and mana of actors.  Alternatively, you can create several, and use the autolevel variable to pick which to call.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All creatures are always generated at level 1, then leveled up to reach their required level.  Keep this is mind when creating the NPC descriptor.  Note also that you can create your own levelup() function in the NPC descriptor if a unique levelup method is needed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[Dev-Zones]] for more info&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go back to [[T4 Modules Howto Guide]]&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Higher&amp;diff=3571</id>
		<title>Higher</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Higher&amp;diff=3571"/>
				<updated>2013-06-01T00:45:37Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: /* Strategy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{race&lt;br /&gt;
|name=Higher&lt;br /&gt;
|metarace=[[Human]]&lt;br /&gt;
|life_per_level=11&lt;br /&gt;
|exp_penalty=+15%&lt;br /&gt;
|strength=+1&lt;br /&gt;
|dexterity=+1&lt;br /&gt;
|magic=+1&lt;br /&gt;
|willpower=+1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Highers are a special branch of Humans that have been imbued with latent magic since the Age of Allure. They usually do not breed with other Humans, trying to keep their blood 'pure'. They possess the [[Gift_of_the_highborn_(talent)|Gift of the Pureborn]] which allows them to regenerate their wounds once in a while.&lt;br /&gt;
&lt;br /&gt;
==Starting Equipment==&lt;br /&gt;
*Brass Lantern&lt;br /&gt;
*[[inscriptions|Wild Infusion]]&lt;br /&gt;
*Regeneration Infusion&lt;br /&gt;
&lt;br /&gt;
==Starting Location==&lt;br /&gt;
[[Trollmire]] (except for [[Celestial (Metaclass)|Celestial]] or [[Chronomancer (Metaclass)|Chronomancer]] characters)&lt;br /&gt;
&lt;br /&gt;
== Racial Talents ==&lt;br /&gt;
{{:Higher_(category)}}&lt;br /&gt;
&lt;br /&gt;
==Strategy==&lt;br /&gt;
&lt;br /&gt;
[[Gift of the highborn (talent)|Gift of the Highborn]] (the first racial talent) scales with [[Willpower]] and is instantaneous.  This can act as an additional or replacement Regeneration infusion and gives a boost to characters who may need some extra healing to survive.  Even a single generic point here (for classes that boost Willpower but are tight on generic points) is useful.  [[Overseer of nations (talent)|Overseer of Nations]] can let you hit enemies from outside their sight range (if you use it with an area of effect spell with range 10).&lt;br /&gt;
&lt;br /&gt;
Highers are a solid choice for spellcasters (thanks to the damage boost of [[Born into magic (talent)|Born into Magic]]) and anything that boosts [[Willpower]] (to better benefit from the first racial talent).  There are a few gimmick builds with Crystal Focus, but Highers are otherwise unimpressive melee characters.  A few classes deserve special mention:&lt;br /&gt;
&lt;br /&gt;
* [[Necromancer|Necromancers]] can use [[Gift of the highborn (talent)|Gift of the Highborn]] while undead and can mitigate their resource issues with [[Highborn's bloom (talent)|Highborn's Bloom]].&lt;br /&gt;
* [[Archmage|Archmages]] can easily get the [[Prodigies|Aether Permeation prodigy]], which synergizes well with [[Born into magic (talent)|Born into Magic]].&lt;br /&gt;
* [[Paradox Mage|Paradox Mages]] can use [[Overseer of nations (talent)|Eyes of the Overseer]] with [[Gravity well (talent)|Gravity Well]] to kill things from startlingly far away.&lt;br /&gt;
&lt;br /&gt;
{{races}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Higher&amp;diff=3570</id>
		<title>Higher</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Higher&amp;diff=3570"/>
				<updated>2013-06-01T00:44:34Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: /* Strategy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{race&lt;br /&gt;
|name=Higher&lt;br /&gt;
|metarace=[[Human]]&lt;br /&gt;
|life_per_level=11&lt;br /&gt;
|exp_penalty=+15%&lt;br /&gt;
|strength=+1&lt;br /&gt;
|dexterity=+1&lt;br /&gt;
|magic=+1&lt;br /&gt;
|willpower=+1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Highers are a special branch of Humans that have been imbued with latent magic since the Age of Allure. They usually do not breed with other Humans, trying to keep their blood 'pure'. They possess the [[Gift_of_the_highborn_(talent)|Gift of the Pureborn]] which allows them to regenerate their wounds once in a while.&lt;br /&gt;
&lt;br /&gt;
==Starting Equipment==&lt;br /&gt;
*Brass Lantern&lt;br /&gt;
*[[inscriptions|Wild Infusion]]&lt;br /&gt;
*Regeneration Infusion&lt;br /&gt;
&lt;br /&gt;
==Starting Location==&lt;br /&gt;
[[Trollmire]] (except for [[Celestial (Metaclass)|Celestial]] or [[Chronomancer (Metaclass)|Chronomancer]] characters)&lt;br /&gt;
&lt;br /&gt;
== Racial Talents ==&lt;br /&gt;
{{:Higher_(category)}}&lt;br /&gt;
&lt;br /&gt;
==Strategy==&lt;br /&gt;
&lt;br /&gt;
[[Gift of the highborn (talent)|Gift of the Highborn]] (the first racial talent) scales with [[Willpower]] and is instantaneous.  This can act as an additional or replacement Regeneration infusion and gives a boost to characters who may need some extra healing to survive.  Even a single generic point here (for classes that boost Willpower but are tight on generic points) is useful.  [[Overseer of nations (talent)|Overseer of Nations]] can let you hit enemies from outside their sight range (if you use it with an area of effect spell with range 10).&lt;br /&gt;
&lt;br /&gt;
Highers are a solid choice for spellcasters (thanks to the damage boost of [[Born into magic (talent)|Born into Magic]]) and anything that boosts [[Willpower]] (to better benefit from the first racial talent).  There are a few gimmick builds with Crystal Focus, but Highers are otherwise unimpressive melee characters.  A few classes deserve special mention:&lt;br /&gt;
&lt;br /&gt;
* [[Necromancer|Necromancers]] can use [[Gift of the highborn (talent)|Gift of the Highborn]] while undead and can mitigate their resource issues with [[Highborn's bloom (talent)|Highborn's Bloom]].&lt;br /&gt;
* [[Archmage|Archmages]] can easily get the [[Prodigies|Aether Permeation prodigy]], which synergizes well with [[Born into magic (talent)|Born into Magic]].&lt;br /&gt;
* [[Paradox Mage|Paradox Mages]] can use [[Eyes of the overseer (talent)|Eyes of the Overseer]] with [[Gravity well (talent)|Gravity Well]] to kill things from startlingly far away.&lt;br /&gt;
&lt;br /&gt;
{{races}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Overseer_of_nations_(talent)&amp;diff=3569</id>
		<title>Overseer of nations (talent)</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Overseer_of_nations_(talent)&amp;diff=3569"/>
				<updated>2013-06-01T00:37:01Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Ability_box|image=Overseer of nations.png|name=Overseer of nations|category_type=[[Race (category type)|Race]]|category=[[Higher (category)|Higher]]|desc=While Highers are not meant to rule other humans - and show no particular will to do so - they are frequently called to higher duties. Their nature grants them better senses than other humans. Increase blindness immunity by X, maximum sight range by X, and increases existing infravision, and heightened senses range by X.}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Born_into_magic_(talent)&amp;diff=3568</id>
		<title>Born into magic (talent)</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Born_into_magic_(talent)&amp;diff=3568"/>
				<updated>2013-06-01T00:27:40Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Ability_box|image=Born into magic.png|name=Born into magic|category_type=[[Race (category type)|Race]]|category=[[Higher (category)|Higher]]|desc=Highers were originally created during the Age of Allure by the human Conclave. They are imbued with magic at the very core of their being. Increase spell save by +X and arcane resistance by X%. Also when you cast a spell dealing damage, you gain a 15% bonus to the damage type for 5 turns (this effect has a cooldown).}}&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Getting_Started&amp;diff=3567</id>
		<title>T4 Modules Howto Guide/Getting Started</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Getting_Started&amp;diff=3567"/>
				<updated>2013-06-01T00:18:41Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: /* init.lua */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;In order to start your own module, you need to create a new directory in the /game/modules/ directory, into which you copy the contents of either /game/modules/example/ or /game/modules/example_realtime/, which will give you bare-bones but working base to work off of.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==init.lua==&lt;br /&gt;
&amp;lt;p&amp;gt;The first file you need to customize is the init.lua file. This file has a few things you need to edit to make this module your own:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Setting&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;This is the official name of the module as seen in module selection list.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;long_name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;This is the long name of the module that appears is descriptions.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;short_name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;This is a short name used internal to the module. Preferred to be lower case and should be the same as the folder name.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;author&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Your name or pseudonym and email address.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;homepage&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Optional homepage of the module.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;version&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Module version. Does not automatically update. Change this between releases to differentiate them.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;engine&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Expected engine version.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;description&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;A description of your module. Can be multiple lines and paragraphs.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;starter&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Only change if you know what you are doing. And if you have to ask, you don't.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;show_only_on_cheat&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;If true, prevents this module from appearing in the mods list normally. This is enabled by default on the example module and should be disabled in your module.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;no_get_name&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Prevents the new character name dialog from showing up for your module. Use this if you set the character name yourself in your module.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;allow_userchat&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Registers 'space' as a key to talk, joins a channel named &amp;amp;quot;module&amp;amp;quot;, and inits the chat system. If the game implements a game.logChat(str, ...) method it'll send chat listens to there.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;background&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;A list of filenames (without the extension) of PNG images under the data/gfx/background directory to use as startup screen backgrounds&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;toc2&amp;quot;&amp;gt;Launching your module using command line parameters&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By now you should be able to start t-engine normally and see your module in the list when you select new game. However, when changing features then quickly wanting to see its effects, this process involves a lot of unneeded clicks and wasted time. For this reason t-engine.exe supports various command line parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Parameter&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;th&amp;gt;Effect&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;-M&amp;amp;lt;Module&amp;amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Auto-loads the specified module (using the module's short_name).&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;-u&amp;amp;lt;name&amp;amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Uses the specified name for the character.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;-n&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;td&amp;gt;Forces a new character, overwriting any old saves with the same name.&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;To take advantage of this in windows, you need to right-click on t-engine.exe and select 'Create Shortcut'. On the created shortcut right-click again and select properties. In the dialog add the following to the Target field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;.../t-engine.exe -MMyModule -udefault -n&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Replacing MyModule with your module name and default with whichever character name you desire. Using this shortcut now will launch your module directly, saving you some time while prototyping.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go back to [[T4modules-module-howto-guides]]&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Source_Setup&amp;diff=3566</id>
		<title>Source Setup</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Source_Setup&amp;diff=3566"/>
				<updated>2013-05-31T23:49:12Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: Created page with &amp;quot;You can access the ToME source code using Subversion or Git.  (ToME's Subversion repository is the official version, although the Git repository offers several advantages.)  =...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can access the ToME source code using Subversion or Git.  (ToME's Subversion repository is the official version, although the Git repository offers several advantages.)&lt;br /&gt;
&lt;br /&gt;
== Subversion ==&lt;br /&gt;
&lt;br /&gt;
=== Short version ===&lt;br /&gt;
&lt;br /&gt;
(if you're already familiar with Subversion)&lt;br /&gt;
&lt;br /&gt;
* URL: http://svn.net-core.org/repos/t-engine4&lt;br /&gt;
* Username: guest&lt;br /&gt;
* Password: guestor&lt;br /&gt;
&lt;br /&gt;
=== Windows Details ===&lt;br /&gt;
&lt;br /&gt;
Download and install [http://tortoisesvn.net/ TortoiseSVN]. It's a shell extension, so you may need to reboot when this is done. After you've rebooted your computer, make a directory somewhere where you can find it, like &amp;quot;C:\tomedev&amp;quot;. Using Windows Explorer, navigate to this folder and right-click in the empty space where there isn't anything there yet, and select &amp;quot;SVN Checkout...&amp;quot; to give you TortiseSVN's checkout dialog box. In the blank URL text box, put in the following address and click OK, presuming you haven't changed any of the default settings:&lt;br /&gt;
&lt;br /&gt;
http://svn.net-core.org/repos/t-engine4&lt;br /&gt;
&lt;br /&gt;
A second dialog box will pop up, asking for a username and password. Use these:&lt;br /&gt;
&lt;br /&gt;
* Username: guest&lt;br /&gt;
* Password: guestor&lt;br /&gt;
&lt;br /&gt;
=== OS X ===&lt;br /&gt;
&lt;br /&gt;
Use a Mac Subversion client of your choice, or use the Linux command-line instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
Here's an example of what to do.&lt;br /&gt;
&lt;br /&gt;
Check for svn and http(s) support in svn.  (This is almost certainly unnecessary; http support is standard.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  $ svn --version&lt;br /&gt;
  svn, version x.x.x&lt;br /&gt;
     compiled xxx&lt;br /&gt;
  &lt;br /&gt;
  Copyright (C) 2000-xxxx CollabNet.&lt;br /&gt;
  Subversion is open source software, see http://subversion.apache.org/&lt;br /&gt;
  This product includes software developed by CollabNet (http://www.Collab.Net/).&lt;br /&gt;
  &lt;br /&gt;
  The following repository access (RA) modules are available:&lt;br /&gt;
  &lt;br /&gt;
  * ...&lt;br /&gt;
  * ...&lt;br /&gt;
  * ra_neon : Module for accessing a repository via WebDAV protocol using Neon.&lt;br /&gt;
    - handles 'http' scheme&lt;br /&gt;
    - handles 'https' scheme&lt;br /&gt;
  * ...&lt;br /&gt;
  * ...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The thing your looking for isn't ra_neon, but http support.&lt;br /&gt;
&lt;br /&gt;
Make a directory to plop t-engine into:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  $ cd ~/&lt;br /&gt;
  $ mkdir tomedev&lt;br /&gt;
  $ cd tomedev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download the bleeding edge source, and hope it's bug free :)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  $ svn checkout --username guest --password guestor http://svn.net-core.org/repos/t-engine4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Should see a bunch of stuff filling up the directory, weeh! Now get to work, and fix some bugs for us. :)&lt;br /&gt;
&lt;br /&gt;
== Git ==&lt;br /&gt;
&lt;br /&gt;
The Git repository of ToME is available from http://git.develz.org/.&lt;br /&gt;
&lt;br /&gt;
If you need a Git client for Windows, you can download [https://code.google.com/p/tortoisegit/ TortoiseGit].&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=3565</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=3565"/>
				<updated>2013-05-31T23:15:53Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: &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;
{| &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;
! 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;
;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;
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>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=3564</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=3564"/>
				<updated>2013-05-31T23:09:37Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: /* Lua console */&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;
{| &lt;br /&gt;
! Operating System !! Configuration Directory &lt;br /&gt;
|-&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;
! 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;
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;
;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;
&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;
[19:51:28] &amp;lt;DarkGod&amp;gt; : Hetdegon, you create a character once&lt;br /&gt;
[19:51:36] &amp;lt;DarkGod&amp;gt; : then you can use the premade from the command line:&lt;br /&gt;
[19:51:53] &amp;lt;DarkGod&amp;gt; : t-engine -Mtome -n -E&amp;quot;auto_quickbirth='player'&amp;quot;&lt;br /&gt;
[19:51:58] &amp;lt;DarkGod&amp;gt; : if your premade was named &amp;quot;player&amp;quot;&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=3563</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=3563"/>
				<updated>2013-05-31T23:05:42Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: /* 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;
{| &lt;br /&gt;
! Operating System !! Configuration Directory &lt;br /&gt;
|-&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;
! 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;
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;
If you want to get to level 50 use:&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;
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;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&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;
=== Output log text to file immediately ===&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;
[19:51:28] &amp;lt;DarkGod&amp;gt; : Hetdegon, you create a character once&lt;br /&gt;
[19:51:36] &amp;lt;DarkGod&amp;gt; : then you can use the premade from the command line:&lt;br /&gt;
[19:51:53] &amp;lt;DarkGod&amp;gt; : t-engine -Mtome -n -E&amp;quot;auto_quickbirth='player'&amp;quot;&lt;br /&gt;
[19:51:58] &amp;lt;DarkGod&amp;gt; : if your premade was named &amp;quot;player&amp;quot;&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=Debugging&amp;diff=3562</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=Debugging&amp;diff=3562"/>
				<updated>2013-05-31T23:01:08Z</updated>
		
		<summary type="html">&lt;p&gt;Castler: /* Updating your configuration */&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;
{| &lt;br /&gt;
! Operating System !! Configuration Directory &lt;br /&gt;
|-&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;
! 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;
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;
If you want to get to level 50 use:&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;
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;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&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;
=== Windows and Mac: Output log text to file immediately ===&lt;br /&gt;
1) Create a shortcut to t-engine.exe&lt;br /&gt;
2) Rightclick the shortcut, select Properties&lt;br /&gt;
3) 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;
&lt;br /&gt;
The end of the Target line should look like this then: \t-engine.exe --flush-stdout&lt;br /&gt;
&lt;br /&gt;
This can be used in combination with a Tail program that shows the content of the log file in realtime.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Load Module and create Character on startup ===&lt;br /&gt;
[19:51:28] &amp;lt;DarkGod&amp;gt; : Hetdegon, you create a character once&lt;br /&gt;
[19:51:36] &amp;lt;DarkGod&amp;gt; : then you can use the premade from the command line:&lt;br /&gt;
[19:51:53] &amp;lt;DarkGod&amp;gt; : t-engine -Mtome -n -E&amp;quot;auto_quickbirth='player'&amp;quot;&lt;br /&gt;
[19:51:58] &amp;lt;DarkGod&amp;gt; : if your premade was named &amp;quot;player&amp;quot;&lt;/div&gt;</summary>
		<author><name>Castler</name></author>	</entry>

	</feed>