Compiling Leak Maps with Hammer++
 

0 Пользователей и 1 Гость просматривают эту тему.

  • Citizen
  • *
  • Сообщений: 6
    • Просмотр профиля
While it makes sense to use the 2003 hammer with the 2003 Half-Life 2, this isn't actually necessary, and you can enjoy modern quality-of-life improvements in more modern Hammer customizations.

This tutorial will guide you on how to create a special configuration workable with modern Hammers, while outputting (and playing) 2003-compatible maps. This one uses Hammer++, but nothing in this is exclusive to it.

I've tested this with both LeakNet and the unmodified leak, and both are cooperative.

First, select "Tools" on the top-bar, and then "Options..." which is near the bottom. You should see the below.

Image

In order to create a configuration, follow the above image. Name it what you like.

Image

Now, we'll setup the configuration.
  • This starts blank. Use the .fgds in anon-hl2/bin. It can reset to a different bin containing different ones, so make sure you get them both from there.
  • Set these to something more convenient if you like.
  • Ditto.
  • Set this to your Source SDK 2013's base directory (as in the image). (This might not do anything, but better safe than sorry) (Located at Steam/steamapps/common/Source SDK 2013 Singleplayer)
  • This is important. Whatever assets this has are what Hammer will have. We can't just use the Leak's, because the formats are incompatible. How do we port things over? We don't have to. I recommend Akis_02's Leak content pack. Extract the folder, preferably somewhere unlikely to suffer deletion. Now, set the folder "hl2_leak_content_loader" as the "game". Whew!
  • Personal preference. Use whatever you had before.
  • Personal preference. If you use prefabs, you'll know where you place them.
Image

Now, switch to the "Build Programs" tab.

  • This is your anon-hl2 executable.
  • Use "vbsp.exe" from the anon-hl2/bin folder.
  • "vvis.exe", ditto.
  • "vrad.exe", ditto.
  • Specify your maps' destination. This is anon-hl2/hl2/maps.

Image

Finally, we need to change the commands sent to the Leak compilers. Remove all of the "-game $gamedir" from the compiler and "run game" commands.

Further, we can add "-fast" before the "$path\file" to speed up compiling. This works best with $vis_exe, but can be added to $rad_exe at the cost of visual fidelity.

Remember, we cannot use the default "compile" panel, because only the expert one will actually use these modifications.

You can now compile maps for the Leak without the hassle of 2003 Hammer.

Further improvements

Depending on your reasons for being here, you may also benefit from the VMF updater, which automates tedious porting work.

Using it (unconfigured) will change some asset's names to line up with Megapatch 4's. This will add the requirement to have Megapatch 4's assets added onto both the Leak and the Leak content pack in use.

(I'm going to check out the patch and see if forward-porting is necessary. Not there yet.)

Limitations, uncertainties

This approach isn't perfect - we're separating the assets used for "viewing" the level in the editor and playing it, working around this by them being duplicates.

If you plan to use custom content in the 2003 engine, this approach will require compiling assets for  both modern and 2003 source.

The whole step where we specify the "Game Configurations" executable folder might do nothing, but it seems like something that would cause really annoying, subtle issues. I haven't seen any issues from it... yet.

I encountered many bugs I don't fully understand while doing this - for example, occasionally the "copy" operation would fail and the game didn't start. Separately, the lighting also didn't work. This didn't consistently occur, and I don't know if this will occur for you.

Embedded images are provided in chronological order as attachments in case of image host failure.

For reference, this is the information for the Leak content pack:

This is a leak content loader specifically made for hammer++ in order
to load leak maps with no problems whatsoever, having all the content ported
to retail 2013 sdk (tho it could work with normal hammer but i have not tested it).

What it does is:

-Load leak models, textures/materials, sounds/soundscripts, scenes, leak entities
(if you wish to load the fgd) and the leak rad file (also if you wish to load it)
-Also includes some vmfs and prefabs directly from the leak

!!disclaimer!!
All of the content from the leak were ported AS IS without any fixes to texture or model,
the only added thingy is in the custom folder which itself contains a small
material fix simply made to remove missing materials by adding simple dummy/empty vmt files

installation:
Simply drag the folder inside the zip into the sourcemods folder
Then create a new configuration in hammer++ leading every path needed to the leak loader
Отредактировано: 04 Авг 2022, 21:10:03 от liblung999
  • Citizen
  • *
  • Сообщений: 23
    • Просмотр профиля
Nice stuff! Are there any limitations?
Never forget manwich, the most iconic conscript ever.
  • Citizen
  • *
  • Сообщений: 6
    • Просмотр профиля
If you plan to use custom content in the 2003 engine, this approach will require compiling assets for  both modern and 2003 source.
  • Citizen
  • *
  • Сообщений: 14
    • Просмотр профиля
I know this is not perfect but, It's broken, the grid doesn't show up some models are missing texture, but atleast the Lighting Preview works!