<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Frictional Games Forum (read-only) - Development Articles]]></title>
		<link>https://www.frictionalgames.com/forum/</link>
		<description><![CDATA[Frictional Games Forum (read-only) - https://www.frictionalgames.com/forum]]></description>
		<pubDate>Thu, 12 Nov 2026 12:01:58 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[3 Tips for Creating a Good Protagonist]]></title>
			<link>https://www.frictionalgames.com/forum/thread-56314.html</link>
			<pubDate>Thu, 11 Apr 2019 13:48:06 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-56314.html</guid>
			<description><![CDATA[Hi, this is my first post to this subforum, and since I know and use a few tips and tricks to create a good protagonist for a mod, I thought I would share them here. let's get started.<br />
<br />
TIP #1: Make the character relatable.<br />
<br />
I will tell you right now, making a character in a custom story/full conversion that the player can empathize with is very difficult, but if done right, it can improve the storyline of your mod a ton. I find that a good way to do this is to try to make the character in the story as clueless at the start as the player themselves, in other words, spoil what the player knows early and keep what the player doesn't know a secret until the time comes to reveal it, this drives the effect that the player is the protagonist and vice versa. <br />
<br />
TIP #2: Make the character have some form of inner turmoil or change.<br />
<br />
What I have been doing with Order of the Skull (my custom story) is making the protagonist, Gregory, have a sort of inner turmoil expressed through flashbacks, nightmares, and even subtle environmental cues. This is another good way to make the player feel connected to the protagonist, and if done correctly, can make the story of your mod feel truer. <br />
<br />
TIP #3: Make the character seem as ordinary as the player controlling them.<br />
<br />
This is another useful tip to creating a protagonist the player can empathize with. in Amnesia: The Dark Descent, Daniel was a man on an archeological dig to uncover a tomb, but when he finds the orb, gets thrown into the madness that is the game against his will, see what they did there? The protagonist was not trying to get involved in what he did, but dumb luck sent him down that path, this gives the illusion that the kind of stuff in your custom story could potentially happen to anyone, driving the immersion. Soma is also a really good example of a protagonist thrown into hell by dumb luck.]]></description>
			<content:encoded><![CDATA[Hi, this is my first post to this subforum, and since I know and use a few tips and tricks to create a good protagonist for a mod, I thought I would share them here. let's get started.<br />
<br />
TIP #1: Make the character relatable.<br />
<br />
I will tell you right now, making a character in a custom story/full conversion that the player can empathize with is very difficult, but if done right, it can improve the storyline of your mod a ton. I find that a good way to do this is to try to make the character in the story as clueless at the start as the player themselves, in other words, spoil what the player knows early and keep what the player doesn't know a secret until the time comes to reveal it, this drives the effect that the player is the protagonist and vice versa. <br />
<br />
TIP #2: Make the character have some form of inner turmoil or change.<br />
<br />
What I have been doing with Order of the Skull (my custom story) is making the protagonist, Gregory, have a sort of inner turmoil expressed through flashbacks, nightmares, and even subtle environmental cues. This is another good way to make the player feel connected to the protagonist, and if done correctly, can make the story of your mod feel truer. <br />
<br />
TIP #3: Make the character seem as ordinary as the player controlling them.<br />
<br />
This is another useful tip to creating a protagonist the player can empathize with. in Amnesia: The Dark Descent, Daniel was a man on an archeological dig to uncover a tomb, but when he finds the orb, gets thrown into the madness that is the game against his will, see what they did there? The protagonist was not trying to get involved in what he did, but dumb luck sent him down that path, this gives the illusion that the kind of stuff in your custom story could potentially happen to anyone, driving the immersion. Soma is also a really good example of a protagonist thrown into hell by dumb luck.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Useful custom script functions]]></title>
			<link>https://www.frictionalgames.com/forum/thread-53193.html</link>
			<pubDate>Tue, 08 Nov 2016 13:04:52 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-53193.html</guid>
			<description><![CDATA[I figured I wanted to share some custom functions I've written recently. Amnesia/HPL2 is quite limited in what you can do, so I've used some workarounds to achieve what could've been done easily with external support. This might be a bit of an advanced topic for some of you, dunno.<br />
<br />
<span style="font-style: italic;" class="mycode_i">What do you mean by custom script functions?</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<br />
We all know how useful this function is, right?<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;alVal</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
This function is pre-defined in HPL2, and that's why you can use it. Anything listed on the <a href="https://wiki.frictionalgames.com/doku.php?id=hpl2/amnesia/script_functions" target="_blank" rel="noopener" class="mycode_url">Engine Scripts</a> page is pre-defined. Everything else has to be created within the file in order to be used. This of course excludes the primitive syntax native to the scripting language.<br />
<br />
So if you wanted to use a <span style="font-style: italic;" class="mycode_i">non-existant function</span> like<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool&nbsp;abVal</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>then you'd need to create it. Now, this particular one isn't exactly game-changing, since the same effect can be achieved by using the VarInt function as 0/1, but it can be convenient for those who work with booleans more since you can directly input the variable without converting.<br />
</div>
</div>
</div>
<br />
<span style="font-style: italic;" class="mycode_i">How do I use these functions?</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<br />
It's simple enough. Each function depends on a snippet of code. Include the snippet for the function(s) you want to use within your .hps file. As long as it's present within the same file, you can call it like any of the pre-defined functions.<br />
<br />
I will list the function itself as it is listed on the Engine Scripts page. I will give a brief explanation of the function and provide the script you need to include in order to use it.<br />
</div>
</div>
</div>
<span style="color: #000080;" class="mycode_color"><br />
<span style="font-size: large;" class="mycode_size"><span style="font-family: Verdana;" class="mycode_font">Below I'll list whatever I've published so far below.</span></span></span><br />
<br />
<hr class="mycode_hr" />
<br />
<span style="font-weight: bold;" class="mycode_b">Boolean variables</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
These add to the already existing set for <span style="font-family: Courier;" class="mycode_font">Int</span>, <span style="font-family: Courier;" class="mycode_font">Float </span>and <span style="font-family: Courier;" class="mycode_font">String</span>.<br />
Pretty self explanatory what they do; allow you to create and return a local or global true/false variable. These rely on there not already existing an Int variable with the name "bool_yourvar" (shouldn't really be an issue).<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool&nbsp;abVal</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">void&nbsp;SetGlobalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool&nbsp;abVal</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Sets a local or global boolean variable.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">bool&nbsp;GetLocalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">bool&nbsp;GetGlobalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Returns a local or global boolean variable.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Script to include</span><br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool&nbsp;abVal</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"bool_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">abVal&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">void&nbsp;SetGlobalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool&nbsp;abVal</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"bool_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">abVal&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">bool&nbsp;GetLocalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"bool_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">bool&nbsp;GetGlobalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">GetGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"bool_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />}&nbsp;<br /></span></code></div></div></div><br />
</div>
</div>
</div>
<br />
<span style="font-weight: bold;" class="mycode_b">String array variables</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
These are rather interesting and can be quite useful. They mimic the use of the <span style="font-family: Courier;" class="mycode_font">array</span> data type which is unsupported in HPL2. If you know how arrays work, these are self-explanatory.<br />
<br />
These rely on there not existing string vars named "array_yourvar" and int vars named "array_yourvar_index". Can be changed of course.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;&amp;</span><span style="color: #0000BB">in&nbsp;asData</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">void&nbsp;SetGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;&amp;</span><span style="color: #0000BB">in&nbsp;asData</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Sets a local or global string array to the specified string array.<br />
<br />
<span style="font-style: italic;" class="mycode_i">asName</span> - The name of the variable.<br />
<span style="font-style: italic;" class="mycode_i">asData</span> - The string array to set.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;AddLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asText</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">void&nbsp;AddGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asText</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Adds a string to the next index of a string array.<br />
<br />
<span style="font-style: italic;" class="mycode_i">asName</span> - The name of the variable.<br />
<span style="font-style: italic;" class="mycode_i">asText</span> - The string to add.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">GetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">GetGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Returns a string array.<br />
<br />
<span style="font-style: italic;" class="mycode_i">asName</span> - The name of the variable.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Script to include</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;&amp;</span><span style="color: #0000BB">in&nbsp;asData</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;size&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">asData</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;</span><span style="color: #0000BB">i</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">size</span><span style="color: #007700">;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddLocalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #0000BB">i</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">asData</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">]);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">size</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">void&nbsp;AddLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asText</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetLocalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">asText</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">GetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">.</span><span style="color: #0000BB">resize</span><span style="color: #007700">(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">GetLocalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #0000BB">i</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">void&nbsp;SetGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;&amp;</span><span style="color: #0000BB">in&nbsp;asData</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;size&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">asData</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;</span><span style="color: #0000BB">i</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">size</span><span style="color: #007700">;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddGlobalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #0000BB">i</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">asData</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">]);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">size</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">void&nbsp;AddGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asText</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetGlobalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">asText</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">GetGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">.</span><span style="color: #0000BB">resize</span><span style="color: #007700">(</span><span style="color: #0000BB">GetGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">GetGlobalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #0000BB">i</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">;<br />}&nbsp;<br /></span></code></div></div></div><br />
</div>
</div>
</div>
<br />
<span style="font-weight: bold;" class="mycode_b">String processing functions</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
This one relies on the string array functions above, but can be re-written to include that functionality in itself.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">StringSplit</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asString</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asDelimiter</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Scans asString where everytime it finds asDelimiter, it splits the contents up into a string array.<br />
<br />
<span style="font-style: italic;" class="mycode_i">asString</span> - The string to scan/process.<br />
<span style="font-style: italic;" class="mycode_i">asDelimiter</span> - The delimiter to split each index up by.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Script to include:</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">StringSplit</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asString</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asDelimiter</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;pause&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">flush&nbsp;</span><span style="color: #007700">=&nbsp;{};<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #DD0000">"_string_split"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">flush</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;Print(</span><span style="color: #DD0000">"INFO:&nbsp;Splitting&nbsp;string&nbsp;'"</span><span style="color: #007700">+</span><span style="color: #0000BB">asString</span><span style="color: #007700">+</span><span style="color: #DD0000">"'&nbsp;with&nbsp;delimiter&nbsp;'"</span><span style="color: #007700">+</span><span style="color: #0000BB">asDelimiter</span><span style="color: #007700">+</span><span style="color: #DD0000">"'&#092;n"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">asString</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string&nbsp;s&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">StringSub</span><span style="color: #007700">(</span><span style="color: #0000BB">asString</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">asDelimiter</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">s&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">asDelimiter&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">asString</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">())&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string&nbsp;split&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">StringSub</span><span style="color: #007700">(</span><span style="color: #0000BB">asString</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">pause</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">-</span><span style="color: #0000BB">pause</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #DD0000">"_string_split"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">split</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">pause&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">asDelimiter</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">GetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #DD0000">"_string_split"</span><span style="color: #007700">);<br />}&nbsp;<br /></span></code></div></div></div><br />
</div>
</div>
</div>
<br />
<span style="font-weight: bold;" class="mycode_b">Float Decimal Limiter</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
This function will limit the amount of decimals a float value has. If you give it a value of <span style="font-family: Courier;" class="mycode_font">1.23456f</span> and limit it to 3, it will return <span style="font-family: Courier;" class="mycode_font">1.234f</span>. It does <span style="font-style: italic;" class="mycode_i">not</span> round to nearest, it simply ignores the excess data.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">float&nbsp;FloatTrimDecimals</span><span style="color: #007700">(</span><span style="color: #0000BB">float&nbsp;afValue</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;alX</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Formats afValue to only include alX number of decimals.<br />
<br />
<span style="font-style: italic;" class="mycode_i">afValue</span> - The value to format<br />
<span style="font-style: italic;" class="mycode_i">alX</span> - The amount of decimals<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Script to include:</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">float&nbsp;FloatTrimDecimals</span><span style="color: #007700">(</span><span style="color: #0000BB">float&nbsp;afValue</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;alX</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">uint64&nbsp;iDeci&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">alX</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)&nbsp;</span><span style="color: #0000BB">iDeci&nbsp;</span><span style="color: #007700">*=&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">uint64&nbsp;iTemp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">int</span><span style="color: #007700">(</span><span style="color: #0000BB">afValue</span><span style="color: #007700">*&nbsp;</span><span style="color: #0000BB">iDeci</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">float&nbsp;result&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iTemp&nbsp;</span><span style="color: #007700">/&nbsp;</span><span style="color: #0000BB">float</span><span style="color: #007700">(</span><span style="color: #0000BB">iDeci</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">result</span><span style="color: #007700">;<br />}&nbsp;<br /></span></code></div></div></div><br />
</div>
</div>
</div>
<br />
I will add more later on. Probably.]]></description>
			<content:encoded><![CDATA[I figured I wanted to share some custom functions I've written recently. Amnesia/HPL2 is quite limited in what you can do, so I've used some workarounds to achieve what could've been done easily with external support. This might be a bit of an advanced topic for some of you, dunno.<br />
<br />
<span style="font-style: italic;" class="mycode_i">What do you mean by custom script functions?</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<br />
We all know how useful this function is, right?<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;alVal</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
This function is pre-defined in HPL2, and that's why you can use it. Anything listed on the <a href="https://wiki.frictionalgames.com/doku.php?id=hpl2/amnesia/script_functions" target="_blank" rel="noopener" class="mycode_url">Engine Scripts</a> page is pre-defined. Everything else has to be created within the file in order to be used. This of course excludes the primitive syntax native to the scripting language.<br />
<br />
So if you wanted to use a <span style="font-style: italic;" class="mycode_i">non-existant function</span> like<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool&nbsp;abVal</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>then you'd need to create it. Now, this particular one isn't exactly game-changing, since the same effect can be achieved by using the VarInt function as 0/1, but it can be convenient for those who work with booleans more since you can directly input the variable without converting.<br />
</div>
</div>
</div>
<br />
<span style="font-style: italic;" class="mycode_i">How do I use these functions?</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<br />
It's simple enough. Each function depends on a snippet of code. Include the snippet for the function(s) you want to use within your .hps file. As long as it's present within the same file, you can call it like any of the pre-defined functions.<br />
<br />
I will list the function itself as it is listed on the Engine Scripts page. I will give a brief explanation of the function and provide the script you need to include in order to use it.<br />
</div>
</div>
</div>
<span style="color: #000080;" class="mycode_color"><br />
<span style="font-size: large;" class="mycode_size"><span style="font-family: Verdana;" class="mycode_font">Below I'll list whatever I've published so far below.</span></span></span><br />
<br />
<hr class="mycode_hr" />
<br />
<span style="font-weight: bold;" class="mycode_b">Boolean variables</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
These add to the already existing set for <span style="font-family: Courier;" class="mycode_font">Int</span>, <span style="font-family: Courier;" class="mycode_font">Float </span>and <span style="font-family: Courier;" class="mycode_font">String</span>.<br />
Pretty self explanatory what they do; allow you to create and return a local or global true/false variable. These rely on there not already existing an Int variable with the name "bool_yourvar" (shouldn't really be an issue).<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool&nbsp;abVal</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">void&nbsp;SetGlobalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool&nbsp;abVal</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Sets a local or global boolean variable.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">bool&nbsp;GetLocalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">bool&nbsp;GetGlobalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Returns a local or global boolean variable.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Script to include</span><br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool&nbsp;abVal</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"bool_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">abVal&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">void&nbsp;SetGlobalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool&nbsp;abVal</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"bool_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">abVal&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">bool&nbsp;GetLocalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"bool_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">bool&nbsp;GetGlobalVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">GetGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"bool_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">true&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />}&nbsp;<br /></span></code></div></div></div><br />
</div>
</div>
</div>
<br />
<span style="font-weight: bold;" class="mycode_b">String array variables</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
These are rather interesting and can be quite useful. They mimic the use of the <span style="font-family: Courier;" class="mycode_font">array</span> data type which is unsupported in HPL2. If you know how arrays work, these are self-explanatory.<br />
<br />
These rely on there not existing string vars named "array_yourvar" and int vars named "array_yourvar_index". Can be changed of course.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;&amp;</span><span style="color: #0000BB">in&nbsp;asData</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">void&nbsp;SetGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;&amp;</span><span style="color: #0000BB">in&nbsp;asData</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Sets a local or global string array to the specified string array.<br />
<br />
<span style="font-style: italic;" class="mycode_i">asName</span> - The name of the variable.<br />
<span style="font-style: italic;" class="mycode_i">asData</span> - The string array to set.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;AddLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asText</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">void&nbsp;AddGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asText</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Adds a string to the next index of a string array.<br />
<br />
<span style="font-style: italic;" class="mycode_i">asName</span> - The name of the variable.<br />
<span style="font-style: italic;" class="mycode_i">asText</span> - The string to add.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">GetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">GetGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Returns a string array.<br />
<br />
<span style="font-style: italic;" class="mycode_i">asName</span> - The name of the variable.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Script to include</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;SetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;&amp;</span><span style="color: #0000BB">in&nbsp;asData</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;size&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">asData</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;</span><span style="color: #0000BB">i</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">size</span><span style="color: #007700">;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddLocalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #0000BB">i</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">asData</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">]);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">size</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">void&nbsp;AddLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asText</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetLocalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">asText</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">GetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">.</span><span style="color: #0000BB">resize</span><span style="color: #007700">(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">GetLocalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #0000BB">i</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">void&nbsp;SetGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;&amp;</span><span style="color: #0000BB">in&nbsp;asData</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;size&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">asData</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;</span><span style="color: #0000BB">i</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">size</span><span style="color: #007700">;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddGlobalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #0000BB">i</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">asData</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">]);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">size</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">void&nbsp;AddGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asText</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetGlobalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">asText</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">GetGlobalVarStringArray</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">.</span><span style="color: #0000BB">resize</span><span style="color: #007700">(</span><span style="color: #0000BB">GetGlobalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #DD0000">"_index"</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">GetGlobalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"array_"</span><span style="color: #007700">+</span><span style="color: #0000BB">asName</span><span style="color: #007700">+</span><span style="color: #0000BB">i</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">arr</span><span style="color: #007700">;<br />}&nbsp;<br /></span></code></div></div></div><br />
</div>
</div>
</div>
<br />
<span style="font-weight: bold;" class="mycode_b">String processing functions</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
This one relies on the string array functions above, but can be re-written to include that functionality in itself.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">StringSplit</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asString</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asDelimiter</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Scans asString where everytime it finds asDelimiter, it splits the contents up into a string array.<br />
<br />
<span style="font-style: italic;" class="mycode_i">asString</span> - The string to scan/process.<br />
<span style="font-style: italic;" class="mycode_i">asDelimiter</span> - The delimiter to split each index up by.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Script to include:</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">StringSplit</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asString</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asDelimiter</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;pause&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">flush&nbsp;</span><span style="color: #007700">=&nbsp;{};<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #DD0000">"_string_split"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">flush</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;Print(</span><span style="color: #DD0000">"INFO:&nbsp;Splitting&nbsp;string&nbsp;'"</span><span style="color: #007700">+</span><span style="color: #0000BB">asString</span><span style="color: #007700">+</span><span style="color: #DD0000">"'&nbsp;with&nbsp;delimiter&nbsp;'"</span><span style="color: #007700">+</span><span style="color: #0000BB">asDelimiter</span><span style="color: #007700">+</span><span style="color: #DD0000">"'&#092;n"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">asString</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string&nbsp;s&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">StringSub</span><span style="color: #007700">(</span><span style="color: #0000BB">asString</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">asDelimiter</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">s&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">asDelimiter&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">asString</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">())&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string&nbsp;split&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">StringSub</span><span style="color: #007700">(</span><span style="color: #0000BB">asString</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">pause</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">-</span><span style="color: #0000BB">pause</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #DD0000">"_string_split"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">split</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">pause&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">asDelimiter</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">GetLocalVarStringArray</span><span style="color: #007700">(</span><span style="color: #DD0000">"_string_split"</span><span style="color: #007700">);<br />}&nbsp;<br /></span></code></div></div></div><br />
</div>
</div>
</div>
<br />
<span style="font-weight: bold;" class="mycode_b">Float Decimal Limiter</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
This function will limit the amount of decimals a float value has. If you give it a value of <span style="font-family: Courier;" class="mycode_font">1.23456f</span> and limit it to 3, it will return <span style="font-family: Courier;" class="mycode_font">1.234f</span>. It does <span style="font-style: italic;" class="mycode_i">not</span> round to nearest, it simply ignores the excess data.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">float&nbsp;FloatTrimDecimals</span><span style="color: #007700">(</span><span style="color: #0000BB">float&nbsp;afValue</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;alX</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Formats afValue to only include alX number of decimals.<br />
<br />
<span style="font-style: italic;" class="mycode_i">afValue</span> - The value to format<br />
<span style="font-style: italic;" class="mycode_i">alX</span> - The amount of decimals<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Script to include:</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">float&nbsp;FloatTrimDecimals</span><span style="color: #007700">(</span><span style="color: #0000BB">float&nbsp;afValue</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;alX</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">uint64&nbsp;iDeci&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;for(</span><span style="color: #0000BB">int&nbsp;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">alX</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)&nbsp;</span><span style="color: #0000BB">iDeci&nbsp;</span><span style="color: #007700">*=&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">uint64&nbsp;iTemp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">int</span><span style="color: #007700">(</span><span style="color: #0000BB">afValue</span><span style="color: #007700">*&nbsp;</span><span style="color: #0000BB">iDeci</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">float&nbsp;result&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iTemp&nbsp;</span><span style="color: #007700">/&nbsp;</span><span style="color: #0000BB">float</span><span style="color: #007700">(</span><span style="color: #0000BB">iDeci</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">result</span><span style="color: #007700">;<br />}&nbsp;<br /></span></code></div></div></div><br />
</div>
</div>
</div>
<br />
I will add more later on. Probably.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Enemy States]]></title>
			<link>https://www.frictionalgames.com/forum/thread-52421.html</link>
			<pubDate>Fri, 26 Aug 2016 19:45:35 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-52421.html</guid>
			<description><![CDATA[<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">GetEnemyStateName</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">Returns&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;state&nbsp;a&nbsp;specified&nbsp;enemy&nbsp;is&nbsp;current&nbsp;in</span><span style="color: #007700">.&nbsp;<br /><br /></span><span style="color: #0000BB">asName&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">Internal&nbsp;name&nbsp;of&nbsp;the&nbsp;enemy&nbsp;<br /></span></code></div></div></div><br />
Ever since this was added to the game with the 1.3 update, it has always confused me and I felt the description of it didn't really make things clear me but today I found what you could do with it. I'm surprised no-one brought it up.<br />
<br />
Here are the states I have discovered that an enemy can be in so far.<br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<br />
<span style="font-weight: bold;" class="mycode_b">Hunt:</span> Enemy is chasing the player.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">HuntPause:</span> Enemy slows down after attacking the player.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Attack:</span> Enemy is attacking the player.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Patrol:</span> Enemy is patrolling/following pathnodes.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Wait:</span> Enemy is waiting at a pathnode.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Search:</span> Enemy is searching for the player after being alerted.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Alert:</span> Enemy is alerted to the player.<br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Investigate:</span> Enemy is investigating a sound made by a player or hears the player.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Track:</span> Enemy is tracking the player if Track is used in IdleBehaviour option for manpig enemy type.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">BreakDoor:</span> Enemy  is breaking down a door.<br />
<br />
</div>
</div>
</div>
<br />
You can use the GetEnemyStateName function the same way as any other Get function. Example:<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">if(</span><span style="color: #0000BB">GetEnemyStateName</span><span style="color: #007700">(</span><span style="color: #DD0000">"Enemy"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #DD0000">"Hunt"</span><span style="color: #007700">)<br />&nbsp;{<br />&nbsp;&nbsp;</span><span style="color: #FF8000">/////insert&nbsp;fancy&nbsp;code&nbsp;here////////////<br />&nbsp;</span><span style="color: #007700">}<br />if(</span><span style="color: #0000BB">GetEnemyStateName</span><span style="color: #007700">(</span><span style="color: #DD0000">"Enemy"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #DD0000">"Investigate"</span><span style="color: #007700">)<br />&nbsp;{<br />&nbsp;&nbsp;</span><span style="color: #0000BB">AlertEnemyOfPlayerPresence</span><span style="color: #007700">(</span><span style="color: #DD0000">"Enemy"</span><span style="color: #007700">);<br />&nbsp;}&nbsp;<br /></span></code></div></div></div><br />
Hopefully, this would allow people to mess around with enemies more and have some interesting encounters.<br />
<br />
I'm surprised no-one has talked about this. I would really like to hear people's ideas about this and see what cool stuff they come up with.]]></description>
			<content:encoded><![CDATA[<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">GetEnemyStateName</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asName</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">Returns&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;state&nbsp;a&nbsp;specified&nbsp;enemy&nbsp;is&nbsp;current&nbsp;in</span><span style="color: #007700">.&nbsp;<br /><br /></span><span style="color: #0000BB">asName&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">Internal&nbsp;name&nbsp;of&nbsp;the&nbsp;enemy&nbsp;<br /></span></code></div></div></div><br />
Ever since this was added to the game with the 1.3 update, it has always confused me and I felt the description of it didn't really make things clear me but today I found what you could do with it. I'm surprised no-one brought it up.<br />
<br />
Here are the states I have discovered that an enemy can be in so far.<br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<br />
<span style="font-weight: bold;" class="mycode_b">Hunt:</span> Enemy is chasing the player.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">HuntPause:</span> Enemy slows down after attacking the player.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Attack:</span> Enemy is attacking the player.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Patrol:</span> Enemy is patrolling/following pathnodes.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Wait:</span> Enemy is waiting at a pathnode.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Search:</span> Enemy is searching for the player after being alerted.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Alert:</span> Enemy is alerted to the player.<br />
 <br />
<span style="font-weight: bold;" class="mycode_b">Investigate:</span> Enemy is investigating a sound made by a player or hears the player.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Track:</span> Enemy is tracking the player if Track is used in IdleBehaviour option for manpig enemy type.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">BreakDoor:</span> Enemy  is breaking down a door.<br />
<br />
</div>
</div>
</div>
<br />
You can use the GetEnemyStateName function the same way as any other Get function. Example:<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">if(</span><span style="color: #0000BB">GetEnemyStateName</span><span style="color: #007700">(</span><span style="color: #DD0000">"Enemy"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #DD0000">"Hunt"</span><span style="color: #007700">)<br />&nbsp;{<br />&nbsp;&nbsp;</span><span style="color: #FF8000">/////insert&nbsp;fancy&nbsp;code&nbsp;here////////////<br />&nbsp;</span><span style="color: #007700">}<br />if(</span><span style="color: #0000BB">GetEnemyStateName</span><span style="color: #007700">(</span><span style="color: #DD0000">"Enemy"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #DD0000">"Investigate"</span><span style="color: #007700">)<br />&nbsp;{<br />&nbsp;&nbsp;</span><span style="color: #0000BB">AlertEnemyOfPlayerPresence</span><span style="color: #007700">(</span><span style="color: #DD0000">"Enemy"</span><span style="color: #007700">);<br />&nbsp;}&nbsp;<br /></span></code></div></div></div><br />
Hopefully, this would allow people to mess around with enemies more and have some interesting encounters.<br />
<br />
I'm surprised no-one has talked about this. I would really like to hear people's ideas about this and see what cool stuff they come up with.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Level Design Basics]]></title>
			<link>https://www.frictionalgames.com/forum/thread-36731.html</link>
			<pubDate>Mon, 18 Jan 2016 13:50:39 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-36731.html</guid>
			<description><![CDATA[<span style="font-size: x-large;" class="mycode_size">Content:</span><ul class="mycode_list">
</li>
<li><span style="font-weight: bold;" class="mycode_b">Introduction to Level Design</span><br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Balancing your level</span><ul class="mycode_list">
</li>
<li>The Three key things<ul class="mycode_list">
</li>
<li><span style="font-style: italic;" class="mycode_i">Layout of the map</span><br />
</li>
<li><span style="font-style: italic;" class="mycode_i">Logic</span><br />
</li>
<li><span style="font-style: italic;" class="mycode_i">Details</span><br />
</li></ul>
</li></ul>
</li>
<li><span style="font-weight: bold;" class="mycode_b">Optimization</span><br />
</li></ul>
<hr class="mycode_hr" />
<ul class="mycode_list"></li>
<li><span style="font-size: x-large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Introduction to Level Design</span></span><br />
<blockquote class="mycode_quote"><cite>Bleszinski, Cliff (2000) - The Art and Science of Level Design Wrote:</cite><span style="font-style: italic;" class="mycode_i">Level design is both a technical and artistic process.</span></blockquote><br />
<span style="font-style: italic;" class="mycode_i">The Level Design itself is a large process that in many cases involves tens or even hundreds of people if not more. It has many parts and to go through all of it would take me a whole book. That's why I'm going to focus on the basic principals that might hopefully help you with your own maps in Amnesia.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">In each section, I'm going to explain what do I mean by them and establish some interesting things that you might want to keep in mind, this will be followed by a "Spoiled" dropdown containing examples with pictures.</span><br />
<br />
<span style="font-size: large;" class="mycode_size">So what are we doing here?</span><br />
<span style="font-style: italic;" class="mycode_i">Designing a level is not only about placing objects into a map. I would say it is as logical of a task as scripting, the only difference is that Amnesia won't tell you that your level design lacks readability or that your puzzle doesn't make sense.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">A good level design should guide the player through a level, helping him solve puzzles in a way that makes him feel that it was his idea in the first place. Your job as a level designer is to put everything together. All the 3D modelling, the scripting, the music composing should be brought together by a level designer.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">Thinking that the player will not jump into the so obviously deadly pit is not a good practice, since the Player could behave in any way. Just thinking about what player might try or might do requires a load of creativity and problem solving skills. You can think of it as a game of Lemmings. A 1999 DOS game where you're in charge of guiding small Lemming creatures through a level. If you don't push them into the right direction, they will surely jump from the nearest cliff or on the nearest spikes.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">So let's get into it...</span><br />
<br />
<br />
</li>
<li><span style="font-size: x-large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Balancing your level</span></span><br />
<span style="font-style: italic;" class="mycode_i">As I said earlier, it is important for a level to be balanced and I find issue with many of the current maps and mods, where the author spend much more time on one thing and left the other almost untouched. Having and amazing scripts that provide great content is almost worthless if the level design doesn't hint that there are these functions and player won't even find it.<br />
<br />
I divided the level design into these three parts. This division isn't something that you would need to remember. It is more to help you understand what you might want to pay attention to.</span><ul class="mycode_list"></li>
<li><span style="font-size: large;" class="mycode_size">The Three Key Things</span><br />
<ul class="mycode_list"></li>
<li><span style="font-size: large;" class="mycode_size">Layout of the map</span></li></ul>
<span style="font-style: italic;" class="mycode_i">The whole map creation process starts with the story of course, but that's a whole different task, so let's assume you  already know what should be in the level and where it's located.<br />
<br />
Now is the time to pay attention to using the basic assets to create the shape of your level. Here is where many map creators make their first mistakes and those are the ones that are very difficult to fix later on.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">The shape of the level should convey the emotion you want. If your story revolves around someone going deep into a dungeon, you can convey progress by using stairs that go down for places of progress and stairs going up for some optional locations. If a player then sees locked jail-door and stairs going down behind it, it is a sign that he/she needs to get there to progress.<br />
<br />
If you want to make a player feel uneasy or trapped, you can make the corridors tighter and hard to get through...<br />
<br />
Of course it is best for you to look at some examples of basic level structures. Great source of inspiration would be Half-Life 2 and its progress. Half-Life utilizes Player's abilities in its full potential. Though it is true that in Half-Life, the player wields a crowbar with which he breaks creates and barriers with a single button. Amnesia is a little bit more abstract in this sense. The Player is required to go into an inventory (first button), double click the crowbar (two more buttons) and finally click on the obstacle. That is a total of 4 click for a thing that takes one click in Half-Life, not to mention a "physics puzzle" where you actually move the crowbar, that might arise. In Half-Life, because it's such a common task, you are required to break things and use your items fairly often, in the situations that doesn't really require it, but make the progress interesting. It works, because it's simple and doesn't require that much attention. On the other side having to crowbar door every 5 minutes in Amnesia would get annoying, because it's a task consisting of more steps.<br />
<br />
But I don't want to delve into actions just yet, although it is a part of Designing a Level. Making sure that the Player knows he has an item is important and while I wouldn't put something to break with your crowbar every 5 minutes, I would throw it in a few times before he's required to use it on some serious puzzle.</span><br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<br />
<span style="font-style: italic;" class="mycode_i">Now for the examples. The thing about basic Level Shapes is that you shouldn't really pay attention to details and that's what a lot of people do wrong, if you spend hours creating one perfect little room and you can't actually connect it to anything, your work is pointless.<br />
<br />
The goal is to capture the feel and the layout of the map. Go ahead, play the map through, time how long does it take, can anything be shorter? Can you make some hallways longer? How far can you see from every point of your map? (that will come in handy while optimizing), do you want player to stay in a particular room? how are you going to achieve this? What should be highlighted? Is there enough space for the content you're planning? Can something get smaller? Isn't it too linear? Are you using vertical space enough? Ask as many questions as you can, this is the stage were you should make the most of changes. Don't hold onto that staircase just because it looks good, make it feel good.</span><br />
<br />
<img src="https://i.imgur.com/0A8vxsL.png" alt="[Image: 0A8vxsL.png]" class="mycode_img" /><br />
<div style="text-align: center;" class="mycode_align"><span style="font-style: italic;" class="mycode_i">Plain and simple, nothing excessive and it plays nice.</span></div>
<br />
</div>
</div>
</div>
<ul class="mycode_list"></li>
<li><span style="font-size: large;" class="mycode_size">Logic</span></li></ul>
<span style="font-style: italic;" class="mycode_i">While it's obvious that your map should be logically correct so the player's immersion isn't broken, it also concerns all the scripting and puzzle. Logic isn't only "boxes should fall down because of gravity" and "naked guys don't fly", it's also the inner workings of the level. The thing your level accounts for. If there is a super hidden place in your level that you didn't see for the length of your development, and you put something of interest there, if someone finds it, the place will look more believable. (if the thing you put there makes sense from the story stand point)...<br />
<br />
If the player thinks that using item A on place A makes sense, the worst thing possible he can see is "You can't use this item that way", or similar message. You should account for as many logical usages as you can. That doesn't mean your extra_english.lang should be filled with messages like "I don't think using key on the location x65 y65 would work"... Just the most important ones.<br />
<br />
A good example would be from my own Mod (Amnesia: Regression), where in the first map you get a ladder. You are supposed to use that ladder to go up and get across a gap. However a logical thing to do would be to try to get down to the gap using the ladder. I added a message not only saying it's not possible, but adding that you need to go up. That however brings another problem. If the player still doesn't understand, he might try to go up through a window so I added another message there. That proves that you don't have to put millions messages, but rather the logical ones.<br />
<br />
There isn't much to say here. Similar to the previous part, it's very important to playtest your level, still without putting any details in, just making sure the level works and timing it correctly. This is the time you could start having some confidential playtesters, ideal would be your friend, or your mother. Someone who could spot mistakes you've missed.<br />
<br />
Think about what's possible to use the item on, or how could a puzzle be alternatively solved. It's a good idea to think of items or objects that could potentially break the puzzle. For example if you're looking for a bucket to fill with water, it's not a good idea to put a bucket entity, since you are looking for a bucket item. The player might question "Why can't I use this one instead?". Make a list of those items and be sure to note them when you do the next part, detail work.</span><br />
<ul class="mycode_list"></li>
<li><span style="font-size: large;" class="mycode_size">Details</span></li></ul>
<span style="font-style: italic;" class="mycode_i">Now is the time you were waiting for. This is the time you put in objects, fog, particles, lights, decals and all this good stuff.<br />
<br />
You should further emphasize the feeling of a level and most importantly, you should make final touches to help player go through your level. This is best explained on an example:</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<br />
<span style="font-style: italic;" class="mycode_i">When the map is plain and simple, it's possible for player to enter a room and look anywhere he wants. This is not really ideal, since you want to take control over player's attention and lead it towards the things that are really important for progression. We do that to minimize the player's wondering and possibilities that we would have to count with. I also minimizes the risk that player will get lost and won't play anymore. Look at this next picture. A door is supposed to be on the left side and player needs to see the door to realize it's locked and to understand what's the short-term goal for this area. Pay attention to the fact that when player enters the room he could go anywhere and would be probably looking at the window on the right, since it's light and light is a nice focal point for a lot of people. How would you solve it, how would you make player look at the door using only props? Try to come up with a solution and then read on...</span><br />
<img src="https://i.imgur.com/Xbw6YEG.png" alt="[Image: Xbw6YEG.png]" class="mycode_img" /><br />
<br />
Solution:<br />
<span style="font-style: italic;" class="mycode_i">There are many ways to do this, but if we look at the player's field of view, we can see that if we force player to go a little right, he/she would not be able to see the window first and thus look at the door by default.<br />
<br />
How do we make him/her go to the right? Using some general obstacles that make sense for the location. For this location, it's creates, since it's some kind of storage area. And as we can see from this picture, player sees the door first. We can further emphasize the point by adding light to the area, or making the whole room a little brighter. But if you can do it without changing anything, it's much better, since changing anything that is already there might break something.</span><br />
<img src="https://i.imgur.com/a1ezfgz.png" alt="[Image: a1ezfgz.png]" class="mycode_img" /><br />
<br />
</div>
</div>
</div>
<span style="font-style: italic;" class="mycode_i">If you stack these small optimizations, you avoid many pitfalls and it could bring your mod to a whole new level.</span><br />
</li></ul>
<br />
</li>
<li><span style="font-size: x-large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Optimization</span></span><br />
<span style="font-style: italic;" class="mycode_i">Though it's at the very end of this post, you could think of it as the most important. If a player gets 10 - 15 fps in your level, he/she's not going to play and anything you do is worthless.<br />
<br />
A lot of people might say<br />
"But computers are fast these days and I can't do anything in Amnesia that would be heavier than the newest Assassin's creed cape simulation."<br />
<br />
But that's not true. I'm actually going to talk about optimization in more details later in a new post, but I'm just going to point you to frictionalgames wiki, where you can find a whole article about optimization, which include:<br />
<br />
- Adding fog witch culling so things are not drawn in the distance (but be sure you can't see them appear, that's what you did in the basic shape of the map.<br />
- Less is more, you can have beautiful design with a small amount of props, just experiment.<br />
- If you can't move it, make it static.<br />
- If you can't see it, don't put it there.<br />
<br />
But as I said, I'm going to write about optimization later.</span><br />
</li></ul>
<br />
Ok guys, I hope you liked this post... I know it's large, but I really like this topic and I encourage you to not listen to me and try your approach and see what works, but don't be so focused on Amnesia, look at some new games, what are they doing? Why are you doing things you do in a new game? How do you know what to do?<br />
<br />
It might help you with your own mods.]]></description>
			<content:encoded><![CDATA[<span style="font-size: x-large;" class="mycode_size">Content:</span><ul class="mycode_list">
</li>
<li><span style="font-weight: bold;" class="mycode_b">Introduction to Level Design</span><br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Balancing your level</span><ul class="mycode_list">
</li>
<li>The Three key things<ul class="mycode_list">
</li>
<li><span style="font-style: italic;" class="mycode_i">Layout of the map</span><br />
</li>
<li><span style="font-style: italic;" class="mycode_i">Logic</span><br />
</li>
<li><span style="font-style: italic;" class="mycode_i">Details</span><br />
</li></ul>
</li></ul>
</li>
<li><span style="font-weight: bold;" class="mycode_b">Optimization</span><br />
</li></ul>
<hr class="mycode_hr" />
<ul class="mycode_list"></li>
<li><span style="font-size: x-large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Introduction to Level Design</span></span><br />
<blockquote class="mycode_quote"><cite>Bleszinski, Cliff (2000) - The Art and Science of Level Design Wrote:</cite><span style="font-style: italic;" class="mycode_i">Level design is both a technical and artistic process.</span></blockquote><br />
<span style="font-style: italic;" class="mycode_i">The Level Design itself is a large process that in many cases involves tens or even hundreds of people if not more. It has many parts and to go through all of it would take me a whole book. That's why I'm going to focus on the basic principals that might hopefully help you with your own maps in Amnesia.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">In each section, I'm going to explain what do I mean by them and establish some interesting things that you might want to keep in mind, this will be followed by a "Spoiled" dropdown containing examples with pictures.</span><br />
<br />
<span style="font-size: large;" class="mycode_size">So what are we doing here?</span><br />
<span style="font-style: italic;" class="mycode_i">Designing a level is not only about placing objects into a map. I would say it is as logical of a task as scripting, the only difference is that Amnesia won't tell you that your level design lacks readability or that your puzzle doesn't make sense.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">A good level design should guide the player through a level, helping him solve puzzles in a way that makes him feel that it was his idea in the first place. Your job as a level designer is to put everything together. All the 3D modelling, the scripting, the music composing should be brought together by a level designer.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">Thinking that the player will not jump into the so obviously deadly pit is not a good practice, since the Player could behave in any way. Just thinking about what player might try or might do requires a load of creativity and problem solving skills. You can think of it as a game of Lemmings. A 1999 DOS game where you're in charge of guiding small Lemming creatures through a level. If you don't push them into the right direction, they will surely jump from the nearest cliff or on the nearest spikes.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">So let's get into it...</span><br />
<br />
<br />
</li>
<li><span style="font-size: x-large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Balancing your level</span></span><br />
<span style="font-style: italic;" class="mycode_i">As I said earlier, it is important for a level to be balanced and I find issue with many of the current maps and mods, where the author spend much more time on one thing and left the other almost untouched. Having and amazing scripts that provide great content is almost worthless if the level design doesn't hint that there are these functions and player won't even find it.<br />
<br />
I divided the level design into these three parts. This division isn't something that you would need to remember. It is more to help you understand what you might want to pay attention to.</span><ul class="mycode_list"></li>
<li><span style="font-size: large;" class="mycode_size">The Three Key Things</span><br />
<ul class="mycode_list"></li>
<li><span style="font-size: large;" class="mycode_size">Layout of the map</span></li></ul>
<span style="font-style: italic;" class="mycode_i">The whole map creation process starts with the story of course, but that's a whole different task, so let's assume you  already know what should be in the level and where it's located.<br />
<br />
Now is the time to pay attention to using the basic assets to create the shape of your level. Here is where many map creators make their first mistakes and those are the ones that are very difficult to fix later on.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">The shape of the level should convey the emotion you want. If your story revolves around someone going deep into a dungeon, you can convey progress by using stairs that go down for places of progress and stairs going up for some optional locations. If a player then sees locked jail-door and stairs going down behind it, it is a sign that he/she needs to get there to progress.<br />
<br />
If you want to make a player feel uneasy or trapped, you can make the corridors tighter and hard to get through...<br />
<br />
Of course it is best for you to look at some examples of basic level structures. Great source of inspiration would be Half-Life 2 and its progress. Half-Life utilizes Player's abilities in its full potential. Though it is true that in Half-Life, the player wields a crowbar with which he breaks creates and barriers with a single button. Amnesia is a little bit more abstract in this sense. The Player is required to go into an inventory (first button), double click the crowbar (two more buttons) and finally click on the obstacle. That is a total of 4 click for a thing that takes one click in Half-Life, not to mention a "physics puzzle" where you actually move the crowbar, that might arise. In Half-Life, because it's such a common task, you are required to break things and use your items fairly often, in the situations that doesn't really require it, but make the progress interesting. It works, because it's simple and doesn't require that much attention. On the other side having to crowbar door every 5 minutes in Amnesia would get annoying, because it's a task consisting of more steps.<br />
<br />
But I don't want to delve into actions just yet, although it is a part of Designing a Level. Making sure that the Player knows he has an item is important and while I wouldn't put something to break with your crowbar every 5 minutes, I would throw it in a few times before he's required to use it on some serious puzzle.</span><br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<br />
<span style="font-style: italic;" class="mycode_i">Now for the examples. The thing about basic Level Shapes is that you shouldn't really pay attention to details and that's what a lot of people do wrong, if you spend hours creating one perfect little room and you can't actually connect it to anything, your work is pointless.<br />
<br />
The goal is to capture the feel and the layout of the map. Go ahead, play the map through, time how long does it take, can anything be shorter? Can you make some hallways longer? How far can you see from every point of your map? (that will come in handy while optimizing), do you want player to stay in a particular room? how are you going to achieve this? What should be highlighted? Is there enough space for the content you're planning? Can something get smaller? Isn't it too linear? Are you using vertical space enough? Ask as many questions as you can, this is the stage were you should make the most of changes. Don't hold onto that staircase just because it looks good, make it feel good.</span><br />
<br />
<img src="https://i.imgur.com/0A8vxsL.png" alt="[Image: 0A8vxsL.png]" class="mycode_img" /><br />
<div style="text-align: center;" class="mycode_align"><span style="font-style: italic;" class="mycode_i">Plain and simple, nothing excessive and it plays nice.</span></div>
<br />
</div>
</div>
</div>
<ul class="mycode_list"></li>
<li><span style="font-size: large;" class="mycode_size">Logic</span></li></ul>
<span style="font-style: italic;" class="mycode_i">While it's obvious that your map should be logically correct so the player's immersion isn't broken, it also concerns all the scripting and puzzle. Logic isn't only "boxes should fall down because of gravity" and "naked guys don't fly", it's also the inner workings of the level. The thing your level accounts for. If there is a super hidden place in your level that you didn't see for the length of your development, and you put something of interest there, if someone finds it, the place will look more believable. (if the thing you put there makes sense from the story stand point)...<br />
<br />
If the player thinks that using item A on place A makes sense, the worst thing possible he can see is "You can't use this item that way", or similar message. You should account for as many logical usages as you can. That doesn't mean your extra_english.lang should be filled with messages like "I don't think using key on the location x65 y65 would work"... Just the most important ones.<br />
<br />
A good example would be from my own Mod (Amnesia: Regression), where in the first map you get a ladder. You are supposed to use that ladder to go up and get across a gap. However a logical thing to do would be to try to get down to the gap using the ladder. I added a message not only saying it's not possible, but adding that you need to go up. That however brings another problem. If the player still doesn't understand, he might try to go up through a window so I added another message there. That proves that you don't have to put millions messages, but rather the logical ones.<br />
<br />
There isn't much to say here. Similar to the previous part, it's very important to playtest your level, still without putting any details in, just making sure the level works and timing it correctly. This is the time you could start having some confidential playtesters, ideal would be your friend, or your mother. Someone who could spot mistakes you've missed.<br />
<br />
Think about what's possible to use the item on, or how could a puzzle be alternatively solved. It's a good idea to think of items or objects that could potentially break the puzzle. For example if you're looking for a bucket to fill with water, it's not a good idea to put a bucket entity, since you are looking for a bucket item. The player might question "Why can't I use this one instead?". Make a list of those items and be sure to note them when you do the next part, detail work.</span><br />
<ul class="mycode_list"></li>
<li><span style="font-size: large;" class="mycode_size">Details</span></li></ul>
<span style="font-style: italic;" class="mycode_i">Now is the time you were waiting for. This is the time you put in objects, fog, particles, lights, decals and all this good stuff.<br />
<br />
You should further emphasize the feeling of a level and most importantly, you should make final touches to help player go through your level. This is best explained on an example:</span><br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<br />
<span style="font-style: italic;" class="mycode_i">When the map is plain and simple, it's possible for player to enter a room and look anywhere he wants. This is not really ideal, since you want to take control over player's attention and lead it towards the things that are really important for progression. We do that to minimize the player's wondering and possibilities that we would have to count with. I also minimizes the risk that player will get lost and won't play anymore. Look at this next picture. A door is supposed to be on the left side and player needs to see the door to realize it's locked and to understand what's the short-term goal for this area. Pay attention to the fact that when player enters the room he could go anywhere and would be probably looking at the window on the right, since it's light and light is a nice focal point for a lot of people. How would you solve it, how would you make player look at the door using only props? Try to come up with a solution and then read on...</span><br />
<img src="https://i.imgur.com/Xbw6YEG.png" alt="[Image: Xbw6YEG.png]" class="mycode_img" /><br />
<br />
Solution:<br />
<span style="font-style: italic;" class="mycode_i">There are many ways to do this, but if we look at the player's field of view, we can see that if we force player to go a little right, he/she would not be able to see the window first and thus look at the door by default.<br />
<br />
How do we make him/her go to the right? Using some general obstacles that make sense for the location. For this location, it's creates, since it's some kind of storage area. And as we can see from this picture, player sees the door first. We can further emphasize the point by adding light to the area, or making the whole room a little brighter. But if you can do it without changing anything, it's much better, since changing anything that is already there might break something.</span><br />
<img src="https://i.imgur.com/a1ezfgz.png" alt="[Image: a1ezfgz.png]" class="mycode_img" /><br />
<br />
</div>
</div>
</div>
<span style="font-style: italic;" class="mycode_i">If you stack these small optimizations, you avoid many pitfalls and it could bring your mod to a whole new level.</span><br />
</li></ul>
<br />
</li>
<li><span style="font-size: x-large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Optimization</span></span><br />
<span style="font-style: italic;" class="mycode_i">Though it's at the very end of this post, you could think of it as the most important. If a player gets 10 - 15 fps in your level, he/she's not going to play and anything you do is worthless.<br />
<br />
A lot of people might say<br />
"But computers are fast these days and I can't do anything in Amnesia that would be heavier than the newest Assassin's creed cape simulation."<br />
<br />
But that's not true. I'm actually going to talk about optimization in more details later in a new post, but I'm just going to point you to frictionalgames wiki, where you can find a whole article about optimization, which include:<br />
<br />
- Adding fog witch culling so things are not drawn in the distance (but be sure you can't see them appear, that's what you did in the basic shape of the map.<br />
- Less is more, you can have beautiful design with a small amount of props, just experiment.<br />
- If you can't move it, make it static.<br />
- If you can't see it, don't put it there.<br />
<br />
But as I said, I'm going to write about optimization later.</span><br />
</li></ul>
<br />
Ok guys, I hope you liked this post... I know it's large, but I really like this topic and I encourage you to not listen to me and try your approach and see what works, but don't be so focused on Amnesia, look at some new games, what are they doing? Why are you doing things you do in a new game? How do you know what to do?<br />
<br />
It might help you with your own mods.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Activating a random monster]]></title>
			<link>https://www.frictionalgames.com/forum/thread-30490.html</link>
			<pubDate>Tue, 01 Sep 2015 16:59:25 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-30490.html</guid>
			<description><![CDATA[Hi there. I wrote a small and easy script that basically randomizes which enemy shall spawn. As I said, it's small and easy to use and modify, so it should suit your needs. There is no limit for randomizing the monsters that are spawned so you can achieve some pretty jolly effects.<br />
<br />
<span style="color: #006400;" class="mycode_color"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">The code:</span></span></span><br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;OnStart</span><span style="color: #007700">()<br />{<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddEntityCollideCallback</span><span style="color: #007700">(</span><span style="color: #DD0000">"Player"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Activate_Monster"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"CollideAreaActivateMonster"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />&nbsp;<br />}<br />&nbsp;<br /></span><span style="color: #0000BB">void&nbsp;CollideAreaActivateMonster</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asParent</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asChild</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;alState</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;iRand&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">RandInt</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">MonsterPick&nbsp;</span><span style="color: #007700">=&nbsp;{</span><span style="color: #DD0000">"servant_grunt_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"servant_brute_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"enemy_suitor_1"</span><span style="color: #007700">};<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetEntityActive</span><span style="color: #007700">(</span><span style="color: #0000BB">MonsterPick</span><span style="color: #007700">[</span><span style="color: #0000BB">iRand</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddDebugMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">"pick"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />}&nbsp;<br /></span></code></div></div></div><br />
</div>
</div>
</div>
<br />
<span style="color: #006400;" class="mycode_color"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Explanation:</span></span></span><br />
<br />
Frist of all, we're creating a script area where the script shall be executed. Then, place any monsters you want, wherever you want. Un - tick "Active" in "General" entity tab. At this point, it should look similiar to this:<br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<img src="http://i.imgur.com/a5draHI.jpg" alt="[Image: a5draHI.jpg]" class="mycode_img" /><br />
</div>
</div>
</div>
<br />
You can notice a grunt, brute and suitor. Copy their names from "General" tab, and paste into following line in the script:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">MonsterPick&nbsp;</span><span style="color: #007700">=&nbsp;{</span><span style="color: #DD0000">"servant_grunt_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"servant_brute_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"enemy_suitor_1"</span><span style="color: #007700">};&nbsp;<br /></span></code></div></div></div><br />
This is how it should look like for having three enemies. If you want more, you need to change this:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">int&nbsp;iRand&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">RandInt</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
into this (example for having 5 random monsters)<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">int&nbsp;iRand&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">RandInt</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
The first entity to spawn using this iRand thing is always 0. Treat 0 as 1 in this case, so it basically looks for a monsters 0-4 (1-5)<br />
<br />
You can of course use, modify and share this script. Again, it's nothing complicated, just thought it might be useful for some folks. No need to give me credits. <br />
<br />
Hope it's useful in some sort of way!<br />
<br />
Oh, almost forgot. There is a debug message in this script, you can of course remove it.]]></description>
			<content:encoded><![CDATA[Hi there. I wrote a small and easy script that basically randomizes which enemy shall spawn. As I said, it's small and easy to use and modify, so it should suit your needs. There is no limit for randomizing the monsters that are spawned so you can achieve some pretty jolly effects.<br />
<br />
<span style="color: #006400;" class="mycode_color"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">The code:</span></span></span><br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;OnStart</span><span style="color: #007700">()<br />{<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddEntityCollideCallback</span><span style="color: #007700">(</span><span style="color: #DD0000">"Player"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Activate_Monster"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"CollideAreaActivateMonster"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />&nbsp;<br />}<br />&nbsp;<br /></span><span style="color: #0000BB">void&nbsp;CollideAreaActivateMonster</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asParent</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asChild</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;alState</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;iRand&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">RandInt</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">MonsterPick&nbsp;</span><span style="color: #007700">=&nbsp;{</span><span style="color: #DD0000">"servant_grunt_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"servant_brute_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"enemy_suitor_1"</span><span style="color: #007700">};<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetEntityActive</span><span style="color: #007700">(</span><span style="color: #0000BB">MonsterPick</span><span style="color: #007700">[</span><span style="color: #0000BB">iRand</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddDebugMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">"pick"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />}&nbsp;<br /></span></code></div></div></div><br />
</div>
</div>
</div>
<br />
<span style="color: #006400;" class="mycode_color"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Explanation:</span></span></span><br />
<br />
Frist of all, we're creating a script area where the script shall be executed. Then, place any monsters you want, wherever you want. Un - tick "Active" in "General" entity tab. At this point, it should look similiar to this:<br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<img src="http://i.imgur.com/a5draHI.jpg" alt="[Image: a5draHI.jpg]" class="mycode_img" /><br />
</div>
</div>
</div>
<br />
You can notice a grunt, brute and suitor. Copy their names from "General" tab, and paste into following line in the script:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">string</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">MonsterPick&nbsp;</span><span style="color: #007700">=&nbsp;{</span><span style="color: #DD0000">"servant_grunt_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"servant_brute_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"enemy_suitor_1"</span><span style="color: #007700">};&nbsp;<br /></span></code></div></div></div><br />
This is how it should look like for having three enemies. If you want more, you need to change this:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">int&nbsp;iRand&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">RandInt</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
into this (example for having 5 random monsters)<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">int&nbsp;iRand&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">RandInt</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
The first entity to spawn using this iRand thing is always 0. Treat 0 as 1 in this case, so it basically looks for a monsters 0-4 (1-5)<br />
<br />
You can of course use, modify and share this script. Again, it's nothing complicated, just thought it might be useful for some folks. No need to give me credits. <br />
<br />
Hope it's useful in some sort of way!<br />
<br />
Oh, almost forgot. There is a debug message in this script, you can of course remove it.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Model is messed in Modelview?!]]></title>
			<link>https://www.frictionalgames.com/forum/thread-29811.html</link>
			<pubDate>Fri, 10 Apr 2015 14:30:53 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-29811.html</guid>
			<description><![CDATA[I made a model, a bridge like thing, for amnesia. it was supposed to be a test object, but since i worked like 2/3 days, i am going to use it as my second bridge.<br />
i made it with like, 16 Objects (cylinder x6 and some planks- BOX scaled)<br />
i did everything i had to do, but if i open my .dae file on modelviewer, everything was mixed up!!! like, 4 cylindeR_pyramid is standing where it is supposed, to be standing, but the plansk are GONE, the cylinders are in East china (really far away).. i heard that you need to combine you're items, i did, but it only worked for the cylinder_pyramids, if i want to combine the other is says : // Error: Invalid selection : polyUnite needs at least 2 polygonal objects.]]></description>
			<content:encoded><![CDATA[I made a model, a bridge like thing, for amnesia. it was supposed to be a test object, but since i worked like 2/3 days, i am going to use it as my second bridge.<br />
i made it with like, 16 Objects (cylinder x6 and some planks- BOX scaled)<br />
i did everything i had to do, but if i open my .dae file on modelviewer, everything was mixed up!!! like, 4 cylindeR_pyramid is standing where it is supposed, to be standing, but the plansk are GONE, the cylinders are in East china (really far away).. i heard that you need to combine you're items, i did, but it only worked for the cylinder_pyramids, if i want to combine the other is says : // Error: Invalid selection : polyUnite needs at least 2 polygonal objects.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[3D Animations and Blender]]></title>
			<link>https://www.frictionalgames.com/forum/thread-29727.html</link>
			<pubDate>Sun, 08 Mar 2015 16:28:26 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-29727.html</guid>
			<description><![CDATA[So, for anyone here who wants to pursue animated 3D modeling but can't get Maya for whatever reason, I made a breakthrough last week.<br />
<br />
Thanks to the 1.3 update to Amnesia, it's now possible to import animated Blender models provided they were exported in .fbx format! Unfortunately, there are some quirks to be addressed in order to get your model working:<br />
<br />
1. This may apply to all .fbx files, but regardless, make sure your material name in Blender is identical to the name of the dds files you want applied. This quirk I didn't notice with .dae files, but still, if you don't follow this rule with .fbx's, the model viewer will crash, and the model editor will display an invisible mesh.<br />
<br />
2. For animated models, there's a chance that not all vertices will be attached to a bone, as I learned the hard way with a model I exported from Halo for testing. The simplest fix for this is to separate all the faces from each other in Blender, which, unfortunately, will result in flat shading instead of the more realistic smooth shading, but this side effect can be made more subtle with a high polygon count. If anyone else who's succeeded with Blender managed to implement a better fix, by all means, let me know.<br />
<br />
UPDATE: the most effective way to correct broken vertices for rigged models without sacrificing smooth shading: when you export your Blender model to FBX, make sure that all edges are split, like before, and that you enable face smoothing, the latter being in the FBX export settings.<br />
<br />
So, bearing these tips in mind, you'll now be able to feasibly have custom-modeled NPC's and enemies in Amnesia without use of Maya!<br />
<br />
Apologies if I posted old news; I just don't see anything about this in the development wiki.]]></description>
			<content:encoded><![CDATA[So, for anyone here who wants to pursue animated 3D modeling but can't get Maya for whatever reason, I made a breakthrough last week.<br />
<br />
Thanks to the 1.3 update to Amnesia, it's now possible to import animated Blender models provided they were exported in .fbx format! Unfortunately, there are some quirks to be addressed in order to get your model working:<br />
<br />
1. This may apply to all .fbx files, but regardless, make sure your material name in Blender is identical to the name of the dds files you want applied. This quirk I didn't notice with .dae files, but still, if you don't follow this rule with .fbx's, the model viewer will crash, and the model editor will display an invisible mesh.<br />
<br />
2. For animated models, there's a chance that not all vertices will be attached to a bone, as I learned the hard way with a model I exported from Halo for testing. The simplest fix for this is to separate all the faces from each other in Blender, which, unfortunately, will result in flat shading instead of the more realistic smooth shading, but this side effect can be made more subtle with a high polygon count. If anyone else who's succeeded with Blender managed to implement a better fix, by all means, let me know.<br />
<br />
UPDATE: the most effective way to correct broken vertices for rigged models without sacrificing smooth shading: when you export your Blender model to FBX, make sure that all edges are split, like before, and that you enable face smoothing, the latter being in the FBX export settings.<br />
<br />
So, bearing these tips in mind, you'll now be able to feasibly have custom-modeled NPC's and enemies in Amnesia without use of Maya!<br />
<br />
Apologies if I posted old news; I just don't see anything about this in the development wiki.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Animated Character/Monster For HPL2 Tutorial Series]]></title>
			<link>https://www.frictionalgames.com/forum/thread-29618.html</link>
			<pubDate>Sun, 15 Feb 2015 13:43:52 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-29618.html</guid>
			<description><![CDATA[So as I released my monster pack about a week ago I also decided to make an in-depth video tutorial series on how to make one. Specifically for HPL2, as there are very few tutorials on this subject. Now I'm not a proffesional so don't expect proffesional quality here, but I think I know enough to be able to show my personal workflow on how to make a decent monster, and hopefully teach something.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">I will cover pretty much every step of how I made a functional and animated monster that you see in the image below. </span><br />
<br />
                   <img src="http://i.imgur.com/XwEfcoZ.jpg" alt="[Image: XwEfcoZ.jpg]" class="mycode_img" /><br />
<br />
The tutorial is aimed mostly towards beginners and for those who are a bit more expierenced but don't quite know how to approach the pipeline of a character, or a monster production. For HPL2 or even other game engine. <span style="font-weight: bold;" class="mycode_b">The end result of your own monster will depend alot on your anatomy, modelling, texturing and animation skills/expierence</span>, but feel free to follow me and a make similiar/same monster as best as you can so that you learn as much as possible by actually doing, and not just watching. <br />
<br />
<span style="font-style: italic;" class="mycode_i">If you already have a monster and just want to know how to for example - rig it, animate it or export, feel free to skip through the parts of my tutorial depending on what you want to do/learn.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 1</span> - <span style="text-decoration: underline;" class="mycode_u">Introduction and Designing The Monster</span>: <a href="https://www.youtube.com/watch?v=jw3FuWb3OQQ" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=jw3FuWb3OQQ</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 2</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Base Mesh And Sculpting</span>: <a href="https://www.youtube.com/watch?v=GRFVdSA1cIk" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=GRFVdSA1cIk</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 3</span> - <span style="text-decoration: underline;" class="mycode_u">Detail Sculpting</span>: <a href="https://www.youtube.com/watch?v=p0zrTois3Pw" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=p0zrTois3Pw</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 4 </span>- <span style="text-decoration: underline;" class="mycode_u">Polypainting</span>: <a href="https://www.youtube.com/watch?v=AnwPWcEY_gU" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=AnwPWcEY_gU</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 5</span> -<span style="text-decoration: underline;" class="mycode_u"> Making The Game Model And UV Unwrapping</span>: <a href="https://www.youtube.com/watch?v=h6colArmKo8" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=h6colArmKo8</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 6</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Texture Maps</span>: <a href="https://www.youtube.com/watch?v=w8McUIWXaTs" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=w8McUIWXaTs</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 7</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Skeleton And Skinning</span>: <a href="https://www.youtube.com/watch?v=Qf8WQxlYuFM" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=Qf8WQxlYuFM</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 8</span> - <span style="text-decoration: underline;" class="mycode_u">Adding IKs, Simple Controls And Exporting The Skeletal Mesh To HPL2</span>: <a href="https://www.youtube.com/watch?v=G4cBo1ETX6k" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=G4cBo1ETX6k</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 9</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Idle Animation</span>: <a href="https://www.youtube.com/watch?v=TZDxeZve5TE" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=TZDxeZve5TE</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 10</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Walk Animation</span>: <a href="https://www.youtube.com/watch?v=LnJo3_KOPfs" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=LnJo3_KOPfs</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 11</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Run Animation</span>: <a href="https://www.youtube.com/watch?v=X3wMuN5Io1Y" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=X3wMuN5Io1Y</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 12</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Attack Animation</span>: <a href="https://www.youtube.com/watch?v=pNlNZAUEkXU" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=pNlNZAUEkXU</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 13</span> - <span style="text-decoration: underline;" class="mycode_u">Setting Up The Monster</span>: <a href="https://www.youtube.com/watch?v=4qJnmMgN3tw" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=4qJnmMgN3tw</a><br />
<br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b">Tutorial Files:</span></span></span> (<span style="font-style: italic;" class="mycode_i">All the files from the tutorial including the Zbrush file, Maya files, and other.)</span><br />
<br />
<a href="http://www.mediafire.com/download/q8bewq9e0df2uvi/Monster+Tutorial.rar" target="_blank" rel="noopener" class="mycode_url">http://www.mediafire.com/download/q8bewq...torial.rar</a><br />
<br />
<span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b">(Of course if you're going to use this monster from this download in your project, a proper credit is required, unless you made the entire monster yourself) </span></span><br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Software And Hardware Used</span>:</span> </span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Adobe Photoshop CS6 </span><span style="font-style: italic;" class="mycode_i">(Alternative: Gimp)</span> -<span style="text-decoration: underline;" class="mycode_u"> Used for desinging the monster and composing the texture maps</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Zbrush 4R6</span> <span style="font-style: italic;" class="mycode_i">(Alternative: Mudbox, Blender, or other sculpting program)</span> - <span style="text-decoration: underline;" class="mycode_u">Used for making the base mesh, sculpting, polypaiting and making the game resolution mesh</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Blender 2.73</span> - <span style="text-decoration: underline;" class="mycode_u">Used for cleaning up the game mesh and UV unrwrapping</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Xnormal</span> - <span style="text-decoration: underline;" class="mycode_u">Used for baking the texture maps</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Maya 2011</span> - <span style="text-decoration: underline;" class="mycode_u">Used for rigging, animating and exporting</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Wacom Intuos Pro Medium</span> <span style="font-style: italic;" class="mycode_i">(Lower budget tablets like Bamboo will also do fine. I used Bamboo Small for 2 years and made all my ILE monsters with it before I moved on to Intuos. So don't think that you need a good tablet to become good at this)</span> - <span style="text-decoration: underline;" class="mycode_u">Used for sketching, painting and sculpting. A tablet is a must if you want to make a good looking character/monster.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">Even though my tutorial is aimed towards beginners I won't be covering the basics of each software as basic knowledge of how to use these programs should be expected from the viewer. However you don't have to use the exact same programs as I do. You can for example use different software for sculpting like Mudbox or even Blender if that's what you prefer to use.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u">Tips/Notes:</span></span></span><br />
<br />
Making a character/monster/creature is different from making hard surface stuff like furniture and requires alot more "side" knowledge and artistic skills. Knowing anatomy will probably help you the most when it comes to designing and sculpting your character, monster or creature so I highly recommend studying it or atleast using references. Knowing how muscles work together will also help when skinning and animating. <br />
<br />
<span style="font-style: italic;" class="mycode_i">In the part where I make the game resolution mesh I use Zremesher instead of making the retopology myself. That's because I didn't had enough time to do that and also because most beginners aren't too good at making good topology so Zremesher will actually give them a better result than if they would do it themselfs. That being said, being able to make the retoplogy yourself is alot more useful, so I highly recommend looking into it and practicing it, as it will make you a better 3D artist and give you a better result than Zremesher if done well.<br />
<br />
When it comes to diffuse I only use the texture detail from my polypaint as it's often enough for me. But feel free to add extra detail using different textures when composing your texture maps inside Photoshop (or Gimp).</span><br />
<br />
<span style="text-decoration: underline;" class="mycode_u">Lastly, I hope I'm clear enough in the videos, I blame my eastern european accent if I'm not. Feel free to ask me in the comments or in the thread here if you're not sure about something, having trouble or just don't understand what I'm talking about in the videos.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">I also want to specifically thank <span style="font-weight: bold;" class="mycode_b">Crisosphinx</span> who helped me alot with animation and HPL2 about 2 years ago when I just started.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Hope this article and the videos will be able to help some of you or atleast teach something new!</span><br />
<br />
Happy monster making! <img src="https://www.frictionalgames.com/forum/images/smilies/smile.gif" alt="Smile" title="Smile" class="smilie smilie_1" />]]></description>
			<content:encoded><![CDATA[So as I released my monster pack about a week ago I also decided to make an in-depth video tutorial series on how to make one. Specifically for HPL2, as there are very few tutorials on this subject. Now I'm not a proffesional so don't expect proffesional quality here, but I think I know enough to be able to show my personal workflow on how to make a decent monster, and hopefully teach something.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">I will cover pretty much every step of how I made a functional and animated monster that you see in the image below. </span><br />
<br />
                   <img src="http://i.imgur.com/XwEfcoZ.jpg" alt="[Image: XwEfcoZ.jpg]" class="mycode_img" /><br />
<br />
The tutorial is aimed mostly towards beginners and for those who are a bit more expierenced but don't quite know how to approach the pipeline of a character, or a monster production. For HPL2 or even other game engine. <span style="font-weight: bold;" class="mycode_b">The end result of your own monster will depend alot on your anatomy, modelling, texturing and animation skills/expierence</span>, but feel free to follow me and a make similiar/same monster as best as you can so that you learn as much as possible by actually doing, and not just watching. <br />
<br />
<span style="font-style: italic;" class="mycode_i">If you already have a monster and just want to know how to for example - rig it, animate it or export, feel free to skip through the parts of my tutorial depending on what you want to do/learn.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 1</span> - <span style="text-decoration: underline;" class="mycode_u">Introduction and Designing The Monster</span>: <a href="https://www.youtube.com/watch?v=jw3FuWb3OQQ" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=jw3FuWb3OQQ</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 2</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Base Mesh And Sculpting</span>: <a href="https://www.youtube.com/watch?v=GRFVdSA1cIk" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=GRFVdSA1cIk</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 3</span> - <span style="text-decoration: underline;" class="mycode_u">Detail Sculpting</span>: <a href="https://www.youtube.com/watch?v=p0zrTois3Pw" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=p0zrTois3Pw</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 4 </span>- <span style="text-decoration: underline;" class="mycode_u">Polypainting</span>: <a href="https://www.youtube.com/watch?v=AnwPWcEY_gU" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=AnwPWcEY_gU</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 5</span> -<span style="text-decoration: underline;" class="mycode_u"> Making The Game Model And UV Unwrapping</span>: <a href="https://www.youtube.com/watch?v=h6colArmKo8" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=h6colArmKo8</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 6</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Texture Maps</span>: <a href="https://www.youtube.com/watch?v=w8McUIWXaTs" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=w8McUIWXaTs</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 7</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Skeleton And Skinning</span>: <a href="https://www.youtube.com/watch?v=Qf8WQxlYuFM" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=Qf8WQxlYuFM</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 8</span> - <span style="text-decoration: underline;" class="mycode_u">Adding IKs, Simple Controls And Exporting The Skeletal Mesh To HPL2</span>: <a href="https://www.youtube.com/watch?v=G4cBo1ETX6k" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=G4cBo1ETX6k</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 9</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Idle Animation</span>: <a href="https://www.youtube.com/watch?v=TZDxeZve5TE" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=TZDxeZve5TE</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 10</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Walk Animation</span>: <a href="https://www.youtube.com/watch?v=LnJo3_KOPfs" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=LnJo3_KOPfs</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 11</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Run Animation</span>: <a href="https://www.youtube.com/watch?v=X3wMuN5Io1Y" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=X3wMuN5Io1Y</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 12</span> - <span style="text-decoration: underline;" class="mycode_u">Making The Attack Animation</span>: <a href="https://www.youtube.com/watch?v=pNlNZAUEkXU" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=pNlNZAUEkXU</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Part 13</span> - <span style="text-decoration: underline;" class="mycode_u">Setting Up The Monster</span>: <a href="https://www.youtube.com/watch?v=4qJnmMgN3tw" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=4qJnmMgN3tw</a><br />
<br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b">Tutorial Files:</span></span></span> (<span style="font-style: italic;" class="mycode_i">All the files from the tutorial including the Zbrush file, Maya files, and other.)</span><br />
<br />
<a href="http://www.mediafire.com/download/q8bewq9e0df2uvi/Monster+Tutorial.rar" target="_blank" rel="noopener" class="mycode_url">http://www.mediafire.com/download/q8bewq...torial.rar</a><br />
<br />
<span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b">(Of course if you're going to use this monster from this download in your project, a proper credit is required, unless you made the entire monster yourself) </span></span><br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Software And Hardware Used</span>:</span> </span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Adobe Photoshop CS6 </span><span style="font-style: italic;" class="mycode_i">(Alternative: Gimp)</span> -<span style="text-decoration: underline;" class="mycode_u"> Used for desinging the monster and composing the texture maps</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Zbrush 4R6</span> <span style="font-style: italic;" class="mycode_i">(Alternative: Mudbox, Blender, or other sculpting program)</span> - <span style="text-decoration: underline;" class="mycode_u">Used for making the base mesh, sculpting, polypaiting and making the game resolution mesh</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Blender 2.73</span> - <span style="text-decoration: underline;" class="mycode_u">Used for cleaning up the game mesh and UV unrwrapping</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Xnormal</span> - <span style="text-decoration: underline;" class="mycode_u">Used for baking the texture maps</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Maya 2011</span> - <span style="text-decoration: underline;" class="mycode_u">Used for rigging, animating and exporting</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Wacom Intuos Pro Medium</span> <span style="font-style: italic;" class="mycode_i">(Lower budget tablets like Bamboo will also do fine. I used Bamboo Small for 2 years and made all my ILE monsters with it before I moved on to Intuos. So don't think that you need a good tablet to become good at this)</span> - <span style="text-decoration: underline;" class="mycode_u">Used for sketching, painting and sculpting. A tablet is a must if you want to make a good looking character/monster.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">Even though my tutorial is aimed towards beginners I won't be covering the basics of each software as basic knowledge of how to use these programs should be expected from the viewer. However you don't have to use the exact same programs as I do. You can for example use different software for sculpting like Mudbox or even Blender if that's what you prefer to use.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u">Tips/Notes:</span></span></span><br />
<br />
Making a character/monster/creature is different from making hard surface stuff like furniture and requires alot more "side" knowledge and artistic skills. Knowing anatomy will probably help you the most when it comes to designing and sculpting your character, monster or creature so I highly recommend studying it or atleast using references. Knowing how muscles work together will also help when skinning and animating. <br />
<br />
<span style="font-style: italic;" class="mycode_i">In the part where I make the game resolution mesh I use Zremesher instead of making the retopology myself. That's because I didn't had enough time to do that and also because most beginners aren't too good at making good topology so Zremesher will actually give them a better result than if they would do it themselfs. That being said, being able to make the retoplogy yourself is alot more useful, so I highly recommend looking into it and practicing it, as it will make you a better 3D artist and give you a better result than Zremesher if done well.<br />
<br />
When it comes to diffuse I only use the texture detail from my polypaint as it's often enough for me. But feel free to add extra detail using different textures when composing your texture maps inside Photoshop (or Gimp).</span><br />
<br />
<span style="text-decoration: underline;" class="mycode_u">Lastly, I hope I'm clear enough in the videos, I blame my eastern european accent if I'm not. Feel free to ask me in the comments or in the thread here if you're not sure about something, having trouble or just don't understand what I'm talking about in the videos.</span><br />
<br />
<span style="font-style: italic;" class="mycode_i">I also want to specifically thank <span style="font-weight: bold;" class="mycode_b">Crisosphinx</span> who helped me alot with animation and HPL2 about 2 years ago when I just started.</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Hope this article and the videos will be able to help some of you or atleast teach something new!</span><br />
<br />
Happy monster making! <img src="https://www.frictionalgames.com/forum/images/smilies/smile.gif" alt="Smile" title="Smile" class="smilie smilie_1" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Creating a model [September 2014]]]></title>
			<link>https://www.frictionalgames.com/forum/thread-26177.html</link>
			<pubDate>Tue, 16 Sep 2014 23:36:52 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-26177.html</guid>
			<description><![CDATA[<span style="font-style: italic;" class="mycode_i">Introduction:</span><br />
<br />
This will basically be a tutorial where I go over Maya/Xnormal/DDO. Using DDO (an add-on to photoshop) will speed up your process a lot! It allows you to quickly create something looking quite nice. <br />
<br />
<a href="http://quixel.se/dev/ddo" target="_blank" rel="noopener" class="mycode_url">http://quixel.se/dev/ddo</a><br />
<br />
"Get Legacy DDO" at the bottom!<br />
<br />
<a href="http://www.xnormal.net/1.aspx" target="_blank" rel="noopener" class="mycode_url">http://www.xnormal.net/1.aspx</a><br />
<br />
Xnormal, for baking.<br />
<br />
<a href="https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools" target="_blank" rel="noopener" class="mycode_url">https://github.com/KhronosGroup/OpenCOLL...LADA-Tools</a><br />
<br />
OpenCollada, for exporting stuff to Amnesia.<br />
<br />
<span style="font-style: italic;" class="mycode_i"><span style="font-weight: bold;" class="mycode_b">The videos</span></span><br />
Part 1:<br />
<a href="https://www.youtube.com/watch?v=4P5K1pDdlkk&amp;list=UUvfJzS8Gbe30ycD8eDUjeIQ" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=4P5K1pDd...cD8eDUjeIQ</a><br />
<br />
Part 2:<br />
<a href="https://www.youtube.com/watch?v=bBHTtm6kfxw&amp;list=UUvfJzS8Gbe30ycD8eDUjeIQ" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=bBHTtm6k...cD8eDUjeIQ</a><br />
<br />
Questions, comments etc. go below.<br />
<br />
Best of luck :]]]></description>
			<content:encoded><![CDATA[<span style="font-style: italic;" class="mycode_i">Introduction:</span><br />
<br />
This will basically be a tutorial where I go over Maya/Xnormal/DDO. Using DDO (an add-on to photoshop) will speed up your process a lot! It allows you to quickly create something looking quite nice. <br />
<br />
<a href="http://quixel.se/dev/ddo" target="_blank" rel="noopener" class="mycode_url">http://quixel.se/dev/ddo</a><br />
<br />
"Get Legacy DDO" at the bottom!<br />
<br />
<a href="http://www.xnormal.net/1.aspx" target="_blank" rel="noopener" class="mycode_url">http://www.xnormal.net/1.aspx</a><br />
<br />
Xnormal, for baking.<br />
<br />
<a href="https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools" target="_blank" rel="noopener" class="mycode_url">https://github.com/KhronosGroup/OpenCOLL...LADA-Tools</a><br />
<br />
OpenCollada, for exporting stuff to Amnesia.<br />
<br />
<span style="font-style: italic;" class="mycode_i"><span style="font-weight: bold;" class="mycode_b">The videos</span></span><br />
Part 1:<br />
<a href="https://www.youtube.com/watch?v=4P5K1pDdlkk&amp;list=UUvfJzS8Gbe30ycD8eDUjeIQ" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=4P5K1pDd...cD8eDUjeIQ</a><br />
<br />
Part 2:<br />
<a href="https://www.youtube.com/watch?v=bBHTtm6kfxw&amp;list=UUvfJzS8Gbe30ycD8eDUjeIQ" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=bBHTtm6k...cD8eDUjeIQ</a><br />
<br />
Questions, comments etc. go below.<br />
<br />
Best of luck :]]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Variables]]></title>
			<link>https://www.frictionalgames.com/forum/thread-26129.html</link>
			<pubDate>Sun, 14 Sep 2014 21:25:47 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-26129.html</guid>
			<description><![CDATA[<span style="font-size: x-large;" class="mycode_size"><div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b">Variables</span></div></span><br />
<br />
I was asked how variables work, and I'm in the mood for creating a little tutorial, so here you are ^_^<br />
<br />
<span style="font-size: small;" class="mycode_size">(Also, I hope this hasn't already been covered)</span><br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u">1. What is a variable?</span></span><br />
<br />
Before I start, if there's some clever guy out there, who thinks I'm saying something wrong, do correct me.<br />
<br />
<br />
In Amnesia we work with 4 different variable-types.<br />
<ul class="mycode_list">
</li>
<li><span style="font-weight: bold;" class="mycode_b">Integer</span> (Referred to as <span style="font-style: italic;" class="mycode_i">int</span>)<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Float</span><br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Boolean</span> (Referred to as <span style="font-style: italic;" class="mycode_i">bool</span>)<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">String</span><br />
</li></ul>
<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Integers</span><br />
Integers are numbers without decimals. Whole numbers.<br />
<br />
It's simple:<br />
1 is an int.<br />
1.5 is not an int.<br />
<br />
Integers don't often appear in the script-lines used in Amnesia. They use floats instead.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Floats</span><br />
Floats are the opposite.<br />
<br />
Floats are numbers with decimals, but you can still use whole numbers.<br />
<br />
1.5 is a float.<br />
1 is also a float, but will (I assume) be seen as 1.0<br />
<br />
A line you've probably used is:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">FadeOut</span><span style="color: #007700">(</span><span style="color: #0000BB">float&nbsp;afTime</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>Note that 'float' is for how long it takes for the screen to go black.<br />
You probably only write 1 or 2, but the game will see it as 1.0 or 2.0.<br />
<br />
So, in fact, you could actually have the game fade to black in 1.5 seconds.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Booleans</span><br />
Bools are not numbers, but will either be true or false.<br />
<br />
You have probably used the following script-line.<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">SetPlayerActive</span><span style="color: #007700">(</span><span style="color: #0000BB">bool&nbsp;abActive</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>Note that 'bool' here refers to either be <span style="font-style: italic;" class="mycode_i">true</span> or <span style="font-style: italic;" class="mycode_i">false</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Strings</span><br />
A string is a word. Can consist of letters, but also be numbers.<br />
<br />
"Hello" is a string.<br />
"Over9000" is also a string.<br />
"9000" is also a string (I assume). But cannot be transferred into an int or float directly. You'd need something else first.<br />
<br />
Maybe you've tried to remove a timer before.<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">RemoveTimer</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>Note that 'string' here refers to the name of a timer.<br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u">2. So how do I use a variable?</span></span><br />
Good question.<br />
<br />
For integers and floats we'll just go through some simple steps.<br />
<br />
<ol type="1" class="mycode_list">
</li>
<li>Give the variable a name<br />
</li>
<li>Give the variable a number<br />
</li>
<li>Set it in a script-line<br />
</li></ol>
<br />
When you've thought about the first two steps, lets finish it by doing the third.<br />
In this tutorial name will be "NAME" and number will be 1.<br />
<br />
To set a variable<br />
<ul class="mycode_list">
</li>
<li>for ints use<br />
</li></ul>
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><ul class="mycode_list">
</li>
<li>for floats use<br />
</li></ul>
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">SetLocalVarFloat</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1.0</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
<br />
That wasn't so hard, was it?<br />
<br />
We can do the same with strings. Just instead of using a number, we will be using a word.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">SetLocalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"WORD"</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Notice, how this works the exact same way? Awesome!<br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u">3. What can I do with them?</span></span><br />
For ints and floats, you can do, what numbers do best!<br />
Add, subtract, multiply and divide. It's basic math.<br />
<br />
Say you want the int, "NAME", to be 1 higher. You simply write:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">AddLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
The int, "NAME", is now 2.<br />
<br />
To make it 1 lower write:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">AddLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
The int, "NAME", is now 1, again.<br />
<br />
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b">QUESTION: Yea, yea, those are all nice things, but how can I use it in my scripts?</span></div>
<br />
Very good question, indeed!<br />
Let's look at some basic things.<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u">4. Variables and script-lines</span></span><br />
<br />
What's so awesome about variables is that you can have them stand instead of numbers and words.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Before we start!</span><br />
I need you to know a thing that we'll be using all the time!<br />
<ul class="mycode_list">
</li>
<li>for ints<br />
</li></ul>
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">)&nbsp;<br /></span></code></div></div></div><ul class="mycode_list">
</li>
<li>for floats<br />
</li></ul>
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">GetLocalVarFloat</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">)&nbsp;<br /></span></code></div></div></div><br />
These lines are important, as they give all the information.<br />
We use them in, if-statements.<br />
<br />
Look at this:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)<br />{<br /></span><span style="color: #FF8000">//DO&nbsp;SOMETHING<br /></span><span style="color: #007700">}&nbsp;<br /></span></code></div></div></div>We're simply saying: If the variable, "NAME", is 1, then do something!<br />
<br />
<br />
Now, this can also be used differently. Instead of asking if the variable, "NAME", is something, we can use it in a script-line.<br />
<br />
In this example we'll be using it in SetEntityActive("ENTITY", false);<br />
<br />
Look at this:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">SetEntityActive</span><span style="color: #007700">(</span><span style="color: #DD0000">"Door_"</span><span style="color: #007700">+</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>What we're doing here is, where taking the name "Door_" and then we're adding the variable, "NAME", to the name.<br />
<br />
If the variable, "NAME", is 1 then the name of the door will be "Door_1".<br />
If the variable, "NAME", is 2 then the name of the door will be "Door_2".<br />
<br />
This way you only have to write the line once. Then you can just change the variable, as you like.<br />
<br />
I'm just gonna jump right into the first example now. I hope you follow.<br />
<br />
<span style="text-decoration: underline;" class="mycode_u">1st example</span><br />
What we're trying to create is that when you touch a script-area it'll show a message.<br />
But when you click on a button, it'll show another message.<br />
<br />
<span style="font-style: italic;" class="mycode_i">TIP: If you haven't specified an int or float, it'll always be 0</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;ClickOnArea</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asEntity</span><span style="color: #007700">)<br />{<br />if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//If&nbsp;variable&nbsp;is&nbsp;0,&nbsp;show&nbsp;first&nbsp;message<br /></span><span style="color: #007700">{<br /></span><span style="color: #0000BB">SetMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">"Messages"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Message_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br /><br />if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//If&nbsp;variable&nbsp;is&nbsp;1,&nbsp;show&nbsp;second&nbsp;message<br /></span><span style="color: #007700">{<br /></span><span style="color: #0000BB">SetMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">"Messages"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Message_2"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br />}<br /><br /></span><span style="color: #0000BB">void&nbsp;ClickOnButton</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asEntity</span><span style="color: #007700">)<br />{<br />if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//If&nbsp;the&nbsp;variable&nbsp;is&nbsp;0,&nbsp;set&nbsp;it&nbsp;to&nbsp;1.<br /></span><span style="color: #007700">{<br /></span><span style="color: #0000BB">SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />}<br />}&nbsp;<br /></span></code></div></div></div><br />
When you start the script, it should look like this.<br />
<a href="https://www.youtube.com/watch?v=59qyY9c0EX8&amp;feature=youtu.be" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=59qyY9c0...e=youtu.be</a><br />
<br />
<span style="text-decoration: underline;" class="mycode_u">2nd example</span><br />
For the next example, we'll be using AddLocalVarInt, to keep changing messages, when we have more than 2.<br />
<br />
What's gonna happen:<br />
Click on area =&gt; Message 1 appears<br />
Click on button.<br />
Click on area =&gt; Message 2 appears<br />
Click on button<br />
Click on area =&gt; Message 3 appears<br />
...<br />
etc.<br />
<br />
the script is almost the same.<br />
It looks like this.<br />
<br />
<span style="font-style: italic;" class="mycode_i">TIP: You can use GetLocalVarInt("NAME"), to make the script look for the number of the variable. It's a great way to make everything easier for you, just like it's written above this</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;ClickOnArea</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asEntity</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB">SetMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">"Messages"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Message_"</span><span style="color: #007700">+</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #0000BB">void&nbsp;ClickOnButton</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asEntity</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB">AddLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//This&nbsp;adds&nbsp;1&nbsp;to&nbsp;MessageVariable<br /><br /></span><span style="color: #007700">if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">6</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//Check,&nbsp;if&nbsp;the&nbsp;variable&nbsp;is&nbsp;6.&nbsp;If&nbsp;it&nbsp;is,&nbsp;then&nbsp;set&nbsp;it&nbsp;to&nbsp;0<br /></span><span style="color: #007700">{<br /></span><span style="color: #0000BB">SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br />}&nbsp;<br /></span></code></div></div></div><br />
When you start the script, it should look like this:<br />
<a href="https://www.youtube.com/watch?v=ILuRnqzScAk&amp;feature=youtu.be" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=ILuRnqzS...e=youtu.be</a><br />
<br />
<span style="text-decoration: underline;" class="mycode_u">3rd example</span><br />
Let's go on to the hardcore stuff.<br />
<br />
What we want to do, is have a screen-effect go from 0 to a high number, over time.<br />
We will be using timers and variables for this one.<br />
Please, make sure you know about how timers work, before reading further.<br />
<br />
How it'll work:<br />
When clicking an area, the timer starts.<br />
Each time the timer calls, the screen effect will increase it's grip on the player.<br />
Here's how the script looks.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;ClickOnArea</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asEntity</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB">AddTimer</span><span style="color: #007700">(</span><span style="color: #DD0000">"EffectTimer_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"EffectTimer"</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #0000BB">void&nbsp;EffectTimer</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asTimer</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB">AddLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"ScreenEffectVariable"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//Add&nbsp;1&nbsp;to&nbsp;the&nbsp;variable<br /><br /></span><span style="color: #007700">if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"ScreenEffectVariable"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">30</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//if&nbsp;the&nbsp;variable&nbsp;is&nbsp;30,&nbsp;stop!<br /></span><span style="color: #007700">{<br />return;<br />}<br /><br /></span><span style="color: #0000BB">FadeImageTrailTo</span><span style="color: #007700">(</span><span style="color: #0000BB">GetLocalVarFloat</span><span style="color: #007700">(</span><span style="color: #DD0000">"ScreenEffectVariable"</span><span style="color: #007700">)/</span><span style="color: #0000BB">10</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #FF8000">//Set&nbsp;screen&nbsp;effect&nbsp;to&nbsp;the&nbsp;number&nbsp;of&nbsp;the&nbsp;variable,&nbsp;divided&nbsp;by&nbsp;10,&nbsp;because&nbsp;we&nbsp;need&nbsp;a&nbsp;small&nbsp;number.<br /><br /></span><span style="color: #0000BB">AddTimer</span><span style="color: #007700">(</span><span style="color: #DD0000">"EffectTimer_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0.1</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"EffectTimer"</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//Loop&nbsp;the&nbsp;timer,&nbsp;by&nbsp;calling&nbsp;itself&nbsp;in&nbsp;0.1&nbsp;seconds<br /></span><span style="color: #007700">}&nbsp;<br /></span></code></div></div></div><br />
When you start the script, it should look something like this:<br />
<a href="https://www.youtube.com/watch?v=7-yBFa9qT_0&amp;feature=youtu.be" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=7-yBFa9q...e=youtu.be</a><br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Thank you!</span></span><br />
For viewing this, so far.<br />
<br />
If you have any questions, need me to explain something further, or something else, do ask!<br />
<br />
I might not be able to answer everything. But hey, it's always great to ask.]]></description>
			<content:encoded><![CDATA[<span style="font-size: x-large;" class="mycode_size"><div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b">Variables</span></div></span><br />
<br />
I was asked how variables work, and I'm in the mood for creating a little tutorial, so here you are ^_^<br />
<br />
<span style="font-size: small;" class="mycode_size">(Also, I hope this hasn't already been covered)</span><br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u">1. What is a variable?</span></span><br />
<br />
Before I start, if there's some clever guy out there, who thinks I'm saying something wrong, do correct me.<br />
<br />
<br />
In Amnesia we work with 4 different variable-types.<br />
<ul class="mycode_list">
</li>
<li><span style="font-weight: bold;" class="mycode_b">Integer</span> (Referred to as <span style="font-style: italic;" class="mycode_i">int</span>)<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Float</span><br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">Boolean</span> (Referred to as <span style="font-style: italic;" class="mycode_i">bool</span>)<br />
</li>
<li><span style="font-weight: bold;" class="mycode_b">String</span><br />
</li></ul>
<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Integers</span><br />
Integers are numbers without decimals. Whole numbers.<br />
<br />
It's simple:<br />
1 is an int.<br />
1.5 is not an int.<br />
<br />
Integers don't often appear in the script-lines used in Amnesia. They use floats instead.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Floats</span><br />
Floats are the opposite.<br />
<br />
Floats are numbers with decimals, but you can still use whole numbers.<br />
<br />
1.5 is a float.<br />
1 is also a float, but will (I assume) be seen as 1.0<br />
<br />
A line you've probably used is:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">FadeOut</span><span style="color: #007700">(</span><span style="color: #0000BB">float&nbsp;afTime</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>Note that 'float' is for how long it takes for the screen to go black.<br />
You probably only write 1 or 2, but the game will see it as 1.0 or 2.0.<br />
<br />
So, in fact, you could actually have the game fade to black in 1.5 seconds.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Booleans</span><br />
Bools are not numbers, but will either be true or false.<br />
<br />
You have probably used the following script-line.<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">SetPlayerActive</span><span style="color: #007700">(</span><span style="color: #0000BB">bool&nbsp;abActive</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>Note that 'bool' here refers to either be <span style="font-style: italic;" class="mycode_i">true</span> or <span style="font-style: italic;" class="mycode_i">false</span><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Strings</span><br />
A string is a word. Can consist of letters, but also be numbers.<br />
<br />
"Hello" is a string.<br />
"Over9000" is also a string.<br />
"9000" is also a string (I assume). But cannot be transferred into an int or float directly. You'd need something else first.<br />
<br />
Maybe you've tried to remove a timer before.<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">RemoveTimer</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asName</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>Note that 'string' here refers to the name of a timer.<br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u">2. So how do I use a variable?</span></span><br />
Good question.<br />
<br />
For integers and floats we'll just go through some simple steps.<br />
<br />
<ol type="1" class="mycode_list">
</li>
<li>Give the variable a name<br />
</li>
<li>Give the variable a number<br />
</li>
<li>Set it in a script-line<br />
</li></ol>
<br />
When you've thought about the first two steps, lets finish it by doing the third.<br />
In this tutorial name will be "NAME" and number will be 1.<br />
<br />
To set a variable<br />
<ul class="mycode_list">
</li>
<li>for ints use<br />
</li></ul>
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><ul class="mycode_list">
</li>
<li>for floats use<br />
</li></ul>
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">SetLocalVarFloat</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1.0</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
<br />
That wasn't so hard, was it?<br />
<br />
We can do the same with strings. Just instead of using a number, we will be using a word.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">SetLocalVarString</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"WORD"</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Notice, how this works the exact same way? Awesome!<br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u">3. What can I do with them?</span></span><br />
For ints and floats, you can do, what numbers do best!<br />
Add, subtract, multiply and divide. It's basic math.<br />
<br />
Say you want the int, "NAME", to be 1 higher. You simply write:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">AddLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
The int, "NAME", is now 2.<br />
<br />
To make it 1 lower write:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">AddLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
The int, "NAME", is now 1, again.<br />
<br />
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b">QUESTION: Yea, yea, those are all nice things, but how can I use it in my scripts?</span></div>
<br />
Very good question, indeed!<br />
Let's look at some basic things.<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u">4. Variables and script-lines</span></span><br />
<br />
What's so awesome about variables is that you can have them stand instead of numbers and words.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Before we start!</span><br />
I need you to know a thing that we'll be using all the time!<br />
<ul class="mycode_list">
</li>
<li>for ints<br />
</li></ul>
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">)&nbsp;<br /></span></code></div></div></div><ul class="mycode_list">
</li>
<li>for floats<br />
</li></ul>
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">GetLocalVarFloat</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">)&nbsp;<br /></span></code></div></div></div><br />
These lines are important, as they give all the information.<br />
We use them in, if-statements.<br />
<br />
Look at this:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)<br />{<br /></span><span style="color: #FF8000">//DO&nbsp;SOMETHING<br /></span><span style="color: #007700">}&nbsp;<br /></span></code></div></div></div>We're simply saying: If the variable, "NAME", is 1, then do something!<br />
<br />
<br />
Now, this can also be used differently. Instead of asking if the variable, "NAME", is something, we can use it in a script-line.<br />
<br />
In this example we'll be using it in SetEntityActive("ENTITY", false);<br />
<br />
Look at this:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">SetEntityActive</span><span style="color: #007700">(</span><span style="color: #DD0000">"Door_"</span><span style="color: #007700">+</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"NAME"</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>What we're doing here is, where taking the name "Door_" and then we're adding the variable, "NAME", to the name.<br />
<br />
If the variable, "NAME", is 1 then the name of the door will be "Door_1".<br />
If the variable, "NAME", is 2 then the name of the door will be "Door_2".<br />
<br />
This way you only have to write the line once. Then you can just change the variable, as you like.<br />
<br />
I'm just gonna jump right into the first example now. I hope you follow.<br />
<br />
<span style="text-decoration: underline;" class="mycode_u">1st example</span><br />
What we're trying to create is that when you touch a script-area it'll show a message.<br />
But when you click on a button, it'll show another message.<br />
<br />
<span style="font-style: italic;" class="mycode_i">TIP: If you haven't specified an int or float, it'll always be 0</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;ClickOnArea</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asEntity</span><span style="color: #007700">)<br />{<br />if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//If&nbsp;variable&nbsp;is&nbsp;0,&nbsp;show&nbsp;first&nbsp;message<br /></span><span style="color: #007700">{<br /></span><span style="color: #0000BB">SetMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">"Messages"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Message_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br /><br />if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//If&nbsp;variable&nbsp;is&nbsp;1,&nbsp;show&nbsp;second&nbsp;message<br /></span><span style="color: #007700">{<br /></span><span style="color: #0000BB">SetMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">"Messages"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Message_2"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br />}<br /><br /></span><span style="color: #0000BB">void&nbsp;ClickOnButton</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asEntity</span><span style="color: #007700">)<br />{<br />if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//If&nbsp;the&nbsp;variable&nbsp;is&nbsp;0,&nbsp;set&nbsp;it&nbsp;to&nbsp;1.<br /></span><span style="color: #007700">{<br /></span><span style="color: #0000BB">SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />}<br />}&nbsp;<br /></span></code></div></div></div><br />
When you start the script, it should look like this.<br />
<a href="https://www.youtube.com/watch?v=59qyY9c0EX8&amp;feature=youtu.be" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=59qyY9c0...e=youtu.be</a><br />
<br />
<span style="text-decoration: underline;" class="mycode_u">2nd example</span><br />
For the next example, we'll be using AddLocalVarInt, to keep changing messages, when we have more than 2.<br />
<br />
What's gonna happen:<br />
Click on area =&gt; Message 1 appears<br />
Click on button.<br />
Click on area =&gt; Message 2 appears<br />
Click on button<br />
Click on area =&gt; Message 3 appears<br />
...<br />
etc.<br />
<br />
the script is almost the same.<br />
It looks like this.<br />
<br />
<span style="font-style: italic;" class="mycode_i">TIP: You can use GetLocalVarInt("NAME"), to make the script look for the number of the variable. It's a great way to make everything easier for you, just like it's written above this</span><br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;ClickOnArea</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asEntity</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB">SetMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">"Messages"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Message_"</span><span style="color: #007700">+</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #0000BB">void&nbsp;ClickOnButton</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asEntity</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB">AddLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//This&nbsp;adds&nbsp;1&nbsp;to&nbsp;MessageVariable<br /><br /></span><span style="color: #007700">if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">6</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//Check,&nbsp;if&nbsp;the&nbsp;variable&nbsp;is&nbsp;6.&nbsp;If&nbsp;it&nbsp;is,&nbsp;then&nbsp;set&nbsp;it&nbsp;to&nbsp;0<br /></span><span style="color: #007700">{<br /></span><span style="color: #0000BB">SetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"MessageVariable"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br />}<br />}&nbsp;<br /></span></code></div></div></div><br />
When you start the script, it should look like this:<br />
<a href="https://www.youtube.com/watch?v=ILuRnqzScAk&amp;feature=youtu.be" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=ILuRnqzS...e=youtu.be</a><br />
<br />
<span style="text-decoration: underline;" class="mycode_u">3rd example</span><br />
Let's go on to the hardcore stuff.<br />
<br />
What we want to do, is have a screen-effect go from 0 to a high number, over time.<br />
We will be using timers and variables for this one.<br />
Please, make sure you know about how timers work, before reading further.<br />
<br />
How it'll work:<br />
When clicking an area, the timer starts.<br />
Each time the timer calls, the screen effect will increase it's grip on the player.<br />
Here's how the script looks.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;ClickOnArea</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asEntity</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB">AddTimer</span><span style="color: #007700">(</span><span style="color: #DD0000">"EffectTimer_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"EffectTimer"</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #0000BB">void&nbsp;EffectTimer</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asTimer</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB">AddLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"ScreenEffectVariable"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//Add&nbsp;1&nbsp;to&nbsp;the&nbsp;variable<br /><br /></span><span style="color: #007700">if(</span><span style="color: #0000BB">GetLocalVarInt</span><span style="color: #007700">(</span><span style="color: #DD0000">"ScreenEffectVariable"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">30</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//if&nbsp;the&nbsp;variable&nbsp;is&nbsp;30,&nbsp;stop!<br /></span><span style="color: #007700">{<br />return;<br />}<br /><br /></span><span style="color: #0000BB">FadeImageTrailTo</span><span style="color: #007700">(</span><span style="color: #0000BB">GetLocalVarFloat</span><span style="color: #007700">(</span><span style="color: #DD0000">"ScreenEffectVariable"</span><span style="color: #007700">)/</span><span style="color: #0000BB">10</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #FF8000">//Set&nbsp;screen&nbsp;effect&nbsp;to&nbsp;the&nbsp;number&nbsp;of&nbsp;the&nbsp;variable,&nbsp;divided&nbsp;by&nbsp;10,&nbsp;because&nbsp;we&nbsp;need&nbsp;a&nbsp;small&nbsp;number.<br /><br /></span><span style="color: #0000BB">AddTimer</span><span style="color: #007700">(</span><span style="color: #DD0000">"EffectTimer_1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0.1</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"EffectTimer"</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//Loop&nbsp;the&nbsp;timer,&nbsp;by&nbsp;calling&nbsp;itself&nbsp;in&nbsp;0.1&nbsp;seconds<br /></span><span style="color: #007700">}&nbsp;<br /></span></code></div></div></div><br />
When you start the script, it should look something like this:<br />
<a href="https://www.youtube.com/watch?v=7-yBFa9qT_0&amp;feature=youtu.be" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=7-yBFa9q...e=youtu.be</a><br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Thank you!</span></span><br />
For viewing this, so far.<br />
<br />
If you have any questions, need me to explain something further, or something else, do ask!<br />
<br />
I might not be able to answer everything. But hey, it's always great to ask.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Proposal about Full Conversion mod setup]]></title>
			<link>https://www.frictionalgames.com/forum/thread-25628.html</link>
			<pubDate>Tue, 08 Jul 2014 03:35:44 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-25628.html</guid>
			<description><![CDATA[Hi.<br />
<br />
I'd like to talk about an idea that I think would make using IFC mods, well, <span style="font-style: italic;" class="mycode_i">better</span>, if I may say. It might be a bit ambitious and most people probably won't use it, but if you are making a full conversion mod right now I'd love if you check this out.<br />
<br />
<span style="font-size: medium;" class="mycode_size">A unified <span style="color: #000080;" class="mycode_color"><span style="text-decoration: underline;" class="mycode_u">mods</span></span> folder.</span><br />
<br />
Normally when you install IFC mods, you place the mod's folder in the main Amnesia directory and run a laucher file from there, or add a start flag on Steam. If you install a lot of mods, the folder could be a bit cluttered. This works the same way, it just runs the mod from a subfolder and it's much cleaner in my opinion.<br />
<br />
It works like this:<br />
Create a "mods" folder in the Amnesia directory. If the mod is made to use such a folder, I think it would be a great place to collect them all in one place. In the mod's <span style="font-weight: bold;" class="mycode_b">resources.cfg</span> file, all you need to add would be the line:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">Directory&nbsp;Path</span><span style="color: #007700">=</span><span style="color: #DD0000">"/mods/example"&nbsp;</span><span style="color: #0000BB">AddSubDirs</span><span style="color: #007700">=</span><span style="color: #DD0000">"true"&nbsp;</span><span style="color: #007700">/&gt;&nbsp;<br /></span></code></div></div></div><br />
That should give the game access to all the content in the mod, but not the content in the other mods, which could cause conflicts anyway. My example looks like this:<br />
<br />
<div style="text-align: center;" class="mycode_align"><img src="http://i.imgur.com/kJjSc3S.png" alt="[Image: kJjSc3S.png]" class="mycode_img" /></div>
<br />
If you'd like to explore it further, you can <a href="https://www.mediafire.com/?uw4f24nkwtah33w" target="_blank" rel="noopener" class="mycode_url">download my example mod here.</a> It also includes launcher files for Windows, Mac as well as Linux, so feel free to snag them and place them in your own mod if you wish to use them too.<br />
I have some other things in the example mod that you might wanna check out as well if you wish <img src="https://www.frictionalgames.com/forum/images/smilies/wink.gif" alt="Wink" title="Wink" class="smilie smilie_2" /><br />
<br />
By the way, it's fully functional and should work by placing in the above mentioned location and run it, either via launcher or Steam.<br />
<br />
If you have any thoughts about this, I'd love to hear them. Even if you just think this is a stupid idea and why. It doesn't make the biggest difference, but I really like to keep things organized and I'd love it if people actually did this. An issue would probably just be that there would be inconsistencies with different mods.<br />
<br />
Perhaps FG could have a built-in functionality like this for SOMA? <img src="https://www.frictionalgames.com/forum/images/smilies/angel.gif" alt="Angel" title="Angel" class="smilie smilie_10" />]]></description>
			<content:encoded><![CDATA[Hi.<br />
<br />
I'd like to talk about an idea that I think would make using IFC mods, well, <span style="font-style: italic;" class="mycode_i">better</span>, if I may say. It might be a bit ambitious and most people probably won't use it, but if you are making a full conversion mod right now I'd love if you check this out.<br />
<br />
<span style="font-size: medium;" class="mycode_size">A unified <span style="color: #000080;" class="mycode_color"><span style="text-decoration: underline;" class="mycode_u">mods</span></span> folder.</span><br />
<br />
Normally when you install IFC mods, you place the mod's folder in the main Amnesia directory and run a laucher file from there, or add a start flag on Steam. If you install a lot of mods, the folder could be a bit cluttered. This works the same way, it just runs the mod from a subfolder and it's much cleaner in my opinion.<br />
<br />
It works like this:<br />
Create a "mods" folder in the Amnesia directory. If the mod is made to use such a folder, I think it would be a great place to collect them all in one place. In the mod's <span style="font-weight: bold;" class="mycode_b">resources.cfg</span> file, all you need to add would be the line:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">Directory&nbsp;Path</span><span style="color: #007700">=</span><span style="color: #DD0000">"/mods/example"&nbsp;</span><span style="color: #0000BB">AddSubDirs</span><span style="color: #007700">=</span><span style="color: #DD0000">"true"&nbsp;</span><span style="color: #007700">/&gt;&nbsp;<br /></span></code></div></div></div><br />
That should give the game access to all the content in the mod, but not the content in the other mods, which could cause conflicts anyway. My example looks like this:<br />
<br />
<div style="text-align: center;" class="mycode_align"><img src="http://i.imgur.com/kJjSc3S.png" alt="[Image: kJjSc3S.png]" class="mycode_img" /></div>
<br />
If you'd like to explore it further, you can <a href="https://www.mediafire.com/?uw4f24nkwtah33w" target="_blank" rel="noopener" class="mycode_url">download my example mod here.</a> It also includes launcher files for Windows, Mac as well as Linux, so feel free to snag them and place them in your own mod if you wish to use them too.<br />
I have some other things in the example mod that you might wanna check out as well if you wish <img src="https://www.frictionalgames.com/forum/images/smilies/wink.gif" alt="Wink" title="Wink" class="smilie smilie_2" /><br />
<br />
By the way, it's fully functional and should work by placing in the above mentioned location and run it, either via launcher or Steam.<br />
<br />
If you have any thoughts about this, I'd love to hear them. Even if you just think this is a stupid idea and why. It doesn't make the biggest difference, but I really like to keep things organized and I'd love it if people actually did this. An issue would probably just be that there would be inconsistencies with different mods.<br />
<br />
Perhaps FG could have a built-in functionality like this for SOMA? <img src="https://www.frictionalgames.com/forum/images/smilies/angel.gif" alt="Angel" title="Angel" class="smilie smilie_10" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Quick overview on HPL2 Animation]]></title>
			<link>https://www.frictionalgames.com/forum/thread-25121.html</link>
			<pubDate>Sun, 20 Apr 2014 18:15:45 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-25121.html</guid>
			<description><![CDATA[Hi!<br />
<br />
Did this on stream, should cover the very basics of getting something animated into HPL2.<br />
<br />
<a href="http://www.twitch.tv/acies404/c/4101414" target="_blank" rel="noopener" class="mycode_url">http://www.twitch.tv/acies404/c/4101414</a>]]></description>
			<content:encoded><![CDATA[Hi!<br />
<br />
Did this on stream, should cover the very basics of getting something animated into HPL2.<br />
<br />
<a href="http://www.twitch.tv/acies404/c/4101414" target="_blank" rel="noopener" class="mycode_url">http://www.twitch.tv/acies404/c/4101414</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Proper scale exporting with 3dsmax]]></title>
			<link>https://www.frictionalgames.com/forum/thread-25087.html</link>
			<pubDate>Wed, 16 Apr 2014 09:52:25 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-25087.html</guid>
			<description><![CDATA[I looked around here for a while and all topics said 3dsmax has exporting issues.. meshes ending up to big and all that. I managed to find a way to work around this, i just hope I'm not bringing old news :p<br />
<br />
It does take an extra minute or so, but if you don't want to run it through maya (like me) it's just fine..<br />
<br />
These are the steps!<br />
-Open a model you created, I used a wall (these are almost always 4x4m when using the metric unit setup in max)<br />
-Import a .DAE mesh file that came with amnesia, in this case I also used a wall model when imported. This should have the same size as the created wall model if all goes right.<br />
-Attach your own created mesh to the imported mesh, after that delete the imported mesh only leaving your own, your model now has the right scaling from the imported mesh!<br />
-Export the mesh to the .DAE format and again check the box in the units tab saying automatic.<br />
<br />
After that the usual modelview,editor stuff has to be done.<br />
<br />
I hope everybody finds this useful, I sure am glad I figured this out!]]></description>
			<content:encoded><![CDATA[I looked around here for a while and all topics said 3dsmax has exporting issues.. meshes ending up to big and all that. I managed to find a way to work around this, i just hope I'm not bringing old news :p<br />
<br />
It does take an extra minute or so, but if you don't want to run it through maya (like me) it's just fine..<br />
<br />
These are the steps!<br />
-Open a model you created, I used a wall (these are almost always 4x4m when using the metric unit setup in max)<br />
-Import a .DAE mesh file that came with amnesia, in this case I also used a wall model when imported. This should have the same size as the created wall model if all goes right.<br />
-Attach your own created mesh to the imported mesh, after that delete the imported mesh only leaving your own, your model now has the right scaling from the imported mesh!<br />
-Export the mesh to the .DAE format and again check the box in the units tab saying automatic.<br />
<br />
After that the usual modelview,editor stuff has to be done.<br />
<br />
I hope everybody finds this useful, I sure am glad I figured this out!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Monster voices made by me.]]></title>
			<link>https://www.frictionalgames.com/forum/thread-25031.html</link>
			<pubDate>Tue, 08 Apr 2014 18:11:05 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-25031.html</guid>
			<description><![CDATA[Hello!  I was working on a monster lately but I suck at modelling i deleted all the files but i found one, so I thought I'll make some voices for you if you need one. <br />
I'll happily do it! I'll leave you the sample! Sorry if there's only one. <br />
<br />
<a href="http://vocaroo.com/i/s0BSWCvAqjIL" target="_blank" rel="noopener" class="mycode_url">Sample: I found you.. </a>]]></description>
			<content:encoded><![CDATA[Hello!  I was working on a monster lately but I suck at modelling i deleted all the files but i found one, so I thought I'll make some voices for you if you need one. <br />
I'll happily do it! I'll leave you the sample! Sorry if there's only one. <br />
<br />
<a href="http://vocaroo.com/i/s0BSWCvAqjIL" target="_blank" rel="noopener" class="mycode_url">Sample: I found you.. </a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Changing "Diary" section into something useful (Maps)]]></title>
			<link>https://www.frictionalgames.com/forum/thread-25026.html</link>
			<pubDate>Mon, 07 Apr 2014 19:34:18 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-25026.html</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">This <span style="font-style: italic;" class="mycode_i">quick</span> little guide is a suggestion if you'd like to make use of the "Diary" section of the journal without adding just plain old diary pages. In the original game, the diaries worked pretty well, but for custom stories, they easily get redundant because they're so much like regular notes. Here are a few things you can do about it!</span><br />
<br />
<br />
<span style="text-decoration: underline;" class="mycode_u"><div style="text-align: center;" class="mycode_align"><span style="font-size: x-large;" class="mycode_size">This works for MODS as well as CUSTOM STORIES.</span></div>
</span><br />
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Take advantage of the customized background</span></span></div>
<div style="text-align: center;" class="mycode_align"><img src="http://i.imgur.com/tAetUl3.png" alt="[Image: tAetUl3.png]" class="mycode_img" /></div>
<br />
This can be used for many things. I'm going to show you how you can make cool looking in-game maps for your story. You can of course make anything else you'd like, for example easter egg photos or art or such.<br />
<br />
Let's start by changing the whole DIARY section of the journal to our own section. Open your <span style="font-weight: bold;" class="mycode_b">extra_english.lang</span> file and create an entry like this one within your <span style="font-weight: bold;" class="mycode_b">Journal</span> category.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Diaries"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">MAPS</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div><br />
The entry must be named <span style="font-weight: bold;" class="mycode_b">Diaries</span> and I recommend you make the text upper case, because that's how it is originally. This will now change your journal to display <span style="font-weight: bold;" class="mycode_b">MAPS</span> instead of <span style="font-weight: bold;" class="mycode_b">DIARIES</span> when you press J. While we're at it, let's also add the entry for the <span style="font-style: italic;" class="mycode_i">diary</span> itself.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Diary_MapMachine_Name1"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Map&nbsp;of&nbsp;Machine&nbsp;Room</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Diary_MapMachine_Text1"</span><span style="color: #007700">&gt;&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div><br />
Notice how I left the Text blank. You don't want text over your image, but you can have a title. Edit the <span style="font-weight: bold;" class="mycode_b">MapMachine</span> to whatever you want to use.<br />
<br />
The next part includes giving the player a diary note that displays the map. There are two ways you can give them the note. Editor and script. Both require a little work. But before we do that, let's make sure we've prepared our custom background image file.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Creating the image</span></span><br />
<br />
I use Photoshop for creating images, but a free alternative is Gimp. I'm gonna let you take care of how to aquire your image <img src="https://www.frictionalgames.com/forum/images/smilies/tongue.gif" alt="Tongue" title="Tongue" class="smilie smilie_5" /><br />
<br />
The primary background does not need a pow² resolution. In other words, just make it a suitable size of around 500x500 pixels. You can add some if you'd like, but if it exceeds it, it might underlap the title and close button, which is ugly.<br />
Export the image as Targa (.tga). <span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">DON'T FORGET</span> to add an alpha channel, or else the transparency won't work around the edges!</span><br />
<br />
Also, when naming the file, name it <span style="font-weight: bold;" class="mycode_b">&lt;yourfile&gt;_large.tga</span>. This is because you need 2 images. Once you're done, resize another copy to <span style="font-weight: bold;" class="mycode_b">20x20</span> pixels. Export it just the same, this time naming it <span style="font-weight: bold;" class="mycode_b">&lt;yourfile&gt;_icon.tga</span>.<br />
<br />
My files look like this:<br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b">machineroom_map_large.tga</span><br />
<img src="http://i.imgur.com/nPCYwAk.png" alt="[Image: nPCYwAk.png]" class="mycode_img" /><br />
<br />
<span style="font-weight: bold;" class="mycode_b">machineroom_map_icon.tga</span><br />
<img src="http://i.imgur.com/fGItunl.png" alt="[Image: fGItunl.png]" class="mycode_img" /></div>
</div>
</div>
</div>
<br />
Now we have the images. Place them in <span style="font-weight: bold;" class="mycode_b">custom_stories\&lt;yourstory&gt;\graphics\journal</span>. <br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Editor</span></span><br />
<br />
In order to get your custom background to work on the diary note <span style="font-weight: bold;" class="mycode_b">item</span> itself, you need to create a new entity for it. This is because the background is baked into it. You won't need to do this if you're using the script method.<br />
<br />
<span style="font-style: italic;" class="mycode_i">PS: Narration is locked on the diary note. This means that if you do not add a voice file in the lang entry, the item will instantly jump to the journal as you pick it up without giving the player any preview. Take a look at the optional details below.</span><br />
<br />
Open the Model Editor and find <span style="font-weight: bold;" class="mycode_b">diary_paper01.ent</span>. Go to <span style="font-weight: bold;" class="mycode_b">Settings &gt; User Defined Variables</span> and at the bottom you'll find <span style="font-weight: bold;" class="mycode_b">ImageFile</span>. Change that to the name of your own file EXCLUDING <span style="font-weight: bold;" class="mycode_b">_large.tga</span>. If you named yours <span style="font-weight: bold;" class="mycode_b">map1_large.tga</span>, then only write <span style="font-weight: bold;" class="mycode_b">map1</span> into the box. Once you're done, go to <span style="font-weight: bold;" class="mycode_b">Save as</span> and name it something else (for example <span style="font-weight: bold;" class="mycode_b">map_machineroom</span> or something).<br />
<br />
Remember that when using custom entities in your custom story, you need to <span style="font-weight: bold;" class="mycode_b">keep the .ent file in the entities folder</span> in order to use them in the Level Editor. This does not apply to the game itself though, so <span style="font-weight: bold;" class="mycode_b">copy the file to custom_stories\&lt;yourstory&gt;\entities</span> when you're gonna give the story to someone else.<br />
<br />
Once you're done, simply add the item to your map with the Level Editor. Go on the <span style="font-weight: bold;" class="mycode_b">Entity</span> tab and add the entry for the title in the <span style="font-weight: bold;" class="mycode_b">DiaryText</span> box.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Script</span></span><br />
<br />
If you do not want to make a custom entity, you can use the script. There is a simple line that does all the work for you.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">AddDiary</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asNameAndTextEntry</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asImage</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Just enter the lang entry and the image name (excluding <span style="font-weight: bold;" class="mycode_b">_large</span> again). This will give them the map right away. The only difference is that they won't know they got it unless you make it obvious. Those details can be added manually.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Extra optional details</span></span><br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
If you want to fix some mentions of "diary" in the game, add these to your lang:<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Journal</span> category:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"DiariesEmpty"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">No&nbsp;maps&nbsp;are&nbsp;available</span><span style="color: #007700">!&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div><br />
Outside the <span style="font-weight: bold;" class="mycode_b">Journal</span> category:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">CATEGORY&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Actions"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"RecentTextTooltip"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Brings&nbsp;up&nbsp;most&nbsp;recently&nbsp;read&nbsp;text&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">note&nbsp;</span><span style="color: #007700">or&nbsp;</span><span style="color: #0000BB">map</span><span style="color: #007700">).&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">CATEGORY</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div><br />
If you have the diary item in your level and do not use any voice files in the lang, you can simulate the PickUp effect of any item instead. On the <span style="font-weight: bold;" class="mycode_b">Entity</span> tab of the diary note at the bottom, is the callback. Write something there (for example <span style="font-weight: bold;" class="mycode_b">MapMsg</span>), then add this to your script file:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;MapMsg</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asItem</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;iDiaryIdx</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">"Message"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"PickUpMap"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GiveHint</span><span style="color: #007700">(</span><span style="color: #DD0000">"maphint"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hints"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"HintPickMap"</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />}&nbsp;<br /></span></code></div></div></div><br />
Also add this to your .lang file:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">CATEGORY&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Message"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"PickUpMap"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Picked&nbsp;up&nbsp;Map</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">CATEGORY</span><span style="color: #007700">&gt;<br /><br />&lt;</span><span style="color: #0000BB">CATEGORY&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Hints"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"HintPickMap"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">You&nbsp;have&nbsp;picked&nbsp;up&nbsp;a&nbsp;map</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">To&nbsp;view&nbsp;your&nbsp;maps</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">open&nbsp;the&nbsp;journal&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ButJournal</span><span style="color: #007700">)&nbsp;and&nbsp;</span><span style="color: #0000BB">click&nbsp;on&nbsp;maps</span><span style="color: #007700">.&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">CATEGORY</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div><br />
This will add a pickup message as well as a hint for the map, making it easier for the player to know what's going on. This applies to both editor and script methods.<br />
<br />
</div>
</div>
</div>
<br />
<br />
I think that's everything. This obviously turned out way longer than I thought. Hopefully I didn't forget anything, but if you have anything to add, just tell me ^^<br />
<br />
Thanks for checking it out! Heh, took me a few hours to write.]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">This <span style="font-style: italic;" class="mycode_i">quick</span> little guide is a suggestion if you'd like to make use of the "Diary" section of the journal without adding just plain old diary pages. In the original game, the diaries worked pretty well, but for custom stories, they easily get redundant because they're so much like regular notes. Here are a few things you can do about it!</span><br />
<br />
<br />
<span style="text-decoration: underline;" class="mycode_u"><div style="text-align: center;" class="mycode_align"><span style="font-size: x-large;" class="mycode_size">This works for MODS as well as CUSTOM STORIES.</span></div>
</span><br />
<br />
<div style="text-align: center;" class="mycode_align"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Take advantage of the customized background</span></span></div>
<div style="text-align: center;" class="mycode_align"><img src="http://i.imgur.com/tAetUl3.png" alt="[Image: tAetUl3.png]" class="mycode_img" /></div>
<br />
This can be used for many things. I'm going to show you how you can make cool looking in-game maps for your story. You can of course make anything else you'd like, for example easter egg photos or art or such.<br />
<br />
Let's start by changing the whole DIARY section of the journal to our own section. Open your <span style="font-weight: bold;" class="mycode_b">extra_english.lang</span> file and create an entry like this one within your <span style="font-weight: bold;" class="mycode_b">Journal</span> category.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Diaries"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">MAPS</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div><br />
The entry must be named <span style="font-weight: bold;" class="mycode_b">Diaries</span> and I recommend you make the text upper case, because that's how it is originally. This will now change your journal to display <span style="font-weight: bold;" class="mycode_b">MAPS</span> instead of <span style="font-weight: bold;" class="mycode_b">DIARIES</span> when you press J. While we're at it, let's also add the entry for the <span style="font-style: italic;" class="mycode_i">diary</span> itself.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Diary_MapMachine_Name1"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Map&nbsp;of&nbsp;Machine&nbsp;Room</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Diary_MapMachine_Text1"</span><span style="color: #007700">&gt;&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div><br />
Notice how I left the Text blank. You don't want text over your image, but you can have a title. Edit the <span style="font-weight: bold;" class="mycode_b">MapMachine</span> to whatever you want to use.<br />
<br />
The next part includes giving the player a diary note that displays the map. There are two ways you can give them the note. Editor and script. Both require a little work. But before we do that, let's make sure we've prepared our custom background image file.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Creating the image</span></span><br />
<br />
I use Photoshop for creating images, but a free alternative is Gimp. I'm gonna let you take care of how to aquire your image <img src="https://www.frictionalgames.com/forum/images/smilies/tongue.gif" alt="Tongue" title="Tongue" class="smilie smilie_5" /><br />
<br />
The primary background does not need a pow² resolution. In other words, just make it a suitable size of around 500x500 pixels. You can add some if you'd like, but if it exceeds it, it might underlap the title and close button, which is ugly.<br />
Export the image as Targa (.tga). <span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">DON'T FORGET</span> to add an alpha channel, or else the transparency won't work around the edges!</span><br />
<br />
Also, when naming the file, name it <span style="font-weight: bold;" class="mycode_b">&lt;yourfile&gt;_large.tga</span>. This is because you need 2 images. Once you're done, resize another copy to <span style="font-weight: bold;" class="mycode_b">20x20</span> pixels. Export it just the same, this time naming it <span style="font-weight: bold;" class="mycode_b">&lt;yourfile&gt;_icon.tga</span>.<br />
<br />
My files look like this:<br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
<div style="text-align: center;" class="mycode_align"><span style="font-weight: bold;" class="mycode_b">machineroom_map_large.tga</span><br />
<img src="http://i.imgur.com/nPCYwAk.png" alt="[Image: nPCYwAk.png]" class="mycode_img" /><br />
<br />
<span style="font-weight: bold;" class="mycode_b">machineroom_map_icon.tga</span><br />
<img src="http://i.imgur.com/fGItunl.png" alt="[Image: fGItunl.png]" class="mycode_img" /></div>
</div>
</div>
</div>
<br />
Now we have the images. Place them in <span style="font-weight: bold;" class="mycode_b">custom_stories\&lt;yourstory&gt;\graphics\journal</span>. <br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Editor</span></span><br />
<br />
In order to get your custom background to work on the diary note <span style="font-weight: bold;" class="mycode_b">item</span> itself, you need to create a new entity for it. This is because the background is baked into it. You won't need to do this if you're using the script method.<br />
<br />
<span style="font-style: italic;" class="mycode_i">PS: Narration is locked on the diary note. This means that if you do not add a voice file in the lang entry, the item will instantly jump to the journal as you pick it up without giving the player any preview. Take a look at the optional details below.</span><br />
<br />
Open the Model Editor and find <span style="font-weight: bold;" class="mycode_b">diary_paper01.ent</span>. Go to <span style="font-weight: bold;" class="mycode_b">Settings &gt; User Defined Variables</span> and at the bottom you'll find <span style="font-weight: bold;" class="mycode_b">ImageFile</span>. Change that to the name of your own file EXCLUDING <span style="font-weight: bold;" class="mycode_b">_large.tga</span>. If you named yours <span style="font-weight: bold;" class="mycode_b">map1_large.tga</span>, then only write <span style="font-weight: bold;" class="mycode_b">map1</span> into the box. Once you're done, go to <span style="font-weight: bold;" class="mycode_b">Save as</span> and name it something else (for example <span style="font-weight: bold;" class="mycode_b">map_machineroom</span> or something).<br />
<br />
Remember that when using custom entities in your custom story, you need to <span style="font-weight: bold;" class="mycode_b">keep the .ent file in the entities folder</span> in order to use them in the Level Editor. This does not apply to the game itself though, so <span style="font-weight: bold;" class="mycode_b">copy the file to custom_stories\&lt;yourstory&gt;\entities</span> when you're gonna give the story to someone else.<br />
<br />
Once you're done, simply add the item to your map with the Level Editor. Go on the <span style="font-weight: bold;" class="mycode_b">Entity</span> tab and add the entry for the title in the <span style="font-weight: bold;" class="mycode_b">DiaryText</span> box.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Script</span></span><br />
<br />
If you do not want to make a custom entity, you can use the script. There is a simple line that does all the work for you.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">AddDiary</span><span style="color: #007700">(</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asNameAndTextEntry</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">string</span><span style="color: #007700">&amp;&nbsp;</span><span style="color: #0000BB">asImage</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div><br />
Just enter the lang entry and the image name (excluding <span style="font-weight: bold;" class="mycode_b">_large</span> again). This will give them the map right away. The only difference is that they won't know they got it unless you make it obvious. Those details can be added manually.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: medium;" class="mycode_size">Extra optional details</span></span><br />
<br />
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler below!</b> <input type="button" value="Click to show" style="width:75px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';		this.innerText = ''; this.value = 'Click to hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Click to show'; }"><br />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
If you want to fix some mentions of "diary" in the game, add these to your lang:<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Journal</span> category:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"DiariesEmpty"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">No&nbsp;maps&nbsp;are&nbsp;available</span><span style="color: #007700">!&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div><br />
Outside the <span style="font-weight: bold;" class="mycode_b">Journal</span> category:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">CATEGORY&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Actions"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"RecentTextTooltip"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Brings&nbsp;up&nbsp;most&nbsp;recently&nbsp;read&nbsp;text&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">note&nbsp;</span><span style="color: #007700">or&nbsp;</span><span style="color: #0000BB">map</span><span style="color: #007700">).&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">CATEGORY</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div><br />
If you have the diary item in your level and do not use any voice files in the lang, you can simulate the PickUp effect of any item instead. On the <span style="font-weight: bold;" class="mycode_b">Entity</span> tab of the diary note at the bottom, is the callback. Write something there (for example <span style="font-weight: bold;" class="mycode_b">MapMsg</span>), then add this to your script file:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">void&nbsp;MapMsg</span><span style="color: #007700">(</span><span style="color: #0000BB">string&nbsp;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">in&nbsp;asItem</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;iDiaryIdx</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">"Message"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"PickUpMap"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GiveHint</span><span style="color: #007700">(</span><span style="color: #DD0000">"maphint"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hints"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"HintPickMap"</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />}&nbsp;<br /></span></code></div></div></div><br />
Also add this to your .lang file:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">&lt;</span><span style="color: #0000BB">CATEGORY&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Message"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"PickUpMap"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Picked&nbsp;up&nbsp;Map</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">CATEGORY</span><span style="color: #007700">&gt;<br /><br />&lt;</span><span style="color: #0000BB">CATEGORY&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"Hints"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">Entry&nbsp;Name</span><span style="color: #007700">=</span><span style="color: #DD0000">"HintPickMap"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">You&nbsp;have&nbsp;picked&nbsp;up&nbsp;a&nbsp;map</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">To&nbsp;view&nbsp;your&nbsp;maps</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">open&nbsp;the&nbsp;journal&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ButJournal</span><span style="color: #007700">)&nbsp;and&nbsp;</span><span style="color: #0000BB">click&nbsp;on&nbsp;maps</span><span style="color: #007700">.&lt;/</span><span style="color: #0000BB">Entry</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">CATEGORY</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div><br />
This will add a pickup message as well as a hint for the map, making it easier for the player to know what's going on. This applies to both editor and script methods.<br />
<br />
</div>
</div>
</div>
<br />
<br />
I think that's everything. This obviously turned out way longer than I thought. Hopefully I didn't forget anything, but if you have anything to add, just tell me ^^<br />
<br />
Thanks for checking it out! Heh, took me a few hours to write.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Short Guide on Importing stuff into Amnesia]]></title>
			<link>https://www.frictionalgames.com/forum/thread-24697.html</link>
			<pubDate>Mon, 24 Feb 2014 18:54:54 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-24697.html</guid>
			<description><![CDATA[<img src="http://s5.postimg.org/4f7tsciom/Amnesia_Import_Export.jpg" alt="[Image: Amnesia_Import_Export.jpg]" class="mycode_img" /><br />
Above is a reminder..<br />
<br />
OpenCollada plugins for Maya and 3DSMAX:<br />
<a href="https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools" target="_blank" rel="noopener" class="mycode_url">https://github.com/KhronosGroup/OpenCOLL...LADA-Tools</a><br />
<br />
Photoshop dxt plugin:<br />
<a href="https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop" target="_blank" rel="noopener" class="mycode_url">https://developer.nvidia.com/nvidia-text...-photoshop</a><br />
<br />
How Amnesia handles naming and textures:<br />
<a href="http://wiki.frictionalgames.com/hpl2/tutorials/modeling/tutorialoutsource" target="_blank" rel="noopener" class="mycode_url">http://wiki.frictionalgames.com/hpl2/tut...loutsource</a><br />
<br />
Twitch Video:<br />
<a href="http://www.twitch.tv/acies404/c/3781014" target="_blank" rel="noopener" class="mycode_url">http://www.twitch.tv/acies404/c/3781014</a><br />
<br />
Youtube Video:<br />
<a href="http://www.youtube.com/watch?v=5b7diAWhcl8" target="_blank" rel="noopener" class="mycode_url">http://www.youtube.com/watch?v=5b7diAWhcl8</a><br />
<br />
Questions or things missing? Tell me below.<br />
<br />
Edit: Accidentally say 1028x1028 pixels for images once - it should be 1024x1024.<br />
<br />
Edit2: Quicker version (conclusion) at 20:45 in the video.]]></description>
			<content:encoded><![CDATA[<img src="http://s5.postimg.org/4f7tsciom/Amnesia_Import_Export.jpg" alt="[Image: Amnesia_Import_Export.jpg]" class="mycode_img" /><br />
Above is a reminder..<br />
<br />
OpenCollada plugins for Maya and 3DSMAX:<br />
<a href="https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools" target="_blank" rel="noopener" class="mycode_url">https://github.com/KhronosGroup/OpenCOLL...LADA-Tools</a><br />
<br />
Photoshop dxt plugin:<br />
<a href="https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop" target="_blank" rel="noopener" class="mycode_url">https://developer.nvidia.com/nvidia-text...-photoshop</a><br />
<br />
How Amnesia handles naming and textures:<br />
<a href="http://wiki.frictionalgames.com/hpl2/tutorials/modeling/tutorialoutsource" target="_blank" rel="noopener" class="mycode_url">http://wiki.frictionalgames.com/hpl2/tut...loutsource</a><br />
<br />
Twitch Video:<br />
<a href="http://www.twitch.tv/acies404/c/3781014" target="_blank" rel="noopener" class="mycode_url">http://www.twitch.tv/acies404/c/3781014</a><br />
<br />
Youtube Video:<br />
<a href="http://www.youtube.com/watch?v=5b7diAWhcl8" target="_blank" rel="noopener" class="mycode_url">http://www.youtube.com/watch?v=5b7diAWhcl8</a><br />
<br />
Questions or things missing? Tell me below.<br />
<br />
Edit: Accidentally say 1028x1028 pixels for images once - it should be 1024x1024.<br />
<br />
Edit2: Quicker version (conclusion) at 20:45 in the video.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Modeling Tutorial Thoughts]]></title>
			<link>https://www.frictionalgames.com/forum/thread-24645.html</link>
			<pubDate>Mon, 17 Feb 2014 14:15:24 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-24645.html</guid>
			<description><![CDATA[Hello Forum!<br />
So, I just wanted to share my tutorial video to you guys and see what you think. This is my first tutorial and some things are not perfect (the sound) but these things will be fixed in upcoming tutorial (if made). I show my technique on mostly how to texture but also some modeling.<br />
<br />
 All you need for this tutorial is Photoshop, Blender and Xnormal. It's really just a quick and easy tutorial to share some of my knowledge to the community.<br />
<br />
Let me hear what you think in the comments of the video or the thread. And also you can check out some of the other videos on our channel if you would like to.<br />
<br />
<a href="http://www.youtube.com/watch?v=S73K1fDF_Ps" target="_blank" rel="noopener" class="mycode_url">My tutorial video</a><br />
<br />
<img src="http://i.imgur.com/4Ir9W3I.png?1" alt="[Image: 4Ir9W3I.png?1]" class="mycode_img" />]]></description>
			<content:encoded><![CDATA[Hello Forum!<br />
So, I just wanted to share my tutorial video to you guys and see what you think. This is my first tutorial and some things are not perfect (the sound) but these things will be fixed in upcoming tutorial (if made). I show my technique on mostly how to texture but also some modeling.<br />
<br />
 All you need for this tutorial is Photoshop, Blender and Xnormal. It's really just a quick and easy tutorial to share some of my knowledge to the community.<br />
<br />
Let me hear what you think in the comments of the video or the thread. And also you can check out some of the other videos on our channel if you would like to.<br />
<br />
<a href="http://www.youtube.com/watch?v=S73K1fDF_Ps" target="_blank" rel="noopener" class="mycode_url">My tutorial video</a><br />
<br />
<img src="http://i.imgur.com/4Ir9W3I.png?1" alt="[Image: 4Ir9W3I.png?1]" class="mycode_img" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Colors Aesthetics]]></title>
			<link>https://www.frictionalgames.com/forum/thread-24307.html</link>
			<pubDate>Mon, 06 Jan 2014 20:53:02 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-24307.html</guid>
			<description><![CDATA[Hopefully this thread would be useful for a lot of people who wants to work on whatever they work more consciously. It is always an option to work relying on taste and talent without any knowledge and thus anyone can simply skip this thread (yeah, you, right now, go away). Everyone else who does not afraid to know something in order not to stick to the rules but to overstep them consciously.<br />
<br />
Here is a well known complementary colors palette. Which can be used rather effectively for designing levels.<br />
<br />
<img src="http://i.imgur.com/ynJfEe1.jpg" alt="[Image: ynJfEe1.jpg]" class="mycode_img" /><br />
<br />
<hr class="mycode_hr" />
<br />
Here is another one color palette. Traditional Japanese color palette and their eastern aesthetics are completely different. They are quite rarely rely on complementary colors palette which we are used too.<br />
<br />
<img src="http://i.imgur.com/cSYNspP.jpg" alt="[Image: cSYNspP.jpg]" class="mycode_img" /><br />
<br />
<hr class="mycode_hr" />
<br />
Here are some Japanese paints just to make it clear that everything could be perfect and impressive if only you would love to overstep some European traditions.<br />
<br />
<a href="http://i.imgur.com/UzyCw27l.jpg" target="_blank" rel="noopener" class="mycode_url">http://i.imgur.com/UzyCw27l.jpg</a><br />
<a href="http://i.imgur.com/PKCLJmNl.jpg" target="_blank" rel="noopener" class="mycode_url">http://i.imgur.com/PKCLJmNl.jpg</a><br />
<a href="http://i.imgur.com/yJebFS2l.jpg" target="_blank" rel="noopener" class="mycode_url">http://i.imgur.com/yJebFS2l.jpg</a><br />
<a href="http://i.imgur.com/X0MPt5S.jpg" target="_blank" rel="noopener" class="mycode_url">http://i.imgur.com/X0MPt5S.jpg</a><br />
<a href="http://i.imgur.com/GjGyqWv.jpg" target="_blank" rel="noopener" class="mycode_url">http://i.imgur.com/GjGyqWv.jpg</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Anyway, I am not a teacher and rather I am a learner. Seriously, no joking. I just think that colors, mood, different known technics is a very interesting and hopefully useful theme for a thread. And I am the first one who would be grateful to know something new about colors aesthetics.</span>]]></description>
			<content:encoded><![CDATA[Hopefully this thread would be useful for a lot of people who wants to work on whatever they work more consciously. It is always an option to work relying on taste and talent without any knowledge and thus anyone can simply skip this thread (yeah, you, right now, go away). Everyone else who does not afraid to know something in order not to stick to the rules but to overstep them consciously.<br />
<br />
Here is a well known complementary colors palette. Which can be used rather effectively for designing levels.<br />
<br />
<img src="http://i.imgur.com/ynJfEe1.jpg" alt="[Image: ynJfEe1.jpg]" class="mycode_img" /><br />
<br />
<hr class="mycode_hr" />
<br />
Here is another one color palette. Traditional Japanese color palette and their eastern aesthetics are completely different. They are quite rarely rely on complementary colors palette which we are used too.<br />
<br />
<img src="http://i.imgur.com/cSYNspP.jpg" alt="[Image: cSYNspP.jpg]" class="mycode_img" /><br />
<br />
<hr class="mycode_hr" />
<br />
Here are some Japanese paints just to make it clear that everything could be perfect and impressive if only you would love to overstep some European traditions.<br />
<br />
<a href="http://i.imgur.com/UzyCw27l.jpg" target="_blank" rel="noopener" class="mycode_url">http://i.imgur.com/UzyCw27l.jpg</a><br />
<a href="http://i.imgur.com/PKCLJmNl.jpg" target="_blank" rel="noopener" class="mycode_url">http://i.imgur.com/PKCLJmNl.jpg</a><br />
<a href="http://i.imgur.com/yJebFS2l.jpg" target="_blank" rel="noopener" class="mycode_url">http://i.imgur.com/yJebFS2l.jpg</a><br />
<a href="http://i.imgur.com/X0MPt5S.jpg" target="_blank" rel="noopener" class="mycode_url">http://i.imgur.com/X0MPt5S.jpg</a><br />
<a href="http://i.imgur.com/GjGyqWv.jpg" target="_blank" rel="noopener" class="mycode_url">http://i.imgur.com/GjGyqWv.jpg</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Anyway, I am not a teacher and rather I am a learner. Seriously, no joking. I just think that colors, mood, different known technics is a very interesting and hopefully useful theme for a thread. And I am the first one who would be grateful to know something new about colors aesthetics.</span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Mirror for Amnesia]]></title>
			<link>https://www.frictionalgames.com/forum/thread-23877.html</link>
			<pubDate>Sat, 16 Nov 2013 21:13:10 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-23877.html</guid>
			<description><![CDATA[Hey ppl. <br />
I just created a new entry for the wiki about mirrors, and I thought I should let you know where it is, since the wiki structure is a little messy.<br />
<br />
Here: <a href="http://wiki.frictionalgames.com/hpl2/tutorials/level_editor/creating_mirrors" target="_blank" rel="noopener" class="mycode_url">LINK</a>]]></description>
			<content:encoded><![CDATA[Hey ppl. <br />
I just created a new entry for the wiki about mirrors, and I thought I should let you know where it is, since the wiki structure is a little messy.<br />
<br />
Here: <a href="http://wiki.frictionalgames.com/hpl2/tutorials/level_editor/creating_mirrors" target="_blank" rel="noopener" class="mycode_url">LINK</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[How To Create A Thunder And Lightning Storm Tutorial!!!]]></title>
			<link>https://www.frictionalgames.com/forum/thread-22252.html</link>
			<pubDate>Sat, 27 Jul 2013 20:41:16 +0000</pubDate>
			<guid isPermaLink="false">https://www.frictionalgames.com/forum/thread-22252.html</guid>
			<description><![CDATA[Okay everyone, I have been looking for a way to make a decent thunder and lightning storm with scripts for a while now and figured out a way to do so, without scripts!!!<br />
<br />
First you need to set up a spotlight and change the following values:<br />
<br />
<div style="text-align: center;" class="mycode_align"><span style="color: #FF0000;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">-General-<br />
<br />
☑ Active<br />
<br />
Diffuse color:<br />
R=0<br />
G=0<br />
B=0<br />
A=1</span></span><br />
<br />
<br />
_____________________________________________________________<br />
<br />
<span style="color: #0000CD;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">-Flicker-<br />
<br />
☑ Flicker Active<br />
<br />
On Sound=general_thunder.snt<br />
<br />
Off Color:<br />
R=1<br />
G=1<br />
B=1<br />
A=0</span></span></div>
<br />
The name of the spotlights, the on and off times and sounds and other values are all up to you for the desired effect you are seeking. For example, this is my setup:<br />
<br />
<div style="text-align: center;" class="mycode_align"><span style="color: #FF0000;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">-General-<br />
<br />
Name=PointLight_1<br />
<br />
☑ Active<br />
<br />
Position<br />
X=0<br />
Y=0<br />
Z=0<br />
<br />
Gobo=None<br />
<br />
Anim Mode/Frame Time<br />
None       /0<br />
<br />
Falloff Map=None<br />
<br />
Diffuse color:<br />
R=0<br />
G=0<br />
B=0<br />
A=1</span><br />
</span><br />
<br />
_____________________________________________________________<br />
<br />
<span style="color: #6B8E23;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">-Point-<br />
<br />
Rotation<br />
X=0<br />
Y=0<br />
Z=0<br />
<br />
Radius<br />
25</span><br />
</span><br />
<br />
_____________________________________________________________<br />
<br />
<span style="color: #0000CD;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">-Flicker-<br />
<br />
☑ Flicker Active<br />
<br />
On Min time/On Max time<br />
5               /15<br />
<br />
On Sound=general_thunder.snt<br />
On PS=None<br />
<br />
Off Min time/Off Max time<br />
0               /0<br />
<br />
Off Sound=None<br />
OffPS=None<br />
<br />
Off Radius<br />
15<br />
<br />
Off Color:<br />
R=1<br />
G=1<br />
B=1<br />
A=0<br />
<br />
☑Fade<br />
<br />
On Min time/On Max time<br />
0.1           /0.5<br />
<br />
Off Min time/Off Max time<br />
01.            /0.5</span><br />
</span></div>
<br />
This is simply what I'm using for my map and as I stated anything can be changed for a specific requirement for their map. If you have any questions comment or shoot me a message.<br />
<br />
Here a couple of photos if the above was not clear enough.<br />
<br />
<img src="https://www.frictionalgames.com/forum/images/attachtypes/image.gif" title="GIF Image" border="0" alt=".gif" />
&nbsp;&nbsp;<a href="attachment.php?aid=3938" target="_blank" title="">PointLight General Tab.gif</a> (Size: 262.09 KB / Downloads: 513)
<br />
<br />
<img src="https://www.frictionalgames.com/forum/images/attachtypes/image.gif" title="GIF Image" border="0" alt=".gif" />
&nbsp;&nbsp;<a href="attachment.php?aid=3939" target="_blank" title="">PointLight Point Tab.gif</a> (Size: 266.62 KB / Downloads: 531)
<br />
<br />
<img src="https://www.frictionalgames.com/forum/images/attachtypes/image.gif" title="GIF Image" border="0" alt=".gif" />
&nbsp;&nbsp;<a href="attachment.php?aid=3940" target="_blank" title="">PointLight Flicker Tab.gif</a> (Size: 267.88 KB / Downloads: 572)
]]></description>
			<content:encoded><![CDATA[Okay everyone, I have been looking for a way to make a decent thunder and lightning storm with scripts for a while now and figured out a way to do so, without scripts!!!<br />
<br />
First you need to set up a spotlight and change the following values:<br />
<br />
<div style="text-align: center;" class="mycode_align"><span style="color: #FF0000;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">-General-<br />
<br />
☑ Active<br />
<br />
Diffuse color:<br />
R=0<br />
G=0<br />
B=0<br />
A=1</span></span><br />
<br />
<br />
_____________________________________________________________<br />
<br />
<span style="color: #0000CD;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">-Flicker-<br />
<br />
☑ Flicker Active<br />
<br />
On Sound=general_thunder.snt<br />
<br />
Off Color:<br />
R=1<br />
G=1<br />
B=1<br />
A=0</span></span></div>
<br />
The name of the spotlights, the on and off times and sounds and other values are all up to you for the desired effect you are seeking. For example, this is my setup:<br />
<br />
<div style="text-align: center;" class="mycode_align"><span style="color: #FF0000;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">-General-<br />
<br />
Name=PointLight_1<br />
<br />
☑ Active<br />
<br />
Position<br />
X=0<br />
Y=0<br />
Z=0<br />
<br />
Gobo=None<br />
<br />
Anim Mode/Frame Time<br />
None       /0<br />
<br />
Falloff Map=None<br />
<br />
Diffuse color:<br />
R=0<br />
G=0<br />
B=0<br />
A=1</span><br />
</span><br />
<br />
_____________________________________________________________<br />
<br />
<span style="color: #6B8E23;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">-Point-<br />
<br />
Rotation<br />
X=0<br />
Y=0<br />
Z=0<br />
<br />
Radius<br />
25</span><br />
</span><br />
<br />
_____________________________________________________________<br />
<br />
<span style="color: #0000CD;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">-Flicker-<br />
<br />
☑ Flicker Active<br />
<br />
On Min time/On Max time<br />
5               /15<br />
<br />
On Sound=general_thunder.snt<br />
On PS=None<br />
<br />
Off Min time/Off Max time<br />
0               /0<br />
<br />
Off Sound=None<br />
OffPS=None<br />
<br />
Off Radius<br />
15<br />
<br />
Off Color:<br />
R=1<br />
G=1<br />
B=1<br />
A=0<br />
<br />
☑Fade<br />
<br />
On Min time/On Max time<br />
0.1           /0.5<br />
<br />
Off Min time/Off Max time<br />
01.            /0.5</span><br />
</span></div>
<br />
This is simply what I'm using for my map and as I stated anything can be changed for a specific requirement for their map. If you have any questions comment or shoot me a message.<br />
<br />
Here a couple of photos if the above was not clear enough.<br />
<br />
<img src="https://www.frictionalgames.com/forum/images/attachtypes/image.gif" title="GIF Image" border="0" alt=".gif" />
&nbsp;&nbsp;<a href="attachment.php?aid=3938" target="_blank" title="">PointLight General Tab.gif</a> (Size: 262.09 KB / Downloads: 513)
<br />
<br />
<img src="https://www.frictionalgames.com/forum/images/attachtypes/image.gif" title="GIF Image" border="0" alt=".gif" />
&nbsp;&nbsp;<a href="attachment.php?aid=3939" target="_blank" title="">PointLight Point Tab.gif</a> (Size: 266.62 KB / Downloads: 531)
<br />
<br />
<img src="https://www.frictionalgames.com/forum/images/attachtypes/image.gif" title="GIF Image" border="0" alt=".gif" />
&nbsp;&nbsp;<a href="attachment.php?aid=3940" target="_blank" title="">PointLight Flicker Tab.gif</a> (Size: 267.88 KB / Downloads: 572)
]]></content:encoded>
		</item>
	</channel>
</rss>