3 New Notifications

New Badge Earned
Get 1K upvotes on your post
Life choices of my cat
Earned 210

Drag Images here or Browse from your computer.

Trending Posts
Sorted by Newest First
t
theMrSpy 13.06.21 01:42 am

How to set up Hammer to work with Portal 2 (Portal 2)

And so, we need:
Alien Swarm
Alien Swarm SDK
Source SDK
and Portal 2 itself
Next, we still need the latest GCFScape.

Let's start by installing GCFScape first. After installation, go to the root directory of the Portal 2 game (for those who do not understand what I mean, this is where you installed the game, i.e. >> steam / steamapps / common / portal 2), in it we go to the folder portal2, look for it (below) and open the pak01_dir.vpk file using GCFScape. Further, in this file you will find a bunch of folders, we only need two of them, namely materials and models, and here Alien Swarm comes into play, we unpack them (these two folders) into the folder >> steam / steamapps / common / alien swarm / swarm, we confirm the replacement of folders and files if required and that's it, in fact everything is ready! Alien Swarm SDK now has models and textures from the second portal, BUT ...

There is always one "but", and this time it is quite important.

But that's not all! It seems like we can already install models from P2, paint the walls with its textures, create test chambers, but how do you ask me to put, for example, a light bridge from the game, a laser, a transport funnel and other cool gadgets? To do this, we need a file with the code name portal2.fgd, after downloading this file, we have to place it, guess where you didn’t guess? Okay, push it here >> steam / steamapps / your account name / sourcesdk / bin / orangebox / bin. You will ask why we need to hide it so far from all eyes, and I will tell you why, then next to it (with the portal2.fgd file) there should be the same file, but responsible for Half-Life 2. After all the procedures, we need connect this file to the map editor itself.

And so, we launch the Alien Swarm SDK and no, we are not in a hurry to launch the Hammer World Editor, in the Utilities block, select the Edit Game Configurations item, in the window that appears, click on the Add button, in the next window that appears, enter the name of the game and indicate the path to it, i.e. ... >> steam / steamapps / common / portal 2 / portal2, don't mix it up. Next, click OK, select our game in the list and click OK again, after all the procedures, restart the SDK. And now we can open the Hammer World Editor. After starting, pay attention to the console (for those who do not know, this is a window with the name Messages located at the bottom of the editor), it should contain two lines (not counting a bunch of hyphens (-)), namely:

Search Path (GAME): the path to the steam folder steamapps common portal2
Search Path (GAME): the path to the steam folder steamapps common platform

If everything is the same for you, then rejoice, everything works for you (almost), if not, then read this text and delve into my words, you are doing something wrong. After this little check, we go to Tools> Options. And so, in the settings window that opens, we are looking for the Configutarion variable, next to the list, click on the Edit button, in the window that opens, click on the Add button, enter the name of the game and click OK, close the Edit Game Configurations window with the Close button. Now we select the game we created in the list. Below, in the Game Data files variable, delete the Alien Swarm file already there with the Remove button, then click on the Add button and specify the * .fgd file of the second portal, who forgot where we hid it, remind me >> steam / steamapps / your account name / sourcesdk /bin/orangebox/bin/portal2.fgd. Next, we put info_player_start in the Default Point Entity class variable, and func_detail in the adjacent Default Solid Entity class variable. Everything else is as follows:

Game Executable Dicertory - $ SteamUserDir alien swarm
Game Directoty - $ SteamUserDir portal 2 portal2
Hammer VMF Directory - $ SteamUserDir portal 2 content portal2 mapsrc you will save the source of the maps made in the hummer)
Prefab Directory - $ SteamUserDir alien swarm bin Prefabs
Next, on the Build Programs tab, select the game configuration we created and change only the last item, namely, where the already compiled maps will be saved, specify - $ SteamUserDir portal 2 portal2 maps (i.e. folder with maps in the game)

Done, great, but again, do not rush to act, create a new map or open an existing one if you have one and click on File> Run Map, or just F9 on the keyboard. In the window that opens, click on the Expert ... button below, then in the Compile / run commands list, uncheck the $ game_exe item (the last item), select the first one and on the right in the Parameters field instead of everything that is written there, insert -game $ gamedir $ path $ file and click on the Close or Go button! if you have a ready-made map, just click on one of the buttons.

Everything! About a miracle! Now, in addition to the model and textures, you have all the entities from the second portal!
Actually, you need this if you are really interested in creating your own maps and you have a desire to do it, but you also need to know how the hummer itself works, in fact, how it works in this topic is not discussed, but everything related to building maps for the second portal in this way and in general, ask here what we know, we will answer.

PS I did not find a pneumatic pipe in entities, either I was looking so badly, or it is done by using several different entities, which is most likely, because once you can see the action of such a pipe in the game.

PPS I also post the sources of all the original maps of the second portal, singleplayer and co-op.

PPPS Regarding the decompilation of maps, I can only say that it is unrealistic to do this with primitive methods, because decompilation there is very tricky, in general, whoever needs it, they will try different methods, if you suddenly find a valid one, post it here and I will put it in this modest tutorial.

Well, that's all, happy journey and success in your portal building

Source material.
32 Comments
Sort by:
F
Fen-ok 13.06.21

Class. Thank you. :)

[
[W0LF] 13.06.21

Cool, senk yu))

B
Blabr 13.06.21

It's a pity that I don't understand all this: * (So I would start making maps ... although I need to try! Author, thanks!

t
theMrSpy 13.06.21

Science Innovator

There are a lot of tutorials on the hamer in net, and learning is always possible and very simple if you wish.

B
Blabr 13.06.21

0003Spy - thanks for your support!

t
theMrSpy 13.06.21

Science Innovator

I think this article will help you in your endeavors, knowledge of English is recommended.

B
Blabr 13.06.21

0003Spy - thank you very much!

t
theMrSpy 13.06.21

Those who have already stamped trial or completely playable cards, lay them out here, light up the world! ;)

S
Sasha2033 13.06.21

Give someone a link to an already made hamer

t
theMrSpy 13.06.21

And he is not, and when he will, no one knows.

F
Felix KoT 13.06.21

I downloaded Ultimate Source SDK v2 by Psycho-A from cs-mapping.com.ua, there is already ready support for portal 2. Now I made a big cube and run around it%)

t
theMrSpy 13.06.21

Well, this is as an option, do you see what the problem is, that the Portal2.fgd file is constantly updated and while you use, say, the third version, others will already be muddied at the seventh or higher, tk. The xmania package is not updated so often, and downloading a large update with half of what you already have (i.e. downloading the same thing) is somehow inconvenient when you can download one file with a minimum size and work without problems.

t
theMrSpy 13.06.21

Moreover, there are too many unused bodies in their package, some do not even work properly, then you have to download it separately and the latest version, because the developers often forget to update this or that software.

S
SonyCrab 13.06.21

Yeah! Valve has released tools for creating mods. cry

t
theMrSpy 13.06.21

SamVellOff

If this is the one they used themselves, then why does it have the magic word beta in its name? Is it possible to immediately lay out not a beta, but a full working KFOR? Either the velves had something in mind, or they decided to spoon feed us, and not give us the whole plate at once. Well, let's see what kind of porridge it is.

By the way, my method can also be used, as an option, if someone is not satisfied with the beta;)

t
theMrSpy 13.06.21

I checked this SDK, it is absolutely no different from the one that is configured in my method, except that everything has already been done in it, and so there is no difference, everything is the same.

X
Xalfer93 13.06.21

Everything is so complicated: (Maybe in the * alpha * version of the SDK it will be a little easier to tinker with cards :)

t
theMrSpy 13.06.21

Pochivalov

Navryatli, if they improve the quality and speed up the compilation of maps, and complete the * .fgd file, so that all entities work as expected, it will be very good. And until they did this, there is no point in downloading the SDK, mine is faster, but only if Alien Swarm and Slien Swarm SDK are already installed on the computer, otherwise, it will be faster to download the Portal 2 SDK. But I repeat once again, there is no difference whatsoever.

B
Blabr 13.06.21

Now there is Portal 2 AT, so there will be no point in Hammer, especially since AT has materials for creating 3D models and textures ... but Hammer gave insatiable players an opportunity to get their own, 0003Spy fellow.

t
theMrSpy 13.06.21

Well, in fact, I just found several articles in nete, analyzed them and combined them improvising, well, it turned out like this =)