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
Level Editor Help Adding a second level
salsbury Offline
Junior Member

Posts: 12
Threads: 3
Joined: Apr 2013
Reputation: 0
#1
Adding a second level

Hello again.

I was curious the exact steps needed to add a second level. I know how to connect it with a door from the first one, but I'm more confused about the actual map file. Do I save it in the same folder as the first level? If so, what about the .hps file? It's for the first level, so how does that affect the second? Is it just one .hps file for the entire mod, all maps included? I really appreciate any advice.
04-12-2013, 03:17 AM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#2
RE: Adding a second level

Yes, all the maps are saved in one folder. Each map has it's own hps file (named the same as the map). For example, a mod's "maps" folder could contain these files:

map_1.map
map_1.hps
map_2.map
map_2.hps
map_3.map
map_3.hps

In Ruins [WIP]
(This post was last modified: 04-12-2013, 03:52 AM by NaxEla.)
04-12-2013, 03:52 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#3
RE: Adding a second level

NaxEla just beat me to it xD, he basically summarised what I said but still works either way Smile

A map itself is what is loaded when you go through a loading screen, so when you go through one level door to another, it loads up the new map. Wherever your maps are stored, you have each seperate level as a .map file made with the map editor. For example (this is a directory, not code):
/maps
  - map_level_one.hps
  - map_level_one.map
  - map_level_two.hps
  - map_level_two.map
The map refers to the .hps file which has the same filename. So map_level_one would refer to the map_level_one.hps for all its scripting.

If you go through the maps folder in the actual Amnesia redist folder, you'll note that they have Ch01, Ch02, and Ch03, which just signify the three chapters of Amnesia. Within each, they all have the map files and the associated script. If you open these with the level editor, you'll understand how each map leads into the next in a particular way and loads with this method Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-12-2013, 04:00 AM by Romulator.)
04-12-2013, 03:58 AM
Find
salsbury Offline
Junior Member

Posts: 12
Threads: 3
Joined: Apr 2013
Reputation: 0
#4
RE: Adding a second level

Thanks, and It leads me to my next question. I asked in another thread about making a .hps file for the map. I'm looking at it, I do have notepad ++, and I have a .hps for the first level. I made the new map, as lost.map. How do I create the .hps file again? As in, step by step. I'm just really confused.
04-12-2013, 04:04 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#5
RE: Adding a second level

Just start working on it, whether in Notepad++ or in any text editor and when you're done save it. Then go to the file and change the extension on it (.exa) to .hps Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
04-12-2013, 04:09 AM
Find
salsbury Offline
Junior Member

Posts: 12
Threads: 3
Joined: Apr 2013
Reputation: 0
#6
RE: Adding a second level

Ok. Now, I do have an existing file for the first level, without any script yet. It only has


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

}

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

}

So can I just copy this file, and then change the name of "levelname.hps" to "secondlevelname.hps"?
04-12-2013, 04:12 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#7
RE: Adding a second level

Pretty much, as long as there are no errors (at the moment, there isn't Tongue) and the file name is identical to the second map with the extension .hps, it will work Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-12-2013, 04:17 AM by Romulator.)
04-12-2013, 04:17 AM
Find
salsbury Offline
Junior Member

Posts: 12
Threads: 3
Joined: Apr 2013
Reputation: 0
#8
RE: Adding a second level

oh great, then that way I can set up all the files, and build the physical levels, then just go back and script each one.
04-12-2013, 04:18 AM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#9
RE: Adding a second level

(04-12-2013, 04:12 AM)salsbury Wrote: Ok. Now, I do have an existing file for the first level, without any script yet. It only has


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

}

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

}

So can I just copy this file, and then change the name of "levelname.hps" to "secondlevelname.hps"?

Yup! I suggest you also add
////////////////////////////
// Run when starting map
void OnStart()
{

}
to your script. So it looks like this:
PHP Code: (Select All)
////////////////////////////
// Run when starting map
void OnStart()
{
 
}

////////////////////////////
// Run when entering map
void OnEnter()
{
 
}
 
////////////////////////////
// Run when leaving map
void OnLeave()
{
 


Just in case you're wondering, the OnStart function will get called when the player enters the map for the first time only. OnEnter will get called every time the player enters the map, and OnLeave will get called every time the player leaves the map.

In Ruins [WIP]
04-12-2013, 04:19 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#10
RE: Adding a second level

When I make a map, the first thing I do is determine what is going to happen or what is the purpose of this level, for example, does a key go in this door, and if it does, where is it? Then once the physical stuff of the map is done, I determine what I should put into it to make it look nice without overdoing it and then figure out what scripts I can implement, either for scares or to help guide the player. Once you're finished the whole project though, go back and implement some of the things you learnt later into the early levels (trust me, this is good). Smile Good luck with your story and I'm sure we will all help if we can with all your development issues Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
04-12-2013, 04:24 AM
Find




Users browsing this thread: 1 Guest(s)