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
Amnesia custom story scripting help
Electrofuze Offline
Junior Member

Posts: 13
Threads: 3
Joined: Sep 2011
Reputation: 0
#1
Amnesia custom story scripting help

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
(This post was last modified: 10-01-2011, 04:14 AM by Electrofuze.)
10-01-2011, 04:01 AM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#2
RE: Amnesia custom story scripting help

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.

10-01-2011, 04:39 AM
Find
ggstarfoxxie Offline
Junior Member

Posts: 36
Threads: 9
Joined: Aug 2011
Reputation: 2
#3
RE: Amnesia custom story scripting help

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

10-01-2011, 04:45 AM
Find
Electrofuze Offline
Junior Member

Posts: 13
Threads: 3
Joined: Sep 2011
Reputation: 0
#4
RE: Amnesia custom story scripting help

(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?
(This post was last modified: 10-01-2011, 04:56 AM by Electrofuze.)
10-01-2011, 04:53 AM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#5
RE: Amnesia custom story scripting help

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/tut...omakenotes

10-01-2011, 05:05 AM
Find
Electrofuze Offline
Junior Member

Posts: 13
Threads: 3
Joined: Sep 2011
Reputation: 0
#6
RE: Amnesia custom story scripting help

(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/tut...omakenotes


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?
10-01-2011, 06:08 AM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#7
RE: Amnesia custom story scripting help

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.


10-01-2011, 06:21 AM
Find
Electrofuze Offline
Junior Member

Posts: 13
Threads: 3
Joined: Sep 2011
Reputation: 0
#8
RE: Amnesia custom story scripting help

(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
10-01-2011, 06:31 AM
Find
SargentMessi Offline
Junior Member

Posts: 2
Threads: 0
Joined: Feb 2012
Reputation: 0
#9
RE: Amnesia custom story scripting help

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!
(This post was last modified: 02-29-2012, 08:30 PM by SargentMessi.)
02-29-2012, 08:26 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#10
RE: Amnesia custom story scripting help

(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.

02-29-2012, 10:57 PM
Find




Users browsing this thread: 3 Guest(s)