User Tools

Site Tools


hpl2:amnesia:devenvguide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
hpl2:amnesia:devenvguide [2012/11/24 23:13]
thegreatcthulhu old revision restored (2011/09/08 15:07)
hpl2:amnesia:devenvguide [2013/10/08 13:57]
ian.thomas LoadDebugMenu -> DebugMenu
Line 1: Line 1:
 ====== Setting up Development Environment ====== ====== 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: 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:
Line 5: Line 6:
     - Enter the game normally, create a profile name (e.g. MyName) and then exit.     - Enter the game normally, create a profile name (e.g. MyName) and then exit.
     - 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"​.     - 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"​.
-    - Open main_settings.cfg and set **ShowMenu="​false"​**,​ **ShowPreMenu="​false"​**,​ **ExitMenuDirectly="​true"​**,​ **LoadDebugMenu="​true"​** ​  ​(also setting **SaveConfig="​false"​** ​  ​should be good). +    - Open main_settings.cfg and set **ShowMenu="​false"​**,​ **ShowPreMenu="​false"​**,​ **ExitMenuDirectly="​true"​**,​ **DebugMenu="​true"​** ​ (also setting **SaveConfig="​false"​** ​ should be good). 
-    - If Amnesia is 1.0.1 or above, you must set **ForceCacheLoadingAndSkipSaving="​false"​** ​  ​main_settings.cfg,​ or else map changes will not show! +    - If Amnesia is 1.0.1 or above, you must set **ForceCacheLoadingAndSkipSaving="​false"​** ​ main_settings.cfg,​ or else map changes will not show! 
-    - Open user_settings.cfg (in "​dev_user"​ folder), inside the **Debug** ​ element add **AllowQuickSave="​true"​** ​  ​(F4=save, F5=load) and change **ScriptDebugOn="​true"​**. +    - Open user_settings.cfg (in "​dev_user"​ folder), inside the **Debug** element add **AllowQuickSave="​true"​** ​ (F4=save, F5=load) and change **ScriptDebugOn="​true"​**. 
-    - In **user_settings.cfg**,​ inside the **Map** ​ element set **Folder=_fckg_QUOT__fckg_QUOT_** 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 ** user_settings.cfg**,​ inside the ** Map** element set ** File=_fckg_QUOT__fckg_QUOT_**   ​to point to the map you want to load (eg File="​my_map.map"​). +    - 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). 
-    - In order to avoid running into "File index out of bounds"​ errors when designing your custom story in the level editor, edit the file **resources.cfg** ​ located in the root the directory of Amnesia (i.e. where Amnesia is installed) and add the ''​custom_stories'' ​ directory to the list.+    ​- In **user_settings.cfg**,​ inside the **Map** element set **File=""​**  to point to the map you want to load (eg File="​my_map.map"​). 
 +    - In order to avoid running into "File index out of bounds"​ errors when designing your custom story in the level editor, edit the file **resources.cfg** located in the root the directory of Amnesia (i.e. where Amnesia is installed) and add the ''​custom_stories''​ directory to the list.
  
-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"​.+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:+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:
  
-<​code>​ +<​code>​if(ScriptDebugOn()) {
-if(ScriptDebugOn()) {+
 //Do your setup stuff //Do your setup stuff
-} +}</​code>​
-</​code>​+
  
 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. 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.
hpl2/amnesia/devenvguide.txt · Last modified: 2013/10/08 13:57 by ian.thomas