Porting GoldSrc maps to Source: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(cleanup)
m (Corrected decompiler link)
 
(16 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{back|Porting Goldsource content to Source}}
{{Cleanup|While this tutorial has been rewritten for [[Half-Life Unified SDK|HL Unified SDK]], there are still some references to BSP2Map.}}
Any [[GoldSrc]] mapper looking to start working with Source has given thought to porting over their existing work. Generally the easy way to do this is to load the .RMF into the new [[Hammer]] and update the textures and entities. If that isn't available, this tutorial shows how to port a map from a decompile.
Any [[GoldSrc]] mapper looking to start working with Source has given thought to porting over their existing work. Generally the easy way to do this is to load the .RMF into the new [[Hammer]] and update the textures and entities. If that isn't available, this tutorial shows how to port a map from a decompile.


==Tools==
==Tools==
Many tools exist for the purpose of decompilation and porting, but the ones we're looking at are called [[Half-Life Unified SDK Map Decompiler|Half-Life Unified SDK Map Decomplier]] (decompile) and [[MapFool]] (update). Be sure all the [[WAD]]s needed for the map are handy.


Many tools exist for the purpose of decompilation and porting, but the ones we're looking at are called [[BSP2MAP|BSP2Map]] (decompile) and [[MapFool]] (update). Be sure all the [[WAD|WADs]] needed for the map are handy.
==Decompilation==
[[File:HLUnifiedSDKMapDecomplierScreenshot.png|thumb|350px|Screenshot of Half-Life Unified SDK Map Decomplier (in GUI mode)]]
Run {{code|HalfLife.UnifiedSdk.MapDecompiler.GUI.exe}} first configuring it whatever you want but here, we just gonna leaving it default. Then select the Output Directory, something like {{code|C:\Program Files\Steam\steamapps\common\half-life\valve\mapsrc}} for example (create one if it doesn't exist). After that, go to File > Convert, select the .bsp file, then it will automatically converting it to .map.
{{Tip|You can hold SHIFT then drag to select multiple .bsp files.}}


==Decompilation==


As BSP2Map is a command line utility, run it from the Command Prompt with the BSP in question as an argument (e.g. <code>bsp2map c1a0.bsp</code>).


[[Image:Ava d.jpg|thumb|250px|A decompiled copy of <code>dod_avalanche</code> without fixed textures]]  
[[File:Ava d.jpg|thumb|350px|A decompiled copy of <code>dod_avalanche</code> without fixed textures]]  


None of the textures will exist in the map, so you'll have to use MapFool to update their location. Load your map into MapFool and load the WADs and .map into it. After loading all the WADs, point MapFool towards the location of your copy of [[Vtex]] and where you want it to dump all your textures.
None of the textures will exist in the map, so you'll have to use MapFool to update their location. Load your map into MapFool and load the WADs (from File > Options...) and .map into it. After loading all the WADs, point MapFool towards the location of your copy of [[Vtex (Source 1)|Vtex]] and where you want it to dump all your textures.


Using "Upgrade Obsolete Entities" from the Tools menu, change any obsolete or deprecated entities to their Source counterparts (<code>[[func_illusionary]]</code> turns into <code>[[func_brush]]</code> entities with the solidity turned off, for example).
Using "Upgrade Obsolete Entities" from the Tools menu, change any obsolete or deprecated entities to their Source counterparts (<code>[[func_illusionary]]</code> turns into <code>[[func_brush]]</code> entities with the solidity turned off, for example).


==Porting textures==
==Porting textures==
{{todo|[[xwad]] automates the npot texture conversion.}}
Export all the textures in the WADs to TGA. Navigate to it and turn them into [[material]]s using Vtex. Some textures can't be converted right away because Source requires all textures to be in powers of two. Any irregularly sized textures will need to be resized in an image editor before recompilation.


Export all the textures in the WADs to TGA. Navigate to it and turn them into [[material|materials]] using Vtex. Some textures can't be converted right away because Source requires all textures to be in powers of two. Any irregularly sized textures will need to be resized in an image editor before recompilation. 
Assuming everything was put in its proper place, you should have an almost perfect replica of your favorite HL1 map.  Don't compile right off the bat, however. The way BSP2Map works is that, instead of creating one solid, it creates six very thin solids. This almost certainly will lead to broken solids and going way over [[VBSP|VBSP's]] compile limit.


Assuming everything was put in its proper place, you should have an almost perfect replica of your favorite HL1 map.  Don't compile right off the bat, however. The way BSP2Map works is that, instead of creating one solid, it creates six very thin solids. This almost certainly will lead to broken solids and going way over [[VBSP|VBSP's]] compile limit.
{{Todo|Figure out how the HL Unified SDK Decomplier works, and does it's able to compile the map without modifying anything or reacting VBSP limit.}}
 
You'll have to fix all of this yourself, fortunately. Half-Life 2 BSPs solve the problem by saving the original solids in the map, so it's simply a matter of extracting them.


You'll have to fix all of this yourself, unfortunately. Half-Life 2 BSPs solve the problem by saving the original solids in the map, so it's simply a matter of extracting them.
==See also==
*[[Porting GoldSrc content (maps, models, etc.) to Source]]


==External Links==
==External links==
*[http://www.dodbits.com/dods/index.php/hl2-mapping/61-porting-old-half-life-1-maps Dodbits' tutorial on porting maps]
*[http://www.dodbits.com/dods/index.php/hl2-mapping/61-porting-old-half-life-1-maps Dodbits' tutorial on porting maps]
[[Category:GoldSrc]]
[[Category:Source]]

Latest revision as of 08:18, 15 March 2025

English (en)Русский (ru)Translate (Translate)
Porting Goldsource content to Source
Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality because:
While this tutorial has been rewritten for HL Unified SDK, there are still some references to BSP2Map.
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.

Any GoldSrc mapper looking to start working with Source has given thought to porting over their existing work. Generally the easy way to do this is to load the .RMF into the new Hammer and update the textures and entities. If that isn't available, this tutorial shows how to port a map from a decompile.

Tools

Many tools exist for the purpose of decompilation and porting, but the ones we're looking at are called Half-Life Unified SDK Map Decomplier (decompile) and MapFool (update). Be sure all the WADs needed for the map are handy.

Decompilation

Screenshot of Half-Life Unified SDK Map Decomplier (in GUI mode)

Run HalfLife.UnifiedSdk.MapDecompiler.GUI.exe first configuring it whatever you want but here, we just gonna leaving it default. Then select the Output Directory, something like C:\Program Files\Steam\steamapps\common\half-life\valve\mapsrc for example (create one if it doesn't exist). After that, go to File > Convert, select the .bsp file, then it will automatically converting it to .map.

Tip.pngTip:You can hold SHIFT then drag to select multiple .bsp files.


A decompiled copy of dod_avalanche without fixed textures

None of the textures will exist in the map, so you'll have to use MapFool to update their location. Load your map into MapFool and load the WADs (from File > Options...) and .map into it. After loading all the WADs, point MapFool towards the location of your copy of Vtex and where you want it to dump all your textures.

Using "Upgrade Obsolete Entities" from the Tools menu, change any obsolete or deprecated entities to their Source counterparts (func_illusionary turns into func_brush entities with the solidity turned off, for example).

Porting textures

Todo: xwad automates the npot texture conversion.

Export all the textures in the WADs to TGA. Navigate to it and turn them into materials using Vtex. Some textures can't be converted right away because Source requires all textures to be in powers of two. Any irregularly sized textures will need to be resized in an image editor before recompilation.

Assuming everything was put in its proper place, you should have an almost perfect replica of your favorite HL1 map. Don't compile right off the bat, however. The way BSP2Map works is that, instead of creating one solid, it creates six very thin solids. This almost certainly will lead to broken solids and going way over VBSP's compile limit.

Todo: Figure out how the HL Unified SDK Decomplier works, and does it's able to compile the map without modifying anything or reacting VBSP limit.

You'll have to fix all of this yourself, fortunately. Half-Life 2 BSPs solve the problem by saving the original solids in the map, so it's simply a matter of extracting them.

See also

External links