Frictional Games Forum (read-only)
Script causing game to randomly crash (No FATAL ERROR) - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Script causing game to randomly crash (No FATAL ERROR) (/thread-7885.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


RE: extra_english no longer working, once again!!! - RawkBandMan - 08-25-2011

(08-25-2011, 02:36 AM)JenniferOrange Wrote: The Villiage NEEDS to have a custom_story_settings.cfg!!! That's one of the problems. If you don't have it, it won't run. And I'm confused as to why there's a custom_stories folder in The Villiage? If The Villiage is a custom story, when you open it you should see:
A folder named Maps
The custom_story_settings.cfg
When you open the Maps folder, you should see:
The Villiage's map (mapname.map)
The .hps

It was a custom story inside a folder.

The custom is actually called Das Dorf, but there is a secondary extra_english.lang, and custom entities, thats why...


But this really isnt helping with my Escape Hell crashing!!!


RE: extra_english no longer working, once again!!! - JenniferOrange - 08-25-2011

I'm trying everything I know with this, but the BlackBox problem isn't one I'm familiar with. I apologize..
I've read over your extra english many times and nothing seems wrong to me. I DID however notice in your hpl.log it said something on the lines of "low graphics", could not having a good enough graphics card be a problem? Just throwing out suggestions.


RE: extra_english no longer working, once again!!! - RawkBandMan - 08-25-2011

(08-25-2011, 03:00 AM)JenniferOrange Wrote: I'm trying everything I know with this, but the BlackBox problem isn't one I'm familiar with. I apologize..
I've read over your extra english many times and nothing seems wrong to me. I DID however notice in your hpl.log it said something on the lines of "low graphics", could not having a good enough graphics card be a problem? Just throwing out suggestions.

Its weird, until I added the Journals part of my extra_english.lang, I've never had problems with my custom story, unless you count the time I messed up the Description part a little... Maybe I could repost in my old thread and possibly get an answer or 2 with someone who may be a little more familiar with BlackBox


RE: extra_english no longer working, once again!!! - JenniferOrange - 08-25-2011

Do you have the retail version of Amnesia or the Steam one?


RE: extra_english no longer working, once again!!! - RawkBandMan - 08-25-2011

(08-25-2011, 03:12 AM)JenniferOrange Wrote: Do you have the retail version of Amnesia or the Steam one?

Steam...


RE: extra_english no longer working, once again!!! - JenniferOrange - 08-25-2011

Alright bare with me here, cause I don't have Steam.
The BlackBox problem might be caused by the Journal section you added. Journals aren't meant to be in the extra_english.lang anyway.
In the Amnesia: The Dark Descent folder, look for the folder named Config.
Open that folder, then open the folder named lang_main.
Now open the file called english.lang with Notepad or Notepad++, whichever you have.
Use the search thing in the program (Notepad's is Edit>Find I believe) and search the word Journal.
When you find it, it should say: <CATEGORY Name="Journal">
Right under it, (just hit Enter when the cursor is right after the >.) this needs to be added:
<Entry Name="Note_MYNOTE_Name">My title note here</Entry>
<Entry Name="Note_MYNOTE_Text">My note text here</Entry>
Each on it's own line. Since you already have your notes done correctly, you can just Copy>Paste them in. Make sure all of your entries come after <CATEGORY Name="Journal"> but before the ending </CATEGORY>. make sure they're all erased from your extra_english.Lang, save, and WALA tell me if it works!


By the way, that would make your extra_english.lang look like this now:
Spoiler below!


<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You are a man named Robert Lightwood. You are having personal problems, such as depression, for an unknown reason. Your wife, Maryse Lightwood, goes on a trip to somewhere in the desert, and she dies along the way. She gives you most the things she owns in her will, including a strange artifact she found in the desert. You keep it, and strange things start happening. Such as voices telling you to "Throw it away," or "Give it to me." You ignore them, and keep living, or trying to. You are then taking a nice stroll down an abandoned road when you hear something in the bushes. You get weak from fear and fall to the floor. The world goes dark and something slaps you on the head. You wake in a cell and the story begins.</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_CellKey">Cell #801</Entry>
<Entry Name="ItemDesc_CellKey">On the side there are words scratched in. They say "Cell #801".</Entry>
<Entry Name="ItemName_CellsDoor">Specialty Threat Cells Corridor</Entry>
<Entry Name="ItemDesc_CellsDoor">A key for a locked door in the cells area where they kept me.</Entry>
<Entry Name="ItemName_SouthCells">Southern Cells</Entry>
<Entry Name="ItemName_SouthCells">The key for the Southern Cells.</Entry>
<Entry Name="ItemName_AwesomeKey">Back Hall Corridor</Entry>
<Entry Name="ItemDesc_AwesomeKey">This must be for a door in the Hallway of the Back Hall.</Entry>
</CATEGORY>
<CATEGORY Name="Ending">
<Entry Name="StartCredits">
Escape Hell Beta[br]
Made By: XxRoCkBaNdMaNxX[br]
Thanks to [br]XxWestKillzXx and [FuG]wolfofdestruction for beta testing and motivation![br][br]
Following People from Frictional Games Forums: [br]Roenlond, Mofo, Kyle, Greven, Phoroneus,
Frictional Games for this awesome piece of work
Everyone in the community for playing.[br] Stay tuned for the full custom!..... [br][br][br][br]and for Chapter 2
</Entry>
</CATEGORY>
<CATEGORY Name="Levels">
<Entry Name="level_dungeon_1">Water Works</Entry>
<Entry Name="level_dungeon_2">Outer Cells</Entry>
<Entry Name="SpecialCells">Specialty Threats Cells</Entry>
<Entry Name="SouthernCells">Southern Cells</Entry>
<Entry Name="NorthernCells">Northern Cells</Entry>
</CATEGORY>
</LANGUAGE>





RE: extra_english no longer working, once again!!! - RawkBandMan - 08-25-2011

(08-25-2011, 03:23 AM)JenniferOrange Wrote: Alright bare with me here, cause I don't have Steam.
The BlackBox problem might be caused by the Journal section you added. Journals aren't meant to be in the extra_english.lang anyway.
In the Amnesia: The Dark Descent folder, look for the folder named Config.
Open that folder, then open the folder named lang_main.
Now open the file called english.lang with Notepad or Notepad++, whichever you have.
Use the search thing in the program (Notepad's is Edit>Find I believe) and search the word Journal.
When you find it, it should say: <CATEGORY Name="Journal">
Right under it, (just hit Enter when the cursor is right after the >.) this needs to be added:
<Entry Name="Note_MYNOTE_Name">My title note here</Entry>
<Entry Name="Note_MYNOTE_Text">My note text here</Entry>
Each on it's own line. Since you already have your notes done correctly, you can just Copy>Paste them in. Make sure all of your entries come after <CATEGORY Name="Journal"> but before the ending </CATEGORY>. make sure they're all erased from your extra_english.Lang, save, and WALA tell me if it works!


By the way, that would make your extra_english.lang look like this now:
Spoiler below!


<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You are a man named Robert Lightwood. You are having personal problems, such as depression, for an unknown reason. Your wife, Maryse Lightwood, goes on a trip to somewhere in the desert, and she dies along the way. She gives you most the things she owns in her will, including a strange artifact she found in the desert. You keep it, and strange things start happening. Such as voices telling you to "Throw it away," or "Give it to me." You ignore them, and keep living, or trying to. You are then taking a nice stroll down an abandoned road when you hear something in the bushes. You get weak from fear and fall to the floor. The world goes dark and something slaps you on the head. You wake in a cell and the story begins.</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_CellKey">Cell #801</Entry>
<Entry Name="ItemDesc_CellKey">On the side there are words scratched in. They say "Cell #801".</Entry>
<Entry Name="ItemName_CellsDoor">Specialty Threat Cells Corridor</Entry>
<Entry Name="ItemDesc_CellsDoor">A key for a locked door in the cells area where they kept me.</Entry>
<Entry Name="ItemName_SouthCells">Southern Cells</Entry>
<Entry Name="ItemName_SouthCells">The key for the Southern Cells.</Entry>
<Entry Name="ItemName_AwesomeKey">Back Hall Corridor</Entry>
<Entry Name="ItemDesc_AwesomeKey">This must be for a door in the Hallway of the Back Hall.</Entry>
</CATEGORY>
<CATEGORY Name="Ending">
<Entry Name="StartCredits">
Escape Hell Beta[br]
Made By: XxRoCkBaNdMaNxX[br]
Thanks to [br]XxWestKillzXx and [FuG]wolfofdestruction for beta testing and motivation![br][br]
Following People from Frictional Games Forums: [br]Roenlond, Mofo, Kyle, Greven, Phoroneus,
Frictional Games for this awesome piece of work
Everyone in the community for playing.[br] Stay tuned for the full custom!..... [br][br][br][br]and for Chapter 2
</Entry>
</CATEGORY>
<CATEGORY Name="Levels">
<Entry Name="level_dungeon_1">Water Works</Entry>
<Entry Name="level_dungeon_2">Outer Cells</Entry>
<Entry Name="SpecialCells">Specialty Threats Cells</Entry>
<Entry Name="SouthernCells">Southern Cells</Entry>
<Entry Name="NorthernCells">Northern Cells</Entry>
</CATEGORY>
</LANGUAGE>


That doesn't sound right... Other custom stories have the Journals part in their extra_english.lang...


RE: extra_english no longer working, once again!!! - RawkBandMan - 08-25-2011

Strange...

I went to try it again today, and it let me in the map!

But when I went to go to the 2nd map, it crashed immediatly, no FATAL ERROR code or anything, but the hpl.log gave me this

ERROR: Couldn't build script 'c:/program files/steam/steamapps/common/amnesia the dark descent/custom_stories/Escape Hell (DEMO)/maps/ch01/NorthCells.hps'!

Here is my script

Spoiler below!

void OnStart()
{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100);
}
AddEntityCollideCallback("Player", "BruteWalkAway", "ActivateBrute", true, 1);
AddEntityCollideCallback("servant_brute_1", "Disappear", "FadeEnemy", true, 1);
}

void ActivateBrute(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddTimer("Freeze", 2.0f, "FreezePlayer");
SetLightVisible("torch_static01_6", false);
SetLightVisible("torch_static01_7", false);
SetLightVisible("torch_static01_8", false);
SetLightVisible("torch_static01_9", false);
SetLightVisible("torch_static01_10", false);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0.5f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0.5f, "");

}

void FreezePlayer(string &in asTimer)
{
SetPlayerActive(false);
StartPlayerLookAt("servant_brute_1", "", "", "");
AddTimer("Look", 5.0f, "LookAt");
}

void LookAt(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}

void FadeEnemy(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_brute_1", false);
}






RE: Script causing game to randomly crash (No FATAL ERROR) - RawkBandMan - 08-27-2011

Bumper Cars!


RE: Script causing game to randomly crash (No FATAL ERROR) - JenniferOrange - 08-27-2011

Try this:
Spoiler below!

void OnStart()
{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100);
}
AddEntityCollideCallback("Player", "BruteWalkAway", "ActivateBrute", true, 1);
AddEntityCollideCallback("servant_brute_1", "Disappear", "FadeEnemy", true, 1);
}

void ActivateBrute(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddTimer("Freeze", 2.0f, "FreezePlayer");
SetLightVisible("torch_static01_6", false);
SetLightVisible("torch_static01_7", false);
SetLightVisible("torch_static01_8", false);
SetLightVisible("torch_static01_9", false);
SetLightVisible("torch_static01_10", false);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0.5f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0.5f, "");

}

void FreezePlayer(string &in asTimer)
{
SetPlayerActive(false);
StartPlayerLookAt("servant_brute_1", "", "", "");
AddTimer("Look", 5.0f, "LookAt");
}

void LookAt(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}

void FadeEnemy(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_brute_1", false);
}

void OnEnter()
{
}

void OnLeave()
{
}