Please or Register to create posts and topics.

Quick question - Properly adding Portal content to Portal 2

Page 1 of 2Next

I'm back again with more stupid questions! Didja miss me? No? Oh okay.
I feel like I've asked something like this before, but I can't find my old thread or post in another if I did.
Either way, how would one go about properly putting Portal (and Half-Life 2 possibly) content into Portal 2?
For the longest time, I've simply extracted the content from the .gcf files and put them into Portal 2's external folders, which has mostly worked.
But I recently had the thought that I could just mount Portal's content directly from Hammer's settings.
Would this cause any issues in mapmaking, or would I have a better time with this than simple copy-pasting?
Thanks for any replies.

I think this site could benefit from a full aesthetic/functionality overhaul. Like the Black Mesa forums. They had a site overhaul recently and personally I've found the new forum much easier to use.
Plus, I kinda find all this white a little blinding.

If I understood you correctly, I'll disadvice to port all the Portal content into your P2 folders. The reason is that you can make your Hammer editor to crash even more frequently than it does now.

I have to take away much custom content from my local foders all the time when I make a new map style, in order to make Hammer to work efficiently.

If you only want some content, not all of it, into Portal2, there's no better way than you already know: extract the stuff from the pak01_dir.VPK (note that Valve already changed Portal's structure when the SteamPipe, and you no longer have .GCF files, but .VPKs instead), and recreate the same folders structure for the files in your local P2 folders than they already have in Portal. This must work OK all the time. In the case that you find something weird or missing, just look into the .VMT material files because probably there are some materials they're pointing to that you didn't extract yet (you know, maybe some bump/normalmap files, flowmaps or exponent textures...).

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Well like josepzdj said the more content your hammer have the more will crash (I wonder how much crash's josepzdj get with his mod haha).

After some research I think the only thing you have to put on gameinfo.txt is this (Please read more down above):

Code: Select all
"GameInfo"
{
   game       "PORTAL 2"
   title       "PORTAL 2"
   GameData   "portal2.fgd"
   gamelogo    1

   SupportsDX8     0
   SupportsXbox360 1

   FileSystem
   {
      SteamAppId            620      // This will mount all the GCFs we need (240=CS:S, 220=HL2).
      ToolsAppId            211      // Tools will load this (ie: source SDK caches) to get things like materialsdebug, materialseditor, etc.
      AdditionalContentId          400       //Portal

      //
      // The code that loads this file automatically does a few things here:
      //
      // 1. For each "Game" search path, it adds a "GameBin" path, in <dir>bin
      // 2. For each "Game" search path, it adds another "Game" path in front of it with _<langage> at the end.
      //    For example: c:hl2cstrike on a french machine would get a c:hl2cstrike_french path added to it.
      // 3. For the first "Game" search path, it adds a search path called "MOD".
      // 4. For the first "Game" search path, it adds a search path called "DEFAULT_WRITE_PATH".
      //

      //
      // Search paths are relative to the base directory, which is where hl2.exe is found.
      //
      // |gameinfo_path| points at the directory where gameinfo.txt is.
      // We always want to mount that directory relative to gameinfo.txt, so
      // people can mount stuff in c:mymod, and the main game resources are in
      // someplace like c:program filesvalvesteamsteamappshalf-life 2.
      //

      SearchPaths
      {
         Game            |gameinfo_path|.
         Game            |all_source_engine_paths|portal
      }
   }
}

Now that way you say probably works too... because when I was at a map I did see some error textures (but it was a custom map, so I probably should test a official map).

To my surprise energy pellets works... dunno how O.o

But can you explain what you exactly do? I might use that in the future.

EDIT:

I forgot I deleted and reinstalled my portal 2 folder D: the fix will come as fast as possible.

EDIT?:

It should probably work now!

^^^ I think this is the most efficient (and least copyright-infringing) way of doing it; instead of copying pieces over, you just mount the Portal game directory in Portal 2's virtual file system.
One downside: anyone who plays your map must own Portal 1, otherwise the files won't be there.

(The energy pellet thing is indeed surprising. I wonder if Portal 2 also uses Portal 1's server binary in this configuration.)

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic

Thank you for the advice! I'll be sure to toy around with how I have things set up in the future.
I might be able to do the virtual filesystem method, I don't make any maps worth releasing. I can do world design to a point, but actually thinking of puzzles is where my creativity ends.

I think this site could benefit from a full aesthetic/functionality overhaul. Like the Black Mesa forums. They had a site overhaul recently and personally I've found the new forum much easier to use.
Plus, I kinda find all this white a little blinding.

Portal 2's energy pellet code is fully functional, it's just missing the materials, models and sounds.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]

Well when I played the leaked demo of alive & kicking (can't find any excuse to this D:) there was a lot of vpk's on the main folder. That was a bit strange, and I guess their only real function was to the energy pellets.

But yeah when I played it there was model, sound and the materials :D

Is Alive & Kicking still being worked on? There hasn't been any updates on the Steam page, and I don't know if they have their own forum or anything.

Also, a while back when I was playing vanilla Portal 2 with my friend, I was messing around with console commands in the hub and I spawned in an energy pellet. It worked fine, but it was a checkerboard and didn't have the sounds. Just goes to show how much content was scrapped from the game before release, huh?
Wonder if Portal 2 will get a Source 2 port. I doubt it, but it'd give me an excuse to try out Source 2's equivalent to Hammer.

I think this site could benefit from a full aesthetic/functionality overhaul. Like the Black Mesa forums. They had a site overhaul recently and personally I've found the new forum much easier to use.
Plus, I kinda find all this white a little blinding.

Some monhs ago I was looking and I think all the games (some exceptions like hl1 [duh], portal and etc) are going to be exported to portal 2

(sorry if I said wrong, but when I played portal 2 there were the materials.

You might be thinking of the leaked filesystem thing that showed most games in the Source engine being in Source 2.
That just says that they were being worked on in Source 2, not necessarily being ported. They may have just been testing them out, experimenting with the engine and seeing how they can improve it to have every capability Source had, and more.

I think this site could benefit from a full aesthetic/functionality overhaul. Like the Black Mesa forums. They had a site overhaul recently and personally I've found the new forum much easier to use.
Plus, I kinda find all this white a little blinding.
Page 1 of 2Next