Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Story HELP!!!
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
#7
Solved: 6 Years, 6 Months, 2 Weeks ago RE: Custom Story HELP!!!

Allright, I got it working.
You have many mistakes in the custom_story_settings.cfg file.
1. The file is called "custom_story_setting" (notice the lack of "s" at the end)
2. You didn't put the ending bracket at the end ("/>")
3. You didn't add the extension .map in the map name, which was one more thing which disabled the mod from appearing.
4. You put maps/ instead maps, which I think interfered as well
5. You didn't put ImgFile = "" (there can be a picture file name in the brackets) which might be harmful as well

So here's how the file should look:

PHP Code: (Select All)
<Main
    ImgFile 
""   
    
Name "Deadly Secrets "
       
Author "Tigerlillymaya"

       
MapsFolder "maps"
       
StartMap "01_room.map"
       
StartPos "PlayerStartArea_1"

/> 

And how it looked:

PHP Code: (Select All)
<Main
   Name 
"Deadly Secrets "
   
Author "Tigerlillymaya"

   
MapsFolder "maps/"
   
StartMap "01_room"
   
StartPos "PlayerStartArea_1" 

Just paste the correct version into the file.
Also, remember to change the file name to custom_story_settings !!!

I just noticed that your first map has plenty of coding issues as well, which crashes the mod when it loads. Will take a look in a sec

sooooo
Here's the original code. The ////(...) things are my comments.
You can compare it to the correct version below.
PHP Code: (Select All)
///////////////////////////
// Run first time starting map
void OnStart()
{

//this bracket shouldn't be here; the next one is correct 

PreloadSound(general_pianoO2.snt); //missing "" around file name
StopSound(general_pianoO2.sntfloat 0.1); // you don't write "float 0.1", it should be "1.0f", again missing "" around file name

    
AddQuest("quest1, RoomKeyQuest")  // no ";" sign at the end of function, missing " signs inside
    
AddUseItemCallback("","roomkey""mansion_2 ""UseKeyOnDoor"true);
}
void UseKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked "mansion_2"falsetrue); //missing ( after the function name
    
PlaySoundEntity("","unlock_door.snt"asEntity0false;) //";" sign inside brackets instead of outside. Also the function is called "playsoundATentity"
    
RemoveItem(asItem);
// this bracket bracket should be way below
if(ScriptDebugOn()) //Lantern and Tinder for debug // after "ScriptDebugOn()" you should add "== true". Also missing "{" bracket after the ")" bracket
        
GiveItemFromFile("lantern""lantern.ent");
        for(
int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i"tinderbox.ent");
}


void GiveItemFromFile(potion_oil_1,potion.ent); // you put this in a wrong place, also there should be "" around potion_oil_1
    

void onLeave()  //missing function body (or "{}") 

Also, if you want to get the items immediately, you should put the whole chunk in the Onstart function. As it is now it will give you a lantern, tinderboxes and oil after you open the door.

The correct script:
PHP Code: (Select All)
///////////////////////////
// Run first time starting map
void OnStart()
{

if(
ScriptDebugOn() == true
{
        
GiveItemFromFile("lantern""lantern.ent");
        for(
int i=0;i<10;i++)
        
GiveItemFromFile("tinderbox_"+i"tinderbox.ent");
        
GiveItemFromFile("potion_oil_1""potion.ent");
}


    
PreloadSound("general_pianoO2.snt");
    
StopSound("general_pianoO2.snt"0.1f);

    
AddQuest("quest1""RoomKeyQuest");
    
AddUseItemCallback("","roomkey""mansion_2 ""UseKeyOnDoor"true);
}

void UseKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked ("mansion_2"falsetrue);
    
PlaySoundAtEntity("","unlock_door.snt"asEntity0.0ffalse);
    
RemoveItem(asItem);

}

void onLeave()
{



If you correct the files, your mod will start. However there's a lot you need to learn, as you code doesn't do much yet. I don't really have time to tell you more now, but you can check out Mudbill on youtube. He has good tutorials for Amnesia modding.

Oh, and your extra_english.lang file is broken as well.

(This post was last modified: 10-06-2017, 09:41 PM by Darkfire.)
10-06-2017, 09:18 PM
Find


Messages In This Thread
Custom Story HELP!!! - by tigerlillymaya13 - 09-28-2017, 08:38 PM
RE: Custom Story HELP!!! - by 7heDubz - 09-28-2017, 11:44 PM
RE: Custom Story HELP!!! - by tigerlillymaya13 - 09-29-2017, 01:02 AM
RE: Custom Story HELP!!! - by 7heDubz - 09-29-2017, 12:52 PM
RE: Custom Story HELP!!! - by tigerlillymaya13 - 09-30-2017, 01:23 AM
RE: Custom Story HELP!!! - by tigerlillymaya13 - 10-06-2017, 08:01 PM
RE: Custom Story HELP!!! - by Darkfire - 10-06-2017, 09:18 PM
RE: Custom Story HELP!!! - by tigerlillymaya13 - 10-06-2017, 09:44 PM



Users browsing this thread: 1 Guest(s)