skip to content
Frictional Game Wiki
User Tools
Register
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
Register
>
Recent Changes
Media Manager
Sitemap
Trace:
hpl2:amnesia:devenvguide
<h1>Setting up Development Environment</h1> <div class="level1"> <p> In order to make maps for Amnesia you will need to set up the game, so you can easily test maps and reload scripts. First of all, follow these steps to create a dev user: </p> <ol> <li class="level1"> Enter the game normally, create a profile name (e.g. MyName) and then exit.</li> <li class="level2"> Enter the save directory ("My Documents/Amnesia/Main" in windows by default; "~/.frictionalgames/Amnesia/Main" in Linux) and rename the user name (e.g. MyName) to "dev_user".</li> <li class="level2"> Open main_settings.cfg and set <b>ShowMenu="false"</b>, <b>ShowPreMenu="false"</b>, <b>ExitMenuDirectly="true"</b>, <b>LoadDebugMenu="true"</b> (also setting <b>SaveConfig="false"</b> should be good).</li> <li class="level2"> If Amnesia is 1.0.1 or above, you must set <b>ForceCacheLoadingAndSkipSaving="false"</b> main_settings.cfg, or else map changes will not show!</li> <li class="level2"> Open user_settings.cfg (in "dev_user" folder), inside the <b>Debug</b> element add <b>AllowQuickSave="true"</b> (F4=save, F5=load) and change <b>ScriptDebugOn="true"</b>.</li> <li class="level2"> In <b>user_settings.cfg</b>, inside the <b>Map</b> element set <b>Folder=_ckgedit_QUOT<u>ckgedit><b> to the root folder for your maps (eg Folder="MyMaps/"), this folder MUST be located inside the maps folder in the game directory (where you put the tools). - In </b>user_settings.cfg<b>, inside the </b>Map<b> element set </b>File=_ckgedit_QUOT</u>ckgedit></b> to point to the map you want to load (eg File="my_map.map").</li> <li class="level2"> In order to avoid running into "File index out of bounds" errors when designing your custom story in the level editor, edit the file <b>resources.cfg</b> located in the root the directory of Amnesia (i.e. where Amnesia is installed) and add the <code>custom_stories</code> directory to the list.</li> </ol> <p> Now you can simply run Amnesia and the map will be loaded directly without any menu. You can now press <b>F1</b> to open a <b>debug menu</b> to turn on/off various things and more importantly quick reload the map. This is probably the most important thing to do when editing. When changed a script or added entities to a map, do NOT restart the game, instead simply press "Quick reload". If a mesh or texture has been updated, you need to press "Reload". </p> <p> By setting <b>ScriptDebugOn="true"</b> you have set the script function ScriptDebugOn() to return true. This is extremly important as you can add in your startup code something like: </p> <pre class="code">if(ScriptDebugOn()) { //Do your setup stuff } </pre><p> </p> <p> This will enable you to easily add all kinds of debug stuff (giving lantern, extra items, etc) wihout having to worry about removing it for the final release. </p> <p> Now you should be ready to start some editing! </p> </div>
hpl2/amnesia/devenvguide.txt
· Last modified: 2013/10/08 13:57 by
ian.thomas
Page Tools
Show page
Old revisions
Backlinks
Export to PDF
Back to top