Frictional Games Forum (read-only)
Amnesia custom story scripting 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Amnesia custom story scripting help (/thread-10532.html)



Amnesia custom story scripting help - Electrofuze - 10-01-2011

Hi guys for some reason my custom story map i am testing out doesnt seem to work i followed 3 youtube guiders to script it so i can run it on game but non of them work. Now i am geting pretty much fustrated. This is what i did for my Hps file
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Small Storage room key", "Small storage room", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Small storage room", false, true);
PlaySoundAtEntity("", "unlock_door", "Small storage room", 0, false);
RemoveItem("Small storage room key")
}

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

}

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

}


and for my custom_story_settings_ cfg i did
<Main

Imgfile = "Amnesia-Shambles"
Name = "LivingNightmare"
Auther = "Electrofuze"

Mapsfolder = "Maps/Ch01/"
Startmap = "00_TheHowling.map
Startpos = "PlayerStartArea_2"
/>
oh and for the locations where i place the files can you also add that xD please and thank you Tongue


RE: Amnesia custom story scripting help - Obliviator27 - 10-01-2011

In response to "Where do the files go"

Your custom_story_settings.cfg file goes into the main directory. So, your LivingNightmare folder.

You also want Author, not Auther



In response to your script error, remove the spaces between your names.
For example:
"Small storage room" to "SmallStorageRoom", and be sure to alter your level editor names as well.



RE: Amnesia custom story scripting help - ggstarfoxxie - 10-01-2011

There's a missing ; after your RemoveItem("Small storage room key") too.


RE: Amnesia custom story scripting help - Electrofuze - 10-01-2011

(10-01-2011, 04:39 AM)Obliviator27 Wrote: In response to "Where do the files go"

Your custom_story_settings.cfg file goes into the main directory. So, your LivingNightmare folder.

You also want Author, not Auther



In response to your script error, remove the spaces between your names.
For example:
"Small storage room" to "SmallStorageRoom", and be sure to alter your level editor names as well.
K thanks i will try that but i heard theres somthing called a extra lang maybe that might be the case?
If so how would i beable to script it?


RE: Amnesia custom story scripting help - Obliviator27 - 10-01-2011

The extra_english(or whatever language).lang file is dropped into your custom story main directory.
Look here for details on how to set it up: http://wiki.frictionalgames.com/hpl2/tutorials/script/howtomakenotes



RE: Amnesia custom story scripting help - Electrofuze - 10-01-2011

(10-01-2011, 05:05 AM)Obliviator27 Wrote: The extra_english(or whatever language).lang file is dropped into your custom story main directory.
Look here for details on how to set it up: http://wiki.frictionalgames.com/hpl2/tutorials/script/howtomakenotes


K i got that all down what you guys told me and i fixed up everything i made a Extra_English.lang Custom_story_settings.cfg and a hps for the map and my custom story still doesnt pop up under my amnesia custom story maybe something went wrong when i was scriping?



RE: Amnesia custom story scripting help - Obliviator27 - 10-01-2011

extra_english.lang
It's lowercase.
Anyhow, You want your .hps to be in the same folder your .map file is, and they have to have the same name.

Example:
Level1.map
Level1.hps

so in your case,
00_TheHowling.map
00_TheHowling.hps

And your .cfg file should be

<Main

Name = "LivingNightmare"
Author = "Electrofuze"
Imgfile = "Amnesia-Shambles"
Mapsfolder = "Maps/Ch01/"
Startmap = "00_TheHowling.map
Startpos = "PlayerStartArea_2"
/>

I doubt the order in which those terms appear is important, but I switched them around to what I have just in case.




RE: Amnesia custom story scripting help - Electrofuze - 10-01-2011

(10-01-2011, 06:21 AM)Obliviator27 Wrote: extra_english.lang
It's lowercase.
Anyhow, You want your .hps to be in the same folder your .map file is, and they have to have the same name.

Example:
Level1.map
Level1.hps

so in your case,
00_TheHowling.map
00_TheHowling.hps

And your .cfg file should be

<Main

Name = "LivingNightmare"
Author = "Electrofuze"
Imgfile = "Amnesia-Shambles"
Mapsfolder = "Maps/Ch01/"
Startmap = "00_TheHowling.map
Startpos = "PlayerStartArea_2"
/>

I doubt the order in which those terms appear is important, but I switched them around to what I have just in case.
Its strange i switched it to your order it didnt work then i played around with it no luck Since your an expert Smile. Can you make sure my order on what i did is correct because i have a feeling my hps folder is messed up.and just to let you know i am using notepad++
Custom_Story_Settings.cfg
<Main

Name = "LivingNightmare"
Author = "Electrofuze"
Imgfile = "Amnesia-Shambles"
Mapsfolder = "Maps/Ch01/"
Startmap = "00_TheHowling.map
Startpos = "PlayerStartArea_2"
/>
00_Thehowling.hps
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "SmallStorageRoomkey", "SmallStorageRoom", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Smallstorageroom", false, true);
PlaySoundAtEntity("", "unlock_door", "SmallStorageRoom", 0, false);
RemoveItem("SmallStorageRoomkey");
}

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

}

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

}
extra_english.lang
<LANGUAGE>
<CATEGORY Name="Livingnightmare">
<Entry Name="Description">Just a description.</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Explaining_Name">Explaining</Entry>
<Entry Name="Explaining_Text">This is a test note.</Entry>
</CATEGORY>
</LANGUAGE>
thats what i have and for the locations
My customstory settings are in my Livingnightmare Directory same goes for extra english lang
and then Maps/ch01 i have my map and my hps folder
I hope thats correct oh and thank you for helping me alot to i gave you rep your aswome lol



RE: Amnesia custom story scripting help - SargentMessi - 02-29-2012

Is not UsedKeyOnDoor, it's KeyOnDoor, and if you make another Key, i recomended you put KeyOnDoor2
I made a custom_Storie, and when i open my amnesia launcher, i enter. And on custom_stories, it's my cs, but the image doesn't appears.

I have this in my custom_stories_settings:


<Main
ImgFile = "Xodaaaa.png"
Name = "Sufrimiento eterno "
Author = "Julian Yordano"

MapsFolder = "maps/"
StartMap = "Sufrimiento eterno.map"
StartPos = "PlayerStartArea_1"
/>


PS: Sorry for my bad english, i'm from Argentina Smile

Thanks bye!


RE: Amnesia custom story scripting help - flamez3 - 02-29-2012

(02-29-2012, 08:26 PM)SargentMessi Wrote: Is not UsedKeyOnDoor, it's KeyOnDoor, and if you make another Key, i recomended you put KeyOnDoor2
I made a custom_Storie, and when i open my amnesia launcher, i enter. And on custom_stories, it's my cs, but the image doesn't appears.

I have this in my custom_stories_settings:


ImgFile = "Xodaaaa.png"
Name = "Sufrimiento eterno "
Author = "Julian Yordano"

MapsFolder = "maps/"
StartMap = "Sufrimiento eterno.map"
StartPos = "PlayerStartArea_1"
/>


PS: Sorry for my bad english, i'm from Argentina Smile

Thanks bye!
The image needs to be in your custom story folder. And I think it needs to be a.jpg format. Next time make a new thread for this problem and not use someone else's.