Valve Source Code 2013 Tutorial (Episode 0.5/1): Debugging the Code and Coding Console Messages

Ойындар

Hello everyone and welcome to a new (probably short) series of videos I do involving the source code from Valve for Half-Life 2, and some guides on how to do stuff with this code. In these episodes, I go over how to debug the 2013 source code in Visual Studio 2013 (even though I said I wouldn't do this!) and demonstrate how to output messages to the developer console from within the code. There may be background audio disturbances and the video may not necessarily relate to what I'm saying, I apologize for any inconvenience this causes! Please let me know what you think and see you for whatever I decide to do next, thanks for watching!
Tutorial Basis: developer.valvesoftware.com/w...
and:
developer.valvesoftware.com/w...
► Follow me on Twitch here: / themaster974streams
► Follow me on Twitter here: / thethemaster974
► Subscribe to my stream archive channel here: / @themaster974streams

Пікірлер: 46

  • @HyProDuxyMusicHandle
    @HyProDuxyMusicHandle2 жыл бұрын

    this is so helpful, thank you!

  • @TheMaster974

    @TheMaster974

    2 жыл бұрын

    Thanks for the comment, glad you found the video helpful!

  • @Nebula_Protogen752
    @Nebula_Protogen7528 ай бұрын

    How do I debug the Multiplayer Version? What do I select for the command path?

  • @TheMaster974

    @TheMaster974

    8 ай бұрын

    You would do pretty much the exact same thing as I mentioned in this video, however change Singleplayer to Multiplayer (so the Command and Working Directory paths point to where Source SDK Base 2013 Multiplayer is installed) and change the path to your mod in the Command Arguments section to the directory where your mod is located.

  • @maksimputikov4833
    @maksimputikov48339 ай бұрын

    Unhandled exception at 0xE55AB6D4 in hl2.exe: 0xC0000005: Access violation executing location 0x00000000. What can it be?

  • @TheMaster974

    @TheMaster974

    9 ай бұрын

    I'm not sure, if you're using the Singleplayer code, did you opt into the upcoming beta for Source 2013 Singleplayer on Steam?

  • @still_live228
    @still_live2289 ай бұрын

    hi, i have problem with debugging, it says there is no captoincompiler.exe at src\utils\captioncompiler\debug, there is only captioncompiler.exe.recipe, when i remove recipe it changed back, what i need to do?

  • @TheMaster974

    @TheMaster974

    9 ай бұрын

    I think the captioncompiler project needs another project to be built first in order for it to build properly, so simply building the solution again should solve the issue. I think you also need the sapi51 folder (as mentioned at 6:23). However, this project isn't really important concerning Source modding, the Client and Server projects are far more important!

  • @unrealactor
    @unrealactor5 ай бұрын

    Hi my friend. How to make model in sfm and export such as model character and import to garry's mod???

  • @TheMaster974

    @TheMaster974

    5 ай бұрын

    I don't deal with Source Filmmaker or Garry's Mod addon stuff, so I can't really help you out with your request. Sorry!

  • @acmayin
    @acmayin Жыл бұрын

    why i can't run the code and i setup source 2013 for visual studio 2019 my mod_hl2 folder more empty than your mod_hl2 folder also my mod_hl2's subfolders too what should i do

  • @TheMaster974

    @TheMaster974

    Жыл бұрын

    That's a difficult question to answer, as it would be ideal to install Visual Studio 2013 Community first, then Visual Studio 2019 later. You have to install Visual Studio 2013 Community to get the right Platform Toolset that allows the code to be compiled. If you updated/upgraded the source code to use the Visual Studio 2019 Platform Toolset, you won't be able to compile it. It's weird like that, you can't just use a newer version of Visual Studio and it works. In regards to the mod_hl2 folder being empty, you can always copy what's in the Source SDK Base 2013 Singleplayer\Multiplayer/sourcetest folder. You can get a full Visual Studio 2013 Community installer from here: archive.org/details/en_visual_studio_community_2013_with_update_5_x86_dvd_6816332 or I can try and supply a minimalist install. Or use the Community Edition version of the source code: github.com/Nbc66/source-sdk-2013-ce

  • @acmayin

    @acmayin

    Жыл бұрын

    @@TheMaster974 game solution can compile but if i try to run the code a error message appears and a window opened in visual studio and writes "engine.pdb are not loaded"

  • @juonovom
    @juonovom2 ай бұрын

    Hi there, I have everything (I think), but when I compile the code and open the game, it shows this: ------------ Engine Error Could not load library client. Try restarting. if that doesn't work, verify the cache. ------------ What should I do?

  • @TheMaster974

    @TheMaster974

    2 ай бұрын

    It sounds like the bin/client.dll or bin/server.dll file isn't being found in the folder that you specified in the Command Arguments section of the Properties of the Startup Project, which is why the game doesn't load up properly. All I can really advise is to check to make sure that the path to your mod is correct in the Command Arguments section, plus an appropriate Startup Project is selected i.e. a HL2 project is used if you are dealing with the game/mod_hl2 folder or an Episodic project if you are dealing with the game/mod_episodic folder (if that makes sense).

  • @AlacritousDisparater
    @AlacritousDisparater2 ай бұрын

    i am trying to change the RPG speed on the multiplayer version but changing the #define RPG_SPEED does nothing even after rebuilding with the changes, do you know what could be causing this?

  • @TheMaster974

    @TheMaster974

    2 ай бұрын

    I'm not sure, I was able to change the speed value, compile the solution and the modification was reflected in game. All I can really suggest is to make sure the RPG_SPEED value is getting used in the code properly (it's used in AccelerateThink and IgniteThink inside of a SetAbsVelocity function) and to ensure you are loading into the correct mod when testing.

  • @twilightbob
    @twilightbob Жыл бұрын

    how do i open the game without having to compile it everytime so that i can see the game files not just the source code

  • @TheMaster974

    @TheMaster974

    Жыл бұрын

    Copy/Paste the mod folder to your /Steam/steamapps/sourcemods directory, then restart Steam. You should see your mod in your Steam library, which you can launch into without needing to use Visual Studio debugging, if this is what you mean.

  • @gibsson

    @gibsson

    5 ай бұрын

    @@TheMaster974 how can i do it automatically without copy and paste the mod folder?

  • @pizarol1732
    @pizarol1732 Жыл бұрын

    i'm having this weird error whenever i press local windows debugger. "Unhandled exception at 0x2E1AB600 in hl2.exe: 0xC0000005: Access violation executing location 0x00000000." any fix?

  • @TheMaster974

    @TheMaster974

    Жыл бұрын

    Oh ok, that wasn't what I was expecting the issue to be, I'm glad you managed to resolve it!

  • @merendas2355

    @merendas2355

    Жыл бұрын

    @@TheMaster974 what was the solution? i have the same error

  • @TheMaster974

    @TheMaster974

    Жыл бұрын

    It looks like the reply has been deleted and I don't remember what it said, so I don't really know what to suggest. My recommendations would be to ensure that you have opted into the 'upcoming' beta for Source 2013 Singleplayer and compile the Release version of the code instead of the Debug version. Also make sure your code doesn't have any errors!

  • @volcanowater
    @volcanowater2 жыл бұрын

    how did you get that hl2 folder inside of microsoft visual studio 2013 i dont have have that folder

  • @TheMaster974

    @TheMaster974

    2 жыл бұрын

    It should be there when launching the games/everything solutions, which are created by running the batch files in the sp(or mp)/src folder. However, if you're using a different repo (i.e. 2013 Community Edition), you don't get a HL2 folder. If you acquired the code from Valve's GitHub page, you shouldn't be experiencing this problem. Are you opening a specific code file and not the solution file? That would not load HL2/Episodic folders in Visual Studio. I haven't experienced this issue before, so I apologize for not being able to help much!

  • @volcanowater

    @volcanowater

    2 жыл бұрын

    @@TheMaster974 I figured it out turns out that Im stupid forgot to to enable show all files but nonetheless thanks for the help!

  • @egidiocheerios
    @egidiocheerios8 ай бұрын

    hey mate the game\mod_hl2 folder is not there for me, is that normal? I created it, but nothing runs. is the video still up to date or am i missing something?

  • @egidiocheerios

    @egidiocheerios

    8 ай бұрын

    NVM! I was missing something! I was in the wrong directory :)

  • @TheMaster974

    @TheMaster974

    8 ай бұрын

    Oh right ok, I'm glad you figured it out!

  • @painfulburn
    @painfulburn Жыл бұрын

    where can i get the airex_start map?

  • @TheMaster974

    @TheMaster974

    Жыл бұрын

    From Half-Life 2 Beta, plus using the VMF Updater tool. I would recommend downloading the Mega Build version, as it contains the raw .vmf file for airex_start and includes the VMF Updater tool: hl2-beta.ru/index.php?action=downloads;sa=view;down=245 You can always check out my Hammer Tutorial 13 video for help about using the VMF Updater tool: kzread.info/dash/bejne/noF1ssGmmJvWhKg.html If you don't want to download the Mega Build, you can always get the VMF Updater tool from here: hl2-beta.ru/index.php?action=downloads;sa=view;down=42 and the WC mappack from here: hl2-beta.ru/index.php?action=downloads;sa=view;down=61 Apologies for the long comment, but I hope it helps you out!

  • @clintculpepper670
    @clintculpepper6706 ай бұрын

    do you know how to setup hammer for a source mod or do you have a tutorial on it.

  • @TheMaster974

    @TheMaster974

    6 ай бұрын

    Thanks for the comment and apologies for the late response, I don't have a video about how to do this, however what I would advise in this situation is to open up the Hammer editor and go to Tools->Options, then select "Edit" after the Configuration option, then Add to add your mod as an option, then you will need to add .fgd files that will be useful and select file paths for Game options and Build Programs. Game options would be the path to Source 2013 Singleplayer/Multiplayer and your mod's directory respectively. Build Programs (which is a separate tab) will be the paths to tools like VBSP/VRAD etc. but also where compiled maps will be placed (point it to the mod's maps folder). Hopefully this is enough to help you!

  • @clintculpepper670

    @clintculpepper670

    6 ай бұрын

    @@TheMaster974 thank you so much

  • @ford2177
    @ford2177Ай бұрын

    First-chance exception at 0x00000000 in hl2.exe: 0xC0000005: Access violation executing location 0x00000000. If there is a handler for this exception, the program may be safely continued. I can't fix this error

  • @TheMaster974

    @TheMaster974

    Ай бұрын

    Have you opted into the upcoming Beta if you are using Source 2013 Singleplayer and are you using the correct path to your mod in the Command Arguments section? Those are the only things I can think of that could cause this error.

  • @ford2177

    @ford2177

    Ай бұрын

    @@TheMaster974 Ok I understand, but won't there be a problem if I use visual studio 2022?

  • @TheMaster974

    @TheMaster974

    Ай бұрын

    You won't encounter any issues using Visual Studio 2022, as long as you have Visual Studio 2013 Community installed first (this is needed so the client.dll and server.dll files can be compiled). I talk more about the reasoning for this in this video: kzread.info/dash/bejne/iJanlLR9hd27crA.html

  • @ford2177

    @ford2177

    Ай бұрын

    @@TheMaster974 I can't use 2013 It says the license has expired

  • @TheMaster974

    @TheMaster974

    Ай бұрын

    You don't have to use Visual Studio 2013 Community, you only need to have it installed so you have the correct Platform Toolset that is required for the code to compile properly. Once Visual Studio 2013 Community has been installed, you can use any version of Visual Studio that you want, such as the 2022 version.

  • @itstommymate
    @itstommymate Жыл бұрын

    It says Client.dll is not a valid Win32 application

  • @TheMaster974

    @TheMaster974

    Жыл бұрын

    The project which contains the Debugging Command (i.e. what I outline at 2:00) has to be set as the Startup Project. As I was dealing with the HL2 code, and Client HL2 was the Startup Project, I set the Debugging Command and other stuff there (by right clicking on the Client HL2 project and going to its Properties, then Configuration Properties->Debugging). If you're dealing with the Episodic code, right click on the Client or Server Episodic project and select "Set as Startup Project". This should allow you to launch the mod, supposing you've got the Debugging Command stuff correct. Hopefully this helps!

  • @leaningvr
    @leaningvr5 ай бұрын

    how do you get all of those files in mod_hl2

  • @leaningvr

    @leaningvr

    5 ай бұрын

    i only have 10 things in there

  • @TheMaster974

    @TheMaster974

    5 ай бұрын

    You can create new folders (right-click inside of the mod_hl2 folder and select New->Folder) inside of the mod_hl2 folder, for stuff such as models, particles, sound etc. and get assets from the Source 2013 Singleplayer/Multilplayer install directory that Valve doesn't provide.

Келесі