I have released the tool for public use and you can get it from the project's Github page. Watch the tutorial below to learn how to use it.
My new tool, Corvid, is going to be released for everyone in a short time. You can follow the progress from the Github page of the project or even download and test it for yourself if you know your way around Python. I will be releasing a tutorial along with the binaries once everything is ready. Here are some screenshots of the tests I and the testers did.
Assault from Counter-Strike Global Offensive. Courtesy of Numan.
Overpass from Counter-Strike Global Offensive. Courtesy of Geekidos.
Mirage from Counter-Strike Global Offensive. I was too lazy to bake lighting in Radiant since my computer is not good enough for such intense tasks.
Mirage again, but in Cod 4.
However, I'm not deleting the original tutorial because I think it has historical value.
Hidden Text
Hey guys. I've been working on this for a very long time and I think it's high time I share it. Unlike porting GoldSRC Engine (Half-Life, CS 1.6, etc) maps, porting maps from Source Engine maps is a lot harder and requires more skills. I tried to make the hard part as easy as I can so hopefully it'll be an easy job for you guys to port maps from Source Engine maps.
Note: Before starting, I would like to thank the guys at killtube.org for the VMF parser. It saved lots of time for me http://killtube.org/showthread.php?1003-VMF2Map Another note: Unfortunately, I still haven't found a way to convert the terrain patches, so they'll be flat brushes when they are converted. Any help will be appreciated about that
Requirements
A game built on Source Engine
The tools listed below
Maya with Call of Duty export plugins and the knowledge of how to use them
A functional brain
Before you start, you'll need to download the following tools.
- Extracting the materials and models with GCFSpace
In Source Engine, files like textures and models are stored in VPK files pretty much like Call of Duty's IWD files. There are usually two directories in which the VPK files are stored on most of the games (l4d2 is not one of them for example). One of them is always hl2 and the other one is usually the game's name's abbreviation (hl2mp in my case).
You'll need to open VPK files like gamename_pak_dir.vpk, gamename_misc_dir.vpk, gamename_textures_dir.vpk, and extract the folders "materials" and "models" in the same folder.
After you're done extracting the models and materials, you can copy or move the extracted folders in the game's directory (in my case steamdir/steamapps/common/Half-Life 2 Deathmatch/hl2mp/).
- Decompiling the bsp file with BSPSource
Run BSPSrc, click "Add", find the bsp file of the map you want to port and click "Decompile". I'm decompiling dm_steamlab from Half-Life 2 Deathmatch as an example.
- Converting the decompiled VMF file to a MAP file readable by Radiant
Run Johndoe's Tools, go to Source2Cod -> Map Converter, chose the VMF file you want to convert and hit "Convert".
After the app converts a VMF file, it creates three files. The file mapname.map is obviously the converted map file, mapname_textures.json and mapname_models.json have information about models and textures which can be used by Johndoe's Tools to copy the assets later.
- Copying the textures and models
Go to Settings, set your game's directory. Go to Source2Cod -> Texture/Model copier, select mapname_textures/mapname_models.json and hit "Copy".
- Decompiling the models with crafty
Go to the directory "copiedassets/mapname" and copy the directory "models" in gamedir/models/ with a different name (gamedir/models/copiedmodels/ for example).
Run Crafty, go to Setup -> Options -> Exporting and set texture extension to VTF and save it.
Go to Setup -> Options -> Directories and set your Steam directory and username.
Go to Setup -> Profiles and select the game.
Go to View -> Model Browser
If you set your Steam directory and game profile correct, then you'll see the copied models in root/models/[copiedmodels]. Find your copied models folder and expand it, right click every MDL file one by one and click "Export" or just navigate among the models with arrow keys and press Ctrl + E to export the highlighted model.
Make sure you export the models with their respective names in the same folder.
- Exporting the models with Maya
Create a file called resize.mel on your desktop, paste the following code in it and save it.
Run maya, open a model, select the whole model, drag and drop the MEL file on it. When exported, models from Source Engine are 2.54 times smaller than they are supposed to be so what we're doing here right here is a quick fix for it. You can safely export the models with their respective names.
- Fixing material names of the models When you export a model with Crafty, it exports the textures like modelname_material_x. Even if there are models that shares some textures, there will be multiple copies of the same file over and over again which makes the map's size bigger and makes you closer to engine limits. To prevent this, copy the xmodel_export files in "tobefixed/xmodel_export/" and the exported VTF files in "tobefixed/vtf/". Go to Source2Cod -> Material Fixer, hit "Start Fixing". It will copy the fixed xmodel_export and VTF files in "fixedmodels/xmodel_export/" and "fixedmodels/vtf/". When it's done, move the fixed xmodel_export files into "Johndoe's Tools/xmodel_export/". - Converting the textures with VTFEdit and NVidia DDS Converter Go to "copiedassets/mapname/textures" and move the vtf files in a new folder, go to "fixedmodel/vtf" and move the vtf files in the same folder. Run VTFEdit, go to Tools -> Convert Folder, set the the folder you just created as the input folder, create another folder and set it as the output folder. Set output type as TGA, convert the textures. Set the output type as PNG and convert them in a different output folder.
Copy nvdxt.exe in the folder where you exported the tga files, create a .bat file and copy following code and paste it into it. Copy the recently created DDS files in the folder "dds" in Johndoe's tools. Copy the PNG files in "dds/thumbnails". - Go to GDT Generator -> For Textures/For Models You can safely save the gdt file for xmodels. However, you'll need to set the properties of every single texture by looking at their preview images. This part is self-explanatory, so I don't think you'll need screenshots for it. - Converting the assets for Call of Duty Copy the GDT files from the folder "gdt" and paste them in "codroot/source_data/", the DDS files in "codroot/raw/images/custom/", xmodel_export files in "codroot/model_export/custom/". If you want to do a quick conversion, you can copy the .bat files in "Johndoe's Tools/gdt/" and paste them into "codroot/bin/". It always works on my computer when I run the .bat files as administrator, but for some reason, it doesn't work on computers of the people who tested it. So you'll need to run cmd.exe as administrator (Press start, type cmd, run as administrator), type the following and press enter. For Call of Duty World at war Steam version: For disc version: For Call of Duty Modern Warfare: For disc version: If you have it installed in another directory, you'll need to change it to your game's folder. After that, just type the name of the bat file (you should convert the textures before the models) and it should convert all of the materials one by one. If it doesn't work and gives errors, try converting them manually on asset manager and see the error yourself. After you've done all of these, you can open the map (exported/mapname.map) on Radiant to see if it worked and start working on it after fixing the texture alignments. Here's a screenshot of the map after the conversion. Note that the textures of the brushes need to be realigned since the way the texture alignment info is stored in both VMF and MAP format are different and I couldn't find a way to convert that yet. Also, the pink boxes are actually infodecals converted to script_structs as I couldn't find a way to make a port them directly. For now you can delete all of them. Hopefully I will find a way to work some day.
Another screenshot of a room from the same map with fixed textures.
Screenshots of other ported maps. cs_assault from Counter-Strike: Source (modified for the zombie mode)
contact from Insurgency (modified for the zombie mode)
I hope I made everything clear. If you have any troubles with anything with this, feel free to ask.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Has the ability to mute, kick, or ban chat members for being abusive or breaking the rules of the forum.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Thats awesome. But I think we need some rules (at least here) about releasing such maps ( if someone would work on thise, which I'm pretty sure someone will do )
Because I don't want to have 10 different de_dust2 version on the forum...
>> Will talk to the team about this
Legal side is another thing - many already walk on thin ice
Are there any downsides so far? - Does it export everything or does it have any limitations ???
Because I don't want to have 10 different de_dust2 version on the forum...
I don't think a mapper skilled enough to port a map is dumb enough to try and port a map that popular. Even if they do think of doing such a thing, i'm pretty sure they'll check the wip sections first. Also, this:
Legal side is another thing - many already walk on thin ice
Well it's an official map, i don't believe there should be any problems since i found some of the tools to decompile some Source Engine related assets on Valve's own wiki. But if someone wants to port a custom map, he should probably find the original mapper and ask for permission.
Are there any downsides so far? - Does it export everything or does it have any limitations ???
So far there are only two things i haven't been able to port two things: decals and patches. I'm pretty sure if i try harder i may be able to port that as well but decals seem impossible because they are simply laid on the map as normal entities without any geometrical info. But even without them, it works pretty fine.
Legal side is another thing - many already walk on thin ice
I was actually wondering if it was legal myself. So i went searching for the legal docs in L4D2 but couldn't find any legal agreement. I did however manage to find it in the 2013 SDK SP tools. From what i remember as long as you give credit to valve, third-parties, and compile the lengthy document with the mod, it is legal. I'd have to redownload the SDK again to make sure.
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Has the ability to mute, kick, or ban chat members for being abusive or breaking the rules of the forum.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
OK well any valid source to the legel thing would be appreciated, that would mean I don't have to find it.
There are enough people out there who will mess around with this. Especially newcomers could find this interesting and thats why we will most likely add some rules to protect at least our site / forum and of course the mapper himself.
Definitely, the original mapper has to agree, must know all the changes and where the map will be destributed. Idk about valve content in non-valve games / source engine - This is activision / treyarch / infinity ward so we need to check this.
Quote
I don't think a mapper skilled enough to port a map is dumb enough to try and port a map that popular. Even if they do think of doing such a thing, i'm pretty sure they'll check the wip sections first. Also, this:
There is no rule against multiple maps or whatsoever - First comes first serves seems also unfair - so idk about this topic yet.
This is a Terminal remake I found for L4D2 which almost looks EXACTLY like the original one from MW2. I was hoping to port it into WaW, but I think the original creator of the map has been inactive for a long time... :l
Can't I just list him in the credits for creating the original remake in L4D2?
Last Edit: May 31, 2014, 05:11:52 pm by CyberMan1011
i hope that people just don't port the map and add spawners and publish it
I agree with this. Sure people can port over maps from source... That's cool. A new take on some good old classic maps with zombies. Couldn't want more. I just don't want people to start pumping out the same map with little changes. Ex. Adding a few creates or barrels around and calling it there own. Even though I dl every map that's released for waw it's different then most molding communitys. People seem to make there own ideas into reality. I just think Trem's right and it needs to be regulated so we don't see 15 of the same map with a crappy face lift. But props to you for figuring this out!! Excited to give it a try... If I can
OK well any valid source to the legel thing would be appreciated, that would mean I don't have to find it.
There are enough people out there who will mess around with this. Especially newcomers could find this interesting and thats why we will most likely add some rules to protect at least our site / forum and of course the mapper himself.
Definitely, the original mapper has to agree, must know all the changes and where the map will be destributed. Idk about valve content in non-valve games / source engine - This is activision / treyarch / infinity ward so we need to check this.
All i can find so far is a third-party notice that comes with the 2013 SDK but i know there is another somewhere. I don't know how legal it is to post legal agreements, so i'll just let you download the SDK and look for yourself. You can download it from the "tools" tab in Steam.
So far for L4D2 i'm not seeing anything. Maybe all Source engine's use the same agreement?
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.