Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Yet another noob to the ranks
Author Message
Nitt Offline
Junior Member

Posts: 6
Joined: Dec 2010
Reputation: 0
Post: #1
Yet another noob to the ranks

I have a very basic problem (I hope), that's probably due to my ignorance in scripting or something.

I've created all of the files that, from what I've researched, i think I need, in the Custom Stories folder:

|Story
---|maps
------Story.hps
------Story.map
---custom_story_settings.cfg
---extra_english.lang
---story.jpg (probably unimportant)

cfg reads:

<Main
    Name="Story"
    Author="Nitt"
    ImgFile="Story.jpg"

    StartMap="Story.map"
    StartPos="PlayerStartArea_1"
/>

hps reads:

////////////////////////////
// Run first time starting map
void OnStart()
{
    //Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
    if(ScriptDebugOn())
    {
        GiveItemFromFile("lantern", "lantern.ent");

        for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
    }
}

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

}

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

}
(directly copied, yes)

I don't even think I need the "extra_english.lang", so far all I have is a small bare room (floor, walls, ceiling) with a floor lamp and a starting position. I just wanted to test it out to make sure I was doing it right before I got crazy with it. Apparently I wasn't.

Any help would be greatly appreciated. Big Grin
(This post was last modified: 12-03-2010 02:59 AM by Nitt.)
12-03-2010 02:56 AM
Find all posts by this user Quote this message in a reply
Chilton Offline
Member

Posts: 138
Joined: Sep 2010
Reputation: 0
Post: #2
RE: Yet another noob to the ranks

I dont see the problem, but try not to use as many // comments until after the script is written
The Custom Story .cfg may disfunction if you have anything in the wrong place, but otherwise it seems to be ok

void OnStart()
{
//Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");

for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}
}

That part - If this is your first map, try just

void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");
GiveItemFromFile("tinderbox", "tinderbox.ent");
}

I may have made a mistake on the tinderbox part, but its best if you draft scripts up yourself, and refer to other sources only to correct mistakes

ExtraEnglish is were all your text goes. Its were you name items, make messages, hints, etc pop up, where you make the credits, the story description, and so forth.

Post any further questions here if you need to
(This post was last modified: 12-03-2010 04:11 AM by Chilton.)
12-03-2010 04:10 AM
Find all posts by this user Quote this message in a reply
Nitt Offline
Junior Member

Posts: 6
Joined: Dec 2010
Reputation: 0
Post: #3
RE: Yet another noob to the ranks

Thanks. I simplified the code, but no dice. It's just not appearing in the Custom Stories list. :/

I downloaded a map/story online and put it in the folder to compare files, and just to see if it would run itself. It works perfectly, which is why I'm so confused.

Maybe this is the problem - are the .cfg and .hps files supposed to be created in notepad? Despite the fact that i named it "Story.hps" it's described as a .txt document under "Properties".

Again, thanks for your time and effort.
(This post was last modified: 12-03-2010 04:26 AM by Nitt.)
12-03-2010 04:25 AM
Find all posts by this user Quote this message in a reply
Dark88 Offline
Junior Member

Posts: 48
Joined: Dec 2010
Reputation: 0
Post: #4
RE: Yet another noob to the ranks

Your going to have to go and set you folder options to show extensions so you can delete the .txt and actually make your files .hps and .cfg. Right now their called Story.hps.txt and so forth which probably isn't helping. Smile

I'm a n00b too to this whole modding scene so I've also ran into my share of issues.
12-03-2010 05:23 AM
Find all posts by this user Quote this message in a reply
Chilton Offline
Member

Posts: 138
Joined: Sep 2010
Reputation: 0
Post: #5
RE: Yet another noob to the ranks

(12-03-2010 05:23 AM)Dark88 Wrote:  Your going to have to go and set you folder options to show extensions so you can delete the .txt and actually make your files .hps and .cfg. Right now their called Story.hps.txt and so forth which probably isn't helping. Smile

I'm a n00b too to this whole modding scene so I've also ran into my share of issues.

That could be the case, you may as well see
Also, it could also be an issue with organisation
EDIT:
Wow im blind
Put all your maps into a folder simply called maps
then add
MapsFolder = "maps/"
To your Custom Story cfg
12-03-2010 06:27 AM
Find all posts by this user Quote this message in a reply
Dark88 Offline
Junior Member

Posts: 48
Joined: Dec 2010
Reputation: 0
Post: #6
RE: Yet another noob to the ranks

(12-03-2010 06:27 AM)Chilton Wrote:  That could be the case, you may as well see
Also, it could also be an issue with organisation
EDIT:
Wow im blind
Put all your maps into a folder simply called maps
then add
MapsFolder = "maps/"
To your Custom Story cfg

If it really is saying they are .txt files, still going to have to do what I suggested or it won't even read the .cfg file but yeah definitely going to have to do that too.
12-03-2010 07:12 AM
Find all posts by this user Quote this message in a reply
Chilton Offline
Member

Posts: 138
Joined: Sep 2010
Reputation: 0
Post: #7
RE: Yet another noob to the ranks

(12-03-2010 07:12 AM)Dark88 Wrote:  
(12-03-2010 06:27 AM)Chilton Wrote:  That could be the case, you may as well see
Also, it could also be an issue with organisation
EDIT:
Wow im blind
Put all your maps into a folder simply called maps
then add
MapsFolder = "maps/"
To your Custom Story cfg

If it really is saying they are .txt files, still going to have to do what I suggested or it won't even read the .cfg file but yeah definitely going to have to do that too.

I said as much at the start of my reply
12-03-2010 07:20 AM
Find all posts by this user Quote this message in a reply
Someone else Offline
Member

Posts: 180
Joined: Sep 2010
Reputation: 0
Post: #8
RE: Yet another noob to the ranks

(12-03-2010 06:27 AM)Chilton Wrote:  That could be the case, you may as well see
That is the case.

(12-03-2010 06:27 AM)Chilton Wrote:  Also, it could also be an issue with organisation
EDIT:
Wow im blind
Put all your maps into a folder simply called maps
then add
MapsFolder = "maps/"
To your Custom Story cfg
Nope.
If MapsFolder isn't specified it will simply look inside of maps.

(12-03-2010 07:12 AM)Dark88 Wrote:  If it really is saying they are .txt files, still going to have to do what I suggested or it won't even read the .cfg file but yeah definitely going to have to do that too.
And these tutorials will tell how to do it:
  1. Tutorial 1.
  2. Tutorial 2.
  3. Tutorial 3.
I recommend everyone to watch them all as they do give a good demonstration on how to set up a custom story.

Support the developer.
Say no to piracy.
My avatar used to shape shift, but that is no longer the case.
(This post was last modified: 12-03-2010 12:11 PM by Someone else.)
12-03-2010 08:23 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Nitt Offline
Junior Member

Posts: 6
Joined: Dec 2010
Reputation: 0
Post: #9
RE: Yet another noob to the ranks

Worked like a charm. Thanks so much guys! =]

Though, while this thread is open, I had another relatively noobish question to which I've yet to find an answer. I'm having trouble with doors. The first one I set will open, but only after a lot of frustration, and the rest won't even budge. I checked all of them, and the "locked" box is not ticked. Anyone know what may cause this?

Also, the above links are all to the first tutorial. Tongue
(This post was last modified: 12-03-2010 08:42 AM by Nitt.)
12-03-2010 08:32 AM
Find all posts by this user Quote this message in a reply
Someone else Offline
Member

Posts: 180
Joined: Sep 2010
Reputation: 0
Post: #10
RE: Yet another noob to the ranks

(12-03-2010 08:32 AM)Nitt Wrote:  Worked like a charm. Thanks so much guys! =]
Yay.

(12-03-2010 08:32 AM)Nitt Wrote:  Though, while this thread is open, I had another relatively noobish question to which I've yet to find an answer. I'm having trouble with doors. The first one I set will open, but only after a lot of frustration, and the rest won't even budge. I checked all of them, and the "locked" box is not ticked. Anyone know what may cause this?
There might be something barricading the door, but I guess you have already checked that.
It might be that you placed the door inside of the door frame. Thus it is stuck inside it and can't open.
Check the x, y and z position for both the door and the door frame and make sure they are exactly the same.

(12-03-2010 08:32 AM)Nitt Wrote:  Also, the above links are all to the first tutorial. Tongue
Aw dang it.
Fixed.

Support the developer.
Say no to piracy.
My avatar used to shape shift, but that is no longer the case.
12-03-2010 12:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: