o_eat
02-05-2005, 03:49 PM
Converting HL1 maps to HL2 Hammer
This is a quick and dirty guide for porting your existing HL maps to source. Obviously all of the textures must be replaced and the entities will be illegal, so you must take care of these things or the map may crash hammer.
Open up your .rmf file in HL1 hammer (this step has changed from a previous version of the guide. Steam HL2 hammer no longer supports .rmf files, so you MUST use the original HL1 hammer to export the .rmf to .map. HL1 hammer is available from www.valve-erc.com )
Export the file to .map and close HL1 Hammer
Open the newly exported .map file in Steam's HL2 Hammer
Delete one fort/base as you will need to rebuild the texturing and entities regardless
Map->Check for problems
Fix all illegal textures (it'll just assign some random texture from the HL2 wads
Map->Entity Report
You can save your func_illusionaries and func_walls by selecting all of these (ctrl drag down the list, or select the first entity then shift click the last item you want) and then do move to world to turn the geometry back into world brushes. Then cntrl-T and set them to func_detail. Func detail is the new equivalent. Use it when you don't need to block vis as it doesn't split the map up during compile. I say this because a lot of the time func_walls / func_illusionaries are used for light fixtures, signs and a load of other stuff that takes time to replace.
Delete all other entities as they are not compatible
Change the map skyname and anything else that needs done
Save the updated map as a .vmf file
Also.. if you require it
(optional) Select the remaining geometry and click the "hide unselected" button. Rename the visgroup as "guide geometry". Use this step if you wish to rebuild your geometry from scratch but would like to use your original map as a guide. You can hide / show it as needed and simply hide it before compile, then select "do not build hidden objects" in CSG or BSP.
Flipping Bases
Hammer now finally has a search/replace function, it should make flipping the bases and redoing the ents a lot easier PROVIDING you use consistent entity naming schemes. For example, if you use the word "BLUE_" to prefix all blue fort entities, it will make replacing such a string with "RED_" later on very eays.
The way in which I normally flip my bases is:
Save the last version of the single base file with a clear name (so I can go back to it upon fuckup [never happened yet, but still])
Select all
Copy
Ensure texture lock is on
Close file
Open new file
Paste copy of fort into file
Flip the base on the y/z view. Then flip the base on the x/z view. This is the equivalent to rotating 180 degrees, but doesn't cause any complex brushes to become invalid / messed-up. NOTE: IF YOU HAVE DISPLACEMENT MAPS, THEY WILL NOT BE FLIPPED -- YOU HAVE TO ROTATE THEM 180 DEGREES SEPERATELY
Delete all duplicate entities (info_tf_detect, light_environment, entity message triggers that are useable by both teams and so forth [it's always a good idea to place non position-critical entities in a box outwith your map as it means keeping track and altering entities is very simple to deal with -- you always know how many you've got and what to alter / delete on flipping the bases])
Do a search & replace texture run, replacing all the blue textures with their red equivalents (or vice versa)
Create new textures for textures that don't really fit the red base (had to do this quite a few times for sm_reloaded
Start editing each entity one by one (don't forget about respawn entities, cap points, entity directions and so forth)
Save the file once done with a sensible name
Select all
Copy
Open old base file
Paste & Line up geometry
Compile and then test each flipped entity, all the goals and so forth.
Now this is probably obvious to everyone but I'm just making sure (particularly with the textures search & replace) you don't waste time doing unecessary work. Also, if anyone else can improve upon these methods I'm open to suggestion.
The last thing you must do is alter the entity orientation. As you all know these orientations are either a single number (0-360), three Euler angles (x y z orientation) or directions (up/down). Nothing should change on the z axis (height) when flipping bases, so you don't have to bother with altering the up/down instances. Altering the single number or Euler angles should be manageable simply by adding 180 to every angle. I've yet to test this but I'm sure it'll work.
This is a quick and dirty guide for porting your existing HL maps to source. Obviously all of the textures must be replaced and the entities will be illegal, so you must take care of these things or the map may crash hammer.
Open up your .rmf file in HL1 hammer (this step has changed from a previous version of the guide. Steam HL2 hammer no longer supports .rmf files, so you MUST use the original HL1 hammer to export the .rmf to .map. HL1 hammer is available from www.valve-erc.com )
Export the file to .map and close HL1 Hammer
Open the newly exported .map file in Steam's HL2 Hammer
Delete one fort/base as you will need to rebuild the texturing and entities regardless
Map->Check for problems
Fix all illegal textures (it'll just assign some random texture from the HL2 wads
Map->Entity Report
You can save your func_illusionaries and func_walls by selecting all of these (ctrl drag down the list, or select the first entity then shift click the last item you want) and then do move to world to turn the geometry back into world brushes. Then cntrl-T and set them to func_detail. Func detail is the new equivalent. Use it when you don't need to block vis as it doesn't split the map up during compile. I say this because a lot of the time func_walls / func_illusionaries are used for light fixtures, signs and a load of other stuff that takes time to replace.
Delete all other entities as they are not compatible
Change the map skyname and anything else that needs done
Save the updated map as a .vmf file
Also.. if you require it
(optional) Select the remaining geometry and click the "hide unselected" button. Rename the visgroup as "guide geometry". Use this step if you wish to rebuild your geometry from scratch but would like to use your original map as a guide. You can hide / show it as needed and simply hide it before compile, then select "do not build hidden objects" in CSG or BSP.
Flipping Bases
Hammer now finally has a search/replace function, it should make flipping the bases and redoing the ents a lot easier PROVIDING you use consistent entity naming schemes. For example, if you use the word "BLUE_" to prefix all blue fort entities, it will make replacing such a string with "RED_" later on very eays.
The way in which I normally flip my bases is:
Save the last version of the single base file with a clear name (so I can go back to it upon fuckup [never happened yet, but still])
Select all
Copy
Ensure texture lock is on
Close file
Open new file
Paste copy of fort into file
Flip the base on the y/z view. Then flip the base on the x/z view. This is the equivalent to rotating 180 degrees, but doesn't cause any complex brushes to become invalid / messed-up. NOTE: IF YOU HAVE DISPLACEMENT MAPS, THEY WILL NOT BE FLIPPED -- YOU HAVE TO ROTATE THEM 180 DEGREES SEPERATELY
Delete all duplicate entities (info_tf_detect, light_environment, entity message triggers that are useable by both teams and so forth [it's always a good idea to place non position-critical entities in a box outwith your map as it means keeping track and altering entities is very simple to deal with -- you always know how many you've got and what to alter / delete on flipping the bases])
Do a search & replace texture run, replacing all the blue textures with their red equivalents (or vice versa)
Create new textures for textures that don't really fit the red base (had to do this quite a few times for sm_reloaded
Start editing each entity one by one (don't forget about respawn entities, cap points, entity directions and so forth)
Save the file once done with a sensible name
Select all
Copy
Open old base file
Paste & Line up geometry
Compile and then test each flipped entity, all the goals and so forth.
Now this is probably obvious to everyone but I'm just making sure (particularly with the textures search & replace) you don't waste time doing unecessary work. Also, if anyone else can improve upon these methods I'm open to suggestion.
The last thing you must do is alter the entity orientation. As you all know these orientations are either a single number (0-360), three Euler angles (x y z orientation) or directions (up/down). Nothing should change on the z axis (height) when flipping bases, so you don't have to bother with altering the up/down instances. Altering the single number or Euler angles should be manageable simply by adding 180 to every angle. I've yet to test this but I'm sure it'll work.