This article's documentation is for the "GoldSrc" engine. Click here for more information.
This article's documentation is for anything that uses the Source engine. Click here for more information.
This article's documentation is for Xash3D. Click here for more information.

Porting GoldSrc content (maps, models, etc.) to Source

From Valve Developer Community
Jump to: navigation, search

Icon-essay.png
This is an essay.
It contains the advice or opinions of one or more of the Valve Developer Community's contributors.
This page is not an encyclopedia article, nor is it one of the Valve Developer Community's policies or guidelines, as it has not been thoroughly vetted by the community.
Some essays represent widespread norms; others only represent minority viewpoints.
Icon-broom.png
This article or section needs to be cleaned up to conform to a higher standard of quality because:
Add tables for galleries with multiple images (due to their differences in aspect ratio). Improve formatting, more links to the other pages. Rewrite.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page
Blank image.pngTodo: Cloudfare errors blocking editing entire page at once, preventing editing of introduction, and adding complex tables at once (wikitables), it is necessary to add them piece by piece, which takes quite a long time. It may be necessary to use nowiki tags on certain thingamabobs; see Talk:How To Take Artistic Screenshots#Cloudflare bug.
English (en)русский (ru)
Edit
Under construction icon-blue.png
This is a draft page. It is a work in progress open to editing by anyone.
Remember to check for any notes left by the tagger at this article's talk page

Contents

Stub

This article or section is a stub. You can help by adding to it.


Blank image.pngTodo: Converting materials.txt to $surfaceprop

Game developers who have worked with the GoldSrc GoldSrc engine may find it challenging to port their content to the updated Source Source engine. This undertaking requires diligent work and close attention to detail, with no room for shortcuts or frustration. The goal of this article is to provide clear and refined steps paired with expert guidance to assist game developers in navigating this intricate process. Whether a novice or a seasoned developer seeking valuable insights and effective tactics, this guide will aid in making the transition as seamless as possible.

Icon-Important.pngImportant:The steps shown in the article are compatible with any project based on regular GoldSrc GoldSrc Engine. (Sven Co-opHalf-Life: Opposing ForceCondition Zero Deleted ScenesCounter-Strike Nexon: StudioCounter-Strike: Condition ZeroCry of FearBrainBreadRicochetGunman ChroniclesCounter-Strike OnlineHalf-Life: Blue ShiftDeathmatch ClassicTeam Fortress Classic), It can also partially help with derivatives of this engine (Xash3DParanoiaParanoia 2: SaviorCounter-Strike (Xbox)Half-Life (PS2)James Bond 007: Nightfire), as the porting actions in them are very similar.

Required tools:

Warning.pngWarning:Hammer++ does not have the button used to fix the scale of VMTs resized from non-power-of-two WAD textures!
Warning.pngWarning:Still have to make manual corrections.

WadMaker WadMaker - Can convert 🖿decals.wad, which are formatted in a special way, into regular 32-bit PNGs with the correct color and an accurate alpha channel, unlike xwad.

Preparing for Porting

Map selection and analysis

ts_constryard is a map featured in The Specialists The Specialists, a popular Half-Life Half-Life modification. It is used for decompilation and porting due to its presence of embedded content. The map features an outdoor environment with construction structures and equipment, and is considered to be well-designed with an open layout and strategic gameplay.

Screenshots

Map using the following content

Textures (.WAD) : Consisting 68 .bmp materials

Models (.MDL): «bank, water box, water box2, truck, fire hydrant, jeep, pa»

Skybox (.TGA): «ts_constryup, ts_constrylf, ts_constryft, ts_constrybk, ts_constryrt, ts_constrydn» Sounds (.WAV): "passaros, techno"

List of files to be converted

From .TGA (Old Format) to .VMT and .VTF (New Format) From .SPR to .VMT and .VTF

Obtaining source files

The use of decompilers for maps may initially sound like a mystical tool. Typically, the act of compiling transforms a beautiful and coherent structure into incomprehensible code. In the case of GoldSrc maps, the brush source data is not included in the compiled map. When using HLCSG HLCSG, the brush is split into six faces and the ones not visible in-game are removed. When brushes are in contact with one another, the remaining faces are usually split further. Consequently, decompilers must reconstruct the brush from scratch, resulting in noticeable discrepancies between the original and outputted versions.

Map decompilation

Introduction

The .map or .rmf file of the desired map is necessary for porting maps to Source Source. Acquiring the original source from the creator will greatly facilitate the process, although it is not mandatory. Map source can be obtained by decompiling.

GoldSrc GoldSrc does not store original brush geometry in its BSPs like Source Source does. As a result decompiles will not be "clean" in the sense that there will be very odd looking geometry generated compared to a decompile of a Source map.

PlacementTip.pngExample:

The two methods of decompilation can be described as Tree-Based and Face-To-Brush. Tree-Based the "cube" generate map files that appear as if the map geometry is carved out of the center of a cube. While not easy to work with when trying to modify a decompiled map, this method is the better of the two. This is primarily due to how this method prevents leaks.

Face-To-Brush decompilation converts every single brush face into its own separate 1 unit thick brush. This method is the worse of the two mainly due to all the texture z-fighting that arises on convex corners. This method typically results in a map file which exceeds Hammer's brush limit.

Choosing a tool
Tip.pngTip:For a better understanding, please read the separate articles dedicated to this decompilers.
Half-Life Unified SDK Map Decompiler

This is by far the best decompiler to use. It cannot be reiterated enough that any attempts at porting GoldSrc content should start with this decompiler. This decompiler has following:

  • Support of Tree-Based and Face-To-Brush methods
  • GUI
  • Rarely if ever crashes when attempting to decompile
  • Customizable decompile options
  • Can automatically extract embedded textures
MBSPC (not recommended)

This decompiler has following:

  • Exclusively Tree-Based method
  • No GUI
  • Rarely if ever crashes when attempting to decompile
  • Customizable decompile options
  • Does not automatically extract embedded textures
WinBSPC (not recommended)

The original Tree-Based decompiler for GoldSrc. This decompiler has following:

  • Exclusively Tree-Based method
  • Has a GUI
  • Prone to crashing and failing to decompile all types of maps
  • Customizable decompile options
  • Does not automatically extract embedded textures
BSP Viewer (not recommended)

The precursor to Crafty, both these programs are standalone tools that are capable of loading and viewing BSPs without having any game open. BSPV is capable of Face-To-Brush decompiles.

Warning.pngWarning:This feature was removed in Crafty.

This decompiler has following:

  • Exclusively Face-To-Brush method
  • GUI
  • Rarely if ever crashes when attempting to decompile
  • Decompiles are almost always thousands of brushes over Hammer's limit
  • Limited decompile customization options
  • Does not automatically extract embedded textures
BSP2MAP (not recommended)

The original GoldSrc decompiler. This decompiler has following:

  • Exclusively Face-To-Brush method
  • No GUI
  • Prone to bad generating
  • Limited decompile customization options
  • Can extract embedded textures

Porting Process

Sounds converting

To port sounds from old games, usually no action is required. However, there are cases when a WAV file still cannot be played.

Note.pngFix:it is often necessary to simply convert the audio file to a different frequency supported by the Source engine (11025 Hz, 22050 Hz, or 44100 Hz).

Textures porting

Getting

To obtain the textures of a map, Wintextract can be used. The user must select the bsp file and specify the folder to store the extracted textures (saved in the WAD format).

Converting

Once the necessary steps have been followed, the WAD file of the map can be obtained. xwad can be used as a conversion tool, which is the official Source SDK tool designed to convert old texture formats to new ones. It should be noted that these steps were performed using the pre-installed Source SDK (downloaded via Steam) on Windows. To access the Command Prompt:

  1. Click the "Start" button
  2. Click "Run"
  3. Type "cmd" and press Enter.
  4. Specify the location of xwad.exe
    PlacementTip.pngExample:cd "\SourceSDK\bin\ep1\bin\xwad.exe"

Commands to be used:

-basedir [Output] -wadfile [File('s) Directory\*.wad

After this operation 🖿Materials and 🖿Materialsrc - will be created in the specified [Output] folder. The files with VMT extensions will be located in 🖿/materials, while the TGA files will be located in the 🖿/materialsrc and must be converted to VTF.

VTFEdit can be used to convert TGA files to VTF format: Tools → Convert Folder → select the [Input] and [Output] folders → Convert Input (Location of the files to be converted) Output (Converted files location)

With the following options:

Normal Format BGR888 // For better texture quality.
Alpha Format DXT5 // Interpolated alpha channel (recommended).
To VTF → .tga // For working with the required format.
Blank image.pngTodo: Opaque WAD textures can often be made BGR565 with minimal quality loss (not skyboxes, though!).

Additionally, transparent textures will often benefit from BGRA8888, although the file size will quadruple.
See VTF (Valve Texture Format)#Choosing an image format and Compression (Source_1)#Texture Compression.

After the conversion, VTF files that are ready for use can be obtained. In theory, it is possible to unpack the WAD file and then convert the BMP textures using VTFEdit.

However, this is not a good approach, as some textures used in Goldsource have non-standard values or non-power-of-two dimensions.

PlacementTip.pngExample:a texture of the old format with a size of 96x96 pixels will stretch

xwad automatically creates an additional file called name_texture.resizeinfo (which scales the material to the required size).

A similar operation with VTFEdit should be performed with skybox textures. It is necessary to use the "Create VMT Files" function, which will create files that contain information about the material type. The output folder must be named materials\ (as the game will look for files in a directory with this name). After the conversion, VMT file parameters should be changed to function as sky textures. Using the same program, change the values from LightmappedGeneric (brush shader) to sky (Skybox shader), and add a line “$ignorez 1”. This should be done as follows

PlacementTip.pngExample:ts_constrybk
sky
{
$ignorez 1 // This is a logical setting. It is mainly used for interface materials that will always be in front of the 3D world, and for skybox materials that will always be behind. 
"$basetexture" "skybox/ts_constrybk" // texture directory (The sky texture must be located strictly in the skybox)
}

Also need to convert spr files to a new format using xwadand a command like -basedir [Output] -sprfile [File location*.spr]. Then convert tga files to vtf using VTFEdit without the "Create VMT Files" parameter. Then configure the files to function as sprites in the game by changing the first line value from LightmappedGeneric to Sprite, which represents a visualized world object with unique geometry. Finally, add new lines with specific values:

"$spriteorientation" "vp_parallel" //sprite orientation. vp_parallel - sprite is always facing the player
"$spriteorigin" "[ 0.50 0.50 ]" // Sprite center, location
PlacementTip.pngExample:it should look like this
sprites/folhas1
vmt
Sprite { "$spriteorientation" "vp_parallel" "$spriteorigin" "[ 0.50 0.50 ]" "$basetexture" "sprites/folhas1" //Material Directory }

Configuration

Once all the map textures have been converted, they need to be configured (VMT). Since GoldSrc GoldSrc is an old engine, many textures today don’t look great, the following commands will be added to improve each texture:

"$detail" "detail/detail_noise1" //This texture is found in [[Half-Life: Source]] [[VPK]] files, very effective for increasing the apparent texture resolution:
"$detailscale" 10.0

To obtain the desired texture, first, download Half-Life: Source Half-Life: Source. Then, navigate to the 🖿…/Half-Life 2/hl1/ and open the file hl1_pak_dir.vpk with GCFScape. Finally, locate and access the 🖿root/materials/detail/ and select the desired texture file named detail_noise1.

Open it and archive it to the 🖿…materials/detail/ with the moved textures. Go to the texture location and delete the following vmt and vtf materials with the names:

  • {invisible
  • sky
  • skip
  • {blue
  • clip
  • hint
  • null

They are already included in the Source Engine by default, but earlier they had to be added to the map. Replace them on the map with other similar textures.

Type of surface (optional)

Now each texture needs to be configured by adding the following command: $surfaceprop "which object's physical properties will be applied."

The material system in GoldSrc GoldSrc differs significantly from the Source engine. In Goldsource, the texture surface type was stored in a file called materials.txt (located in the 🖿mod/sounds) and was represented by a single letter,

PlacementTip.pngExample:"D" for dirt
Note.pngNote:Despite the differences, in the code, these functions in the engine are very similar. See Material_Types

However in Source Source the process works quite differently. To assign the correct surface to a texture, you need to configure the .vmt (Valve Material Type) file associated with the texture and add the line ($surfaceprop "material") to it, replacing "material" with the desired surface type.

In materials.txt

To understand the physical properties that should be applied to a specific material, are advised to open the file materials.txt. It can be found in the mod folder,

PlacementTip.pngExample:🖿valve/sounds/

Once opened, the values related to different surfaces can be observed.

Icon-Important.pngImportant:There may be instances where the values are absent. In such scenarios, the surface type can be identified by examining the view of texture. Also the missing value in Goldsource typically using Concrete.

For further assistance, please refer to the following article: Surface properties in Source Engine

Warning.pngWarning:Prefixes may be different in some mods.
Property Replacement
M (or G) Metal
V Metalvent
D Dirt, Sand, Snow
S Slime or Water
T (or S) Tile
G Metalgrate
W (or V) Wood
P Computer or Glass
Y Glass
N Snow
X Grass
C Concrete
F Flesh
In-Game[Obsolete-notext.png Deprecated]

To understand the physical properties that should be applied to a specific material, the BSP map file must be dragged into the 🖿Half-Life/valve/maps/ and Half-Life must be launched. This will enable observation of properties of the materials in-game in order to apply them correctly, resulting in realistic material behavior in the game world.

After the menu has loaded, click on the "Create Server" option → Map (choose ts_constryard) → and click on the "Start" button. This will load the chosen level.

Menu In-Game
Result

These methods is utilized to define the physical characteristics of objects, which is optional but improves the overall game quality. In this instance, specific textures will display particular decals of materials when damage is caused to them via shooting. If uncertain regarding the material to use for a particular texture, it can be determined visually or by examining the texture name. For instance, if the texture is labeled "grass,” then the corresponding physical properties should be assigned to "grass.” Below is a sample configuration of the texture for “{gate.vmt”:

 "LightmappedGeneric"
{
"$basetexture" "tsconstr\{gate"
"$alphatest" "1" //It specifies the mask used to determine the binary opacity.
"$ALPHATESTREFERENCE" "0.5" //Specifies the minimum alpha color value at which the effect is rounded up to 255.
"%compilepassbullets" 1 //Useful for foliage or metal trellises.
"$detail" "detail/detail_noise1"
"$detailscale" 10.0
"$surfaceprop" "metal" //The physical properties of the metal are applied.
}
Glowing (optional)

Read more about Glowing Textures.

There will also be textures that need to have an alpha channel added (transparency effect),

PlacementTip.pngExample:+a~tnnl_lgt3, to give the texture a glowing effect in a specific area
$selfillum //parameter whose value can be 1 (enabled) or 0 (disabled), specified in the material's VMT. - Use this for most purposes not compatible with transparency. (Alpha channel is optional)

Alpha channels will be added using Adobe Photoshop CS6 with the VTF plugin installed. (The Adobe Photoshop VTF plugin allows the opening and saving of single-frame, one-sided 2D textures directly from Photoshop without the need to convert them to an intermediate format, such as a TGA file. Multiframe/multi-sided/3D textures can also be opened, but only the first frame/side/layer will be available. The plugin is built on VTFLib and does not support all the advanced features available in VTFEdit)

Adobe Photoshop is a multifunctional graphics editor developed and distributed by Adobe Systems.
Plugin installation:

  • Adobe Photoshop → Close Photoshop. (if launched)
  • Extract VTFLib.dll to 🖿..\Photoshop\.
  • Extract the VTF.8bi file to 🖿..\Photoshop\Plug-Ins\File Formats\.
  • Launch Photoshop.

The objects that will be part of the alpha channel should be preserved; in this case, the middle of the lamp should stay while the edges should be deleted. Then, press CTRL+CDELETECTRL+S (save as VTF, DXT5 format). After saving, close the texture, reopen it, and paste the copied object using CTRL+V. This results in two separate layers. Save it again as VTF.

In this case, everything was done correctly. To check if the alpha channel works, open the texture using VTFEdit and go to View → Enable Mask.

Example


Perform a similar operation with similar lamp textures. Their VMT file should be modified as follows:

"LightmappedGeneric"
{
"$basetexture" "tsconstr\+0~tnnl_lgt3"
"$detail" "detail/detail_noise1"
"$detailscale" 10.0
"$surfaceprop" "glass"
"$selfillum" 1 // Texture Glowing (alpha channel)
"proxies"
{
"ToggleTexture"
{
"toggletexturevar" "$basetexture"
"toggletextureframenumvar" "$frame"
}
}
}

"ToogleTexture”: Apply the signage file to the brushes in Hammer and use env_texturetoggle and logic_relay for animation (in this case, it’s not necessary). Sometimes it’s necessary to create multiple animated textures,

PlacementTip.pngExample:when calling an elevator. The button lights up and then turns off. (Add an alpha channel to each texture beforehand, as in previous stages). It is necessary need to merge “+0~drkmtls3" and “+a~drkmtls3”. Use VTFEdit, go to File, Import (use "All Formats”), select the textures and click "Open”. Import the textures with the following values (Texture Type is important - in this case, it must be an animated texture, and it should play in the format of off (+a~drkmtls3) and on (+0~drkmtls3). If it’s saved in the format of on-off, rename the off texture to 0 and the on texture to 1. Then rename the final file.

After completing the necessary operations, an animated material was obtained. To verify it, go to the Image section and click Play to toggle between the two textures. Once it’s confirmed that it’s working properly, the file may be saved. Go to File, Save As -> select the VTF format, and save it as ‘+0~drkmtls3’ (since this texture is already assigned to the map). Also, the VMT file for this texture should be updated, and the final version should look like this:

"LightmappedGeneric"
{
"$basetexture" "tsconstr\+0~drkmtls3"
"$detail" "detail/detail_noise1"
"$detailscale" 10.0
"$surfaceprop" "computer"
"$selfillum" 1 //Glowing
"proxies"
{
"ToggleTexture"
{
"toggletexturevar" "$basetexture"
"toggletextureframenumvar" "$frame"
}
}
}

In this case, "ToggleTexture" is necessary because the material will be changing

PlacementTip.pngExample:when a button is pressed, it lights up

Similar operations should be done with other similar textures.

Models Porting

Blank image.pngTodo: (only in Source 2013 Multiplayer) Optimizing static props for lightmapping (unwrapping UVs, rebaking onto single texture, etc); see {{warning model lightmaps}} for more information.

Utility setup

When working with models, Crowbar will be employed. To use Crowbar, Half-Life 1 must be installed for decompilation, and Half-Life 2 for compilation. Before beginning the decompilation process, it is necessary to create a distinct folder for each mdl file based on the file name. Smaller, individualized folders are required to prevent confusion and erroneous model collisions as overlapping names may occur after decompiling smd reference models. Below is a visual representation of what this folder structure should resemble:

To start working with this tool, it is necessary to go to the Set Up Games section and specify the directory of the Steam library with the pre-installed Half-Life 1 and Half-Life 2. After setting up. To decompile, go to the Decompile section and use the Decompile button, where MDL input (Folder and subfolders) is the location of the models for decompilation. And Output to (Work folder) is the output of the source files after decompilation.

Configuration

After completing the procedure, directories will appear in the designated location that will contain the source files of the models. These cannot be compiled on the Source Engine at present, as they contain outdated values that will result in errors. To correct this issue, it is necessary to edit the .qc file of each model. Demonstration on the banco model:

 // Created by Crowbar 0.71
// Stored modelname (without quotes): "D:\3D Studio Max Models\Devastation\Bench3\bench3.mdl"
$modelname "banco.mdl"
$cd "."
$cdtexture "." //converts clipart to textures
$cliptotextures //tells the compiler to convert .bmp to textures.
$scale 1.0
$bodygroup "body"
{
studio "bench3"
}
$flags 0 //(parameter that controls the visualization of materials)

$cbox 0 0 0 0 0 0
$bbox 0 0 0 0 0 0
$hbox 0 "joint1" -14.22 0 -39.560001 17.540001 46.57 50.919998
$sequence "idle" {
"banco_anims\idle"
ACT_IDLE 1
fps 30
loop
}

The outdated line is flags, as they no longer work. It is necessary to remove these commands and replace them as follows:

"$flags 0" →  "cdmaterials" [model texture directory\].

$cdmaterials (specifies the folders in which the game will look for model materials (subfolders are not searched). Each path is related to <game>\materials.) An interesting feature of the Goldsource engine is that textures are embedded in the model. In the Source Engine, textures are separate from the model.

Additionally, the following values must be added to give the model collision:

$collisionmodel "[reference name].smd"
{
$automass // Calculates the mass of the model based on the volume of the collision model and the material.
$concave //Smooth out shell shading
}
Note.pngNote:A collision mesh is not necessary if using clip brushes for static prop model collision.

Such an operation must be carried out with each QC file of the model source.

PlacementTip.pngExample:Final version - banco.mdl
// Created by Crowbar 0.71
// Stored modelname (without quotes): "D:\3D Studio Max Models\Devastation\Bench3\bench3.mdl"
$modelname "constryard\banco.mdl"
$cd "."
$scale 1.0
$bodygroup "body"
{
studio "bench3"
}
$cdmaterials "models\banco\"
$collisionmodel "tree_deciduous_01a_physbox.smd"
{
$automass
$concave
}
$cbox 0 0 0 0 0 0
$bbox 0 0 0 0 0 0
$hbox 0 "joint1" -14.22 0 -39.560001 17.540001 46.57 50.919998
$sequence "idle" {
"banco_anims\idle"
ACT_IDLE 1
fps 30
loop
}

Using the same tool, models will be compiled. Go to the Compile menu, then select the "Game that has the model compiler" option and choose Half-Life 2. Select directories and click on the Compile button.

Check whether the mdl files have been generated in the specified [Output to] folder corresponding to the number of QC files. Here, there are 7 files.

Textures

After decompiling the models, bmp format images appear in their source files which need to be converted to texture format using XWAD. Similarly to the previous step, use the command:

-BaseDir [Output] -BmpFile [Location of files\*.bmp]

Each texture should have its own directory according to $cdmaterials (during compilation, the game will look for materials for the model in the specified directory).

After converting bmp to tga, use VTFEdit to convert to vtf without the "Create VMT Files" parameter. It is necessary to edit vmt files generated by XWAD. The files should be modified like this

PlacementTip.pngExample:banco.mdl, bench1a.vmt
"VertexLitGeneric" //Model Shader
{
"$basetexture" "models\banco\BENCH1A" //location of textures, according to .qc $cdmaterials.
}
Type of surface (optional)

Determining the surface type of a model visually is possible, or it can be observed within the game. To assign the surface type for the model, the command $surfaceprop "type of surface" must be written in QC like to VMT.

Issues

Icon-Bug.pngBug:if your model is not displayed in the game. You need to replace all lines from .bmp in .smd with .vmt/.vtf.
Icon-Bug.pngBug:The model may not be decompiled due to hbox/bbox/cbox values, otherwise it is necessary to cut them out.
Icon-Bug.pngBug:Models may not have idle animation. Which will cause errors during compilation, for this you need to add this sequence to the qc file.
Icon-Bug.pngBug:Most often, v_models may have problems with the fact that you will see the cartridge you are reloading (in your head), manual edits are required to fix it.
Icon-Bug.pngBug:Some models may disappear from your sight after compilation with the value $staticprop. One of the options for solving this problem is to cut out this command and use the model as a dynamic one.
Icon-Bug.pngBug:Models may be invisible if you incorrectly specified the shader values in the VMT file

Map Porting

Getting the source

What is needed for porting a map? It is necessary to have the source. The source can be requested from the author or an attempt can be made to decompile the map to obtain the source file. The MBSPC decompiler will be used here.

  1. Click on the "Start" button.
  2. Click on "Run”.
  3. Type "cmd" and press Enter.
  4. Specify the location of [mbspc.exe].

With the following commands:

--cluster //compute level clusters
-optimize //optimize
-capsule //use spherical collision model
-bsp2map220 //convert BSP to Valve's MAP 220 format

To decompile, just open the .bsp file with mbspc.exe

Adaptation of the source

To open the converted MAP file, it needs to be converted to RMF format. Will be chosen J.A.C.K. as the viewer tool, which can open files with the MAP extension, but in this case, it should not be done. Opening it will result in an error:

Using J.A.C.K., a MAP file can be saved with the RMF extension. Prior installation of Half-Life is required for J.A.C.K. to function, as well as specifying the Half-Life SDK Half-Life SDK directories. The user needs to navigate to Tools → Settings → Game profiles to access certain sections where directories must be specified. File → Save As → RMF

Once this operation is completed, the resulting file can be opened in the Hammer Editor. Valve Hammer Editor, which is located in the Source SDK 🖿/bin/hammer.exe, will be used to edit the map. By default, Hammer is already set up, but if any issues arise, navigate to Tools → Options → Game Configurations and adjust the necessary directories. In the top left corner, click on File → Open → select the .rmf format and open the decompiled file.

Troubleshooting

Textures[Obsolete-notext.png Deprecated]
Tip.pngTip:These problems appear in almost all sources by old decompilers such as WinBSPC, BSPtwoMAP, MBSPC. One can avoid all these problems by using Half-Life Unified SDK Map Decompiler
Missing

Upon opening the map, it can be observed that it lacks textures.

They need to be applied. To do so, go to the "File → Convert WAD to VMT" option (only in Hammer)(not in Hammer++). The "Convert WAD to VMT" tool will apply the textures that have already been converted. If everything has been done correctly, the following message will appear:

If something has been done incorrectly, instead of the aforementioned message, statements will appear indicating that some textures are missing. The final result will appear as follows:

Rotation

Further, errors related to the texture axis need to be identified. For this, Crafty Object Viewer is required. This program is used for viewing bsp and bsp, .gcf, .ncf, .pak, .vpk, .wad, .xzp files. A comparison between the resulting version and the original work is necessary. This is illustrated using the following screenshots:

After decompilation Original version

The textures are incorrectly placed and must be corrected manually. Surfaces will be selected using the Toggle Texture Application tool:

Read more about Hammer Tools Menu Change the "Rotation" value from 180 to 0. Some textures may be incorrectly rotated. To correct this, change the "Align" value from "World" to "Face”. This is demonstrated in the following screenshots:

After decompilation Original version

Compare the original file and the source version manually to correct similar issues. If changing the "Rotation" parameter does not work, the "Justify" → "Fit" (scale to fit the size of the face) option can be used.

without using "Fit" using the "Fit"
After decompilation Original version


On this surface, the "Align" parameter needs to be changed from "World" to "Face”, the "Rotation" value needs to be changed from 180 to 0, and the "Fit" function should be used.

It also happens that the decompiler applies an incorrect texture to the surface of an entity:

Use "Browse" (opens the Texture Browser) → look for the nodraw texture (to speed up the process, go to the "Filter" tab and enter "toolsnodraw" there) → apply it to similar surfaces. This is necessary to optimize the map because players will not see this texture during gameplay. If this is not done, the unnecessary load will be placed on the computer. This is done for any similar areas, and it should look like this:

Sometimes neither of the functions is effective, in which case it is necessary to adjust the dimensions manually. In this instance, using "Texture shift" and manually set the "X-axis" value.

There are instances where a texture is incorrectly applied to multiple brushes (two separate surfaces), such as in the case of buildings.

To correct this issue, activate the "Treat as one" function. When multiple sides are selected, enabling this flag causes Face Edit to treat them as one large face. This feature is generally used in tandem with "Fit.” Highlight all surfaces and click "Fit" to eliminate the problem. However, if this method does not work, it is necessary to adjust the values manually. The values from similar surfaces can be used to simplify the correction process, and the "X and Y" axis can be edited manually.

Wrongs

Sometimes errors occur where a different texture overlaps a brush

PlacementTip.pngExample:"compensado" texture instead of "woods_wood2"

The solution for the problem is simple. Search for the "woods_wood2" texture and replace the incorrectly applied material. Check for errors in the map by pressing ALT+P in Hammer. Upon error detection, selecting one highlights the object/solid impacted (if applicable) and three options will appear:

  • Go to error - press to center the 2D and 3D views on the object related to the error.
  • Fix - click to attempt to correct the current selected error.
  • Fix all (type) - use this button to correct all errors of the chosen error type.

Read more about Hammer Hotkey Reference.

Geometry

When scrolling down, "Invalid solid structure" errors may be discovered, necessitating resolution. This signifies an invalid structure of the solid likely due to vertex manipulation and indicates that it is not convex in all planes.

The solid must be corrected or rebuilt if infeasible. Click "Go to error" and examine the error. Selecting "Fix" may alter the model shape resulting in inconsistency with the original structure. As a result, the solid must be recreated.

After the operation, the structure became corrupted. Although manual reconstruction is feasible, an alternative approach will be employed instead - using BSP2MAP to decompile the map and extracting the affected brush from there.

The next stage is similar to the previous using J.A.C.K. to export the detail to the RMF format before opening the final file in Hammer Editor to apply the textures.

This decompiler broke it into various parts.

To optimize, selecting all sides of the structure.

Using a combination, the dialog box for hammer properties can be opened, which is the main method for changing an object’s properties. This also allows the adjustment of VisGroup properties for one or multiple brushes. For objects that are not entities, the Properties dialog box will only display the VisGroup tab. Information on individual entities can be found in the entity list. These brushes can be converted to func_detail for optimization. Read more about func_detail. Next, the detail needs to be copied using the CTRL+C and pasted into the version where the "invalid solid structure" problem occurred using the CTRL+V.

Further, according to the size, it is inserted at the same coordinates (Sometimes the model cannot be placed in the same spot due to large grids.

Note.pngFix:Use the "Smaller Grid" function, after which the old structure can be deleted using the DELETE.

This structure has many problems (related to texture axis and incorrect structure):

The process of fixing can be simplified by taking some of these building brushes from BSP2MAP.

BSP2MAP deconstructed the map in a less-than-perfect manner (the brushes inside have space). To optimize the brushes of this structure, the textures need to be replaced with -nodraw (these areas should not be rendered as the player will never see them).

PlacementTip.pngExample:the brushes

The question may arise as to why BSP2MAP was not used. Despite decompiling the structure better, it is not true. Gaps appeared in the map, and many structures looked bad. However, it should be noted that the majority of textures have the correct axis.

After performing the necessary operations, the required brush of this crane is selected. Using the CTRL, it is first converted into an entity using CTRL+T and set as "Func_detail.”

The structure is copied from the source (BspTwoMap) using CTRL+C, after deleting the structure from the original file (from MBSPC), and pasted into the same version using CTRL+V (at the same coordinates). If nothing happens after clicking "Fix,” delete the brush. Sometimes the problem "Invalid solid structure" occurs with brushes that are already on the map (or very similar). Simply duplicate another brush, select the required brush, copy it, and paste it. Then, using the grid, insert it in the necessary coordinates.

The dialog box is opened using the ALT+P, and the remaining problems are fixed using the "Fix all (of type)” command for each entity (which are related to the use of outdated values). If the error "There is no player start" remains, it will be fixed after creating the respawn point (for the player). However, this is not necessary at the moment.

Entities
Obsolete

On the map, the following objects that do not represent something functional can be seen:

Outdated entities usually do not work. Often, what they did can be done better using something else. In this case, using the Hammer Editor, some are identified of these entities and remember their names. Even modest levels can contain hundreds - even thousands - of objects. Two ways are offered by Hammer to track items in the level: normal grouping and visibility grouping (VisGroups). To quickly identify each outdated entity, simply use the "VisGroups" window → "Auto" and uncheck all except for "Brush Entities”.

It should turn out like this:

In such a case, it is easier to find outdated entities, but before deleting them, move to the "File" section → "Save As" → Indicate the VMF format.

Now, open the saved VMF file using the Notepad++ Notepad++ (close the Hammer Editor). What it should look like is demonstrated in the screenshot:

Use the CTRL+F → find the item "Replace" and in "Find:” enter "ts_model" (an outdated entity that no longer works). And in "Replace with:” enter "prop_dynamic" (this is a point entity available in all Source games. It is used to add a model to the world that can animate itself. In our case, this is optional). After that, click "Replace all" and outdated entities will be replaced. Then find any line, replace "Find:” with "Prop_dynamic" → Find next. After that, lines of models will be visible, and their directory will be there.

PlacementTip.pngExample:the model "hidrante.mdl" located on line 53460.

Also, replace info_player_deathmatch with info_player_start in the same way. And Cycler (used to display a model for testing purposes. After turning it on, the model will play available animations.) with prop_dynamic. It should be changed according to the location of the model. In this case, the replaced "model" "models/ts_constryard/hidrante.mdl" with models/constryard/ hidrante.mdl. To simplify the process, do this as in the previous step (replacing all lines with the necessary ones at once). After that, use the File → Save option. And start the resulting VMF file. The models work.

PlacementTip.pngExample:

Using the VisGroups dialog box, uncheck everything except for Brush Entities. Manually delete all outdated entities by selecting them with the CTRL and pressing the Delete. In this case, deleting all entities with the names "ts_groundweapon" and "ts_powerup" (these are entities from a modification for which this map was created, namely weapons and abilities). After completing these steps, return all objects to the "VisGroups" and it should look like this:

After saving the RMF file as VMF, holes appeared in the structure when compiling with BSPtwoMAP.

Note.pngFix:Recreating the brush, or choosing a similar brush nearby and assigning it to the same coordinates where the original one should be.
PlacementTip.pngExample:How to approach it
Brush to model (optional)

After compiling the map, holes appear in the structure (not visible in Hammer).

Note.pngFix:optimize the brush by converting it into a model using the official Propper tool. Read more about Propper.

If this structure has been converted into a "Func_detail”, convert it back into brushes by using the Ctrl+ Shift+W ("Move to world", which removes the entity status from the selected brushes). Then, select the previously mentioned brush and go to File → New (this will open a new blank map file). Next, use the Ctrl+V to paste the object onto the new map file and edit it. Using the Ctrl+T, edit the class option and replace Func_Detail with propper_model. To use Propper, open the map in Hammer and then turn several brushes into propper_model entities.

PlacementTip.pngExample:Setting a path
Model Name: artpass/arch
Material path: models/artpass/arch
Source folder: C:/propsource

To duplicate this entity, turn it into a func_detail and replace all of its textures with "Clip" using the ‘Apply current texture’ tool.

To run Propper, one can create an object and convert it into a model, similar to creating maps with vbsp. When prompted, the current game directory and vmf file should be provided.

A new object should now be ready for use! If replacing an existing model, it may be necessary to restart Hammer in order to see changes. Access the map where the object needs to be inserted. Create a prop_static entity (this is an internal point available in all Source games. It is used for inexpensive addition of models to the world. It cannot move, animate, or accept input, and no longer exists as an object after the map is compiled). Using the Entity tool (this tool allows for the placement of point-based objects on the map. Point-based objects are objects that exist only in a point and do not rely on the brush for their effect), select Categories → Entities in the resulting window. In Objects → prop_static.

For the "World Model,” select the compiled model through Propper. In this case, it would be "Constryard_building.” After this, insert it at the same coordinates where the brush was.

Point[Obsolete-notext.png Deprecated]
Icon-Important.pngImportant:It is enough to replace .spr with .vmt in "Sprite name"

Configure the sprite entities on the map by searching for "env_sprite" in the VMF file through Notepad++ Notepad++. If necessary, replace all instances of "sprites/ts_constryard" with "sprites.” Open the map in the Hammer Editor and select all "env_sprite" entities. Group them together with the CTRL+G, and access the properties of these objects. Adjust the settings as follows:

Read more about env_sprite.

Now the "Env_sprite" objects appear to be too blue… This needs to be corrected using Adobe Photoshop. Open the VTF sprite files and use the "Color Range" tool (Selection). Select the blue area and lower the brightness in "Hue/Saturation" (Image → Adjustments) until the color appears to be black. Alternatively, run the sprite through xwad.

Clips
Warning.pngWarning:After decompiling the GoldSrc GoldSrc map, the clips will disappear! It is necessary to recreate them from scratch.

After these actions, the situation will improve. Add clips to the map.

Result
Optimization[Obsolete-notext.png Deprecated]
Tip.pngTip:These problems appear in almost all sources by old decompilers such as WinBSPC, BSPtwoMAP, MBSPC. One can avoid all these problems by using Half-Life Unified SDK Map Decompiler
Tip.pngTip:To optimize the map, it is recommended to use the -Nodraw texture only on surfaces that will not be visible to the player.
Icon-Important.pngImportant:to note that in some cases, it may be necessary to go outside the map to ensure that all invisible surfaces are covered.

All textures in these areas should be covered with “-Nodraw" (except for the Skybox texture, which can be left as is). A comparison can be seen below:

Before After

To optimize the map further, replace old Func_illusionary's (originally added as a deprecated entity from Half-Life for backward compatibility) with Func_detail. However, some Func_illusionary's that use the {apoio texture should be left as is and instead add an invisible wall around each column. This modification will result in the following:

Cubemaps (optional)

Now add Cubemaps to the map. Read more about Cubemaps. The result looks like:

Nodes (optional)

Now add Nodes to the map. Read more about Nodes. The result looks like:

Lighting
Warning.pngWarning:Some maps (often Counter-Strike Counter-Strike maps) can be decompiled without lighting entities! To make this, you need to have the .rad file that was used during compilation. Otherwise, the lighting will have to be recreated from scratch!

Increase its values (Low values in Goldsource are equivalent to high values in Source). Access the properties of the object and modify the "Brightness and color + Ambient" value to a higher but similar color palette. Read more about light_environment.

Tip.pngTip:if the lighting on the ported map is very dark, change the last values in light_environment.
PlacementTip.pngExample:Brightness to 280. Ambient to 65.
Note.pngFix:If the map continues to be dark, set unreasonably high values.
Note.pngNote:In Light environment, some KVs have different names:
Mechanism

Now it’s time to work on the func_train's. Read more about func_train. In this case, it’s a elevator. Replace the func_train with the func_tracktrain. Configure it like in the screenshots below:

  • No User Control (only from button control)
  • Fixed Orientation

Additionally, add two "path_track" entities to the middle of the lift and combine them. Be sure to assign names to these entities. Use the "Next Stop Target" command to connect them sequentially,

PlacementTip.pngExample:path1 (moves to path2) and path2 (returns to path1).

Each of these entities must have a name. In the "Next Stop Target" field, specify the destination where the lift will go. In this case, a loop needs to be created (P_BAXIO → P_CIMA and back to P_BAXIO). Here’s a guide: - "Stop" - stops the train - "SetSpeed" - sets the speed (for stopping the lift) - "OnPass" - stops at a designated stop (otherwise there may be problems and it won’t stop)

Below are the necessary parameters for configuration:

Next, let’s configure the func_button. Add the env_texturetoggle next to the button.

In the "Target Brush(es)” field, enter the name of the func_button object to which the entity should be attached. This will allow the button to have an animation when it is interacted with. Open the properties of the button and add the following values to Outputs:

The flags for the buttons should look like this (flag combination determines the specific features of the entity):

Avoid moving the button from its static position after being pressed. Use the "Activates" function so that players can call the elevator by pressing E. Perform the same operation on all similar objects, then proceed to the final stage. Access the "VisGroups" window, uncheck all boxes except for Entities select all entities, go to properties, and change the rendercolor value from 0 0 0 to 255 255 255 (otherwise, all entities will be black. In GoldSrc, this function worked differently). Afterwards, open the Error Check window and fix any remaining issues. Saving: Open the File menu, and choose either Save or Save As. Compile the saved file and start the game after compilation. The map in the new engine can now be used. Also, don’t forget to build cubemaps and set up lighting for HDR. After completing these steps, the porting process is considered finished. Now the new BSP works in Source.

In this case, it's an elevator. Change the func_train to the func_tracktrain (This is a brush available in all Source games. It functions as a moving platform that the player can ride on. It follows the path_track entities path).

(No User Control - No user control, only from the button should be. Fixed Orientation - Corrected orientation, axis) And add two path_track's (a point entity available in all Source games. It is used to build paths that other objects can follow. Each path_track is a path node, each containing the name of the next path node).

It was placed in the middle of the elevator, and combine them. Definitely assign a name to these entities. Using the command: Next Stop Target (They must be connected in series,

PlacementTip.pngExample:path1 (goes to path2) and path2 (back to path1)).

Each such entity must have a name. The "Next Stop Target" should contain the target where the elevator will go. In this case, one needs to make chain. (P_BAXIOP_CIMA and in a circle).

Tip.pngTip:Stop - Stop the train.

SetSpeed - Set the speed (to stop the elevator).

OnPass - stop on arrival (otherwise there will be problems, and it will not stop)).
PlacementTip.pngExample:Required parameters (configuration)
  • Let's move on to the func_button setting, add the env_texturetoggle next to the button.
  • In Target Brush(es) The name func_button was assigned to the identified the object which needed to be attached. to the object (In order for the button to have animation when it is interacted with). Open the properties of the button. And add the following values to Outputs:
  • Flags (Toggles the exclusive functions of the object, its specific number is determined by the combination of added flags) buttons should look like this:
  • Don’t move (So that after pressing the button does not fly to another place, and remains static). Use Activates - So that the player can call the elevator on the E
Color correction

Do this operation with all similar objects. Proceeding to the final stage is now possible. Go to the "VisGroups" window, uncheck everything except "Entities" → Select all entities → move to properties → and change the rendercolor value from "0 0 0" to "255 255 255" (Otherwise, all entities will be black, in GoldSource it worked differently (if the map has colored sprites don't do it! Instead, select all "Brush Entities" and props, if any)) Otherwise just open notepad++ and edit all lines with value rendercolor 0 0 0. After that, open the Error Checking window and fix the remaining problems. Preservation.

Compiling

Open the "File" menu, and choose one of the two: "Save" or "Save As...": After compilation, the game will start. The map can now be used in the new engine. Also don't forget to build cubemaps and set the lighting to HDR. After the done actions, it can be assumed that the porting is completed. The new bsp is now running in Source Engine 24.

Comparison

To compare the original version with the port, Half-Life Half-Life on the GoldSrc GoldSrc Engine and Half-Life 2 Half-Life 2 on the Source Source Engine were used.

Original Port (HDR)

Judging by the screenshots, the texture quality has improved (due to the use of $detail), the map has become darker, and the level geometry remains the same. The overall quality is significantly higher.

Tip.pngTip:To make the lighting brighter, change the values of light_environment

Conclusion

Old map was successfully ported to a new game engine, and the resulting map was even modernized with additional texture values. A comparison was made with the original work. Decompilation of the necessary files was successful, with the main focus being on fixing issues after decompilation, which involves recreation, with most entities being ported. Optimization was successful, and many complex geometric shapes were converted into models, both in func_detail and using-nodraw to optimize the final map. Cubemaps and AI nodes were added. After completing all the stages, compilation was initiated, and the map was successfully ported.

Warning.pngWarning:The map may be perceived a little differently because view height in goldsource is 64 units while in source it is changed to 72.
Icon-Important.pngImportant:Things in Counter-Strike: Source and Counter-Strike: Global Offensive Counter-Strike: Global Offensive have different heights than in Counter-Strike Counter-Strike and Counter-Strike: Condition Zero Counter-Strike: Condition Zero. For Counter-Strike: Global Offensive Counter-Strike: Global Offensive dimensions, see Counter-Strike: Global Offensive/Mapper's Reference. For Counter-Strike Counter-Strike dimensions, see GoldSrc Dimensions#Counter-Strike.
Tip.pngTip:The suggested programms in the article are not the only ones. You can use any convenient soft for you that will perform the same functions.

Unincluded

Porting from GoldSrc GoldSrc has many branches, and each porting is unique. Here are all the cases that were not covered in the main analysis of content porting.


Detail textures

In GoldSrc GoldSrc, detail texture information is usually contained in 🖿maps/<mapname>_detail.txt.

Open the needed detail file.

PlacementTip.pngExample:line in a file
g_wallblah_2 detail/metal 10.0 10.0
  • The first string is the name of the WAD texture. This is equivalent to the name of your VMT in Source Source.
  • The second string is the path and filename (without extension) of the detail texture, relative to 🖿<moddir>\gfx\. This is equivalent to $detail in Source Source.
  • The last two numbers are the scale of the detail texture (how many times it repeats). This number works the same regardless of texture resolution, so the same numbers can be used for both GoldSrc GoldSrc and Source Source, even if the WAD texture has been resized from a power of two. This is equivalent to $detailscale in Source Source.

So assuming the detail texture was placed in 🖿materials\detail\, the Source Source VMT for the above WAD texture should look something like so:

materials/mywad/g_wallblah_2
vmt
LightmappedGeneric { $basetexture "mywad/g_wallblah_2" $detail "detail/metal" $detailscale "[ 10.0 10.0 ]" $surfaceprop metal }
Note.pngNote:$detailblendmode doesn't need to be specified; the default is DecalModulate, which works the same as GoldSrc GoldSrc.
Tip.pngTip:Due to the high detail frequency and low-resolution nature of detail textures, DXT1 compression should be avoided. Instead, consider using the following formats:
Color info?Most Source Source branchesStrata Source Strata Source
GreyscaleI8ATI1N
ColoredBGR888BC7

Ready-to use VTF conversions of the detail textures used by Counter-Strike: Condition Zero Counter-Strike: Condition Zero, Counter-Strike (Xbox) Counter-Strike (Xbox), and Day of Defeat Day of Defeat 1.3 can be found on GameBanana.

Tool textures

Warning.pngWarning:Some values in Source may not be 100% equivalent to GoldSRC, see notes column.

See also Tool textures (Source) and Tool textures (GoldSrc)

GoldSrc GoldSrc Property Source Source Replacement Notes
{blue
{invisible
N/A Create a new material with $alpha 0.0. Do not use tools/toolsinvisible, as some things will be able to pass through in certain games.
aaa_hurt
aaa_multi
aaa_once
aaa_push
aaatrigger
aaa_push2
tools/toolstrigger Alternatively, create a new material with %compiletriggerand $alpha 0.5, to retain distinction.
cr_matmetal
bark
cr_matcard
cr_matbark
cr_mathvymetal
cr_matsand
cr_matwood
cr_matleaf
N/A Create a new material with %compileclip or %compilenodraw and appropriate $surfaceprop. See /VMTs#Clip textures.
CLIP
CLIPBEVELBRUSH
CLIPBEVEL
tools/toolsclip
HINT tools/toolshint
ORIGIN [Obsolete-notext.png Deprecated] Although there is a new (sometimes functional) tool texture tools/toolsorigin, a brish entity's origin now is a dragable point, available regardless of whether an origin brush is present. As such, the origin brush should be removed and the origin of the entity adjusted appropriately.
NOCLIP N/A Create a new material with %CompileNonSolid 1 and %CompileInvisible 1
SKIP tools/toolsskip
WHITE tools/toolswhite
Tip.pngTip:If the face is intended to be fullbright, use "Toolswhite" instead of "Halflife/white", to not build lightmaps for the face.
BLACK tools/toolsblack
Tip.pngTip:Use "Toolsblack" instead of "Halflife/black", to not build lightmaps for the face.
sky tools/toolsskybox
tools/toolsskybox2d
NULL
BEVEL
CONTENTEMPTY
Black_HIDDEN
tools/toolsnodraw
SOLIDHINT tools/toolsnodraw Add %CompileNoChop 1 to the VMTs of the applicable drawn faces to have this tool texture's behavior.
CLIPHULL1
CLIPHULL2
CLIPHULL3
tools/toolsclip
tools/toolsnpcclip
?
No direct equivalent, due to changes in how Clip
TRANSLUCENT
BOUNDINGBOX
Blank image.pngTodo: figure out suitable workarounds
CONTENTWATER tools/toolsnodraw Add $no_cull %CompileNonSolid to visible materials that should receive the contentwater effect

Map Scripting

Outdated

Lines
GoldSrc GoldSrc value Source Source value Notes
target [Obsolete-notext.png Deprecated] OUTPUTS TARGET (SELECT ACTION)
killtarget [Obsolete-notext.png Deprecated] OUTPUTS Target (KILL)
body bodygroup
Icon-Bug.pngBug:This value is flagged as an error by the Hammer Hammer, this will still work in the game.
dmg damage
skin [Obsolete-notext.png Deprecated]
angles movedir
Icon-Bug.pngBug:This value is flagged as an error by the Hammer Hammer, this will still work in the game.
_cone2 _inner_cone
fadein fadeinsecs
spr vmt If this value is not changed, then the game will have errors with sprites.
0 0 0 255 255 255 rendercolor
Neutral color in Half-Life Half-Life it's a 0 0 0 but in Source Source it's equivalenty 255 255 255

See more about replacements

Entities
GoldSrc GoldSrc entity Source Source entity Notes
cycler_sprite
cycler
env_model
item_generic
prop_dynamic
prop_static
prop_physics
Static props with multiple submodels should either use prop_dynamic or be split into separate MDLs, as prop_static does not support selectable submodels, but will still draw lightmap shadows from all submodels.
trigger_camera point_viewcontrol
env_glow env_sprite Select "Glow" Mode
env_sound env_soundscape Set applicable DSP mode in the Soundscape.
trigger_auto logic_auto
trigger_relay
multi_manager
logic_relay Apparently the multi_manager is still functioning in Half-Life: Source Half-Life: Source
aiscripted_sequence scripted_sequence
func_train func_tracktrain
func_tanktrain
func_train may still be working in game. Despite the fact that it is absent in the fgd files.
trigger_brush trigger_multiple
multisource Inputs and Outputs in Source Source
info_player_deathmatch info_player_start This value does not always need to be changed. Depending on whether the mod supports this entity.
armoury_entity weapon_mp5navy
weapon_tmp (1)
weapon_p90 (2)
weapon_mac10 (3)
weapon_ak47 (4)
weapon_sg552 (5)
weapon_m4a1 (6)
weapon_aug (7)
weapon_scout (8)
weapon_g3sg1 (9)
weapon_awp (10)
weapon_m3 (11)
weapon_xm1014 (12)
weapon_m249 (13)
weapon_flashbang (14)
weapon_hegrenade (15)
(16)[Clarify]
(17)[Clarify]
weapon_smokegrenade (18)
The numbers imply Item value of armoury_entity, equivalent to the entity in Source.
func_door_rotating Without changes The origin and flags need to be configured.


I/O Layouts
My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnStartTouch trigger_example CallScriptFunction OnStartTouch 0.00 No
Io11.png OnEndTouch trigger_example CallScriptFunction OnStartTouch 0.00 No
Blank image.pngTodo: for sounds, for doors? for all entities

Complex Map Scripting

Doors

If the map you are decompiling has doors. You will be able to notice that this brush has a green cube (no matter where) - this is a rotation point that previously worked in GoldSrc GoldSrc, but in Source Source this brush needs to be removed. And configure the door rotation point separately.

Func_door_rotating
Sequence Screenshot Actions
1 G2s-door.jpg Obsolete door
2 G2s-door-2.jpg Select this entity, and you can see that there is another rotation point (it is in the center), it needs to be configured.
Warning.pngWarning:Since the green square (the rotation point in GoldSrc GoldSrc) no longer works.
3 G2s-door-3.jpg
Icon-Important.pngImportant:The new rotation point you are manipulating should be exactly in the center of the green square.
Move this rotation point in accordance with the green square (width & height)
4 G2s-door-4.jpg In solids mode, remove the green square.
5 G2s-door-5.jpg
Icon-Important.pngImportant:The door behavior should be configured according to how the door behaves on the original map.
Final polish; Go to the properties of this entity Alt+ Enter and go to the flags section, and knowing how the entity behaves in the original map, select the values. But for the door to open and react to the player, be sure to select Use Opens (open on E) and Touch Opens.

Recreations

Displacements

Most likely, the structure that is the displacement will be indicated as a invalid solid structure. We'll have to recreate it from scratch, on appearance.

Although you can try using a tool that converts maps into models. And accordingly convert the map source (.map) into a model (.ase)[1]

Revisions

The methods shown in the main article are not the only ones, there are many other ways to port content.

Troubleshooting

Geometry

Although the method demonstrated in the geometry error fixing guide is quite affordable and can save some time, it is not the best solution.

TrenchBroom
Icon-Important.pngImportant:For best results with convex merge, it is recommended to use a decompiler with face-to-brush method rather than a tree-based.
  1. Install Trenchbroom
  2. Select Half-Life experimental mode (and set game path)
  3. Utilize J.A.C.K. to open the map and find any invalid brushes.
  4. Open Trenchbroom. Proceed by accessing the .map file and combine multiple brushes into a single one by control-clicking on each of them and pressing CTRL+J (convex merge) or Edit → CSG → Convex merge.
Warning.pngWarning:Do not combine too many brushes or overly complex ones, as this may result in their simplification or removal.
PlacementTip.pngExample:Incorrectly merging brushes


How it should be



Keep in mind that this process might be time-consuming, especially if the map is extensive and intricate.

Newbspguy
Note.pngNote:A map can be converted to a model without decompiling it.

Porting projects

Game selection and analysis

As an example for the porting will be chosen a once popular mod They Hunger (only Episode 1) for Half-Life 1. This decision to use it is justified by the fact that it has its own unique design and storyline, interesting content, and above all a slightly modified code.

They Hunger is a full conversion horror-themed mod for the Half-Life video game. It was created by Neil Mahnke and released in three episodes between 1999 and 2001. The plot of the mod unfolds in a small town in rural America, flooded with zombies after a series of unusual events. The player takes on the role of a lone survivor who must make his way through the town to uncover the source of the zombie outbreak and put an end to it. They Hunger featured the use of cinematic horror elements, such as atmospheric sound design and lighting effects, as well as an emphasis on puzzles and exploration in addition to combat. The mod was also praised for its attention to detail and high quality production. They Hunger has become a popular and influential mod for Half-Life, especially in the horror genre. It has inspired other horror-themed mods, including the popular Cry of Fear.

Projects

Standalone

Extras

Source Source Engine GoldSrc GoldSrc Engine Content
BrainBread 2 BrainBread 2
Left 4 Dead Left 4 DeadLeft 4 Dead 2 Left 4 Dead 2
Day of Defeat: Source Day of Defeat: Source
Counter-Strike: Source Counter-Strike: Source
Counter-Strike: Global Offensive Counter-Strike: Global Offensive
Garry's Mod Garry's Mod
Half-Life: Source Half-Life: Source
Half-Life 2 Half-Life 2
Half-Life Deathmatch: Source Half-Life Deathmatch: Source
Jabroni Brawl: Episode 3 Jabroni Brawl: Episode 3
Momentum Mod Momentum Mod
Half-Life Half-Life
Half-Life: Opposing Force Half-Life: Opposing Force
Half-Life: Blue Shift Half-Life: Blue Shift
Deathmatch Classic Deathmatch Classic
Half-Life: Decay Half-Life: Decay
Half-Life: Caged Half-Life: Caged
Azure Sheep Azure Sheep
Cry of Fear Cry of Fear
Afraid of Monsters Afraid of Monsters
Heart of Evil
Base Defense
Mistake Mistake
BrainBread BrainBread
Sven Co-op Sven Co-op
Half-Life: Absolute Zero Half-Life: Absolute Zero
James Bond 007: Nightfire James Bond 007: Nightfire
They Hunger They Hunger
Half-Life: Echoes
RainFall RainFall
USS Darkstar
Day of Defeat Day of Defeat
Paranoia Paranoia
Paranoia 2: Savior Paranoia 2: Savior
Counter-Strike Counter-Strike
Counter-Strike: Condition Zero Counter-Strike: Condition Zero
Counter-Strike Nexon: Studio Counter-Strike Nexon: Studio
Counter-Strike Neo Counter-Strike Neo
Team Fortress Classic Team Fortress Classic
Ricochet Ricochet
Gunman Chronicles Gunman Chronicles
Rocket Crowbar
Scientist Hunt
Jaykin Bacon
Quake Quake
Quake II Quake II
Quake III Quake III
Garry's Mod Weapons, NPCS, HUD, Models, Maps, GUI, Textures, etc.
Jabroni Brawl: Episode 3 has a lot from Various GoldSrc GoldSrc projects
Momentum Mod are still many ported maps on the Momentum maps page
Counter-Strike: SourceCounter-Strike: Global Offensive have quite a lot of ports by community

Subpages

See also

External Links


References

  1. Q3Map2 manual about compiling a model from map[Category:Tutorials]]