Source 2/Docs/Level Design/Import Tool Documentation

= Import Tool Documentation =
As part of ’s Workshop Tools, we have included a script for helping content creators to quickly port maps and assets over to . Before getting started there is some preparation work which must be done.
=== Prerequisites ===
==== Precompiled Content ====
Precompiled content (such as any custom vmt, vtf, mdl, etc.) must be located in the folder. For example: 
* 
* 
==== Source Map Files ====
Your map files (vmfs) can live anywhere outside of as long as they are in a folder. Any prefab or instance vmfs referenced by your map must be in whatever subfolder structure is expected by the map. For example:
* 
* 
* 
==== Source Texture Files ====
If you have uncompressed source files for textures, (tga, psd, etc.) the import tool will try to use those when importing materials, otherwise it will fall back to converting and recompressing vtf files (which can decrease texture quality). For this to be successful, make sure your source files are in a mirrored location of the vtfs in . For example:
* 
* 
== Getting Started ==
=== 1. Installing Python 2.7.14 ===
To run the import script you will need to install 2.7.14 which you can grab here: https://www.python.org/downloads/release/python-2714.
=== 2. Setting Environment Variables ===
Next you will need to set two environment path variables so that Windows knows where your installation lives and other import libraries in the folder:
Press the to access the Power User Task Menu.
* In the Power User Task Menu, select the System option.
* In the System window, scroll to the bottom and click the About option.
* In the System > About window, click the Advanced system settings link at the bottom of the Device specifications section.
* In the System Properties window, click the Advanced tab, then click the Environment Variables button near the bottom of that tab.
* In the Environment Variables window (pictured below), highlight the Path variable in the System variables section and/or click the New button.
* Add a path variable with the Value being the path to where you installed , and the path to your folder , separated by a semicolon. e.g. ; 
* Do this for both User Variables and System Variables:
=== 3. Installing the Colorama Extension ===
Next you will need a extension called colorama. To install this, simply open up a command prompt (search for cmd in Windows Start Menu) and type
=== 4. Creating a new Addon with the Workshop Tools ===
Before running an import, you will need to create a Workshop Tools addon so that the imported content has a valid destination. To make a new addon, simply launch the game with Workshop Tools, and from the UI click "Create New Addon" and take note of the name for later.
=== 5. Locating the Import Script ===
First up is locating the import script, which can be found in the following folder:
Once you have located the folder, you will want to open up a command prompt here. This can be done by simply typing "cmd" in Windows Explorer address bar and hitting enter:
=== 6. Running the Script + Parameters ===
Now you are ready to run the script by entering the following:
==== Script Parameters ====
Backslashes(\) are used for paths on Windows 11, otherwise FileNotFoundError will occur during the import process.
: <s1gameinfopath>
: Path to folder containing CS:GO's gameinfo.txt, this MUST be the path that contains the compiled CS:GO model and material content you want to import (e.g. .mdl, .vmt).
 
: <s1contentpath>
: Path to folder containing source content, (.vmf .psd .tga etc.). As mentioned above, for the importer to successfully find and use source texture files, make sure they are in a mirrored location to that of the .vtfs (see example above)
: <s2gameinfopath>
: Path to folder containing 's gameinfo.gi
: <s2addon>
: The name of Workshop addon that you created earlier. This is where your assets will be imported to.
: <mapname>
: This is the map name (.vmf) without extension, e.g. de_examplemap that you wish to import. If your map sits under a subdirectory of the folder in . Be sure to add this path before your map name. For example: 
: -usebsp
: This runs the map through a special vbsp process to generate clean map geometry from brushes, removing hidden faces and stitching up edges, making the version easier to work with in . It preserves world (vis) brushes and brushes for compatibility with . This parameter will also merge all in your map. Note that the final geometry will be triangulated, but cleaning it up is a fairly simple process, which will be explained in another guide.
: -usebsp_nomergeinstances
: Use this instead of if you wish to both generate clean geo and also preserve . Note that this takes a little longer as it has to run through the import process twice. The final geometry will also be triangulated.
: -skipdeps
: Optional: skips importing all dependencies/content and only generates the vmap file(s). This provides a 'quick' import when iterating entities for example. Do not run with this if you are importing for the first time. 
Example:
=== 7. Post Import Fixup ===
After your level has been imported, review the Post Import Fixup steps
=== Experimental GUI ===
In we have included an experimental GUI for the map importer which might help streamline the import process somewhat called 
This GUI has the advantage of useful tooltips, easily selectable import options and it will also remember your settings between sessions. Note that you will still need to complete the prerequisites and steps 1-4 above for this to work correctly. We have also included the source scripts for the community to customize as they see fit.
= Troubleshooting =
* You may get the following error on import if you're using a non-default skybox. Change your skybox to and try again.
* The following error indicates that your has spaces in it. Change the path to something without spaces.
* The following error may be solved by renaming the file vpk.signatures in "counter-strike global offensive\game\bin\win64" to something else (like vpk.signature.bak) and trying again.
* Missing gameinfo.txt File Error:
If you receive an error stating that the `gameinfo.txt` file is not found, this may occur if you do not have the legacy version of CS:GO game files installed after the CS2 update occurred. Ensure that you are participating in the csgo_legacy beta (see CS2 - Opting into Beta depots), and verify that the `gameinfo.txt` file is present in the specified `<s1gameinfopath>`. If the file is missing, installing or verifying the integrity of the game files through Steam may also resolve this issue.