S&box Wiki

Revision Difference

Using_source1import#546824

<title>Using source1import</title> # Background `source1import.exe` is a command-line tool found in the `bin\win64` folder of s&box that can convert Source filetypes into their Source 2 counterparts. It can convert VMT/VTFs to VMATs, MDLs to VMDLs, PCFs to VPCFs, and more. It cannot convert BSPs or VMFs. #Getting started <note>This guide assumes you have basic command line experience.</note> ##What you'll need: 1. A Source 1 game **THAT YOU HAVE PERMISSION TO PORT** 2. [This blacklist file](https://gist.github.com/ecumber/391d0fdbe32099fece09d894d9d60834) which tells source1import what filetypes to import. 3. [This gameinfo.gi file](https://gist.github.com/ecumber/cc75d41202b1c545e919458e2cd98653) ##Setup First, create a folder in the main s&box directory (this is probably `C:\Program Files (x86)\Steam\steamapps\common\sbox`) and name it `(Source 1 game)_imported`. For example, if you are importing `hl2`, you would name it `hl2_imported.` This is where the assets will go once imported. Next, place the blacklist file you downloaded in the `core` folder of s&box. You'll also want to place the gameinfo.gi file in your newly created folder. The directory structure should look like this once you are finished. This assumes you are importing HL2 and you named the folder hl2_imported. ``` └── sbox/ ├── addons/ ├── bin/ ├── config/ ├── core/ └── source1import_blacklist.txt ├── hl2_imported/ └── gameinfo.gi └── tools/ ``` Next, edit the gameinfo.gi file and change the lines "importmod" to the name of the Source 1 game (example: `hl2`), and change the "importdir" line to the name of the _imported folder you made, beginning with "../". Example for HL2: ``` "GameInfo" { Source1Import { "importmod" "hl2" "importdir" "../hl2_imported" } } ``` <note> If your game stores assets in VPKs you should extract them first. Source1import runs into issues when trying to import assets from VPKs. </note> #Running source1import Open a command window and navigate to the `bin\win64` folder of s&box. Make sure you're running the app from this directory. The syntax for source1import.exe is: ``` source1import -src1gameinfodir <Source 1 game path> -game <source 2 game path> -fullimport ``` Here's what the command would look like if you're importing HL2. ``` source1import -src1gameinfodir path\to\hl2 -game hl2_imported -fullimport ``` Run the command and source1import should start converting the Source assets into Source 2 filetypes. #File Lists TODO