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


Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anyone Need Help? (Thread #2)
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#1
Question  Anyone Need Help? (Thread #2)

This thread has been made by me to help anyone who needs to ask a question mostly about scripting. Smile

Also it could help people by those who are looking for some can easily find an active thread that shall be cluttered with people's questions and answers to keep people from painfully have to go through the 100-some pages of threads. Big Grin

Ask away! Wink

07-22-2011, 05:25 PM
Find
Rokotain Offline
Member

Posts: 54
Threads: 9
Joined: Jul 2011
Reputation: 0
#2
RE: Anyone Need Help? (Thread #2)

Hi Kyle :3

I've seen a somewhat ok solution to what I am about to ask somewhere here on the forums, but I can't find it again :/
Anyways, I wonder how I could make:

Description
Start Picture (imgfile in custom_story_settings.cfg)
&
Ending Credits

About the Start Picture. I have a .jpg picture in my custom story folder. And I've typed the right name and everything, but when I open custom story after launching Amnesia, the picture is in black-white and is strecthed heavily diagonally. It also appears on all custom stories.
I don't know how to fix that :/
I've tried .png picture as well, and with both widescreen and square forms. But no sucess so far.

Ending credits I would like to be activated when I unlock or open a level door. There is no level on the other side at the moment, so the game will crash when attempted to open the door.
So the credits would have to be activited when I unlock the door with a key or something, at least before the game crashes.

Hope you got some answers!
Rokotain Angel
07-22-2011, 06:36 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#3
RE: Anyone Need Help? (Thread #2)

(07-22-2011, 06:36 PM)Rokotain Wrote: Hi Kyle :3

I've seen a somewhat ok solution to what I am about to ask somewhere here on the forums, but I can't find it again :/
Anyways, I wonder how I could make:

Description
Start Picture (imgfile in custom_story_settings.cfg)
&
Ending Credits

About the Start Picture. I have a .jpg picture in my custom story folder. And I've typed the right name and everything, but when I open custom story after launching Amnesia, the picture is in black-white and is strecthed heavily diagonally. It also appears on all custom stories.
I don't know how to fix that :/
I've tried .png picture as well, and with both widescreen and square forms. But no sucess so far.

Ending credits I would like to be activated when I unlock or open a level door. There is no level on the other side at the moment, so the game will crash when attempted to open the door.
So the credits would have to be activited when I unlock the door with a key or something, at least before the game crashes.

Hope you got some answers!
Rokotain Angel

Hello Rokotain. I remember when I tried to set up a custom story picture.

I believe that it gets cut and skewed when the picture is too big. I'll let you download one I used in one of my custom stories. Another reason why it could not work is because it isn't set up in the right place. From your "custom_stories" folder, there will be your custom story folder, for example I'll call it "example". Inside that folder, there should be a folder called "graphics", and another folder called "general". In there is where you should store all your pictures that are related to your custom story.

In short:

custom_stories --> example --> graphics --> general --> [Picture files in there]

Here is the link to my example picture: http://www.mediafire.com/?0qiib5ebpc5rr83

I also want to note that the reason why you see the messed up picture after clicking on other custom stories is because for some reason if the custom stories that you click on don't have a picture, then tend to "lend" the one from the one that you just clicked on.

In your "custom_stories_setting.cfg", the line that has "ImgFile" should look like this if you used the example picture I provided.

ImgFile = "CS_picture01.png"

I would like to know if it works or not and if you could get your other picture working. Smile

About the ending credits, I will have to edit this post later and put in how to do it, for I need to develop a way that does work the way it should (I never did the credits before Tongue ).

Credits Script
-------------------------------

I was easily able to get the credits working on the second try (first time failed when trying to rename key, which failed at that moment) and I'll share with you how I did it. I had a level door named "level_wood_1" and a key named "Key01". This is what my script looked like, for when the door is unlocked and when the player interacts with it once it is unlocked in a sense to start the credits and end the custom story. I did not add sounds correct because I wasn't really caring for them at that moment.

Script:

void OnStart()
{
    SetLocalVarInt("Var01", 0);
    AddUseItemCallback("", "Key01", "level_wood_1", "Cred01", true);
    SetEntityPlayerInteractCallback("level_wood_1", "Cred02", false);
}
void Cred01(string &in asItem, string &in asEntity)
{
    RemoveItem(asItem);
    SetLocalVarInt("Var01", 1);
}
void Cred02(string &in asEntity)
{
    if (GetLocalVarInt("Var01") == 1)
    {
        StartCredits("", true, "Credits", "End", 10);
    }
}

This is what my extra_english.lang looks like:

<LANGUAGE>
    <RESOURCES>
    </RESOURCES>    
    <CATEGORY Name="Inventory">
        <Entry Name="ItemName_Key01">Level Door Key</Entry>
        <Entry Name="ItemDesc_Key01">This unlocks the level door.</Entry>
    </CATEGORY>
    <CATEGORY Name="Credits">
        <Entry Name="End">[br][br][br]This is a credits test.[br][br]I hope this works! :D</Entry>
    </CATEGORY>
</LANGUAGE>

I hope this helps you! Big Grin

(This post was last modified: 07-22-2011, 08:04 PM by Kyle.)
07-22-2011, 07:27 PM
Find
JoeBradleyUK Offline
Member

Posts: 115
Threads: 20
Joined: Jul 2011
Reputation: 0
#4
RE: Anyone Need Help? (Thread #2)

I've recently posted in a thread to do with flashbacks, I got some responses but I still don't understand! I was wondering If you could go through what I have to do for flashbacks, in as much detail as possible.Tongue

:Work In Progress:
Insanity
07-22-2011, 09:32 PM
Find
Rokotain Offline
Member

Posts: 54
Threads: 9
Joined: Jul 2011
Reputation: 0
#5
RE: Anyone Need Help? (Thread #2)

To Kyle:

I've tested both credits and picture and they both work perfectly fine^^!

Thanks alot for your help. Your picture worked, I made another picture in 1020x600 format and that one works as well.

Hope this can help alot of other people as well (:

As soon as I get description working, I will release(Hopefully today) the demo version of my custom story^^!

-RokotainAngel
07-23-2011, 12:38 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#6
RE: Anyone Need Help? (Thread #2)

Nice to know that it works for you now Rokotain. Smile

To JoeBradleyUK, I believe I found the thread that dealt with how to make flashbacks. To be honest, I have little experience in using/making flashbacks or anything text based involved in a custom story. I think the people who posted helped explain it all pretty well. :/

07-23-2011, 11:11 PM
Find
JoeBradleyUK Offline
Member

Posts: 115
Threads: 20
Joined: Jul 2011
Reputation: 0
#7
RE: Anyone Need Help? (Thread #2)

(07-23-2011, 11:11 PM)Kyle Wrote: Nice to know that it works for you now Rokotain. Smile

To JoeBradleyUK, I believe I found the thread that dealt with how to make flashbacks. To be honest, I have little experience in using/making flashbacks or anything text based involved in a custom story. I think the people who posted helped explain it all pretty well. :/

I re-read another thread and I understand it now! Thanks for your help anyway Smile

:Work In Progress:
Insanity
07-23-2011, 11:56 PM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#8
RE: Anyone Need Help? (Thread #2)

I'm having issues with my descriptions. x_x
I had one up in my custom story, along with a picture. I started making some new maps and testing things, and suddenly it says "no description" and the picture is gone. I obviously have a description in my extra_english.lang..
Spoiler below!
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">This is the Infected demo.[br][br]How long can you survive the infection?</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_Key">Key</Entry>
<Entry Name="ItemDesc_Key">Key found in rock debris.</Entry>
</CATEGORY>
</LANGUAGE>

Ba-da bing, ba-da boom.
07-24-2011, 04:09 AM
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#9
RE: Anyone Need Help? (Thread #2)

(07-24-2011, 04:09 AM)JenniferOrange Wrote: I'm having issues with my descriptions. x_x
I had one up in my custom story, along with a picture. I started making some new maps and testing things, and suddenly it says "no description" and the picture is gone. I obviously have a description in my extra_english.lang..
Spoiler below!
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">This is the Infected demo.[br][br]How long can you survive the infection?</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_Key">Key</Entry>
<Entry Name="ItemDesc_Key">Key found in rock debris.</Entry>
</CATEGORY>
</LANGUAGE>

I don't know if Kyle is only supposed to help in his thread but I tried your script and it worx perfectly for me :O


Spoiler below!

[Image: infecteddemo.png]


[Image: 44917299.jpg]Dubstep <3
07-24-2011, 04:22 AM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#10
RE: Anyone Need Help? (Thread #2)

(07-24-2011, 04:22 AM)xtron Wrote:
(07-24-2011, 04:09 AM)JenniferOrange Wrote: I'm having issues with my descriptions. x_x
I had one up in my custom story, along with a picture. I started making some new maps and testing things, and suddenly it says "no description" and the picture is gone. I obviously have a description in my extra_english.lang..
Spoiler below!
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">This is the Infected demo.[br][br]How long can you survive the infection?</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_Key">Key</Entry>
<Entry Name="ItemDesc_Key">Key found in rock debris.</Entry>
</CATEGORY>
</LANGUAGE>

I don't know if Kyle is only supposed to help in his thread but I tried your script and it worx perfectly for me :O


Spoiler below!

[Image: infecteddemo.png]


It does? There's supposed to be a picture too. Sad it doesn't show for me.

Ba-da bing, ba-da boom.
07-24-2011, 04:24 AM
Find




Users browsing this thread: 2 Guest(s)