User Tools

Site Tools


Sidebar

hpl2:amnesia:devenvguide

Setting up Development Environment

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:

  1. Enter the game normally, create a profile name (e.g. MyName) and then exit.
  2. Enter the save directory (“My Documents/Amnesia/Main” in windows by default) and rename the user name (e.g. MyName) to “dev_user”.
    1. NOTE: The folder for config files on Linux will normally be “~/.frictionalgames/Amnesia/Main”
  3. Open main_settings.cfg and set ShowMenu=“false”, ShowPreMenu=“false”, ExitMenuDirectly=“true”, LoadDebugMenu=“true” (also setting SaveConfig=“false” should be good).
  4. If Amnesia is 1.0.1 or above, you must set ForceCacheLoadingAndSkipSaving=“false” main_settings.cfg, or else map changes will not show!
  5. Open user_settings.cfg (in “dev_user” folder), inside the “<Debug”-element add AllowQuickSave=“true” (F4=save, F5=load) and change ScriptDebugOn=“true”.
  6. In user_settings.cfg, inside the “<Map”-element set Folder=“” 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).
  7. In user_settings.cfg, inside the “<Map”-element set File=““ to point to the map you want to load (eg File=“my_map.map”).

Now you can simply run Amnesia and the map will be loaded directly without any menu. You can now press F1 to open a debug menu 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”.

By setting ScriptDebugOn=“true” you have set the script function ScriptDebugOn() to return true. This is extremly important as you can add in your startup code something like:

if(ScriptDebugOn())
{
  //Do your setup stuff
}

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.

Now you should be ready to start some editing!

hpl2/amnesia/devenvguide.1293841092.txt.gz · Last modified: 2011/01/01 00:18 by gbutler69