<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frictionalgames.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Darkfire</id>
	<title>Frictional Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frictionalgames.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Darkfire"/>
	<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page/Special:Contributions/Darkfire"/>
	<updated>2026-04-03T21:29:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Development_Environment&amp;diff=6829</id>
		<title>HPL2/Development Environment</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Development_Environment&amp;diff=6829"/>
		<updated>2024-07-15T10:45:10Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Add a mention of AddDebugMessage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to mod Amnesia comfortably, you will need to set up the game so you can easily test maps and reload scripts. To do that, it is recommended to have two in-game users; a regular one (for testing how the mod works for the player) and a developer one. This article is about the basic set up of a developer user.&lt;br /&gt;
&lt;br /&gt;
==Setting up a dev user==&lt;br /&gt;
&lt;br /&gt;
Follow these steps to create a developer user:&lt;br /&gt;
&lt;br /&gt;
#Enter the game (or Full Conversion mod) normally and create a new profile (call it Dev, for example) and then exit. Some of the following steps can be overwritten by the game if it is left running.&lt;br /&gt;
#Enter the save directory (&amp;lt;code&amp;gt;My Documents/Amnesia/Main&amp;lt;/code&amp;gt; in Windows by default; &amp;lt;code&amp;gt;~/.frictionalgames/Amnesia/Main&amp;lt;/code&amp;gt; in Linux). If your mod is an FC, do this in its save folder.&lt;br /&gt;
#Open main_settings.cfg and change set the following options:&lt;br /&gt;
##&amp;lt;code&amp;gt;LoadDebugMenu=&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
##&amp;lt;code&amp;gt;ShowPreMenu=&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt; (this will skip you some waiting on each game launch)&lt;br /&gt;
##&amp;lt;code&amp;gt;SaveConfig=&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;  will make sure that the in-game option changes don't overwrite changes to this file&lt;br /&gt;
##Optional: &amp;lt;code&amp;gt;ExitMenuDirectly=&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt; if you wish to exit the game without visiting the main menu&lt;br /&gt;
##&amp;lt;code&amp;gt;ForceCacheLoadingAndSkipSaving=&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;, otherwise certain map changes might not show! You will sometimes need to delete the map's cache file even with this setting&lt;br /&gt;
#Open user_settings.cfg (in the &amp;quot;Dev&amp;quot; folder) and set the following:&lt;br /&gt;
##&amp;lt;code&amp;gt;AllowQuickSave=&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;  ('''F4'''=save, '''F5'''=load)&lt;br /&gt;
##&amp;lt;code&amp;gt;ScriptDebugOn=&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;. This makes debugging easier (more on that below)&lt;br /&gt;
#In order to avoid running into &amp;quot;File index out of bounds&amp;quot; errors in the Level Editor, edit the file '''resources.cfg''' located in the root the directory of Amnesia and add the ''custom_stories'' directory to the end of the list. This will also make custom assets load in the editors.&lt;br /&gt;
&lt;br /&gt;
You can now press '''F1''' to open the '''debug menu''' to turn on/off various things and more importantly - quick reload the map. After editing a script or a map simply press &amp;quot;Quick reload&amp;quot; or '''F2'''. If a mesh or texture has been updated (e.g. in an Entity file), you need to press &amp;quot;Reload&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you start the game with a syntax error in your script file, it will crash. But if you reload the script with F2 with a syntax error, it will instead give you an error description. Therefore it's a good idea to load into a map before making changes to its script.}}&lt;br /&gt;
&lt;br /&gt;
By setting &amp;lt;code&amp;gt;ScriptDebugOn=&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt; you have set the script function &amp;lt;code&amp;gt;ScriptDebugOn()&amp;lt;/code&amp;gt; to return true. This is quite useful, as you can add something like this in your startup code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;if(ScriptDebugOn()) {&lt;br /&gt;
//Do your setup stuff&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will enable you to easily add all kinds of debug stuff (giving a lantern to the player, extra items, etc.) wihout having to worry about removing it for the final release. If you wish to test a map without this feature, you can use your normal user profile.&lt;br /&gt;
&lt;br /&gt;
Another very useful function this mode enables is [[HPL2/Engine_Scripts|&amp;lt;code&amp;gt;AddDebugMessage&amp;lt;/code&amp;gt;]] which shows a message in the bottom left corner of the screen.&lt;br /&gt;
This can make debugging much easier; in particular, if something isn't working, you can print a message to see if your code is being executed at all.&lt;br /&gt;
&lt;br /&gt;
Now you should be ready to start some editing!&lt;br /&gt;
&lt;br /&gt;
==Loading directly into a map==&lt;br /&gt;
The following config will let you load directly into a level when starting the game. This will only work if you place your maps in the main game's maps folder, which is not recommended, so this feature has very limited usage.&lt;br /&gt;
&lt;br /&gt;
#Open '''main_settings.cfg''' again and set &amp;lt;code&amp;gt;ShowMenu=&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt; (this feature doesn't work without the next steps).&lt;br /&gt;
#In '''user_settings.cfg''', inside the '''Map''' element set:&lt;br /&gt;
##&amp;lt;code&amp;gt;Folder=&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; to the root folder for your maps (eg &amp;lt;code&amp;gt;Folder=&amp;quot;MyMaps/&amp;quot;&amp;lt;/code&amp;gt;), this folder MUST be located inside the maps folder in the game directory (where you put the tools).&lt;br /&gt;
##&amp;lt;code&amp;gt;File=&amp;quot;&amp;quot;&amp;lt;/code&amp;gt;  to point to the map you want to load (eg &amp;lt;code&amp;gt;File=&amp;quot;my_map.map&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Now you can simply run Amnesia and the map will be loaded directly without any menu.&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Hpl2:Tutorials:level_editor:tutorial_6&amp;diff=6827</id>
		<title>Hpl2:Tutorials:level editor:tutorial 6</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Hpl2:Tutorials:level_editor:tutorial_6&amp;diff=6827"/>
		<updated>2024-06-07T09:49:22Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: add clean up template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Cleanup}}&lt;br /&gt;
= Level Editor - Useful tricks (in progress) =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While The Basics and Light tutorial are great enough to create atmospheric maps, there are some things that can easily help achieve interesting results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Billboards ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=Sw4du21rNqc Demonstration] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step by step tutorial. Starting with easy way to setup and control billboards for your map, and continuing to more advanced effects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First make sure you have read and understood [http://wiki.frictionalgames.com/hpl2/tutorials/level_editor/tutorial_1#billboards_particles this].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;br /&amp;gt; ''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Start off by creating a billboard and a point light and connect the billboard into the point light. ''' This helps you control the color value of every billboard you duplicate from the original connected billboard. Keep all of the billboards colors at 1 value. (That one extra point light in the picture is useless for the first parts)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://i1237.photobucket.com/albums/ff478/Khyrpa/WikiTutorial/BB_01.jpg?nolink&amp;amp;800x489]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then align your billboards properly into your window. Some videos about creating billboards. These are done without the connection to light, but the placement should be okay:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[http://www.youtube.com/watch?v=Jb0xJRBO2d8&amp;amp;t=3m37s|Office hlp2 level editor[P2] (billboards, lighting)]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=u8EhP59tmjA Billboard Action Amnesia level editor   ] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://i1237.photobucket.com/albums/ff478/Khyrpa/WikiTutorial/BB_02.jpg?direct&amp;amp;800x480]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then tinker with the color of the connected point light and adjust the lenght and width of the billboards. This is the hardest and time consuming part about billboards. Make sure to often check in game because billboards look different there and you can see if they look good from every angle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://i1237.photobucket.com/albums/ff478/Khyrpa/WikiTutorial/BB_03.jpg?direct&amp;amp;800x482]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''That was it for simple billboards, but if you continue, you get to the interesting parts!''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create nice billboards, not all of them should be of the same color, so create another point light and connect the billboards that you think need different colors to other point lights (here the billboards on the edges were picked). For simplicitys sake I keep them connected to only 2 point lights, but if you think you need more variation go for more. (Colors changed so you can see better what I did)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://i1237.photobucket.com/albums/ff478/Khyrpa/WikiTutorial/BB_04.jpg?direct&amp;amp;800x479]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Flicker effect''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can create the flickering effect with various methods. First and easiest one would be to use the point lights own flickering settings inside the level editor. Tweak the Off Color and Diffuse Color to suit your liking. Example settings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://i1237.photobucket.com/albums/ff478/Khyrpa/WikiTutorial/BB_05.jpg?nolink&amp;amp;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using the level editor only is not as interesting as randomly changing colors of billboards and every light that acts as the windows shine in sync with script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So next phase would be to set up additional lights to the window, spot light and some ambient point lights in this case. Name them so you can easily track what they are. In this case I named mine like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
window_light_bright_1 (spot light with gobo ('''Rotate the gobo if its upside down'''), I want this bright)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
window_light_bright_2 (point light close to window, bright also)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
window_light_dark_1 (large point light)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://i1237.photobucket.com/albums/ff478/Khyrpa/WikiTutorial/BB_06.jpg?direct&amp;amp;800x480]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then the rest is up to script. Example script for controlling, very simple vers. You can tweak the ideas around alot. Like this one does not change the color of the lights into same color as the billboards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;void FlickerTimer(string &amp;amp;in asTimer) &lt;br /&gt;
{&lt;br /&gt;
float ftimer = RandFloat(0.6f,1.6f);&lt;br /&gt;
FadeLightTo(&amp;quot;bb_bright&amp;quot;, RandFloat(0.2f,0.3f), RandFloat(0.2f,0.35f), RandFloat(0.3f,0.39f), 1, -1, ftimer);&lt;br /&gt;
FadeLightTo(&amp;quot;bb_dark&amp;quot;, RandFloat(0.15f,0.29f), RandFloat(0.18f,0.35f), RandFloat(0.35f,0.39f), 1, -1, ftimer);&lt;br /&gt;
    for(int i=0;i&amp;lt;2;i++) FadeLightTo(&amp;quot;window_light_bright_&amp;quot;+i, RandFloat(0.55f,0.7f), RandFloat(0.69f,0.8f), RandFloat(0.8f,0.9f), 1, -1, ftimer);&lt;br /&gt;
    for(int i=0;i&amp;lt;2;i++) FadeLightTo(&amp;quot;window_light_dark_&amp;quot;+i, RandFloat(0.4f,0.5f), RandFloat(0.5f,0.6f), RandFloat(0.6f,0.7f), 1, -1, ftimer);&lt;br /&gt;
AddTimer(&amp;quot;repeat&amp;quot;, ftimer, &amp;quot;FlickerTimer&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then here is the one I used for the demonstration video clip. (Can cause performance issues when done with lots of billboards and particles, I haven't tested…). Minor tweaking, added spawn areas for particles and finetuned the script for long. The script could be done more efficient, if someone can, please edit!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://i1237.photobucket.com/albums/ff478/Khyrpa/WikiTutorial/BB_07.jpg?direct&amp;amp;800x483]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;void OnEnter()&lt;br /&gt;
{ &lt;br /&gt;
AddTimer(&amp;quot;start&amp;quot;, 0, &amp;quot;FlickerTimer&amp;quot;); //Starts the loop&lt;br /&gt;
SetLocalVarInt(&amp;quot;EventInt&amp;quot;, 1); //sets the timer to loop case 1&lt;br /&gt;
//Spawn particles to bb_particle_+i areas and fog_particle_+i areas&lt;br /&gt;
for(int i=0;i&amp;lt;3;i++) CreateParticleSystemAtEntityExt(&amp;quot;blue_particles&amp;quot;, &amp;quot;ps_light_dust_large.ps&amp;quot;, &amp;quot;bb_particle_&amp;quot;+i, true, 0.6f, 0.75f, 1.0f, 1, true, 1, 2, 8, 11);&lt;br /&gt;
for(int i=0;i&amp;lt;3;i++) CreateParticleSystemAtEntityExt(&amp;quot;blue_fog_particles&amp;quot;, &amp;quot;ps_area_fog.ps&amp;quot;, &amp;quot;fog_particle_&amp;quot;+i, true, 0.6f, 0.75f, 1.0f, 0.8f, true, 1, 2, 8, 11);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
void FlickerTimer(string &amp;amp;in asTimer)&lt;br /&gt;
{&lt;br /&gt;
//This stores the rand float into VarFloat so the amount can be checked later&lt;br /&gt;
SetLocalVarFloat(&amp;quot;CheckBrightness&amp;quot;, RandFloat(0.20f,0.32f));&lt;br /&gt;
//This takes the random float from VarFloat so it can be easily placed into functions&lt;br /&gt;
float fMainColor = GetLocalVarFloat(&amp;quot;CheckBrightness&amp;quot;);&lt;br /&gt;
//This is the color for the bloody red lights for case 2&lt;br /&gt;
float fBloodColor = RandFloat(0.3f,0.45f);&lt;br /&gt;
//This tells how long fading the lights in takes and when the loop timer triggers this again&lt;br /&gt;
float ftimer = RandFloat(0.4f,0.7f);&lt;br /&gt;
//This switch function is placed here so you can easily control the lights and later if necessary, add more cases to have more control&lt;br /&gt;
switch(GetLocalVarInt(&amp;quot;EventInt&amp;quot;))&lt;br /&gt;
{case 1: //This part loops forever when EventInt is 1&lt;br /&gt;
    //These 2 below are for the lights that only control billboards, billboards look brighter than the light source&lt;br /&gt;
    FadeLightTo(&amp;quot;bb_bright&amp;quot;, fMainColor+0.08f, fMainColor+0.05, fMainColor+0.1, 1, -1, ftimer);&lt;br /&gt;
    FadeLightTo(&amp;quot;bb_dark&amp;quot;, fMainColor+0.01f, fMainColor, fMainColor+0.04, 1, -1, ftimer);&lt;br /&gt;
  //To get greater sync and effect, I made these to check when the billboards were bright or dark&lt;br /&gt;
if(GetLocalVarFloat(&amp;quot;CheckBrightness&amp;quot;) &amp;lt;0.26f){&lt;br /&gt;
        for(int i=0;i&amp;lt;2;i++) FadeLightTo(&amp;quot;window_light_bright_&amp;quot;+i, fMainColor+0.22f, fMainColor+0.27f, fMainColor+0.43f, 1, -1, ftimer);&lt;br /&gt;
        for(int i=0;i&amp;lt;2;i++) FadeLightTo(&amp;quot;window_light_dark_&amp;quot;+i, fMainColor+0.13f, fMainColor+0.19f, fMainColor+0.24f, 1, -1, ftimer);&lt;br /&gt;
    }&lt;br /&gt;
  //If you dont use something similar to this, the change in lights stay way too small and it can look stupid&lt;br /&gt;
if(GetLocalVarFloat(&amp;quot;CheckBrightness&amp;quot;)&amp;gt;= 0.26f){&lt;br /&gt;
        for(int i=0;i&amp;lt;2;i++) FadeLightTo(&amp;quot;window_light_bright_&amp;quot;+i, fMainColor+0.31f, fMainColor+0.36f, fMainColor+0.58f, 1, -1, ftimer);&lt;br /&gt;
        for(int i=0;i&amp;lt;2;i++) FadeLightTo(&amp;quot;window_light_dark_&amp;quot;+i, fMainColor+0.2f, fMainColor+0.27f, fMainColor+0.3f, 1, -1, ftimer);&lt;br /&gt;
    }&lt;br /&gt;
    break;&lt;br /&gt;
case 2: //Changes colors to red when EventInt is 2&lt;br /&gt;
    FadeLightTo(&amp;quot;bb_bright&amp;quot;, fBloodColor+0.08f, fBloodColor-0.3f, fBloodColor-0.3f, 1, -1, ftimer+0.3f);&lt;br /&gt;
    FadeLightTo(&amp;quot;bb_dark&amp;quot;, fBloodColor+0.02f, fBloodColor-0.3f, fBloodColor-0.3f, 1, -1, ftimer+0.3f);&lt;br /&gt;
for(int i=0;i&amp;lt;2;i++) FadeLightTo(&amp;quot;window_light_bright_&amp;quot;+i, fBloodColor+0.28f, fBloodColor-0.3f, fBloodColor-0.3f, 1, -1, ftimer+0.5f);&lt;br /&gt;
for(int i=0;i&amp;lt;2;i++) FadeLightTo(&amp;quot;window_light_dark_&amp;quot;+i, fBloodColor+0.15f, fBloodColor-0.3f, fBloodColor-0.3f, 1, -1, ftimer+0.5f);&lt;br /&gt;
    break;&lt;br /&gt;
}&lt;br /&gt;
//This is the actual loop here, there is nothing that will stop this timer so it will all the time (unless RemoveTimer is used)&lt;br /&gt;
AddTimer(&amp;quot;repeat&amp;quot;, ftimer, &amp;quot;FlickerTimer&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
//Below is the script I used to jump to case 2 and red lighting, (Interact callback set inside level editor)&lt;br /&gt;
void Touched(string &amp;amp;in asEntity)&lt;br /&gt;
{&lt;br /&gt;
//Sets EventInt to 2 so case 2: is triggered when the looping timer next time triggers&lt;br /&gt;
SetLocalVarInt(&amp;quot;EventInt&amp;quot;, 2);&lt;br /&gt;
//just a quick effect to make things look better for demonstrations sake...&lt;br /&gt;
StartScreenShake(0.01f, 0.9f, 0.2f, 0.2f);&lt;br /&gt;
//destroyParticles, removes the old light particles outta the way. Takes a long time for the fog to disappear, but I can't help that&lt;br /&gt;
DestroyParticleSystem(&amp;quot;blue_particles&amp;quot;);&lt;br /&gt;
DestroyParticleSystem(&amp;quot;blue_fog_particles&amp;quot;);&lt;br /&gt;
//create new ones, this had to be placed inside the callback because looping timer would just create new ones ontop each time it loops&lt;br /&gt;
for(int i=0;i&amp;lt;3;i++) CreateParticleSystemAtEntityExt(&amp;quot;red_particles&amp;quot;, &amp;quot;ps_light_dust_large.ps&amp;quot;, &amp;quot;bb_particle_&amp;quot;+i, true, 1.0f, 0.1f, 0.1f, 1, true, 1, 2, 8, 11);&lt;br /&gt;
for(int i=0;i&amp;lt;3;i++) CreateParticleSystemAtEntityExt(&amp;quot;red_particles&amp;quot;, &amp;quot;ps_area_fog.ps&amp;quot;, &amp;quot;fog_particle_&amp;quot;+i, true, 1.0f, 0.1f, 0.1f, 0.9f, true, 1, 2, 8, 11);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So in the end that loop could control all the billboards and lights needed in a map. The flickering effect might be very small buff to levels looks for the headache it could cause, but keeping billboards connected into lights makes changing colors '''MILLION ''' times more pleasant. It can also be used to for example: cool scares and changing light coming from outside from day to night&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6826</id>
		<title>HPL2/Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6826"/>
		<updated>2024-06-07T09:42:27Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: /* Video tutorials */ remove link which was replaced by an inlined list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists a large amount of tutorials, most of which are community-made.&lt;br /&gt;
&lt;br /&gt;
Don't know where to start? Check out [https://www.youtube.com/playlist?list=PLIYfl4qBRihBjRpmQL-izQ4xdAtLblU36 Mudbill's video tutorial series].&lt;br /&gt;
&lt;br /&gt;
{{tip|If you can't find a tutorial for what you need, make sure to check the [[HPL2/Tools#Editors|Editor documentation]] and [[HPL2/TDD#Documentation|Engine documentation]].  An example of this would be the Particle Editor.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Text tutorials==&lt;br /&gt;
&lt;br /&gt;
===Level Editor===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_1|Tutorial 1]] - The minimum required to get a level that can load.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_2|Tutorial 2]] - Placement of lights and advanced setup of lights.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_3|Tutorial 3]] - How to make an outdoor environment. There's a [[Hpl2:Tutorials:level_editor:outdoors|newer version of i]]t available.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_4|Tutorial 4]] - Explains how to make water.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_5|Tutorial 5]] - Prop dimensions and detailing your map.&lt;br /&gt;
*[[Hpl2:Tutorials:level editor:tutorial 6|Tutorial 6]] - ???????&lt;br /&gt;
*[[HPL2/Tutorials/Skyboxes|Tutorial 7]] - Making skyboxes for HPL2&lt;br /&gt;
*[[HPL2/Tutorials/Level Design]] - Using all of the basic techniques to achieve good effects&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:level_editor_101|Level Editor 101]] - All the basics and some more advanced techniques.&lt;br /&gt;
&lt;br /&gt;
===Model Editor===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_1|Basic tutorial]] - The minimum required to load a model as an entity with collision and game properties.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_2|Creating Ragdoll Entities]] - How to create full physics-based entities.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:static_objects_jenniferorange|Making Items Static]] - How to change an items' properties to static.&lt;br /&gt;
*[[HPL2/Tutorials/Coin_chests | Coin chests]] - How to create chests that can be only opened with coins.&lt;br /&gt;
&lt;br /&gt;
===Material Editor===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:material_editor:tutorial_1|Tutorial 1]] - Basic materials and their properties.&lt;br /&gt;
*[[Hpl2:Tutorials:material editor:creating mirrors|Creating mirrors]] - make reflective surfaces using water materials&lt;br /&gt;
&lt;br /&gt;
===Game files===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:CustomSounds|How to create Custom Sounds]] - Teaches how to create custom sounds for your custom story.&lt;br /&gt;
*[[:hpl2:tutorials:script:howtomakenotes|How to Create Notes and Journal Entries]] - Explains how to make journal entries and place them in a map&lt;br /&gt;
*[[HPL2/Tutorials/Porting MFP Assets|Porting MFP Assets]] - explains how to copy assets from MFP to TDD and avoid issues&lt;br /&gt;
*[[HPL2/Tutorials/Convert HDRI to skyboxes|Convert HDRI to skyboxes]]&lt;br /&gt;
&lt;br /&gt;
===Scripting tutorials===&lt;br /&gt;
General basics:&lt;br /&gt;
&lt;br /&gt;
*[[HPL2/Tutorials/Scripts/Debugging|Make your set-up comfortable for scripting]]&lt;br /&gt;
*[[:hpl2:tutorials:script:entihscript_beginner|Newbie's Guide to Scripting]] - A tutorial for those new to scripting, focusing on syntax and a few helpful hints - ''By 'Entih''&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorial_1|Tutorial 1]] - Using a tutorial level, with some objects to make basic scripts.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:messages_jenniferorange|Activating/Using Message Pop-Ups]] - Explains how to activate a message to appear when walking into a script area.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:triggering_monsters_on_entities|Triggering monsters on entities]] - Explains how to trigger an event after picking up an item.&lt;br /&gt;
&lt;br /&gt;
Door-related script tutorials:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:scripting_by_xtron_-_item_that_unlocks_a_door|Item That Unlocks a Door]] - How to make an item that unlocks a certain door.&lt;br /&gt;
*[[:hpl2:tutorials:script:buttons_that_open_a_door|Buttons that open door]]s - Explains how to make buttons that open doors.&lt;br /&gt;
*[[:hpl2:tutorials:script:events|Scary door events]] - Explains how to make scary door events.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:crowbartutorialjenniferorange|Using A Crowbar On A Door]] - Explains how to script a crowbar to blow open a door.&lt;br /&gt;
*[[:hpl2:tutorials:script:adding_messages_to_locked_doors|Adding Messages To Locked Doors]] - Explains how to display a message when a player tries to open a locked door.&lt;br /&gt;
&lt;br /&gt;
Useful coding practices:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:forloop|The &amp;quot;For&amp;quot; loop]] - Explains how and when to use the &amp;quot;for&amp;quot; loop.&lt;br /&gt;
*[[:hpl2:tutorials:script:advancedtimers|Advanced Timers]] - Explains how to use multiple timers in one function.&lt;br /&gt;
*[[:hpl2:tutorials:script:localandglobalvariables|Local and Global Variables]] - Explains what they are and how to use them correctly.&lt;br /&gt;
*[[:hpl2:tutorials:script:sequences|Scripting Sequences]] - Explains how to build simple and easy to use cutscenes, or sequences for your mod.&lt;br /&gt;
&lt;br /&gt;
Forces and impulses:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:force|Impulse and forces]] - Explains how to use force and impulse.&lt;br /&gt;
*[[:hpl2:tutorials:script:pushdoorsopen|Push doors open using force]] - Explains how to use Force to open doors and entities.&lt;br /&gt;
*[[Hpl2:Tutorials:level_editor:dynamic_curtains|Dynamic curtains]] - Using force to simulate wind&lt;br /&gt;
*[[:hpl2:tutorials:script:disable_gravity_tutorial|&amp;quot;Disable&amp;quot; gravity and make objects float]] - Make entities seem to float using timer functions and forces&lt;br /&gt;
&lt;br /&gt;
Other:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:monsterpathnodes|Monster Path Nodes]] - Explains how to set up a monster's path and how to trigger it.&lt;br /&gt;
*[[:hpl2:tutorials:script:levers_and_secretshelfs|Levers and secret bookshelves]] - Explains how to make a lever that opens a bookshelf.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:scaresbyjenniferorange|Scares]] - Explains in as much detail as possible the multiple scares you can use without having to bring out the monsters.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:combininghammerchipperjenniferorange|Combining The Hammer And Chipper]] - Explains how to combine your hammer and chipper in your inventory.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:checkpoints_using_scriptarea_s|Checkpoints using Areas]] - Explains how to make a checkpoint using Areas.&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorialsformainmenu|How to create your own Main Menu Backgrounds!]] - The usability of Amnesia's .cfg files and its Editors&lt;br /&gt;
*[[HPL2/Tutorials/ShowScreenImage()|ShowScreenImage()]] - Some notes about the ShowScreenImage() function new to ATTD in version 1.5 (and also AAMFP).&lt;br /&gt;
&lt;br /&gt;
===Modeling===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:modeling:tutorialoutsource|Modeling tutorial]] - Initially written for outsourcers.&lt;br /&gt;
&lt;br /&gt;
==Video tutorials==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;del&amp;gt;Crossed-out videos&amp;lt;/del&amp;gt; are unavailable or privated (as of June 2024).&lt;br /&gt;
&lt;br /&gt;
===Sublists===&lt;br /&gt;
&lt;br /&gt;
*[https://www.youtube.com/playlist?list=PLIYfl4qBRihBjRpmQL-izQ4xdAtLblU36 Large playlist of video tutorials for beginners and intermediate developers] - ''By Mudbill''&lt;br /&gt;
*[http://www.youtube.com/playlist?list=PLD326789BC99530C8 From Noob to Pro: Amnesia Custom Story Creation Series] - ''By YourComputer''&lt;br /&gt;
&lt;br /&gt;
===By Khyrpa===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=1R2F2eVmJ5k Building and Lighting in The Level Editor]&amp;lt;/del&amp;gt;&lt;br /&gt;
*[http://www.youtube.com/watch?v=d2ShkLEgGNk Lighting in Level Editor]&lt;br /&gt;
*[http://www.youtube.com/watch?v=u8EhP59tmjA Billboards]&lt;br /&gt;
*[http://www.youtube.com/watch?v=LKxzoAIK8jA Advanced Candle Light Connecting]&lt;br /&gt;
*[http://www.youtube.com/watch?v=xIDCoEZ581Q Wind Scare (Part 1)]&lt;br /&gt;
*[http://www.youtube.com/watch?v=Kj-NFkIGafI Wind Scare (Part 2)]&lt;br /&gt;
&lt;br /&gt;
===Various authors===&lt;br /&gt;
&lt;br /&gt;
*[http://www.youtube.com/watch?v=0grr7uipnk0 How To Create a Custom Story] - ''By TheVegaNVega''&lt;br /&gt;
*[http://www.youtube.com/watch?v=uGCTwQQSZ0A How To Make Journal Entries/Notes] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=WfgFEG4TSCE How To Make Journal Entries/Mementos] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=puIfVx0lslA How To Convert a Custom Story To a Full Conversion] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=9uKBYVEyw1s How to convert cube map images to DDS format in the GIMP] - ''By YourComputer''&lt;br /&gt;
*[http://www.youtube.com/watch?v=EnCAbgTY6d8 Adding Voice to your Diaries] - ''By triadtimes''&lt;br /&gt;
*[http://www.youtube.com/watch?v=vQEdIAZw5gM&amp;amp;feature=plcp&amp;amp;context=C4347014VDvjVQa1PpcFNKLAyG_d-p_QR49e20E_Wo08wpqmVkJz0= How to create a custom main menu background] - ''By CTCommunity''&lt;br /&gt;
*[http://youtu.be/Crx5Qd7AgJ0 Using Prop Force: How Do I Know Which Coordinate To Put My Value In?] - ''By JenniferOrange''&lt;br /&gt;
&lt;br /&gt;
===By MulleDK19===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/Tutorial1.wmv Make a key unlock a specific door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/Tutorial2.wmv How to create and use Areas or Triggers]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial1.wmv Using the Level Editor (Part 1)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial2.wmv Using the Level Editor (Part 2)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial3.wmv Using the Level Editor (Part 3)]&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===By Simpanra===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=CklTIT2W4g4 How To Make Level Door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=ABI7NUqkXW0 How To Get a Key To Unlock a Door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=v4WudNebX08 How To Make Water]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=ESISPLDbMWM How To Make a Custom Story Background]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=RmIKTH9YRqk How To Make a Functional and Interactable Ladder]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=riFwThqQ68k How To Name and Describe Keys]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=M5x_taEkP8s Simple Script Function]&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===By Elven===&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/user/elvengames Youtube Channel link]&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=jGJluxjcGCg Basics of the Basic]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=IKJIT05V00Y When is it syntax and when not?]&amp;lt;/del&amp;gt; &lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=1x3mTmvbSmc Make your life easier: Notepad++ with plugin &amp;amp; Debugging]&amp;lt;/del&amp;gt; &lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=zDhPJByYAec So, how the duckling I install hps support?]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=Pv9GK5Gh4Bw Scripting Functions (intro)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=yYPfWC5nCrk Timers]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=EhUjbK_vEhM Piano Scare (Request)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=jPaRHHlepKw Adding Credits]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=bTzWAQJMnz8 Setting up development mode]&amp;lt;/del&amp;gt; &lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=idK5VSTqDrs Loopable timers - LIMITED EDITION (Specific amount of times)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=DeoDFmcVU8U&amp;amp;feature=youtu.be Hallucination monster scare!]&amp;lt;/del&amp;gt;&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6825</id>
		<title>HPL2/Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6825"/>
		<updated>2024-06-07T09:42:04Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Move stuff to the intro section, add elven's tutorials as a list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists a large amount of tutorials, most of which are community-made.&lt;br /&gt;
&lt;br /&gt;
Don't know where to start? Check out [https://www.youtube.com/playlist?list=PLIYfl4qBRihBjRpmQL-izQ4xdAtLblU36 Mudbill's video tutorial series].&lt;br /&gt;
&lt;br /&gt;
{{tip|If you can't find a tutorial for what you need, make sure to check the [[HPL2/Tools#Editors|Editor documentation]] and [[HPL2/TDD#Documentation|Engine documentation]].  An example of this would be the Particle Editor.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Text tutorials==&lt;br /&gt;
&lt;br /&gt;
===Level Editor===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_1|Tutorial 1]] - The minimum required to get a level that can load.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_2|Tutorial 2]] - Placement of lights and advanced setup of lights.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_3|Tutorial 3]] - How to make an outdoor environment. There's a [[Hpl2:Tutorials:level_editor:outdoors|newer version of i]]t available.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_4|Tutorial 4]] - Explains how to make water.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_5|Tutorial 5]] - Prop dimensions and detailing your map.&lt;br /&gt;
*[[Hpl2:Tutorials:level editor:tutorial 6|Tutorial 6]] - ???????&lt;br /&gt;
*[[HPL2/Tutorials/Skyboxes|Tutorial 7]] - Making skyboxes for HPL2&lt;br /&gt;
*[[HPL2/Tutorials/Level Design]] - Using all of the basic techniques to achieve good effects&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:level_editor_101|Level Editor 101]] - All the basics and some more advanced techniques.&lt;br /&gt;
&lt;br /&gt;
===Model Editor===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_1|Basic tutorial]] - The minimum required to load a model as an entity with collision and game properties.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_2|Creating Ragdoll Entities]] - How to create full physics-based entities.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:static_objects_jenniferorange|Making Items Static]] - How to change an items' properties to static.&lt;br /&gt;
*[[HPL2/Tutorials/Coin_chests | Coin chests]] - How to create chests that can be only opened with coins.&lt;br /&gt;
&lt;br /&gt;
===Material Editor===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:material_editor:tutorial_1|Tutorial 1]] - Basic materials and their properties.&lt;br /&gt;
*[[Hpl2:Tutorials:material editor:creating mirrors|Creating mirrors]] - make reflective surfaces using water materials&lt;br /&gt;
&lt;br /&gt;
===Game files===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:CustomSounds|How to create Custom Sounds]] - Teaches how to create custom sounds for your custom story.&lt;br /&gt;
*[[:hpl2:tutorials:script:howtomakenotes|How to Create Notes and Journal Entries]] - Explains how to make journal entries and place them in a map&lt;br /&gt;
*[[HPL2/Tutorials/Porting MFP Assets|Porting MFP Assets]] - explains how to copy assets from MFP to TDD and avoid issues&lt;br /&gt;
*[[HPL2/Tutorials/Convert HDRI to skyboxes|Convert HDRI to skyboxes]]&lt;br /&gt;
&lt;br /&gt;
===Scripting tutorials===&lt;br /&gt;
General basics:&lt;br /&gt;
&lt;br /&gt;
*[[HPL2/Tutorials/Scripts/Debugging|Make your set-up comfortable for scripting]]&lt;br /&gt;
*[[:hpl2:tutorials:script:entihscript_beginner|Newbie's Guide to Scripting]] - A tutorial for those new to scripting, focusing on syntax and a few helpful hints - ''By 'Entih''&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorial_1|Tutorial 1]] - Using a tutorial level, with some objects to make basic scripts.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:messages_jenniferorange|Activating/Using Message Pop-Ups]] - Explains how to activate a message to appear when walking into a script area.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:triggering_monsters_on_entities|Triggering monsters on entities]] - Explains how to trigger an event after picking up an item.&lt;br /&gt;
&lt;br /&gt;
Door-related script tutorials:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:scripting_by_xtron_-_item_that_unlocks_a_door|Item That Unlocks a Door]] - How to make an item that unlocks a certain door.&lt;br /&gt;
*[[:hpl2:tutorials:script:buttons_that_open_a_door|Buttons that open door]]s - Explains how to make buttons that open doors.&lt;br /&gt;
*[[:hpl2:tutorials:script:events|Scary door events]] - Explains how to make scary door events.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:crowbartutorialjenniferorange|Using A Crowbar On A Door]] - Explains how to script a crowbar to blow open a door.&lt;br /&gt;
*[[:hpl2:tutorials:script:adding_messages_to_locked_doors|Adding Messages To Locked Doors]] - Explains how to display a message when a player tries to open a locked door.&lt;br /&gt;
&lt;br /&gt;
Useful coding practices:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:forloop|The &amp;quot;For&amp;quot; loop]] - Explains how and when to use the &amp;quot;for&amp;quot; loop.&lt;br /&gt;
*[[:hpl2:tutorials:script:advancedtimers|Advanced Timers]] - Explains how to use multiple timers in one function.&lt;br /&gt;
*[[:hpl2:tutorials:script:localandglobalvariables|Local and Global Variables]] - Explains what they are and how to use them correctly.&lt;br /&gt;
*[[:hpl2:tutorials:script:sequences|Scripting Sequences]] - Explains how to build simple and easy to use cutscenes, or sequences for your mod.&lt;br /&gt;
&lt;br /&gt;
Forces and impulses:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:force|Impulse and forces]] - Explains how to use force and impulse.&lt;br /&gt;
*[[:hpl2:tutorials:script:pushdoorsopen|Push doors open using force]] - Explains how to use Force to open doors and entities.&lt;br /&gt;
*[[Hpl2:Tutorials:level_editor:dynamic_curtains|Dynamic curtains]] - Using force to simulate wind&lt;br /&gt;
*[[:hpl2:tutorials:script:disable_gravity_tutorial|&amp;quot;Disable&amp;quot; gravity and make objects float]] - Make entities seem to float using timer functions and forces&lt;br /&gt;
&lt;br /&gt;
Other:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:monsterpathnodes|Monster Path Nodes]] - Explains how to set up a monster's path and how to trigger it.&lt;br /&gt;
*[[:hpl2:tutorials:script:levers_and_secretshelfs|Levers and secret bookshelves]] - Explains how to make a lever that opens a bookshelf.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:scaresbyjenniferorange|Scares]] - Explains in as much detail as possible the multiple scares you can use without having to bring out the monsters.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:combininghammerchipperjenniferorange|Combining The Hammer And Chipper]] - Explains how to combine your hammer and chipper in your inventory.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:checkpoints_using_scriptarea_s|Checkpoints using Areas]] - Explains how to make a checkpoint using Areas.&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorialsformainmenu|How to create your own Main Menu Backgrounds!]] - The usability of Amnesia's .cfg files and its Editors&lt;br /&gt;
*[[HPL2/Tutorials/ShowScreenImage()|ShowScreenImage()]] - Some notes about the ShowScreenImage() function new to ATTD in version 1.5 (and also AAMFP).&lt;br /&gt;
&lt;br /&gt;
===Modeling===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:modeling:tutorialoutsource|Modeling tutorial]] - Initially written for outsourcers.&lt;br /&gt;
&lt;br /&gt;
==Video tutorials==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;del&amp;gt;Crossed-out videos&amp;lt;/del&amp;gt; are unavailable or privated (as of June 2024).&lt;br /&gt;
&lt;br /&gt;
===Sublists===&lt;br /&gt;
&lt;br /&gt;
*[https://www.youtube.com/playlist?list=PLIYfl4qBRihBjRpmQL-izQ4xdAtLblU36 Large playlist of video tutorials for beginners and intermediate developers] - ''By Mudbill''&lt;br /&gt;
*[[Hpl2:Tutorials:script:elventutorials|Elven's tutorials]]&lt;br /&gt;
*[http://www.youtube.com/playlist?list=PLD326789BC99530C8 From Noob to Pro: Amnesia Custom Story Creation Series] - ''By YourComputer''&lt;br /&gt;
&lt;br /&gt;
===By Khyrpa===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=1R2F2eVmJ5k Building and Lighting in The Level Editor]&amp;lt;/del&amp;gt;&lt;br /&gt;
*[http://www.youtube.com/watch?v=d2ShkLEgGNk Lighting in Level Editor]&lt;br /&gt;
*[http://www.youtube.com/watch?v=u8EhP59tmjA Billboards]&lt;br /&gt;
*[http://www.youtube.com/watch?v=LKxzoAIK8jA Advanced Candle Light Connecting]&lt;br /&gt;
*[http://www.youtube.com/watch?v=xIDCoEZ581Q Wind Scare (Part 1)]&lt;br /&gt;
*[http://www.youtube.com/watch?v=Kj-NFkIGafI Wind Scare (Part 2)]&lt;br /&gt;
&lt;br /&gt;
===Various authors===&lt;br /&gt;
&lt;br /&gt;
*[http://www.youtube.com/watch?v=0grr7uipnk0 How To Create a Custom Story] - ''By TheVegaNVega''&lt;br /&gt;
*[http://www.youtube.com/watch?v=uGCTwQQSZ0A How To Make Journal Entries/Notes] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=WfgFEG4TSCE How To Make Journal Entries/Mementos] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=puIfVx0lslA How To Convert a Custom Story To a Full Conversion] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=9uKBYVEyw1s How to convert cube map images to DDS format in the GIMP] - ''By YourComputer''&lt;br /&gt;
*[http://www.youtube.com/watch?v=EnCAbgTY6d8 Adding Voice to your Diaries] - ''By triadtimes''&lt;br /&gt;
*[http://www.youtube.com/watch?v=vQEdIAZw5gM&amp;amp;feature=plcp&amp;amp;context=C4347014VDvjVQa1PpcFNKLAyG_d-p_QR49e20E_Wo08wpqmVkJz0= How to create a custom main menu background] - ''By CTCommunity''&lt;br /&gt;
*[http://youtu.be/Crx5Qd7AgJ0 Using Prop Force: How Do I Know Which Coordinate To Put My Value In?] - ''By JenniferOrange''&lt;br /&gt;
&lt;br /&gt;
===By MulleDK19===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/Tutorial1.wmv Make a key unlock a specific door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/Tutorial2.wmv How to create and use Areas or Triggers]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial1.wmv Using the Level Editor (Part 1)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial2.wmv Using the Level Editor (Part 2)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial3.wmv Using the Level Editor (Part 3)]&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===By Simpanra===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=CklTIT2W4g4 How To Make Level Door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=ABI7NUqkXW0 How To Get a Key To Unlock a Door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=v4WudNebX08 How To Make Water]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=ESISPLDbMWM How To Make a Custom Story Background]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=RmIKTH9YRqk How To Make a Functional and Interactable Ladder]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=riFwThqQ68k How To Name and Describe Keys]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=M5x_taEkP8s Simple Script Function]&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===By Elven===&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/user/elvengames Youtube Channel link]&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=jGJluxjcGCg Basics of the Basic]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=IKJIT05V00Y When is it syntax and when not?]&amp;lt;/del&amp;gt; &lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=1x3mTmvbSmc Make your life easier: Notepad++ with plugin &amp;amp; Debugging]&amp;lt;/del&amp;gt; &lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=zDhPJByYAec So, how the duckling I install hps support?]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=Pv9GK5Gh4Bw Scripting Functions (intro)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=yYPfWC5nCrk Timers]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=EhUjbK_vEhM Piano Scare (Request)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=jPaRHHlepKw Adding Credits]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=bTzWAQJMnz8 Setting up development mode]&amp;lt;/del&amp;gt; &lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=idK5VSTqDrs Loopable timers - LIMITED EDITION (Specific amount of times)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=DeoDFmcVU8U&amp;amp;feature=youtu.be Hallucination monster scare!]&amp;lt;/del&amp;gt;&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6824</id>
		<title>HPL2/Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6824"/>
		<updated>2024-06-07T09:23:41Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Text tutorials==&lt;br /&gt;
&lt;br /&gt;
This page lists a large amount of tutorials, most of which are community-made. Feel free to check them out and see if they can teach you something. If you've made a tutorial and wish to add it to this page, you can do so by editing it to the right. Just try to keep to the same format as the rest of the page.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you can't find a tutorial for what you need, make sure to check the [[HPL2/Tools#Editors|Editor documentation]] and [[HPL2/TDD#Documentation|Engine documentation]].  An example of this would be the Particle Editor.}}&lt;br /&gt;
&lt;br /&gt;
===Level Editor===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_1|Tutorial 1]] - The minimum required to get a level that can load.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_2|Tutorial 2]] - Placement of lights and advanced setup of lights.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_3|Tutorial 3]] - How to make an outdoor environment. There's a [[Hpl2:Tutorials:level_editor:outdoors|newer version of i]]t available.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_4|Tutorial 4]] - Explains how to make water.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_5|Tutorial 5]] - Prop dimensions and detailing your map.&lt;br /&gt;
*[[Hpl2:Tutorials:level editor:tutorial 6|Tutorial 6]] - ???????&lt;br /&gt;
*[[HPL2/Tutorials/Skyboxes|Tutorial 7]] - Making skyboxes for HPL2&lt;br /&gt;
*[[HPL2/Tutorials/Level Design]] - Using all of the basic techniques to achieve good effects&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:level_editor_101|Level Editor 101]] - All the basics and some more advanced techniques.&lt;br /&gt;
&lt;br /&gt;
===Model Editor===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_1|Basic tutorial]] - The minimum required to load a model as an entity with collision and game properties.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_2|Creating Ragdoll Entities]] - How to create full physics-based entities.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:static_objects_jenniferorange|Making Items Static]] - How to change an items' properties to static.&lt;br /&gt;
*[[HPL2/Tutorials/Coin_chests | Coin chests]] - How to create chests that can be only opened with coins.&lt;br /&gt;
&lt;br /&gt;
===Material Editor===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:material_editor:tutorial_1|Tutorial 1]] - Basic materials and their properties.&lt;br /&gt;
*[[Hpl2:Tutorials:material editor:creating mirrors|Creating mirrors]] - make reflective surfaces using water materials&lt;br /&gt;
&lt;br /&gt;
===Game files===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:CustomSounds|How to create Custom Sounds]] - Teaches how to create custom sounds for your custom story.&lt;br /&gt;
*[[:hpl2:tutorials:script:howtomakenotes|How to Create Notes and Journal Entries]] - Explains how to make journal entries and place them in a map&lt;br /&gt;
*[[HPL2/Tutorials/Porting MFP Assets|Porting MFP Assets]] - explains how to copy assets from MFP to TDD and avoid issues&lt;br /&gt;
*[[HPL2/Tutorials/Convert HDRI to skyboxes|Convert HDRI to skyboxes]]&lt;br /&gt;
&lt;br /&gt;
===Scripting tutorials===&lt;br /&gt;
General basics:&lt;br /&gt;
&lt;br /&gt;
*[[HPL2/Tutorials/Scripts/Debugging|Make your set-up comfortable for scripting]]&lt;br /&gt;
*[[:hpl2:tutorials:script:entihscript_beginner|Newbie's Guide to Scripting]] - A tutorial for those new to scripting, focusing on syntax and a few helpful hints - ''By 'Entih''&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorial_1|Tutorial 1]] - Using a tutorial level, with some objects to make basic scripts.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:messages_jenniferorange|Activating/Using Message Pop-Ups]] - Explains how to activate a message to appear when walking into a script area.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:triggering_monsters_on_entities|Triggering monsters on entities]] - Explains how to trigger an event after picking up an item.&lt;br /&gt;
&lt;br /&gt;
Door-related script tutorials:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:scripting_by_xtron_-_item_that_unlocks_a_door|Item That Unlocks a Door]] - How to make an item that unlocks a certain door.&lt;br /&gt;
*[[:hpl2:tutorials:script:buttons_that_open_a_door|Buttons that open door]]s - Explains how to make buttons that open doors.&lt;br /&gt;
*[[:hpl2:tutorials:script:events|Scary door events]] - Explains how to make scary door events.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:crowbartutorialjenniferorange|Using A Crowbar On A Door]] - Explains how to script a crowbar to blow open a door.&lt;br /&gt;
*[[:hpl2:tutorials:script:adding_messages_to_locked_doors|Adding Messages To Locked Doors]] - Explains how to display a message when a player tries to open a locked door.&lt;br /&gt;
&lt;br /&gt;
Useful coding practices:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:forloop|The &amp;quot;For&amp;quot; loop]] - Explains how and when to use the &amp;quot;for&amp;quot; loop.&lt;br /&gt;
*[[:hpl2:tutorials:script:advancedtimers|Advanced Timers]] - Explains how to use multiple timers in one function.&lt;br /&gt;
*[[:hpl2:tutorials:script:localandglobalvariables|Local and Global Variables]] - Explains what they are and how to use them correctly.&lt;br /&gt;
*[[:hpl2:tutorials:script:sequences|Scripting Sequences]] - Explains how to build simple and easy to use cutscenes, or sequences for your mod.&lt;br /&gt;
&lt;br /&gt;
Forces and impulses:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:force|Impulse and forces]] - Explains how to use force and impulse.&lt;br /&gt;
*[[:hpl2:tutorials:script:pushdoorsopen|Push doors open using force]] - Explains how to use Force to open doors and entities.&lt;br /&gt;
*[[Hpl2:Tutorials:level_editor:dynamic_curtains|Dynamic curtains]] - Using force to simulate wind&lt;br /&gt;
*[[:hpl2:tutorials:script:disable_gravity_tutorial|&amp;quot;Disable&amp;quot; gravity and make objects float]] - Make entities seem to float using timer functions and forces&lt;br /&gt;
&lt;br /&gt;
Other:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:monsterpathnodes|Monster Path Nodes]] - Explains how to set up a monster's path and how to trigger it.&lt;br /&gt;
*[[:hpl2:tutorials:script:levers_and_secretshelfs|Levers and secret bookshelves]] - Explains how to make a lever that opens a bookshelf.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:scaresbyjenniferorange|Scares]] - Explains in as much detail as possible the multiple scares you can use without having to bring out the monsters.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:combininghammerchipperjenniferorange|Combining The Hammer And Chipper]] - Explains how to combine your hammer and chipper in your inventory.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:checkpoints_using_scriptarea_s|Checkpoints using Areas]] - Explains how to make a checkpoint using Areas.&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorialsformainmenu|How to create your own Main Menu Backgrounds!]] - The usability of Amnesia's .cfg files and its Editors&lt;br /&gt;
*[[HPL2/Tutorials/ShowScreenImage()|ShowScreenImage()]] - Some notes about the ShowScreenImage() function new to ATTD in version 1.5 (and also AAMFP).&lt;br /&gt;
&lt;br /&gt;
===Modeling===&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:modeling:tutorialoutsource|Modeling tutorial]] - Initially written for outsourcers.&lt;br /&gt;
&lt;br /&gt;
==Video tutorials==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;del&amp;gt;Crossed-out videos&amp;lt;/del&amp;gt; are unavailable or privated (as of June 2024).&lt;br /&gt;
&lt;br /&gt;
===Sublists===&lt;br /&gt;
&lt;br /&gt;
*'''Recommended: [https://www.youtube.com/playlist?list=PLIYfl4qBRihBjRpmQL-izQ4xdAtLblU36 Large playlist of video tutorials for beginners and intermediate developers] - By Mudbill'''&lt;br /&gt;
*[[Hpl2:Tutorials:script:elventutorials|Elven's tutorials]]&lt;br /&gt;
*[http://www.youtube.com/playlist?list=PLD326789BC99530C8 From Noob to Pro: Amnesia Custom Story Creation Series] - ''By YourComputer''&lt;br /&gt;
&lt;br /&gt;
===By Khyrpa===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=1R2F2eVmJ5k Building and Lighting in The Level Editor]&amp;lt;/del&amp;gt;&lt;br /&gt;
*[http://www.youtube.com/watch?v=d2ShkLEgGNk Lighting in Level Editor]&lt;br /&gt;
*[http://www.youtube.com/watch?v=u8EhP59tmjA Billboards]&lt;br /&gt;
*[http://www.youtube.com/watch?v=LKxzoAIK8jA Advanced Candle Light Connecting]&lt;br /&gt;
*[http://www.youtube.com/watch?v=xIDCoEZ581Q Wind Scare (Part 1)]&lt;br /&gt;
*[http://www.youtube.com/watch?v=Kj-NFkIGafI Wind Scare (Part 2)]&lt;br /&gt;
&lt;br /&gt;
===Various authors===&lt;br /&gt;
&lt;br /&gt;
*[http://www.youtube.com/watch?v=0grr7uipnk0 How To Create a Custom Story] - ''By TheVegaNVega''&lt;br /&gt;
*[http://www.youtube.com/watch?v=uGCTwQQSZ0A How To Make Journal Entries/Notes] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=WfgFEG4TSCE How To Make Journal Entries/Mementos] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=puIfVx0lslA How To Convert a Custom Story To a Full Conversion] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=9uKBYVEyw1s How to convert cube map images to DDS format in the GIMP] - ''By YourComputer''&lt;br /&gt;
*[http://www.youtube.com/watch?v=EnCAbgTY6d8 Adding Voice to your Diaries] - ''By triadtimes''&lt;br /&gt;
*[http://www.youtube.com/watch?v=vQEdIAZw5gM&amp;amp;feature=plcp&amp;amp;context=C4347014VDvjVQa1PpcFNKLAyG_d-p_QR49e20E_Wo08wpqmVkJz0= How to create a custom main menu background] - ''By CTCommunity''&lt;br /&gt;
*[http://youtu.be/Crx5Qd7AgJ0 Using Prop Force: How Do I Know Which Coordinate To Put My Value In?] - ''By JenniferOrange''&lt;br /&gt;
&lt;br /&gt;
===By MulleDK19===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/Tutorial1.wmv Make a key unlock a specific door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/Tutorial2.wmv How to create and use Areas or Triggers]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial1.wmv Using the Level Editor (Part 1)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial2.wmv Using the Level Editor (Part 2)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial3.wmv Using the Level Editor (Part 3)]&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===By Simpanra===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=CklTIT2W4g4 How To Make Level Door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=ABI7NUqkXW0 How To Get a Key To Unlock a Door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=v4WudNebX08 How To Make Water]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=ESISPLDbMWM How To Make a Custom Story Background]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=RmIKTH9YRqk How To Make a Functional and Interactable Ladder]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=riFwThqQ68k How To Name and Describe Keys]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=M5x_taEkP8s Simple Script Function]&amp;lt;/del&amp;gt;&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6823</id>
		<title>HPL2/Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6823"/>
		<updated>2024-06-07T08:59:08Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: highlight mudbill's tutorials&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Text tutorials=&lt;br /&gt;
&lt;br /&gt;
This page lists a large amount of tutorials, most of which are community-made. Feel free to check them out and see if they can teach you something. If you've made a tutorial and wish to add it to this page, you can do so by editing it to the right. Just try to keep to the same format as the rest of the page.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you can't find a tutorial for what you need, make sure to check the [[HPL2/Tools#Editors|Editor documentation]] and [[HPL2/TDD#Documentation|Engine documentation]].  An example of this would be the Particle Editor.}}&lt;br /&gt;
&lt;br /&gt;
==Level Editor==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_1|Tutorial 1]] - The minimum required to get a level that can load.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_2|Tutorial 2]] - Placement of lights and advanced setup of lights.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_3|Tutorial 3]] - How to make an outdoor environment. There's a [[Hpl2:Tutorials:level_editor:outdoors|newer version of i]]t available.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_4|Tutorial 4]] - Explains how to make water.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_5|Tutorial 5]] - Prop dimensions and detailing your map.&lt;br /&gt;
*[[Hpl2:Tutorials:level editor:tutorial 6|Tutorial 6]] - ???????&lt;br /&gt;
*[[HPL2/Tutorials/Skyboxes|Tutorial 7]] - Making skyboxes for HPL2&lt;br /&gt;
*[[HPL2/Tutorials/Level Design]] - Using all of the basic techniques to achieve good effects&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:level_editor_101|Level Editor 101]] - All the basics and some more advanced techniques.&lt;br /&gt;
&lt;br /&gt;
==Model Editor==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_1|Basic tutorial]] - The minimum required to load a model as an entity with collision and game properties.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_2|Creating Ragdoll Entities]] - How to create full physics-based entities.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:static_objects_jenniferorange|Making Items Static]] - How to change an items' properties to static.&lt;br /&gt;
*[[HPL2/Tutorials/Coin_chests | Coin chests]] - How to create chests that can be only opened with coins.&lt;br /&gt;
&lt;br /&gt;
==Material Editor==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:material_editor:tutorial_1|Tutorial 1]] - Basic materials and their properties.&lt;br /&gt;
*[[Hpl2:Tutorials:material editor:creating mirrors|Creating mirrors]] - make reflective surfaces using water materials&lt;br /&gt;
&lt;br /&gt;
==Game files==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:CustomSounds|How to create Custom Sounds]] - Teaches how to create custom sounds for your custom story.&lt;br /&gt;
*[[:hpl2:tutorials:script:howtomakenotes|How to Create Notes and Journal Entries]] - Explains how to make journal entries and place them in a map&lt;br /&gt;
*[[HPL2/Tutorials/Porting MFP Assets|Porting MFP Assets]] - explains how to copy assets from MFP to TDD and avoid issues&lt;br /&gt;
*[[HPL2/Tutorials/Convert HDRI to skyboxes|Convert HDRI to skyboxes]]&lt;br /&gt;
&lt;br /&gt;
==Scripting tutorials==&lt;br /&gt;
General basics:&lt;br /&gt;
&lt;br /&gt;
*[[HPL2/Tutorials/Scripts/Debugging|Make your set-up comfortable for scripting]]&lt;br /&gt;
*[[:hpl2:tutorials:script:entihscript_beginner|Newbie's Guide to Scripting]] - A tutorial for those new to scripting, focusing on syntax and a few helpful hints - ''By 'Entih''&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorial_1|Tutorial 1]] - Using a tutorial level, with some objects to make basic scripts.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:messages_jenniferorange|Activating/Using Message Pop-Ups]] - Explains how to activate a message to appear when walking into a script area.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:triggering_monsters_on_entities|Triggering monsters on entities]] - Explains how to trigger an event after picking up an item.&lt;br /&gt;
&lt;br /&gt;
Door-related script tutorials:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:scripting_by_xtron_-_item_that_unlocks_a_door|Item That Unlocks a Door]] - How to make an item that unlocks a certain door.&lt;br /&gt;
*[[:hpl2:tutorials:script:buttons_that_open_a_door|Buttons that open door]]s - Explains how to make buttons that open doors.&lt;br /&gt;
*[[:hpl2:tutorials:script:events|Scary door events]] - Explains how to make scary door events.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:crowbartutorialjenniferorange|Using A Crowbar On A Door]] - Explains how to script a crowbar to blow open a door.&lt;br /&gt;
*[[:hpl2:tutorials:script:adding_messages_to_locked_doors|Adding Messages To Locked Doors]] - Explains how to display a message when a player tries to open a locked door.&lt;br /&gt;
&lt;br /&gt;
Useful coding practices:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:forloop|The &amp;quot;For&amp;quot; loop]] - Explains how and when to use the &amp;quot;for&amp;quot; loop.&lt;br /&gt;
*[[:hpl2:tutorials:script:advancedtimers|Advanced Timers]] - Explains how to use multiple timers in one function.&lt;br /&gt;
*[[:hpl2:tutorials:script:localandglobalvariables|Local and Global Variables]] - Explains what they are and how to use them correctly.&lt;br /&gt;
*[[:hpl2:tutorials:script:sequences|Scripting Sequences]] - Explains how to build simple and easy to use cutscenes, or sequences for your mod.&lt;br /&gt;
&lt;br /&gt;
Forces and impulses:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:force|Impulse and forces]] - Explains how to use force and impulse.&lt;br /&gt;
*[[:hpl2:tutorials:script:pushdoorsopen|Push doors open using force]] - Explains how to use Force to open doors and entities.&lt;br /&gt;
*[[Hpl2:Tutorials:level_editor:dynamic_curtains|Dynamic curtains]] - Using force to simulate wind&lt;br /&gt;
*[[:hpl2:tutorials:script:disable_gravity_tutorial|&amp;quot;Disable&amp;quot; gravity and make objects float]] - Make entities seem to float using timer functions and forces&lt;br /&gt;
&lt;br /&gt;
Other:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:monsterpathnodes|Monster Path Nodes]] - Explains how to set up a monster's path and how to trigger it.&lt;br /&gt;
*[[:hpl2:tutorials:script:levers_and_secretshelfs|Levers and secret bookshelves]] - Explains how to make a lever that opens a bookshelf.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:scaresbyjenniferorange|Scares]] - Explains in as much detail as possible the multiple scares you can use without having to bring out the monsters.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:combininghammerchipperjenniferorange|Combining The Hammer And Chipper]] - Explains how to combine your hammer and chipper in your inventory.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:checkpoints_using_scriptarea_s|Checkpoints using Areas]] - Explains how to make a checkpoint using Areas.&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorialsformainmenu|How to create your own Main Menu Backgrounds!]] - The usability of Amnesia's .cfg files and its Editors&lt;br /&gt;
*[[HPL2/Tutorials/ShowScreenImage()|ShowScreenImage()]] - Some notes about the ShowScreenImage() function new to ATTD in version 1.5 (and also AAMFP).&lt;br /&gt;
&lt;br /&gt;
==Modeling==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:modeling:tutorialoutsource|Modeling tutorial]] - Initially written for outsourcers.&lt;br /&gt;
&lt;br /&gt;
=Video tutorials=&lt;br /&gt;
Sublists:&lt;br /&gt;
&lt;br /&gt;
*'''Recommended:''' [https://www.youtube.com/playlist?list=PLIYfl4qBRihBjRpmQL-izQ4xdAtLblU36 Large playlist of video tutorials for beginners and intermediate developers] - ''By Mudbill''&lt;br /&gt;
*[[Hpl2:Tutorials:script:elventutorials|Elven's tutorials]]&lt;br /&gt;
*[http://www.youtube.com/playlist?list=PLD326789BC99530C8 From Noob to Pro: Amnesia Custom Story Creation Series] - ''By YourComputer''&lt;br /&gt;
&lt;br /&gt;
==By Simpanra==&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=CklTIT2W4g4 How To Make Level Door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=ABI7NUqkXW0 How To Get a Key To Unlock a Door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=v4WudNebX08 How To Make Water]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=ESISPLDbMWM How To Make a Custom Story Background]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=RmIKTH9YRqk How To Make a Functional and Interactable Ladder]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=riFwThqQ68k How To Name and Describe Keys]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=M5x_taEkP8s Simple Script Function]&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==By Khyrpa==&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=1R2F2eVmJ5k Building and Lighting in The Level Editor]&amp;lt;/del&amp;gt;&lt;br /&gt;
*[http://www.youtube.com/watch?v=d2ShkLEgGNk Lighting in Level Editor]&lt;br /&gt;
*[http://www.youtube.com/watch?v=u8EhP59tmjA Billboards]&lt;br /&gt;
*[http://www.youtube.com/watch?v=LKxzoAIK8jA Advanced Candle Light Connecting]&lt;br /&gt;
*[http://www.youtube.com/watch?v=xIDCoEZ581Q Wind Scare (Part 1)]&lt;br /&gt;
*[http://www.youtube.com/watch?v=Kj-NFkIGafI Wind Scare (Part 2)]&lt;br /&gt;
&lt;br /&gt;
==By MulleDK19==&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/Tutorial1.wmv Make a key unlock a specific door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/Tutorial2.wmv How to create and use Areas or Triggers]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial1.wmv Using the Level Editor (Part 1)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial2.wmv Using the Level Editor (Part 2)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial3.wmv Using the Level Editor (Part 3)]&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==By others==&lt;br /&gt;
&lt;br /&gt;
*[http://www.youtube.com/watch?v=0grr7uipnk0 How To Create a Custom Story] - ''By TheVegaNVega''&lt;br /&gt;
*[http://www.youtube.com/watch?v=uGCTwQQSZ0A How To Make Journal Entries/Notes] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=WfgFEG4TSCE How To Make Journal Entries/Mementos] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=puIfVx0lslA How To Convert a Custom Story To a Full Conversion] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=9uKBYVEyw1s How to convert cube map images to DDS format in the GIMP] - ''By YourComputer''&lt;br /&gt;
*[http://www.youtube.com/watch?v=EnCAbgTY6d8 Adding Voice to your Diaries] - ''By triadtimes''&lt;br /&gt;
*[http://www.youtube.com/watch?v=vQEdIAZw5gM&amp;amp;feature=plcp&amp;amp;context=C4347014VDvjVQa1PpcFNKLAyG_d-p_QR49e20E_Wo08wpqmVkJz0= How to create a custom main menu background] - ''By CTCommunity''&lt;br /&gt;
*[http://youtu.be/Crx5Qd7AgJ0 Using Prop Force: How Do I Know Which Coordinate To Put My Value In?] - ''By JenniferOrange''&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6822</id>
		<title>HPL2/Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6822"/>
		<updated>2024-06-07T08:55:45Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: update crossed out link formatting, move a playlist to top of video tutorials&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Text tutorials=&lt;br /&gt;
&lt;br /&gt;
This page lists a large amount of tutorials, most of which are community-made. Feel free to check them out and see if they can teach you something. If you've made a tutorial and wish to add it to this page, you can do so by editing it to the right. Just try to keep to the same format as the rest of the page.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you can't find a tutorial for what you need, make sure to check the [[HPL2/Tools#Editors|Editor documentation]] and [[HPL2/TDD#Documentation|Engine documentation]].  An example of this would be the Particle Editor.}}&lt;br /&gt;
&lt;br /&gt;
==Level Editor==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_1|Tutorial 1]] - The minimum required to get a level that can load.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_2|Tutorial 2]] - Placement of lights and advanced setup of lights.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_3|Tutorial 3]] - How to make an outdoor environment. There's a [[Hpl2:Tutorials:level_editor:outdoors|newer version of i]]t available.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_4|Tutorial 4]] - Explains how to make water.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_5|Tutorial 5]] - Prop dimensions and detailing your map.&lt;br /&gt;
*[[Hpl2:Tutorials:level editor:tutorial 6|Tutorial 6]] - ???????&lt;br /&gt;
*[[HPL2/Tutorials/Skyboxes|Tutorial 7]] - Making skyboxes for HPL2&lt;br /&gt;
*[[HPL2/Tutorials/Level Design]] - Using all of the basic techniques to achieve good effects&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:level_editor_101|Level Editor 101]] - All the basics and some more advanced techniques.&lt;br /&gt;
&lt;br /&gt;
==Model Editor==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_1|Basic tutorial]] - The minimum required to load a model as an entity with collision and game properties.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_2|Creating Ragdoll Entities]] - How to create full physics-based entities.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:static_objects_jenniferorange|Making Items Static]] - How to change an items' properties to static.&lt;br /&gt;
*[[HPL2/Tutorials/Coin_chests | Coin chests]] - How to create chests that can be only opened with coins.&lt;br /&gt;
&lt;br /&gt;
==Material Editor==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:material_editor:tutorial_1|Tutorial 1]] - Basic materials and their properties.&lt;br /&gt;
*[[Hpl2:Tutorials:material editor:creating mirrors|Creating mirrors]] - make reflective surfaces using water materials&lt;br /&gt;
&lt;br /&gt;
==Game files==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:CustomSounds|How to create Custom Sounds]] - Teaches how to create custom sounds for your custom story.&lt;br /&gt;
*[[:hpl2:tutorials:script:howtomakenotes|How to Create Notes and Journal Entries]] - Explains how to make journal entries and place them in a map&lt;br /&gt;
*[[HPL2/Tutorials/Porting MFP Assets|Porting MFP Assets]] - explains how to copy assets from MFP to TDD and avoid issues&lt;br /&gt;
*[[HPL2/Tutorials/Convert HDRI to skyboxes|Convert HDRI to skyboxes]]&lt;br /&gt;
&lt;br /&gt;
==Scripting tutorials==&lt;br /&gt;
General basics:&lt;br /&gt;
&lt;br /&gt;
*[[HPL2/Tutorials/Scripts/Debugging|Make your set-up comfortable for scripting]]&lt;br /&gt;
*[[:hpl2:tutorials:script:entihscript_beginner|Newbie's Guide to Scripting]] - A tutorial for those new to scripting, focusing on syntax and a few helpful hints - ''By 'Entih''&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorial_1|Tutorial 1]] - Using a tutorial level, with some objects to make basic scripts.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:messages_jenniferorange|Activating/Using Message Pop-Ups]] - Explains how to activate a message to appear when walking into a script area.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:triggering_monsters_on_entities|Triggering monsters on entities]] - Explains how to trigger an event after picking up an item.&lt;br /&gt;
&lt;br /&gt;
Door-related script tutorials:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:scripting_by_xtron_-_item_that_unlocks_a_door|Item That Unlocks a Door]] - How to make an item that unlocks a certain door.&lt;br /&gt;
*[[:hpl2:tutorials:script:buttons_that_open_a_door|Buttons that open door]]s - Explains how to make buttons that open doors.&lt;br /&gt;
*[[:hpl2:tutorials:script:events|Scary door events]] - Explains how to make scary door events.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:crowbartutorialjenniferorange|Using A Crowbar On A Door]] - Explains how to script a crowbar to blow open a door.&lt;br /&gt;
*[[:hpl2:tutorials:script:adding_messages_to_locked_doors|Adding Messages To Locked Doors]] - Explains how to display a message when a player tries to open a locked door.&lt;br /&gt;
&lt;br /&gt;
Useful coding practices:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:forloop|The &amp;quot;For&amp;quot; loop]] - Explains how and when to use the &amp;quot;for&amp;quot; loop.&lt;br /&gt;
*[[:hpl2:tutorials:script:advancedtimers|Advanced Timers]] - Explains how to use multiple timers in one function.&lt;br /&gt;
*[[:hpl2:tutorials:script:localandglobalvariables|Local and Global Variables]] - Explains what they are and how to use them correctly.&lt;br /&gt;
*[[:hpl2:tutorials:script:sequences|Scripting Sequences]] - Explains how to build simple and easy to use cutscenes, or sequences for your mod.&lt;br /&gt;
&lt;br /&gt;
Forces and impulses:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:force|Impulse and forces]] - Explains how to use force and impulse.&lt;br /&gt;
*[[:hpl2:tutorials:script:pushdoorsopen|Push doors open using force]] - Explains how to use Force to open doors and entities.&lt;br /&gt;
*[[Hpl2:Tutorials:level_editor:dynamic_curtains|Dynamic curtains]] - Using force to simulate wind&lt;br /&gt;
*[[:hpl2:tutorials:script:disable_gravity_tutorial|&amp;quot;Disable&amp;quot; gravity and make objects float]] - Make entities seem to float using timer functions and forces&lt;br /&gt;
&lt;br /&gt;
Other:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:monsterpathnodes|Monster Path Nodes]] - Explains how to set up a monster's path and how to trigger it.&lt;br /&gt;
*[[:hpl2:tutorials:script:levers_and_secretshelfs|Levers and secret bookshelves]] - Explains how to make a lever that opens a bookshelf.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:scaresbyjenniferorange|Scares]] - Explains in as much detail as possible the multiple scares you can use without having to bring out the monsters.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:combininghammerchipperjenniferorange|Combining The Hammer And Chipper]] - Explains how to combine your hammer and chipper in your inventory.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:checkpoints_using_scriptarea_s|Checkpoints using Areas]] - Explains how to make a checkpoint using Areas.&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorialsformainmenu|How to create your own Main Menu Backgrounds!]] - The usability of Amnesia's .cfg files and its Editors&lt;br /&gt;
*[[HPL2/Tutorials/ShowScreenImage()|ShowScreenImage()]] - Some notes about the ShowScreenImage() function new to ATTD in version 1.5 (and also AAMFP).&lt;br /&gt;
&lt;br /&gt;
==Modeling==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:modeling:tutorialoutsource|Modeling tutorial]] - Initially written for outsourcers.&lt;br /&gt;
&lt;br /&gt;
=Video tutorials=&lt;br /&gt;
Sublists:&lt;br /&gt;
&lt;br /&gt;
*[https://www.youtube.com/playlist?list=PLIYfl4qBRihBjRpmQL-izQ4xdAtLblU36 Large playlist of video tutorials for beginners and intermediate developers] - ''By Mudbill''&lt;br /&gt;
*[[Hpl2:Tutorials:script:elventutorials|Elven's tutorials]]&lt;br /&gt;
*[http://www.youtube.com/playlist?list=PLD326789BC99530C8 From Noob to Pro: Amnesia Custom Story Creation Series] - ''By YourComputer''&lt;br /&gt;
&lt;br /&gt;
==By Simpanra==&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=CklTIT2W4g4 How To Make Level Door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=ABI7NUqkXW0 How To Get a Key To Unlock a Door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=v4WudNebX08 How To Make Water]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=ESISPLDbMWM How To Make a Custom Story Background]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=RmIKTH9YRqk How To Make a Functional and Interactable Ladder]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=riFwThqQ68k How To Name and Describe Keys]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=M5x_taEkP8s Simple Script Function]&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==By Khyrpa==&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://www.youtube.com/watch?v=1R2F2eVmJ5k Building and Lighting in The Level Editor]&amp;lt;/del&amp;gt;&lt;br /&gt;
*[http://www.youtube.com/watch?v=d2ShkLEgGNk Lighting in Level Editor]&lt;br /&gt;
*[http://www.youtube.com/watch?v=u8EhP59tmjA Billboards]&lt;br /&gt;
*[http://www.youtube.com/watch?v=LKxzoAIK8jA Advanced Candle Light Connecting]&lt;br /&gt;
*[http://www.youtube.com/watch?v=xIDCoEZ581Q Wind Scare (Part 1)]&lt;br /&gt;
*[http://www.youtube.com/watch?v=Kj-NFkIGafI Wind Scare (Part 2)]&lt;br /&gt;
&lt;br /&gt;
==By MulleDK19==&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/Tutorial1.wmv Make a key unlock a specific door]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/Tutorial2.wmv How to create and use Areas or Triggers]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial1.wmv Using the Level Editor (Part 1)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial2.wmv Using the Level Editor (Part 2)]&amp;lt;/del&amp;gt;&lt;br /&gt;
*&amp;lt;del&amp;gt;[http://amnesia.treesoft.dk/tutorials/EditorTutorial3.wmv Using the Level Editor (Part 3)]&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==By others==&lt;br /&gt;
&lt;br /&gt;
*[http://www.youtube.com/watch?v=0grr7uipnk0 How To Create a Custom Story] - ''By TheVegaNVega''&lt;br /&gt;
*[http://www.youtube.com/watch?v=uGCTwQQSZ0A How To Make Journal Entries/Notes] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=WfgFEG4TSCE How To Make Journal Entries/Mementos] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=puIfVx0lslA How To Convert a Custom Story To a Full Conversion] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=9uKBYVEyw1s How to convert cube map images to DDS format in the GIMP] - ''By YourComputer''&lt;br /&gt;
*[http://www.youtube.com/watch?v=EnCAbgTY6d8 Adding Voice to your Diaries] - ''By triadtimes''&lt;br /&gt;
*[http://www.youtube.com/watch?v=vQEdIAZw5gM&amp;amp;feature=plcp&amp;amp;context=C4347014VDvjVQa1PpcFNKLAyG_d-p_QR49e20E_Wo08wpqmVkJz0= How to create a custom main menu background] - ''By CTCommunity''&lt;br /&gt;
*[http://youtu.be/Crx5Qd7AgJ0 Using Prop Force: How Do I Know Which Coordinate To Put My Value In?] - ''By JenniferOrange''&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6821</id>
		<title>HPL2/Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6821"/>
		<updated>2024-06-07T08:51:31Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Crossed out dead links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Text tutorials=&lt;br /&gt;
&lt;br /&gt;
This page lists a large amount of tutorials, most of which are community-made. Feel free to check them out and see if they can teach you something. If you've made a tutorial and wish to add it to this page, you can do so by editing it to the right. Just try to keep to the same format as the rest of the page.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you can't find a tutorial for what you need, make sure to check the [[HPL2/Tools#Editors|Editor documentation]] and [[HPL2/TDD#Documentation|Engine documentation]].  An example of this would be the Particle Editor.}}&lt;br /&gt;
&lt;br /&gt;
==Level Editor==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_1|Tutorial 1]] - The minimum required to get a level that can load.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_2|Tutorial 2]] - Placement of lights and advanced setup of lights.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_3|Tutorial 3]] - How to make an outdoor environment. There's a [[Hpl2:Tutorials:level_editor:outdoors|newer version of i]]t available.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_4|Tutorial 4]] - Explains how to make water.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:tutorial_5|Tutorial 5]] - Prop dimensions and detailing your map.&lt;br /&gt;
*[[Hpl2:Tutorials:level editor:tutorial 6|Tutorial 6]] - ???????&lt;br /&gt;
*[[HPL2/Tutorials/Skyboxes|Tutorial 7]] - Making skyboxes for HPL2&lt;br /&gt;
*[[HPL2/Tutorials/Level Design]] - Using all of the basic techniques to achieve good effects&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:level_editor_101|Level Editor 101]] - All the basics and some more advanced techniques.&lt;br /&gt;
&lt;br /&gt;
==Model Editor==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_1|Basic tutorial]] - The minimum required to load a model as an entity with collision and game properties.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:tutorial_2|Creating Ragdoll Entities]] - How to create full physics-based entities.&lt;br /&gt;
*[[:hpl2:tutorials:model_editor:static_objects_jenniferorange|Making Items Static]] - How to change an items' properties to static.&lt;br /&gt;
*[[HPL2/Tutorials/Coin_chests | Coin chests]] - How to create chests that can be only opened with coins.&lt;br /&gt;
&lt;br /&gt;
==Material Editor==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:material_editor:tutorial_1|Tutorial 1]] - Basic materials and their properties.&lt;br /&gt;
*[[Hpl2:Tutorials:material editor:creating mirrors|Creating mirrors]] - make reflective surfaces using water materials&lt;br /&gt;
&lt;br /&gt;
==Game files==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:CustomSounds|How to create Custom Sounds]] - Teaches how to create custom sounds for your custom story.&lt;br /&gt;
*[[:hpl2:tutorials:script:howtomakenotes|How to Create Notes and Journal Entries]] - Explains how to make journal entries and place them in a map&lt;br /&gt;
*[[HPL2/Tutorials/Porting MFP Assets|Porting MFP Assets]] - explains how to copy assets from MFP to TDD and avoid issues&lt;br /&gt;
*[[HPL2/Tutorials/Convert HDRI to skyboxes|Convert HDRI to skyboxes]]&lt;br /&gt;
&lt;br /&gt;
==Scripting tutorials==&lt;br /&gt;
General basics:&lt;br /&gt;
&lt;br /&gt;
*[[HPL2/Tutorials/Scripts/Debugging|Make your set-up comfortable for scripting]]&lt;br /&gt;
*[[:hpl2:tutorials:script:entihscript_beginner|Newbie's Guide to Scripting]] - A tutorial for those new to scripting, focusing on syntax and a few helpful hints - ''By 'Entih''&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorial_1|Tutorial 1]] - Using a tutorial level, with some objects to make basic scripts.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:messages_jenniferorange|Activating/Using Message Pop-Ups]] - Explains how to activate a message to appear when walking into a script area.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:triggering_monsters_on_entities|Triggering monsters on entities]] - Explains how to trigger an event after picking up an item.&lt;br /&gt;
&lt;br /&gt;
Door-related script tutorials:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:scripting_by_xtron_-_item_that_unlocks_a_door|Item That Unlocks a Door]] - How to make an item that unlocks a certain door.&lt;br /&gt;
*[[:hpl2:tutorials:script:buttons_that_open_a_door|Buttons that open door]]s - Explains how to make buttons that open doors.&lt;br /&gt;
*[[:hpl2:tutorials:script:events|Scary door events]] - Explains how to make scary door events.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:crowbartutorialjenniferorange|Using A Crowbar On A Door]] - Explains how to script a crowbar to blow open a door.&lt;br /&gt;
*[[:hpl2:tutorials:script:adding_messages_to_locked_doors|Adding Messages To Locked Doors]] - Explains how to display a message when a player tries to open a locked door.&lt;br /&gt;
&lt;br /&gt;
Useful coding practices:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:forloop|The &amp;quot;For&amp;quot; loop]] - Explains how and when to use the &amp;quot;for&amp;quot; loop.&lt;br /&gt;
*[[:hpl2:tutorials:script:advancedtimers|Advanced Timers]] - Explains how to use multiple timers in one function.&lt;br /&gt;
*[[:hpl2:tutorials:script:localandglobalvariables|Local and Global Variables]] - Explains what they are and how to use them correctly.&lt;br /&gt;
*[[:hpl2:tutorials:script:sequences|Scripting Sequences]] - Explains how to build simple and easy to use cutscenes, or sequences for your mod.&lt;br /&gt;
&lt;br /&gt;
Forces and impulses:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:force|Impulse and forces]] - Explains how to use force and impulse.&lt;br /&gt;
*[[:hpl2:tutorials:script:pushdoorsopen|Push doors open using force]] - Explains how to use Force to open doors and entities.&lt;br /&gt;
*[[Hpl2:Tutorials:level_editor:dynamic_curtains|Dynamic curtains]] - Using force to simulate wind&lt;br /&gt;
*[[:hpl2:tutorials:script:disable_gravity_tutorial|&amp;quot;Disable&amp;quot; gravity and make objects float]] - Make entities seem to float using timer functions and forces&lt;br /&gt;
&lt;br /&gt;
Other:&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:script:monsterpathnodes|Monster Path Nodes]] - Explains how to set up a monster's path and how to trigger it.&lt;br /&gt;
*[[:hpl2:tutorials:script:levers_and_secretshelfs|Levers and secret bookshelves]] - Explains how to make a lever that opens a bookshelf.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:scaresbyjenniferorange|Scares]] - Explains in as much detail as possible the multiple scares you can use without having to bring out the monsters.&lt;br /&gt;
*[[:hpl2:tutorials:level_editor:combininghammerchipperjenniferorange|Combining The Hammer And Chipper]] - Explains how to combine your hammer and chipper in your inventory.&lt;br /&gt;
*[[:hpl2:tutorials:scripting:checkpoints_using_scriptarea_s|Checkpoints using Areas]] - Explains how to make a checkpoint using Areas.&lt;br /&gt;
*[[:hpl2:tutorials:script:tutorialsformainmenu|How to create your own Main Menu Backgrounds!]] - The usability of Amnesia's .cfg files and its Editors&lt;br /&gt;
*[[HPL2/Tutorials/ShowScreenImage()|ShowScreenImage()]] - Some notes about the ShowScreenImage() function new to ATTD in version 1.5 (and also AAMFP).&lt;br /&gt;
&lt;br /&gt;
==Modeling==&lt;br /&gt;
&lt;br /&gt;
*[[:hpl2:tutorials:modeling:tutorialoutsource|Modeling tutorial]] - Initially written for outsourcers.&lt;br /&gt;
&lt;br /&gt;
=Video tutorials=&lt;br /&gt;
Sublists:&lt;br /&gt;
&lt;br /&gt;
*[https://www.youtube.com/playlist?list=PLIYfl4qBRihBjRpmQL-izQ4xdAtLblU36 Large playlist of video tutorials for beginners and intermediate developers] - ''By Mudbill''&lt;br /&gt;
*[[Hpl2:Tutorials:script:elventutorials|Elven's tutorials]]&lt;br /&gt;
&lt;br /&gt;
==By Simpanra==&lt;br /&gt;
&lt;br /&gt;
*[http://www.youtube.com/watch?v=CklTIT2W4g4 &amp;lt;s&amp;gt;How To Make Level Door&amp;lt;/s&amp;gt;]&lt;br /&gt;
*[http://www.youtube.com/watch?v=ABI7NUqkXW0 &amp;lt;s&amp;gt;How To Get a Key To Unlock a Door&amp;lt;/s&amp;gt;]&lt;br /&gt;
*[http://www.youtube.com/watch?v=v4WudNebX08 &amp;lt;s&amp;gt;How To Make Water&amp;lt;/s&amp;gt;]&lt;br /&gt;
*[http://www.youtube.com/watch?v=ESISPLDbMWM &amp;lt;s&amp;gt;How To Make a Custom Story Background&amp;lt;/s&amp;gt;]&lt;br /&gt;
*[http://www.youtube.com/watch?v=RmIKTH9YRqk &amp;lt;s&amp;gt;How To Make a Functional and Interactable Ladder&amp;lt;/s&amp;gt;]&lt;br /&gt;
*[http://www.youtube.com/watch?v=riFwThqQ68k &amp;lt;s&amp;gt;How To Name and Describe Keys&amp;lt;/s&amp;gt;]&lt;br /&gt;
*[http://www.youtube.com/watch?v=M5x_taEkP8s &amp;lt;s&amp;gt;Simple Script Function&amp;lt;/s&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
==By Khyrpa==&lt;br /&gt;
&lt;br /&gt;
*[http://www.youtube.com/watch?v=1R2F2eVmJ5k &amp;lt;s&amp;gt;Building and Lighting in The Level Editor&amp;lt;/s&amp;gt;]&lt;br /&gt;
*[http://www.youtube.com/watch?v=d2ShkLEgGNk Lighting in Level Editor]&lt;br /&gt;
*[http://www.youtube.com/watch?v=u8EhP59tmjA Billboards]&lt;br /&gt;
*[http://www.youtube.com/watch?v=LKxzoAIK8jA Advanced Candle Light Connecting]&lt;br /&gt;
*[http://www.youtube.com/watch?v=xIDCoEZ581Q Wind Scare (Part 1)]&lt;br /&gt;
*[http://www.youtube.com/watch?v=Kj-NFkIGafI Wind Scare (Part 2)]&lt;br /&gt;
&lt;br /&gt;
==By MulleDK19==&lt;br /&gt;
&lt;br /&gt;
*[http://amnesia.treesoft.dk/tutorials/Tutorial1.wmv Make a key unlock a specific door]&lt;br /&gt;
*[http://amnesia.treesoft.dk/tutorials/Tutorial2.wmv How to create and use Areas or Triggers]&lt;br /&gt;
*[http://amnesia.treesoft.dk/tutorials/EditorTutorial1.wmv Using the Level Editor (Part 1)]&lt;br /&gt;
*[http://amnesia.treesoft.dk/tutorials/EditorTutorial2.wmv Using the Level Editor (Part 2)]&lt;br /&gt;
*[http://amnesia.treesoft.dk/tutorials/EditorTutorial3.wmv Using the Level Editor (Part 3)]&lt;br /&gt;
&lt;br /&gt;
==By others==&lt;br /&gt;
&lt;br /&gt;
*[http://www.youtube.com/watch?v=0grr7uipnk0 How To Create a Custom Story] - ''By TheVegaNVega''&lt;br /&gt;
*[http://www.youtube.com/watch?v=uGCTwQQSZ0A How To Make Journal Entries/Notes] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=WfgFEG4TSCE How To Make Journal Entries/Mementos] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=puIfVx0lslA How To Convert a Custom Story To a Full Conversion] - ''By RussMoney''&lt;br /&gt;
*[http://www.youtube.com/watch?v=9uKBYVEyw1s How to convert cube map images to DDS format in the GIMP] - ''By YourComputer''&lt;br /&gt;
*[http://www.youtube.com/playlist?list=PLD326789BC99530C8 From Noob to Pro: Amnesia Custom Story Creation Series] - ''By YourComputer''&lt;br /&gt;
*[http://www.youtube.com/watch?v=EnCAbgTY6d8 Adding Voice to your Diaries] - ''By triadtimes''&lt;br /&gt;
*[http://www.youtube.com/watch?v=vQEdIAZw5gM&amp;amp;feature=plcp&amp;amp;context=C4347014VDvjVQa1PpcFNKLAyG_d-p_QR49e20E_Wo08wpqmVkJz0= How to create a custom main menu background] - ''By CTCommunity''&lt;br /&gt;
*[http://youtu.be/Crx5Qd7AgJ0 Using Prop Force: How Do I Know Which Coordinate To Put My Value In?] - ''By JenniferOrange''&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tools&amp;diff=6820</id>
		<title>HPL2/Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tools&amp;diff=6820"/>
		<updated>2024-06-05T19:36:20Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Add introduction section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Entry pages]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; scope=&amp;quot;row&amp;quot; |Editors&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Level Editor|Level Editor]]'''||Everything that you do in the other editors comes to use here.&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Model Editor|Model Editor]]'''||Makes your 3D models come to life with ingame functions.&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Particle Editor|Particle Editor]]'''||Create fire, smoke and other particles to spice up levels and models.&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Material Editor|Material Editor]]'''||Should a texture come with normal, specular or illumination maps? Should the material be transparent or sound like metal?&lt;br /&gt;
|-&lt;br /&gt;
|[[HPL2/Tools/HplLangTool|'''HPL Language Tool''']]||Helper tool to build,edit, and translate language files&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; scope=&amp;quot;row&amp;quot; |Viewers&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Map Viewer|Map Viewer]]'''||Gives extra information about the level and allows viewing without running the game. A useful tool for optimization.&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Model Viewer|Model Viewer]]'''||See how your model will look ingame without having to start the game or make game specific files. Useful for porting assets.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The editors come in 3 versions now:&lt;br /&gt;
* The classic 1.3 editors (note: this version has the outdated color picker)&lt;br /&gt;
* The [[#Community tools | community edition]] - based on the stable 1.3 version, they provide quality-of-life improvements and a dark theme&lt;br /&gt;
* The 1.5 editors - based on patched versions of HPL2, these come prepackaged with the game on some platforms now&lt;br /&gt;
&lt;br /&gt;
{{warning|Keep in mind that these tools, while having been used to produce actual content and a lot of effort has been put on making them as stable as possible, can have bugs.&lt;br /&gt;
Make sure to back up your work often, and it is highly recommended to use a versioning system (e.g. [[Setting_up_an_Online_Repository|Git]]). }}&lt;br /&gt;
&lt;br /&gt;
==Installation Instructions==&lt;br /&gt;
&lt;br /&gt;
Make sure to click the download links as copying the link will result in an error. If clicking the link also results in an error, try downloading in another browser.&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
&lt;br /&gt;
Download the Windows HPL Editor Suite for Amnesia (click the link, it won't work if you copy it into a tab):&lt;br /&gt;
&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/amnesia_tdd_1.3_editor_suite.zip Version 1.3 and later]&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/hpl_editor_suite.zip Version 1.2 and earlier].&lt;br /&gt;
&lt;br /&gt;
This file must be unpacked into the folder where you find Amnesia.exe, all .dll files and folders with game data. This may be one of two locations depending on which version of the game you have.&lt;br /&gt;
&lt;br /&gt;
* '''For Steam users''': This will be your game installation directory, usually &amp;lt;code&amp;gt;C:\Program Files\Steam\steamapps\common\Amnesia - The Dark Descent\&amp;lt;/code&amp;gt;&lt;br /&gt;
* '''For retail/other users''': This will be inside the &amp;quot;redist&amp;quot; folder inside your installation directory, for example &amp;lt;code&amp;gt;C:\Program Files\Amnesia - The Dark Descent\redist\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reporting crashes and bugs, always include a description of the problem and any log output from the editors themselves. Logs are located in your &amp;lt;code&amp;gt;&amp;lt;Documents&amp;gt;\HPL2\&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
&lt;br /&gt;
Download the Linux HPL Editor Suite for Amnesia:&lt;br /&gt;
&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/hpl2_editor_suite-linux-2015-03-04.zip Version 1.3 and later]&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/hpl_editor_suite_linux.zip Version 1.2.1 and earlier]&lt;br /&gt;
&lt;br /&gt;
'''Updated 2011-02-19''' Updated to fix crashes when selecting enemies.&lt;br /&gt;
&lt;br /&gt;
Extract the zip and run the installer (&amp;lt;code&amp;gt;hpl_editor_suite.sh&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The installer should automatically find your currently installed copy of Amnesia if you installed it in one of the common installation locations. If not, simply select the Amnesia folder where you installed the game.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' No menu items are created by the installer, it simply installs the editor data files and executables for your platform.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HplLangTool.exe is included in the Linux HPL editor suite, it is a .NET application that does run under wine/mono.&lt;br /&gt;
&lt;br /&gt;
When reporting crashes and bugs, always include a description of the problem and any log output from the editors themselves. Logs are located in your &amp;lt;code&amp;gt;~/.frictionalgames/HPL2&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
===Mac OS X===&lt;br /&gt;
&lt;br /&gt;
Download the Mac OS X HPL Editor Suite:&lt;br /&gt;
&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/HPL2-EditorSuite-OSX-2015-03-04.dmg Version 1.3 and later]&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/hpl2editorsuite.dmg Version 1.2.1 and earlier]&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/hpl2editorsuite-manual.dmg Manual Install for version 1.2.1 and earlier]. (Use the Manual Install only if you have issues with the automated installer, and be ''SURE'' to read the directions)&lt;br /&gt;
&lt;br /&gt;
Extract the zip and run the installer (''HPL2 Editor Suite Installer''). The installer should automatically find your currently installed copy of Amnesia no matter where you purchased it (including Steam). After installing the tools, simply run Amnesia and select the &amp;quot;Editor Suite&amp;quot; tab in the launcher to run the tools.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*This{{clarify}} currently is not for the Mac [http://www.proleadsoft.com/mobile-app-development/| App Store] release, as updates to Amnesia will completely remove the Editor suite. Please read [http://support.frictionalgames.com/entry/103/ this] for more information.&lt;br /&gt;
*'''Update 2011-02-19'''  Includes fixes for crashes and &amp;quot;hangs&amp;quot;&lt;br /&gt;
*'''Update 2011-03-19'''  Includes fixes for a crash that occurs when selecting entities to add to a level&lt;br /&gt;
*You must install the [http://support.frictionalgames.com/entry/100/ Amnesia 1.0.1.2 Mac OS X Patch] (this is a Mac-only patch). Steam users will get the update directly from the Steam client.&lt;br /&gt;
&lt;br /&gt;
When reporting crashes and bugs, always include a description of the problem and any log output from the editors themselves. Logs are located in your &amp;lt;code&amp;gt;~/Library/Application Support/Frictional Games/HPL2&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
== Community tools ==&lt;br /&gt;
&lt;br /&gt;
HPL2 is now open source and a community edition of the editors is being worked on. They are '''available for Windows and Linux.'''&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
The new features include:&lt;br /&gt;
* A much more comfortable color picker (compared to the classic editors; this picker is included in 1.5 versions too)&lt;br /&gt;
* Dark theme (installed by default, but the original one can be reinstated)&lt;br /&gt;
* Keyboard shortcuts for common utilities (e.g. grid snapping)&lt;br /&gt;
* Ability to load MFP maps and assets without errors&lt;br /&gt;
* Other small improvements&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
# Go to [https://github.com/TiManGames/AmnesiaTheDarkDescent/releases this Github page] to download the latest version of the community tools.&lt;br /&gt;
# Download the archive in the format of your choice (.7z is smaller than .zip but requires [https://www.7-zip.org/ 7zip] or Winrar to open).&lt;br /&gt;
# Extract the contents into the main directory of Amnesia.&lt;br /&gt;
# Merge and overwrite all when asked.&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tools&amp;diff=6819</id>
		<title>HPL2/Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tools&amp;diff=6819"/>
		<updated>2024-06-05T19:22:34Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Make the git link point to our article on it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Entry pages]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; scope=&amp;quot;row&amp;quot; |Editors&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Level Editor|Level Editor]]'''||Everything that you do in the other editors comes to use here.&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Model Editor|Model Editor]]'''||Makes your 3D models come to life with ingame functions.&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Particle Editor|Particle Editor]]'''||Create fire, smoke and other particles to spice up levels and models.&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Material Editor|Material Editor]]'''||Should a texture come with normal, specular or illumination maps? Should the material be transparent or sound like metal?&lt;br /&gt;
|-&lt;br /&gt;
|[[HPL2/Tools/HplLangTool|'''HPL Language Tool''']]||Helper tool to build,edit, and translate language files&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; scope=&amp;quot;row&amp;quot; |Viewers&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Map Viewer|Map Viewer]]'''||Gives extra information about the level and allows viewing without running the game. A useful tool for optimization.&lt;br /&gt;
|-&lt;br /&gt;
|'''[[HPL2/Tools/Model Viewer|Model Viewer]]'''||See how your model will look ingame without having to start the game or make game specific files. Useful for porting assets.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation Instructions==&lt;br /&gt;
Keep in mind that these tools, while having been used to produce actual content and a lot of effort has been put on making them as stable as possible, can have bugs.&lt;br /&gt;
Make sure to back up your work often, and it is highly recommended to use a versioning system (e.g. [[Setting_up_an_Online_Repository|Git]]). &lt;br /&gt;
&lt;br /&gt;
Make sure to click the download links as copying the link will result in an error. If clicking the link also results in an error, try downloading in another browser.&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
&lt;br /&gt;
Download the Windows HPL Editor Suite for Amnesia (click the link, it won't work if you copy it into a tab):&lt;br /&gt;
&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/amnesia_tdd_1.3_editor_suite.zip Version 1.3 and later]&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/hpl_editor_suite.zip Version 1.2 and earlier].&lt;br /&gt;
&lt;br /&gt;
This file must be unpacked into the folder where you find Amnesia.exe, all .dll files and folders with game data. This may be one of two locations depending on which version of the game you have.&lt;br /&gt;
&lt;br /&gt;
* '''For Steam users''': This will be your game installation directory, usually &amp;lt;code&amp;gt;C:\Program Files\Steam\steamapps\common\Amnesia - The Dark Descent\&amp;lt;/code&amp;gt;&lt;br /&gt;
* '''For retail/other users''': This will be inside the &amp;quot;redist&amp;quot; folder inside your installation directory, for example &amp;lt;code&amp;gt;C:\Program Files\Amnesia - The Dark Descent\redist\&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reporting crashes and bugs, always include a description of the problem and any log output from the editors themselves. Logs are located in your &amp;lt;code&amp;gt;&amp;lt;Documents&amp;gt;\HPL2\&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
&lt;br /&gt;
Download the Linux HPL Editor Suite for Amnesia:&lt;br /&gt;
&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/hpl2_editor_suite-linux-2015-03-04.zip Version 1.3 and later]&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/hpl_editor_suite_linux.zip Version 1.2.1 and earlier]&lt;br /&gt;
&lt;br /&gt;
'''Updated 2011-02-19''' Updated to fix crashes when selecting enemies.&lt;br /&gt;
&lt;br /&gt;
Extract the zip and run the installer (&amp;lt;code&amp;gt;hpl_editor_suite.sh&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The installer should automatically find your currently installed copy of Amnesia if you installed it in one of the common installation locations. If not, simply select the Amnesia folder where you installed the game.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' No menu items are created by the installer, it simply installs the editor data files and executables for your platform.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The HplLangTool.exe is included in the Linux HPL editor suite, it is a .NET application that does run under wine/mono.&lt;br /&gt;
&lt;br /&gt;
When reporting crashes and bugs, always include a description of the problem and any log output from the editors themselves. Logs are located in your &amp;lt;code&amp;gt;~/.frictionalgames/HPL2&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
===Mac OS X===&lt;br /&gt;
&lt;br /&gt;
Download the Mac OS X HPL Editor Suite:&lt;br /&gt;
&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/HPL2-EditorSuite-OSX-2015-03-04.dmg Version 1.3 and later]&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/hpl2editorsuite.dmg Version 1.2.1 and earlier]&lt;br /&gt;
*[https://fricpub.s3.amazonaws.com/tools/hpl2/hpl2editorsuite-manual.dmg Manual Install for version 1.2.1 and earlier]. (Use the Manual Install only if you have issues with the automated installer, and be ''SURE'' to read the directions)&lt;br /&gt;
&lt;br /&gt;
Extract the zip and run the installer (''HPL2 Editor Suite Installer''). The installer should automatically find your currently installed copy of Amnesia no matter where you purchased it (including Steam). After installing the tools, simply run Amnesia and select the &amp;quot;Editor Suite&amp;quot; tab in the launcher to run the tools.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
*This{{clarify}} currently is not for the Mac [http://www.proleadsoft.com/mobile-app-development/| App Store] release, as updates to Amnesia will completely remove the Editor suite. Please read [http://support.frictionalgames.com/entry/103/ this] for more information.&lt;br /&gt;
*'''Update 2011-02-19'''  Includes fixes for crashes and &amp;quot;hangs&amp;quot;&lt;br /&gt;
*'''Update 2011-03-19'''  Includes fixes for a crash that occurs when selecting entities to add to a level&lt;br /&gt;
*You must install the [http://support.frictionalgames.com/entry/100/ Amnesia 1.0.1.2 Mac OS X Patch] (this is a Mac-only patch). Steam users will get the update directly from the Steam client.&lt;br /&gt;
&lt;br /&gt;
When reporting crashes and bugs, always include a description of the problem and any log output from the editors themselves. Logs are located in your &amp;lt;code&amp;gt;~/Library/Application Support/Frictional Games/HPL2&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
== Community tools ==&lt;br /&gt;
&lt;br /&gt;
After the HPL2 games went open-source, the community managed to compile newer editors with a few quality-of-life improvements. They are '''available for Windows and Linux.'''&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
The new features include:&lt;br /&gt;
* A much more comfortable color picker&lt;br /&gt;
* Dark theme (installed by default, but the original one can be reinstated)&lt;br /&gt;
* Keyboard shortcuts for common utilities (e.g. grid snapping)&lt;br /&gt;
* Ability to load MFP maps and assets without errors&lt;br /&gt;
* Other small improvements&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
#Install the original editors first (not all files and editors are included in the community version).&lt;br /&gt;
#Go to [https://github.com/TiManGames/AmnesiaTheDarkDescent/releases this Github page] to download the latest version of the community tools.&lt;br /&gt;
#Download the archive in the format of your choice (.7z is smaller than .zip but requires [https://www.7-zip.org/ 7zip] or Winrar to open).&lt;br /&gt;
#Extract the contents into the main directory of Amnesia.&lt;br /&gt;
#Merge and overwrite all when asked.&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6818</id>
		<title>HPL2/Changelog</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6818"/>
		<updated>2024-05-30T17:45:32Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: corrected factual errors and added some info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Changelog}}&lt;br /&gt;
&lt;br /&gt;
This article is about Amnesia: The Dark Descent's updates, focusing on modding features.&lt;br /&gt;
&lt;br /&gt;
Please note that updates tend to come to Steam first (before other platforms such as GOG) and reside in a beta branch before being pushed to the main one.&lt;br /&gt;
&lt;br /&gt;
To check what version you're on, check the &amp;lt;code&amp;gt;hpl.log&amp;lt;/code&amp;gt; file in your Documents folder. The engine version should be at the top of the file.&lt;br /&gt;
&lt;br /&gt;
== Version 1.2 ==&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
The Justine update.&lt;br /&gt;
&lt;br /&gt;
* Added the Justine expansion which includes many new assets&lt;br /&gt;
&lt;br /&gt;
== Version 1.3 ==&lt;br /&gt;
&lt;br /&gt;
This patch backports a bunch of features from Amnesia: The Machine For Pigs. Original, full patch notes are available [[HPL2/1.3 Changelog.txt|here]].&lt;br /&gt;
&lt;br /&gt;
* Added support for FBX files and Collada models exported in 3D Max&lt;br /&gt;
* Added Enemy_ManPig entity type&lt;br /&gt;
* Added many new script functions (note: the list of the new functions in the [[HPL2/1.3 Changelog.txt|original changelog]] appears to be incomplete)&lt;br /&gt;
* F2 now does a quick map reload when Debug menu is loaded&lt;br /&gt;
* F3 now fast forwards (x3 speed) the game when Debug menu is loaded&lt;br /&gt;
* Errors and warnings can now be seen in-game by checking a box in the debug menu &lt;br /&gt;
&lt;br /&gt;
== Version 1.4 ==&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
This update added Hard Mode and achievements.&lt;br /&gt;
&lt;br /&gt;
* Added a free camera mode when Debug menu is loaded&lt;br /&gt;
&lt;br /&gt;
== Version 1.5 ==&lt;br /&gt;
&lt;br /&gt;
# Ability to provide a custom story with full conversion capabilities [[HPL2/custom_story_settings.cfg | by specifying InitCfgFile in custom_story_settings.cfg]]. In other words, Full Conversions can now be installed and launched like Custom Stories. This also means you will be able to convert your existing full conversion mods into &amp;quot;extended&amp;quot; custom stories, and upload them to the Steam Workshop.&lt;br /&gt;
# Fixed a crash caused by using more than 2&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt; (65,535) callbacks (the crash happened when changing levels and would usually be caused by overusing Timers)&lt;br /&gt;
# Added an option to [[HPL2/menu.cfg | menu.cfg]] to allow specifying colors for menu text&lt;br /&gt;
# Added an option to [[HPL2/main_init.cfg | main_init.cfg]] to specify how custom stories are loaded within a custom story (including if they show up at all)&lt;br /&gt;
# New scripting features (documentation [[HPL2/Engine_Scripts | here]]):&lt;br /&gt;
## Added new script function: ShowScreenImage&lt;br /&gt;
## Added new script callback: OnUpdate&lt;br /&gt;
## Added &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.hps&amp;lt;/code&amp;gt; files&lt;br /&gt;
# Fixed skybox cubemaps rendering incorrectly. This removes the need for players patching a dll manually.&lt;br /&gt;
# Fixed &amp;quot;Chest&amp;quot; type entity changing the required coin number to zero after loading a save, [[HPL2/Tutorials/Coin_chests | making thalers actually usable]]&lt;br /&gt;
# Added navigation of custom story menu with gamepad&lt;br /&gt;
# Restored old custom story window behaviour when loading an entry (the game now starts the story immediately like in the earlier game versions, instead of having to go through a pseudo-modded menu and starting the game there)&lt;br /&gt;
# Fixed option to specify multiple slime types for SlimeAreas (see [[HPL2/game.cfg#Slime |Slime section in &amp;lt;code&amp;gt;game.cfg&amp;lt;/code&amp;gt;]]; slime types can be added and then selected in the entity editor for Slime type entities)&lt;br /&gt;
# Improved color picker in editors (this only applies to the Windows version; the editors will now be included in the game files by default. Community editors still can be used, but might be overwritten by updates if you don't rename the exe files; config files will be overwritten by the update or verifying game files, so the dark theme will be removed if you use it)&lt;br /&gt;
# &amp;quot;Other fixes&amp;quot;&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6816</id>
		<title>HPL2/Changelog</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6816"/>
		<updated>2024-05-30T15:42:34Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Update article with other changelogs/versions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Changelog}}&lt;br /&gt;
&lt;br /&gt;
This article is about Amnesia: The Dark Descent's updates, focusing on modding features.&lt;br /&gt;
&lt;br /&gt;
Please note that updates tend to come to Steam first (before other platforms such as GOG) and reside in a beta branch before being pushed to the main one.&lt;br /&gt;
&lt;br /&gt;
To check what version you're on, check the &amp;lt;code&amp;gt;hpl.log&amp;lt;/code&amp;gt; file in your Documents folder. The engine version should be at the top of the file.&lt;br /&gt;
&lt;br /&gt;
== Version 1.3 ==&lt;br /&gt;
&lt;br /&gt;
The Justine update. The original, full patch notes are available [[HPL2/1.3 Changelog.txt|here]].&lt;br /&gt;
&lt;br /&gt;
* Added the Justine expansion which includes many new assets&lt;br /&gt;
* Added support for FBX files and Collada models exported in 3D Max&lt;br /&gt;
* Added Enemy_ManPig entity type&lt;br /&gt;
* Added many new script functions (note: the list of the new functions in the [[HPL2/1.3 Changelog.txt|original changelog]] appears to be incomplete)&lt;br /&gt;
* F2 now does a quick map reload when Debug menu is loaded&lt;br /&gt;
* F3 now fast forwards (x3 speed) the game when Debug menu is loaded&lt;br /&gt;
* Errors and warnings can now be seen in-game by checking a box in the debug menu &lt;br /&gt;
&lt;br /&gt;
== Version 1.4 ==&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
The achievement update.&lt;br /&gt;
&lt;br /&gt;
== Version 1.5 ==&lt;br /&gt;
&lt;br /&gt;
# Ability to provide a custom story with full conversion capabilities [[HPL2/custom_story_settings.cfg | by specifying InitCfgFile in custom_story_settings.cfg]]. In other words, Full Conversions can now be installed and launched like Custom Stories. This also means you will be able to convert your existing full conversion mods into &amp;quot;extended&amp;quot; custom stories, and upload them to the Steam Workshop.&lt;br /&gt;
# Fixed a crash caused by using more than 2&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt; (65,535) callbacks (the crash happened when changing levels and would usually be caused by overusing Timers)&lt;br /&gt;
# Added an option to [[HPL2/menu.cfg | menu.cfg]] to allow specifying colors for menu text&lt;br /&gt;
# Added an option to [[HPL2/main_init.cfg | main_init.cfg]] to specify how custom stories are loaded within a custom story (including if they show up at all)&lt;br /&gt;
# New scripting features (documentation [[HPL2/Engine_Scripts | here]]):&lt;br /&gt;
## Added new script function: ShowScreenImage&lt;br /&gt;
## Added new script callback: OnUpdate&lt;br /&gt;
## Added &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.hps&amp;lt;/code&amp;gt; files&lt;br /&gt;
# Fixed skybox cubemaps rendering incorrectly. This removes the need for players patching a dll manually.&lt;br /&gt;
# Fixed &amp;quot;Chest&amp;quot; type entity changing the required coin number to zero after loading a save, [[HPL2/Tutorials/Coin_chests | making thalers actually usable]]&lt;br /&gt;
# Added navigation of custom story menu with gamepad&lt;br /&gt;
# Restored old custom story window behaviour when loading an entry (the game now starts the story immediately like in the earlier game versions, instead of having to go through a pseudo-modded menu and starting the game there)&lt;br /&gt;
# Fixed option to specify multiple slime types for SlimeAreas (see [[HPL2/game.cfg#Slime |Slime section in &amp;lt;code&amp;gt;game.cfg&amp;lt;/code&amp;gt;]]; slime types can be added and then selected in the entity editor for Slime type entities)&lt;br /&gt;
# Improved color picker in editors (this only applies to the Windows version; the editors will now be included in the game files by default. Community editors still can be used, but might be overwritten by updates if you don't rename the exe files; config files will be overwritten by the update or verifying game files, so the dark theme will be removed if you use it)&lt;br /&gt;
# &amp;quot;Other fixes&amp;quot;&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6814</id>
		<title>HPL2/Changelog</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6814"/>
		<updated>2024-05-30T15:26:02Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Darkfire moved page HPL2/1.5 Update to HPL2/Changelog: More updates are coming and it would be good to record the old ones as well.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:1.5 Update}}&lt;br /&gt;
&lt;br /&gt;
This article is about Amnesia: The Dark Descent's 2023 update.&lt;br /&gt;
&lt;br /&gt;
At the moment these changes are available only on Steam.&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&lt;br /&gt;
# Ability to provide a custom story with full conversion capabilities [[HPL2/custom_story_settings.cfg | by specifying InitCfgFile in custom_story_settings.cfg]]. In other words, Full Conversions can now be installed and launched like Custom Stories. This also means you will be able to convert your existing full conversion mods into &amp;quot;extended&amp;quot; custom stories, and upload them to the Steam Workshop.&lt;br /&gt;
# Fixed a crash caused by using more than 2&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt; (65,535) callbacks (the crash happened when changing levels and would usually be caused by overusing Timers)&lt;br /&gt;
# Added an option to [[HPL2/menu.cfg | menu.cfg]] to allow specifying colors for menu text&lt;br /&gt;
# Added an option to [[HPL2/main_init.cfg | main_init.cfg]] to specify how custom stories are loaded within a custom story (including if they show up at all)&lt;br /&gt;
# New scripting features (documentation [[HPL2/Engine_Scripts | here]]):&lt;br /&gt;
## Added new script function: ShowScreenImage&lt;br /&gt;
## Added new script callback: OnUpdate&lt;br /&gt;
## Added &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.hps&amp;lt;/code&amp;gt; files&lt;br /&gt;
# Fixed skybox cubemaps rendering incorrectly. This removes the need for players patching a dll manually.&lt;br /&gt;
# Fixed &amp;quot;Chest&amp;quot; type entity changing the required coin number to zero after loading a save, [[HPL2/Tutorials/Coin_chests | making thalers actually usable]]&lt;br /&gt;
# Added navigation of custom story menu with gamepad&lt;br /&gt;
# Restored old custom story window behaviour when loading an entry (the game now starts the story immediately like in the earlier game versions, instead of having to go through a pseudo-modded menu and starting the game there)&lt;br /&gt;
# Fixed option to specify multiple slime types for SlimeAreas (see [[HPL2/game.cfg#Slime |Slime section in &amp;lt;code&amp;gt;game.cfg&amp;lt;/code&amp;gt;]]; slime types can be added and then selected in the entity editor for Slime type entities)&lt;br /&gt;
# Improved color picker in editors (this only applies to the Windows version; the editors will now be included in the game files by default. Community editors still can be used, but might be overwritten by updates if you don't rename the exe files; config files will be overwritten by the update or verifying game files, so the dark theme will be removed if you use it)&lt;br /&gt;
# &amp;quot;Other fixes&amp;quot;&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/1.5_Update&amp;diff=6815</id>
		<title>HPL2/1.5 Update</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/1.5_Update&amp;diff=6815"/>
		<updated>2024-05-30T15:26:02Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Darkfire moved page HPL2/1.5 Update to HPL2/Changelog: More updates are coming and it would be good to record the old ones as well.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[HPL2/Changelog]]&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Blender&amp;diff=6805</id>
		<title>Blender</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Blender&amp;diff=6805"/>
		<updated>2024-04-21T16:27:08Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Added info about HPL plugins&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Blender is an open source 3D content creation suite that has built-in support for the file format COLLADA that the HPL engine uses to import most 3D models.&lt;br /&gt;
&lt;br /&gt;
Unlike Maya, models exported from Blender don't require deprecated versions of the software to work with HPL. However, this is at a cost of lower compability (i.e. problems with exporting armatures and the inconvience of using a different up axis).&lt;br /&gt;
&lt;br /&gt;
==Tutorial - Blender 2.8==&lt;br /&gt;
{{Note|'''Note:''' ''This tutorial was written and tested on HPL2. HPL1 and HPL3 were not tested but most likely will work as well.''}}&lt;br /&gt;
&lt;br /&gt;
This tutorial goes over the most crucial practices which will make a Blender export work in HPL.&lt;br /&gt;
&lt;br /&gt;
The following applies both to new models and edits of existing models. When importing a .dae model from any FG game, one has to reconstruct the materials - for some reason, they aren't imported into Blender.&lt;br /&gt;
&lt;br /&gt;
Following this tutorial will make any model load in-game, but models with armatures will most likely have errors and their animations will be corrupted. See the Animation section for more information.&lt;br /&gt;
&lt;br /&gt;
===General rules===&lt;br /&gt;
&lt;br /&gt;
First, a few things to have in mind while making or editing a model:&lt;br /&gt;
&lt;br /&gt;
#Make sure that your model has unwrapped UVs.&lt;br /&gt;
#Redundant textures and materials in the export will cause issues. Be careful not to add any unnecessary ones.&lt;br /&gt;
#HPL allows only one material with one texture per object (submesh). No more, no less.&lt;br /&gt;
&lt;br /&gt;
===Importing===&lt;br /&gt;
Importing the COLLADA file:&lt;br /&gt;
&lt;br /&gt;
Simply click File&amp;gt;Import&amp;gt;Collada. Usually this will be enough.&lt;br /&gt;
&lt;br /&gt;
However, you might find that nothing actually gets imported into the program. In that case, an often issue is the &amp;lt;code&amp;gt;library_effects&amp;lt;/code&amp;gt; section of the .dae file made by Maya. Copy the file, edit it with a text editor, and delete all of the contents between and including the &amp;lt;code&amp;gt;library_effects&amp;lt;/code&amp;gt; tags. Doing that should fix the issue and the file should import normally.&lt;br /&gt;
&lt;br /&gt;
===Exporting===&lt;br /&gt;
&lt;br /&gt;
#'''Select a submesh''' and go to the '''Materials tab'''.&lt;br /&gt;
#Make sure that the shader is set to Principled BSDF. Other shaders don't necessarily have to cause issues, but this one has been used with success.&lt;br /&gt;
#Click on the circle next to the '''“Base Color”''' setting.&lt;br /&gt;
#Pick '''“Image Texture”''' from the pop-up menu.&lt;br /&gt;
#Click on '''“Open”''' and pick your texture file.&lt;br /&gt;
#*From now on, if you need to open the texture somewhere (e.g. for UV unwrapping), click on the square icon with a triangle and a dot and select the texture from the drop menu. This way you won't be cloning the texture. If you need to apply the created material/texture to another object or reapply it to the current one, make sure to use this method as well.&lt;br /&gt;
#Repeat the previous steps until all submeshes have an assigned material with a texture.&lt;br /&gt;
#Export the object as COLLADA (.dae) or, alternatively, as FBX. See the next section for more details.&lt;br /&gt;
#Before exporting, make sure to remove all non-mesh components, like lights and cameras, as well as unused textures, materials and images. This is most easily done in the tree viewer, after setting it to the &amp;quot;Blender file&amp;quot; mode. Make sure to delete the duplicate and orphaned data as well if there are any issues.&lt;br /&gt;
#Make sure that in export settings the '''“Geometry→Triangulate”''' option is marked. &lt;br /&gt;
#If the object has an armature, or is supposed to be a StaticObject (not an Entity - those can be rotated in the Model Editor), you will need to set the export &amp;quot;up&amp;quot; axis to be the Y axis (Blender uses Z as up, HPL uses Y). In case that doesn't work, you can rotate the model manually to have +Y axis as up and to face the correct axis. See notes on Blender 2.5 for more help.&lt;br /&gt;
#'''Open the exported file with the ModelViewer''' - it is the best of the HPL editors for quick checks and prototyping. If you've succeeded, the model will show up as textured. A .mat file will be created, to which you can add normalmaps and such. If you were editing an existing model, it should load the existing material from the original model.&lt;br /&gt;
#*If the viewer crashes, you probably didn't assign materials properly or didn't triangulate the model. Another cause could be that the &amp;quot;one material per object, one texture per material&amp;quot; rule wasn't followed.&lt;br /&gt;
#*If the model loads, but isn't textured correctly, there probably are redundant images and/or materials in the blend file.&lt;br /&gt;
&lt;br /&gt;
==Blender to HPL==&lt;br /&gt;
===General===&lt;br /&gt;
HPL supports COLLADA (.dae) and FBX. COLLADA is the &amp;quot;go-to&amp;quot; format used by FG. FBX is valid too, but seems to be more likely to crash the ModelViewer if anything is incorrect.&lt;br /&gt;
&lt;br /&gt;
First thing to take into account when exporting is '''UV mapping the texture'''. Adding a texture to a material without UV mapping will NOT work, it will just crash the Model Viewer (or any other HPL instance). &lt;br /&gt;
&lt;br /&gt;
It is recommended that 1 unit is set to equal 1 meter. &lt;br /&gt;
&lt;br /&gt;
HPL uses Y as the up axis. Blender uses Z. As of 2.8, the export option to change the up axis seems to not work for HPL, so it is recommended to rotate the object manually before exporting. This is only necessary for static objects (anything designated to be an entity can be rotated in the Model Editor) and objects with armatures (which sometimes can't be rotated in HPL).&lt;br /&gt;
&lt;br /&gt;
Make sure to save your project files (.blend) in the same folder as your textures and exports - this will simplify porting to HPL, and moving the file in general. Blender should by default use relative paths, but if you used absolute paths - change that setting because it will break the model on other computers, and probably won't even load in the Model Viewer. &lt;br /&gt;
&lt;br /&gt;
===Animations===&lt;br /&gt;
&lt;br /&gt;
Rotation/location/scale animations can be exported without a problem, however there is no known way of exporting shape animations correctly into the .dae format.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no known and tested way to properly export armatures from Blender in a way for HPL to read them properly.&lt;br /&gt;
&lt;br /&gt;
{{messageBox|text=Already tested solutions include: Multiple COLLADA plugins, the FBX format and various export options. None of them worked, which might hint that the issue lies within the armature set-up itself. For a potential fix (untested on newer releases), check &amp;quot;Notes on 2.6&amp;quot;.}}&lt;br /&gt;
===Textures===&lt;br /&gt;
&lt;br /&gt;
Keep in mind that HPL culls all backfaces - in other words, textures are visible from only one side of the model. If the exported model has a texture on the &amp;quot;inside&amp;quot;, you need to go back to Blender and flip the normals before exporting again.&lt;br /&gt;
&lt;br /&gt;
It is highly recommended to use textures with power-of-two sizes (256×256, 512×512, 128×1024 etc.). Otherwise the model might crash your Model Viewer, look awkward or result in run-time errors and slightly worse performance.&lt;br /&gt;
&lt;br /&gt;
===Materials===&lt;br /&gt;
&lt;br /&gt;
Each submesh can, and must, have only one material! It's been also reported that if a material gets linked to 2 different geometries/datablocks/vertex groups/etc., it will crash in HPL. However, using the same material for multiple objects should work normally.&lt;br /&gt;
&lt;br /&gt;
The in-game material is an XML file (.mat) that contains information on what images (.dds, .jpg, .tga and other formats) are used in the material to create the in-game look. Always set the diffuse texture of the Blender-material to have the same name as the engine-material (.mat) you want it to have. All other textures (normalmaps, etc.) can be later added in the Material Editor.&lt;br /&gt;
&lt;br /&gt;
For more information about materials, check the General section in [[Hpl3:Engine:model export|the HPL3 model export guide]]. The information there is also applicable to older HPL engine iterations.&lt;br /&gt;
&lt;br /&gt;
==Plugins==&lt;br /&gt;
&lt;br /&gt;
There are two plugins for HPL3 in Blender. They both are meant for making/prototyping maps in Blender,&lt;br /&gt;
but their features and level of documentation varies.&lt;br /&gt;
&lt;br /&gt;
* [[HPL3/Blender HPL3 export plugin| HPL3 plugin from Cadely]]&lt;br /&gt;
* [https://github.com/rbx775/HplParser HPL3 plugin from rbx775] - might be more comprehensive as it matures&lt;br /&gt;
&lt;br /&gt;
==Deprecated==&lt;br /&gt;
&lt;br /&gt;
{{Note|'''''Note:''' Subsequent updates and the Blender 2.8 UI rehaul have deprecated the following sections. However, they are kept here in order to preserve any potentially useful information.''}}&lt;br /&gt;
&lt;br /&gt;
===Notes on Blender 2.5===&lt;br /&gt;
When exporting to .dae, there will be a few issues you may notice upon importing your work into the Model Editor of Amnesia. These issues include your model appearing to be missing “pieces,” being incomplete and full of holes. The COLLADA plug-in of Blender 2.5 automatically exports everything as triangles. When it comes to converting quads (i.e. faces with four sides) it does a bad job at it. In Blender 2.5, when you convert a quad into a triangle (Ctrl + T) you'll notice the quad becomes two triangles forming a shape of a quad. However, the COLLADA plug-in when it faces a quad and converts it to a triangle it'll only provide one triangle in the place of the quad (or screw up the vertices of the second triangle). To avoid this issue, you must convert all your quads to triangles in Blender before exporting to .dae format.&lt;br /&gt;
&lt;br /&gt;
Another issue you might run across is when you import your mesh into the Model Editor of Amnesia you notice that your object(s) are rotated (though in Blender it looks perfectly fine). This is caused by the local axis of the object(s) conflicting with the global axis of the environment. To fix this, in Blender, in Object mode, select the object you want to correct and in the menu on the bottom of the 3D View go to Object &amp;gt; Apply &amp;gt; Rotation. This will align the local axis of the object to the global axis of the object. Now when you import your mesh again in the Model Editor everything will be on their proper axis. Do the same for location and scale if need be.&lt;br /&gt;
&lt;br /&gt;
Exporting of object names is also not currently supported in Blender 2.5. This may cause some issues when creating your own entities from your custom models. When attaching a body to your model in the Model Editor of Amnesia and the object doesn't have a name, the game will not be able to properly attach the model to the body. This may result in half of the model located at the exact center of the map, while another part having been properly attached to the model's body. The current workaround is to edit the .dae file and manually add names to your meshes. Under &amp;lt;library_visual_scenes&amp;gt;, each mesh from your model will be represented by a node tag. Simply edit the node tag by adding a name attribute with the value being the object's desired name.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 &amp;lt;node id=&amp;quot;Cube&amp;quot; type=&amp;quot;NODE&amp;quot; name=&amp;quot;Cube&amp;quot;&amp;gt;&lt;br /&gt;
There are also issues with armatures, but full armature export support is scheduled for Blender 2.6.&lt;br /&gt;
&lt;br /&gt;
===Notes on Blender 2.6===&lt;br /&gt;
Blender 2.6 is capable of exporting armatures to where the ModelView and Model Editor doesn't crash; however, this only after one minor tweak to the exported .dae file. It would appear that the HPL engine is not capable of finding the bones of the controller (armature) when they are parented to an armature node in the .dae file. Current workaround is to either remove the armature parent node or change its type from “NODE” to “JOINT”. Do note, though, that this only prevents the ModelView from erroring out with “Bone '%s' does not exist;” there is no guarantee that your model will look and work exactly as it does in Blender.&lt;br /&gt;
&lt;br /&gt;
As of Blender 2.64 you no longer have to insert a name attribute to the node element (as shown in the notes for Blender 2.5).&lt;br /&gt;
&lt;br /&gt;
As of Blender 2.68 (probably earlier), you no longer need to triangulate the mesh in edit mode before exporting. There is now a triangulate option in the COLLADA export options.&lt;br /&gt;
&lt;br /&gt;
Blender armatures (though not for '''really'''  complex rigs) and their animations now work with the 1.3 (Machine for Pigs compatibility) update. (This was tested with Blender 2.68, but earlier versions may work too.)&lt;br /&gt;
&lt;br /&gt;
===Tutorial - Blender 2.7 and lower===&lt;br /&gt;
&lt;br /&gt;
The following is intended to quickly give a sure step by step process to successfully export an object and get it to display within the game engine:&lt;br /&gt;
&lt;br /&gt;
#When Blender launches it creates a default cube.&lt;br /&gt;
#Save the Blender project ('''Ctrl + S'''; '''File → Save''').&lt;br /&gt;
#Select the default cube and click on the '''Materials'''  button in the ''Properties''  panel. Make sure a material is applied to the mesh (default material will work fine).&lt;br /&gt;
#Click on the '''Textures'''  button in the ''Properties''  panel. If there is no texture applied to the material, click on '''New'''  or the default texture from the list if any. Set ''Type''  to '''Image or Movie''', and in the ''Image''  menu click '''Open'''  and select a texture (the .dds/.jpg/.tga/.png not the .mat file). It is best if the texture is in the same directory as the .blend file. In the ''Mapping''  menu, make sure '''UV'''  is set for ''Coordinates''.&lt;br /&gt;
#With the cube selected, press '''TAB'''  to go to ''Edit Mode''. Make sure all the faces of the mesh is selected. You can do so by pressing '''A'''  on the keyboard. Press '''U'''  on the keyboard and select '''Unwrap'''  ('''Reset'''  if you haven't created seams for the default cube).&lt;br /&gt;
#With all the faces still selected, convert all quads to tris either by '''Ctrl + T'''  or '''Mesh → Faces → Quads to Tris'''.&lt;br /&gt;
#Go to the '''UV/Image Editor'''  and in the pop-up menu to the right of the ''UVs''  menu, select the previously loaded texture from the list.&lt;br /&gt;
#Go back to '''3D View''', change draw mode (i.e. Viewport Shading) to ''Textured''  and you can see that the model is textured. You'll know it is ready for exporting if both Textured draw mode and the rendered image both show the cube textured.&lt;br /&gt;
#Delete the default camera and default light.&lt;br /&gt;
#Go to '''File → Export → COLLADA (.dae)'''. In the left panel, at the bottom, there will be export options for COLLADA, specifically texture options. If you're using external textures, then you'd want to make sure '''Include UV Textures'''  is checked. If you're using internal textures, then you'd want to make sure '''Include Material Textures'''  is checked. If you want to copy (or overwrite) the textures over to the save location (this should be done at least once), make sure '''Copy'''  is checked.&lt;br /&gt;
#Save the file as “filename.dae” in a folder within one of Amnesia's directories (preferably the custom_stories directory).&lt;br /&gt;
#Using the model viewer you should now see the newly created cube fully textured.&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Hpl2:HPL2/Tutorials/CustomSounds&amp;diff=6804</id>
		<title>Hpl2:HPL2/Tutorials/CustomSounds</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Hpl2:HPL2/Tutorials/CustomSounds&amp;diff=6804"/>
		<updated>2024-04-13T15:03:43Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: fix header error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Adding custom sounds =&lt;br /&gt;
== Preparing the sounds ==&lt;br /&gt;
&lt;br /&gt;
First you'll need a sound-editting program; [https://www.audacityteam.org/ Audacity] is a common choice - it is free and will suit most needs.&lt;br /&gt;
&lt;br /&gt;
The sounds need to be in '''.ogg ''' format. If your sound files are formatted as '''.MP3''', '''.WAV''' or anything else, you need to use one your audio editing software of choice to convert your sound file to an '''.ogg''' file format. In Audacity, you just need to drag the file into the program and then export as '''.ogg'''.&lt;br /&gt;
&lt;br /&gt;
{{tip|It is recommended to use mono files. Stereo should only be used for music and ambient tracks, because it will play directly at the player rather than play in 3D.}}&lt;br /&gt;
&lt;br /&gt;
If you only want to play this sound as music, you can skip the next few steps and jump right to the custom music section.&lt;br /&gt;
&lt;br /&gt;
== Managing sound files ==&lt;br /&gt;
&lt;br /&gt;
In your mod's (FC or CS, doesn't matter) folder, create a folder for sounds. It can be called however you want, but '''sounds''' would probably be the best.&lt;br /&gt;
&lt;br /&gt;
{{tip|If your mod has a lot of custom sounds, make sure to organise them into subfolders!}}&lt;br /&gt;
&lt;br /&gt;
Place the tutorial.ogg file in the created (sub)folder.&lt;br /&gt;
&lt;br /&gt;
== Creating the sound entity file ==&lt;br /&gt;
&lt;br /&gt;
The behaviour of the sound in the game is determined by a &amp;quot;sound entity&amp;quot; file. These files have a '''.snt''' extension.&lt;br /&gt;
&lt;br /&gt;
For the fastest workflow, copy an existing sound file that works similarly to how you want and change its name. Then alter the contents of that file rather than writing them from scratch. &lt;br /&gt;
&lt;br /&gt;
{{tip|If using Notepad++, right-click a .snt file and pick Notepad++ to edit the file.}}&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can do the following:&lt;br /&gt;
&lt;br /&gt;
Create a '''.txt''' file and name it what you want (same as the .ogg file is common), open it with any text editor you use.[[Notepad%2B%2B | Notepad++]] is recommended. When you finish editing the file, change the extension to the correct one. I named my file '''tutorial.snt'''.&lt;br /&gt;
&lt;br /&gt;
{{tip|Other extensions might work, but it is recommended to give sound files the .snt extension used by the main game. This will allow your sound to be placed in a level without scripting.}}&lt;br /&gt;
&lt;br /&gt;
In the file, you can edit quite a few things, and among them is..''Adding your sound-file into the script!'' And since my sound file is &amp;lt;u&amp;gt;'''door'''&amp;lt;/u&amp;gt;'''.ogg''', It shall go to the '''MAIN''' section. Random soundfiles will be covered later on.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;SOUNDENTITY&amp;gt;&lt;br /&gt;
 &amp;lt;SOUNDS&amp;gt;&lt;br /&gt;
   &amp;lt;Main&amp;gt;&lt;br /&gt;
      &amp;lt;Sound File=&amp;quot;door.ogg&amp;quot; /&amp;gt;&lt;br /&gt;
   	&amp;lt;/Main&amp;gt;&lt;br /&gt;
   &amp;lt;/SOUNDS&amp;gt;&lt;br /&gt;
   &amp;lt;PROPERTIES Volume=&amp;quot;5&amp;quot; MinDistance=&amp;quot;1&amp;quot; MaxDistance=&amp;quot;50&amp;quot; Random=&amp;quot;0&amp;quot; Interval=&amp;quot;0&amp;quot; FadeEnd=&amp;quot;False&amp;quot; FadeStart=&amp;quot;False&amp;quot; Stream=&amp;quot;False&amp;quot; Loop=&amp;quot;False&amp;quot; Use3D=&amp;quot;false&amp;quot; Blockable=&amp;quot;False&amp;quot; BlockVolumeMul=&amp;quot;0.7&amp;quot; Priority=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/SOUNDENTITY&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format explanation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;'''SOUNDENTITY'''&amp;gt; is the start marker of the sound file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;'''SOUNDS'''&amp;gt; indicates the sound list&lt;br /&gt;
&lt;br /&gt;
&amp;lt;'''Main'''&amp;gt; is the list of sounds the file will play.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;'''Sound File'''=&amp;quot;''YourFileName''.ogg&amp;quot; /&amp;gt; is the way to add a file to the sound. Adding multiple files will play them randomly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;'''PROPERTIES'''&amp;gt; Are all the options you may use to decide how the sound will behave in-game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Properties==&lt;br /&gt;
&lt;br /&gt;
===The basics===&lt;br /&gt;
&lt;br /&gt;
* '''Volume''' is how loud the sound should play. '''Volume=1''' would make the sound play at the normal volume of the sound file. '''Volume=0.5''' would half as loud. '''Volume=2''' would amplify the sound to twice its normal volume.&lt;br /&gt;
&lt;br /&gt;
* '''MinDistance''' and '''MaxDistance''' are used for attenuation, which means how the sound fades out over distance. Within the '''MinDistance''' the sound will be at the full '''Volume''' level. As the player moves from '''MinDistance''' to '''MaxDistance''' away from the sound, the volume will fade towards silence. Outside of '''MaxDistance''' it does not play at all.&lt;br /&gt;
&lt;br /&gt;
* '''Loop''' should be set to '''&amp;quot;true&amp;quot;''' if the sound should loop.&lt;br /&gt;
&lt;br /&gt;
* '''Use3D''' should be set to '''&amp;quot;true&amp;quot;''' if the sound should originate from a point in the game world. Otherwise it will be all around the player and will not fade with distance.&lt;br /&gt;
&lt;br /&gt;
Well thats it! You now created your very own sound! Place it in the map with the Level Editor or use it with &amp;lt;code&amp;gt;PlaySoundAtEntity();&amp;lt;/code&amp;gt; in your level script (check [http://wiki.frictionalgames.com/hpl2/amnesia/script_functions Engine scripts] for details).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===More advanced .snt properties===&lt;br /&gt;
&lt;br /&gt;
* '''Loop''', '''Random''' and '''Interval''' are all used together to define whether and how the sound should loop. '''Loop=true''' will make the sound repeat. If '''Interval''' is 0 then the sound will loop continuously, but if '''Interval''' is set to a value &amp;gt; 0, then that becomes a delay inserted between the repeitions. If '''Random''' is set to a value &amp;gt; 0 and &amp;lt; 1, then it defines the random chance of the sound playing on that interval. If '''Random''' is &amp;lt;=0 or &amp;gt;=1, then the sound will always play every interval.&lt;br /&gt;
For example, an ambient background track that should play continuously with no gaps should have:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;Random=&amp;quot;1&amp;quot; Interval=&amp;quot;0&amp;quot; Loop=&amp;quot;true&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
A sound that should repeat periodically, with a 25% chance of playing again every 15 seconds would be defined like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;Random=&amp;quot;0.25&amp;quot; Interval=&amp;quot;15&amp;quot; Loop=&amp;quot;true&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Random''' does ''not'' affect the random variant sounds listed in the .snt file. Those each have an equal chance of playing, although the engine will try to stop them from playing twice in a row if possible.&lt;br /&gt;
&lt;br /&gt;
* '''Use3D''' causes the sound to originate from a point in space, and move between the left and right stereo channels, but it is also required for attenuation. If '''Use3D''' is false, then the sound will have no stereo separation but it will also not fade over distance. Only mono sounds can be used as 3D. Stereo sounds retain the the left/right channel in the sound file and always behave as '''Use3d=&amp;quot;false&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
* '''Stream''' defines whether the sound can be preloaded. '''Stream=&amp;quot;false&amp;quot;''' is the normal behaviour for short sounds that are loaded into memory and played when needed. '''Stream=&amp;quot;true&amp;quot;''' makes the sound play from the disk. This is slower but saves memory, so should be used for large sound files that are played rarely.&lt;br /&gt;
&lt;br /&gt;
* '''FadeEnd''' and '''FadeStart''', if true, will cause looping sounds to fade in or out on their first or last repetition.&lt;br /&gt;
&lt;br /&gt;
* '''Blockable''', '''BlockVolumeMul''', and '''Priority''' do not seem to be implemented in the engine. ''('''Blockable''' and '''BlockVolumeMul''' may have been intended to define how the sounds are muffled by world geometry, and '''Priority''' may have been intended to be used when culling sounds. Although all three properties are read from the .snt file, they do not seem to be referenced in any other code.)'' {{confirm}}&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;SOUNDS&amp;gt;''' categories: as well as '''&amp;lt;Main&amp;gt;''' the engine will also read lists of sounds from '''&amp;lt;Start&amp;gt;''' and '''&amp;lt;Stop&amp;gt;''' nodes. These may provide alternate sounds for the beginning and end of a loop. {{confirm}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding custom music==&lt;br /&gt;
&lt;br /&gt;
Custom music only needs to be a file in the '''.ogg''' format. It won't need an '''.snt''' file to be played with &amp;lt;code&amp;gt;PlayMusic();&amp;lt;/code&amp;gt; or at the credits, but you won't be able to use &amp;lt;code&amp;gt;PlaySoundAtEntity();&amp;lt;/code&amp;gt; with this file.&lt;br /&gt;
&lt;br /&gt;
Just like with sounds, it is good to create a folder for music in the mod's main folder, e.g. '''music'''. Put the '''.ogg''' file there.&lt;br /&gt;
&lt;br /&gt;
See [http://wiki.frictionalgames.com/hpl2/amnesia/script_functions Engine scripts] to learn how to use &amp;lt;code&amp;gt;PlayMusic();&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that only one music file can play at a time. For ambient sound, it is better to create a sound file (like described earlier). That way you can layer ambient sound with actual music when needed.&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Setting_up_an_Online_Repository&amp;diff=6803</id>
		<title>Setting up an Online Repository</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Setting_up_an_Online_Repository&amp;diff=6803"/>
		<updated>2024-03-24T11:30:48Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: /* HPL Engine Specifics */ update formatting and info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is about '''version control'''. It describes the process of setting up an online Git repository, and discusses the workflow.&lt;br /&gt;
&lt;br /&gt;
{{Note|The sole purpose of the article is to explain how to set a repository up and running. '''Check &amp;quot;See Also&amp;quot; in order to learn how to actually operate and maintain the repository.'''}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===Version control===&lt;br /&gt;
Version control is the process of maintaing a history of project versions which can be compared and reverted to, if anything goes wrong. A version control system  basically gives you the ability to quickly create a back-up of your changes with a few clicks (this is called a &amp;quot;commit&amp;quot;). Because only the changes from the last commit (version) are recorded, this process if very quick. Loading a commit also loads all of the previous ones, so the project is always preserved in its entirety.&lt;br /&gt;
&lt;br /&gt;
Changes to each file have to be added to a commit before one is created, so if something e.g. gets accidentally deleted, this change can be discarded and the file is restored (this is a much simpler and way faster process than restoring a regular back-up).&lt;br /&gt;
&lt;br /&gt;
===Why do I need an online repository?===&lt;br /&gt;
A repository is what records all the changes in a project. Creating a repository (&amp;quot;repo&amp;quot; for short) basically means that you start to monitor changes in a project. It can be stored locally (the repo is essentially a hidden folder in your project folder), but it can also be uploaded online.&lt;br /&gt;
&lt;br /&gt;
'''The biggest benefit of an online repo is the ability to easily combine changes made by all members of a mod team into a single &amp;quot;current&amp;quot; copy.''' It also allows team members to check out the versions of the project that other members are working on.&lt;br /&gt;
&lt;br /&gt;
Another important benefit is having an off-site back-up of your project. If you permanently delete your project folder, the repo (which is stored inside the project folder) will be gone along with it. An online repo lets you get back all your work within minutes, if something like that happens.&lt;br /&gt;
&lt;br /&gt;
If you're working on a mod by yourself, you probably don't need to put your repository online. However, for the reason stated above, it can be safer to have an online one.&lt;br /&gt;
&lt;br /&gt;
==Terminology==&lt;br /&gt;
[[File:Git-branch-demonstration.png|alt=|thumb|Git branches are useful to separate your version from the main project version, and later be merged when your work is done. The master branch is blue, and the side branch is green.]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Repository&lt;br /&gt;
|The data structure that stores each commit; it is often used as a substitute for the folder which holds the project.&lt;br /&gt;
|-&lt;br /&gt;
|Commit&lt;br /&gt;
|A set of project changes. Commits have to be labelled (this is called a commit message) and each commit should describe what it added or changed. Commits allow to revert unwanted changes and any accidents, as well as see what was changed and when. When something breaks, this possibility makes it much easier to fix. On the graph below, individual dots are commits.&lt;br /&gt;
|-&lt;br /&gt;
|Check out&lt;br /&gt;
|Changing the current version of the project to a specific commit, i.e. &amp;quot;check out a commit&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|Gitlab, Github&lt;br /&gt;
|Both are online services that offer to store your repos. At base level they are almost identical, although Github is more popular.&lt;br /&gt;
|-&lt;br /&gt;
|Branch&lt;br /&gt;
|A separate chain of commits; think of it as making your own version of the project, while others make their own ones. You can also have multiple branches made for different purposes. For example, it is advised to create a new branch when you want to test something that might break the project but can't be done in a single commit.&lt;br /&gt;
|-&lt;br /&gt;
|Clone&lt;br /&gt;
|&amp;quot;Download&amp;quot; a repository from the Internet.&lt;br /&gt;
|-&lt;br /&gt;
|Pull&lt;br /&gt;
|&amp;quot;Download&amp;quot; commits from a branch in the online repository. You pull in order to update the project on your end. The action of just downloading commits is called fetching, and pull also tries to automatically merge (see below) the changes.&lt;br /&gt;
|-&lt;br /&gt;
|Push&lt;br /&gt;
|&amp;quot;Upload&amp;quot; your local commits to the online repository. You push in order to update the project on the repository.&lt;br /&gt;
|-&lt;br /&gt;
|Remote&lt;br /&gt;
|The online version of the repository (i.e. what's on Github or Gitlab). Its online address is called an origin.&lt;br /&gt;
|-&lt;br /&gt;
|Merge&lt;br /&gt;
|This means joining two branches. A branch is always merged into another branch (called the target), so only one ends up having all the changes in it. Merging creates a new commit in the target branch.&lt;br /&gt;
|-&lt;br /&gt;
|Master/Main/Default Branch&lt;br /&gt;
|The main version of the project (note: Github and Gitlab now use &amp;quot;main&amp;quot; as the default branch). It is customary to only put stable versions of the project in the master branch. The name master comes from the default branch created along with a fresh repository, but the default branch can be set to any other branch in your online repo; in local repos, the master/main/default branch is essentially the same as any other branch.&lt;br /&gt;
|-&lt;br /&gt;
|Pull/Merge request&lt;br /&gt;
|If you're not an admin on the repo, you won't have the permission to push to the master branch. To have your work merged into the master, you will need to push your branch to the online repo, and then request the merge. This is called a Merge Request on Gitlab and (a bit confusingly) Pull Request on Github.&lt;br /&gt;
|-&lt;br /&gt;
|Revert&lt;br /&gt;
|This basically means &amp;quot;uncommiting&amp;quot; changes; reverting a commit creates a new commit that's the &amp;quot;opposite&amp;quot; of another one. It is also used as a way of saying &amp;quot;check out an older commit (before something was broken) and work from there&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
The easiest way of starting with git is to use Gitlab or Github.&lt;br /&gt;
&lt;br /&gt;
You will also need a git client (i.e. a program which does all git stuff).&lt;br /&gt;
You can use terminal commands (it is not hard but might be challenging if you have never used a terminal before) or [https://git-scm.com/downloads/guis a GUI client].&lt;br /&gt;
With many of the GUI apps, you will need to first [https://git-scm.com/ install command line git] anyway.&lt;br /&gt;
* If you are using [[Visual Studio Code]] for developing your mod, it has an intuitive GUI for git built-in. It does not have a graph view, but it can be added using a VS Code extension.&lt;br /&gt;
* GitKraken - possibly the most intuitive GUI for git, but the free version is limited (your repository on Gitlab/Github cannot be private).&lt;br /&gt;
* GitHub Desktop and SourceTree - two other intuitive GUIs.&lt;br /&gt;
* Git Cola - a fully free but a bit less intuitive GUI&lt;br /&gt;
&lt;br /&gt;
{{note| The following is an overview meant to be applicable to any git client. If it gets confusing, check out the Gitlab+Gitkraken tutorial below.}}&lt;br /&gt;
&lt;br /&gt;
If you're only starting a mod, create a repo on Gitlab/Github, pull it to your game folder (or custom story folder) and start working on the mod in the newly created repo folder (note that the folder is called the same as your online repo).&lt;br /&gt;
&lt;br /&gt;
What's more likely is that you already have some work put into the mod; you can enable an online repo in two ways then. In both methods you should end up with the repo folder being called the same as your mod folder to avoid issues with your mod.&lt;br /&gt;
&lt;br /&gt;
===The hacky way===&lt;br /&gt;
&lt;br /&gt;
# Create a repository on Gitlab/Github. To make things easier, name the repository the same way as your mod folder.&lt;br /&gt;
# Rename your local mod folder to something else (e.g. add a &amp;quot;2&amp;quot; at the end).&lt;br /&gt;
# Clone the repo to your game install. For example, to clone a custom story you should clone from the &amp;lt;code&amp;gt;custom_stories&amp;lt;/code&amp;gt; folder. This will create a folder named the same as your repo.&lt;br /&gt;
# If you did not name the repo same as your mod folder, you can later rename it to anything you want. This will not affect how git works.&lt;br /&gt;
# Copy paste your mod contents into the repo folder.&lt;br /&gt;
# Add .gitignore (see below).&lt;br /&gt;
# Commit all the files and push.&lt;br /&gt;
&lt;br /&gt;
===The proper way===&lt;br /&gt;
&lt;br /&gt;
This method avoids unnecessarily copy-pasting your entire mod, but is a bit more involved on the git side.&lt;br /&gt;
&lt;br /&gt;
Make sure to make the online repo empty when you're creating it on Github/Gitlab. This will display the commands you need to run to create and &amp;quot;sync&amp;quot; a local repo.&lt;br /&gt;
The following is a slightly expanded version of what those commands do:&lt;br /&gt;
# Initialize a local repository in your mod folder. You should change the initial branch to be called &amp;quot;main&amp;quot;, but if you don't, this can be fixed later.&lt;br /&gt;
# Add .gitignore (see below).&lt;br /&gt;
# Add and commit all your files.&lt;br /&gt;
# Add your remote origin repo to the repository. The origin is a link akin to &amp;lt;code&amp;gt;git@github.com:yourusername/yourmod.git&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If you accidentally added a Readme file, pull from the repo. There should be no conflicts and the branches should merge automatically.&lt;br /&gt;
# Push your changes to the repo.&lt;br /&gt;
&lt;br /&gt;
==Workflows==&lt;br /&gt;
&lt;br /&gt;
A popular workflow is to create separate branches for new features (e.g. a new map) and merge them into the master branch when the feature in question is finished.&lt;br /&gt;
This way of working can be a bit inconvenient for something like modding where you can rarely separate &amp;quot;features&amp;quot; when making a game.&lt;br /&gt;
It can be useful when making sweeping changes to the whole mod which might break it though, like renaming asset folders.&lt;br /&gt;
&lt;br /&gt;
Another workflow is:&lt;br /&gt;
* make your changes on the master branch&lt;br /&gt;
* when ready to push, pull from the repo first&lt;br /&gt;
* resolve conflicts (if any) locally&lt;br /&gt;
* fix your local changes if anything broke (e.g. a sound file you're using in a script got renamed; you'll need to change it in the script)&lt;br /&gt;
* push your changes&lt;br /&gt;
&lt;br /&gt;
If you're properly coordinating with your teammates, conflicts should be rare.&lt;br /&gt;
If working solo, just using the main branch is ok.&lt;br /&gt;
&lt;br /&gt;
==GitKraken and GitLab tutorial==&lt;br /&gt;
&lt;br /&gt;
{{note| The set-up process might seem long and complicated, but you only need to do it once and it will save you a lot of work once you start using version control.}}&lt;br /&gt;
&lt;br /&gt;
#[https://gitlab.com/ Register a free account at GitLab]&lt;br /&gt;
#[https://www.gitkraken.com/ Download and install GitKraken Git GUI]&lt;br /&gt;
&lt;br /&gt;
===Creating the Project on GitLab===&lt;br /&gt;
&lt;br /&gt;
# In your dashboard, click the green '''New project''' button or use the plus icon in the navigation bar. This opens the '''New project''' page.&lt;br /&gt;
# On the New project page, choose '''blank project.'''&lt;br /&gt;
# On the '''Blank project''' tab, provide the following information:&lt;br /&gt;
#* The name of your project in the '''Project name''' field. When adding the name, the '''Project slug''' will auto populate. The slug is what the GitLab instance will use as the URL path to the project. If you want a different slug, input the project name first, then change the slug after.&lt;br /&gt;
#* The '''Project description (optional)''' field enables you to enter a description for your project’s dashboard, which will help others understand what your project is about. Though it’s not required, it’s a good idea to fill this in.&lt;br /&gt;
#* Changing the '''Visibility Level''' modifies the project’s viewing and access rights for users.&lt;br /&gt;
#* (Optional) Selecting the Initialize repository with a README option creates a README file so that the Git repository is initialized, has a default branch, and can be cloned.&lt;br /&gt;
# Click '''Create project.'''&lt;br /&gt;
&lt;br /&gt;
{{note|Usually, you may want to initialize your project with a '''README''' file, but if you already have an existing mod folder you want to push to git, do not initialize your project with a '''README''' file. Save the project and follow the instructions inside for '''pushing an existing folder'''.}}&lt;br /&gt;
&lt;br /&gt;
===Setting up GitKraken===&lt;br /&gt;
&lt;br /&gt;
#Open GitKraken.&lt;br /&gt;
#Go to '''File-&amp;gt;Preferences-&amp;gt;Authentication'''.&lt;br /&gt;
#Select '''GitLab''' and click on '''Connect to GitLab'''.&lt;br /&gt;
#Approve the connection.&lt;br /&gt;
#It is recommended to generate an SSH key and add it to your GitLab account. [https://www.youtube.com/watch?v=z7jVOenqFYk Here's a guide].&lt;br /&gt;
&lt;br /&gt;
===Cloning the Project using GitKraken===&lt;br /&gt;
&lt;br /&gt;
#Open a new tab if there isn't one open already, and click on '''Clone a Repo''' and then '''GitLab'''&lt;br /&gt;
#In '''Where to clone to, n'''avigate to the directory in which you want to place the mod folder at.&lt;br /&gt;
#Select the '''Repository to clone''' and click on '''Clone the repo!'''&lt;br /&gt;
#Wait until the files are copied. When it's done, a prompt will show up to open the repo in the app - click on it to open the repository window.&lt;br /&gt;
#You can now create branches, commit, pull and push your changes via GitKraken!&lt;br /&gt;
&lt;br /&gt;
==HPL Engine Specifics==&lt;br /&gt;
When it comes to modding on the HPL engine, the following files should be added to the [https://git-scm.com/docs/gitignore .gitignore file]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*.map_cache&lt;br /&gt;
*.preload_cache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files on the gitignore list won't show up in your changes list between commits, making it much less cluttered.&lt;br /&gt;
However, remember that you should still include these files in your mod release.&lt;br /&gt;
&lt;br /&gt;
Another thing to note is that unlike HPL3, HPL2's map format is not designed with version control in mind.&lt;br /&gt;
This means that if you and your teammate both change the same map, the changes might be impossible to merge.&lt;br /&gt;
As such, you should avoid working on the same maps at the same time.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
Videos:&lt;br /&gt;
* [https://youtu.be/hwP7WQkmECE?si=nu8cDNFgEoXaO-_G Git explained in 100 seconds]&lt;br /&gt;
* [https://www.youtube.com/watch?v=HVsySz-h9r4 Git Tutorial: Command-line Fundamentals]&lt;br /&gt;
* [https://www.youtube.com/watch?v=ub9GfRziCtU GitKraken Tutorial For Beginners]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Visual_Studio_Code&amp;diff=6802</id>
		<title>Visual Studio Code</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Visual_Studio_Code&amp;diff=6802"/>
		<updated>2024-03-24T10:51:29Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Correct information about VS Code, add tutorial link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Studio Code is a lightweight code and config editor.&lt;br /&gt;
Featuring an integrated project folder browser and a simple but powerful interface, it is one of the best tools for developing HPL2 mods (for HPL3 it works well too, but [[CodeLite]] might be a better option).&lt;br /&gt;
&lt;br /&gt;
While VS Code is open-source, its releases still contain Microsoft's telemetry and tracking.&lt;br /&gt;
[https://vscodium.com/ VSCodium] is a &amp;quot;clean&amp;quot; version without those elements. It is functionally identical to VS Code.&lt;br /&gt;
&lt;br /&gt;
== HPL2 ==&lt;br /&gt;
&lt;br /&gt;
* Check out the built-in tutorial and the [https://code.visualstudio.com/docs/introvideos/basics online tutorial]. Some particularly useful features are:&lt;br /&gt;
** Ctrl+Shift+F to search text in the entire project folder&lt;br /&gt;
** Alt+Up/Down arrows to move lines of code&lt;br /&gt;
** Ctrl+Shift+Alt+Up/Down to copy lines of code&lt;br /&gt;
** Built-in git version control interface (if you already have git installed). This is one of the more convenient ways of using git. Read more about version control [[Setting up an Online Repository | here]] and more about git in VS Code [https://code.visualstudio.com/docs/sourcecontrol/intro-to-git here].&lt;br /&gt;
* Open your mod folder.&lt;br /&gt;
* Add highlighting for HPL2 file types; Open the settings menu (Ctrl+,) and search &amp;quot;file associations&amp;quot;. You can do this in the User tab (global) or the Workspace tab (will only apply to this project folder). Then add:&lt;br /&gt;
** &amp;lt;code&amp;gt;*.hps&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;cpp&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;*.lang&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;xml&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;*.cfg&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;xml&amp;lt;/code&amp;gt;&lt;br /&gt;
** You can also add associations for other HPL files, such as: .ent, .dae, .snt and so on. Pretty much all files in HPL2 use XML.&lt;br /&gt;
** This will also add auto-completion for various things (like function names) that have been written anywhere else in the project.&lt;br /&gt;
&lt;br /&gt;
Unlike HPL3, using a C++ extension will make things worse for you, as HPL2's style of scripting is not fully compatible with C++ standards (mainly; built-in functions don't have to and can't be included, and the &amp;lt;code&amp;gt;&amp;amp;in&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;&amp;amp;out&amp;lt;/code&amp;gt; syntax).&lt;br /&gt;
There do exist a few AngelScript plugins for VS Code, but none of them are suitable (and several of them are abandoned).&lt;br /&gt;
As such, there is no good way of adding hints for built-in HPL2 script functions at the moment.&lt;br /&gt;
&lt;br /&gt;
== HPL3 ==&lt;br /&gt;
&lt;br /&gt;
''Main article: [[HPL3/Scripting/Scripting Guide/Setting up Visual Studio Code | Setting up Visual Studio Code]]''&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Visual_Studio_Code&amp;diff=6801</id>
		<title>Visual Studio Code</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Visual_Studio_Code&amp;diff=6801"/>
		<updated>2024-03-23T17:52:49Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: fix formatting, clarify notes about extensions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Studio Code is a lightweight code and config editor based on Microsoft's full IDE Visual Studio.&lt;br /&gt;
Featuring an integrated project folder browser and a simple but powerful interface, it is one of the best tools for developing HPL2 mods (for HPL3 it works well too, but [[CodeLite]] might be a better option).&lt;br /&gt;
&lt;br /&gt;
An open-source version is available: [https://vscodium.com/ VSCodium]. It is functionally identical to VS Code.&lt;br /&gt;
&lt;br /&gt;
== HPL2 ==&lt;br /&gt;
&lt;br /&gt;
* Open your mod folder&lt;br /&gt;
* Check out the built-in VS Code tutorial. Some particularly useful features are:&lt;br /&gt;
** Ctrl+Shift+F to search text in the entire project folder&lt;br /&gt;
** Alt+Up/Down arrows to move lines of code&lt;br /&gt;
** Ctrl+Shift+Alt+Up/Down to copy lines of code&lt;br /&gt;
** Built-in git version control interface (if you already have git installed). This is one of the more convenient ways of using git. Read more about version control [[Setting up an Online Repository | here]] and more about git in VS Code [https://code.visualstudio.com/docs/sourcecontrol/intro-to-git here].&lt;br /&gt;
* Add highlighting for HPL2 file types; Open the settings menu (Ctrl+,) and search &amp;quot;file associations&amp;quot;. You can do this in the User tab (global) or the Workspace tab (will only apply to this project folder). Then add:&lt;br /&gt;
** &amp;lt;code&amp;gt;*.hps&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;cpp&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;*.lang&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;xml&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;*.cfg&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;xml&amp;lt;/code&amp;gt;&lt;br /&gt;
** You can also add associations for other HPL files, such as: .ent, .dae, .snt and so on. Pretty much all files in HPL2 use XML.&lt;br /&gt;
** This will also add auto-completion for various things (like function names) that have been written anywhere else in the project.&lt;br /&gt;
&lt;br /&gt;
Unlike HPL3, using a C++ extension will make things worse for you, as HPL2's style of scripting is not fully compatible with C++ standards (mainly; built-in functions don't have to and can't be included, and the &amp;lt;code&amp;gt;&amp;amp;in&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;&amp;amp;out&amp;lt;/code&amp;gt; syntax).&lt;br /&gt;
There do exist a few AngelScript plugins for VS Code, but none of them are suitable (and several of them are abandoned).&lt;br /&gt;
As such, there is no good way of adding hints for built-in HPL2 script functions at the moment.&lt;br /&gt;
&lt;br /&gt;
== HPL3 ==&lt;br /&gt;
&lt;br /&gt;
''Main article: [[HPL3/Scripting/Scripting Guide/Setting up Visual Studio Code | Setting up Visual Studio Code]]''&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Setting_up_an_Online_Repository&amp;diff=6800</id>
		<title>Setting up an Online Repository</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Setting_up_an_Online_Repository&amp;diff=6800"/>
		<updated>2024-03-23T17:38:31Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Add new content, make a few things more understandable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article is about '''version control'''. It describes the process of setting up an online Git repository, and discusses the workflow.&lt;br /&gt;
&lt;br /&gt;
{{Note|The sole purpose of the article is to explain how to set a repository up and running. '''Check &amp;quot;See Also&amp;quot; in order to learn how to actually operate and maintain the repository.'''}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===Version control===&lt;br /&gt;
Version control is the process of maintaing a history of project versions which can be compared and reverted to, if anything goes wrong. A version control system  basically gives you the ability to quickly create a back-up of your changes with a few clicks (this is called a &amp;quot;commit&amp;quot;). Because only the changes from the last commit (version) are recorded, this process if very quick. Loading a commit also loads all of the previous ones, so the project is always preserved in its entirety.&lt;br /&gt;
&lt;br /&gt;
Changes to each file have to be added to a commit before one is created, so if something e.g. gets accidentally deleted, this change can be discarded and the file is restored (this is a much simpler and way faster process than restoring a regular back-up).&lt;br /&gt;
&lt;br /&gt;
===Why do I need an online repository?===&lt;br /&gt;
A repository is what records all the changes in a project. Creating a repository (&amp;quot;repo&amp;quot; for short) basically means that you start to monitor changes in a project. It can be stored locally (the repo is essentially a hidden folder in your project folder), but it can also be uploaded online.&lt;br /&gt;
&lt;br /&gt;
'''The biggest benefit of an online repo is the ability to easily combine changes made by all members of a mod team into a single &amp;quot;current&amp;quot; copy.''' It also allows team members to check out the versions of the project that other members are working on.&lt;br /&gt;
&lt;br /&gt;
Another important benefit is having an off-site back-up of your project. If you permanently delete your project folder, the repo (which is stored inside the project folder) will be gone along with it. An online repo lets you get back all your work within minutes, if something like that happens.&lt;br /&gt;
&lt;br /&gt;
If you're working on a mod by yourself, you probably don't need to put your repository online. However, for the reason stated above, it can be safer to have an online one.&lt;br /&gt;
&lt;br /&gt;
==Terminology==&lt;br /&gt;
[[File:Git-branch-demonstration.png|alt=|thumb|Git branches are useful to separate your version from the main project version, and later be merged when your work is done. The master branch is blue, and the side branch is green.]]&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Repository&lt;br /&gt;
|The data structure that stores each commit; it is often used as a substitute for the folder which holds the project.&lt;br /&gt;
|-&lt;br /&gt;
|Commit&lt;br /&gt;
|A set of project changes. Commits have to be labelled (this is called a commit message) and each commit should describe what it added or changed. Commits allow to revert unwanted changes and any accidents, as well as see what was changed and when. When something breaks, this possibility makes it much easier to fix. On the graph below, individual dots are commits.&lt;br /&gt;
|-&lt;br /&gt;
|Check out&lt;br /&gt;
|Changing the current version of the project to a specific commit, i.e. &amp;quot;check out a commit&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|Gitlab, Github&lt;br /&gt;
|Both are online services that offer to store your repos. At base level they are almost identical, although Github is more popular.&lt;br /&gt;
|-&lt;br /&gt;
|Branch&lt;br /&gt;
|A separate chain of commits; think of it as making your own version of the project, while others make their own ones. You can also have multiple branches made for different purposes. For example, it is advised to create a new branch when you want to test something that might break the project but can't be done in a single commit.&lt;br /&gt;
|-&lt;br /&gt;
|Clone&lt;br /&gt;
|&amp;quot;Download&amp;quot; a repository from the Internet.&lt;br /&gt;
|-&lt;br /&gt;
|Pull&lt;br /&gt;
|&amp;quot;Download&amp;quot; commits from a branch in the online repository. You pull in order to update the project on your end. The action of just downloading commits is called fetching, and pull also tries to automatically merge (see below) the changes.&lt;br /&gt;
|-&lt;br /&gt;
|Push&lt;br /&gt;
|&amp;quot;Upload&amp;quot; your local commits to the online repository. You push in order to update the project on the repository.&lt;br /&gt;
|-&lt;br /&gt;
|Remote&lt;br /&gt;
|The online version of the repository (i.e. what's on Github or Gitlab). Its online address is called an origin.&lt;br /&gt;
|-&lt;br /&gt;
|Merge&lt;br /&gt;
|This means joining two branches. A branch is always merged into another branch (called the target), so only one ends up having all the changes in it. Merging creates a new commit in the target branch.&lt;br /&gt;
|-&lt;br /&gt;
|Master/Main/Default Branch&lt;br /&gt;
|The main version of the project (note: Github and Gitlab now use &amp;quot;main&amp;quot; as the default branch). It is customary to only put stable versions of the project in the master branch. The name master comes from the default branch created along with a fresh repository, but the default branch can be set to any other branch in your online repo; in local repos, the master/main/default branch is essentially the same as any other branch.&lt;br /&gt;
|-&lt;br /&gt;
|Pull/Merge request&lt;br /&gt;
|If you're not an admin on the repo, you won't have the permission to push to the master branch. To have your work merged into the master, you will need to push your branch to the online repo, and then request the merge. This is called a Merge Request on Gitlab and (a bit confusingly) Pull Request on Github.&lt;br /&gt;
|-&lt;br /&gt;
|Revert&lt;br /&gt;
|This basically means &amp;quot;uncommiting&amp;quot; changes; reverting a commit creates a new commit that's the &amp;quot;opposite&amp;quot; of another one. It is also used as a way of saying &amp;quot;check out an older commit (before something was broken) and work from there&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
The easiest way of starting with git is to use Gitlab or Github.&lt;br /&gt;
&lt;br /&gt;
You will also need a git client (i.e. a program which does all git stuff).&lt;br /&gt;
You can use terminal commands (it is not hard but might be challenging if you have never used a terminal before) or [https://git-scm.com/downloads/guis a GUI client].&lt;br /&gt;
With many of the GUI apps, you will need to first [https://git-scm.com/ install command line git] anyway.&lt;br /&gt;
* If you are using [[Visual Studio Code]] for developing your mod, it has an intuitive GUI for git built-in. It does not have a graph view, but it can be added using a VS Code extension.&lt;br /&gt;
* GitKraken - possibly the most intuitive GUI for git, but the free version is limited (your repository on Gitlab/Github cannot be private).&lt;br /&gt;
* GitHub Desktop and SourceTree - two other intuitive GUIs.&lt;br /&gt;
* Git Cola - a fully free but a bit less intuitive GUI&lt;br /&gt;
&lt;br /&gt;
{{note| The following is an overview meant to be applicable to any git client. If it gets confusing, check out the Gitlab+Gitkraken tutorial below.}}&lt;br /&gt;
&lt;br /&gt;
If you're only starting a mod, create a repo on Gitlab/Github, pull it to your game folder (or custom story folder) and start working on the mod in the newly created repo folder (note that the folder is called the same as your online repo).&lt;br /&gt;
&lt;br /&gt;
What's more likely is that you already have some work put into the mod; you can enable an online repo in two ways then. In both methods you should end up with the repo folder being called the same as your mod folder to avoid issues with your mod.&lt;br /&gt;
&lt;br /&gt;
===The hacky way===&lt;br /&gt;
&lt;br /&gt;
# Create a repository on Gitlab/Github. To make things easier, name the repository the same way as your mod folder.&lt;br /&gt;
# Rename your local mod folder to something else (e.g. add a &amp;quot;2&amp;quot; at the end).&lt;br /&gt;
# Clone the repo to your game install. For example, to clone a custom story you should clone from the &amp;lt;code&amp;gt;custom_stories&amp;lt;/code&amp;gt; folder. This will create a folder named the same as your repo.&lt;br /&gt;
# If you did not name the repo same as your mod folder, you can later rename it to anything you want. This will not affect how git works.&lt;br /&gt;
# Copy paste your mod contents into the repo folder.&lt;br /&gt;
# Add .gitignore (see below).&lt;br /&gt;
# Commit all the files and push.&lt;br /&gt;
&lt;br /&gt;
===The proper way===&lt;br /&gt;
&lt;br /&gt;
This method avoids unnecessarily copy-pasting your entire mod, but is a bit more involved on the git side.&lt;br /&gt;
&lt;br /&gt;
Make sure to make the online repo empty when you're creating it on Github/Gitlab. This will display the commands you need to run to create and &amp;quot;sync&amp;quot; a local repo.&lt;br /&gt;
The following is a slightly expanded version of what those commands do:&lt;br /&gt;
# Initialize a local repository in your mod folder. You should change the initial branch to be called &amp;quot;main&amp;quot;, but if you don't, this can be fixed later.&lt;br /&gt;
# Add .gitignore (see below).&lt;br /&gt;
# Add and commit all your files.&lt;br /&gt;
# Add your remote origin repo to the repository. The origin is a link akin to &amp;lt;code&amp;gt;git@github.com:yourusername/yourmod.git&amp;lt;/code&amp;gt;.&lt;br /&gt;
# If you accidentally added a Readme file, pull from the repo. There should be no conflicts and the branches should merge automatically.&lt;br /&gt;
# Push your changes to the repo.&lt;br /&gt;
&lt;br /&gt;
==Workflows==&lt;br /&gt;
&lt;br /&gt;
A popular workflow is to create separate branches for new features (e.g. a new map) and merge them into the master branch when the feature in question is finished.&lt;br /&gt;
This way of working can be a bit inconvenient for something like modding where you can rarely separate &amp;quot;features&amp;quot; when making a game.&lt;br /&gt;
It can be useful when making sweeping changes to the whole mod which might break it though, like renaming asset folders.&lt;br /&gt;
&lt;br /&gt;
Another workflow is:&lt;br /&gt;
* make your changes on the master branch&lt;br /&gt;
* when ready to push, pull from the repo first&lt;br /&gt;
* resolve conflicts (if any) locally&lt;br /&gt;
* fix your local changes if anything broke (e.g. a sound file you're using in a script got renamed; you'll need to change it in the script)&lt;br /&gt;
* push your changes&lt;br /&gt;
&lt;br /&gt;
If you're properly coordinating with your teammates, conflicts should be rare.&lt;br /&gt;
If working solo, just using the main branch is ok.&lt;br /&gt;
&lt;br /&gt;
==GitKraken and GitLab tutorial==&lt;br /&gt;
&lt;br /&gt;
{{note| The set-up process might seem long and complicated, but you only need to do it once and it will save you a lot of work once you start using version control.}}&lt;br /&gt;
&lt;br /&gt;
#[https://gitlab.com/ Register a free account at GitLab]&lt;br /&gt;
#[https://www.gitkraken.com/ Download and install GitKraken Git GUI]&lt;br /&gt;
&lt;br /&gt;
===Creating the Project on GitLab===&lt;br /&gt;
&lt;br /&gt;
# In your dashboard, click the green '''New project''' button or use the plus icon in the navigation bar. This opens the '''New project''' page.&lt;br /&gt;
# On the New project page, choose '''blank project.'''&lt;br /&gt;
# On the '''Blank project''' tab, provide the following information:&lt;br /&gt;
#* The name of your project in the '''Project name''' field. When adding the name, the '''Project slug''' will auto populate. The slug is what the GitLab instance will use as the URL path to the project. If you want a different slug, input the project name first, then change the slug after.&lt;br /&gt;
#* The '''Project description (optional)''' field enables you to enter a description for your project’s dashboard, which will help others understand what your project is about. Though it’s not required, it’s a good idea to fill this in.&lt;br /&gt;
#* Changing the '''Visibility Level''' modifies the project’s viewing and access rights for users.&lt;br /&gt;
#* (Optional) Selecting the Initialize repository with a README option creates a README file so that the Git repository is initialized, has a default branch, and can be cloned.&lt;br /&gt;
# Click '''Create project.'''&lt;br /&gt;
&lt;br /&gt;
{{note|Usually, you may want to initialize your project with a '''README''' file, but if you already have an existing mod folder you want to push to git, do not initialize your project with a '''README''' file. Save the project and follow the instructions inside for '''pushing an existing folder'''.}}&lt;br /&gt;
&lt;br /&gt;
===Setting up GitKraken===&lt;br /&gt;
&lt;br /&gt;
#Open GitKraken.&lt;br /&gt;
#Go to '''File-&amp;gt;Preferences-&amp;gt;Authentication'''.&lt;br /&gt;
#Select '''GitLab''' and click on '''Connect to GitLab'''.&lt;br /&gt;
#Approve the connection.&lt;br /&gt;
#It is recommended to generate an SSH key and add it to your GitLab account. [https://www.youtube.com/watch?v=z7jVOenqFYk Here's a guide].&lt;br /&gt;
&lt;br /&gt;
===Cloning the Project using GitKraken===&lt;br /&gt;
&lt;br /&gt;
#Open a new tab if there isn't one open already, and click on '''Clone a Repo''' and then '''GitLab'''&lt;br /&gt;
#In '''Where to clone to, n'''avigate to the directory in which you want to place the mod folder at.&lt;br /&gt;
#Select the '''Repository to clone''' and click on '''Clone the repo!'''&lt;br /&gt;
#Wait until the files are copied. When it's done, a prompt will show up to open the repo in the app - click on it to open the repository window.&lt;br /&gt;
#You can now create branches, commit, pull and push your changes via GitKraken!&lt;br /&gt;
&lt;br /&gt;
==HPL Engine Specifics==&lt;br /&gt;
When it comes to modding with the HPL engine, the following files should be added to the [https://git-scm.com/docs/gitignore .gitignore] list:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;*.map_cache&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;*.preload_cache&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files on the gitignore list won't show up in your changes list between commits, making it much less cluttered.&lt;br /&gt;
&lt;br /&gt;
Another thing to note is that HPL2's map format is not designed with version control in mind.&lt;br /&gt;
This means that if you and your teammate change the same map, the changes might be impossible to merge in reasonable time.&lt;br /&gt;
As such, you should avoid working on the same maps at the same time.&lt;br /&gt;
&lt;br /&gt;
HPL3 maps should work fine with git.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
Videos:&lt;br /&gt;
* [https://youtu.be/hwP7WQkmECE?si=nu8cDNFgEoXaO-_G Git explained in 100 seconds]&lt;br /&gt;
* [https://www.youtube.com/watch?v=HVsySz-h9r4 Git Tutorial: Command-line Fundamentals]&lt;br /&gt;
* [https://www.youtube.com/watch?v=ub9GfRziCtU GitKraken Tutorial For Beginners]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Visual_Studio_Code&amp;diff=6799</id>
		<title>Visual Studio Code</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Visual_Studio_Code&amp;diff=6799"/>
		<updated>2024-03-23T13:57:46Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: comment out faulty tutorial (for now) and add info about linter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Studio Code is a lightweight code and config editor based on Microsoft's full IDE Visual Studio.&lt;br /&gt;
Featuring an integrated project folder browser and a simple but powerful interface, it is one of the best tools for developing HPL2 mods (for HPL3 it works well too, but [[CodeLite]] might be a better option).&lt;br /&gt;
&lt;br /&gt;
An open-source version is available: [https://vscodium.com/ VSCodium]. It is functionally identical to VS Code.&lt;br /&gt;
&lt;br /&gt;
== HPL2 ==&lt;br /&gt;
&lt;br /&gt;
* Open your mod folder&lt;br /&gt;
* Check out the built-in VS Code tutorial. Some particularly useful features are:&lt;br /&gt;
** Ctrl+Shift+F to search text in the entire project folder&lt;br /&gt;
** Alt+Up/Down arrows to move lines of code&lt;br /&gt;
** Ctrl+Shift+Alt+Up/Down to copy lines of code&lt;br /&gt;
** Built-in git version control interface (if you already have git installed). This is one of the more convenient ways of using git. Read more about version control [[Setting up an Online Repository | here]] and more about git in VS Code [https://code.visualstudio.com/docs/sourcecontrol/intro-to-git here].&lt;br /&gt;
* Add highlighting for HPL2 file types; Open the settings menu (Ctrl+,) and search &amp;quot;file associations&amp;quot;. You can do this in the User tab (global) or the Workspace tab (will only apply to this project folder).&lt;br /&gt;
Then add:&lt;br /&gt;
** &amp;lt;code&amp;gt;*.hps&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;cpp&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;*.lang&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;xml&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;*.cfg&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;xml&amp;lt;/code&amp;gt;&lt;br /&gt;
** You can also add associations for other HPL files, such as: .ent, .dae, .snt and so on. Pretty much all files in HPL2 use XML.&lt;br /&gt;
** This will also add auto-completion for various things (like function names) that have been written anywhere else in the project.&lt;br /&gt;
&lt;br /&gt;
At the moment, there is no dedicated way of adding autocompletion for HPL2 script function signatures.&lt;br /&gt;
&lt;br /&gt;
Unlike HPL3, using a C++ extension will make things worse for you, as HPL2's style of scripting is not fully compatible with C++ standards.&lt;br /&gt;
There do exist a few AngelScript plugins for VS Code, but none of them are any good (and several of them are abandoned).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Optional: Install the [https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools cpptools] extension to get better error detection and other helpful features for scripting.&lt;br /&gt;
Note that using this extension will require some extra configuration because HPL's AngelScript is not pure C++.&lt;br /&gt;
If you're using VSCodium, you will have to [https://stackoverflow.com/questions/42017617/how-to-install-vs-code-extension-manually install the extension manually].&lt;br /&gt;
&lt;br /&gt;
You can also check out the HPL3 section, as certain parts of it are also relevant to HPL2. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== HPL3 ==&lt;br /&gt;
&lt;br /&gt;
''Main article: [[HPL3/Scripting/Scripting Guide/Setting up Visual Studio Code | Setting up Visual Studio Code]]''&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Visual_Studio_Code&amp;diff=6798</id>
		<title>Visual Studio Code</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Visual_Studio_Code&amp;diff=6798"/>
		<updated>2024-03-23T13:19:48Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Expand article to feature HPL2 config&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Visual Studio Code is a lightweight code and config editor based on Microsoft's full IDE Visual Studio.&lt;br /&gt;
Featuring an integrated project folder browser and a simple but powerful interface, it is one of the best tools for developing HPL2 mods (for HPL3 it works well too, but [[CodeLite]] might be a better option).&lt;br /&gt;
&lt;br /&gt;
An open-source version is available: [https://vscodium.com/ VSCodium]. It is functionally identical to VS Code.&lt;br /&gt;
&lt;br /&gt;
== HPL2 ==&lt;br /&gt;
&lt;br /&gt;
* Open your mod folder&lt;br /&gt;
* Check out the built-in VS Code tutorial. Some particularly useful features are:&lt;br /&gt;
** Ctrl+Shift+F to search text in the entire project folder&lt;br /&gt;
** Alt+Up/Down arrows to move lines of code&lt;br /&gt;
** Ctrl+Shift+Alt+Up/Down to copy lines of code&lt;br /&gt;
** Built-in git version control interface (if you already have git installed). This is one of the more convenient ways of using git. Read more about version control [[Setting up an Online Repository | here]] and more about git in VS Code [https://code.visualstudio.com/docs/sourcecontrol/intro-to-git here].&lt;br /&gt;
* Add highlighting for HPL2 file types; Open the settings menu (Ctrl+,) and search &amp;quot;file associations&amp;quot;. You can do this in the User tab (global) or the Workspace tab (will only apply to this project folder).&lt;br /&gt;
Then add:&lt;br /&gt;
** &amp;lt;code&amp;gt;*.hps&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;cpp&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;*.lang&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;xml&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;*.cfg&amp;lt;/code&amp;gt; with a value of &amp;lt;code&amp;gt;xml&amp;lt;/code&amp;gt;&lt;br /&gt;
** You can also add associations for other HPL files, such as: .ent, .dae, .snt and so on. Pretty much all files in HPL2 use XML.&lt;br /&gt;
&lt;br /&gt;
Optional: Install the [https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools cpptools] extension to get better error detection and other helpful features for scripting.&lt;br /&gt;
This step is optional, as VS Code will still give you hints about code that you have already written once anywhere in the project.&lt;br /&gt;
Note that using this extension will require some extra configuration because HPL's AngelScript is not pure C++.&lt;br /&gt;
If you're using VSCodium, you will have to [https://stackoverflow.com/questions/42017617/how-to-install-vs-code-extension-manually install the extension manually].&lt;br /&gt;
&lt;br /&gt;
You can also check out the HPL3 section, as certain parts of it are also relevant to HPL2.&lt;br /&gt;
&lt;br /&gt;
== HPL3 ==&lt;br /&gt;
&lt;br /&gt;
''Main article: [[HPL3/Scripting/Scripting Guide/Setting up Visual Studio Code | Setting up Visual Studio Code]]''&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Third_party_tools&amp;diff=6797</id>
		<title>HPL2/Third party tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Third_party_tools&amp;diff=6797"/>
		<updated>2024-03-23T12:51:41Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Reorganised sections, linked to VS code page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Information on some of the third-party tools that can be used to create models, graphics and art for the game and what specific things you will need to setup to make it all work. &lt;br /&gt;
&lt;br /&gt;
===Text/Script coding programs===&lt;br /&gt;
&lt;br /&gt;
# [[Visual Studio Code]] is pretty much the best option for developing mods.&lt;br /&gt;
#[[Notepad%2B%2B|Notepad++]]: An advanced text editor.&lt;br /&gt;
#[[Geany|Geany]]: An alternative for Notepad++.&lt;br /&gt;
&lt;br /&gt;
Mac OS X alternatives:&lt;br /&gt;
&lt;br /&gt;
#[[:hpl2:third_party_tools:text:textwrangler|TextWrangler]]: A good alternative to Notepad++ on Windows.&lt;br /&gt;
#[[TextMate|TextMate]]: A nice and smooth code editor with many customization options.&lt;br /&gt;
&lt;br /&gt;
===3D programs===&lt;br /&gt;
&lt;br /&gt;
All 3D models regardless of program used must be exported to the [http://collada.org Collada] format or [http://en.wikipedia.org/wiki/FBX FBX] format (note that FBX support was added in Amnesia version 1.3).&lt;br /&gt;
&lt;br /&gt;
#[[Blender]] - Open-source 3D modeling program that comes with built-in support for [http://collada.org Collada].&lt;br /&gt;
#[[Autodesk_Maya|Autodesk Maya]] - Professional 3D modeling program with [https://collada.org/mediawiki/index.php/OpenCOLLADA OpenCOLLADA] plugin support.&lt;br /&gt;
&lt;br /&gt;
===2D programs===&lt;br /&gt;
&lt;br /&gt;
#[[GIMP]] - Open-source 2D GNU Image Manipulation Program.&lt;br /&gt;
#[https://krita.org/ Krita] - a free and open source image editing program with focus on painting. It is more similar to Photoshop than GIMP.&lt;br /&gt;
#[[Adobe_Photoshop|Adobe Photoshop]] - Professional image editing software.&lt;br /&gt;
#[[Paint.NET|Paint.net]]&lt;br /&gt;
&lt;br /&gt;
===Audio programs===&lt;br /&gt;
&lt;br /&gt;
#[[Audacity]] - a general-use audio recording and manipualtion tool.&lt;br /&gt;
#[https://lmms.io/ LMMS] - a free and open source program for making music.&lt;br /&gt;
&lt;br /&gt;
==Community resources==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- These aren't tools so they don't really fit here (nor do they belong in tutorials), but I'm not sure there's need for a new &amp;quot;community resources&amp;quot; page yet. -Darkfire --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Script packages===&lt;br /&gt;
&lt;br /&gt;
#[[HPL2/HPL2_Helper_Scripts|HPL2 Helper Scripts]] is a package of .hps files containing script classes and functions that may be useful in advanced HPL2 scripts. Requires ATDD version 1.5 to work.&lt;br /&gt;
&lt;br /&gt;
===Asset packs===&lt;br /&gt;
&lt;br /&gt;
The following are available as Steam Workshop dependencies (requires TDD version 1.5), but can also be used as regular asset packs:&lt;br /&gt;
&lt;br /&gt;
#[[AMFP_Asset_pack_installation_and_usage|AMFP Asset pack installation and usage]] - A complete package of assets unique to The Machine For Pigs, with minimal overhauls and quality of life improvements.&lt;br /&gt;
#[[Amadeus_Asset_pack_installation_and_usage| Amadeus asset pack installation and usage]]&lt;br /&gt;
#[[LucysEyes_Asset_pack_installation_and_usage| In Lucy's Eyes asset pack installation and usage]]&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Third_party_tools&amp;diff=6753</id>
		<title>HPL2/Third party tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Third_party_tools&amp;diff=6753"/>
		<updated>2024-01-31T17:03:22Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Clean up, add LMMS to the audio program list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Information on some of the third-party tools that can be used to create models, graphics and art for the game and what specific things you will need to setup to make it all work. &lt;br /&gt;
&lt;br /&gt;
===3D programs===&lt;br /&gt;
&lt;br /&gt;
All 3D models regardless of program used must be exported to the [http://collada.org Collada] format or [http://en.wikipedia.org/wiki/FBX FBX] format (note that FBX support was added in Amnesia version 1.3).&lt;br /&gt;
&lt;br /&gt;
#[[Blender]] - Open-source 3D modeling program that comes with built-in support for [http://collada.org Collada].&lt;br /&gt;
#[[Autodesk_Maya|Autodesk Maya]] - Professional 3D modeling program with [https://collada.org/mediawiki/index.php/OpenCOLLADA OpenCOLLADA] plugin support.&lt;br /&gt;
&lt;br /&gt;
===2D programs===&lt;br /&gt;
&lt;br /&gt;
#[[GIMP]] - Open-source 2D GNU Image Manipulation Program.&lt;br /&gt;
#[https://krita.org/ Krita] - a free and open source image editing program with focus on painting. It is more similar to Photoshop than GIMP.&lt;br /&gt;
#[[Adobe_Photoshop|Adobe Photoshop]] - Professional image editing software.&lt;br /&gt;
#[[Paint.NET|Paint.net]]&lt;br /&gt;
&lt;br /&gt;
===Audio programs===&lt;br /&gt;
&lt;br /&gt;
#[[Audacity]] - a general-use audio recording and manipualtion tool.&lt;br /&gt;
#[https://lmms.io/ LMMS] - a free and open source program for making music.&lt;br /&gt;
&lt;br /&gt;
===Text/Script coding programs===&lt;br /&gt;
&lt;br /&gt;
#[[Notepad%2B%2B|Notepad++]]: An advanced text editor.&lt;br /&gt;
# [https://vscodium.com/ VSCodium], an open version of VSCode. Has much better editing, search and autocomplete capabilities than Notepad++. You will need to add .hps as a C++ extension and .lang as an XML extension to get syntax highlighting.&lt;br /&gt;
#[[Geany|Geany]]: An alternative for Notepad++.&lt;br /&gt;
&lt;br /&gt;
Mac OS X alternatives:&lt;br /&gt;
&lt;br /&gt;
#[[:hpl2:third_party_tools:text:textwrangler|TextWrangler]]: A good alternative to Notepad++ on Windows.&lt;br /&gt;
#[[TextMate|TextMate]]: A nice and smooth code editor with many customization options.&lt;br /&gt;
&lt;br /&gt;
==Community resources==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- These aren't tools so they don't really fit here (nor do they belong in tutorials), but I'm not sure there's need for a new &amp;quot;community resources&amp;quot; page yet. -Darkfire --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Script packages===&lt;br /&gt;
&lt;br /&gt;
#[[HPL2/HPL2_Helper_Scripts|HPL2 Helper Scripts]] is a package of .hps files containing script classes and functions that may be useful in advanced HPL2 scripts. Requires ATDD version 1.5 to work.&lt;br /&gt;
&lt;br /&gt;
===Asset packs===&lt;br /&gt;
&lt;br /&gt;
The following are available as Steam Workshop dependencies (requires TDD version 1.5), but can also be used as regular asset packs:&lt;br /&gt;
&lt;br /&gt;
#[[AMFP_Asset_pack_installation_and_usage|AMFP Asset pack installation and usage]] - A complete package of assets unique to The Machine For Pigs, exactly as they work in aforementioned game, with minimal overhauls and quality of life improvements.&lt;br /&gt;
#[[Amadeus_Asset_pack_installation_and_usage| Amadeus asset pack installation and usage]]&lt;br /&gt;
#[[LucysEyes_Asset_pack_installation_and_usage| In Lucy's Eyes asset pack installation and usage]]&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6470</id>
		<title>HPL2/Changelog</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6470"/>
		<updated>2023-10-25T19:28:53Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: remove mention of Steam beta branch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:1.5 Update}}&lt;br /&gt;
&lt;br /&gt;
This article is about Amnesia: The Dark Descent's 2023 update.&lt;br /&gt;
&lt;br /&gt;
At the moment these changes are available only on Steam.&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&lt;br /&gt;
# Ability to provide a custom story with full conversion capabilities [[HPL2/custom_story_settings.cfg | by specifying InitCfgFile in custom_story_settings.cfg]]. In other words, Full Conversions can now be installed and launched like Custom Stories. This also means you will be able to convert your existing full conversion mods into &amp;quot;extended&amp;quot; custom stories, and upload them to the Steam Workshop.&lt;br /&gt;
# Fixed a crash caused by using more than 2&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt; (65,535) callbacks (the crash happened when changing levels and would usually be caused by overusing Timers)&lt;br /&gt;
# Added an option to [[HPL2/menu.cfg | menu.cfg]] to allow specifying colors for menu text&lt;br /&gt;
# Added an option to [[HPL2/main_init.cfg | main_init.cfg]] to specify how custom stories are loaded within a custom story (including if they show up at all)&lt;br /&gt;
# New scripting features (documentation [[HPL2/Engine_Scripts | here]]):&lt;br /&gt;
## Added new script function: ShowScreenImage&lt;br /&gt;
## Added new script callback: OnUpdate&lt;br /&gt;
## Added &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.hps&amp;lt;/code&amp;gt; files&lt;br /&gt;
# Fixed skybox cubemaps rendering incorrectly. This removes the need for players patching a dll manually.&lt;br /&gt;
# Fixed &amp;quot;Chest&amp;quot; type entity changing the required coin number to zero after loading a save, [[HPL2/Tutorials/Coin_chests | making thalers actually usable]]&lt;br /&gt;
# Added navigation of custom story menu with gamepad&lt;br /&gt;
# Restored old custom story window behaviour when loading an entry (the game now starts the story immediately like in the earlier game versions, instead of having to go through a pseudo-modded menu and starting the game there)&lt;br /&gt;
# Fixed option to specify multiple slime types for SlimeAreas (see [[HPL2/game.cfg#Slime |Slime section in &amp;lt;code&amp;gt;game.cfg&amp;lt;/code&amp;gt;]]; slime types can be added and then selected in the entity editor for Slime type entities)&lt;br /&gt;
# Improved color picker in editors (this only applies to the Windows version; the editors will now be included in the game files by default. Community editors still can be used, but might be overwritten by updates if you don't rename the exe files; config files will be overwritten by the update or verifying game files, so the dark theme will be removed if you use it)&lt;br /&gt;
# &amp;quot;Other fixes&amp;quot;&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6469</id>
		<title>HPL2/Changelog</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6469"/>
		<updated>2023-10-25T13:03:02Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: clarified the part about editor overwriting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:1.5 Update}}&lt;br /&gt;
&lt;br /&gt;
This article is about Amnesia: The Dark Descent's 2023 update.&lt;br /&gt;
&lt;br /&gt;
At the moment these changes are available only on a Steam beta release of the game.&lt;br /&gt;
&lt;br /&gt;
{{tip|On Steam, right click Amnesia &amp;gt; Properties... &amp;gt; Betas &amp;gt; Select &amp;quot;Public total conversion beta&amp;quot; in Beta participation. Be warned that this can overwrite community editors.}}&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&lt;br /&gt;
# Ability to provide a custom story with full conversion capabilities [[HPL2/custom_story_settings.cfg | by specifying InitCfgFile in custom_story_settings.cfg]]. In other words, Full Conversions can now be installed and launched like Custom Stories. This also means you will be able to convert your existing full conversion mods into &amp;quot;extended&amp;quot; custom stories, and upload them to the Steam Workshop.&lt;br /&gt;
# Fixed a crash caused by using more than 2&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt; (65,535) callbacks (the crash happened when changing levels and would usually be caused by overusing Timers)&lt;br /&gt;
# Added an option to [[HPL2/menu.cfg | menu.cfg]] to allow specifying colors for menu text&lt;br /&gt;
# Added an option to [[HPL2/main_init.cfg | main_init.cfg]] to specify how custom stories are loaded within a custom story (including if they show up at all)&lt;br /&gt;
# New scripting features (documentation [[HPL2/Engine_Scripts | here]]):&lt;br /&gt;
## Added new script function: ShowScreenImage&lt;br /&gt;
## Added new script callback: OnUpdate&lt;br /&gt;
## Added &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.hps&amp;lt;/code&amp;gt; files&lt;br /&gt;
# Fixed skybox cubemaps rendering incorrectly. This removes the need for players patching a dll manually.&lt;br /&gt;
# Fixed &amp;quot;Chest&amp;quot; type entity changing the required coin number to zero after loading a save, [[HPL2/Tutorials/Coin_chests | making thalers actually usable]]&lt;br /&gt;
# Added navigation of custom story menu with gamepad&lt;br /&gt;
# Restored old custom story window behaviour when loading an entry (the game now starts the story immediately like in the earlier game versions, instead of having to go through a pseudo-modded menu and starting the game there)&lt;br /&gt;
# Fixed option to specify multiple slime types for SlimeAreas (see [[HPL2/game.cfg#Slime |Slime section in &amp;lt;code&amp;gt;game.cfg&amp;lt;/code&amp;gt;]]; slime types can be added and then selected in the entity editor for Slime type entities)&lt;br /&gt;
# Improved color picker in editors (this only applies to the Windows version; the editors will now be included in the game files by default. Community editors still can be used, but might be overwritten by updates if you don't rename the exe files; config files will be overwritten by the update or verifying game files, so the dark theme will be removed if you use it)&lt;br /&gt;
# &amp;quot;Other fixes&amp;quot;&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6468</id>
		<title>HPL2/Changelog</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6468"/>
		<updated>2023-10-25T13:00:49Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: added missing entries to the changelog&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:1.5 Update}}&lt;br /&gt;
&lt;br /&gt;
This article is about Amnesia: The Dark Descent's 2023 update.&lt;br /&gt;
&lt;br /&gt;
At the moment these changes are available only on a Steam beta release of the game.&lt;br /&gt;
&lt;br /&gt;
{{tip|On Steam, right click Amnesia &amp;gt; Properties... &amp;gt; Betas &amp;gt; Select &amp;quot;Public total conversion beta&amp;quot; in Beta participation. Be warned that this can overwrite community editors.}}&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&lt;br /&gt;
# Ability to provide a custom story with full conversion capabilities [[HPL2/custom_story_settings.cfg | by specifying InitCfgFile in custom_story_settings.cfg]]. In other words, Full Conversions can now be installed and launched like Custom Stories. This also means you will be able to convert your existing full conversion mods into &amp;quot;extended&amp;quot; custom stories, and upload them to the Steam Workshop.&lt;br /&gt;
# Fixed a crash caused by using more than 2&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt; (65,535) callbacks (the crash happened when changing levels and would usually be caused by overusing Timers)&lt;br /&gt;
# Added an option to [[HPL2/menu.cfg | menu.cfg]] to allow specifying colors for menu text&lt;br /&gt;
# Added an option to [[HPL2/main_init.cfg | main_init.cfg]] to specify how custom stories are loaded within a custom story (including if they show up at all)&lt;br /&gt;
# New scripting features (documentation [[HPL2/Engine_Scripts | here]]):&lt;br /&gt;
## Added new script function: ShowScreenImage&lt;br /&gt;
## Added new script callback: OnUpdate&lt;br /&gt;
## Added &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.hps&amp;lt;/code&amp;gt; files&lt;br /&gt;
# Fixed skybox cubemaps rendering incorrectly. This removes the need for players patching a dll manually.&lt;br /&gt;
# Fixed &amp;quot;Chest&amp;quot; type entity changing the required coin number to zero after loading a save, [[HPL2/Tutorials/Coin_chests | making thalers actually usable]]&lt;br /&gt;
# Added navigation of custom story menu with gamepad&lt;br /&gt;
# Restored old custom story window behaviour when loading an entry (the game now starts the story immediately like in the earlier game versions, instead of having to go through a pseudo-modded menu and starting the game there)&lt;br /&gt;
# Fixed option to specify multiple slime types for SlimeAreas (see [[HPL2/game.cfg#Slime |Slime section in &amp;lt;code&amp;gt;game.cfg&amp;lt;/code&amp;gt;]]; slime types can be added and then selected in the entity editor for Slime type entities)&lt;br /&gt;
# Improved color picker in editors (this only applies to the Windows version; the editors will now be included in the game files by default. Community editors still can be used, but might be overwritten by updates if you don't rename the exe files)&lt;br /&gt;
# &amp;quot;Other fixes&amp;quot;&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Engine_Scripts&amp;diff=6467</id>
		<title>HPL2/Engine Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Engine_Scripts&amp;diff=6467"/>
		<updated>2023-09-28T10:38:37Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: /* Main */ explain the OnUpdate afStep argument&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TocRight}}&lt;br /&gt;
&lt;br /&gt;
This page documents all scripts available in Amnesia: The Dark Descent.&lt;br /&gt;
&lt;br /&gt;
{{note|'''Note''': Some of the functions require the Amnesia 1.3 or 1.5 update. Steam and other online store copies should be automatically updated. Other copies can get 1.3 [http://www.frictionalgames.com/forum/thread-24334.html here].}}&lt;br /&gt;
&lt;br /&gt;
== Directives ==&lt;br /&gt;
&lt;br /&gt;
First off, &amp;lt;code&amp;gt;#include &amp;quot;file.hps&amp;quot;&amp;lt;/code&amp;gt; can be used to programmatically merge together multiple separate files to make organizing scripts easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.5}}&lt;br /&gt;
&lt;br /&gt;
==Engine scripts==&lt;br /&gt;
===Main===&lt;br /&gt;
&lt;br /&gt;
The following functions are the main hps functions that the HPL2 engine looks to run on certain events - similar to the C++ int main() function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void OnStart();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs when the map is loaded for the first time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnEnter();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs whenever the player enters a map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnLeave();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs when the player leaves a map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnGameStart();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is found in the global.hps file and the inventory.hps file, and is run when the game is first started by the player (ie via &amp;quot;Start New Game&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnUpdate(float afStep);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{ReqVer|1.5}}&lt;br /&gt;
&lt;br /&gt;
This function is executed for every game update or &amp;quot;tick&amp;quot;. Can be used for rapid-firing updates instead of looping timers. Keep in mind that this can affect game performance if not used with care.&lt;br /&gt;
&lt;br /&gt;
#''afStep''- time elapsed since the last frame. Multiply speeds, distances etc. by this argument to avoid framerate dependence issues (for example: if you move something in this function with constant speed, it will move faster on computers which run the game with high FPS and slower on computers with low FPS).&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float RandFloat(float afMin, float afMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generates a random float.&lt;br /&gt;
&lt;br /&gt;
#''afMin ''- minimum value&lt;br /&gt;
#''afMax ''- maximum value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
int RandInt(int alMin, int alMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generates a random int. Note: the maximum value is ''inclusive''  - the RandInt() function may return this value.&lt;br /&gt;
&lt;br /&gt;
#''alMin ''- minimum value&lt;br /&gt;
#''alMax ''- maximum value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool StringContains(string&amp;amp; asString, string&amp;amp; asSubString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a string contains the specified string. &amp;lt;br /&amp;gt;Example: searching for &amp;quot;hello&amp;quot; in &amp;quot;hello world&amp;quot; would return '''true'''.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string to check&lt;br /&gt;
#''asSubString ''- the string to search for&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
string&amp;amp; StringSub(string&amp;amp; asString, int alStart, int alCount);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the substring in a string. &amp;lt;br /&amp;gt;Example: in the string &amp;quot;frictional games rocks&amp;quot;, using 4 as ''alStart''  and 6 as ''alCount''  would return '''&amp;quot;tional&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string&lt;br /&gt;
#''alStart ''- start position in the string&lt;br /&gt;
#''alCount ''- amount of characters&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
int StringToInt(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns an integer converted from a string, else returns 0.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float StringToFloat(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns a float converted from a string, else returns 0.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool StringToBool(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns a boolean converted from a string, else returns false.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&lt;br /&gt;
===Mathematical Operations===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathSin(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the sine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathCos(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the cosine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathTan(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the tangent of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAsin(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc sine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAcos(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc cosine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAtan(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc tangent of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAtan2(float afX, float afY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Calculates and returns the arc tangent of the specified values.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - First value to operate.&lt;br /&gt;
#''afY''  - Second value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathSqrt(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the square root of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathPow(float afBase, float afExp);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the value of afBase raised to the power of afExp.&lt;br /&gt;
&lt;br /&gt;
#''afBase''  - The base value.&lt;br /&gt;
#''afExp''  - Value to calculate the base with.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathMin(float afA, float afB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the lowest value.&lt;br /&gt;
&lt;br /&gt;
#''afA''  - First value.&lt;br /&gt;
#''afB''  - Second value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathMax(float afA, float afB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the highest value.&lt;br /&gt;
&lt;br /&gt;
#''afA''  - First value.&lt;br /&gt;
#''afB''  - Second value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathClamp(float afX, float afMin, float afMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns afX clamped between afMin and afMax. If afX &amp;lt; afMin, returns afMin, and if afX &amp;gt; afMax, returns afMax.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - The value to clamp.&lt;br /&gt;
#''afMin''  - The minimum value to clamp afX with.&lt;br /&gt;
#''afMax''  - The maximum value to clamp afX with.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAbs(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the absolute value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void Print(string&amp;amp; asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints a string to the log file (''hpl.log'').&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddDebugMessage(string&amp;amp; asString, bool abCheckForDuplicates);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints a string to the debug console.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string to print&lt;br /&gt;
#''abCheckForDuplicates ''- if true, the string won't be printed more than once on screen until it disappears&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ProgLog(string&amp;amp; asLevel, string&amp;amp; asMessage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints an entry to the ProgLog (progression log). &amp;lt;br /&amp;gt;ProgLog is a file created in Documents/Amnesia/main (or an FC folder if one is being used). It logs certain events, such us opening the menu or picking up the lantern, as well as the player's state (Health, Sanity, Oil, Tinderboxes, Coins), for the purpose of documenting a tester's playstyle. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;This function allows to log custom messages.The messages in the ProgLog file are sorted by time elapsed since a map was loaded.&lt;br /&gt;
&lt;br /&gt;
ProgLog has to be enabled for a player profile in ''user_settings.cfg''  before it starts working.&lt;br /&gt;
&lt;br /&gt;
#''asLevel ''- can be &amp;quot;Low&amp;quot;, &amp;quot;Medium&amp;quot; or &amp;quot;High&amp;quot;. It's a tag which appears in each log entry, for event prioritising.&lt;br /&gt;
#''asMessage ''- The custom message to be printed to the log.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool ScriptDebugOn();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the debug mode is enabled. &amp;lt;br /&amp;gt;See [[HPL2/Development_Environment|&amp;quot;Setting up Development Environment&amp;quot;]] to setup debug mode on your own computer.&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
{{warning|Regular variables (int, float, etc.) are '''not''' saved by the game. Using them in important parts of yor script will break it upon loading a game save. In HPL, those variables should only be used for disposable counters, like spawning objects in a &amp;quot;for&amp;quot; loop. For variables which need to be saved, use the wrappers as described below.}}&lt;br /&gt;
&lt;br /&gt;
====Local====&lt;br /&gt;
&lt;br /&gt;
Local variables can be used throughout the same script file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
void AddLocalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
int GetLocalVarInt(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
void AddLocalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
float GetLocalVarFloat(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarString(string&amp;amp; asName, const string&amp;amp; asVal);&lt;br /&gt;
void AddLocalVarString(string&amp;amp; asName, string&amp;amp; asVal);&lt;br /&gt;
string&amp;amp; GetLocalVarString(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Global====&lt;br /&gt;
&lt;br /&gt;
Global variables can be used throughout several maps and can be accessed by several script files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
void AddGlobalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
int GetGlobalVarInt(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
void AddGlobalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
float GetGlobalVarFloat(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarString(string&amp;amp; asName, const string&amp;amp; asVal);&lt;br /&gt;
void AddGlobalVarString(string&amp;amp; asName, string&amp;amp; asVal);&lt;br /&gt;
string&amp;amp; GetGlobalVarString(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Particle Systems===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PreloadParticleSystem(string&amp;amp; asPSFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preloads a particle system.&lt;br /&gt;
&lt;br /&gt;
#''asPSFile''  - The particle system file to load. Extension: .ps&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateParticleSystemAtEntity(string&amp;amp; asPSName, string&amp;amp; asPSFile, string&amp;amp; asEntity, bool abSavePS);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a particle system on an entity.&lt;br /&gt;
&lt;br /&gt;
#''asPSName ''- internal name&lt;br /&gt;
#''asPSFile ''- the particle system to use + extension .ps&lt;br /&gt;
#''asEntity ''- the entity to create the particle system at&lt;br /&gt;
#''abSavePS ''- determines whether a particle system should &amp;quot;remember&amp;quot; its shown/hidden state, so that this state can be restored when the player revisits the level&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateParticleSystemAtEntityExt(string&amp;amp; asPSName, string&amp;amp; asPSFile, string&amp;amp; asEntity, bool abSavePS,&lt;br /&gt;
float afR, float afG, float afB, float afA, bool abFadeAtDistance, float afFadeMinEnd, float afFadeMinStart,&lt;br /&gt;
float afFadeMaxStart, float afFadeMaxEnd);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a particle system on an entity, extended method with more options.&lt;br /&gt;
&lt;br /&gt;
#''asPSName ''- internal name&lt;br /&gt;
#''asPSFile ''- the particle system to use + extension .ps&lt;br /&gt;
#''asEntity ''- the entity to create the particle system at&lt;br /&gt;
#''abSavePS ''- determines whether a particle system should &amp;quot;remember&amp;quot; its shown/hidden state, so that this state can be restored when the player revisits the level&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
#''abFadeAtDistance ''- determines whether a particle system fades from a certain distance on&lt;br /&gt;
#''afFadeMinEnd ''- minimum distance at which the particle system stops fading&lt;br /&gt;
#''afFadeMinStart ''- minimum distance at which the particle system starts fading&lt;br /&gt;
#''afFadeMaxStart ''- maximum distance at which the particle system starts fading&lt;br /&gt;
#''afFadeMaxEnd ''- maximum distance at which the particle system stops fading&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void DestroyParticleSystem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Destroys a particle system.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - The internal name of the particle system&lt;br /&gt;
&lt;br /&gt;
===Sounds &amp;amp; Music===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PreloadSound(string&amp;amp; asSoundFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preloads a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundFile''  - The sound file to load. Extension: .snt&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlaySoundAtEntity(string&amp;amp; asSoundName, string&amp;amp; asSoundFile, string&amp;amp; asEntity, float afFadeTime, bool abSaveSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a sound on an entity.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''asSoundFile ''- the sound to use + extension .snt&lt;br /&gt;
#''asEntity ''- the entity to create the sound at, can be &amp;quot;Player&amp;quot;&lt;br /&gt;
#''afFadeTime ''- time in seconds the sound needs to fade. Avoids enemies hearing the sound if afFadeTime is at least 0.1f&lt;br /&gt;
#''abSaveSound ''- if ''true'', a looping sound will &amp;quot;remember&amp;quot; its playback state (currently playing/stopped), and that state will be restored the next time the level is entered. If ''true'', the sound is never attached to the entity! Note that saving should only be used on ''looping sounds''!&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeInSound(string&amp;amp; asSoundName, float afFadeTime, bool abPlayStart);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades in a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''afFadeTime ''- time in seconds&lt;br /&gt;
#''abPlayStart ''- ?&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopSound(string&amp;amp; asSoundName, float afFadeTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades out a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''afFadeTime ''- time in seconds, use 0 to immediatly stop the sound&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlayMusic(string&amp;amp; asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plays music.&lt;br /&gt;
&lt;br /&gt;
#''asMusicFile ''- the music to play + extension .ogg&lt;br /&gt;
#''abLoop ''- determines whether a music track should loop&lt;br /&gt;
#''afVolume ''- volume of the music&lt;br /&gt;
#''afFadeTime ''- time in seconds until music reaches full volume&lt;br /&gt;
#''alPrio ''- priority of the music. Note that only the music with the highest priority can be heard! 0 - lowest, 1 - higher, etc.&lt;br /&gt;
#''abResume''  - if ''true'', playback will be continued from where the track stopped after the call to StopMusic(); if ''false'', the track will be restarted.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopMusic(float afFadeTime, int alPrio);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops music.&lt;br /&gt;
&lt;br /&gt;
#''afFadeTime ''- time in seconds until music stops&lt;br /&gt;
#''alPrio ''- the priority of the music that should stop&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeGlobalSoundVolume(float afDestVolume, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Influences the global sound volume, that means everything you can hear '''from the world'''. This does not affect music of GUI sounds.&lt;br /&gt;
&lt;br /&gt;
#''afDestVolume ''- desired volume&lt;br /&gt;
#''afTime ''- time in seconds until volume reaches desired volume&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeGlobalSoundSpeed(float afDestSpeed, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Influences the global sound speed.&lt;br /&gt;
&lt;br /&gt;
#''afDestSpeed ''- desired speed&lt;br /&gt;
#''afTime ''- time in seconds until volume reaches desired speed&lt;br /&gt;
&lt;br /&gt;
===Lights===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLightVisible(string&amp;amp; asLightName, bool abVisible);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/disables lights.&lt;br /&gt;
&lt;br /&gt;
#''asLightName ''- internal name&lt;br /&gt;
#''abVisible ''- determines the state of the light&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeLightTo(string&amp;amp; asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the properties of a light.&lt;br /&gt;
&lt;br /&gt;
#''asLightName ''- internal name&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
#''afRadius ''- radius of the light. -1 means keeping the radius&lt;br /&gt;
#''afTime ''- time in seconds until change is done&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLightFlickerActive(string&amp;amp; asLightName, bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates flickering on a light.&lt;br /&gt;
&lt;br /&gt;
#''asLightName''  - The internal light name&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&lt;br /&gt;
==Game scripts==&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartCredits(string&amp;amp; asMusic, bool abLoopMusic, string&amp;amp; asTextCat, string&amp;amp; asTextEntry, int alEndNum);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts the end credits screen.&lt;br /&gt;
&lt;br /&gt;
#''asMusic ''- the music to play (including .ogg)&lt;br /&gt;
#''abLoopMusic ''- determines whether the music should loop&lt;br /&gt;
#''asTextCat ''- the category to be used in the .lang file&lt;br /&gt;
#''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
#''alEndNum ''- Amnesia has 3 different endings and displays a code at the bottom. Determines which code is displayed. 0-2 will display codes, any other integer will not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartDemoEnd();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts the end images that are used in the demo, images are named &amp;quot;demo_end01.jpg&amp;quot;, increase the number for each image you want to use. (NEEDS VERIFICATION)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AutoSave();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the game to the auto save.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CheckPoint (string&amp;amp; asName, string&amp;amp; asStartPos, string&amp;amp; asCallback, string&amp;amp; asDeathHintCat, string&amp;amp; asDeathHintEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets a checkpoint at which the player will respawn in case he dies. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asName, int alCount)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;Count is 0 on the first checkpoint load!&lt;br /&gt;
&lt;br /&gt;
#''asName ''- the internal name&lt;br /&gt;
#''asStartPos ''- the name of the StartPos in the editor&lt;br /&gt;
#''asCallback ''- the function to call when the player dies/respawns&lt;br /&gt;
#''asDeathHintCat ''- the category of the death hint message to be used in the .lang file&lt;br /&gt;
#''asDeathHintEntry ''- the entry in the .lang file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ChangeMap(string&amp;amp; asMapName, string&amp;amp; asStartPos, string&amp;amp; asStartSound, string&amp;amp; asEndSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediatly loads another map.&lt;br /&gt;
&lt;br /&gt;
#''asMapName ''- the file to load&lt;br /&gt;
#''asStartPos ''- the name of the StartPos on the next map&lt;br /&gt;
#''asStartSound ''- the sound that is played when the change starts&lt;br /&gt;
#''asEndSound ''- the sound that is played when the new map is loaded&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ClearSavedMaps();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clears the &amp;quot;history&amp;quot; of the save, useful to do when you know the player will not be able to go back anymore. Makes the next save much smaller in size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateDataCache();&lt;br /&gt;
void DestroyDataCache();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This caches all current textures and models and they are not released until destroy is called. If there is already cached data it is destroyed.&lt;br /&gt;
Create caches to enable faster loading when going back to a map. Destroy the cache if you know the player won't go back to that map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetMapDisplayNameEntry(string&amp;amp; asNameEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the map name shown in save file names. If none is set NULL is assumed.&lt;br /&gt;
&lt;br /&gt;
#''asNameEntry ''- the entry to display, category must be &amp;quot;Levels&amp;quot;!&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the skybox.&lt;br /&gt;
&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxTexture(string&amp;amp; asTexture);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the texture of the skybox.&lt;br /&gt;
&lt;br /&gt;
#''asTexture''  - The texture file to set. Extension: .dds&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxColor(float afR, float afG, float afB, float afA);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the solid color of the skybox rather than a texture.&lt;br /&gt;
&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the global fog.&lt;br /&gt;
&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogColor(float afR, float afG, float afB, float afA);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the color to use for the global fog.&lt;br /&gt;
&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogProperties(float afStart, float afEnd, float afFalloffExp, bool abCulling);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the properties for the global fog.&lt;br /&gt;
&lt;br /&gt;
#''afStart ''- how many meters from the camera should the fog begin&lt;br /&gt;
#''afEnd ''- how many meters from the camera should the fog reach full thickness&lt;br /&gt;
#''afFalloffExp ''- the amount by which the thinkness increases&lt;br /&gt;
#''abCulling ''- whether occlusion culling is active for the fog; this prevents objects behind the fog from being loaded&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetupLoadScreen(string&amp;amp;asTextCat, string&amp;amp;asTextEntry, int alRandomNum, string&amp;amp;asImageFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which loading screen will be shown when changing maps.&lt;br /&gt;
&lt;br /&gt;
#''asTextCat ''- the category of the loading text in the .lang file to be shown on the loading screen&lt;br /&gt;
#''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
#''alRandomNum ''- if greater 1, then it will randomize between 1 and alRandom for each LoadScreen giving entry the suffix XX (eg 01). If &amp;lt; =1 then no suffix is added&lt;br /&gt;
#''asImageFile ''- the image to be shown (optional)&lt;br /&gt;
&lt;br /&gt;
===Game Timer===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddTimer(string&amp;amp; asName, float afTime, string&amp;amp; asFunction);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a timer which calls a function when it expires. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asTimer)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#''asName ''- the name of the timer&lt;br /&gt;
#''afTime ''- time in seconds&lt;br /&gt;
#''asFunction ''- the function to call&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveTimer(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes a timer, no matter how much time is left.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - the internal name of the timer.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetTimerTimeLeft(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the time left on a timer.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - the internal name of the timer.&lt;br /&gt;
&lt;br /&gt;
===Screen Effects===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeOut(float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to black.&lt;br /&gt;
&lt;br /&gt;
''afTime ''- time in seconds until the screen is completly black&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeIn(float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen back to normal.&lt;br /&gt;
&lt;br /&gt;
''afTime ''- time in seconds until the screen back to normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeImageTrailTo(float afAmount, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Applies the image trail effect to the screen.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeSepiaColorTo(float afAmount, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the screen go dark red.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeRadialBlurTo(float afSize, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Applies radial blur effects to the screen.&lt;br /&gt;
&lt;br /&gt;
''afSize ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetRadialBlurStartDist(float afStartDist);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines at which distance the radial blur effects appear.&lt;br /&gt;
&lt;br /&gt;
''afStartDist ''- the distance at which the effect starts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartEffectFlash(float afFadeIn, float afWhite, float afFadeOut);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to white.&lt;br /&gt;
&lt;br /&gt;
''afFadeIn ''- time in seconds until screen is white &amp;lt;br /&amp;gt;''afWhite ''- determines to which percentage the screen fades to white (1.0 = completly white) &amp;lt;br /&amp;gt;''afFadeOut ''- time in seconds until screen is back to normal again&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartEffectEmotionFlash(string&amp;amp; asTextCat, string&amp;amp; asTextEntry, string&amp;amp; asSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to white and shows a text message.&lt;br /&gt;
&lt;br /&gt;
''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the text entry in the .lang file &amp;lt;br /&amp;gt;''asSound ''- the sound to play while fading&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddEffectVoice(string&amp;amp; asVoiceFile, string&amp;amp; asEffectFile, string&amp;amp; asTextCat, string&amp;amp; asTextEntry,&lt;br /&gt;
bool abUsePosition, string&amp;amp; asPosEntity, float afMinDistance, float afMaxDistance);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This adds a voice and an effect to be played. It is okay to call this many times in order to play many voices in a row. The EffectVoiceOverCallback is not called until ALL voices have finished.&lt;br /&gt;
&lt;br /&gt;
''asVoiceFile ''- the voice to play &amp;lt;br /&amp;gt;''asEffectFile ''- the effect to play &amp;lt;br /&amp;gt;''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the text entry in the .lang file &amp;lt;br /&amp;gt;''abUsePosition ''- plays using 3D from the entity, or without 3D &amp;lt;br /&amp;gt;''asPosEntity ''- the entity at which the effect appears &amp;lt;br /&amp;gt;''afMinDistance ''- minimum distance to see the effect &amp;lt;br /&amp;gt;''afMaxDistance ''- maximum distance to see the effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopAllEffectVoices(float afFadeOutTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops all voices and calls the EffectVoiceOverCallback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEffectVoiceActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether EffectVoices are still active.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetEffectVoiceOverCallback(string&amp;amp; asFunc);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the function to be called when the EffectVoices are finished. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetFlashbackIsActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a flashback is still in effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartPlayerSpawnPS(string&amp;amp; asSPSFile);&lt;br /&gt;
void StopPlayerSpawnPS();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuously spawn regular particle systems (''.ps'') around the player. Particles created by this script carry over from map to map. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;''asSPSFile''  - the ''.sps''  file to use. Exemplary ''.sps''  files are located in the ''/misc''  folder in the main game directory. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;Custom ''.sps''  files can be created by hand in a text editor (see existing ones and mimic how those are written). &amp;lt;br /&amp;gt;Since ''StopPlayerSpawnPS()''  doesn't seem to work, to stop an SPS you must create an ''.sps''  file with an empty particle field field and override the old SPS by calling ''StartPlayerSpawnPS''  again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlayGuiSound(string&amp;amp; asSoundFile, float afVolume);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plays a sound, not using 3D.&lt;br /&gt;
&lt;br /&gt;
''asSoundFile ''- the sound to play (extension is .snt) &amp;lt;br /&amp;gt;''afVolume ''- the volume of the sound&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shakes the screen.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity of the shake &amp;lt;br /&amp;gt;''afTime ''- duration of the shake &amp;lt;br /&amp;gt;''afFadeInTime ''- time in seconds until full intensity is reached &amp;lt;br /&amp;gt;''afFadeOutTime ''- time until screen is back to normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInDarknessEffectsActive(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables the sanity drain and night vision effects while in the darkness.&lt;br /&gt;
&lt;br /&gt;
''bool abX''  - Enable/disable effects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ShowScreenImage(string &amp;amp;in asImageName, float afX, float afY, float afScale, bool abUseRelativeCoordinates, float afDuration, float afFadeIn, float afFadeOut);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.5}}&lt;br /&gt;
&lt;br /&gt;
Displays an image file directly onto the screen.&lt;br /&gt;
&lt;br /&gt;
''asImageName'' - The image file to render (.jpg, .png, .tga, .dds)&lt;br /&gt;
&lt;br /&gt;
''afX'' - The X position of the image&lt;br /&gt;
&lt;br /&gt;
''afY'' - The Y position of the image&lt;br /&gt;
&lt;br /&gt;
''afScale'' - The scale of the image (default 1.0f)&lt;br /&gt;
&lt;br /&gt;
''abUseRelativeCoordinates'' - Whether or not to use relative coordinates for positioning. Use false for absolute.&lt;br /&gt;
&lt;br /&gt;
''afDuration'' - The duration that the image is displayed for.&lt;br /&gt;
&lt;br /&gt;
''afFadeIn'' - The time, in seconds, to fade in the image.&lt;br /&gt;
&lt;br /&gt;
''afFadeOut'' - The time, in seconds, to fade out the image.&lt;br /&gt;
&lt;br /&gt;
===Insanity===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInsanitySetEnabled(string&amp;amp; asSet, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which InsanitySets are enabled.&lt;br /&gt;
&lt;br /&gt;
''asSet ''- the set &amp;lt;br /&amp;gt;''abX ''- enabled or not&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartInsanityEvent(string &amp;amp;in asEventName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Starts a specified insanity event.&lt;br /&gt;
&lt;br /&gt;
''asEventName ''- Insanity event to play.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartRandomInsanityEvent();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts a random insanity event from the available sets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopCurrentInsanityEvent();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Stops the currently playing insanity event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void InsanityEventIsActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether an insanity event is currently in effect… Or so it was supposed to be, but as it doesn't return a value, we can never know [http://wiki.frictionalgames.com/lib/images/smileys/icon_smile.gif?nolink&amp;amp;15x15]&lt;br /&gt;
&lt;br /&gt;
===Player===&lt;br /&gt;
&lt;br /&gt;
Note that the player's maximum health and sanity is 100.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enabled/Disable player controlled movement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ChangePlayerStateToNormal();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets certain effects back to normal. It can for example make the player drop an item.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerCrouching(bool abCrouch);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forces the player to crouch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pushes the player into a certain direction. Note that you need values above ~2000 to see any effects.&lt;br /&gt;
&lt;br /&gt;
''afX ''- amount along the X-axis &amp;lt;br /&amp;gt;''afY ''- amount along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- amount along the Z-axis &amp;lt;br /&amp;gt;''abUseLocalCoords ''- If true, axes are based on where the player is facing, not the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ShowPlayerCrossHairIcons(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the icons when a player has something in focus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerSanity(float afSanity);&lt;br /&gt;
void AddPlayerSanity(float afSanity);&lt;br /&gt;
float GetPlayerSanity();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the sanity of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerHealth(float afHealth);&lt;br /&gt;
void AddPlayerHealth(float afHealth);&lt;br /&gt;
float GetPlayerHealth();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the health of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerLampOil(float afOil);&lt;br /&gt;
void AddPlayerLampOil(float afOil);&lt;br /&gt;
float GetPlayerLampOil();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the lamp oil of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetPlayerSpeed();&lt;br /&gt;
float GetPlayerYSpeed();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the current speed of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSanityDrainDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables sanity drain from darkness, monsters, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveSanityBoost();&lt;br /&gt;
void GiveSanityBoostSmall();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Boosts the player's sanity by a fixed amount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveSanityDamage(float afAmount, bool abUseEffect);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reduces the sanity of the player.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount of sanity damage done &amp;lt;br /&amp;gt;''abUseEffect ''- determines whether an effect is played when the sanity damage is dealt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GivePlayerDamage(float afAmount, string&amp;amp; asType, bool abSpinHead, bool abLethal);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reduces the health of the player.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount of damage done to health &amp;lt;br /&amp;gt;''asType ''- plays a certain effect on the screen when the damage is dealt (BloodSplat, Claws or Slash) &amp;lt;br /&amp;gt;''abSpinHead ''- changes the camera view when damage is dealt &amp;lt;br /&amp;gt;''abLethal ''- set to true if player can die from given damage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerFOVMulTo(float afX, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the field of view of the player. A shorter FOV will create a zoom effect.&lt;br /&gt;
&lt;br /&gt;
''afX ''- multiplier of default FOV (1 is default) &amp;lt;br /&amp;gt;''afSpeed ''- the speed of change between FOV's&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerAspectMulTo(float afX, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the aspect ratio of the player. Basically stretches or narrows the screen horizontally.&lt;br /&gt;
&lt;br /&gt;
''afX ''- multiplier of default aspect (default is 1) &amp;lt;br /&amp;gt;''afSpeed ''- the speed of change between FOV's&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rotates the position of the camera on the player's body.&lt;br /&gt;
&lt;br /&gt;
''afX ''- angle of rotation of head, positive being counter-clockwise &amp;lt;br /&amp;gt;''afSpeedMul ''- speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow) &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed of rotation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the position of the camera on the player's body.&lt;br /&gt;
&lt;br /&gt;
''afX ''- amount along the X-axis &amp;lt;br /&amp;gt;''afY ''- amount along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- amount along the Z-axis &amp;lt;br /&amp;gt;''afSpeed ''- speed at which the change happens &amp;lt;br /&amp;gt;''afSlowDownDist ''- distance at which to start slowing down (prevents the head from abruptly stopping)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartPlayerLookAt(string&amp;amp; asEntityName, float afSpeedMul, float afMaxSpeed, string&amp;amp; asAtTargetCallback);&lt;br /&gt;
void StopPlayerLookAt();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forces the player to look at a certain entity until StopPlayerLookAt is used.&lt;br /&gt;
&lt;br /&gt;
''asEntityName ''- the entity to look at &amp;lt;br /&amp;gt;''afSpeedMul ''- how fast should the player look at the entity &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed allowed &amp;lt;br /&amp;gt;''asAtTargetCallback ''- function to call when player looks at target&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerMoveSpeedMul(float afMul);&lt;br /&gt;
void SetPlayerRunSpeedMul(float afMul);&lt;br /&gt;
void SetPlayerLookSpeedMul(float afMul);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the player's move/run/look speed. Default is 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerJumpForceMul(float afMul);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Changes the player's jump multiplier. Higher values = higher jumps. Default is 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerJumpDisabled(bool abX);&lt;br /&gt;
void SetPlayerCrouchDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the player's ability to jump/crouch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportPlayer(string&amp;amp; asStartPosName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instantly teleports the player to the target StartPos.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternActive(bool abX, bool abUseEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the player use his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetLanternActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the player currently uses his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the player's ability to use his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternLitCallback(string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the function to call when the player uses his lantern. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;MyFunc(bool abLit)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetMessage(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a message on the screen.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTime ''- determines how long the message is displayed. If time is &amp;lt; =0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetDeathHint(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the message that appears when the player dies.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void DisableDeathStartSound();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables the death sound when the player dies. This must be called directly before player is killed! The variable as soon as player dies too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
void MovePlayerForward(float afAmount)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;REQUIRES THE 1.2 PATCH: JUSTINE&amp;quot; Moves the player forward. It needs to be called in a timer that updates 60 times / second.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerFallDamageDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables the player's ability to take fall damage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerPos(float afX, float afY, float afZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Sets the player's position within the level.&lt;br /&gt;
&lt;br /&gt;
''afX''  - X co-ordinate position. &amp;lt;br /&amp;gt;''afY''  - Y co-ordinate position. &amp;lt;br /&amp;gt;''afZ''  - Z co-ordinate position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetPlayerPosX();&lt;br /&gt;
float GetPlayerPosY();&lt;br /&gt;
float GetPlayerPosZ();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the player's position within the level on the specified axis.&lt;br /&gt;
&lt;br /&gt;
===Journal===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddNote(string&amp;amp; asNameAndTextEntry, string&amp;amp; asImage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a note to the player's journal.&lt;br /&gt;
&lt;br /&gt;
''asNameAndTextEntry ''- entries in the .lang file. Must end with _Name and _Text and be in category &amp;quot;Journal&amp;quot;! &amp;lt;br /&amp;gt;''asImage ''- the background image to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddDiary(string&amp;amp; asNameAndTextEntry, string&amp;amp; asImage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a diary to the player's journal.&lt;br /&gt;
&lt;br /&gt;
''asNameAndTextEntry ''- entries in the .lang file. Must end with _NameX and _TextY whereas X and Y are numbers of the parts (_Name1: first diary, _Text1: first page) and be in category &amp;quot;Journal&amp;quot;! &amp;lt;br /&amp;gt;''asImage ''- the background image to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ReturnOpenJournal(bool abOpenJournal);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only called in the pickup diary callback! If true the journal displays the entry else not.&lt;br /&gt;
&lt;br /&gt;
===Quests===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddQuest(string&amp;amp; asName, string&amp;amp; asNameAndTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a quest to the player's journal under mementos.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name to be used &amp;lt;br /&amp;gt;''asNameAndTextEntry ''- entry in the .lang file. Must start with &amp;quot;Quest_&amp;lt;texthere&amp;gt;_Text”, and be in category “Journal”!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CompleteQuest(string&amp;amp; asName, string&amp;amp; asNameAndTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Completes a quest.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name of the quest &amp;lt;br /&amp;gt;''asNameAndTextEntry ''- entry in the .lang file. Must start with &amp;quot; Quest_&amp;lt;texthere&amp;gt;_Text ”, and be in category “Journal”!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool QuestIsCompleted(string&amp;amp; asName);&lt;br /&gt;
bool QuestIsAdded(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a quest is completed/added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetNumberOfQuestsInMap(int alNumberOfQuests);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the number of quests in the map.&lt;br /&gt;
&lt;br /&gt;
''alNumberOfQuests ''- Amount of Quests&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveHint(string&amp;amp; asName, string&amp;amp; asMessageCat, string&amp;amp; asMessageEntry, float afTimeShown);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a hint on the player's screen.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name &amp;lt;br /&amp;gt;''asMessageCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asMessageEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTimeShown ''- time in seconds until the message disappears. If time is &amp;lt;= 0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void BlockHint(string&amp;amp; asName);&lt;br /&gt;
void UnBlockHint(string&amp;amp; asName);&lt;br /&gt;
void RemoveHint(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Blocking a hint prevents it from being shown. Blocked hints are included in savefiles, so they should persist between levels.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Removing&amp;quot; a hint actually removes it from the list of already given hints, thus allowing it to show up again.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name. Basic game hints use the same name as their respective lang entries, with the exception of &amp;quot;numbered&amp;quot; hints. For example, &amp;lt;code&amp;gt;EntityGrab&amp;lt;/code&amp;gt; blocks the &amp;lt;code&amp;gt;EntityGrab01&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EntityGrab02&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
&lt;br /&gt;
===Inventory===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ExitInventory();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exits the inventory by force.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInventoryDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables the player's ability to open his inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInventoryMessage(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a message at the bottom of the inventory screen.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTime ''- time in seconds until the message disappears. If life time is &amp;lt;= 0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveItem(string&amp;amp; asName, string&amp;amp; asType, string&amp;amp; asSubTypeName, string&amp;amp; asImageName, float afAmount);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds an item to the inventory of the player. Note that the item does not have to exist as entity in the world to be able to do this.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asType ''- item type to give, Available types are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Puzzle&lt;br /&gt;
*Lantern&lt;br /&gt;
*Health&lt;br /&gt;
*Sanity&lt;br /&gt;
*LampOil&lt;br /&gt;
*Tinderbox&lt;br /&gt;
&lt;br /&gt;
''asSubTypeName ''- item name for .lang file &amp;lt;br /&amp;gt;''asImageName ''- the image which will appear in inventory. For example: &amp;lt;code&amp;gt;void GiveItem(&amp;quot;chemical_container_full_1&amp;quot;, &amp;quot;Puzzle&amp;quot;, &amp;quot;chemical_container_full&amp;quot;, &amp;quot;chemical_container_full.tga&amp;quot;, 1);&amp;lt;/code&amp;gt; will use the image from &amp;lt;code&amp;gt;graphics/item/chemical_container_full.tga&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount the item gives, - For example: Oil potions will fill the oil meter by this amount, Health potions will heal by this amount, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveItem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an item from the player's inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool HasItem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the player has an item in his inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveItemFromFile(string&amp;amp; asName, string&amp;amp; asFileName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a single item to the player's inventory. This is meant to be used for debug mostly as it creates the actual item and then destroys it.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asFileName ''- item to give + extension (.ent)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddCombineCallback(string&amp;amp; asName, string&amp;amp; asItemA, string&amp;amp; asItemB, string&amp;amp; asFunction, bool abAutoRemove);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to combine items in his inventory. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asItemA, string &amp;amp;in asItemB)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name for the callback &amp;lt;br /&amp;gt;''asItemA ''- internal name of first item &amp;lt;br /&amp;gt;''asItemB ''- internal name of second item &amp;lt;br /&amp;gt;''asFunction ''- the function to call &amp;lt;br /&amp;gt;''abAutoRemove ''- determines whether the callback should be removed when the items are combined&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveCombineCallback(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes a combine callback. &amp;lt;br /&amp;gt;''asName''  - the internal name of the callback to be removed (as specified in AddCombineCallback)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddUseItemCallback(string&amp;amp; asName, string&amp;amp; asItem, string&amp;amp; asEntity, string&amp;amp; asFunction, bool abAutoDestroy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to use items on the world. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asItem, string &amp;amp;in asEntity)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asItem ''- internal name of the item &amp;lt;br /&amp;gt;''asEntity ''- entity to be able to use the item on &amp;lt;br /&amp;gt;''asFunction ''- function to call &amp;lt;br /&amp;gt;''abAutoDestroy ''- determines whether the item is destroyed when used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveUseItemCallback(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an item callback.&lt;br /&gt;
&lt;br /&gt;
===Entities===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityActive(string&amp;amp; asName, bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates an entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityVisible(string &amp;amp;in asName, bool abVisible);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates an entity's visual mesh. The collision body remains.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity. &amp;lt;br /&amp;gt;''abActive''  - Activate/deactivate mesh.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEntityExists(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether an entity exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityCustomFocusCrossHair(string&amp;amp; asName, string&amp;amp; asCrossHair);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the crosshair that is used when focusing an entity.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCrossHair ''- desired crosshair, can be: Default (uses default), Grab, Push, Ignite, Pick, LevelDoor, Ladder&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void CreateEntityAtArea(string&amp;amp; asEntityName, string&amp;amp; asEntityFile, string&amp;amp; asAreaName, bool abFullGameSave);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates an entity at an area. When creating an enemy though, it cannot chase properly along PathNodes(using for example ShowEnemyPlayerPosition).&lt;br /&gt;
&lt;br /&gt;
''asEntityName ''- internal name &amp;lt;br /&amp;gt;''asEntityFile ''- entity to be used extension .ent &amp;lt;br /&amp;gt;''asAreaName ''- the area to create the entity at &amp;lt;br /&amp;gt;''abFullGameSave ''- determines whether an entity &amp;quot;remembers&amp;quot; its state&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ReplaceEntity(string &amp;amp;in asName, string &amp;amp;in asBodyName, string &amp;amp;in asNewEntityName, string &amp;amp;in asNewEntityFile, bool abFullGameSave);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Removes an entity and places a new one in its place.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to replace. &amp;lt;br /&amp;gt;''asBodyName''  - Name of the body of the entity to place the new entity at. If empty the first body is used (might be buggy, recommended to name a body anyway). &amp;lt;br /&amp;gt;''asNewEntityName''  - Name of the new entity. &amp;lt;br /&amp;gt;''asNewEntityFile''  - Name of the new entity file. Extension .ent. &amp;lt;br /&amp;gt;''abFullGameSave''  - Whether ALL properties of this entity should be saved throughout levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlaceEntityAtEntity(string &amp;amp;in asName, string &amp;amp;in asTargetEntity, string &amp;amp;in asTargetBodyName, bool abUseRotation);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Places an entity at the position of another entity. Does not work for enemies, use TeleportEnemyToEntity instead.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to place. &amp;lt;br /&amp;gt;''asTargetEntity''  - Name of the other entity to place the first entity at. &amp;lt;br /&amp;gt;''asTargetBodyName''  - Name of the body of the entity to place the first entity at. If empty the first body is used (might be buggy, recommended to name a body anyway). &amp;lt;br /&amp;gt;''abUseRotation''  - Whether the entity should be rotated like the target entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPos(string &amp;amp;in asName, float afX, float afY, float afZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Moves an entity to a position in the level.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to move. &amp;lt;br /&amp;gt;''afX''  - X co-ordinate position. &amp;lt;br /&amp;gt;''afY''  - Y co-ordinate position. &amp;lt;br /&amp;gt;''afZ''  - Z co-ordinate position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
float GetEntityPosX(string &amp;amp;in asName);&lt;br /&gt;
float GetEntityPosY(string &amp;amp;in asName);&lt;br /&gt;
float GetEntityPosZ(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns an entity's position in the level on the specified axis.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPlayerLookAtCallback(string&amp;amp; asName, string&amp;amp; asCallback, bool abRemoveWhenLookedAt);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player looks at a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: 1 = looking, -1 = not looking&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCallback ''- function to call &amp;lt;br /&amp;gt;''abRemoveWhenLookedAt ''- determines whether the callback should be removed when the player looked at the entity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPlayerInteractCallback(string&amp;amp; asName, string&amp;amp; asCallback, bool abRemoveOnInteraction);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player interacts with a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCallback ''- function to call &amp;lt;br /&amp;gt;''abRemoveOnInteraction ''- determines whether the callback should be removed when the player interacts with the entity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityCallbackFunc(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player interacts with a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, string &amp;amp;in type)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;Type depends on entity type and includes: &amp;quot;OnPickup&amp;quot;, &amp;quot;Break&amp;quot;, &amp;quot;OnIgnite&amp;quot;, etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityConnectionStateChangeCallback(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A callback called when ever the connection state changes (button being switched on, lever switched, etc). &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void Func(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: -1 = off, 0 = between, 1 = on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityInteractionDisabled(string&amp;amp; asName, bool abDisabled);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disallows interaction with an entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BreakJoint (string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Breaks a joint. Do not use this on joints in SwingDoors, Levers, Wheels, etc. where the joint is part of an interaction. That will make the game crash.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void AddEntityCollideCallback(string&amp;amp; asParentName, string&amp;amp; asChildName, string&amp;amp; asFunction, bool abDeleteOnCollide, int alStates);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when two entites collide. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asParent, string &amp;amp;in asChild, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: 1 = enter, -1 = leave&lt;br /&gt;
&lt;br /&gt;
''asParentName ''- internal name of main object &amp;lt;br /&amp;gt;''asChildName ''- internal name of object that collides with main object (asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) NOT supported!) &amp;lt;br /&amp;gt;''asFunction ''- function to call &amp;lt;br /&amp;gt;''abDeleteOnCollide ''- determines whether the callback after it was called &amp;lt;br /&amp;gt;''alStates ''- 1 = only enter, -1 = only leave, 0 = both&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveEntityCollideCallback(string&amp;amp; asParentName, string&amp;amp; asChildName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an EntityCollideCallback. Asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) not supported in ''asChildName''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEntitiesCollide(string&amp;amp; asEntityA, string&amp;amp; asEntityB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether two entites collide. This function does NOT support asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) or &amp;quot;Player&amp;quot;!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetBodyMass(string &amp;amp;in asName, float afMass);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Sets the mass of an entity's body.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the body of an entity. The body name of an entity is EntityName_BodyName. &amp;lt;br /&amp;gt;''afMass''  - The mass to set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
float GetBodyMass(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Gets the mass of an entity's body.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the body of an entity. The body name of an entity is EntityName_BodyName. &amp;lt;br /&amp;gt;''afMass''  - The mass to get.&lt;br /&gt;
&lt;br /&gt;
====Props====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropEffectActive(string&amp;amp; asName, bool abActive, bool abFadeAndPlaySounds);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on coal to give it the black color it should have.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropActiveAndFade(string&amp;amp; asName, bool abActive, float afFadeTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates a prop.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''abActive ''- nothing to add &amp;lt;br /&amp;gt;''afFadeTime ''- time in seconds until prop fully fades&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropStaticPhysics(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates the physics of a prop. Setting as true will make entities static in midair.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetPropIsInteractedWith(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a prop is interacted with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void RotatePropToSpeed(string&amp;amp; asName, float afAcc, float afGoalSpeed, float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed, string&amp;amp; asOffsetArea);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rotates the prop up to a set speed.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afAcc ''- acceleration &amp;lt;br /&amp;gt;''afGoalSpeed ''- desired speed &amp;lt;br /&amp;gt;''afAxisX ''- rotation around X axis &amp;lt;br /&amp;gt;''afAxisY ''- rotation around Y axis &amp;lt;br /&amp;gt;''afAxisZ ''- rotation around Z axis &amp;lt;br /&amp;gt;''abResetSpeed ''- determines whether the speed is resetted after goal speed is reached &amp;lt;br /&amp;gt;''asOffsetArea ''- the area to rotate around, if empty, then the center of the body is used Note: The entity you want to rotate MUST be a &amp;quot;StaticObject&amp;quot; entity!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void StopPropMovement(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops all movement of a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddAttachedPropToProp(string&amp;amp; asPropName, string&amp;amp; asAttachName, string&amp;amp; asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attaches a prop to another prop.&lt;br /&gt;
&lt;br /&gt;
a''sPropName''- the prop to attach another prop at &amp;lt;br /&amp;gt;''asAttachName ''- internal name of the prop that gets attached &amp;lt;br /&amp;gt;''asAttachFile ''- the prop that gets attached extension .ent &amp;lt;br /&amp;gt;''afPosX ''- X position of the attach from the prop &amp;lt;br /&amp;gt;''afPosY ''- Y position of the attach from the prop &amp;lt;br /&amp;gt;''afPosZ ''- Z position of the attach from the prop &amp;lt;br /&amp;gt;''afRotX ''- rotation around X axis of the attach &amp;lt;br /&amp;gt;''afRotY ''- rotation around Y axis of the attach &amp;lt;br /&amp;gt;''afRotZ ''- rotation around ZX axis of the attach Note: for the purposes of &amp;quot;AddEntityCollideCallback&amp;quot;, attached props will not call the callback function if they collide with a &amp;quot;static_object&amp;quot; or a &amp;quot;StaticProp&amp;quot; entity type!&lt;br /&gt;
&lt;br /&gt;
{{bug|''afRotZ '' is used for both the ZX rotation and the Z position of the attached prop. Unwanted rotation can be avoided by using: &amp;lt;br /&amp;gt;''AddAttachedPropToProp(asPropName, asAttachName, asAttachFile, afPosX, afPosY, '''0''', afPosZ, '''90.0f''', afPosZ)''}}&lt;br /&gt;
&lt;br /&gt;
{{bug|Attaching a breakable prop to a physically active prop, and then breaking the attached prop, will cause the game to crash, should the parent object be moved or reset.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AttachPropToProp(string&amp;amp; asPropName, string&amp;amp; asAttachName, string&amp;amp; asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Attaches a prop to another prop. Fixed version of AddAttachedPropToProp.&lt;br /&gt;
&lt;br /&gt;
''asPropName ''- the prop to attach another prop at &amp;lt;br /&amp;gt;''asAttachName ''- internal name of the prop that gets attached &amp;lt;br /&amp;gt;''asAttachFile ''- the prop that gets attached extension .ent &amp;lt;br /&amp;gt;''afPosX ''- X position of the attach from the prop &amp;lt;br /&amp;gt;''afPosY ''- Y position of the attach from the prop &amp;lt;br /&amp;gt;''afPosZ ''- Z position of the attach from the prop &amp;lt;br /&amp;gt;''afRotX ''- rotation around X axis of the attach &amp;lt;br /&amp;gt;''afRotY ''- rotation around Y axis of the attach &amp;lt;br /&amp;gt;''afRotZ ''- rotation around ZX axis of the attach Note: for the purposes of &amp;quot;AddEntityCollideCallback&amp;quot;, attached props will not call the callback function if they collide with a &amp;quot;static_object&amp;quot; or a &amp;quot;StaticProp&amp;quot; entity type!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveAttachedPropFromProp(string&amp;amp; asPropName, string&amp;amp; asAttachName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detaches a prop from a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropHealth(string&amp;amp; asName, float afHealth);&lt;br /&gt;
void AddPropHealth(string&amp;amp; asName, float afHealth);&lt;br /&gt;
float GetPropHealth(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the health of a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ResetProp(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resets a prop's state to the original one when the map was loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void PlayPropAnimation(string&amp;amp; asProp, string&amp;amp; asAnimation, float afFadeTime, bool abLoop, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the prop play an animation and calls a function. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asProp)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asProp ''- internal name of the prop &amp;lt;br /&amp;gt;''asAnimation ''- animation to play &amp;lt;br /&amp;gt;''afFadeTime ''- ? &amp;lt;br /&amp;gt;''abLoop ''- determines whether the animation loops &amp;lt;br /&amp;gt;''asCallback ''- function to call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddPropForce(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddPropImpulse(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddBodyForce(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddBodyImpulse(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions push objects. Note that rather high values are needed when applying ''forces''  (on the order of ~100 (weak) to ~10000 (strong)), but not impulses (values less than 10 can be appropriate). Forces are external influences, and will have different effect depending on the mass of the object they are being applied to; impulses disregard mass, and can cause objects to break, as if hit. A &amp;quot;Body&amp;quot; is a physics-related helper object, to which a force or an impulse can be applied. Entities can consist of several bodies, interconnected in various ways (you can create/examine bodies in the model editor).&lt;br /&gt;
&lt;br /&gt;
''asName ''- the object to push; for bodies, use this format: &amp;quot;''entityName''_''bodyName''&amp;quot; &amp;lt;br /&amp;gt;''afX ''- magnitude along the X-axis &amp;lt;br /&amp;gt;''afY ''- magnitude along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- magnitude along the Z-axis &amp;lt;br /&amp;gt;''asCoordSystem ''- determines which coordinate system is used, usually &amp;quot;world&amp;quot; All of these functions are ''additive''  - when called consecutively, for each call, the vectors defined by (afX, afY, afZ) will be added together, and a resultant force/impulse will be calculated ''before''  any physics simulation is applied to the target object.&lt;br /&gt;
&lt;br /&gt;
====Connections====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void InteractConnectPropWithRope(string&amp;amp; asName, string&amp;amp; asPropName, string&amp;amp; asRopeName, bool abInteractOnly, float afSpeedMul, float afToMinSpeed, float afToMaxSpeed, bool abInvert, int alStatesUsed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connects a prop with the movement of a rope (ie. turn wheel to move rope).&lt;br /&gt;
&lt;br /&gt;
''asName ''- connection name &amp;lt;br /&amp;gt;''asPropName ''- name of prop &amp;lt;br /&amp;gt;''asRopeName ''- name of rope &amp;lt;br /&amp;gt;''abInteractOnly ''- ? &amp;lt;br /&amp;gt;''afSpeedMul ''- speed multiplier of how quickly the rope moves &amp;lt;br /&amp;gt;''afToMinSpeed ''- the slowest the rope will move when moving the prop &amp;lt;br /&amp;gt;''afToMaxSpeed ''- the fastest the rope will move when moving the prop &amp;lt;br /&amp;gt;''abInvert ''- whether to invert the direction the rope moves &amp;lt;br /&amp;gt;''alStatesUsed ''- which states of the prop can interact with the rope?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void InteractConnectPropWithMoveObject(string&amp;amp; asName, string&amp;amp; asPropName, string&amp;amp; asMoveObjectName, bool abInteractOnly, bool abInvert, int alStatesUsed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This one should only be used if there must be an exact correspondance to prope &amp;quot;amount&amp;quot; and the moveobject open amount. It is best used for Wheel-door connections!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ConnectEntities(string&amp;amp; asName, string&amp;amp; asMainEntity, string&amp;amp; asConnectEntity, bool abInvertStateSent, int alStatesUsed, string&amp;amp; asCallbackFunc);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asConnectionName, string &amp;amp;in asMainEntity, string &amp;amp;in asConnectEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;State is what is sent to connection entity and will be inverted if abInvertStateSent = true!&lt;br /&gt;
&lt;br /&gt;
====Lamps====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLampLit(string&amp;amp; asName, bool abLit, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Un)lits a lamp.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Name of the lamp &amp;lt;br /&amp;gt;''abLit ''- Set true if you want the lamp to be lit, set to false if you want the lamp to be unlit &amp;lt;br /&amp;gt;''abEffects ''- If you want to have the lamp fade in/out when it gets (un)lit&lt;br /&gt;
&lt;br /&gt;
====Doors====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetSwingDoorLocked(string&amp;amp; asName, bool abLocked, bool abEffects);&lt;br /&gt;
void SetSwingDoorClosed(string&amp;amp; asName, bool abClosed, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Locks/closes a swing door.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
bool GetSwingDoorLocked(string&amp;amp; asName);&lt;br /&gt;
bool GetSwingDoorClosed(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a swing door is locked/closed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetSwingDoorDisableAutoClose(string&amp;amp; asName, bool abDisableAutoClose);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deactivates the &amp;quot;auto-close&amp;quot; when a door is nearly closed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
int GetSwingDoorState(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns an integer depending on how far the door is opened. &amp;lt;br /&amp;gt;-1 = angle is close to 0°, 1 = angle is 70% or higher of max, 0 = inbetween -1 and 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLocked(string&amp;amp; asName, bool abLocked);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Locks a level door. Note that level doors are NOT swing doors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLockedSound(string&amp;amp; asName, string&amp;amp; asSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which sound is played when interacting with a locked level door.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLockedText(string&amp;amp; asName, string&amp;amp; asTextCat, string&amp;amp; asTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a message when interacting with a locked level door.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMoveObjectState(string&amp;amp; asName, float afState);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves an object to a certain state.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afState ''- state of the object, 0 = closed, 1 = open, values inbetween (and above, for example, the bridge_metal_vert) are valid too!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMoveObjectStateExt(string&amp;amp; asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist, bool abResetSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves an object to a certain state, extended method.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afState ''- state of the object, 0 = closed, 1 = open, values inbetween are valid too! &amp;lt;br /&amp;gt;''afAcc ''- acceleration &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed &amp;lt;br /&amp;gt;''afSlowdownDist ''- Distance to the target state before decceleration occurs. &amp;lt;br /&amp;gt;''abResetSpeed ''- Set to True if the prop's speed should be reset before performing the movement, else the prop will accelerate from it's current speed to afMaxSpeed.&lt;br /&gt;
&lt;br /&gt;
====Levers, wheels and buttons====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropObjectStuckState(string&amp;amp; asName, int alState);&lt;br /&gt;
void SetWheelStuckState(string&amp;amp; asName, int alState, bool abEffects);&lt;br /&gt;
void SetLeverStuckState(string&amp;amp; asName, int alState, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes a prop&amp;lt;nowiki&amp;gt;\&amp;lt;/nowiki&amp;gt;wheel&amp;lt;nowiki&amp;gt;\&amp;lt;/nowiki&amp;gt;lever stuck in a certain state.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''alState ''- 0 = not stuck, 1 = at max, -1 = at min &amp;lt;br /&amp;gt;''abEffects ''- use effects&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetWheelAngle(string&amp;amp; asName, float afAngle, bool abAutoMove);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves a wheel to a certain angle.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afAngle ''- angle &amp;lt;br /&amp;gt;''abAutoMove ''- determines whether the wheel should move on its own&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetWheelInteractionDisablesStuck(string&amp;amp; asName, bool abX);&lt;br /&gt;
void SetLeverInteractionDisablesStuck(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to make a wheel/lever unstuck when interacted with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
int GetLeverState(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the state of the lever. &amp;lt;br /&amp;gt;0 = not stuck, 1 = at max, -1 = at min&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMultiSliderStuckState(string&amp;amp; asName, int alStuckState, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes a MultiSlider stuck in a certain state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMultiSliderCallback(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when state changes. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetButtonSwitchedOn(string&amp;amp; asName, bool abSwitchedOn, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Sticky areas====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetAllowStickyAreaAttachment(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows entites to stick to a StickyArea.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AttachPropToStickyArea(string&amp;amp; asAreaName, string&amp;amp; asProp);&lt;br /&gt;
void AttachBodyToStickyArea(string&amp;amp; asAreaName, string&amp;amp; asBody);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attaches a prop/body to a StickyArea.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void DetachFromStickyArea(string&amp;amp; asAreaName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detaches everything from a StickyArea.&lt;br /&gt;
&lt;br /&gt;
====Enemies====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetNPCAwake(string&amp;amp; asName, bool abAwake, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates the npc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetNPCFollowPlayer(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets an NPC's head to follow the player's movement's.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyDisabled(string&amp;amp; asName, bool abDisabled);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables an enemy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyIsHallucination(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes an enemy a hallucination. Hallucinations fade to smoke when they get near the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void FadeEnemyToSmoke(string&amp;amp; asName, bool abPlaySound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instantly fades an enemy to smoke.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ShowEnemyPlayerPosition(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the enemy run to the player, no matter where he is.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AlertEnemyOfPlayerPresence(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Gives the specified enemy the player's current position and makes it search the area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyDisableTriggers(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables or disables enemy triggers. If disabled, enemy will not react to player or attack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddEnemyPatrolNode(string&amp;amp; asName, string&amp;amp; asNodeName, float afWaitTime, string&amp;amp; asAnimation);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a patrol node to the enemy's path.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name of the enemy &amp;lt;br /&amp;gt;''asNodeName ''- path node &amp;lt;br /&amp;gt;''afWaitTime ''- time in seconds that the enemy waits at the path node before continuing &amp;lt;br /&amp;gt;''asAnimation ''- the animation the enemy uses when reaching the path node&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ClearEnemyPatrolNodes(string&amp;amp; asEnemyName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clears the current path of patrol nodes of the enemy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemySanityDecreaseActive(string &amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether an enemy activates the player's sanity drain when stared at.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX ''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportEnemyToNode(string &amp;amp;in asEnemyName, string &amp;amp;in asNodeName, bool abChangeY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Teleports an enemy to a specific PathNode.&lt;br /&gt;
&lt;br /&gt;
''asEnemyName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asNodeName ''- Internal name of the node to teleport to &amp;lt;br /&amp;gt;''abChangeY ''- Whether the Y position of the node will be used when teleporting the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportEnemyToEntity(string &amp;amp;in asEnemyName, string &amp;amp;in asTargetEntity, string &amp;amp;in asTargetBody, bool abChangeY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Teleports an enemy to a specific entity.&lt;br /&gt;
&lt;br /&gt;
''asEnemyName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asTargetEntity ''- Internal name of the entity to teleport to &amp;lt;br /&amp;gt;''asTargetBody''- Internal name of the entity's body name to teleport to. If empty, the first body will be used (might be unstable, recommended to input a body anyway) &amp;lt;br /&amp;gt;''abChangeY ''- Whether the Y position of the node will be used when teleporting the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ChangeManPigPose(string&amp;amp;in asName, string&amp;amp;in asPoseType);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Changes the pose a specified ManPig.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asPoseType''- Name of the ManPig pose to use. Can be &amp;quot;Biped&amp;quot; or &amp;quot;Quadruped&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigFadeDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should fade the player's view in and out.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigSoundDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should play the proximity sounds.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigEasyEscapeDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should be easier to escape from when hunted.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ForceTeslaPigSighting(string&amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Forces a TeslaPig to be visible for a short time.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
string&amp;amp; GetEnemyStateName(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the name of the state a specified enemy is current in. States can be Hunt, Search, Patrol, Wait, Alert, Investigate, Track and BreakDoor.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6466</id>
		<title>HPL2/Changelog</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6466"/>
		<updated>2023-09-24T21:03:04Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Add tutorial link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:1.5 Update}}&lt;br /&gt;
&lt;br /&gt;
This article is about Amnesia: The Dark Descent's 2023 update.&lt;br /&gt;
&lt;br /&gt;
At the moment these changes are available only on a Steam beta release of the game.&lt;br /&gt;
&lt;br /&gt;
{{tip|On Steam, right click Amnesia &amp;gt; Properties... &amp;gt; Betas &amp;gt; Select &amp;quot;Public total conversion beta&amp;quot; in Beta participation. Be warned that this can overwrite community editors.}}&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&lt;br /&gt;
# Ability to provide a custom story with full conversion capabilities [[HPL2/custom_story_settings.cfg | by specifying InitCfgFile in custom_story_settings.cfg]]. In other words, Full Conversions can now be installed and launched like Custom Stories. This also means you will be able to convert your existing full conversion mods into &amp;quot;extended&amp;quot; custom stories, and upload them to the Steam Workshop.&lt;br /&gt;
# Fixed a crash caused by using more than 2&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt; (65,535) callbacks (the crash happened when changing levels and would usually be caused by overusing Timers)&lt;br /&gt;
# Added an option to [[HPL2/menu.cfg | menu.cfg]] to allow specifying colors for menu text&lt;br /&gt;
# Added an option to [[HPL2/main_init.cfg | main_init.cfg]] to specify how custom stories are loaded within a custom story (including if they show up at all)&lt;br /&gt;
# New scripting features (documentation [[HPL2/Engine_Scripts | here]]):&lt;br /&gt;
## Added new script function: ShowScreenImage&lt;br /&gt;
## Added new script callback: OnUpdate&lt;br /&gt;
## Added &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.hps&amp;lt;/code&amp;gt; files&lt;br /&gt;
# Fixed skybox cubemaps rendering incorrectly. This removes the need for players patching a dll manually.&lt;br /&gt;
# Fixed &amp;quot;Chest&amp;quot; type entity changing the required coin number to zero after loading a save, [[HPL2/Tutorials/Coin_chests | making thalers actually usable]]&lt;br /&gt;
# Other fixes{{clarify}}&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tutorials/Coin_chests&amp;diff=6465</id>
		<title>HPL2/Tutorials/Coin chests</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tutorials/Coin_chests&amp;diff=6465"/>
		<updated>2023-09-24T21:00:55Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: clarified what window&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Amnesia has an unused coins mechanic that is actually functional. The player can collect coins and then open special chests by spending these coins. These chests show a special GUI window for this mechanic.&lt;br /&gt;
&lt;br /&gt;
{{warning | The coin mechanic has a bug in the older versions of the game where the required amount of coins gets reset to zero after loading a game save. If you use this mechanic, it would be good to inform the players that they need the [[HPL2/1.5_Update | 1.5 update]].}}&lt;br /&gt;
&lt;br /&gt;
The entities that add coins to the player's &amp;quot;purse&amp;quot; are 3 variants of pouches with thalers and can be either placed in a level through the editor (they can be found in the items folder under entities) or by specifying them as the item that appears when breaking vases, pots etc. The entity property for the latter is called &amp;quot;ContainedItem&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
However, there is no coin chest entity in the game's files. To make use of this mechanic, you will need to create one:&lt;br /&gt;
# Start the Model Editor&lt;br /&gt;
# &amp;lt;code&amp;gt;File &amp;gt; Open&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to and open &amp;lt;code&amp;gt;/entities/gameplay/chest_small/chest_small.ent&amp;lt;/code&amp;gt;, for example. You can change other chests (e.g. the treasure chest) and even doors to work as a coin chest.&lt;br /&gt;
# Save as a new file in your mod folder, e.g. &amp;lt;code&amp;gt;/custom_stories/MyMod/entities/chest_small_coins.ent&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open &amp;lt;code&amp;gt;Settings &amp;gt; User defined variables&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change the Type to &amp;quot;Chest&amp;quot; at the top of the newly opened window&lt;br /&gt;
# You can also customise the speed at which the chest opens when the player spends money for it if you want&lt;br /&gt;
# Close the properties window and save the file&lt;br /&gt;
&lt;br /&gt;
Now you can place the chest in your mod and set the number of coins needed to open the chest.&lt;br /&gt;
&lt;br /&gt;
{{idea| An easy way of placing custom entities is to place the original version, select it and then just swap the entity file under the general tab of entity properties.}}&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tutorials/Coin_chests&amp;diff=6464</id>
		<title>HPL2/Tutorials/Coin chests</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tutorials/Coin_chests&amp;diff=6464"/>
		<updated>2023-09-24T21:00:28Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: added a few details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Amnesia has an unused coins mechanic that is actually functional. The player can collect coins and then open special chests by spending these coins. These chests show a special GUI window for this mechanic.&lt;br /&gt;
&lt;br /&gt;
{{warning | The coin mechanic has a bug in the older versions of the game where the required amount of coins gets reset to zero after loading a game save. If you use this mechanic, it would be good to inform the players that they need the [[HPL2/1.5_Update | 1.5 update]].}}&lt;br /&gt;
&lt;br /&gt;
The entities that add coins to the player's &amp;quot;purse&amp;quot; are 3 variants of pouches with thalers and can be either placed in a level through the editor (they can be found in the items folder under entities) or by specifying them as the item that appears when breaking vases, pots etc. The entity property for the latter is called &amp;quot;ContainedItem&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
However, there is no coin chest entity in the game's files. To make use of this mechanic, you will need to create one:&lt;br /&gt;
# Start the Model Editor&lt;br /&gt;
# &amp;lt;code&amp;gt;File &amp;gt; Open&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to and open &amp;lt;code&amp;gt;/entities/gameplay/chest_small/chest_small.ent&amp;lt;/code&amp;gt;, for example. You can change other chests (e.g. the treasure chest) and even doors to work as a coin chest.&lt;br /&gt;
# Save as a new file in your mod folder, e.g. &amp;lt;code&amp;gt;/custom_stories/MyMod/entities/chest_small_coins.ent&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open &amp;lt;code&amp;gt;Settings &amp;gt; User defined variables&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change the Type to &amp;quot;Chest&amp;quot; at the top of the newly opened window&lt;br /&gt;
# You can also customise the speed at which the chest opens when the player spends money for it if you want&lt;br /&gt;
# Close the window and save the file&lt;br /&gt;
&lt;br /&gt;
Now you can place the chest in your mod and set the number of coins needed to open the chest.&lt;br /&gt;
&lt;br /&gt;
{{idea| An easy way of placing custom entities is to place the original version, select it and then just swap the entity file under the general tab of entity properties.}}&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6463</id>
		<title>HPL2/Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tutorials&amp;diff=6463"/>
		<updated>2023-09-24T20:56:23Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: /* Model Editor */ add the coin chest tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Text tutorials=&lt;br /&gt;
&lt;br /&gt;
This page lists a large amount of tutorials, most of which are community-made. Feel free to check them out and see if they can teach you something. If you've made a tutorial and wish to add it to this page, you can do so by editing it to the right. Just try to keep to the same format as the rest of the page.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you can't find a tutorial for what you need, make sure to check the [[HPL2/Tools#Editors|Editor documentation]] and [[HPL2/TDD#Documentation|Engine documentation]].  An example of this would be the Particle Editor.}}&lt;br /&gt;
&lt;br /&gt;
==Level Editor==&lt;br /&gt;
&lt;br /&gt;
* [[:hpl2:tutorials:level_editor:tutorial_1|Tutorial 1]] - The minimum required to get a level that can load.&lt;br /&gt;
* [[:hpl2:tutorials:level_editor:tutorial_2|Tutorial 2]] - Placement of lights and advanced setup of lights.&lt;br /&gt;
* [[:hpl2:tutorials:level_editor:tutorial_3|Tutorial 3]] - How to make an outdoor environment. There's a [[Hpl2:Tutorials:level_editor:outdoors|newer version of i]]t available.&lt;br /&gt;
* [[:hpl2:tutorials:level_editor:tutorial_4|Tutorial 4]] - Explains how to make water.&lt;br /&gt;
* [[:hpl2:tutorials:level_editor:tutorial_5|Tutorial 5]] - Prop dimensions and detailing your map.&lt;br /&gt;
*[[Hpl2:Tutorials:level editor:tutorial 6|Tutorial 6]] - ???????&lt;br /&gt;
*[[HPL2/Tutorials/Skyboxes|Tutorial 7]] - Making skyboxes for HPL2&lt;br /&gt;
*[[HPL2/Tutorials/Level Design]] - Using all of the basic techniques to achieve good effects&lt;br /&gt;
* [[:hpl2:tutorials:level_editor:level_editor_101|Level Editor 101]] - All the basics and some more advanced techniques.&lt;br /&gt;
&lt;br /&gt;
==Model Editor==&lt;br /&gt;
&lt;br /&gt;
* [[:hpl2:tutorials:model_editor:tutorial_1|Basic tutorial]] - The minimum required to load a model as an entity with collision and game properties.&lt;br /&gt;
* [[:hpl2:tutorials:model_editor:tutorial_2|Creating Ragdoll Entities]] - How to create full physics-based entities.&lt;br /&gt;
* [[:hpl2:tutorials:model_editor:static_objects_jenniferorange|Making Items Static]] - How to change an items' properties to static.&lt;br /&gt;
* [[HPL2/Tutorials/Coin_chests | Coin chests]] - How to create chests that can be only opened with coins.&lt;br /&gt;
&lt;br /&gt;
==Material Editor==&lt;br /&gt;
&lt;br /&gt;
* [[:hpl2:tutorials:material_editor:tutorial_1|Tutorial 1]] - Basic materials and their properties.&lt;br /&gt;
* [[Hpl2:Tutorials:material editor:creating mirrors|Creating mirrors]] - make reflective surfaces using water materials&lt;br /&gt;
&lt;br /&gt;
==Game files==&lt;br /&gt;
* [[:hpl2:tutorials:script:CustomSounds|How to create Custom Sounds]] - Teaches how to create custom sounds for your custom story.&lt;br /&gt;
* [[:hpl2:tutorials:script:howtomakenotes|How to Create Notes and Journal Entries]] - Explains how to make journal entries and place them in a map&lt;br /&gt;
* [[HPL2/Tutorials/Porting MFP Assets|Porting MFP Assets]] - explains how to copy assets from MFP to TDD and avoid issues&lt;br /&gt;
* [[HPL2/Tutorials/Convert HDRI to skyboxes|Convert HDRI to skyboxes]]&lt;br /&gt;
&lt;br /&gt;
==Scripting tutorials==&lt;br /&gt;
General basics:&lt;br /&gt;
&lt;br /&gt;
*[[HPL2/Tutorials/Scripts/Debugging|Make your set-up comfortable for scripting]]&lt;br /&gt;
* [[:hpl2:tutorials:script:entihscript_beginner|Newbie's Guide to Scripting]] - A tutorial for those new to scripting, focusing on syntax and a few helpful hints - ''By 'Entih''&lt;br /&gt;
* [[:hpl2:tutorials:script:tutorial_1|Tutorial 1]] - Using a tutorial level, with some objects to make basic scripts.&lt;br /&gt;
* [[:hpl2:tutorials:scripting:messages_jenniferorange|Activating/Using Message Pop-Ups]] - Explains how to activate a message to appear when walking into a script area.&lt;br /&gt;
* [[:hpl2:tutorials:scripting:triggering_monsters_on_entities|Triggering monsters on entities]] - Explains how to trigger an event after picking up an item.&lt;br /&gt;
&lt;br /&gt;
Door-related script tutorials:&lt;br /&gt;
&lt;br /&gt;
* [[:hpl2:tutorials:script:scripting_by_xtron_-_item_that_unlocks_a_door|Item That Unlocks a Door]] - How to make an item that unlocks a certain door.&lt;br /&gt;
* [[:hpl2:tutorials:script:buttons_that_open_a_door|Buttons that open door]]s - Explains how to make buttons that open doors.&lt;br /&gt;
* [[:hpl2:tutorials:script:events|Scary door events]] - Explains how to make scary door events.&lt;br /&gt;
* [[:hpl2:tutorials:scripting:crowbartutorialjenniferorange|Using A Crowbar On A Door]] - Explains how to script a crowbar to blow open a door.&lt;br /&gt;
* [[:hpl2:tutorials:script:adding_messages_to_locked_doors|Adding Messages To Locked Doors]] - Explains how to display a message when a player tries to open a locked door.&lt;br /&gt;
&lt;br /&gt;
Useful coding practices:&lt;br /&gt;
&lt;br /&gt;
* [[:hpl2:tutorials:script:forloop|The &amp;quot;For&amp;quot; loop]] - Explains how and when to use the &amp;quot;for&amp;quot; loop.&lt;br /&gt;
* [[:hpl2:tutorials:script:advancedtimers|Advanced Timers]] - Explains how to use multiple timers in one function.&lt;br /&gt;
* [[:hpl2:tutorials:script:localandglobalvariables|Local and Global Variables]] - Explains what they are and how to use them correctly.&lt;br /&gt;
* [[:hpl2:tutorials:script:sequences|Scripting Sequences]] - Explains how to build simple and easy to use cutscenes, or sequences for your mod.&lt;br /&gt;
&lt;br /&gt;
Forces and impulses:&lt;br /&gt;
&lt;br /&gt;
* [[:hpl2:tutorials:script:force|Impulse and forces]] - Explains how to use force and impulse.&lt;br /&gt;
* [[:hpl2:tutorials:script:pushdoorsopen|Push doors open using force]] - Explains how to use Force to open doors and entities.&lt;br /&gt;
* [[Hpl2:Tutorials:level_editor:dynamic_curtains|Dynamic curtains]] - Using force to simulate wind&lt;br /&gt;
* [[:hpl2:tutorials:script:disable_gravity_tutorial|&amp;quot;Disable&amp;quot; gravity and make objects float]] - Make entities seem to float using timer functions and forces &lt;br /&gt;
&lt;br /&gt;
Other:&lt;br /&gt;
&lt;br /&gt;
* [[:hpl2:tutorials:script:monsterpathnodes|Monster Path Nodes]] - Explains how to set up a monster's path and how to trigger it.&lt;br /&gt;
* [[:hpl2:tutorials:script:levers_and_secretshelfs|Levers and secret bookshelves]] - Explains how to make a lever that opens a bookshelf.&lt;br /&gt;
* [[:hpl2:tutorials:scripting:scaresbyjenniferorange|Scares]] - Explains in as much detail as possible the multiple scares you can use without having to bring out the monsters.&lt;br /&gt;
* [[:hpl2:tutorials:level_editor:combininghammerchipperjenniferorange|Combining The Hammer And Chipper]] - Explains how to combine your hammer and chipper in your inventory.&lt;br /&gt;
* [[:hpl2:tutorials:scripting:checkpoints_using_scriptarea_s|Checkpoints using Areas]] - Explains how to make a checkpoint using Areas.&lt;br /&gt;
* [[:hpl2:tutorials:script:tutorialsformainmenu|How to create your own Main Menu Backgrounds!]] - The usability of Amnesia's .cfg files and its Editors&lt;br /&gt;
&lt;br /&gt;
==Modeling==&lt;br /&gt;
&lt;br /&gt;
* [[:hpl2:tutorials:modeling:tutorialoutsource|Modeling tutorial]] - Initially written for outsourcers.&lt;br /&gt;
&lt;br /&gt;
=Video tutorials=&lt;br /&gt;
Sublists:&lt;br /&gt;
*[https://www.youtube.com/playlist?list=PLIYfl4qBRihBjRpmQL-izQ4xdAtLblU36 Large playlist of video tutorials for beginners and intermediate developers] - ''By Mudbill''&lt;br /&gt;
*[[Hpl2:Tutorials:script:elventutorials|Elven's tutorials]]&lt;br /&gt;
&lt;br /&gt;
==By Simpanra==&lt;br /&gt;
* [http://www.youtube.com/watch?v=CklTIT2W4g4 How To Make Level Door]&lt;br /&gt;
* [http://www.youtube.com/watch?v=ABI7NUqkXW0 How To Get a Key To Unlock a Door]&lt;br /&gt;
* [http://www.youtube.com/watch?v=v4WudNebX08 How To Make Water]&lt;br /&gt;
* [http://www.youtube.com/watch?v=ESISPLDbMWM How To Make a Custom Story Background]&lt;br /&gt;
* [http://www.youtube.com/watch?v=RmIKTH9YRqk How To Make a Functional and Interactable Ladder]&lt;br /&gt;
* [http://www.youtube.com/watch?v=riFwThqQ68k How To Name and Describe Keys]&lt;br /&gt;
* [http://www.youtube.com/watch?v=M5x_taEkP8s Simple Script Function]&lt;br /&gt;
==By Khyrpa==&lt;br /&gt;
* [http://www.youtube.com/watch?v=1R2F2eVmJ5k Building and Lighting in The Level Editor]&lt;br /&gt;
* [http://www.youtube.com/watch?v=d2ShkLEgGNk Lighting in Level Editor]&lt;br /&gt;
* [http://www.youtube.com/watch?v=u8EhP59tmjA Billboards]&lt;br /&gt;
* [http://www.youtube.com/watch?v=LKxzoAIK8jA Advanced Candle Light Connecting]&lt;br /&gt;
* [http://www.youtube.com/watch?v=xIDCoEZ581Q Wind Scare (Part 1)]&lt;br /&gt;
* [http://www.youtube.com/watch?v=Kj-NFkIGafI Wind Scare (Part 2)]&lt;br /&gt;
==By MulleDK19==&lt;br /&gt;
* [http://amnesia.treesoft.dk/tutorials/Tutorial1.wmv Make a key unlock a specific door]&lt;br /&gt;
* [http://amnesia.treesoft.dk/tutorials/Tutorial2.wmv How to create and use Areas or Triggers]&lt;br /&gt;
* [http://amnesia.treesoft.dk/tutorials/EditorTutorial1.wmv Using the Level Editor (Part 1)]&lt;br /&gt;
* [http://amnesia.treesoft.dk/tutorials/EditorTutorial2.wmv Using the Level Editor (Part 2)]&lt;br /&gt;
* [http://amnesia.treesoft.dk/tutorials/EditorTutorial3.wmv Using the Level Editor (Part 3)]&lt;br /&gt;
==By others==&lt;br /&gt;
* [http://www.youtube.com/watch?v=0grr7uipnk0 How To Create a Custom Story] - ''By TheVegaNVega''&lt;br /&gt;
* [http://www.youtube.com/watch?v=uGCTwQQSZ0A How To Make Journal Entries/Notes] - ''By RussMoney''&lt;br /&gt;
* [http://www.youtube.com/watch?v=WfgFEG4TSCE How To Make Journal Entries/Mementos] - ''By RussMoney''&lt;br /&gt;
* [http://www.youtube.com/watch?v=puIfVx0lslA How To Convert a Custom Story To a Full Conversion] - ''By RussMoney''&lt;br /&gt;
* [http://www.youtube.com/watch?v=9uKBYVEyw1s How to convert cube map images to DDS format in the GIMP] - ''By YourComputer''&lt;br /&gt;
* [http://www.youtube.com/playlist?list=PLD326789BC99530C8 From Noob to Pro: Amnesia Custom Story Creation Series] - ''By YourComputer''&lt;br /&gt;
* [http://www.youtube.com/watch?v=EnCAbgTY6d8 Adding Voice to your Diaries] - ''By triadtimes''&lt;br /&gt;
* [http://www.youtube.com/watch?v=vQEdIAZw5gM&amp;amp;feature=plcp&amp;amp;context=C4347014VDvjVQa1PpcFNKLAyG_d-p_QR49e20E_Wo08wpqmVkJz0= How to create a custom main menu background] - ''By CTCommunity''&lt;br /&gt;
* [http://youtu.be/Crx5Qd7AgJ0 Using Prop Force: How Do I Know Which Coordinate To Put My Value In?] - ''By JenniferOrange''&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tutorials/Coin_chests&amp;diff=6462</id>
		<title>HPL2/Tutorials/Coin chests</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tutorials/Coin_chests&amp;diff=6462"/>
		<updated>2023-09-24T20:54:59Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Amnesia has an unused coins mechanic that is actually functional. The player can collect coins and then open special chests by spending these coins.&lt;br /&gt;
&lt;br /&gt;
{{warning | The coin mechanic has a bug in the older versions of the game where the required amount of coins gets reset to zero after loading a game save. If you use this mechanic, it would be good to inform the players that they need the [[HPL2/1.5_Update | 1.5 update]].}}&lt;br /&gt;
&lt;br /&gt;
The entities that add coins to the player's &amp;quot;purse&amp;quot; are 3 variants of pouches with thalers and can be either placed in a level through the editor (they can be found in the items folder under entities) or by specifying them as the item that appears when breaking vases, pots etc. The entity property for the latter is called &amp;quot;ContainedItem&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
However, there is no coin chest entity in the game's files. To make use of this mechanic, you will need to create one:&lt;br /&gt;
# Start the Model Editor&lt;br /&gt;
# &amp;lt;code&amp;gt;File &amp;gt; Open&amp;lt;/code&amp;gt;&lt;br /&gt;
# Navigate to and open &amp;lt;code&amp;gt;/entities/gameplay/chest_small/chest_small.ent&amp;lt;/code&amp;gt;, for example. You can change other chests (e.g. the treasure chest) and even doors to work as a coin chest.&lt;br /&gt;
# Save as a new file in your mod folder, e.g. &amp;lt;code&amp;gt;/custom_stories/MyMod/entities/chest_small_coins.ent&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open &amp;lt;code&amp;gt;Settings &amp;gt; User defined variables&amp;lt;/code&amp;gt;&lt;br /&gt;
# Change the Type to &amp;quot;Chest&amp;quot; at the top of the newly opened window&lt;br /&gt;
# Close the window and save the file&lt;br /&gt;
&lt;br /&gt;
Now you can place the chest in your mod and set the number of coins needed to open the chest.&lt;br /&gt;
&lt;br /&gt;
{{idea| An easy way of placing custom entities is to place the original version, select it and then just swap the entity file under the general tab of entity properties.}}&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Development_Environment&amp;diff=6461</id>
		<title>HPL2/Development Environment</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Development_Environment&amp;diff=6461"/>
		<updated>2023-09-21T15:22:50Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: improve readability&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to mod Amnesia comfortably, you will need to set up the game so you can easily test maps and reload scripts. To do that, it is recommended to have two in-game users; a regular one (for testing how the mod works for the player) and a developer one. This article is about the basic set up of a developer user.&lt;br /&gt;
&lt;br /&gt;
==Setting up a dev user==&lt;br /&gt;
&lt;br /&gt;
Follow these steps to create a developer user:&lt;br /&gt;
&lt;br /&gt;
#Enter the game (or Full Conversion mod) normally and create a new profile (call it Dev, for example) and then exit. Some of the following steps can be overwritten by the game if it is left running.&lt;br /&gt;
#Enter the save directory (&amp;lt;code&amp;gt;My Documents/Amnesia/Main&amp;lt;/code&amp;gt; in Windows by default; &amp;lt;code&amp;gt;~/.frictionalgames/Amnesia/Main&amp;lt;/code&amp;gt; in Linux). If your mod is an FC, do this in its save folder.&lt;br /&gt;
#Open main_settings.cfg and change set the following options:&lt;br /&gt;
##&amp;lt;code&amp;gt;LoadDebugMenu=&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
##&amp;lt;code&amp;gt;ShowPreMenu=&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt; (this will skip you some waiting on each game launch)&lt;br /&gt;
##&amp;lt;code&amp;gt;SaveConfig=&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;  will make sure that the in-game option changes don't overwrite changes to this file&lt;br /&gt;
##Optional: &amp;lt;code&amp;gt;ExitMenuDirectly=&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt; if you wish to exit the game without visiting the main menu&lt;br /&gt;
##&amp;lt;code&amp;gt;ForceCacheLoadingAndSkipSaving=&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;, otherwise certain map changes might not show! You will sometimes need to delete the map's cache file even with this setting&lt;br /&gt;
#Open user_settings.cfg (in the &amp;quot;Dev&amp;quot; folder) and set the following:&lt;br /&gt;
##&amp;lt;code&amp;gt;AllowQuickSave=&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;  ('''F4'''=save, '''F5'''=load)&lt;br /&gt;
##&amp;lt;code&amp;gt;ScriptDebugOn=&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;. This makes debugging easier (more on that below)&lt;br /&gt;
#In order to avoid running into &amp;quot;File index out of bounds&amp;quot; errors in the Level Editor, edit the file '''resources.cfg''' located in the root the directory of Amnesia and add the ''custom_stories'' directory to the end of the list. This will also make custom assets load in the editors.&lt;br /&gt;
&lt;br /&gt;
You can now press '''F1''' to open the '''debug menu''' to turn on/off various things and more importantly - quick reload the map. After editing a script or a map simply press &amp;quot;Quick reload&amp;quot; or '''F2'''. If a mesh or texture has been updated (e.g. in an Entity file), you need to press &amp;quot;Reload&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{tip|If you start the game with a syntax error in your script file, it will crash. But if you reload the script with F2 with a syntax error, it will instead give you an error description. Therefore it's a good idea to load into a map before making changes to its script.}}&lt;br /&gt;
&lt;br /&gt;
By setting &amp;lt;code&amp;gt;ScriptDebugOn=&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt; you have set the script function &amp;lt;code&amp;gt;ScriptDebugOn()&amp;lt;/code&amp;gt; to return true. This is quite useful, as you can add something like this in your startup code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;if(ScriptDebugOn()) {&lt;br /&gt;
//Do your setup stuff&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will enable you to easily add all kinds of debug stuff (giving a lantern to the player, extra items, etc.) wihout having to worry about removing it for the final release. &lt;br /&gt;
&lt;br /&gt;
If you wish to test a map without this feature, you can use your normal user profile.&lt;br /&gt;
&lt;br /&gt;
Now you should be ready to start some editing!&lt;br /&gt;
&lt;br /&gt;
==Loading directly into a map==&lt;br /&gt;
The following config will let you load directly into a level when starting the game. This will only work if you place your maps in the main game's maps folder, which is not recommended, so this feature has very limited usage.&lt;br /&gt;
&lt;br /&gt;
#Open '''main_settings.cfg''' again and set &amp;lt;code&amp;gt;ShowMenu=&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt; (this feature doesn't work without the next steps).&lt;br /&gt;
#In '''user_settings.cfg''', inside the '''Map''' element set:&lt;br /&gt;
##&amp;lt;code&amp;gt;Folder=&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; to the root folder for your maps (eg &amp;lt;code&amp;gt;Folder=&amp;quot;MyMaps/&amp;quot;&amp;lt;/code&amp;gt;), this folder MUST be located inside the maps folder in the game directory (where you put the tools).&lt;br /&gt;
##&amp;lt;code&amp;gt;File=&amp;quot;&amp;quot;&amp;lt;/code&amp;gt;  to point to the map you want to load (eg &amp;lt;code&amp;gt;File=&amp;quot;my_map.map&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Now you can simply run Amnesia and the map will be loaded directly without any menu.&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Third_party_tools&amp;diff=6460</id>
		<title>HPL2/Third party tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Third_party_tools&amp;diff=6460"/>
		<updated>2023-09-21T14:52:38Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: /* 2D programs */ add Krita&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Third Party Tools=&lt;br /&gt;
&lt;br /&gt;
Information on some of the third-party tools that can be used to create models, graphics and art for the game and what specific things you will need to setup to make it all work. &lt;br /&gt;
&lt;br /&gt;
==COLLADA==&lt;br /&gt;
&lt;br /&gt;
All 3D models regardless of program used must be able to export to the [http://collada.org Collada] format.&lt;br /&gt;
&lt;br /&gt;
Note: The 1.3 patch for Amnesia allows support for [http://en.wikipedia.org/wiki/FBX FBX] formats.&lt;br /&gt;
&lt;br /&gt;
==3D Programs==&lt;br /&gt;
&lt;br /&gt;
#[[Blender]] - Open-source 3D modeling program that comes with built-in support for [http://collada.org Collada].&lt;br /&gt;
#[[Autodesk_Maya|Autodesk Maya]] - Professional 3D modeling program with [https://collada.org/mediawiki/index.php/OpenCOLLADA OpenCOLLADA] plugin support.&lt;br /&gt;
&lt;br /&gt;
==2D programs==&lt;br /&gt;
&lt;br /&gt;
#[[GIMP]] - Open-source 2D '''G'''NU '''I'''mage '''M'''anipulation '''P'''rogram.&lt;br /&gt;
# [https://krita.org/ Krita] - a free and open source image editing program with focus on painting. It is more similar to Photoshop than GIMP.&lt;br /&gt;
#[[Adobe_Photoshop|Adobe Photoshop]] - Professional image editing software.&lt;br /&gt;
#[[Paint.NET|Paint.net]]&lt;br /&gt;
&lt;br /&gt;
==Audio programs==&lt;br /&gt;
&lt;br /&gt;
#[[Audacity]]&lt;br /&gt;
&lt;br /&gt;
==Text/Script coding programs==&lt;br /&gt;
&lt;br /&gt;
#[[Notepad%2B%2B|Notepad++]]: Advanced text editor, crucial for script writing.&lt;br /&gt;
#[[Geany|Geany]]: An alternative for Notepad++.&lt;br /&gt;
&lt;br /&gt;
'&amp;lt;nowiki/&amp;gt;''Mac OS X alternatives'&amp;lt;nowiki/&amp;gt;''''':'''&lt;br /&gt;
&lt;br /&gt;
#[[:hpl2:third_party_tools:text:textwrangler|TextWrangler]]: A good alternative to Notepad++ on Windows.&lt;br /&gt;
#[[TextMate|TextMate]]: A nice and smooth code editor with many customization options.&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Community_Resources&amp;diff=6459</id>
		<title>HPL2/Community Resources</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Community_Resources&amp;diff=6459"/>
		<updated>2023-09-21T14:48:30Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: move the script preprocessor where it belongs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Resources=&lt;br /&gt;
&lt;br /&gt;
This section contains a set of community created resources for aiding in development.&lt;br /&gt;
&lt;br /&gt;
Many additional tools, assets and other resources can be found in the [https://www.frictionalgames.com/forum/forum-42.html Development Resources section of the forum].&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
&lt;br /&gt;
*[[HPL2/Improved Notepad++ Support|Improved Notepad++ HPS support]]&lt;br /&gt;
*[[HPL2/Lang Editor Tool|Language Editor Tool]]&lt;br /&gt;
&lt;br /&gt;
==Script Modules==&lt;br /&gt;
{{warning|Except for fringe cases, the built-in functions are enough for HPL2. Using the following will most likely result in over-engineered and obfuscated code, so proceed with caution. They are kept for archival purposes.}}&lt;br /&gt;
&lt;br /&gt;
*[[Hpl2:Resources:script modules:coordsys|Global coord system]]&lt;br /&gt;
*[[Hpl2:Resources:script_modules:math|Custom math functions]] (keep in mind some of these have been implemented as [[HPL2/Engine_Scripts#Mathematical_Operations|Script Functions]] in later patches)&lt;br /&gt;
*[[Hpl2:Resources:script modules:smallvars|Small variables (debugging API)]]&lt;br /&gt;
*[[Hpl2:Resources:script_modules:stringlist|String list]]&lt;br /&gt;
*[[Hpl2:Resources:script modules:stringparsing|Parsing strings into variables]]&lt;br /&gt;
*[[Hpl2:Resources:script modules:vector3d|3D Vectors]]&lt;br /&gt;
*[[HPL2/Script Pre-Processor|Script Preprocessor]]&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Getting_started&amp;diff=6458</id>
		<title>HPL2/Getting started</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Getting_started&amp;diff=6458"/>
		<updated>2023-09-21T14:43:02Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: add tutorials and clean up the reading experience a bit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the basic steps you want to make to get started modding HPL2. This guide will have you use '''Amnesia – The Dark Descent''' (TDD), not '''Amnesia – A Machine For Pigs''' (AMFP), as TDD is the one that is officially supported for modding.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Before you get started, you should already have the following installed:&lt;br /&gt;
&lt;br /&gt;
#A legal copy of '''Amnesia – The Dark Descent'''. All platforms should work, including Steam, GOG and retail DVDs, on Windows, Mac OS X (versions EARLIER than 10.15 Catalina), and most Linux distros.&lt;br /&gt;
#Your code editor of choice.&lt;br /&gt;
##[https://code.visualstudio.com/ VS Code] or its free/open version, [https://vscodium.com/ VS Codium], are recommended due to their convenient autocompletion and search features.&lt;br /&gt;
##If you're old-school, [https://notepad-plus-plus.org/ Notepad++] also works.&lt;br /&gt;
&lt;br /&gt;
==Setting up your game==&lt;br /&gt;
[[File:Level Editor.png|alt=The initial view of the HPL2 level editor.|thumb|The view of the level editor]]&lt;br /&gt;
Before you dive in, you should set up a few things:&lt;br /&gt;
&lt;br /&gt;
#[[HPL2/Tools#Installation Instructions|Install the development tools]] for your platform.&lt;br /&gt;
#Configure your game to use the [[HPL2/Development Environment|development environment]] (optional, but highly recommended).&lt;br /&gt;
#Bookmark the [[HPL2/Engine Scripts|Script Functions]] page. This page is a great reference for when you create your scripts.&lt;br /&gt;
&lt;br /&gt;
You are now ready to start [[HPL2/TDD/Creating a Custom Story|'''setting up your first custom story''']]!&lt;br /&gt;
&lt;br /&gt;
==Additional steps==&lt;br /&gt;
Here are a few other useful things you can do:&lt;br /&gt;
&lt;br /&gt;
#Check out the [[HPL2/Glossary|HPL2 glossary]] for an explanations of the engine's modding jargon.&lt;br /&gt;
#Check out some [[HPL2/Tutorials | Tutorials]].&lt;br /&gt;
#Join the official [https://discord.com/invite/frictionalgames Discord server] and its modding channels to ask questions if you need help.&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Getting_started&amp;diff=6457</id>
		<title>HPL2/Getting started</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Getting_started&amp;diff=6457"/>
		<updated>2023-09-21T14:38:00Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Remove Atom (end of support was in 2022), added VSCodium&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will guide you through the basic steps you want to make to get started modding HPL2. This guide will have you use '''Amnesia – The Dark Descent''' (TDD), not '''Amnesia – A Machine For Pigs''' (AMFP), as TDD is the one that is officially supported for modding.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Before you get started, you should already have the following:&lt;br /&gt;
&lt;br /&gt;
#A legal copy of '''Amnesia – The Dark Descent''' installed. All platforms should work, including Steam, GOG and retail DVDs, on Windows, Mac OS X (versions EARLIER than 10.15 Catalina), and most Linux distros.&lt;br /&gt;
#Your code editor of choice installed.&lt;br /&gt;
##[https://code.visualstudio.com/ VS Code] or its free/open version, [https://vscodium.com/ VS Codium], are recommended due to their convenient autocompletion and search features.&lt;br /&gt;
##If you're old-school, [https://notepad-plus-plus.org/ Notepad++] also works.&lt;br /&gt;
&lt;br /&gt;
==Setting up your game==&lt;br /&gt;
[[File:Level Editor.png|alt=The initial view of the HPL2 level editor.|thumb|The view of the level editor]]&lt;br /&gt;
Before you dive in, you should set up a few things:&lt;br /&gt;
&lt;br /&gt;
#[[HPL2/Tools#Installation Instructions|Install the development tools]] for your platform.&lt;br /&gt;
#Configure your game to use the [[HPL2/Development Environment|development environment]] (optional, but highly recommended).&lt;br /&gt;
#Bookmark the [[HPL2/Engine Scripts|Script Functions]] page. This page is a great reference for when you create your scripts.&lt;br /&gt;
&lt;br /&gt;
==Additional reading==&lt;br /&gt;
Here are a few additional things you can do that are very useful to check out:&lt;br /&gt;
&lt;br /&gt;
#Check out the [[HPL2/Glossary|HPL2 glossary]] for explanations of various phrases.&lt;br /&gt;
#Join the official [https://discord.com/invite/frictionalgames Discord server] and ask questions if you need help.&lt;br /&gt;
&lt;br /&gt;
You are now ready to start [[HPL2/TDD/Creating a Custom Story|'''setting up your first custom story''']]!&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6456</id>
		<title>HPL2/Changelog</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6456"/>
		<updated>2023-09-20T21:36:25Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Add the coin chest stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:1.5 Update}}&lt;br /&gt;
&lt;br /&gt;
This article is about Amnesia: The Dark Descent's 2023 update.&lt;br /&gt;
&lt;br /&gt;
At the moment these changes are available only on a Steam beta release of the game.&lt;br /&gt;
&lt;br /&gt;
{{tip|On Steam, right click Amnesia &amp;gt; Properties... &amp;gt; Betas &amp;gt; Select &amp;quot;Public total conversion beta&amp;quot; in Beta participation. Be warned that this can overwrite community editors.}}&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&lt;br /&gt;
# Ability to provide a custom story with full conversion capabilities [[HPL2/custom_story_settings.cfg | by specifying InitCfgFile in custom_story_settings.cfg]]. In other words, Full Conversions can now be installed and launched like Custom Stories. This also means you will be able to convert your existing full conversion mods into &amp;quot;extended&amp;quot; custom stories, and upload them to the Steam Workshop.&lt;br /&gt;
# Fixed a crash caused by using more than 2&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt; (65,535) callbacks (the crash happened when changing levels and would usually be caused by overusing Timers)&lt;br /&gt;
# Added an option to [[HPL2/menu.cfg | menu.cfg]] to allow specifying colors for menu text&lt;br /&gt;
# Added an option to [[HPL2/main_init.cfg | main_init.cfg]] to specify how custom stories are loaded within a custom story (including if they show up at all)&lt;br /&gt;
# New scripting features (documentation [[HPL2/Engine_Scripts | here]]):&lt;br /&gt;
## Added new script function: ShowScreenImage&lt;br /&gt;
## Added new script callback: OnUpdate&lt;br /&gt;
## Added &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.hps&amp;lt;/code&amp;gt; files&lt;br /&gt;
# Fixed skybox cubemaps rendering incorrectly. This removes the need for players patching a dll manually.&lt;br /&gt;
# Fixed &amp;quot;Chest&amp;quot; type entity changing the required coin number to zero after loading a save, making thalers actually usable&lt;br /&gt;
# Other fixes{{clarify}}&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/custom_story_settings.cfg&amp;diff=6455</id>
		<title>HPL2/custom story settings.cfg</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/custom_story_settings.cfg&amp;diff=6455"/>
		<updated>2023-09-19T20:55:09Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Add a note about file locality&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:custom_story_settings.cfg}}&lt;br /&gt;
&lt;br /&gt;
This file is used to configure a custom story, and is found in the root of the custom story, residing inside a subfolder of &amp;lt;code&amp;gt;/custom_stories&amp;lt;/code&amp;gt; in the Amnesia folder. This file only applies to TDD, not AMFP. Below are all configurable fields for this file and what each does. All of the fields are XML attributes applied to an element named &amp;lt;code&amp;gt;Main&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field name&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|Name&lt;br /&gt;
|The name of your custom story as it will appear in the game menu.&lt;br /&gt;
|-&lt;br /&gt;
|Author&lt;br /&gt;
|Your name which appears under the title.&lt;br /&gt;
|-&lt;br /&gt;
|ImgFile&lt;br /&gt;
|The name of an image file to use as the background image in the game menu.&lt;br /&gt;
|-&lt;br /&gt;
|MapsFolder&lt;br /&gt;
|The folder where your levels are loaded from. Recommended to keep as &amp;quot;maps/&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|StartMap&lt;br /&gt;
|The name of the first level that is loaded upon clicking &amp;quot;Start new game&amp;quot; in the main menu.&lt;br /&gt;
|-&lt;br /&gt;
|StartPos&lt;br /&gt;
|The internal name of a PlayerStart type area within the above level. If empty or not matching, the game will use the first alphabetical start area.&lt;br /&gt;
|-&lt;br /&gt;
|ExtraLangFilePrefix&lt;br /&gt;
|A prefix applied to all language files that this story uses. If unspecified, it falls back to the default &amp;quot;extra_&amp;quot;. This field can include forward slashes to represent folders.&lt;br /&gt;
|-&lt;br /&gt;
|DefaultExtraLangFile&lt;br /&gt;
|The default language file to load. This is appended to the above prefix, making the default language file &amp;quot;extra_english.lang&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|InitCfgFile&lt;br /&gt;
|A relative path to a main_init.cfg file. Specifying this field transforms the custom story into a full conversion mod. (Coming soon)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that the files are specified in relation to your mod folder. For example, &amp;lt;code&amp;gt;InitCfgFile=&amp;quot;YourMod/config/main_init.cfg&amp;quot;&amp;lt;/code&amp;gt; will not be found; instead, use &amp;lt;code&amp;gt;InitCfgFile=&amp;quot;config/main_init.cfg&amp;quot;&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Engine_Scripts&amp;diff=6454</id>
		<title>HPL2/Engine Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Engine_Scripts&amp;diff=6454"/>
		<updated>2023-09-15T18:02:05Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: /* Quests */ update the hint func descriptions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TocRight}}&lt;br /&gt;
&lt;br /&gt;
This page documents all scripts available in Amnesia: The Dark Descent.&lt;br /&gt;
&lt;br /&gt;
{{note|'''Note''': Some of the functions require the Amnesia 1.3 or 1.5 update. Steam and other online store copies should be automatically updated. Other copies can get 1.3 [http://www.frictionalgames.com/forum/thread-24334.html here].}}&lt;br /&gt;
&lt;br /&gt;
== Directives ==&lt;br /&gt;
&lt;br /&gt;
First off, &amp;lt;code&amp;gt;#include &amp;quot;file.hps&amp;quot;&amp;lt;/code&amp;gt; can be used to programmatically merge together multiple separate files to make organizing scripts easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.5}}&lt;br /&gt;
&lt;br /&gt;
==Engine scripts==&lt;br /&gt;
===Main===&lt;br /&gt;
&lt;br /&gt;
The following functions are the main hps functions that the HPL2 engine looks to run on certain events - similar to the C++ int main() function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void OnStart();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs when the map is loaded for the first time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnEnter();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs whenever the player enters a map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnLeave();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs when the player leaves a map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnGameStart();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is found in the global.hps file and the inventory.hps file, and is run when the game is first started by the player (ie via &amp;quot;Start New Game&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnUpdate(float afStep);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{ReqVer|1.5}}&lt;br /&gt;
&lt;br /&gt;
This function is executed for every game update or &amp;quot;tick&amp;quot;. Can be used for rapid-firing updates instead of looping timers. Keep in mind that this can affect game performance if not used with care.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float RandFloat(float afMin, float afMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generates a random float.&lt;br /&gt;
&lt;br /&gt;
#''afMin ''- minimum value&lt;br /&gt;
#''afMax ''- maximum value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
int RandInt(int alMin, int alMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generates a random int. Note: the maximum value is ''inclusive''  - the RandInt() function may return this value.&lt;br /&gt;
&lt;br /&gt;
#''alMin ''- minimum value&lt;br /&gt;
#''alMax ''- maximum value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool StringContains(string&amp;amp; asString, string&amp;amp; asSubString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a string contains the specified string. &amp;lt;br /&amp;gt;Example: searching for &amp;quot;hello&amp;quot; in &amp;quot;hello world&amp;quot; would return '''true'''.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string to check&lt;br /&gt;
#''asSubString ''- the string to search for&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
string&amp;amp; StringSub(string&amp;amp; asString, int alStart, int alCount);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the substring in a string. &amp;lt;br /&amp;gt;Example: in the string &amp;quot;frictional games rocks&amp;quot;, using 4 as ''alStart''  and 6 as ''alCount''  would return '''&amp;quot;tional&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string&lt;br /&gt;
#''alStart ''- start position in the string&lt;br /&gt;
#''alCount ''- amount of characters&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
int StringToInt(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns an integer converted from a string, else returns 0.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float StringToFloat(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns a float converted from a string, else returns 0.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool StringToBool(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns a boolean converted from a string, else returns false.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&lt;br /&gt;
===Mathematical Operations===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathSin(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the sine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathCos(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the cosine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathTan(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the tangent of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAsin(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc sine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAcos(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc cosine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAtan(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc tangent of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAtan2(float afX, float afY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Calculates and returns the arc tangent of the specified values.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - First value to operate.&lt;br /&gt;
#''afY''  - Second value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathSqrt(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the square root of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathPow(float afBase, float afExp);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the value of afBase raised to the power of afExp.&lt;br /&gt;
&lt;br /&gt;
#''afBase''  - The base value.&lt;br /&gt;
#''afExp''  - Value to calculate the base with.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathMin(float afA, float afB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the lowest value.&lt;br /&gt;
&lt;br /&gt;
#''afA''  - First value.&lt;br /&gt;
#''afB''  - Second value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathMax(float afA, float afB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the highest value.&lt;br /&gt;
&lt;br /&gt;
#''afA''  - First value.&lt;br /&gt;
#''afB''  - Second value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathClamp(float afX, float afMin, float afMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns afX clamped between afMin and afMax. If afX &amp;lt; afMin, returns afMin, and if afX &amp;gt; afMax, returns afMax.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - The value to clamp.&lt;br /&gt;
#''afMin''  - The minimum value to clamp afX with.&lt;br /&gt;
#''afMax''  - The maximum value to clamp afX with.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAbs(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the absolute value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void Print(string&amp;amp; asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints a string to the log file (''hpl.log'').&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddDebugMessage(string&amp;amp; asString, bool abCheckForDuplicates);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints a string to the debug console.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string to print&lt;br /&gt;
#''abCheckForDuplicates ''- if true, the string won't be printed more than once on screen until it disappears&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ProgLog(string&amp;amp; asLevel, string&amp;amp; asMessage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints an entry to the ProgLog (progression log). &amp;lt;br /&amp;gt;ProgLog is a file created in Documents/Amnesia/main (or an FC folder if one is being used). It logs certain events, such us opening the menu or picking up the lantern, as well as the player's state (Health, Sanity, Oil, Tinderboxes, Coins), for the purpose of documenting a tester's playstyle. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;This function allows to log custom messages.The messages in the ProgLog file are sorted by time elapsed since a map was loaded.&lt;br /&gt;
&lt;br /&gt;
ProgLog has to be enabled for a player profile in ''user_settings.cfg''  before it starts working.&lt;br /&gt;
&lt;br /&gt;
#''asLevel ''- can be &amp;quot;Low&amp;quot;, &amp;quot;Medium&amp;quot; or &amp;quot;High&amp;quot;. It's a tag which appears in each log entry, for event prioritising.&lt;br /&gt;
#''asMessage ''- The custom message to be printed to the log.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool ScriptDebugOn();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the debug mode is enabled. &amp;lt;br /&amp;gt;See [[HPL2/Development_Environment|&amp;quot;Setting up Development Environment&amp;quot;]] to setup debug mode on your own computer.&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
{{warning|Regular variables (int, float, etc.) are '''not''' saved by the game. Using them in important parts of yor script will break it upon loading a game save. In HPL, those variables should only be used for disposable counters, like spawning objects in a &amp;quot;for&amp;quot; loop. For variables which need to be saved, use the wrappers as described below.}}&lt;br /&gt;
&lt;br /&gt;
====Local====&lt;br /&gt;
&lt;br /&gt;
Local variables can be used throughout the same script file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
void AddLocalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
int GetLocalVarInt(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
void AddLocalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
float GetLocalVarFloat(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarString(string&amp;amp; asName, const string&amp;amp; asVal);&lt;br /&gt;
void AddLocalVarString(string&amp;amp; asName, string&amp;amp; asVal);&lt;br /&gt;
string&amp;amp; GetLocalVarString(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Global====&lt;br /&gt;
&lt;br /&gt;
Global variables can be used throughout several maps and can be accessed by several script files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
void AddGlobalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
int GetGlobalVarInt(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
void AddGlobalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
float GetGlobalVarFloat(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarString(string&amp;amp; asName, const string&amp;amp; asVal);&lt;br /&gt;
void AddGlobalVarString(string&amp;amp; asName, string&amp;amp; asVal);&lt;br /&gt;
string&amp;amp; GetGlobalVarString(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Particle Systems===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PreloadParticleSystem(string&amp;amp; asPSFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preloads a particle system.&lt;br /&gt;
&lt;br /&gt;
#''asPSFile''  - The particle system file to load. Extension: .ps&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateParticleSystemAtEntity(string&amp;amp; asPSName, string&amp;amp; asPSFile, string&amp;amp; asEntity, bool abSavePS);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a particle system on an entity.&lt;br /&gt;
&lt;br /&gt;
#''asPSName ''- internal name&lt;br /&gt;
#''asPSFile ''- the particle system to use + extension .ps&lt;br /&gt;
#''asEntity ''- the entity to create the particle system at&lt;br /&gt;
#''abSavePS ''- determines whether a particle system should &amp;quot;remember&amp;quot; its shown/hidden state, so that this state can be restored when the player revisits the level&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateParticleSystemAtEntityExt(string&amp;amp; asPSName, string&amp;amp; asPSFile, string&amp;amp; asEntity, bool abSavePS,&lt;br /&gt;
float afR, float afG, float afB, float afA, bool abFadeAtDistance, float afFadeMinEnd, float afFadeMinStart,&lt;br /&gt;
float afFadeMaxStart, float afFadeMaxEnd);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a particle system on an entity, extended method with more options.&lt;br /&gt;
&lt;br /&gt;
#''asPSName ''- internal name&lt;br /&gt;
#''asPSFile ''- the particle system to use + extension .ps&lt;br /&gt;
#''asEntity ''- the entity to create the particle system at&lt;br /&gt;
#''abSavePS ''- determines whether a particle system should &amp;quot;remember&amp;quot; its shown/hidden state, so that this state can be restored when the player revisits the level&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
#''abFadeAtDistance ''- determines whether a particle system fades from a certain distance on&lt;br /&gt;
#''afFadeMinEnd ''- minimum distance at which the particle system stops fading&lt;br /&gt;
#''afFadeMinStart ''- minimum distance at which the particle system starts fading&lt;br /&gt;
#''afFadeMaxStart ''- maximum distance at which the particle system starts fading&lt;br /&gt;
#''afFadeMaxEnd ''- maximum distance at which the particle system stops fading&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void DestroyParticleSystem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Destroys a particle system.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - The internal name of the particle system&lt;br /&gt;
&lt;br /&gt;
===Sounds &amp;amp; Music===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PreloadSound(string&amp;amp; asSoundFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preloads a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundFile''  - The sound file to load. Extension: .snt&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlaySoundAtEntity(string&amp;amp; asSoundName, string&amp;amp; asSoundFile, string&amp;amp; asEntity, float afFadeTime, bool abSaveSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a sound on an entity.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''asSoundFile ''- the sound to use + extension .snt&lt;br /&gt;
#''asEntity ''- the entity to create the sound at, can be &amp;quot;Player&amp;quot;&lt;br /&gt;
#''afFadeTime ''- time in seconds the sound needs to fade. Avoids enemies hearing the sound if afFadeTime is at least 0.1f&lt;br /&gt;
#''abSaveSound ''- if ''true'', a looping sound will &amp;quot;remember&amp;quot; its playback state (currently playing/stopped), and that state will be restored the next time the level is entered. If ''true'', the sound is never attached to the entity! Note that saving should only be used on ''looping sounds''!&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeInSound(string&amp;amp; asSoundName, float afFadeTime, bool abPlayStart);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades in a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''afFadeTime ''- time in seconds&lt;br /&gt;
#''abPlayStart ''- ?&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopSound(string&amp;amp; asSoundName, float afFadeTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades out a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''afFadeTime ''- time in seconds, use 0 to immediatly stop the sound&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlayMusic(string&amp;amp; asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plays music.&lt;br /&gt;
&lt;br /&gt;
#''asMusicFile ''- the music to play + extension .ogg&lt;br /&gt;
#''abLoop ''- determines whether a music track should loop&lt;br /&gt;
#''afVolume ''- volume of the music&lt;br /&gt;
#''afFadeTime ''- time in seconds until music reaches full volume&lt;br /&gt;
#''alPrio ''- priority of the music. Note that only the music with the highest priority can be heard! 0 - lowest, 1 - higher, etc.&lt;br /&gt;
#''abResume''  - if ''true'', playback will be continued from where the track stopped after the call to StopMusic(); if ''false'', the track will be restarted.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopMusic(float afFadeTime, int alPrio);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops music.&lt;br /&gt;
&lt;br /&gt;
#''afFadeTime ''- time in seconds until music stops&lt;br /&gt;
#''alPrio ''- the priority of the music that should stop&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeGlobalSoundVolume(float afDestVolume, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Influences the global sound volume, that means everything you can hear '''from the world'''. This does not affect music of GUI sounds.&lt;br /&gt;
&lt;br /&gt;
#''afDestVolume ''- desired volume&lt;br /&gt;
#''afTime ''- time in seconds until volume reaches desired volume&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeGlobalSoundSpeed(float afDestSpeed, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Influences the global sound speed.&lt;br /&gt;
&lt;br /&gt;
#''afDestSpeed ''- desired speed&lt;br /&gt;
#''afTime ''- time in seconds until volume reaches desired speed&lt;br /&gt;
&lt;br /&gt;
===Lights===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLightVisible(string&amp;amp; asLightName, bool abVisible);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/disables lights.&lt;br /&gt;
&lt;br /&gt;
#''asLightName ''- internal name&lt;br /&gt;
#''abVisible ''- determines the state of the light&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeLightTo(string&amp;amp; asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the properties of a light.&lt;br /&gt;
&lt;br /&gt;
#''asLightName ''- internal name&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
#''afRadius ''- radius of the light. -1 means keeping the radius&lt;br /&gt;
#''afTime ''- time in seconds until change is done&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLightFlickerActive(string&amp;amp; asLightName, bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates flickering on a light.&lt;br /&gt;
&lt;br /&gt;
#''asLightName''  - The internal light name&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&lt;br /&gt;
==Game scripts==&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartCredits(string&amp;amp; asMusic, bool abLoopMusic, string&amp;amp; asTextCat, string&amp;amp; asTextEntry, int alEndNum);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts the end credits screen.&lt;br /&gt;
&lt;br /&gt;
#''asMusic ''- the music to play (including .ogg)&lt;br /&gt;
#''abLoopMusic ''- determines whether the music should loop&lt;br /&gt;
#''asTextCat ''- the category to be used in the .lang file&lt;br /&gt;
#''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
#''alEndNum ''- Amnesia has 3 different endings and displays a code at the bottom. Determines which code is displayed. 0-2 will display codes, any other integer will not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartDemoEnd();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts the end images that are used in the demo, images are named &amp;quot;demo_end01.jpg&amp;quot;, increase the number for each image you want to use. (NEEDS VERIFICATION)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AutoSave();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the game to the auto save.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CheckPoint (string&amp;amp; asName, string&amp;amp; asStartPos, string&amp;amp; asCallback, string&amp;amp; asDeathHintCat, string&amp;amp; asDeathHintEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets a checkpoint at which the player will respawn in case he dies. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asName, int alCount)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;Count is 0 on the first checkpoint load!&lt;br /&gt;
&lt;br /&gt;
#''asName ''- the internal name&lt;br /&gt;
#''asStartPos ''- the name of the StartPos in the editor&lt;br /&gt;
#''asCallback ''- the function to call when the player dies/respawns&lt;br /&gt;
#''asDeathHintCat ''- the category of the death hint message to be used in the .lang file&lt;br /&gt;
#''asDeathHintEntry ''- the entry in the .lang file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ChangeMap(string&amp;amp; asMapName, string&amp;amp; asStartPos, string&amp;amp; asStartSound, string&amp;amp; asEndSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediatly loads another map.&lt;br /&gt;
&lt;br /&gt;
#''asMapName ''- the file to load&lt;br /&gt;
#''asStartPos ''- the name of the StartPos on the next map&lt;br /&gt;
#''asStartSound ''- the sound that is played when the change starts&lt;br /&gt;
#''asEndSound ''- the sound that is played when the new map is loaded&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ClearSavedMaps();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clears the &amp;quot;history&amp;quot; of the save, useful to do when you know the player will not be able to go back anymore. Makes the next save much smaller in size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateDataCache();&lt;br /&gt;
void DestroyDataCache();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This caches all current textures and models and they are not released until destroy is called. If there is already cached data it is destroyed.&lt;br /&gt;
Create caches to enable faster loading when going back to a map. Destroy the cache if you know the player won't go back to that map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetMapDisplayNameEntry(string&amp;amp; asNameEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the map name shown in save file names. If none is set NULL is assumed.&lt;br /&gt;
&lt;br /&gt;
#''asNameEntry ''- the entry to display, category must be &amp;quot;Levels&amp;quot;!&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the skybox.&lt;br /&gt;
&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxTexture(string&amp;amp; asTexture);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the texture of the skybox.&lt;br /&gt;
&lt;br /&gt;
#''asTexture''  - The texture file to set. Extension: .dds&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxColor(float afR, float afG, float afB, float afA);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the solid color of the skybox rather than a texture.&lt;br /&gt;
&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the global fog.&lt;br /&gt;
&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogColor(float afR, float afG, float afB, float afA);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the color to use for the global fog.&lt;br /&gt;
&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogProperties(float afStart, float afEnd, float afFalloffExp, bool abCulling);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the properties for the global fog.&lt;br /&gt;
&lt;br /&gt;
#''afStart ''- how many meters from the camera should the fog begin&lt;br /&gt;
#''afEnd ''- how many meters from the camera should the fog reach full thickness&lt;br /&gt;
#''afFalloffExp ''- the amount by which the thinkness increases&lt;br /&gt;
#''abCulling ''- whether occlusion culling is active for the fog; this prevents objects behind the fog from being loaded&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetupLoadScreen(string&amp;amp;asTextCat, string&amp;amp;asTextEntry, int alRandomNum, string&amp;amp;asImageFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which loading screen will be shown when changing maps.&lt;br /&gt;
&lt;br /&gt;
#''asTextCat ''- the category of the loading text in the .lang file to be shown on the loading screen&lt;br /&gt;
#''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
#''alRandomNum ''- if greater 1, then it will randomize between 1 and alRandom for each LoadScreen giving entry the suffix XX (eg 01). If &amp;lt; =1 then no suffix is added&lt;br /&gt;
#''asImageFile ''- the image to be shown (optional)&lt;br /&gt;
&lt;br /&gt;
===Game Timer===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddTimer(string&amp;amp; asName, float afTime, string&amp;amp; asFunction);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a timer which calls a function when it expires. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asTimer)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#''asName ''- the name of the timer&lt;br /&gt;
#''afTime ''- time in seconds&lt;br /&gt;
#''asFunction ''- the function to call&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveTimer(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes a timer, no matter how much time is left.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - the internal name of the timer.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetTimerTimeLeft(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the time left on a timer.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - the internal name of the timer.&lt;br /&gt;
&lt;br /&gt;
===Screen Effects===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeOut(float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to black.&lt;br /&gt;
&lt;br /&gt;
''afTime ''- time in seconds until the screen is completly black&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeIn(float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen back to normal.&lt;br /&gt;
&lt;br /&gt;
''afTime ''- time in seconds until the screen back to normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeImageTrailTo(float afAmount, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Applies the image trail effect to the screen.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeSepiaColorTo(float afAmount, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the screen go dark red.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeRadialBlurTo(float afSize, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Applies radial blur effects to the screen.&lt;br /&gt;
&lt;br /&gt;
''afSize ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetRadialBlurStartDist(float afStartDist);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines at which distance the radial blur effects appear.&lt;br /&gt;
&lt;br /&gt;
''afStartDist ''- the distance at which the effect starts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartEffectFlash(float afFadeIn, float afWhite, float afFadeOut);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to white.&lt;br /&gt;
&lt;br /&gt;
''afFadeIn ''- time in seconds until screen is white &amp;lt;br /&amp;gt;''afWhite ''- determines to which percentage the screen fades to white (1.0 = completly white) &amp;lt;br /&amp;gt;''afFadeOut ''- time in seconds until screen is back to normal again&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartEffectEmotionFlash(string&amp;amp; asTextCat, string&amp;amp; asTextEntry, string&amp;amp; asSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to white and shows a text message.&lt;br /&gt;
&lt;br /&gt;
''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the text entry in the .lang file &amp;lt;br /&amp;gt;''asSound ''- the sound to play while fading&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddEffectVoice(string&amp;amp; asVoiceFile, string&amp;amp; asEffectFile, string&amp;amp; asTextCat, string&amp;amp; asTextEntry,&lt;br /&gt;
bool abUsePosition, string&amp;amp; asPosEntity, float afMinDistance, float afMaxDistance);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This adds a voice and an effect to be played. It is okay to call this many times in order to play many voices in a row. The EffectVoiceOverCallback is not called until ALL voices have finished.&lt;br /&gt;
&lt;br /&gt;
''asVoiceFile ''- the voice to play &amp;lt;br /&amp;gt;''asEffectFile ''- the effect to play &amp;lt;br /&amp;gt;''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the text entry in the .lang file &amp;lt;br /&amp;gt;''abUsePosition ''- plays using 3D from the entity, or without 3D &amp;lt;br /&amp;gt;''asPosEntity ''- the entity at which the effect appears &amp;lt;br /&amp;gt;''afMinDistance ''- minimum distance to see the effect &amp;lt;br /&amp;gt;''afMaxDistance ''- maximum distance to see the effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopAllEffectVoices(float afFadeOutTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops all voices and calls the EffectVoiceOverCallback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEffectVoiceActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether EffectVoices are still active.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetEffectVoiceOverCallback(string&amp;amp; asFunc);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the function to be called when the EffectVoices are finished. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetFlashbackIsActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a flashback is still in effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartPlayerSpawnPS(string&amp;amp; asSPSFile);&lt;br /&gt;
void StopPlayerSpawnPS();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuously spawn regular particle systems (''.ps'') around the player. Particles created by this script carry over from map to map. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;''asSPSFile''  - the ''.sps''  file to use. Exemplary ''.sps''  files are located in the ''/misc''  folder in the main game directory. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;Custom ''.sps''  files can be created by hand in a text editor (see existing ones and mimic how those are written). &amp;lt;br /&amp;gt;Since ''StopPlayerSpawnPS()''  doesn't seem to work, to stop an SPS you must create an ''.sps''  file with an empty particle field field and override the old SPS by calling ''StartPlayerSpawnPS''  again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlayGuiSound(string&amp;amp; asSoundFile, float afVolume);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plays a sound, not using 3D.&lt;br /&gt;
&lt;br /&gt;
''asSoundFile ''- the sound to play (extension is .snt) &amp;lt;br /&amp;gt;''afVolume ''- the volume of the sound&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shakes the screen.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity of the shake &amp;lt;br /&amp;gt;''afTime ''- duration of the shake &amp;lt;br /&amp;gt;''afFadeInTime ''- time in seconds until full intensity is reached &amp;lt;br /&amp;gt;''afFadeOutTime ''- time until screen is back to normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInDarknessEffectsActive(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables the sanity drain and night vision effects while in the darkness.&lt;br /&gt;
&lt;br /&gt;
''bool abX''  - Enable/disable effects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ShowScreenImage(string &amp;amp;in asImageName, float afX, float afY, float afScale, bool abUseRelativeCoordinates, float afDuration, float afFadeIn, float afFadeOut);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.5}}&lt;br /&gt;
&lt;br /&gt;
Displays an image file directly onto the screen.&lt;br /&gt;
&lt;br /&gt;
''asImageName'' - The image file to render (.jpg, .png, .tga, .dds)&lt;br /&gt;
&lt;br /&gt;
''afX'' - The X position of the image&lt;br /&gt;
&lt;br /&gt;
''afY'' - The Y position of the image&lt;br /&gt;
&lt;br /&gt;
''afScale'' - The scale of the image (default 1.0f)&lt;br /&gt;
&lt;br /&gt;
''abUseRelativeCoordinates'' - Whether or not to use relative coordinates for positioning. Use false for absolute.&lt;br /&gt;
&lt;br /&gt;
''afDuration'' - The duration that the image is displayed for.&lt;br /&gt;
&lt;br /&gt;
''afFadeIn'' - The time, in seconds, to fade in the image.&lt;br /&gt;
&lt;br /&gt;
''afFadeOut'' - The time, in seconds, to fade out the image.&lt;br /&gt;
&lt;br /&gt;
===Insanity===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInsanitySetEnabled(string&amp;amp; asSet, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which InsanitySets are enabled.&lt;br /&gt;
&lt;br /&gt;
''asSet ''- the set &amp;lt;br /&amp;gt;''abX ''- enabled or not&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartInsanityEvent(string &amp;amp;in asEventName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Starts a specified insanity event.&lt;br /&gt;
&lt;br /&gt;
''asEventName ''- Insanity event to play.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartRandomInsanityEvent();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts a random insanity event from the available sets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopCurrentInsanityEvent();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Stops the currently playing insanity event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void InsanityEventIsActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether an insanity event is currently in effect… Or so it was supposed to be, but as it doesn't return a value, we can never know [http://wiki.frictionalgames.com/lib/images/smileys/icon_smile.gif?nolink&amp;amp;15x15]&lt;br /&gt;
&lt;br /&gt;
===Player===&lt;br /&gt;
&lt;br /&gt;
Note that the player's maximum health and sanity is 100.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enabled/Disable player controlled movement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ChangePlayerStateToNormal();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets certain effects back to normal. It can for example make the player drop an item.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerCrouching(bool abCrouch);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forces the player to crouch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pushes the player into a certain direction. Note that you need values above ~2000 to see any effects.&lt;br /&gt;
&lt;br /&gt;
''afX ''- amount along the X-axis &amp;lt;br /&amp;gt;''afY ''- amount along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- amount along the Z-axis &amp;lt;br /&amp;gt;''abUseLocalCoords ''- If true, axes are based on where the player is facing, not the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ShowPlayerCrossHairIcons(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the icons when a player has something in focus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerSanity(float afSanity);&lt;br /&gt;
void AddPlayerSanity(float afSanity);&lt;br /&gt;
float GetPlayerSanity();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the sanity of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerHealth(float afHealth);&lt;br /&gt;
void AddPlayerHealth(float afHealth);&lt;br /&gt;
float GetPlayerHealth();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the health of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerLampOil(float afOil);&lt;br /&gt;
void AddPlayerLampOil(float afOil);&lt;br /&gt;
float GetPlayerLampOil();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the lamp oil of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetPlayerSpeed();&lt;br /&gt;
float GetPlayerYSpeed();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the current speed of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSanityDrainDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables sanity drain from darkness, monsters, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveSanityBoost();&lt;br /&gt;
void GiveSanityBoostSmall();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Boosts the player's sanity by a fixed amount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveSanityDamage(float afAmount, bool abUseEffect);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reduces the sanity of the player.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount of sanity damage done &amp;lt;br /&amp;gt;''abUseEffect ''- determines whether an effect is played when the sanity damage is dealt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GivePlayerDamage(float afAmount, string&amp;amp; asType, bool abSpinHead, bool abLethal);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reduces the health of the player.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount of damage done to health &amp;lt;br /&amp;gt;''asType ''- plays a certain effect on the screen when the damage is dealt (BloodSplat, Claws or Slash) &amp;lt;br /&amp;gt;''abSpinHead ''- changes the camera view when damage is dealt &amp;lt;br /&amp;gt;''abLethal ''- set to true if player can die from given damage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerFOVMulTo(float afX, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the field of view of the player. A shorter FOV will create a zoom effect.&lt;br /&gt;
&lt;br /&gt;
''afX ''- multiplier of default FOV (1 is default) &amp;lt;br /&amp;gt;''afSpeed ''- the speed of change between FOV's&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerAspectMulTo(float afX, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the aspect ratio of the player. Basically stretches or narrows the screen horizontally.&lt;br /&gt;
&lt;br /&gt;
''afX ''- multiplier of default aspect (default is 1) &amp;lt;br /&amp;gt;''afSpeed ''- the speed of change between FOV's&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rotates the position of the camera on the player's body.&lt;br /&gt;
&lt;br /&gt;
''afX ''- angle of rotation of head, positive being counter-clockwise &amp;lt;br /&amp;gt;''afSpeedMul ''- speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow) &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed of rotation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the position of the camera on the player's body.&lt;br /&gt;
&lt;br /&gt;
''afX ''- amount along the X-axis &amp;lt;br /&amp;gt;''afY ''- amount along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- amount along the Z-axis &amp;lt;br /&amp;gt;''afSpeed ''- speed at which the change happens &amp;lt;br /&amp;gt;''afSlowDownDist ''- distance at which to start slowing down (prevents the head from abruptly stopping)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartPlayerLookAt(string&amp;amp; asEntityName, float afSpeedMul, float afMaxSpeed, string&amp;amp; asAtTargetCallback);&lt;br /&gt;
void StopPlayerLookAt();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forces the player to look at a certain entity until StopPlayerLookAt is used.&lt;br /&gt;
&lt;br /&gt;
''asEntityName ''- the entity to look at &amp;lt;br /&amp;gt;''afSpeedMul ''- how fast should the player look at the entity &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed allowed &amp;lt;br /&amp;gt;''asAtTargetCallback ''- function to call when player looks at target&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerMoveSpeedMul(float afMul);&lt;br /&gt;
void SetPlayerRunSpeedMul(float afMul);&lt;br /&gt;
void SetPlayerLookSpeedMul(float afMul);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the player's move/run/look speed. Default is 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerJumpForceMul(float afMul);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Changes the player's jump multiplier. Higher values = higher jumps. Default is 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerJumpDisabled(bool abX);&lt;br /&gt;
void SetPlayerCrouchDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the player's ability to jump/crouch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportPlayer(string&amp;amp; asStartPosName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instantly teleports the player to the target StartPos.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternActive(bool abX, bool abUseEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the player use his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetLanternActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the player currently uses his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the player's ability to use his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternLitCallback(string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the function to call when the player uses his lantern. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;MyFunc(bool abLit)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetMessage(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a message on the screen.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTime ''- determines how long the message is displayed. If time is &amp;lt; =0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetDeathHint(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the message that appears when the player dies.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void DisableDeathStartSound();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables the death sound when the player dies. This must be called directly before player is killed! The variable as soon as player dies too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
void MovePlayerForward(float afAmount)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;REQUIRES THE 1.2 PATCH: JUSTINE&amp;quot; Moves the player forward. It needs to be called in a timer that updates 60 times / second.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerFallDamageDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables the player's ability to take fall damage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerPos(float afX, float afY, float afZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Sets the player's position within the level.&lt;br /&gt;
&lt;br /&gt;
''afX''  - X co-ordinate position. &amp;lt;br /&amp;gt;''afY''  - Y co-ordinate position. &amp;lt;br /&amp;gt;''afZ''  - Z co-ordinate position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetPlayerPosX();&lt;br /&gt;
float GetPlayerPosY();&lt;br /&gt;
float GetPlayerPosZ();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the player's position within the level on the specified axis.&lt;br /&gt;
&lt;br /&gt;
===Journal===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddNote(string&amp;amp; asNameAndTextEntry, string&amp;amp; asImage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a note to the player's journal.&lt;br /&gt;
&lt;br /&gt;
''asNameAndTextEntry ''- entries in the .lang file. Must end with _Name and _Text and be in category &amp;quot;Journal&amp;quot;! &amp;lt;br /&amp;gt;''asImage ''- the background image to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddDiary(string&amp;amp; asNameAndTextEntry, string&amp;amp; asImage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a diary to the player's journal.&lt;br /&gt;
&lt;br /&gt;
''asNameAndTextEntry ''- entries in the .lang file. Must end with _NameX and _TextY whereas X and Y are numbers of the parts (_Name1: first diary, _Text1: first page) and be in category &amp;quot;Journal&amp;quot;! &amp;lt;br /&amp;gt;''asImage ''- the background image to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ReturnOpenJournal(bool abOpenJournal);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only called in the pickup diary callback! If true the journal displays the entry else not.&lt;br /&gt;
&lt;br /&gt;
===Quests===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddQuest(string&amp;amp; asName, string&amp;amp; asNameAndTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a quest to the player's journal under mementos.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name to be used &amp;lt;br /&amp;gt;''asNameAndTextEntry ''- entry in the .lang file. Must start with &amp;quot;Quest_&amp;lt;texthere&amp;gt;_Text”, and be in category “Journal”!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CompleteQuest(string&amp;amp; asName, string&amp;amp; asNameAndTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Completes a quest.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name of the quest &amp;lt;br /&amp;gt;''asNameAndTextEntry ''- entry in the .lang file. Must start with &amp;quot; Quest_&amp;lt;texthere&amp;gt;_Text ”, and be in category “Journal”!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool QuestIsCompleted(string&amp;amp; asName);&lt;br /&gt;
bool QuestIsAdded(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a quest is completed/added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetNumberOfQuestsInMap(int alNumberOfQuests);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the number of quests in the map.&lt;br /&gt;
&lt;br /&gt;
''alNumberOfQuests ''- Amount of Quests&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveHint(string&amp;amp; asName, string&amp;amp; asMessageCat, string&amp;amp; asMessageEntry, float afTimeShown);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a hint on the player's screen.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name &amp;lt;br /&amp;gt;''asMessageCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asMessageEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTimeShown ''- time in seconds until the message disappears. If time is &amp;lt;= 0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void BlockHint(string&amp;amp; asName);&lt;br /&gt;
void UnBlockHint(string&amp;amp; asName);&lt;br /&gt;
void RemoveHint(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Blocking a hint prevents it from being shown. Blocked hints are included in savefiles, so they should persist between levels.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Removing&amp;quot; a hint actually removes it from the list of already given hints, thus allowing it to show up again.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name. Basic game hints use the same name as their respective lang entries, with the exception of &amp;quot;numbered&amp;quot; hints. For example, &amp;lt;code&amp;gt;EntityGrab&amp;lt;/code&amp;gt; blocks the &amp;lt;code&amp;gt;EntityGrab01&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EntityGrab02&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
&lt;br /&gt;
===Inventory===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ExitInventory();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exits the inventory by force.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInventoryDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables the player's ability to open his inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInventoryMessage(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a message at the bottom of the inventory screen.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTime ''- time in seconds until the message disappears. If life time is &amp;lt;= 0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveItem(string&amp;amp; asName, string&amp;amp; asType, string&amp;amp; asSubTypeName, string&amp;amp; asImageName, float afAmount);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds an item to the inventory of the player. Note that the item does not have to exist as entity in the world to be able to do this.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asType ''- item type to give, Available types are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Puzzle&lt;br /&gt;
*Lantern&lt;br /&gt;
*Health&lt;br /&gt;
*Sanity&lt;br /&gt;
*LampOil&lt;br /&gt;
*Tinderbox&lt;br /&gt;
&lt;br /&gt;
''asSubTypeName ''- item name for .lang file &amp;lt;br /&amp;gt;''asImageName ''- the image which will appear in inventory. For example: &amp;lt;code&amp;gt;void GiveItem(&amp;quot;chemical_container_full_1&amp;quot;, &amp;quot;Puzzle&amp;quot;, &amp;quot;chemical_container_full&amp;quot;, &amp;quot;chemical_container_full.tga&amp;quot;, 1);&amp;lt;/code&amp;gt; will use the image from &amp;lt;code&amp;gt;graphics/item/chemical_container_full.tga&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount the item gives, - For example: Oil potions will fill the oil meter by this amount, Health potions will heal by this amount, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveItem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an item from the player's inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool HasItem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the player has an item in his inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveItemFromFile(string&amp;amp; asName, string&amp;amp; asFileName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a single item to the player's inventory. This is meant to be used for debug mostly as it creates the actual item and then destroys it.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asFileName ''- item to give + extension (.ent)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddCombineCallback(string&amp;amp; asName, string&amp;amp; asItemA, string&amp;amp; asItemB, string&amp;amp; asFunction, bool abAutoRemove);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to combine items in his inventory. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asItemA, string &amp;amp;in asItemB)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name for the callback &amp;lt;br /&amp;gt;''asItemA ''- internal name of first item &amp;lt;br /&amp;gt;''asItemB ''- internal name of second item &amp;lt;br /&amp;gt;''asFunction ''- the function to call &amp;lt;br /&amp;gt;''abAutoRemove ''- determines whether the callback should be removed when the items are combined&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveCombineCallback(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes a combine callback. &amp;lt;br /&amp;gt;''asName''  - the internal name of the callback to be removed (as specified in AddCombineCallback)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddUseItemCallback(string&amp;amp; asName, string&amp;amp; asItem, string&amp;amp; asEntity, string&amp;amp; asFunction, bool abAutoDestroy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to use items on the world. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asItem, string &amp;amp;in asEntity)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asItem ''- internal name of the item &amp;lt;br /&amp;gt;''asEntity ''- entity to be able to use the item on &amp;lt;br /&amp;gt;''asFunction ''- function to call &amp;lt;br /&amp;gt;''abAutoDestroy ''- determines whether the item is destroyed when used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveUseItemCallback(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an item callback.&lt;br /&gt;
&lt;br /&gt;
===Entities===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityActive(string&amp;amp; asName, bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates an entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityVisible(string &amp;amp;in asName, bool abVisible);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates an entity's visual mesh. The collision body remains.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity. &amp;lt;br /&amp;gt;''abActive''  - Activate/deactivate mesh.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEntityExists(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether an entity exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityCustomFocusCrossHair(string&amp;amp; asName, string&amp;amp; asCrossHair);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the crosshair that is used when focusing an entity.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCrossHair ''- desired crosshair, can be: Default (uses default), Grab, Push, Ignite, Pick, LevelDoor, Ladder&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void CreateEntityAtArea(string&amp;amp; asEntityName, string&amp;amp; asEntityFile, string&amp;amp; asAreaName, bool abFullGameSave);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates an entity at an area. When creating an enemy though, it cannot chase properly along PathNodes(using for example ShowEnemyPlayerPosition).&lt;br /&gt;
&lt;br /&gt;
''asEntityName ''- internal name &amp;lt;br /&amp;gt;''asEntityFile ''- entity to be used extension .ent &amp;lt;br /&amp;gt;''asAreaName ''- the area to create the entity at &amp;lt;br /&amp;gt;''abFullGameSave ''- determines whether an entity &amp;quot;remembers&amp;quot; its state&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ReplaceEntity(string &amp;amp;in asName, string &amp;amp;in asBodyName, string &amp;amp;in asNewEntityName, string &amp;amp;in asNewEntityFile, bool abFullGameSave);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Removes an entity and places a new one in its place.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to replace. &amp;lt;br /&amp;gt;''asBodyName''  - Name of the body of the entity to place the new entity at. If empty the first body is used (might be buggy, recommended to name a body anyway). &amp;lt;br /&amp;gt;''asNewEntityName''  - Name of the new entity. &amp;lt;br /&amp;gt;''asNewEntityFile''  - Name of the new entity file. Extension .ent. &amp;lt;br /&amp;gt;''abFullGameSave''  - Whether ALL properties of this entity should be saved throughout levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlaceEntityAtEntity(string &amp;amp;in asName, string &amp;amp;in asTargetEntity, string &amp;amp;in asTargetBodyName, bool abUseRotation);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Places an entity at the position of another entity. Does not work for enemies, use TeleportEnemyToEntity instead.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to place. &amp;lt;br /&amp;gt;''asTargetEntity''  - Name of the other entity to place the first entity at. &amp;lt;br /&amp;gt;''asTargetBodyName''  - Name of the body of the entity to place the first entity at. If empty the first body is used (might be buggy, recommended to name a body anyway). &amp;lt;br /&amp;gt;''abUseRotation''  - Whether the entity should be rotated like the target entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPos(string &amp;amp;in asName, float afX, float afY, float afZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Moves an entity to a position in the level.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to move. &amp;lt;br /&amp;gt;''afX''  - X co-ordinate position. &amp;lt;br /&amp;gt;''afY''  - Y co-ordinate position. &amp;lt;br /&amp;gt;''afZ''  - Z co-ordinate position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
float GetEntityPosX(string &amp;amp;in asName);&lt;br /&gt;
float GetEntityPosY(string &amp;amp;in asName);&lt;br /&gt;
float GetEntityPosZ(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns an entity's position in the level on the specified axis.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPlayerLookAtCallback(string&amp;amp; asName, string&amp;amp; asCallback, bool abRemoveWhenLookedAt);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player looks at a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: 1 = looking, -1 = not looking&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCallback ''- function to call &amp;lt;br /&amp;gt;''abRemoveWhenLookedAt ''- determines whether the callback should be removed when the player looked at the entity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPlayerInteractCallback(string&amp;amp; asName, string&amp;amp; asCallback, bool abRemoveOnInteraction);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player interacts with a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCallback ''- function to call &amp;lt;br /&amp;gt;''abRemoveOnInteraction ''- determines whether the callback should be removed when the player interacts with the entity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityCallbackFunc(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player interacts with a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, string &amp;amp;in type)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;Type depends on entity type and includes: &amp;quot;OnPickup&amp;quot;, &amp;quot;Break&amp;quot;, &amp;quot;OnIgnite&amp;quot;, etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityConnectionStateChangeCallback(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A callback called when ever the connection state changes (button being switched on, lever switched, etc). &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void Func(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: -1 = off, 0 = between, 1 = on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityInteractionDisabled(string&amp;amp; asName, bool abDisabled);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disallows interaction with an entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BreakJoint (string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Breaks a joint. Do not use this on joints in SwingDoors, Levers, Wheels, etc. where the joint is part of an interaction. That will make the game crash.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void AddEntityCollideCallback(string&amp;amp; asParentName, string&amp;amp; asChildName, string&amp;amp; asFunction, bool abDeleteOnCollide, int alStates);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when two entites collide. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asParent, string &amp;amp;in asChild, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: 1 = enter, -1 = leave&lt;br /&gt;
&lt;br /&gt;
''asParentName ''- internal name of main object &amp;lt;br /&amp;gt;''asChildName ''- internal name of object that collides with main object (asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) NOT supported!) &amp;lt;br /&amp;gt;''asFunction ''- function to call &amp;lt;br /&amp;gt;''abDeleteOnCollide ''- determines whether the callback after it was called &amp;lt;br /&amp;gt;''alStates ''- 1 = only enter, -1 = only leave, 0 = both&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveEntityCollideCallback(string&amp;amp; asParentName, string&amp;amp; asChildName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an EntityCollideCallback. Asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) not supported in ''asChildName''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEntitiesCollide(string&amp;amp; asEntityA, string&amp;amp; asEntityB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether two entites collide. This function does NOT support asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) or &amp;quot;Player&amp;quot;!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetBodyMass(string &amp;amp;in asName, float afMass);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Sets the mass of an entity's body.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the body of an entity. The body name of an entity is EntityName_BodyName. &amp;lt;br /&amp;gt;''afMass''  - The mass to set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
float GetBodyMass(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Gets the mass of an entity's body.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the body of an entity. The body name of an entity is EntityName_BodyName. &amp;lt;br /&amp;gt;''afMass''  - The mass to get.&lt;br /&gt;
&lt;br /&gt;
====Props====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropEffectActive(string&amp;amp; asName, bool abActive, bool abFadeAndPlaySounds);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on coal to give it the black color it should have.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropActiveAndFade(string&amp;amp; asName, bool abActive, float afFadeTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates a prop.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''abActive ''- nothing to add &amp;lt;br /&amp;gt;''afFadeTime ''- time in seconds until prop fully fades&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropStaticPhysics(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates the physics of a prop. Setting as true will make entities static in midair.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetPropIsInteractedWith(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a prop is interacted with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void RotatePropToSpeed(string&amp;amp; asName, float afAcc, float afGoalSpeed, float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed, string&amp;amp; asOffsetArea);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rotates the prop up to a set speed.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afAcc ''- acceleration &amp;lt;br /&amp;gt;''afGoalSpeed ''- desired speed &amp;lt;br /&amp;gt;''afAxisX ''- rotation around X axis &amp;lt;br /&amp;gt;''afAxisY ''- rotation around Y axis &amp;lt;br /&amp;gt;''afAxisZ ''- rotation around Z axis &amp;lt;br /&amp;gt;''abResetSpeed ''- determines whether the speed is resetted after goal speed is reached &amp;lt;br /&amp;gt;''asOffsetArea ''- the area to rotate around, if empty, then the center of the body is used Note: The entity you want to rotate MUST be a &amp;quot;StaticObject&amp;quot; entity!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void StopPropMovement(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops all movement of a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddAttachedPropToProp(string&amp;amp; asPropName, string&amp;amp; asAttachName, string&amp;amp; asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attaches a prop to another prop.&lt;br /&gt;
&lt;br /&gt;
a''sPropName''- the prop to attach another prop at &amp;lt;br /&amp;gt;''asAttachName ''- internal name of the prop that gets attached &amp;lt;br /&amp;gt;''asAttachFile ''- the prop that gets attached extension .ent &amp;lt;br /&amp;gt;''afPosX ''- X position of the attach from the prop &amp;lt;br /&amp;gt;''afPosY ''- Y position of the attach from the prop &amp;lt;br /&amp;gt;''afPosZ ''- Z position of the attach from the prop &amp;lt;br /&amp;gt;''afRotX ''- rotation around X axis of the attach &amp;lt;br /&amp;gt;''afRotY ''- rotation around Y axis of the attach &amp;lt;br /&amp;gt;''afRotZ ''- rotation around ZX axis of the attach Note: for the purposes of &amp;quot;AddEntityCollideCallback&amp;quot;, attached props will not call the callback function if they collide with a &amp;quot;static_object&amp;quot; or a &amp;quot;StaticProp&amp;quot; entity type!&lt;br /&gt;
&lt;br /&gt;
{{bug|''afRotZ '' is used for both the ZX rotation and the Z position of the attached prop. Unwanted rotation can be avoided by using: &amp;lt;br /&amp;gt;''AddAttachedPropToProp(asPropName, asAttachName, asAttachFile, afPosX, afPosY, '''0''', afPosZ, '''90.0f''', afPosZ)''}}&lt;br /&gt;
&lt;br /&gt;
{{bug|Attaching a breakable prop to a physically active prop, and then breaking the attached prop, will cause the game to crash, should the parent object be moved or reset.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AttachPropToProp(string&amp;amp; asPropName, string&amp;amp; asAttachName, string&amp;amp; asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Attaches a prop to another prop. Fixed version of AddAttachedPropToProp.&lt;br /&gt;
&lt;br /&gt;
''asPropName ''- the prop to attach another prop at &amp;lt;br /&amp;gt;''asAttachName ''- internal name of the prop that gets attached &amp;lt;br /&amp;gt;''asAttachFile ''- the prop that gets attached extension .ent &amp;lt;br /&amp;gt;''afPosX ''- X position of the attach from the prop &amp;lt;br /&amp;gt;''afPosY ''- Y position of the attach from the prop &amp;lt;br /&amp;gt;''afPosZ ''- Z position of the attach from the prop &amp;lt;br /&amp;gt;''afRotX ''- rotation around X axis of the attach &amp;lt;br /&amp;gt;''afRotY ''- rotation around Y axis of the attach &amp;lt;br /&amp;gt;''afRotZ ''- rotation around ZX axis of the attach Note: for the purposes of &amp;quot;AddEntityCollideCallback&amp;quot;, attached props will not call the callback function if they collide with a &amp;quot;static_object&amp;quot; or a &amp;quot;StaticProp&amp;quot; entity type!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveAttachedPropFromProp(string&amp;amp; asPropName, string&amp;amp; asAttachName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detaches a prop from a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropHealth(string&amp;amp; asName, float afHealth);&lt;br /&gt;
void AddPropHealth(string&amp;amp; asName, float afHealth);&lt;br /&gt;
float GetPropHealth(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the health of a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ResetProp(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resets a prop's state to the original one when the map was loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void PlayPropAnimation(string&amp;amp; asProp, string&amp;amp; asAnimation, float afFadeTime, bool abLoop, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the prop play an animation and calls a function. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asProp)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asProp ''- internal name of the prop &amp;lt;br /&amp;gt;''asAnimation ''- animation to play &amp;lt;br /&amp;gt;''afFadeTime ''- ? &amp;lt;br /&amp;gt;''abLoop ''- determines whether the animation loops &amp;lt;br /&amp;gt;''asCallback ''- function to call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddPropForce(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddPropImpulse(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddBodyForce(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddBodyImpulse(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions push objects. Note that rather high values are needed when applying ''forces''  (on the order of ~100 (weak) to ~10000 (strong)), but not impulses (values less than 10 can be appropriate). Forces are external influences, and will have different effect depending on the mass of the object they are being applied to; impulses disregard mass, and can cause objects to break, as if hit. A &amp;quot;Body&amp;quot; is a physics-related helper object, to which a force or an impulse can be applied. Entities can consist of several bodies, interconnected in various ways (you can create/examine bodies in the model editor).&lt;br /&gt;
&lt;br /&gt;
''asName ''- the object to push; for bodies, use this format: &amp;quot;''entityName''_''bodyName''&amp;quot; &amp;lt;br /&amp;gt;''afX ''- magnitude along the X-axis &amp;lt;br /&amp;gt;''afY ''- magnitude along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- magnitude along the Z-axis &amp;lt;br /&amp;gt;''asCoordSystem ''- determines which coordinate system is used, usually &amp;quot;world&amp;quot; All of these functions are ''additive''  - when called consecutively, for each call, the vectors defined by (afX, afY, afZ) will be added together, and a resultant force/impulse will be calculated ''before''  any physics simulation is applied to the target object.&lt;br /&gt;
&lt;br /&gt;
====Connections====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void InteractConnectPropWithRope(string&amp;amp; asName, string&amp;amp; asPropName, string&amp;amp; asRopeName, bool abInteractOnly, float afSpeedMul, float afToMinSpeed, float afToMaxSpeed, bool abInvert, int alStatesUsed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connects a prop with the movement of a rope (ie. turn wheel to move rope).&lt;br /&gt;
&lt;br /&gt;
''asName ''- connection name &amp;lt;br /&amp;gt;''asPropName ''- name of prop &amp;lt;br /&amp;gt;''asRopeName ''- name of rope &amp;lt;br /&amp;gt;''abInteractOnly ''- ? &amp;lt;br /&amp;gt;''afSpeedMul ''- speed multiplier of how quickly the rope moves &amp;lt;br /&amp;gt;''afToMinSpeed ''- the slowest the rope will move when moving the prop &amp;lt;br /&amp;gt;''afToMaxSpeed ''- the fastest the rope will move when moving the prop &amp;lt;br /&amp;gt;''abInvert ''- whether to invert the direction the rope moves &amp;lt;br /&amp;gt;''alStatesUsed ''- which states of the prop can interact with the rope?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void InteractConnectPropWithMoveObject(string&amp;amp; asName, string&amp;amp; asPropName, string&amp;amp; asMoveObjectName, bool abInteractOnly, bool abInvert, int alStatesUsed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This one should only be used if there must be an exact correspondance to prope &amp;quot;amount&amp;quot; and the moveobject open amount. It is best used for Wheel-door connections!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ConnectEntities(string&amp;amp; asName, string&amp;amp; asMainEntity, string&amp;amp; asConnectEntity, bool abInvertStateSent, int alStatesUsed, string&amp;amp; asCallbackFunc);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asConnectionName, string &amp;amp;in asMainEntity, string &amp;amp;in asConnectEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;State is what is sent to connection entity and will be inverted if abInvertStateSent = true!&lt;br /&gt;
&lt;br /&gt;
====Lamps====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLampLit(string&amp;amp; asName, bool abLit, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Un)lits a lamp.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Name of the lamp &amp;lt;br /&amp;gt;''abLit ''- Set true if you want the lamp to be lit, set to false if you want the lamp to be unlit &amp;lt;br /&amp;gt;''abEffects ''- If you want to have the lamp fade in/out when it gets (un)lit&lt;br /&gt;
&lt;br /&gt;
====Doors====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetSwingDoorLocked(string&amp;amp; asName, bool abLocked, bool abEffects);&lt;br /&gt;
void SetSwingDoorClosed(string&amp;amp; asName, bool abClosed, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Locks/closes a swing door.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
bool GetSwingDoorLocked(string&amp;amp; asName);&lt;br /&gt;
bool GetSwingDoorClosed(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a swing door is locked/closed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetSwingDoorDisableAutoClose(string&amp;amp; asName, bool abDisableAutoClose);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deactivates the &amp;quot;auto-close&amp;quot; when a door is nearly closed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
int GetSwingDoorState(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns an integer depending on how far the door is opened. &amp;lt;br /&amp;gt;-1 = angle is close to 0°, 1 = angle is 70% or higher of max, 0 = inbetween -1 and 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLocked(string&amp;amp; asName, bool abLocked);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Locks a level door. Note that level doors are NOT swing doors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLockedSound(string&amp;amp; asName, string&amp;amp; asSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which sound is played when interacting with a locked level door.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLockedText(string&amp;amp; asName, string&amp;amp; asTextCat, string&amp;amp; asTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a message when interacting with a locked level door.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMoveObjectState(string&amp;amp; asName, float afState);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves an object to a certain state.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afState ''- state of the object, 0 = closed, 1 = open, values inbetween (and above, for example, the bridge_metal_vert) are valid too!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMoveObjectStateExt(string&amp;amp; asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist, bool abResetSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves an object to a certain state, extended method.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afState ''- state of the object, 0 = closed, 1 = open, values inbetween are valid too! &amp;lt;br /&amp;gt;''afAcc ''- acceleration &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed &amp;lt;br /&amp;gt;''afSlowdownDist ''- Distance to the target state before decceleration occurs. &amp;lt;br /&amp;gt;''abResetSpeed ''- Set to True if the prop's speed should be reset before performing the movement, else the prop will accelerate from it's current speed to afMaxSpeed.&lt;br /&gt;
&lt;br /&gt;
====Levers, wheels and buttons====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropObjectStuckState(string&amp;amp; asName, int alState);&lt;br /&gt;
void SetWheelStuckState(string&amp;amp; asName, int alState, bool abEffects);&lt;br /&gt;
void SetLeverStuckState(string&amp;amp; asName, int alState, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes a prop&amp;lt;nowiki&amp;gt;\&amp;lt;/nowiki&amp;gt;wheel&amp;lt;nowiki&amp;gt;\&amp;lt;/nowiki&amp;gt;lever stuck in a certain state.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''alState ''- 0 = not stuck, 1 = at max, -1 = at min &amp;lt;br /&amp;gt;''abEffects ''- use effects&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetWheelAngle(string&amp;amp; asName, float afAngle, bool abAutoMove);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves a wheel to a certain angle.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afAngle ''- angle &amp;lt;br /&amp;gt;''abAutoMove ''- determines whether the wheel should move on its own&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetWheelInteractionDisablesStuck(string&amp;amp; asName, bool abX);&lt;br /&gt;
void SetLeverInteractionDisablesStuck(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to make a wheel/lever unstuck when interacted with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
int GetLeverState(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the state of the lever. &amp;lt;br /&amp;gt;0 = not stuck, 1 = at max, -1 = at min&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMultiSliderStuckState(string&amp;amp; asName, int alStuckState, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes a MultiSlider stuck in a certain state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMultiSliderCallback(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when state changes. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetButtonSwitchedOn(string&amp;amp; asName, bool abSwitchedOn, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Sticky areas====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetAllowStickyAreaAttachment(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows entites to stick to a StickyArea.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AttachPropToStickyArea(string&amp;amp; asAreaName, string&amp;amp; asProp);&lt;br /&gt;
void AttachBodyToStickyArea(string&amp;amp; asAreaName, string&amp;amp; asBody);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attaches a prop/body to a StickyArea.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void DetachFromStickyArea(string&amp;amp; asAreaName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detaches everything from a StickyArea.&lt;br /&gt;
&lt;br /&gt;
====Enemies====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetNPCAwake(string&amp;amp; asName, bool abAwake, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates the npc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetNPCFollowPlayer(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets an NPC's head to follow the player's movement's.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyDisabled(string&amp;amp; asName, bool abDisabled);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables an enemy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyIsHallucination(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes an enemy a hallucination. Hallucinations fade to smoke when they get near the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void FadeEnemyToSmoke(string&amp;amp; asName, bool abPlaySound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instantly fades an enemy to smoke.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ShowEnemyPlayerPosition(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the enemy run to the player, no matter where he is.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AlertEnemyOfPlayerPresence(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Gives the specified enemy the player's current position and makes it search the area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyDisableTriggers(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables or disables enemy triggers. If disabled, enemy will not react to player or attack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddEnemyPatrolNode(string&amp;amp; asName, string&amp;amp; asNodeName, float afWaitTime, string&amp;amp; asAnimation);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a patrol node to the enemy's path.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name of the enemy &amp;lt;br /&amp;gt;''asNodeName ''- path node &amp;lt;br /&amp;gt;''afWaitTime ''- time in seconds that the enemy waits at the path node before continuing &amp;lt;br /&amp;gt;''asAnimation ''- the animation the enemy uses when reaching the path node&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ClearEnemyPatrolNodes(string&amp;amp; asEnemyName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clears the current path of patrol nodes of the enemy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemySanityDecreaseActive(string &amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether an enemy activates the player's sanity drain when stared at.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX ''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportEnemyToNode(string &amp;amp;in asEnemyName, string &amp;amp;in asNodeName, bool abChangeY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Teleports an enemy to a specific PathNode.&lt;br /&gt;
&lt;br /&gt;
''asEnemyName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asNodeName ''- Internal name of the node to teleport to &amp;lt;br /&amp;gt;''abChangeY ''- Whether the Y position of the node will be used when teleporting the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportEnemyToEntity(string &amp;amp;in asEnemyName, string &amp;amp;in asTargetEntity, string &amp;amp;in asTargetBody, bool abChangeY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Teleports an enemy to a specific entity.&lt;br /&gt;
&lt;br /&gt;
''asEnemyName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asTargetEntity ''- Internal name of the entity to teleport to &amp;lt;br /&amp;gt;''asTargetBody''- Internal name of the entity's body name to teleport to. If empty, the first body will be used (might be unstable, recommended to input a body anyway) &amp;lt;br /&amp;gt;''abChangeY ''- Whether the Y position of the node will be used when teleporting the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ChangeManPigPose(string&amp;amp;in asName, string&amp;amp;in asPoseType);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Changes the pose a specified ManPig.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asPoseType''- Name of the ManPig pose to use. Can be &amp;quot;Biped&amp;quot; or &amp;quot;Quadruped&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigFadeDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should fade the player's view in and out.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigSoundDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should play the proximity sounds.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigEasyEscapeDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should be easier to escape from when hunted.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ForceTeslaPigSighting(string&amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Forces a TeslaPig to be visible for a short time.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
string&amp;amp; GetEnemyStateName(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the name of the state a specified enemy is current in. States can be Hunt, Search, Patrol, Wait, Alert, Investigate, Track and BreakDoor.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Engine_Scripts&amp;diff=6453</id>
		<title>HPL2/Engine Scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Engine_Scripts&amp;diff=6453"/>
		<updated>2023-09-15T17:59:33Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: /* Quests */ update about managing hints&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TocRight}}&lt;br /&gt;
&lt;br /&gt;
This page documents all scripts available in Amnesia: The Dark Descent.&lt;br /&gt;
&lt;br /&gt;
{{note|'''Note''': Some of the functions require the Amnesia 1.3 or 1.5 update. Steam and other online store copies should be automatically updated. Other copies can get 1.3 [http://www.frictionalgames.com/forum/thread-24334.html here].}}&lt;br /&gt;
&lt;br /&gt;
== Directives ==&lt;br /&gt;
&lt;br /&gt;
First off, &amp;lt;code&amp;gt;#include &amp;quot;file.hps&amp;quot;&amp;lt;/code&amp;gt; can be used to programmatically merge together multiple separate files to make organizing scripts easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.5}}&lt;br /&gt;
&lt;br /&gt;
==Engine scripts==&lt;br /&gt;
===Main===&lt;br /&gt;
&lt;br /&gt;
The following functions are the main hps functions that the HPL2 engine looks to run on certain events - similar to the C++ int main() function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void OnStart();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs when the map is loaded for the first time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnEnter();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs whenever the player enters a map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnLeave();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function that runs when the player leaves a map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnGameStart();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is found in the global.hps file and the inventory.hps file, and is run when the game is first started by the player (ie via &amp;quot;Start New Game&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void OnUpdate(float afStep);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{ReqVer|1.5}}&lt;br /&gt;
&lt;br /&gt;
This function is executed for every game update or &amp;quot;tick&amp;quot;. Can be used for rapid-firing updates instead of looping timers. Keep in mind that this can affect game performance if not used with care.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float RandFloat(float afMin, float afMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generates a random float.&lt;br /&gt;
&lt;br /&gt;
#''afMin ''- minimum value&lt;br /&gt;
#''afMax ''- maximum value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
int RandInt(int alMin, int alMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generates a random int. Note: the maximum value is ''inclusive''  - the RandInt() function may return this value.&lt;br /&gt;
&lt;br /&gt;
#''alMin ''- minimum value&lt;br /&gt;
#''alMax ''- maximum value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool StringContains(string&amp;amp; asString, string&amp;amp; asSubString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a string contains the specified string. &amp;lt;br /&amp;gt;Example: searching for &amp;quot;hello&amp;quot; in &amp;quot;hello world&amp;quot; would return '''true'''.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string to check&lt;br /&gt;
#''asSubString ''- the string to search for&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
string&amp;amp; StringSub(string&amp;amp; asString, int alStart, int alCount);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the substring in a string. &amp;lt;br /&amp;gt;Example: in the string &amp;quot;frictional games rocks&amp;quot;, using 4 as ''alStart''  and 6 as ''alCount''  would return '''&amp;quot;tional&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string&lt;br /&gt;
#''alStart ''- start position in the string&lt;br /&gt;
#''alCount ''- amount of characters&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
int StringToInt(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns an integer converted from a string, else returns 0.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float StringToFloat(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns a float converted from a string, else returns 0.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool StringToBool(string&amp;amp;in asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
If possible, returns a boolean converted from a string, else returns false.&lt;br /&gt;
&lt;br /&gt;
#''asString''  - String to convert.&lt;br /&gt;
&lt;br /&gt;
===Mathematical Operations===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathSin(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the sine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathCos(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the cosine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathTan(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the tangent of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAsin(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc sine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAcos(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc cosine of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAtan(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the arc tangent of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAtan2(float afX, float afY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Calculates and returns the arc tangent of the specified values.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - First value to operate.&lt;br /&gt;
#''afY''  - Second value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathSqrt(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the square root of the specified value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathPow(float afBase, float afExp);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the value of afBase raised to the power of afExp.&lt;br /&gt;
&lt;br /&gt;
#''afBase''  - The base value.&lt;br /&gt;
#''afExp''  - Value to calculate the base with.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathMin(float afA, float afB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the lowest value.&lt;br /&gt;
&lt;br /&gt;
#''afA''  - First value.&lt;br /&gt;
#''afB''  - Second value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathMax(float afA, float afB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the highest value.&lt;br /&gt;
&lt;br /&gt;
#''afA''  - First value.&lt;br /&gt;
#''afB''  - Second value.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathClamp(float afX, float afMin, float afMax);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns afX clamped between afMin and afMax. If afX &amp;lt; afMin, returns afMin, and if afX &amp;gt; afMax, returns afMax.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - The value to clamp.&lt;br /&gt;
#''afMin''  - The minimum value to clamp afX with.&lt;br /&gt;
#''afMax''  - The maximum value to clamp afX with.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float MathAbs(float afX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the absolute value.&lt;br /&gt;
&lt;br /&gt;
#''afX''  - Value to operate.&lt;br /&gt;
&lt;br /&gt;
===Debugging===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void Print(string&amp;amp; asString);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints a string to the log file (''hpl.log'').&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddDebugMessage(string&amp;amp; asString, bool abCheckForDuplicates);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints a string to the debug console.&lt;br /&gt;
&lt;br /&gt;
#''asString ''- the string to print&lt;br /&gt;
#''abCheckForDuplicates ''- if true, the string won't be printed more than once on screen until it disappears&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ProgLog(string&amp;amp; asLevel, string&amp;amp; asMessage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Prints an entry to the ProgLog (progression log). &amp;lt;br /&amp;gt;ProgLog is a file created in Documents/Amnesia/main (or an FC folder if one is being used). It logs certain events, such us opening the menu or picking up the lantern, as well as the player's state (Health, Sanity, Oil, Tinderboxes, Coins), for the purpose of documenting a tester's playstyle. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;This function allows to log custom messages.The messages in the ProgLog file are sorted by time elapsed since a map was loaded.&lt;br /&gt;
&lt;br /&gt;
ProgLog has to be enabled for a player profile in ''user_settings.cfg''  before it starts working.&lt;br /&gt;
&lt;br /&gt;
#''asLevel ''- can be &amp;quot;Low&amp;quot;, &amp;quot;Medium&amp;quot; or &amp;quot;High&amp;quot;. It's a tag which appears in each log entry, for event prioritising.&lt;br /&gt;
#''asMessage ''- The custom message to be printed to the log.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool ScriptDebugOn();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the debug mode is enabled. &amp;lt;br /&amp;gt;See [[HPL2/Development_Environment|&amp;quot;Setting up Development Environment&amp;quot;]] to setup debug mode on your own computer.&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
{{warning|Regular variables (int, float, etc.) are '''not''' saved by the game. Using them in important parts of yor script will break it upon loading a game save. In HPL, those variables should only be used for disposable counters, like spawning objects in a &amp;quot;for&amp;quot; loop. For variables which need to be saved, use the wrappers as described below.}}&lt;br /&gt;
&lt;br /&gt;
====Local====&lt;br /&gt;
&lt;br /&gt;
Local variables can be used throughout the same script file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
void AddLocalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
int GetLocalVarInt(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
void AddLocalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
float GetLocalVarFloat(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLocalVarString(string&amp;amp; asName, const string&amp;amp; asVal);&lt;br /&gt;
void AddLocalVarString(string&amp;amp; asName, string&amp;amp; asVal);&lt;br /&gt;
string&amp;amp; GetLocalVarString(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Global====&lt;br /&gt;
&lt;br /&gt;
Global variables can be used throughout several maps and can be accessed by several script files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
void AddGlobalVarInt(string&amp;amp; asName, int alVal);&lt;br /&gt;
int GetGlobalVarInt(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
void AddGlobalVarFloat(string&amp;amp; asName, float afVal);&lt;br /&gt;
float GetGlobalVarFloat(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetGlobalVarString(string&amp;amp; asName, const string&amp;amp; asVal);&lt;br /&gt;
void AddGlobalVarString(string&amp;amp; asName, string&amp;amp; asVal);&lt;br /&gt;
string&amp;amp; GetGlobalVarString(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Particle Systems===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PreloadParticleSystem(string&amp;amp; asPSFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preloads a particle system.&lt;br /&gt;
&lt;br /&gt;
#''asPSFile''  - The particle system file to load. Extension: .ps&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateParticleSystemAtEntity(string&amp;amp; asPSName, string&amp;amp; asPSFile, string&amp;amp; asEntity, bool abSavePS);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a particle system on an entity.&lt;br /&gt;
&lt;br /&gt;
#''asPSName ''- internal name&lt;br /&gt;
#''asPSFile ''- the particle system to use + extension .ps&lt;br /&gt;
#''asEntity ''- the entity to create the particle system at&lt;br /&gt;
#''abSavePS ''- determines whether a particle system should &amp;quot;remember&amp;quot; its shown/hidden state, so that this state can be restored when the player revisits the level&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateParticleSystemAtEntityExt(string&amp;amp; asPSName, string&amp;amp; asPSFile, string&amp;amp; asEntity, bool abSavePS,&lt;br /&gt;
float afR, float afG, float afB, float afA, bool abFadeAtDistance, float afFadeMinEnd, float afFadeMinStart,&lt;br /&gt;
float afFadeMaxStart, float afFadeMaxEnd);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a particle system on an entity, extended method with more options.&lt;br /&gt;
&lt;br /&gt;
#''asPSName ''- internal name&lt;br /&gt;
#''asPSFile ''- the particle system to use + extension .ps&lt;br /&gt;
#''asEntity ''- the entity to create the particle system at&lt;br /&gt;
#''abSavePS ''- determines whether a particle system should &amp;quot;remember&amp;quot; its shown/hidden state, so that this state can be restored when the player revisits the level&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
#''abFadeAtDistance ''- determines whether a particle system fades from a certain distance on&lt;br /&gt;
#''afFadeMinEnd ''- minimum distance at which the particle system stops fading&lt;br /&gt;
#''afFadeMinStart ''- minimum distance at which the particle system starts fading&lt;br /&gt;
#''afFadeMaxStart ''- maximum distance at which the particle system starts fading&lt;br /&gt;
#''afFadeMaxEnd ''- maximum distance at which the particle system stops fading&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void DestroyParticleSystem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Destroys a particle system.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - The internal name of the particle system&lt;br /&gt;
&lt;br /&gt;
===Sounds &amp;amp; Music===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PreloadSound(string&amp;amp; asSoundFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preloads a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundFile''  - The sound file to load. Extension: .snt&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlaySoundAtEntity(string&amp;amp; asSoundName, string&amp;amp; asSoundFile, string&amp;amp; asEntity, float afFadeTime, bool abSaveSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a sound on an entity.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''asSoundFile ''- the sound to use + extension .snt&lt;br /&gt;
#''asEntity ''- the entity to create the sound at, can be &amp;quot;Player&amp;quot;&lt;br /&gt;
#''afFadeTime ''- time in seconds the sound needs to fade. Avoids enemies hearing the sound if afFadeTime is at least 0.1f&lt;br /&gt;
#''abSaveSound ''- if ''true'', a looping sound will &amp;quot;remember&amp;quot; its playback state (currently playing/stopped), and that state will be restored the next time the level is entered. If ''true'', the sound is never attached to the entity! Note that saving should only be used on ''looping sounds''!&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeInSound(string&amp;amp; asSoundName, float afFadeTime, bool abPlayStart);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades in a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''afFadeTime ''- time in seconds&lt;br /&gt;
#''abPlayStart ''- ?&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopSound(string&amp;amp; asSoundName, float afFadeTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades out a sound.&lt;br /&gt;
&lt;br /&gt;
#''asSoundName ''- internal name&lt;br /&gt;
#''afFadeTime ''- time in seconds, use 0 to immediatly stop the sound&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlayMusic(string&amp;amp; asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plays music.&lt;br /&gt;
&lt;br /&gt;
#''asMusicFile ''- the music to play + extension .ogg&lt;br /&gt;
#''abLoop ''- determines whether a music track should loop&lt;br /&gt;
#''afVolume ''- volume of the music&lt;br /&gt;
#''afFadeTime ''- time in seconds until music reaches full volume&lt;br /&gt;
#''alPrio ''- priority of the music. Note that only the music with the highest priority can be heard! 0 - lowest, 1 - higher, etc.&lt;br /&gt;
#''abResume''  - if ''true'', playback will be continued from where the track stopped after the call to StopMusic(); if ''false'', the track will be restarted.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopMusic(float afFadeTime, int alPrio);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops music.&lt;br /&gt;
&lt;br /&gt;
#''afFadeTime ''- time in seconds until music stops&lt;br /&gt;
#''alPrio ''- the priority of the music that should stop&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeGlobalSoundVolume(float afDestVolume, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Influences the global sound volume, that means everything you can hear '''from the world'''. This does not affect music of GUI sounds.&lt;br /&gt;
&lt;br /&gt;
#''afDestVolume ''- desired volume&lt;br /&gt;
#''afTime ''- time in seconds until volume reaches desired volume&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeGlobalSoundSpeed(float afDestSpeed, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Influences the global sound speed.&lt;br /&gt;
&lt;br /&gt;
#''afDestSpeed ''- desired speed&lt;br /&gt;
#''afTime ''- time in seconds until volume reaches desired speed&lt;br /&gt;
&lt;br /&gt;
===Lights===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLightVisible(string&amp;amp; asLightName, bool abVisible);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/disables lights.&lt;br /&gt;
&lt;br /&gt;
#''asLightName ''- internal name&lt;br /&gt;
#''abVisible ''- determines the state of the light&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeLightTo(string&amp;amp; asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the properties of a light.&lt;br /&gt;
&lt;br /&gt;
#''asLightName ''- internal name&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
#''afRadius ''- radius of the light. -1 means keeping the radius&lt;br /&gt;
#''afTime ''- time in seconds until change is done&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLightFlickerActive(string&amp;amp; asLightName, bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates flickering on a light.&lt;br /&gt;
&lt;br /&gt;
#''asLightName''  - The internal light name&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&lt;br /&gt;
==Game scripts==&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartCredits(string&amp;amp; asMusic, bool abLoopMusic, string&amp;amp; asTextCat, string&amp;amp; asTextEntry, int alEndNum);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts the end credits screen.&lt;br /&gt;
&lt;br /&gt;
#''asMusic ''- the music to play (including .ogg)&lt;br /&gt;
#''abLoopMusic ''- determines whether the music should loop&lt;br /&gt;
#''asTextCat ''- the category to be used in the .lang file&lt;br /&gt;
#''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
#''alEndNum ''- Amnesia has 3 different endings and displays a code at the bottom. Determines which code is displayed. 0-2 will display codes, any other integer will not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartDemoEnd();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts the end images that are used in the demo, images are named &amp;quot;demo_end01.jpg&amp;quot;, increase the number for each image you want to use. (NEEDS VERIFICATION)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AutoSave();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the game to the auto save.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CheckPoint (string&amp;amp; asName, string&amp;amp; asStartPos, string&amp;amp; asCallback, string&amp;amp; asDeathHintCat, string&amp;amp; asDeathHintEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets a checkpoint at which the player will respawn in case he dies. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asName, int alCount)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;Count is 0 on the first checkpoint load!&lt;br /&gt;
&lt;br /&gt;
#''asName ''- the internal name&lt;br /&gt;
#''asStartPos ''- the name of the StartPos in the editor&lt;br /&gt;
#''asCallback ''- the function to call when the player dies/respawns&lt;br /&gt;
#''asDeathHintCat ''- the category of the death hint message to be used in the .lang file&lt;br /&gt;
#''asDeathHintEntry ''- the entry in the .lang file&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ChangeMap(string&amp;amp; asMapName, string&amp;amp; asStartPos, string&amp;amp; asStartSound, string&amp;amp; asEndSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediatly loads another map.&lt;br /&gt;
&lt;br /&gt;
#''asMapName ''- the file to load&lt;br /&gt;
#''asStartPos ''- the name of the StartPos on the next map&lt;br /&gt;
#''asStartSound ''- the sound that is played when the change starts&lt;br /&gt;
#''asEndSound ''- the sound that is played when the new map is loaded&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ClearSavedMaps();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clears the &amp;quot;history&amp;quot; of the save, useful to do when you know the player will not be able to go back anymore. Makes the next save much smaller in size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CreateDataCache();&lt;br /&gt;
void DestroyDataCache();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This caches all current textures and models and they are not released until destroy is called. If there is already cached data it is destroyed.&lt;br /&gt;
Create caches to enable faster loading when going back to a map. Destroy the cache if you know the player won't go back to that map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetMapDisplayNameEntry(string&amp;amp; asNameEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the map name shown in save file names. If none is set NULL is assumed.&lt;br /&gt;
&lt;br /&gt;
#''asNameEntry ''- the entry to display, category must be &amp;quot;Levels&amp;quot;!&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the skybox.&lt;br /&gt;
&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxTexture(string&amp;amp; asTexture);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the texture of the skybox.&lt;br /&gt;
&lt;br /&gt;
#''asTexture''  - The texture file to set. Extension: .dds&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSkyBoxColor(float afR, float afG, float afB, float afA);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the solid color of the skybox rather than a texture.&lt;br /&gt;
&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the global fog.&lt;br /&gt;
&lt;br /&gt;
#''abActive''  - true = active, false = inactive&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogColor(float afR, float afG, float afB, float afA);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the color to use for the global fog.&lt;br /&gt;
&lt;br /&gt;
#''afR ''- red value&lt;br /&gt;
#''afG ''- green value&lt;br /&gt;
#''afB ''- blue value&lt;br /&gt;
#''afA ''- alpha value&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetFogProperties(float afStart, float afEnd, float afFalloffExp, bool abCulling);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the properties for the global fog.&lt;br /&gt;
&lt;br /&gt;
#''afStart ''- how many meters from the camera should the fog begin&lt;br /&gt;
#''afEnd ''- how many meters from the camera should the fog reach full thickness&lt;br /&gt;
#''afFalloffExp ''- the amount by which the thinkness increases&lt;br /&gt;
#''abCulling ''- whether occlusion culling is active for the fog; this prevents objects behind the fog from being loaded&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetupLoadScreen(string&amp;amp;asTextCat, string&amp;amp;asTextEntry, int alRandomNum, string&amp;amp;asImageFile);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which loading screen will be shown when changing maps.&lt;br /&gt;
&lt;br /&gt;
#''asTextCat ''- the category of the loading text in the .lang file to be shown on the loading screen&lt;br /&gt;
#''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
#''alRandomNum ''- if greater 1, then it will randomize between 1 and alRandom for each LoadScreen giving entry the suffix XX (eg 01). If &amp;lt; =1 then no suffix is added&lt;br /&gt;
#''asImageFile ''- the image to be shown (optional)&lt;br /&gt;
&lt;br /&gt;
===Game Timer===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddTimer(string&amp;amp; asName, float afTime, string&amp;amp; asFunction);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates a timer which calls a function when it expires. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asTimer)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#''asName ''- the name of the timer&lt;br /&gt;
#''afTime ''- time in seconds&lt;br /&gt;
#''asFunction ''- the function to call&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveTimer(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes a timer, no matter how much time is left.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - the internal name of the timer.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetTimerTimeLeft(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the time left on a timer.&lt;br /&gt;
&lt;br /&gt;
#''asName''  - the internal name of the timer.&lt;br /&gt;
&lt;br /&gt;
===Screen Effects===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeOut(float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to black.&lt;br /&gt;
&lt;br /&gt;
''afTime ''- time in seconds until the screen is completly black&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeIn(float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen back to normal.&lt;br /&gt;
&lt;br /&gt;
''afTime ''- time in seconds until the screen back to normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeImageTrailTo(float afAmount, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Applies the image trail effect to the screen.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeSepiaColorTo(float afAmount, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the screen go dark red.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadeRadialBlurTo(float afSize, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Applies radial blur effects to the screen.&lt;br /&gt;
&lt;br /&gt;
''afSize ''- intensity (default: 0) &amp;lt;br /&amp;gt;''afSpeed ''- time in seconds until full effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetRadialBlurStartDist(float afStartDist);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines at which distance the radial blur effects appear.&lt;br /&gt;
&lt;br /&gt;
''afStartDist ''- the distance at which the effect starts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartEffectFlash(float afFadeIn, float afWhite, float afFadeOut);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to white.&lt;br /&gt;
&lt;br /&gt;
''afFadeIn ''- time in seconds until screen is white &amp;lt;br /&amp;gt;''afWhite ''- determines to which percentage the screen fades to white (1.0 = completly white) &amp;lt;br /&amp;gt;''afFadeOut ''- time in seconds until screen is back to normal again&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartEffectEmotionFlash(string&amp;amp; asTextCat, string&amp;amp; asTextEntry, string&amp;amp; asSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fades the screen to white and shows a text message.&lt;br /&gt;
&lt;br /&gt;
''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the text entry in the .lang file &amp;lt;br /&amp;gt;''asSound ''- the sound to play while fading&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddEffectVoice(string&amp;amp; asVoiceFile, string&amp;amp; asEffectFile, string&amp;amp; asTextCat, string&amp;amp; asTextEntry,&lt;br /&gt;
bool abUsePosition, string&amp;amp; asPosEntity, float afMinDistance, float afMaxDistance);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This adds a voice and an effect to be played. It is okay to call this many times in order to play many voices in a row. The EffectVoiceOverCallback is not called until ALL voices have finished.&lt;br /&gt;
&lt;br /&gt;
''asVoiceFile ''- the voice to play &amp;lt;br /&amp;gt;''asEffectFile ''- the effect to play &amp;lt;br /&amp;gt;''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the text entry in the .lang file &amp;lt;br /&amp;gt;''abUsePosition ''- plays using 3D from the entity, or without 3D &amp;lt;br /&amp;gt;''asPosEntity ''- the entity at which the effect appears &amp;lt;br /&amp;gt;''afMinDistance ''- minimum distance to see the effect &amp;lt;br /&amp;gt;''afMaxDistance ''- maximum distance to see the effect&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopAllEffectVoices(float afFadeOutTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops all voices and calls the EffectVoiceOverCallback.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEffectVoiceActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether EffectVoices are still active.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetEffectVoiceOverCallback(string&amp;amp; asFunc);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the function to be called when the EffectVoices are finished. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetFlashbackIsActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a flashback is still in effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartPlayerSpawnPS(string&amp;amp; asSPSFile);&lt;br /&gt;
void StopPlayerSpawnPS();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continuously spawn regular particle systems (''.ps'') around the player. Particles created by this script carry over from map to map. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;''asSPSFile''  - the ''.sps''  file to use. Exemplary ''.sps''  files are located in the ''/misc''  folder in the main game directory. &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;Custom ''.sps''  files can be created by hand in a text editor (see existing ones and mimic how those are written). &amp;lt;br /&amp;gt;Since ''StopPlayerSpawnPS()''  doesn't seem to work, to stop an SPS you must create an ''.sps''  file with an empty particle field field and override the old SPS by calling ''StartPlayerSpawnPS''  again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlayGuiSound(string&amp;amp; asSoundFile, float afVolume);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Plays a sound, not using 3D.&lt;br /&gt;
&lt;br /&gt;
''asSoundFile ''- the sound to play (extension is .snt) &amp;lt;br /&amp;gt;''afVolume ''- the volume of the sound&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartScreenShake(float afAmount, float afTime, float afFadeInTime, float afFadeOutTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shakes the screen.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- intensity of the shake &amp;lt;br /&amp;gt;''afTime ''- duration of the shake &amp;lt;br /&amp;gt;''afFadeInTime ''- time in seconds until full intensity is reached &amp;lt;br /&amp;gt;''afFadeOutTime ''- time until screen is back to normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInDarknessEffectsActive(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables the sanity drain and night vision effects while in the darkness.&lt;br /&gt;
&lt;br /&gt;
''bool abX''  - Enable/disable effects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ShowScreenImage(string &amp;amp;in asImageName, float afX, float afY, float afScale, bool abUseRelativeCoordinates, float afDuration, float afFadeIn, float afFadeOut);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.5}}&lt;br /&gt;
&lt;br /&gt;
Displays an image file directly onto the screen.&lt;br /&gt;
&lt;br /&gt;
''asImageName'' - The image file to render (.jpg, .png, .tga, .dds)&lt;br /&gt;
&lt;br /&gt;
''afX'' - The X position of the image&lt;br /&gt;
&lt;br /&gt;
''afY'' - The Y position of the image&lt;br /&gt;
&lt;br /&gt;
''afScale'' - The scale of the image (default 1.0f)&lt;br /&gt;
&lt;br /&gt;
''abUseRelativeCoordinates'' - Whether or not to use relative coordinates for positioning. Use false for absolute.&lt;br /&gt;
&lt;br /&gt;
''afDuration'' - The duration that the image is displayed for.&lt;br /&gt;
&lt;br /&gt;
''afFadeIn'' - The time, in seconds, to fade in the image.&lt;br /&gt;
&lt;br /&gt;
''afFadeOut'' - The time, in seconds, to fade out the image.&lt;br /&gt;
&lt;br /&gt;
===Insanity===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInsanitySetEnabled(string&amp;amp; asSet, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which InsanitySets are enabled.&lt;br /&gt;
&lt;br /&gt;
''asSet ''- the set &amp;lt;br /&amp;gt;''abX ''- enabled or not&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartInsanityEvent(string &amp;amp;in asEventName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Starts a specified insanity event.&lt;br /&gt;
&lt;br /&gt;
''asEventName ''- Insanity event to play.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartRandomInsanityEvent();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts a random insanity event from the available sets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StopCurrentInsanityEvent();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Stops the currently playing insanity event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void InsanityEventIsActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether an insanity event is currently in effect… Or so it was supposed to be, but as it doesn't return a value, we can never know [http://wiki.frictionalgames.com/lib/images/smileys/icon_smile.gif?nolink&amp;amp;15x15]&lt;br /&gt;
&lt;br /&gt;
===Player===&lt;br /&gt;
&lt;br /&gt;
Note that the player's maximum health and sanity is 100.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerActive(bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enabled/Disable player controlled movement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ChangePlayerStateToNormal();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets certain effects back to normal. It can for example make the player drop an item.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerCrouching(bool abCrouch);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forces the player to crouch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pushes the player into a certain direction. Note that you need values above ~2000 to see any effects.&lt;br /&gt;
&lt;br /&gt;
''afX ''- amount along the X-axis &amp;lt;br /&amp;gt;''afY ''- amount along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- amount along the Z-axis &amp;lt;br /&amp;gt;''abUseLocalCoords ''- If true, axes are based on where the player is facing, not the world.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ShowPlayerCrossHairIcons(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the icons when a player has something in focus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerSanity(float afSanity);&lt;br /&gt;
void AddPlayerSanity(float afSanity);&lt;br /&gt;
float GetPlayerSanity();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the sanity of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerHealth(float afHealth);&lt;br /&gt;
void AddPlayerHealth(float afHealth);&lt;br /&gt;
float GetPlayerHealth();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the health of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerLampOil(float afOil);&lt;br /&gt;
void AddPlayerLampOil(float afOil);&lt;br /&gt;
float GetPlayerLampOil();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the lamp oil of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetPlayerSpeed();&lt;br /&gt;
float GetPlayerYSpeed();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the current speed of the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetSanityDrainDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables sanity drain from darkness, monsters, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveSanityBoost();&lt;br /&gt;
void GiveSanityBoostSmall();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Boosts the player's sanity by a fixed amount.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveSanityDamage(float afAmount, bool abUseEffect);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reduces the sanity of the player.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount of sanity damage done &amp;lt;br /&amp;gt;''abUseEffect ''- determines whether an effect is played when the sanity damage is dealt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GivePlayerDamage(float afAmount, string&amp;amp; asType, bool abSpinHead, bool abLethal);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reduces the health of the player.&lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount of damage done to health &amp;lt;br /&amp;gt;''asType ''- plays a certain effect on the screen when the damage is dealt (BloodSplat, Claws or Slash) &amp;lt;br /&amp;gt;''abSpinHead ''- changes the camera view when damage is dealt &amp;lt;br /&amp;gt;''abLethal ''- set to true if player can die from given damage&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerFOVMulTo(float afX, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the field of view of the player. A shorter FOV will create a zoom effect.&lt;br /&gt;
&lt;br /&gt;
''afX ''- multiplier of default FOV (1 is default) &amp;lt;br /&amp;gt;''afSpeed ''- the speed of change between FOV's&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerAspectMulTo(float afX, float afSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the aspect ratio of the player. Basically stretches or narrows the screen horizontally.&lt;br /&gt;
&lt;br /&gt;
''afX ''- multiplier of default aspect (default is 1) &amp;lt;br /&amp;gt;''afSpeed ''- the speed of change between FOV's&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rotates the position of the camera on the player's body.&lt;br /&gt;
&lt;br /&gt;
''afX ''- angle of rotation of head, positive being counter-clockwise &amp;lt;br /&amp;gt;''afSpeedMul ''- speed (possibly acceleration) multiplier of the rotation (default 1, which is really slow) &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed of rotation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the position of the camera on the player's body.&lt;br /&gt;
&lt;br /&gt;
''afX ''- amount along the X-axis &amp;lt;br /&amp;gt;''afY ''- amount along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- amount along the Z-axis &amp;lt;br /&amp;gt;''afSpeed ''- speed at which the change happens &amp;lt;br /&amp;gt;''afSlowDownDist ''- distance at which to start slowing down (prevents the head from abruptly stopping)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void StartPlayerLookAt(string&amp;amp; asEntityName, float afSpeedMul, float afMaxSpeed, string&amp;amp; asAtTargetCallback);&lt;br /&gt;
void StopPlayerLookAt();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forces the player to look at a certain entity until StopPlayerLookAt is used.&lt;br /&gt;
&lt;br /&gt;
''asEntityName ''- the entity to look at &amp;lt;br /&amp;gt;''afSpeedMul ''- how fast should the player look at the entity &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed allowed &amp;lt;br /&amp;gt;''asAtTargetCallback ''- function to call when player looks at target&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerMoveSpeedMul(float afMul);&lt;br /&gt;
void SetPlayerRunSpeedMul(float afMul);&lt;br /&gt;
void SetPlayerLookSpeedMul(float afMul);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the player's move/run/look speed. Default is 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerJumpForceMul(float afMul);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Changes the player's jump multiplier. Higher values = higher jumps. Default is 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerJumpDisabled(bool abX);&lt;br /&gt;
void SetPlayerCrouchDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the player's ability to jump/crouch.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportPlayer(string&amp;amp; asStartPosName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instantly teleports the player to the target StartPos.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternActive(bool abX, bool abUseEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the player use his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool GetLanternActive();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the player currently uses his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables/Disables the player's ability to use his lantern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetLanternLitCallback(string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the function to call when the player uses his lantern. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;MyFunc(bool abLit)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetMessage(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a message on the screen.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTime ''- determines how long the message is displayed. If time is &amp;lt; =0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetDeathHint(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the message that appears when the player dies.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void DisableDeathStartSound();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables the death sound when the player dies. This must be called directly before player is killed! The variable as soon as player dies too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
void MovePlayerForward(float afAmount)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;REQUIRES THE 1.2 PATCH: JUSTINE&amp;quot; Moves the player forward. It needs to be called in a timer that updates 60 times / second.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerFallDamageDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables the player's ability to take fall damage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetPlayerPos(float afX, float afY, float afZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Sets the player's position within the level.&lt;br /&gt;
&lt;br /&gt;
''afX''  - X co-ordinate position. &amp;lt;br /&amp;gt;''afY''  - Y co-ordinate position. &amp;lt;br /&amp;gt;''afZ''  - Z co-ordinate position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
float GetPlayerPosX();&lt;br /&gt;
float GetPlayerPosY();&lt;br /&gt;
float GetPlayerPosZ();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the player's position within the level on the specified axis.&lt;br /&gt;
&lt;br /&gt;
===Journal===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddNote(string&amp;amp; asNameAndTextEntry, string&amp;amp; asImage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a note to the player's journal.&lt;br /&gt;
&lt;br /&gt;
''asNameAndTextEntry ''- entries in the .lang file. Must end with _Name and _Text and be in category &amp;quot;Journal&amp;quot;! &amp;lt;br /&amp;gt;''asImage ''- the background image to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddDiary(string&amp;amp; asNameAndTextEntry, string&amp;amp; asImage);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a diary to the player's journal.&lt;br /&gt;
&lt;br /&gt;
''asNameAndTextEntry ''- entries in the .lang file. Must end with _NameX and _TextY whereas X and Y are numbers of the parts (_Name1: first diary, _Text1: first page) and be in category &amp;quot;Journal&amp;quot;! &amp;lt;br /&amp;gt;''asImage ''- the background image to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ReturnOpenJournal(bool abOpenJournal);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only called in the pickup diary callback! If true the journal displays the entry else not.&lt;br /&gt;
&lt;br /&gt;
===Quests===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddQuest(string&amp;amp; asName, string&amp;amp; asNameAndTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a quest to the player's journal under mementos.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name to be used &amp;lt;br /&amp;gt;''asNameAndTextEntry ''- entry in the .lang file. Must start with &amp;quot;Quest_&amp;lt;texthere&amp;gt;_Text”, and be in category “Journal”!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void CompleteQuest(string&amp;amp; asName, string&amp;amp; asNameAndTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Completes a quest.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name of the quest &amp;lt;br /&amp;gt;''asNameAndTextEntry ''- entry in the .lang file. Must start with &amp;quot; Quest_&amp;lt;texthere&amp;gt;_Text ”, and be in category “Journal”!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool QuestIsCompleted(string&amp;amp; asName);&lt;br /&gt;
bool QuestIsAdded(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a quest is completed/added.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetNumberOfQuestsInMap(int alNumberOfQuests);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the number of quests in the map.&lt;br /&gt;
&lt;br /&gt;
''alNumberOfQuests ''- Amount of Quests&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveHint(string&amp;amp; asName, string&amp;amp; asMessageCat, string&amp;amp; asMessageEntry, float afTimeShown);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a hint on the player's screen.&lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name &amp;lt;br /&amp;gt;''asMessageCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asMessageEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTimeShown ''- time in seconds until the message disappears. If time is &amp;lt;= 0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void BlockHint(string&amp;amp; asName);&lt;br /&gt;
void UnBlockHint(string&amp;amp; asName);&lt;br /&gt;
void RemoveHint(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Blocking a hint prevents it from being shown.&lt;br /&gt;
&amp;quot;Removing&amp;quot; a hint actually removes it from the list of already given hints, thus allowing it to show up again. &lt;br /&gt;
&lt;br /&gt;
''asName ''- the internal name. Basic game hints use the same name as their respective lang entries, with the exception of &amp;quot;numbered&amp;quot; hints. For example, &amp;lt;code&amp;gt;EntityGrab&amp;lt;/code&amp;gt; blocks the &amp;lt;code&amp;gt;EntityGrab01&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EntityGrab02&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
&lt;br /&gt;
===Inventory===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void ExitInventory();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exits the inventory by force.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInventoryDisabled(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables the player's ability to open his inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void SetInventoryMessage(string&amp;amp; asTextCategory, string&amp;amp; asTextEntry, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a message at the bottom of the inventory screen.&lt;br /&gt;
&lt;br /&gt;
''asTextCategory ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file &amp;lt;br /&amp;gt;''afTime ''- time in seconds until the message disappears. If life time is &amp;lt;= 0 then the life time is calculated based on string length.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveItem(string&amp;amp; asName, string&amp;amp; asType, string&amp;amp; asSubTypeName, string&amp;amp; asImageName, float afAmount);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds an item to the inventory of the player. Note that the item does not have to exist as entity in the world to be able to do this.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asType ''- item type to give, Available types are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Puzzle&lt;br /&gt;
*Lantern&lt;br /&gt;
*Health&lt;br /&gt;
*Sanity&lt;br /&gt;
*LampOil&lt;br /&gt;
*Tinderbox&lt;br /&gt;
&lt;br /&gt;
''asSubTypeName ''- item name for .lang file &amp;lt;br /&amp;gt;''asImageName ''- the image which will appear in inventory. For example: &amp;lt;code&amp;gt;void GiveItem(&amp;quot;chemical_container_full_1&amp;quot;, &amp;quot;Puzzle&amp;quot;, &amp;quot;chemical_container_full&amp;quot;, &amp;quot;chemical_container_full.tga&amp;quot;, 1);&amp;lt;/code&amp;gt; will use the image from &amp;lt;code&amp;gt;graphics/item/chemical_container_full.tga&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
''afAmount ''- amount the item gives, - For example: Oil potions will fill the oil meter by this amount, Health potions will heal by this amount, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveItem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an item from the player's inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool HasItem(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether the player has an item in his inventory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void GiveItemFromFile(string&amp;amp; asName, string&amp;amp; asFileName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a single item to the player's inventory. This is meant to be used for debug mostly as it creates the actual item and then destroys it.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asFileName ''- item to give + extension (.ent)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddCombineCallback(string&amp;amp; asName, string&amp;amp; asItemA, string&amp;amp; asItemB, string&amp;amp; asFunction, bool abAutoRemove);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to combine items in his inventory. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asItemA, string &amp;amp;in asItemB)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name for the callback &amp;lt;br /&amp;gt;''asItemA ''- internal name of first item &amp;lt;br /&amp;gt;''asItemB ''- internal name of second item &amp;lt;br /&amp;gt;''asFunction ''- the function to call &amp;lt;br /&amp;gt;''abAutoRemove ''- determines whether the callback should be removed when the items are combined&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveCombineCallback(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes a combine callback. &amp;lt;br /&amp;gt;''asName''  - the internal name of the callback to be removed (as specified in AddCombineCallback)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void AddUseItemCallback(string&amp;amp; asName, string&amp;amp; asItem, string&amp;amp; asEntity, string&amp;amp; asFunction, bool abAutoDestroy);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to use items on the world. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asItem, string &amp;amp;in asEntity)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asItem ''- internal name of the item &amp;lt;br /&amp;gt;''asEntity ''- entity to be able to use the item on &amp;lt;br /&amp;gt;''asFunction ''- function to call &amp;lt;br /&amp;gt;''abAutoDestroy ''- determines whether the item is destroyed when used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveUseItemCallback(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an item callback.&lt;br /&gt;
&lt;br /&gt;
===Entities===&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityActive(string&amp;amp; asName, bool abActive);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates an entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityVisible(string &amp;amp;in asName, bool abVisible);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates an entity's visual mesh. The collision body remains.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity. &amp;lt;br /&amp;gt;''abActive''  - Activate/deactivate mesh.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEntityExists(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether an entity exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityCustomFocusCrossHair(string&amp;amp; asName, string&amp;amp; asCrossHair);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes the crosshair that is used when focusing an entity.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCrossHair ''- desired crosshair, can be: Default (uses default), Grab, Push, Ignite, Pick, LevelDoor, Ladder&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void CreateEntityAtArea(string&amp;amp; asEntityName, string&amp;amp; asEntityFile, string&amp;amp; asAreaName, bool abFullGameSave);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Creates an entity at an area. When creating an enemy though, it cannot chase properly along PathNodes(using for example ShowEnemyPlayerPosition).&lt;br /&gt;
&lt;br /&gt;
''asEntityName ''- internal name &amp;lt;br /&amp;gt;''asEntityFile ''- entity to be used extension .ent &amp;lt;br /&amp;gt;''asAreaName ''- the area to create the entity at &amp;lt;br /&amp;gt;''abFullGameSave ''- determines whether an entity &amp;quot;remembers&amp;quot; its state&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ReplaceEntity(string &amp;amp;in asName, string &amp;amp;in asBodyName, string &amp;amp;in asNewEntityName, string &amp;amp;in asNewEntityFile, bool abFullGameSave);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Removes an entity and places a new one in its place.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to replace. &amp;lt;br /&amp;gt;''asBodyName''  - Name of the body of the entity to place the new entity at. If empty the first body is used (might be buggy, recommended to name a body anyway). &amp;lt;br /&amp;gt;''asNewEntityName''  - Name of the new entity. &amp;lt;br /&amp;gt;''asNewEntityFile''  - Name of the new entity file. Extension .ent. &amp;lt;br /&amp;gt;''abFullGameSave''  - Whether ALL properties of this entity should be saved throughout levels.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
void PlaceEntityAtEntity(string &amp;amp;in asName, string &amp;amp;in asTargetEntity, string &amp;amp;in asTargetBodyName, bool abUseRotation);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Places an entity at the position of another entity. Does not work for enemies, use TeleportEnemyToEntity instead.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to place. &amp;lt;br /&amp;gt;''asTargetEntity''  - Name of the other entity to place the first entity at. &amp;lt;br /&amp;gt;''asTargetBodyName''  - Name of the body of the entity to place the first entity at. If empty the first body is used (might be buggy, recommended to name a body anyway). &amp;lt;br /&amp;gt;''abUseRotation''  - Whether the entity should be rotated like the target entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPos(string &amp;amp;in asName, float afX, float afY, float afZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Moves an entity to a position in the level.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity to move. &amp;lt;br /&amp;gt;''afX''  - X co-ordinate position. &amp;lt;br /&amp;gt;''afY''  - Y co-ordinate position. &amp;lt;br /&amp;gt;''afZ''  - Z co-ordinate position.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
float GetEntityPosX(string &amp;amp;in asName);&lt;br /&gt;
float GetEntityPosY(string &amp;amp;in asName);&lt;br /&gt;
float GetEntityPosZ(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns an entity's position in the level on the specified axis.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPlayerLookAtCallback(string&amp;amp; asName, string&amp;amp; asCallback, bool abRemoveWhenLookedAt);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player looks at a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: 1 = looking, -1 = not looking&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCallback ''- function to call &amp;lt;br /&amp;gt;''abRemoveWhenLookedAt ''- determines whether the callback should be removed when the player looked at the entity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityPlayerInteractCallback(string&amp;amp; asName, string&amp;amp; asCallback, bool abRemoveOnInteraction);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player interacts with a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asCallback ''- function to call &amp;lt;br /&amp;gt;''abRemoveOnInteraction ''- determines whether the callback should be removed when the player interacts with the entity&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityCallbackFunc(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when the player interacts with a certain entity. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, string &amp;amp;in type)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;Type depends on entity type and includes: &amp;quot;OnPickup&amp;quot;, &amp;quot;Break&amp;quot;, &amp;quot;OnIgnite&amp;quot;, etc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityConnectionStateChangeCallback(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A callback called when ever the connection state changes (button being switched on, lever switched, etc). &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void Func(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: -1 = off, 0 = between, 1 = on&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetEntityInteractionDisabled(string&amp;amp; asName, bool abDisabled);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disallows interaction with an entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BreakJoint (string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Breaks a joint. Do not use this on joints in SwingDoors, Levers, Wheels, etc. where the joint is part of an interaction. That will make the game crash.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void AddEntityCollideCallback(string&amp;amp; asParentName, string&amp;amp; asChildName, string&amp;amp; asFunction, bool abDeleteOnCollide, int alStates);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when two entites collide. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asParent, string &amp;amp;in asChild, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;alState: 1 = enter, -1 = leave&lt;br /&gt;
&lt;br /&gt;
''asParentName ''- internal name of main object &amp;lt;br /&amp;gt;''asChildName ''- internal name of object that collides with main object (asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) NOT supported!) &amp;lt;br /&amp;gt;''asFunction ''- function to call &amp;lt;br /&amp;gt;''abDeleteOnCollide ''- determines whether the callback after it was called &amp;lt;br /&amp;gt;''alStates ''- 1 = only enter, -1 = only leave, 0 = both&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveEntityCollideCallback(string&amp;amp; asParentName, string&amp;amp; asChildName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Removes an EntityCollideCallback. Asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) not supported in ''asChildName''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetEntitiesCollide(string&amp;amp; asEntityA, string&amp;amp; asEntityB);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether two entites collide. This function does NOT support asterix (&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;) or &amp;quot;Player&amp;quot;!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetBodyMass(string &amp;amp;in asName, float afMass);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Sets the mass of an entity's body.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the body of an entity. The body name of an entity is EntityName_BodyName. &amp;lt;br /&amp;gt;''afMass''  - The mass to set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
float GetBodyMass(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Gets the mass of an entity's body.&lt;br /&gt;
&lt;br /&gt;
''asName''  - Name of the body of an entity. The body name of an entity is EntityName_BodyName. &amp;lt;br /&amp;gt;''afMass''  - The mass to get.&lt;br /&gt;
&lt;br /&gt;
====Props====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropEffectActive(string&amp;amp; asName, bool abActive, bool abFadeAndPlaySounds);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Can be used on coal to give it the black color it should have.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropActiveAndFade(string&amp;amp; asName, bool abActive, float afFadeTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates a prop.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''abActive ''- nothing to add &amp;lt;br /&amp;gt;''afFadeTime ''- time in seconds until prop fully fades&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropStaticPhysics(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates/deactivates the physics of a prop. Setting as true will make entities static in midair.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool GetPropIsInteractedWith(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a prop is interacted with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void RotatePropToSpeed(string&amp;amp; asName, float afAcc, float afGoalSpeed, float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed, string&amp;amp; asOffsetArea);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rotates the prop up to a set speed.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afAcc ''- acceleration &amp;lt;br /&amp;gt;''afGoalSpeed ''- desired speed &amp;lt;br /&amp;gt;''afAxisX ''- rotation around X axis &amp;lt;br /&amp;gt;''afAxisY ''- rotation around Y axis &amp;lt;br /&amp;gt;''afAxisZ ''- rotation around Z axis &amp;lt;br /&amp;gt;''abResetSpeed ''- determines whether the speed is resetted after goal speed is reached &amp;lt;br /&amp;gt;''asOffsetArea ''- the area to rotate around, if empty, then the center of the body is used Note: The entity you want to rotate MUST be a &amp;quot;StaticObject&amp;quot; entity!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void StopPropMovement(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stops all movement of a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddAttachedPropToProp(string&amp;amp; asPropName, string&amp;amp; asAttachName, string&amp;amp; asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attaches a prop to another prop.&lt;br /&gt;
&lt;br /&gt;
a''sPropName''- the prop to attach another prop at &amp;lt;br /&amp;gt;''asAttachName ''- internal name of the prop that gets attached &amp;lt;br /&amp;gt;''asAttachFile ''- the prop that gets attached extension .ent &amp;lt;br /&amp;gt;''afPosX ''- X position of the attach from the prop &amp;lt;br /&amp;gt;''afPosY ''- Y position of the attach from the prop &amp;lt;br /&amp;gt;''afPosZ ''- Z position of the attach from the prop &amp;lt;br /&amp;gt;''afRotX ''- rotation around X axis of the attach &amp;lt;br /&amp;gt;''afRotY ''- rotation around Y axis of the attach &amp;lt;br /&amp;gt;''afRotZ ''- rotation around ZX axis of the attach Note: for the purposes of &amp;quot;AddEntityCollideCallback&amp;quot;, attached props will not call the callback function if they collide with a &amp;quot;static_object&amp;quot; or a &amp;quot;StaticProp&amp;quot; entity type!&lt;br /&gt;
&lt;br /&gt;
{{bug|''afRotZ '' is used for both the ZX rotation and the Z position of the attached prop. Unwanted rotation can be avoided by using: &amp;lt;br /&amp;gt;''AddAttachedPropToProp(asPropName, asAttachName, asAttachFile, afPosX, afPosY, '''0''', afPosZ, '''90.0f''', afPosZ)''}}&lt;br /&gt;
&lt;br /&gt;
{{bug|Attaching a breakable prop to a physically active prop, and then breaking the attached prop, will cause the game to crash, should the parent object be moved or reset.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AttachPropToProp(string&amp;amp; asPropName, string&amp;amp; asAttachName, string&amp;amp; asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Attaches a prop to another prop. Fixed version of AddAttachedPropToProp.&lt;br /&gt;
&lt;br /&gt;
''asPropName ''- the prop to attach another prop at &amp;lt;br /&amp;gt;''asAttachName ''- internal name of the prop that gets attached &amp;lt;br /&amp;gt;''asAttachFile ''- the prop that gets attached extension .ent &amp;lt;br /&amp;gt;''afPosX ''- X position of the attach from the prop &amp;lt;br /&amp;gt;''afPosY ''- Y position of the attach from the prop &amp;lt;br /&amp;gt;''afPosZ ''- Z position of the attach from the prop &amp;lt;br /&amp;gt;''afRotX ''- rotation around X axis of the attach &amp;lt;br /&amp;gt;''afRotY ''- rotation around Y axis of the attach &amp;lt;br /&amp;gt;''afRotZ ''- rotation around ZX axis of the attach Note: for the purposes of &amp;quot;AddEntityCollideCallback&amp;quot;, attached props will not call the callback function if they collide with a &amp;quot;static_object&amp;quot; or a &amp;quot;StaticProp&amp;quot; entity type!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void RemoveAttachedPropFromProp(string&amp;amp; asPropName, string&amp;amp; asAttachName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detaches a prop from a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropHealth(string&amp;amp; asName, float afHealth);&lt;br /&gt;
void AddPropHealth(string&amp;amp; asName, float afHealth);&lt;br /&gt;
float GetPropHealth(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifies/returns the health of a prop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ResetProp(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resets a prop's state to the original one when the map was loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void PlayPropAnimation(string&amp;amp; asProp, string&amp;amp; asAnimation, float afFadeTime, bool abLoop, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the prop play an animation and calls a function. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asProp)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''asProp ''- internal name of the prop &amp;lt;br /&amp;gt;''asAnimation ''- animation to play &amp;lt;br /&amp;gt;''afFadeTime ''- ? &amp;lt;br /&amp;gt;''abLoop ''- determines whether the animation loops &amp;lt;br /&amp;gt;''asCallback ''- function to call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddPropForce(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddPropImpulse(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddBodyForce(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
void AddBodyImpulse(string&amp;amp; asName, float afX, float afY, float afZ, string&amp;amp; asCoordSystem);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions push objects. Note that rather high values are needed when applying ''forces''  (on the order of ~100 (weak) to ~10000 (strong)), but not impulses (values less than 10 can be appropriate). Forces are external influences, and will have different effect depending on the mass of the object they are being applied to; impulses disregard mass, and can cause objects to break, as if hit. A &amp;quot;Body&amp;quot; is a physics-related helper object, to which a force or an impulse can be applied. Entities can consist of several bodies, interconnected in various ways (you can create/examine bodies in the model editor).&lt;br /&gt;
&lt;br /&gt;
''asName ''- the object to push; for bodies, use this format: &amp;quot;''entityName''_''bodyName''&amp;quot; &amp;lt;br /&amp;gt;''afX ''- magnitude along the X-axis &amp;lt;br /&amp;gt;''afY ''- magnitude along the Y-axis &amp;lt;br /&amp;gt;''afZ ''- magnitude along the Z-axis &amp;lt;br /&amp;gt;''asCoordSystem ''- determines which coordinate system is used, usually &amp;quot;world&amp;quot; All of these functions are ''additive''  - when called consecutively, for each call, the vectors defined by (afX, afY, afZ) will be added together, and a resultant force/impulse will be calculated ''before''  any physics simulation is applied to the target object.&lt;br /&gt;
&lt;br /&gt;
====Connections====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void InteractConnectPropWithRope(string&amp;amp; asName, string&amp;amp; asPropName, string&amp;amp; asRopeName, bool abInteractOnly, float afSpeedMul, float afToMinSpeed, float afToMaxSpeed, bool abInvert, int alStatesUsed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connects a prop with the movement of a rope (ie. turn wheel to move rope).&lt;br /&gt;
&lt;br /&gt;
''asName ''- connection name &amp;lt;br /&amp;gt;''asPropName ''- name of prop &amp;lt;br /&amp;gt;''asRopeName ''- name of rope &amp;lt;br /&amp;gt;''abInteractOnly ''- ? &amp;lt;br /&amp;gt;''afSpeedMul ''- speed multiplier of how quickly the rope moves &amp;lt;br /&amp;gt;''afToMinSpeed ''- the slowest the rope will move when moving the prop &amp;lt;br /&amp;gt;''afToMaxSpeed ''- the fastest the rope will move when moving the prop &amp;lt;br /&amp;gt;''abInvert ''- whether to invert the direction the rope moves &amp;lt;br /&amp;gt;''alStatesUsed ''- which states of the prop can interact with the rope?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void InteractConnectPropWithMoveObject(string&amp;amp; asName, string&amp;amp; asPropName, string&amp;amp; asMoveObjectName, bool abInteractOnly, bool abInvert, int alStatesUsed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This one should only be used if there must be an exact correspondance to prope &amp;quot;amount&amp;quot; and the moveobject open amount. It is best used for Wheel-door connections!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ConnectEntities(string&amp;amp; asName, string&amp;amp; asMainEntity, string&amp;amp; asConnectEntity, bool abInvertStateSent, int alStatesUsed, string&amp;amp; asCallbackFunc);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asConnectionName, string &amp;amp;in asMainEntity, string &amp;amp;in asConnectEntity, int alState)&amp;lt;/code&amp;gt;  &amp;lt;br /&amp;gt;State is what is sent to connection entity and will be inverted if abInvertStateSent = true!&lt;br /&gt;
&lt;br /&gt;
====Lamps====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLampLit(string&amp;amp; asName, bool abLit, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Un)lits a lamp.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Name of the lamp &amp;lt;br /&amp;gt;''abLit ''- Set true if you want the lamp to be lit, set to false if you want the lamp to be unlit &amp;lt;br /&amp;gt;''abEffects ''- If you want to have the lamp fade in/out when it gets (un)lit&lt;br /&gt;
&lt;br /&gt;
====Doors====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetSwingDoorLocked(string&amp;amp; asName, bool abLocked, bool abEffects);&lt;br /&gt;
void SetSwingDoorClosed(string&amp;amp; asName, bool abClosed, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Locks/closes a swing door.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
bool GetSwingDoorLocked(string&amp;amp; asName);&lt;br /&gt;
bool GetSwingDoorClosed(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks whether a swing door is locked/closed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetSwingDoorDisableAutoClose(string&amp;amp; asName, bool abDisableAutoClose);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Deactivates the &amp;quot;auto-close&amp;quot; when a door is nearly closed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
int GetSwingDoorState(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns an integer depending on how far the door is opened. &amp;lt;br /&amp;gt;-1 = angle is close to 0°, 1 = angle is 70% or higher of max, 0 = inbetween -1 and 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLocked(string&amp;amp; asName, bool abLocked);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Locks a level door. Note that level doors are NOT swing doors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLockedSound(string&amp;amp; asName, string&amp;amp; asSound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Determines which sound is played when interacting with a locked level door.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetLevelDoorLockedText(string&amp;amp; asName, string&amp;amp; asTextCat, string&amp;amp; asTextEntry);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays a message when interacting with a locked level door.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''asTextCat ''- the category in the .lang file &amp;lt;br /&amp;gt;''asTextEntry ''- the entry in the .lang file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMoveObjectState(string&amp;amp; asName, float afState);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves an object to a certain state.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afState ''- state of the object, 0 = closed, 1 = open, values inbetween (and above, for example, the bridge_metal_vert) are valid too!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMoveObjectStateExt(string&amp;amp; asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist, bool abResetSpeed);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves an object to a certain state, extended method.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afState ''- state of the object, 0 = closed, 1 = open, values inbetween are valid too! &amp;lt;br /&amp;gt;''afAcc ''- acceleration &amp;lt;br /&amp;gt;''afMaxSpeed ''- maximum speed &amp;lt;br /&amp;gt;''afSlowdownDist ''- Distance to the target state before decceleration occurs. &amp;lt;br /&amp;gt;''abResetSpeed ''- Set to True if the prop's speed should be reset before performing the movement, else the prop will accelerate from it's current speed to afMaxSpeed.&lt;br /&gt;
&lt;br /&gt;
====Levers, wheels and buttons====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetPropObjectStuckState(string&amp;amp; asName, int alState);&lt;br /&gt;
void SetWheelStuckState(string&amp;amp; asName, int alState, bool abEffects);&lt;br /&gt;
void SetLeverStuckState(string&amp;amp; asName, int alState, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes a prop&amp;lt;nowiki&amp;gt;\&amp;lt;/nowiki&amp;gt;wheel&amp;lt;nowiki&amp;gt;\&amp;lt;/nowiki&amp;gt;lever stuck in a certain state.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''alState ''- 0 = not stuck, 1 = at max, -1 = at min &amp;lt;br /&amp;gt;''abEffects ''- use effects&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetWheelAngle(string&amp;amp; asName, float afAngle, bool abAutoMove);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Moves a wheel to a certain angle.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name &amp;lt;br /&amp;gt;''afAngle ''- angle &amp;lt;br /&amp;gt;''abAutoMove ''- determines whether the wheel should move on its own&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetWheelInteractionDisablesStuck(string&amp;amp; asName, bool abX);&lt;br /&gt;
void SetLeverInteractionDisablesStuck(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows the player to make a wheel/lever unstuck when interacted with.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
int GetLeverState(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns the state of the lever. &amp;lt;br /&amp;gt;0 = not stuck, 1 = at max, -1 = at min&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMultiSliderStuckState(string&amp;amp; asName, int alStuckState, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes a MultiSlider stuck in a certain state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetMultiSliderCallback(string&amp;amp; asName, string&amp;amp; asCallback);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calls a function when state changes. &amp;lt;br /&amp;gt;Callback syntax: &amp;lt;code&amp;gt;void MyFunc(string &amp;amp;in asEntity, int alState)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetButtonSwitchedOn(string&amp;amp; asName, bool abSwitchedOn, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Sticky areas====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetAllowStickyAreaAttachment(bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Allows entites to stick to a StickyArea.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AttachPropToStickyArea(string&amp;amp; asAreaName, string&amp;amp; asProp);&lt;br /&gt;
void AttachBodyToStickyArea(string&amp;amp; asAreaName, string&amp;amp; asBody);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attaches a prop/body to a StickyArea.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void DetachFromStickyArea(string&amp;amp; asAreaName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detaches everything from a StickyArea.&lt;br /&gt;
&lt;br /&gt;
====Enemies====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetNPCAwake(string&amp;amp; asName, bool abAwake, bool abEffects);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activates the npc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetNPCFollowPlayer(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets an NPC's head to follow the player's movement's.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyDisabled(string&amp;amp; asName, bool abDisabled);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disables an enemy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyIsHallucination(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes an enemy a hallucination. Hallucinations fade to smoke when they get near the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void FadeEnemyToSmoke(string&amp;amp; asName, bool abPlaySound);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instantly fades an enemy to smoke.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ShowEnemyPlayerPosition(string&amp;amp; asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Makes the enemy run to the player, no matter where he is.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AlertEnemyOfPlayerPresence(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Gives the specified enemy the player's current position and makes it search the area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemyDisableTriggers(string&amp;amp; asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enables or disables enemy triggers. If disabled, enemy will not react to player or attack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void AddEnemyPatrolNode(string&amp;amp; asName, string&amp;amp; asNodeName, float afWaitTime, string&amp;amp; asAnimation);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adds a patrol node to the enemy's path.&lt;br /&gt;
&lt;br /&gt;
''asName ''- internal name of the enemy &amp;lt;br /&amp;gt;''asNodeName ''- path node &amp;lt;br /&amp;gt;''afWaitTime ''- time in seconds that the enemy waits at the path node before continuing &amp;lt;br /&amp;gt;''asAnimation ''- the animation the enemy uses when reaching the path node&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void ClearEnemyPatrolNodes(string&amp;amp; asEnemyName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clears the current path of patrol nodes of the enemy.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetEnemySanityDecreaseActive(string &amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether an enemy activates the player's sanity drain when stared at.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX ''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportEnemyToNode(string &amp;amp;in asEnemyName, string &amp;amp;in asNodeName, bool abChangeY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Teleports an enemy to a specific PathNode.&lt;br /&gt;
&lt;br /&gt;
''asEnemyName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asNodeName ''- Internal name of the node to teleport to &amp;lt;br /&amp;gt;''abChangeY ''- Whether the Y position of the node will be used when teleporting the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void TeleportEnemyToEntity(string &amp;amp;in asEnemyName, string &amp;amp;in asTargetEntity, string &amp;amp;in asTargetBody, bool abChangeY);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Teleports an enemy to a specific entity.&lt;br /&gt;
&lt;br /&gt;
''asEnemyName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asTargetEntity ''- Internal name of the entity to teleport to &amp;lt;br /&amp;gt;''asTargetBody''- Internal name of the entity's body name to teleport to. If empty, the first body will be used (might be unstable, recommended to input a body anyway) &amp;lt;br /&amp;gt;''abChangeY ''- Whether the Y position of the node will be used when teleporting the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ChangeManPigPose(string&amp;amp;in asName, string&amp;amp;in asPoseType);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Changes the pose a specified ManPig.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''asPoseType''- Name of the ManPig pose to use. Can be &amp;quot;Biped&amp;quot; or &amp;quot;Quadruped&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigFadeDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should fade the player's view in and out.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigSoundDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should play the proximity sounds.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void SetTeslaPigEasyEscapeDisabled(string&amp;amp;in asName, bool abX);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Enables/disables whether a specified TeslaPig should be easier to escape from when hunted.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy &amp;lt;br /&amp;gt;''abX''- Enabled/disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void ForceTeslaPigSighting(string&amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Forces a TeslaPig to be visible for a short time.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
string&amp;amp; GetEnemyStateName(string &amp;amp;in asName);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ReqVer|1.3}}&lt;br /&gt;
&lt;br /&gt;
Returns the name of the state a specified enemy is current in. States can be Hunt, Search, Patrol, Wait, Alert, Investigate, Track and BreakDoor.&lt;br /&gt;
&lt;br /&gt;
''asName ''- Internal name of the enemy&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Tools/Level_Editor/Combine_Editmode&amp;diff=6452</id>
		<title>HPL2/Tools/Level Editor/Combine Editmode</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Tools/Level_Editor/Combine_Editmode&amp;diff=6452"/>
		<updated>2023-09-14T12:53:24Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: /* Testing */ remove a silly adjective&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Combine EditMode =&lt;br /&gt;
This mode is used to create combinations of static geometry (combos). &lt;br /&gt;
&lt;br /&gt;
{{warning|This feature is essentially useless - see the testing section. The following statement is kept for archival purposes.}}&lt;br /&gt;
&lt;br /&gt;
It is useful for optimising, as it creates groups of static geometry that will be loaded by the engine as a whole.&lt;br /&gt;
&lt;br /&gt;
[[File:combineeditmodewin.jpg|right]]&lt;br /&gt;
* '''Show all combos''': when enabled, all created combos will be displayed.&lt;br /&gt;
* '''Combinations''': this ComboBox is used to pick the currently edited combo.&lt;br /&gt;
* '''Add/Rem''' buttons: used to add a new combo / remove the currently edited combo.&lt;br /&gt;
* '''Add/Remove|Toggle''' checkboxes: this selects the way the current combo will be edited. Moving the mouse on the viewport will highlight geometry objects.&lt;br /&gt;
**'''Add''': will add geometry objects to the combo when clicking on them.&lt;br /&gt;
**'''Remove''': will remove geometry objects from the combo when clicking on them (and they were part of the combo).&lt;br /&gt;
**'''Toggle''': will switch clicked objects between added or not added.&lt;br /&gt;
* '''Color''': this determines the tint that the objects in a combo will display.&lt;br /&gt;
* '''Geometry objects list''': will display a list of all the object names added to the currently edited combo.&lt;br /&gt;
[[File:combine02.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Use cases==&lt;br /&gt;
Combos were used only in the following maps:&lt;br /&gt;
*02_entrance_hall.map&lt;br /&gt;
*20_sewer.map (the combo contains only a single object)&lt;br /&gt;
*22_torture_chancel.map&lt;br /&gt;
*27_torture_chancel_redux.map&lt;br /&gt;
Except for the sewer, all cases are the only combos in the entire map. They were used to combine big rooms.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
The feature was tested using the '''02_entrance_hall.map''' and '''22_torture_chancel.map''' maps. Tests were done on a laptop which runs the base game in about 24 FPS. Frame time statistics were measured using the MapViewer with and without the big combos.&lt;br /&gt;
&lt;br /&gt;
'''There was no improvement in performance.''' The only noticeable change was the number of objects loaded into the viewer (which decreased, most likely by the number of objects in the combo). &lt;br /&gt;
The maps' load times didn't seem to be affected either. Considering the hardware used to run these tests, if the feature really improved performance, it would have been at least noticeable. &lt;br /&gt;
&lt;br /&gt;
'''The conclusion of the test is that the feature is essentially useless - at least until proven otherwise.'''&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6451</id>
		<title>HPL2/Changelog</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6451"/>
		<updated>2023-09-14T12:49:39Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Elaborate on the cubemap fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:1.5 Update}}&lt;br /&gt;
&lt;br /&gt;
This article is about Amnesia: The Dark Descent's 2023 update.&lt;br /&gt;
&lt;br /&gt;
At the moment these changes are available only on a Steam beta release of the game.&lt;br /&gt;
&lt;br /&gt;
{{tip|On Steam, right click Amnesia &amp;gt; Properties... &amp;gt; Betas &amp;gt; Select &amp;quot;Public total conversion beta&amp;quot; in Beta participation. Be warned that this can overwrite community editors.}}&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&lt;br /&gt;
# Ability to provide a custom story with full conversion capabilities [[HPL2/custom_story_settings.cfg | by specifying InitCfgFile in custom_story_settings.cfg]]. In other words, Full Conversions can now be installed and launched like Custom Stories. This also means you will be able to convert your existing full conversion mods into &amp;quot;extended&amp;quot; custom stories, and upload them to the Steam Workshop.&lt;br /&gt;
# Fixed a crash caused by using more than 2&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt; (65,535) callbacks (the crash happened when changing levels and would usually be caused by overusing Timers)&lt;br /&gt;
# Added an option to [[HPL2/menu.cfg | menu.cfg]] to allow specifying colors for menu text&lt;br /&gt;
# Added an option to [[HPL2/main_init.cfg | main_init.cfg]] to specify how custom stories are loaded within a custom story (including if they show up at all)&lt;br /&gt;
# New scripting features (documentation [[HPL2/Engine_Scripts | here]]):&lt;br /&gt;
## Added new script function: ShowScreenImage&lt;br /&gt;
## Added new script callback: OnUpdate&lt;br /&gt;
## Added &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.hps&amp;lt;/code&amp;gt; files&lt;br /&gt;
# Fixed skybox cubemaps rendering incorrectly. This removes the need for players patching a dll manually.&lt;br /&gt;
# Misc fixes{{clarify}}&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2&amp;diff=6450</id>
		<title>HPL2</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2&amp;diff=6450"/>
		<updated>2023-09-14T12:45:46Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Add a link to the 1.5 update notes and small clean up&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;&lt;br /&gt;
'''Welcome to the HPL2 documentation hub.'''&amp;lt;br&amp;gt;Here you can find extensive documentation about the engine and the games below, including downloads for various tools and tutorials on how to create your own [[HPL2/TDD/Modding|custom stories]].&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin:1em auto 0; text-align:center; width:400px;&amp;quot;&amp;gt;[[File:Hpl2 logo.png|250px|link=|HPL2]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin:1em;&amp;quot;&amp;gt;'''[[HPL2/Tools|Development Tools]] | [[HPL2/Troubleshooting|Troubleshooting]] | [https://wiki.frictionalgames.com/page/Special:PrefixIndex?prefix=HPL2%2F&amp;amp;namespace=0&amp;amp;hideredirects=1 All Pages]'''&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color: #4A554A; border: 1px solid #44dd44; padding: 12px;&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;[[File:Note icon.png|frameless|link=]]&lt;br /&gt;
[[HPL2/1.5_Update | Notes about the 1.5 update]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:HPL2/TDD}}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color: #4a4a44; border: 1px solid #ffc400; padding: 12px;&amp;gt;&lt;br /&gt;
&amp;lt;span&amp;gt;[[File:Note icon.png|frameless|link=]]&lt;br /&gt;
Because The Dark Descent and A Machine for Pigs are quite similar, most of the documentation from TDD applies to MFP.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{:HPL2/AMFP}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Entry pages]]&lt;br /&gt;
[[Category:English]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC____NOEDITSECTION__&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6448</id>
		<title>HPL2/Changelog</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/Changelog&amp;diff=6448"/>
		<updated>2023-09-14T12:09:05Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:1.5 Update}}&lt;br /&gt;
&lt;br /&gt;
This article is about Amnesia: The Dark Descent's 2023 update.&lt;br /&gt;
&lt;br /&gt;
At the moment these changes are available only on a Steam beta release of the game.&lt;br /&gt;
&lt;br /&gt;
{{tip|On Steam, right click Amnesia &amp;gt; Properties... &amp;gt; Betas &amp;gt; Select &amp;quot;Public total conversion beta&amp;quot; in Beta participation. Be warned that this can overwrite community editors.}}&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&lt;br /&gt;
# Ability to provide a custom story with full conversion capabilities [[HPL2/custom_story_settings.cfg | by specifying InitCfgFile in custom_story_settings.cfg]]. In other words, Full Conversions can now be installed and launched like Custom Stories. This also means you will be able to convert your existing full conversion mods into &amp;quot;extended&amp;quot; custom stories, and upload them to the Steam Workshop.&lt;br /&gt;
# Fixed a crash caused by using more than 2&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt; (65,535) callbacks (the crash happened when changing levels and would usually be caused by overusing Timers)&lt;br /&gt;
# Added an option to [[HPL2/menu.cfg | menu.cfg]] to allow specifying colors for menu text&lt;br /&gt;
# Added an option to [[HPL2/main_init.cfg | main_init.cfg]] to specify how custom stories are loaded within a custom story (including if they show up at all)&lt;br /&gt;
# New scripting features (documentation [[HPL2/Engine_Scripts | here]]):&lt;br /&gt;
## Added new script function: ShowScreenImage&lt;br /&gt;
## Added new script callback: OnUpdate&lt;br /&gt;
## Added &amp;lt;code&amp;gt;#include&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;.hps&amp;lt;/code&amp;gt; files&lt;br /&gt;
# Fixed skybox cubemaps rendering incorrectly&lt;br /&gt;
# Misc fixes{{clarify}}&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL2/TDD/Creating_a_Custom_Story&amp;diff=6445</id>
		<title>HPL2/TDD/Creating a Custom Story</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL2/TDD/Creating_a_Custom_Story&amp;diff=6445"/>
		<updated>2023-09-14T11:41:03Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Add link to the config file article in the relevant place&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TocRight}}&lt;br /&gt;
Creating a working custom story is a relatively simple process. This page will explain what you need to set up to do so, but it will not go into how you create engaging content as that is a much more invested topic.&lt;br /&gt;
&lt;br /&gt;
To get started, browse to your Amnesia TDD installation directory. This is often called the ''Amnesia root directory'', and where it is located depends on the system and platform you are using. Here are some common locations:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Steam @ Windows&lt;br /&gt;
|&amp;lt;code&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\Amnesia The Dark Descent&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Retail @ Windows&lt;br /&gt;
|&amp;lt;code&amp;gt;C:\Program Files (x86)\Amnesia&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Steam @ Mac&lt;br /&gt;
|&amp;lt;code&amp;gt;~/Library/Application Support/Steam/steamapps/common/Amnesia The Dark Descent&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Setting up a custom story==&lt;br /&gt;
{{note|The simplest way of starting a Custom Story is downloading a [https://www.mediafire.com/file/m0yw9ro94yruzk6/Custom_Story.zip/file template]. The following tutorial will help with understanding what those files do.}}{{todo|Reupload the template to the wiki}}&lt;br /&gt;
&lt;br /&gt;
Depending on your version, you may have a folder called &amp;quot;redist&amp;quot; inside your root directory. If you do, you will be working from inside this folder. If you do not have the &amp;quot;redist&amp;quot; folder, you will be working from the root directory itself.&lt;br /&gt;
&lt;br /&gt;
#Navigate to &amp;lt;code&amp;gt;custom_stories/&amp;lt;/code&amp;gt;&lt;br /&gt;
#Create a new folder for your custom story. This folder can be named pretty much anything, for example &amp;quot;My First Story&amp;quot;.&lt;br /&gt;
#Enter your new folder and create a new plain text file named &amp;lt;code&amp;gt;custom_story_settings.cfg&amp;lt;/code&amp;gt;. Open this file in your favorite code editor and paste in the following XML configuration:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Main&lt;br /&gt;
	Name=&amp;quot;My First Story&amp;quot;&lt;br /&gt;
	Author=&amp;quot;Lovecraft Himself&amp;quot;&lt;br /&gt;
	ImgFile=&amp;quot;cool_bg.png&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	MapsFolder=&amp;quot;maps/&amp;quot;&lt;br /&gt;
	StartMap=&amp;quot;level_01.map&amp;quot;&lt;br /&gt;
	StartPos=&amp;quot;PlayerStartArea_1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	ExtraLangFilePrefix=&amp;quot;extra_&amp;quot;&lt;br /&gt;
	DefaultExtraLangFile=&amp;quot;english.lang&amp;quot;&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You can change any fields you like, for instance the name and author, but you may want to come back to this later. [[HPL2/custom_story_settings.cfg | See this article]] for a full explanation of this file and additional options that can be added.&lt;br /&gt;
[[File:Custom story empty example.png|alt=A bare minimum custom story configuration|thumb|A bare minimum custom story configuration]]&lt;br /&gt;
&lt;br /&gt;
#The next requirement before the story will appear in the game's menu is a valid map file. Open the level editor and create a simple room – or at the very least create a floor using the Plane tool, place down a Box Light to cover the area, and place a PlayerStart area. Save the map file into &amp;lt;code&amp;gt;custom_stories/My First Story/maps/level_01.map&amp;lt;/code&amp;gt;, or whatever matches the setup you've used. Don't forget to create the &amp;quot;maps&amp;quot; folder as it is written in your config file.&lt;br /&gt;
#At this point, if you launch Amnesia, your story should appear in the list of custom stories as seen in the image to the right. Feel free to test this to ensure everything works so far. If you click &amp;quot;Start&amp;quot; you should load into your level.&lt;br /&gt;
#Optional: Add the image file as specified by the &amp;lt;code&amp;gt;ImgFile&amp;lt;/code&amp;gt;attribute above. Match the name and extension and place the file next to your config, and it should render as the background image in the game menu.&lt;br /&gt;
&lt;br /&gt;
==Displaying text==&lt;br /&gt;
Now that you have a functional custom story, it's time to add some other essential files. In the image to the right you may notice it says &amp;quot;No description.&amp;quot; This is the fallback text that appears if you do not have a functional language file, so let's create that now.&lt;br /&gt;
&lt;br /&gt;
#Start by creating a new plain text file in your custom story folder named &amp;lt;code&amp;gt;extra_english.lang&amp;lt;/code&amp;gt;.&lt;br /&gt;
#Open the language file. This is another XML file that stores ALL text that will be displayed in your story. This includes things like descriptions, pop-up text, notes, item names, level names etc.  You can start by pasting in the following:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;LANGUAGE&amp;gt;&lt;br /&gt;
	&amp;lt;CATEGORY Name=&amp;quot;CustomStoryMain&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;Entry Name=&amp;quot;Description&amp;quot;&amp;gt;Hello, this is the description of my story.&amp;lt;/Entry&amp;gt;&lt;br /&gt;
	&amp;lt;/CATEGORY&amp;gt;&lt;br /&gt;
&amp;lt;/LANGUAGE&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;There are a few rules to keep in mind when it comes to this file:&lt;br /&gt;
##All text within this file is CASE SENSITIVE, meaning if you write &amp;quot;language&amp;quot; instead of &amp;quot;LANGUAGE&amp;quot; it will not work.&lt;br /&gt;
##The file MUST start with the opening &amp;lt;code&amp;gt;&amp;lt;LANGUAGE&amp;gt;&amp;lt;/code&amp;gt; tag and it MUST end with the closing &amp;lt;code&amp;gt;&amp;lt;/LANGUAGE&amp;gt;&amp;lt;/code&amp;gt; tag. This element should only occur once in the entire file.&lt;br /&gt;
##Inside the LANGUAGE element,  you can place as many CATEGORY elements as you wish, but ensure that every opening tag is always accompanied by a closing tag.&lt;br /&gt;
##Certain CATEGORY tags require a specific value in the &amp;quot;Name&amp;quot; attribute. For instance, the main menu description is required to be within a category named &amp;lt;code&amp;gt;CustomStoryMain&amp;lt;/code&amp;gt;.&lt;br /&gt;
##You can place as many Entry elements as you wish inside each CATEGORY element. The actual text that appears in the game will be written between the opening and closing tag for the Entry. Similarly to CATEGORY tags, certain Entry tags require specific values in their name attribute for the game to pick it up. In the above example, the description must have the name &amp;lt;code&amp;gt;Description&amp;lt;/code&amp;gt;.&lt;br /&gt;
##If any errors are encountered while the game parses this file, the entire file will fail to load and no custom text will appear in your story. You will know that it failed to load if you see &amp;quot;No description&amp;quot; in the game menu.&lt;br /&gt;
&lt;br /&gt;
==Moving on==&lt;br /&gt;
You have now set up the basic configuration for a custom story. What's left to do now is to create your levels using the level editor, create scripts for your levels using any code editor, and optionally add extra assets you wish to use to additional folders inside your custom story directory. These topics are very expansive and are not covered here, but you can follow the links below for more information on them.&lt;br /&gt;
&lt;br /&gt;
Your final results from following this guide should leave you with a custom story folder that has this structure:&amp;lt;pre&amp;gt;&lt;br /&gt;
 My First Story/&lt;br /&gt;
 |- maps/&lt;br /&gt;
 |  |- level_01.map&lt;br /&gt;
 |&lt;br /&gt;
 |- cool_bg.png&lt;br /&gt;
 |- custom_story_settings.cfg&lt;br /&gt;
 |- extra_english.lang&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[HPL2/custom story settings.cfg|Explanation of the custom_story_settings.cfg file]]&lt;br /&gt;
*[[HPL2/Tools/Level Editor|How to navigate the Level Editor]]&lt;br /&gt;
*[[HPL2/Tutorials/Level Design|Using the level editor to design maps]]&lt;br /&gt;
*[[HPL2/ScriptReference|Introduction to AngelScript and level scripting]]&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Making_a_Mod_-_Best_Practices&amp;diff=6306</id>
		<title>Making a Mod - Best Practices</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Making_a_Mod_-_Best_Practices&amp;diff=6306"/>
		<updated>2021-12-08T12:50:21Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: /* Online Presence */ minor&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{note|This article is long, but taking the time to read it might help you save a lot of time when making a mod.}}This article is designed to give modders things to keep in mind while creating their project. Remember that these are just guidelines intended to help you – you don't have to follow them, but they may teach you something useful.&lt;br /&gt;
==Starting Out==&lt;br /&gt;
&lt;br /&gt;
===Scoping Out Your Project===&lt;br /&gt;
In order to make sure your mod gets released, it is '''extremely''' important to make it under a manageable scope. This means that you must avoid being overly ambitious. Creating a project that is too massive will likely end up getting cancelled. Many modders may come up with interesting and big ideas that sound doable on paper, but later realize that it is a lot more work than first anticipated.&lt;br /&gt;
&lt;br /&gt;
The best way to combat this is to create a limited scope from the start. It is much better to be conservative and create a project that is smaller than what you think you can do. A small project is better than a cancelled project.&lt;br /&gt;
&lt;br /&gt;
If you would like to create a big project, it is best to first create a small one, which will give you an idea of how big you can go in the next project. Two small projects will teach you more than a single big one.&lt;br /&gt;
&lt;br /&gt;
{{tip|Don't plan your project with play time or the number of levels in mind. This will end up in having a lot of content left to make and no ideas for it. Instead, gather your gameplay ideas and design around that. It is easier to add onto a complete project than fill an unfinished one.}}&lt;br /&gt;
&lt;br /&gt;
And remember: quality over quantity. Players will enjoy a unique and well crafted mod even if it is short more than one that is artificially expanded just to be long. You will also have much more fun and satisfaction if you can finish a project before it bores you.&lt;br /&gt;
&lt;br /&gt;
===Collaboration===&lt;br /&gt;
&lt;br /&gt;
You will need to decide if you are going to work in a team or not. This will influence the scope of the project, so it is be done when starting a mod. A team can of course be brought on after working alone for some time, but that comes with additional challenges.&lt;br /&gt;
&lt;br /&gt;
Working on a mod alone is entirely possible, but working in a team will make it much more bearable. That said, do not assume working in a team is always easier than working alone; there are upsides and downsides. Having a team requires managing it and making sure work is actually getting done, which is a considerable challenge.&lt;br /&gt;
&lt;br /&gt;
{{Idea|If you are going to work in a team, '''make sure to create the mod idea together.''' An unfortunately popular phenomenon is people joining a team, getting a sneak-peek at the mod and losing interest. '''Creating the mod premise together can help keep the members invested.'''}}&lt;br /&gt;
&lt;br /&gt;
'''Remember, even having someone to only give you feedback is very helpful.''' Furthermore, participating in public discussions about modding can help you and others learn. This can be done in the modding channels on [https://discord.com/invite/frictionalgames the Frictional Games Discord server]. Share your work and ask questions!&lt;br /&gt;
&lt;br /&gt;
''Main article: [[Efficient_Teamwork | Efficient Teamwork]]''&lt;br /&gt;
&lt;br /&gt;
==Mod Design==&lt;br /&gt;
Ask yourself &amp;quot;Why should someone play my mod?&amp;quot;. It's a hard question, but if you can answer it well, your mod design has good potential. Think about what other mods are out there, and what they offer. Does your mod offer something new to the players? Is what you offer enough to interest players? Even if you cannot answer these questions, just thinking about it will probably help you come up with ideas.&lt;br /&gt;
&lt;br /&gt;
===Understand the Engine===&lt;br /&gt;
You should really read the documentation of the game you want to mod.&lt;br /&gt;
&lt;br /&gt;
By doing that,  you will learn two important things:&amp;lt;br&amp;gt;&lt;br /&gt;
What things you can do with the engine and how to do them so they work well. There will be multiple ways to achieve what you want, but sometimes only one will work without code problems, affecting the performance too much, and other risky stuff. Reading the documentation will also ensure you are not recreating something that is already in the engine and is much easier to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Switched the section order to flow more naturally--&amp;gt;&lt;br /&gt;
===Compete With Gameplay and Story===&lt;br /&gt;
Remember that most mods cannot compete on a complexity and scale level with commercial products. They were made by teams of artists and developers with years of experience. It can take years to make a mod that has 30% the amount of content that the base games have. Instead of making big mods with dozens of maps, try to come up with engaging gameplay and a story that will be shorter but effective.&lt;br /&gt;
&lt;br /&gt;
==Managing development==&lt;br /&gt;
When working on a mod, it is important to keep track of your and other's work, while making sure everyone knows what left to be done, what is already done and more. The following section provides tips, links to useful tools and guides which will help you to manage the project.&lt;br /&gt;
&lt;br /&gt;
'''Keep in mind these are very important even for one-person projects!''' Keeping track of work always gets one far - it helps you plan and remember things.&lt;br /&gt;
&lt;br /&gt;
===Setting up a Scrum Board=== &lt;br /&gt;
In short, a scrum board is a group of lists used for keeping track of the team's development progress. It is used for:&lt;br /&gt;
&lt;br /&gt;
*Creating tasks&lt;br /&gt;
*Assigning tasks&lt;br /&gt;
*Tracking what is already done&lt;br /&gt;
*Tracking what needs to be done&lt;br /&gt;
*Tracking what is being worked on&lt;br /&gt;
*Tracking bugs&lt;br /&gt;
&lt;br /&gt;
One of the free tools which provide that is [https://trello.com/guide Trello].&lt;br /&gt;
&lt;br /&gt;
===Version control===&lt;br /&gt;
There is nothing worse than not being able to track your work or recover older versions of your project. &lt;br /&gt;
&lt;br /&gt;
Systems such as [https://git-scm.com/ '''Git'''] help to keep track of changes and back them up. Whenever you ''commit'' your work, a snapshot of the work is saved. In case something goes wrong, you will be able to go back to any older commit. Commits are stored inside a ''repository''.&lt;br /&gt;
&lt;br /&gt;
'''One of the most important feature of Git is collaboration.''' Working on all sorts of files with multiple people will get messy very fast if you just send them back and forth. Git allows multiple people to work on the same project simultaneously, and (after setting up) requires only a few clicks to upload your work and update the work of others. It also helps you resolve any conflicts when multiple people edit the same file.&lt;br /&gt;
&lt;br /&gt;
'''Read more about [[Setting up an Online Repository]].'''&lt;br /&gt;
&lt;br /&gt;
==Online Presence==&lt;br /&gt;
You will most likely start sharing your creations before the mod is published. It is recommended to make sure you have something to show off before you create mod pages. Therefore, you should prepare a set of media to preview the mod, as well as coming up with an intriguing description to catch the eye. All of these should make you stay relevant for some amount of time at the very least.&lt;br /&gt;
&lt;br /&gt;
You will receive feedback and criticism from other users or from your own team about your work. It's important to accept and learn from them, instead of denying, attacking or ignoring such feedback. You grow all the time during development, and your mod's success will be affected by how you react to feedback and criticism. &lt;br /&gt;
&lt;br /&gt;
''Main article: [[Online_Presence|Online Presence]]''&lt;br /&gt;
&lt;br /&gt;
==Finishing==&lt;br /&gt;
Before the mod gets released, it should undergo a series of procedures which will make sure the players have the best experience possible. '''Remember, first impressions matter - having something broken on release can impact the way your mod is received.'''&lt;br /&gt;
&lt;br /&gt;
===Playtesting===&lt;br /&gt;
'''Make sure your mod was tested by other people just before release.''' It might be surprising, but sometimes things will break even if you can play the entire mod without bugs on your set-up. You can also install a clean version of the game and check if your mod behaves properly there before getting playtesters.&lt;br /&gt;
&lt;br /&gt;
Playtests should be performed on the final versions of the mod. ''Don't let team members play from their personal versions of the mod!'' Many hours can be wasted on finding bugs caused by incompatible versions, or realizing the reported bug is already fixed and the playtester had an outdated version.&lt;br /&gt;
&lt;br /&gt;
{{tip|Ask Playtesters to take notes. This will get you more bits of feedback. }}&lt;br /&gt;
&lt;br /&gt;
===Bugs and Changes===&lt;br /&gt;
A complete list of all bugs and changes should be maintained along with their current status. Preferably this should be done in services like Trello. After each playtest, new bugs and necessary changes should be added, and assigned to team members. When a team member has fixed a bug or change, they should submit the new content to the team leader, who should verify that it is fixed and then update the status on the bug list.&lt;br /&gt;
&lt;br /&gt;
===Cut or Defer Broken Features===&lt;br /&gt;
The hardest and unfortunately necessary part of publishing a mod is cutting features. Don't be scared to remove unfinished features - often it can be easier to do that and make sure it doesn't break anything than actually make the feature work.&lt;br /&gt;
&lt;br /&gt;
Beware of feature creep. Make sure feature ideas actually add to the design of the mod and aren't there just because they are cool. It can be surprisingly easy to keep adding features to already existing work instead of actually pushing the development forward.&lt;br /&gt;
&lt;br /&gt;
Cutting features will save you unnecessary time wastes and stress.&lt;br /&gt;
&lt;br /&gt;
==Post-Release==&lt;br /&gt;
So you have released your mod, and soon enough rating and reviews started popping up. Your mod may or may not have been successful, but what comes next is up to you. The best approach is to learn from the feedback you get, see what worked and what didn't, and improve it for the next time. Talk with players, get involved in how they experienced your mod. Don't be afraid if it takes more time than usual to make your next big mod. Good ideas take time to brew, especially for horror games. &lt;br /&gt;
&lt;br /&gt;
Knowing what to fix, what to change, and how to listen to your community is a continuous learning process. &lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:English]]&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Making_a_Mod_-_Best_Practices&amp;diff=6305</id>
		<title>Making a Mod - Best Practices</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Making_a_Mod_-_Best_Practices&amp;diff=6305"/>
		<updated>2021-12-08T12:47:07Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: /* Compete With Gameplay and Story */ removed off-topic rambling and refactored the important data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{note|This article is long, but taking the time to read it might help you save a lot of time when making a mod.}}This article is designed to give modders things to keep in mind while creating their project. Remember that these are just guidelines intended to help you – you don't have to follow them, but they may teach you something useful.&lt;br /&gt;
==Starting Out==&lt;br /&gt;
&lt;br /&gt;
===Scoping Out Your Project===&lt;br /&gt;
In order to make sure your mod gets released, it is '''extremely''' important to make it under a manageable scope. This means that you must avoid being overly ambitious. Creating a project that is too massive will likely end up getting cancelled. Many modders may come up with interesting and big ideas that sound doable on paper, but later realize that it is a lot more work than first anticipated.&lt;br /&gt;
&lt;br /&gt;
The best way to combat this is to create a limited scope from the start. It is much better to be conservative and create a project that is smaller than what you think you can do. A small project is better than a cancelled project.&lt;br /&gt;
&lt;br /&gt;
If you would like to create a big project, it is best to first create a small one, which will give you an idea of how big you can go in the next project. Two small projects will teach you more than a single big one.&lt;br /&gt;
&lt;br /&gt;
{{tip|Don't plan your project with play time or the number of levels in mind. This will end up in having a lot of content left to make and no ideas for it. Instead, gather your gameplay ideas and design around that. It is easier to add onto a complete project than fill an unfinished one.}}&lt;br /&gt;
&lt;br /&gt;
And remember: quality over quantity. Players will enjoy a unique and well crafted mod even if it is short more than one that is artificially expanded just to be long. You will also have much more fun and satisfaction if you can finish a project before it bores you.&lt;br /&gt;
&lt;br /&gt;
===Collaboration===&lt;br /&gt;
&lt;br /&gt;
You will need to decide if you are going to work in a team or not. This will influence the scope of the project, so it is be done when starting a mod. A team can of course be brought on after working alone for some time, but that comes with additional challenges.&lt;br /&gt;
&lt;br /&gt;
Working on a mod alone is entirely possible, but working in a team will make it much more bearable. That said, do not assume working in a team is always easier than working alone; there are upsides and downsides. Having a team requires managing it and making sure work is actually getting done, which is a considerable challenge.&lt;br /&gt;
&lt;br /&gt;
{{Idea|If you are going to work in a team, '''make sure to create the mod idea together.''' An unfortunately popular phenomenon is people joining a team, getting a sneak-peek at the mod and losing interest. '''Creating the mod premise together can help keep the members invested.'''}}&lt;br /&gt;
&lt;br /&gt;
'''Remember, even having someone to only give you feedback is very helpful.''' Furthermore, participating in public discussions about modding can help you and others learn. This can be done in the modding channels on [https://discord.com/invite/frictionalgames the Frictional Games Discord server]. Share your work and ask questions!&lt;br /&gt;
&lt;br /&gt;
''Main article: [[Efficient_Teamwork | Efficient Teamwork]]''&lt;br /&gt;
&lt;br /&gt;
==Mod Design==&lt;br /&gt;
Ask yourself &amp;quot;Why should someone play my mod?&amp;quot;. It's a hard question, but if you can answer it well, your mod design has good potential. Think about what other mods are out there, and what they offer. Does your mod offer something new to the players? Is what you offer enough to interest players? Even if you cannot answer these questions, just thinking about it will probably help you come up with ideas.&lt;br /&gt;
&lt;br /&gt;
===Understand the Engine===&lt;br /&gt;
You should really read the documentation of the game you want to mod.&lt;br /&gt;
&lt;br /&gt;
By doing that,  you will learn two important things:&amp;lt;br&amp;gt;&lt;br /&gt;
What things you can do with the engine and how to do them so they work well. There will be multiple ways to achieve what you want, but sometimes only one will work without code problems, affecting the performance too much, and other risky stuff. Reading the documentation will also ensure you are not recreating something that is already in the engine and is much easier to use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Switched the section order to flow more naturally--&amp;gt;&lt;br /&gt;
===Compete With Gameplay and Story===&lt;br /&gt;
Remember that most mods cannot compete on a complexity and scale level with commercial products. They were made by teams of artists and developers with years of experience. It can take years to make a mod that has 30% the amount of content that the base games have. Instead of making big mods with dozens of maps, try to come up with engaging gameplay and a story that will be shorter but effective.&lt;br /&gt;
&lt;br /&gt;
==Managing development==&lt;br /&gt;
When working on a mod, it is important to keep track of your and other's work, while making sure everyone knows what left to be done, what is already done and more. The following section provides tips, links to useful tools and guides which will help you to manage the project.&lt;br /&gt;
&lt;br /&gt;
'''Keep in mind these are very important even for one-person projects!''' Keeping track of work always gets one far - it helps you plan and remember things.&lt;br /&gt;
&lt;br /&gt;
===Setting up a Scrum Board=== &lt;br /&gt;
In short, a scrum board is a group of lists used for keeping track of the team's development progress. It is used for:&lt;br /&gt;
&lt;br /&gt;
*Creating tasks&lt;br /&gt;
*Assigning tasks&lt;br /&gt;
*Tracking what is already done&lt;br /&gt;
*Tracking what needs to be done&lt;br /&gt;
*Tracking what is being worked on&lt;br /&gt;
*Tracking bugs&lt;br /&gt;
&lt;br /&gt;
One of the free tools which provide that is [https://trello.com/guide Trello].&lt;br /&gt;
&lt;br /&gt;
===Version control===&lt;br /&gt;
There is nothing worse than not being able to track your work or recover older versions of your project. &lt;br /&gt;
&lt;br /&gt;
Systems such as [https://git-scm.com/ '''Git'''] help to keep track of changes and back them up. Whenever you ''commit'' your work, a snapshot of the work is saved. In case something goes wrong, you will be able to go back to any older commit. Commits are stored inside a ''repository''.&lt;br /&gt;
&lt;br /&gt;
'''One of the most important feature of Git is collaboration.''' Working on all sorts of files with multiple people will get messy very fast if you just send them back and forth. Git allows multiple people to work on the same project simultaneously, and (after setting up) requires only a few clicks to upload your work and update the work of others. It also helps you resolve any conflicts when multiple people edit the same file.&lt;br /&gt;
&lt;br /&gt;
'''Read more about [[Setting up an Online Repository]].'''&lt;br /&gt;
&lt;br /&gt;
==Online Presence==&lt;br /&gt;
You will most likely start sharing your creations before the mod is published. It is recommended to make sure you have something to show off before you create mod pages. Therefore, you should prepare a set of media to preview the mod, as well as coming up with an intriguing description to catch the eye. All of these should make you stay relevant for some amount of time at the very least.&lt;br /&gt;
&lt;br /&gt;
You will receive feedback and criticism from other users or from your own team about your work. It's important to accept and learn from them, instead of denying, attacking or ignoring such feedback. You grow all the time during development, and your online presence will be affected by how you react to feedback and criticism. &lt;br /&gt;
&lt;br /&gt;
''Main article: [[Online_Presence|Online Presence]]''&lt;br /&gt;
&lt;br /&gt;
==Finishing==&lt;br /&gt;
Before the mod gets released, it should undergo a series of procedures which will make sure the players have the best experience possible. '''Remember, first impressions matter - having something broken on release can impact the way your mod is received.'''&lt;br /&gt;
&lt;br /&gt;
===Playtesting===&lt;br /&gt;
'''Make sure your mod was tested by other people just before release.''' It might be surprising, but sometimes things will break even if you can play the entire mod without bugs on your set-up. You can also install a clean version of the game and check if your mod behaves properly there before getting playtesters.&lt;br /&gt;
&lt;br /&gt;
Playtests should be performed on the final versions of the mod. ''Don't let team members play from their personal versions of the mod!'' Many hours can be wasted on finding bugs caused by incompatible versions, or realizing the reported bug is already fixed and the playtester had an outdated version.&lt;br /&gt;
&lt;br /&gt;
{{tip|Ask Playtesters to take notes. This will get you more bits of feedback. }}&lt;br /&gt;
&lt;br /&gt;
===Bugs and Changes===&lt;br /&gt;
A complete list of all bugs and changes should be maintained along with their current status. Preferably this should be done in services like Trello. After each playtest, new bugs and necessary changes should be added, and assigned to team members. When a team member has fixed a bug or change, they should submit the new content to the team leader, who should verify that it is fixed and then update the status on the bug list.&lt;br /&gt;
&lt;br /&gt;
===Cut or Defer Broken Features===&lt;br /&gt;
The hardest and unfortunately necessary part of publishing a mod is cutting features. Don't be scared to remove unfinished features - often it can be easier to do that and make sure it doesn't break anything than actually make the feature work.&lt;br /&gt;
&lt;br /&gt;
Beware of feature creep. Make sure feature ideas actually add to the design of the mod and aren't there just because they are cool. It can be surprisingly easy to keep adding features to already existing work instead of actually pushing the development forward.&lt;br /&gt;
&lt;br /&gt;
Cutting features will save you unnecessary time wastes and stress.&lt;br /&gt;
&lt;br /&gt;
==Post-Release==&lt;br /&gt;
So you have released your mod, and soon enough rating and reviews started popping up. Your mod may or may not have been successful, but what comes next is up to you. The best approach is to learn from the feedback you get, see what worked and what didn't, and improve it for the next time. Talk with players, get involved in how they experienced your mod. Don't be afraid if it takes more time than usual to make your next big mod. Good ideas take time to brew, especially for horror games. &lt;br /&gt;
&lt;br /&gt;
Knowing what to fix, what to change, and how to listen to your community is a continuous learning process. &lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:English]]&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=User:Darkfire&amp;diff=6304</id>
		<title>User:Darkfire</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=User:Darkfire&amp;diff=6304"/>
		<updated>2021-12-02T15:31:08Z</updated>

		<summary type="html">&lt;p&gt;Darkfire: Update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ConstructionNotice|Dorkflame is working very hard (not really) on making this article less stuck-up.|align=center|width=30%}}&lt;br /&gt;
I've been around the community since 2014, mostly invested in modding. You can see my contributions on this page. &lt;br /&gt;
I was also involved in cleaning up this wiki before it was made public and I moderate it since.&lt;br /&gt;
&lt;br /&gt;
==HPL2==&lt;br /&gt;
I spent most of my time in the community working with HPL2.&lt;br /&gt;
&lt;br /&gt;
===Mod assets===&lt;br /&gt;
*[https://www.moddb.com/mods/improved-lantern Improved Lantern]&lt;br /&gt;
*[https://www.moddb.com/games/amnesia-the-dark-descent/addons/mfp-inventory-gui MFP inventory for TDD mods]&lt;br /&gt;
*[https://www.mediafire.com/file/szr9jdfba470qoh/DarkfireNatureAssets.rar/file Nature asset pack]&lt;br /&gt;
&lt;br /&gt;
===Tutorials===&lt;br /&gt;
*[[Hpl2:Tutorials:level editor:outdoors|Making outside levels in HPL2]]&lt;br /&gt;
*[[HPL2/Tutorials/Level Design |Level Design in HPL2]]&lt;br /&gt;
*[[HPL2/Tutorials/Porting_MFP_Assets|Porting MFP assets to TDD]]&lt;br /&gt;
*[[HPL2/Tutorials/Convert HDRI to skyboxes|Converting HDRI to skyboxes]]&lt;br /&gt;
&lt;br /&gt;
===Other contributions===&lt;br /&gt;
I have also:&lt;br /&gt;
* implemented/ported most of the features and fixes in the [[HPL2/Tools#Community_tools|community editors]]&lt;br /&gt;
* discovered how to use the &amp;lt;code&amp;gt;StartPlayerSpawnPS();&amp;lt;/code&amp;gt; function. See the documentation [[HPL2/Engine_Scripts#General_2|here]].&lt;br /&gt;
* inquired about and later tested the obscure feature of [[HPL2/Tools/Level Editor/Combine Editmode|static object combos]].&lt;br /&gt;
&lt;br /&gt;
===Amnesia: A Machine For Pigs===&lt;br /&gt;
I reverse engineered a considerable part of the MFP editor config files. This has allowed me to create custom config files, which allow editing MFP files without errors. I have also reverse-engineered the Infection system and wrote the majority of the MFP articles. Funnily enough, I don't like MFP much.&lt;br /&gt;
&lt;br /&gt;
*MFP compability is available in the [[HPL2/Tools#Community_tools|community editors]]&lt;br /&gt;
*[[HPL2/AMFP/Introduction#Modding_MFP|MFP recompiled with Custom Story support]]&lt;br /&gt;
&amp;lt;!-- *[https://www.frictionalgames.com/forum/thread-56724.html Editor updates and a Full Conversion template (FG forums)] --&amp;gt;&lt;br /&gt;
&amp;lt;!-- *[https://www.moddb.com/groups/amnesia-modders/addons/mfp-editor-update Editor updates (ModDb)] --&amp;gt;&lt;br /&gt;
*The articles which I wrote can be found [[HPL2/AMFP|here]].&lt;br /&gt;
&lt;br /&gt;
==My mods==&lt;br /&gt;
&lt;br /&gt;
===SOMA===&lt;br /&gt;
&amp;quot;Life Freezes Over&amp;quot; is [https://frictionalgames.com/2020-02-winner-showcase-of-frictional-winter-modding-jam-2019/ a winning entry in the Frictional Games Winter Fan Jam] for which I wrote a bulk of the script, co-designed the levels and helped with making them (a little).&lt;br /&gt;
&lt;br /&gt;
*[https://www.moddb.com/mods/life-freezes-over Life Freezes Over (on ModDb)]&lt;br /&gt;
*[https://steamcommunity.com/sharedfiles/filedetails/?id=1979207413 Life Freezes Over (on Steam)]&lt;br /&gt;
&lt;br /&gt;
===Amnesia===&lt;br /&gt;
*[https://www.moddb.com/mods/amnesia-chromanin Chromanin]&lt;br /&gt;
*[https://www.moddb.com/mods/sdp SDP]&lt;br /&gt;
*[https://www.moddb.com/mods/eldritch-cove Eldritch Cove (Full Conversion)]&lt;br /&gt;
&lt;br /&gt;
===Amnesia side projects===&lt;br /&gt;
*[https://www.moddb.com/mods/obturaculum Obturaculum] - a feature-length parody mod&lt;br /&gt;
*[https://www.moddb.com/mods/td T.D.] - a short retelling of P.T. on the HPL2 engine&lt;br /&gt;
*[https://www.moddb.com/mods/community-event-a-week-of-modding A week of modding] - a small community event, which was won by my entry&lt;/div&gt;</summary>
		<author><name>Darkfire</name></author>
		
	</entry>
</feed>