Frictional Games Forum (read-only)
Error trying to run first map, help! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Error trying to run first map, help! (/thread-7568.html)

Pages: 1 2


Error trying to run first map, help! - ZutaraRaven - 04-22-2011

Hi guys!
So I decided to make a little test map for myself to learn the tools and things I need to know to create my custom story, but I'm having trouble getting it to run.

Basically all I've done so far is browse around frictional games' hpl2 wiki, reading around scripts and following tutorials, and reading some stuff on scripting on these forums.
I followed this tutorial for the map: http://wiki.frictionalgames.com/hpl2/tutorials/level_editor/tutorial_1
Used this to set up the dev environment: http://wiki.frictionalgames.com/hpl2/amnesia/devenvguide
Used the default script from this tutorial: http://wiki.frictionalgames.com/hpl2/tutorials/script/tutorial_1
And followed the steps here:
http://wiki.frictionalgames.com/hpl2/amnesia/custom_story

I browsed around the frictional games forum and made a couple edits to a few things.
This is my map's hps file:

////////////////////////////
// Run first time starting map
void OnStart()
{

//Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");

for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}
}

void MonsterFunc1(string &in asParent, string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

[I put a little miniature grunt in the closet... heheh. I think I may have to put the path nodes in the script to make him follow it though... I forgot about that.]

And this is the custom_story_settings.cfg file:
<Main
Name="First Map"
Author="Meigen and Ailin"
ImgFile=""
MapsFolder="maps/"
StartMap="First Map--Tutorial.map"
StartPos="PlayerStartArea_1"
/>

I made sure the start map, the maps folder, and the player start area were consistent in all the files they were in.

Map .map and .hps files are in C:\Program Files (x86)\Amnesia - The Dark Descent\redist\custom_stories\Custom Map Test\maps
The rest of the configuration and language files are in Custom Map Test.

When I try to run Amnesia, it gives me the error: FATAL ERROR: Cannot load world files 'maps/First Map--Tutorial.map'

Okay... That's what I've got. As far as previous programming experience, I've taken a class on javascript before. But I pretty much suck. Smile

That felt like a lot of information to type out. Tongue Please help me out guys.


RE: Error trying to run first map, help! - laser50 - 04-22-2011

To begin with, try to remove the -- in your name, Change the map name to something like Map1, Something easier.

Second, You have MonsterFunc 1, But i don't see it exsisting anywhere (It's not being called/ will probably get errors)

I hope these 2 things helped.


RE: Error trying to run first map, help! - Lexander.R - 04-22-2011

hmmmm. have you got a player start area in the map?


RE: Error trying to run first map, help! - ZutaraRaven - 04-23-2011

(04-22-2011, 09:42 PM)laser50 Wrote: To begin with, try to remove the -- in your name, Change the map name to something like Map1, Something easier.

Second, You have MonsterFunc 1, But i don't see it exsisting anywhere (It's not being called/ will probably get errors)

I hope these 2 things helped.

I changed the map name to firstmap.map, and it's corresponding hps to firstmap.hps. I made sure to change this in custom_story_settings.cfg and user_settings.cfg
I also removed my mini monster man, just to simplify things so I can try to get it up and running.
I still get the same error. :/
(04-22-2011, 10:41 PM)Lexander.R Wrote: hmmmm. have you got a player start area in the map?

Yes, I double checked after you posted this. It's called PlayerStartArea_1, and is called that in the proper configuration files.


RE: Error trying to run first map, help! - laser50 - 04-23-2011

Are you sure you made a folder FOR your Custom story in
Amnesia - The Dark Descent/redist/custim_stories?

And did you make a folder called "maps" there??

Check those.


RE: Error trying to run first map, help! - MrBigzy - 04-23-2011

Also, miniature grunt won't work unless you alter him with a 3d modeling program. You can scale him in the the level editor, but it won't do anything. D:

Can you post your config and lang files? Also, make sure they're both in the root directory of your custom story folder.


RE: Error trying to run first map, help! - ZutaraRaven - 04-23-2011

(04-23-2011, 10:21 AM)laser50 Wrote: Are you sure you made a folder FOR your Custom story in
Amnesia - The Dark Descent/redist/custim_stories?

And did you make a folder called "maps" there??

Check those.

Yes, I have /redist/custom_stories/Custom Map Test/maps
My .map and .hps are inside the maps folder, and everything else is in Custom Map Test.
(04-23-2011, 02:40 PM)MrBigzy Wrote: Also, miniature grunt won't work unless you alter him with a 3d modeling program. You can scale him in the the level editor, but it won't do anything. D:

Can you post your config and lang files? Also, make sure they're both in the root directory of your custom story folder.

Ahwww dang. D: 3D modeling program I do have though... Blender, tehee. Maybe eventually I'll learn to import custom entities, but I'll get this thing running first.

The lang and config files are both in /redist/custom_maps/Custom Map Test

lang file:
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">
Our first map. Big Grin
</Entry>
</CATEGORY>
</LANUGAGE>

config file:
<Main
Name="First Map"
Author="Meigen and Ailin"
ImgFile=""
MapsFolder="maps/"
StartMap="firstmap.map"
StartPos="PlayerStartArea_1"
/>

Edit: Sooo it looks like indentation died when I posted this, even though when I go in to edit this the indentation is there. I have it exactly like it is shown in the tutorials.


RE: Error trying to run first map, help! - MrBigzy - 04-23-2011

</LANUGAGE>

Yea, that's spelled wrong. xD


RE: Error trying to run first map, help! - laser50 - 04-23-2011

Change </LAUGAGE> To </LANGUAGE>


RE: Error trying to run first map, help! - ZutaraRaven - 04-23-2011

Oh, the woe! D:
Hehe, fixed now.

Strangely, I'm still getting the same error. I'm reeeally hating that little beep noise it makes every time the game crashes...