View Full Version : [SOURCE] Help with first mod.
jngrow
February 3rd, 2009, 11:18 PM
Well, I just wanted to see if I could make a simple mod... I can't.
I open Source SDK, Create a Mod. C:\Test is the directory, test is the mod name. I make a simple map in hammer, save it in the mapsrc folder. Compiles fine, I even save it in the HL2:EP2 folder and run it in EP2 to make sure the map works, and it does. So, everything looks fine. I run my mod from the games menu, and get this error:
"Could not load library client".
I have no idea what to do. I wanna start putting custom models into Source, but it's not happening for now. Solutions to this? Was there a step I didn't perform correctly when creating the mod?
E: After much googling, I found my solution. But seriously, fuck this. It seems every tutorial I look at tells me to put shit in directories that aren't there, there are like a million folders that have almost the same name but in two different places... it's too much for now.
Bodzilla
February 4th, 2009, 01:27 AM
yeah the same thing gives me the shits with Gmod.
legionaire45
February 5th, 2009, 01:45 AM
You need to compile/debug the code in Visual C++ Express (http://www.microsoft.com/express/vc/) in order to get your client and server dll's first. Those DLL's basically hold all the game specific code (eg. everything that handles the game itself and not the basic engine functions). A little bit more difficult than other games, but this is where Source is most powerful; you can change a whole lot of shit around.
It's not very difficult to get it up and running, just follow what they say here (http://developer.valvesoftware.com/wiki/Installing_and_Debugging_the_Source_Code) for whatever compiler you are using.
I know that the multiplayer SDK is missing some VGUI textures from the stock install, so if you need those you can try and grab them from HL2: Deathmatch's textures directory or you can rip them from a game/mod using GCFScape or whatever.
If you just want to throw some models into the game you can always just put them into an existing game/mod and make a map with the new model in it; if you want to add any kind of extra functionality (eg. make an entirely new weapon like a grappling gun or something) than you'll need to make a mod.
If you need any other kind of help, the official docs are here (http://developer.valvesoftware.com/wiki/SDK_Docs); I can also try and give you a hand but I'm not particularly amazing with the engine yet myself.
jngrow
February 5th, 2009, 11:44 PM
Yeah I know the official docs, they've helped me a lot, but even when I followed the "my first mod" tut, then asked me to do some compiling stuff i was just like... nah.
Thanks though.
legionaire45
February 6th, 2009, 01:06 AM
Source is intimidating at first, but don't get put off by something that simple. Lol, if someone like me can figure it out I'm sure you can.
Again, if you just want to throw some models ingame, just use an existing game. The only time you should have to touch the Code is when you want to add a feature or tweak with the UI or other coded/scripted features.
jngrow
February 6th, 2009, 02:14 AM
Source is intimidating at first, but don't get put off by something that simple. Lol, if someone like me can figure it out I'm sure you can.
Again, if you just want to throw some models ingame, just use an existing game. The only time you should have to touch the Code is when you want to add a feature or tweak with the UI or other coded/scripted features.
I need like, a guide to the HL2 folder hierarchy, and where I should put shit. Thanks though, I'll stay away from the mod thing for now.
legionaire45
February 6th, 2009, 08:17 PM
Welp, here's how I have it set up:
.../steamapps/UserName/sourcesdk_content/mn/
"mn" can be anything you want, but it's best if it's short or an acronym or something, as long as it is descriptive enough of your mod.
By default, it sets this directory to something like C:\MyMod but you can have it wherever you feel. I find that putting it in Sourcesdk_Content makes navigating around the folders a bit easier.
This is where I installed my sdk stuff. This is where you put all your content before you throw it into the compiling apps. Folder names are fairly self explanatory; mapsrc is where .vmf (valve map file) files go, materialsrc is where all your textures go and modelsrc is where all your models go. src is where all the code is kept.
.../steamapps/SourceMods/ModName/
This is where all the final compiled art assets are placed after compilation. This is also where all the scripts and the client and server dlls are located. When you release the mod, more or less you pack this folder up into a installer file or whatever, test it on another (clean) computer and see if it works. Then you release.
Other valve games follow this format; Counter Strike is "cstrike" in sourcesdk_content, TF2 is "tf" or something like that, etc. The only exception is that retail games keep their files in ".../steamapps/UserName/GameName/"
I'd recommend just making shortcuts to each of the folders you need.
EDIT: Moar. (http://developer.valvesoftware.com/wiki/Source_SDK_Files_and_Directory_Structure)
Limited
February 7th, 2009, 10:38 AM
Damn you, you got me interesting in making a mod :P
But yeah the engine is very picky with directories.
jngrow
February 9th, 2009, 02:50 AM
Thanks a lot, you saved me a good amount of time.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.