Welcome, Guest. Please login or register. Did you miss your activation email?

* TUTORIAL SECTION RULES

This section is for SMOD TUTORIALS & GUIDES ONLY.
You may create a new topic in the appropriate area to share your tutorial. If you post anything off-topic here you will be temp-banned. This is so we don't hassle the moderators too much, they are volunteers.

If you need help with a tutorial, post a reply in its thread . Do not start a new topic for help here!

Author Topic: [Tutorial] Extracting CSS/Source .vpk files  (Read 16688 times)

0 Members and 1 Guest are viewing this topic.

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
    • Smod: CryLife
[Tutorial] Extracting CSS/Source .vpk files
« on: December 07, 2013, 03:32:29 AM »
EDIT with the release of SMOD Standalone:
This tutorial covers extraction and mounting CSS assets for standard SMOD40aq (steam version)
For extraction of CSS files for "Smod Standalone" please use "CSS addon pack"
http://bsnooch.com/forums/index.php?topic=1360.msg8291#msg8291


Hello.
Because amount of people for which CSS stempipe fix does not work is still growing,
I'd like to post a tutorial how to extract files from .vpk files and make a fake addon/mod.

Let's start:

STEP ONE: EXTRACTION OF COUNTER-STRIKE: SOURCE FILES

1.
First of all you'll need GFC extractor, which can be downloaded here:
http://nemesis.thewavelength.net/index.php?p=26

1b.
Make sure that the your Counter-Strike: Source is in steampipe format
if not, or just to make sure, run it before preforming any other step of this tutorial.

2.
 Extract GCFScape to folder of your choose and run it.

3.
Click on icon of folder with little green arrow, or choose "open" from "file" menu.

4.
Now navigate to your CSS installation directory
Typically: "C:\Program files\Steam\steamapps\common\Counter-Strike Source\cstrike\"

5.
After that, select "css_pack_dir.vpk" and click "open"

6.
Extract whole "materials" folder to a your temporary folder(anywhere)
 either by clicking RMB on the desired folder (materials)
 or by just simply dragging this folder to your temp. storage (most likely, desktop, I DO NOT RECOMMEND THAT)

7.
Repeat step 5 and 6 but with models and sounds folders

7b.
Tip for knowing what folder to extract:
generally every folder under cstrike, please note that only folders require extracting,
DO NOT EXTRACT ANY FILES FROM UNDER CSTRIKE HEADER/FOLDER

8.
 When you'll have all necessary files extracted, it time to create fake addon/sourcemod




PART TWO: CREATING FAKE SOURCEMOD/SMOD ADDON

1.
 Create a folder for you newly extracted files inside "sourcemods"
( Typically: "C:\Program files\Steam\steamapps\sourcemods\" )

1b.
 Name the folder properly, something like CSS_files or similar
( So you know what's inside, and you don't delete it accidentally, so avoid naming stuff like "asdf123123" and shit)

2.
 Put all the extracted files into your freshly created "CSS_files" folder

2b.
 Tip: don't dump everything blindly into the folder, the "CSS_Files" should contain at least these folders:
"Materials"
"Models"
"Sounds"

3.
 Now, after everything is in place, go to your SMOD folder and open gameinfo.txt

4.
 And add these lines at the bottom of the "SearchPaths" header:

Code: [Select]
Game "|gameinfo_path|..\..\common\Counter-Strike Source\cstrike"
Game "|gameinfo_path|..\CSS_files"
REMEMBER TO CHANGE THE NAME OF "CSS_Files" TO THE NAME OF YOUR FOLDER
(the one with extracted files in sourcemods)

EXAMPLE OF WHOLE GAMEINFO:
Code: [Select]
"GameInfo"
{
game "SMOD: Crylife"
title "SMOD: Crylife"
title2 "1.6.7.5 bodyg."
developer   "Pepsifan04,The SMOD Author, help and moral support from Dev.muffin and BSnooch"
website "http://devmuffin.tumblr.com/"
"icon" "icon"

nodifficulty 0
nocrosshair 0
nohimodel 0
nomodels 0

FileSystem
{
SteamAppId 215 // This will mount all the GCFs we need (240=CS:S, 220=HL2).
ToolsAppId 211 // Tools will load this (ie: source SDK caches) to get things like materials\debug, materials\editor, etc.

SearchPaths
{
Game |gameinfo_path|.
Game hl2
Game "|gameinfo_path|..\..\common\Half-Life 2\hl2"
Game "|gameinfo_path|..\..\common\Half-Life 2 Deathmatch\hl2mp"
Game "|gameinfo_path|..\..\common\Counter-Strike Source\cstrike"
Game "|gameinfo_path|..\CSS_files"
}
}
}

ADDITIONAL INFO FOR GEEKS:
First line (or 5th in my case) points to css scripts/configs/maps, that's because they're not included in .vpk
and the second one points to extracted css files

I'm hoping that this tutorial will prove itself useful for some users.
Telling me what's wrong and where I've a mistake helps me in improving the quality of my tutorials, Thanks.

EDIT: this tut is little "bald" due to lack of screenshots, I simply can't afford to upload them right now...

« Last Edit: August 17, 2014, 12:46:51 PM by Pepsifan04 »
DROP DATABASE bsnooch

Offline saintversa

  • *
  • +1% chance to make useful post
  • saintversa has no influence.
Re: [Tutorial] Extracting CSS/Source .vpk files
« Reply #1 on: December 07, 2013, 07:46:14 AM »
im on gcfscape, but i cant locate "css_textures_dir.vpk"

im in C:\Program files\Steam\steamapps\common\Counter-Strike Source\cstrike\

Offline Nigbone

  • *
  • +1% chance to make useful post
  • Nigbone has no influence.
Re: [Tutorial] Extracting CSS/Source .vpk files
« Reply #2 on: December 07, 2013, 08:00:02 AM »
css_pack_dir has everything in it, extract models materials and sound folders out of there
also this fix did not work for me

Offline Nigbone

  • *
  • +1% chance to make useful post
  • Nigbone has no influence.
Re: [Tutorial] Extracting CSS/Source .vpk files
« Reply #3 on: December 07, 2013, 08:05:18 AM »
Never mind, got it.

Offline saintversa

  • *
  • +1% chance to make useful post
  • saintversa has no influence.
Re: [Tutorial] Extracting CSS/Source .vpk files
« Reply #4 on: December 07, 2013, 08:22:46 AM »
i finally fixed it lol thank you, i extracted the models, materials and sound into a css folder in the source mod folder and used the codes you provided and smod is completely fixed now thank you =]

Offline MasterManiac

  • *
  • +1% chance to make useful post
  • MasterManiac has no influence.
Re: [Tutorial] Extracting CSS/Source .vpk files
« Reply #5 on: January 24, 2014, 04:57:31 AM »
Thanks so much for the tutorial. I registered just so I could voice my appreciation. :-) Following your excellent step-by-step instructions, I managed to finally correct those annoying missing models, textures, and sounds.

I do have to ask, though: do I have to do something similar to the original Half-Life 2 assets? I'm trying to play the Half-Life 2 campaign with SMOD Tactical (one of the best mods I've ever played, btw), but the game's scripted events don't seem to be "firing" correctly. For example, the G-Man refuses to speak in the opening sequence, and the rebel and his Vortigaunt cohort fail to acknowledge Freeman's presence in Route Kanal. Enemy behavior seems to function just fine, though, although obvious scripted actions - such as the CP kicking the explosive barrel down the stairs in Route Kanal - don't occur.

Also, attempting to play a Counter-Strike Source "Hunt" map in Tactical resulted in me spawning outside of the map looking down, which of course killed me instantly, with the game inanely informing me that my mission was failed.  ;D

Is this a known problem, or could it be because I screwed something up following the instructions? Also, I hope this is the proper place to ask. It's not really that big of a deal, because I could really just fool around in the instant action maps for an eternity, but it'd be nice to know what I did wrong. :-)

Offline Comrade

  • *
  • *
  • +11% chance to make useful post
  • Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...
Re: [Tutorial] Extracting CSS/Source .vpk files
« Reply #6 on: January 24, 2014, 03:56:17 PM »
Thanks so much for the tutorial. I registered just so I could voice my appreciation. :-) Following your excellent step-by-step instructions, I managed to finally correct those annoying missing models, textures, and sounds.

I do have to ask, though: do I have to do something similar to the original Half-Life 2 assets? I'm trying to play the Half-Life 2 campaign with SMOD Tactical (one of the best mods I've ever played, btw), but the game's scripted events don't seem to be "firing" correctly. For example, the G-Man refuses to speak in the opening sequence, and the rebel and his Vortigaunt cohort fail to acknowledge Freeman's presence in Route Kanal. Enemy behavior seems to function just fine, though, although obvious scripted actions - such as the CP kicking the explosive barrel down the stairs in Route Kanal - don't occur.

Also, attempting to play a Counter-Strike Source "Hunt" map in Tactical resulted in me spawning outside of the map looking down, which of course killed me instantly, with the game inanely informing me that my mission was failed.  ;D

Is this a known problem, or could it be because I screwed something up following the instructions? Also, I hope this is the proper place to ask. It's not really that big of a deal, because I could really just fool around in the instant action maps for an eternity, but it'd be nice to know what I did wrong. :-)

1) Find a cfg file called autoexec.cfg. It should be in SteamApps/sourcemods/<smod dir>/cfg. If you can't find the file, make on.
2) In the autoexec.cfg, insert a line called ai_norebuildgraph 0. Doesn't matter where.
3) Reload map, post results.

If the problem persists, then it could be a LUA issue, but that's very unlikely.

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
    • Smod: CryLife
Re: [Tutorial] Extracting CSS/Source .vpk files
« Reply #7 on: January 25, 2014, 12:28:48 PM »
Thanks so much for the tutorial. I registered just so I could voice my appreciation. :-) Following your excellent step-by-step instructions, I managed to finally correct those annoying missing models, textures, and sounds.

I do have to ask, though: do I have to do something similar to the original Half-Life 2 assets? I'm trying to play the Half-Life 2 campaign with SMOD Tactical (one of the best mods I've ever played, btw), but the game's scripted events don't seem to be "firing" correctly. For example, the G-Man refuses to speak in the opening sequence, and the rebel and his Vortigaunt cohort fail to acknowledge Freeman's presence in Route Kanal. Enemy behavior seems to function just fine, though, although obvious scripted actions - such as the CP kicking the explosive barrel down the stairs in Route Kanal - don't occur.

Also, attempting to play a Counter-Strike Source "Hunt" map in Tactical resulted in me spawning outside of the map looking down, which of course killed me instantly, with the game inanely informing me that my mission was failed.  ;D

Is this a known problem, or could it be because I screwed something up following the instructions? Also, I hope this is the proper place to ask. It's not really that big of a deal, because I could really just fool around in the instant action maps for an eternity, but it'd be nice to know what I did wrong. :-)
I'm glad it was useful to someone ;)

To fix your first problem you need to:
open "half-life 2 2007 base content.gcf" (usually located in C:\Program Files\Steam\Steamapps ) with GCFScape and extract folder named "scenes" to your smod directory, also part responsible for handling HL2 in gameinfo.txt must look like this
(whole thing should be just under  Game  |gameinfo_path|. )
Code: [Select]
Game hl2
Game "|gameinfo_path|..\..\common\Half-Life 2\hl2"

In addition to that, your "addcontents.txt" (YOURSMODHERE/scripts ) should be all commented out:
you can copy-pase.
Code: [Select]
"Additional contents list"
{
"Contents" {
// "LostCoast" {
// "path" "lostcoast"
// "id" "340"
// }
// "hl2" {
// "path" "hl2"
// "id" "220"
// }
// "HL2MP" {
// "path" "hl2mp"
// "id" "320"
// }
// "HL1:S" {
// "path" "hl1"
// "id" "280"
// }
// "CS:S" {
// "path" "cstrike"
// "id" "240"
// }
// "DOD:S" {
// "path" "dod"
// "id" "300"
// }
//        "Episode 1"{
//        "path" "episodic"
//          "id"   "380"
// }
}
}



As for the second problem:
EDIT: SMOD standalone fixes the lua issue, you can download it here:
http://bsnooch.com/forums/index.php?topic=1360.0


Quote from: old post
It's not your fault (somehow unfortunately :/ ).
LUA is broken in all SMOD-s because of SDK2006 update, and because of that some CSS maps won't work :/
( LUA is the thing responsible for SMOD added objectives and other stuff)

As for now there's only one solution and it's unconfirmed that it works for everybody :
http://bsnooch.com/forums/index.php?topic=1272.msg7629#msg7629
« Last Edit: April 12, 2014, 09:27:16 AM by Pepsifan04 »
DROP DATABASE bsnooch

Offline Cosmonaut

  • *
  • +1% chance to make useful post
  • Cosmonaut has no influence.
Re: [Tutorial] Extracting CSS/Source .vpk files
« Reply #8 on: April 02, 2014, 09:27:46 PM »
Getting an error upon starting SMOD; "Unable to load surfaceproperties.txt" And it repeats with "surfaceproperties_manifest.txt"