#Hammer++ / HL2 Mod General Assistance

1 messages ยท Page 1 of 1 (latest)

echo dock
#

I have absolutely no idea what's going on here.
I made my first HL2 mod using sdk2013sp, and it shows up on Steam, but when I opened up Hammer++ it looks like this. I've provided a screenshot.

The front menu when I boot the game thru Steam is also bugged. The font for the title is the font for the weapon select menu for some reason, the background is completely black, and the corners of popup windows like the settings menu and the console are black.

Any help or advice would be great! Thanks in advance.

winter urchin
#

did you start up default hammer before installing H++ ?? also click camera and set view to textured

echo dock
# winter urchin did you start up default hammer before installing H++ ?? also click camera and ...

Hey, sorry for the late response.
I was gonna try and run default Hammer real quick because I realized that I in fact had not done that, but then I realized my mod didn't have a fucking .fgd file. So I sorted that out. Then I knew I needed to recompile my mod, since with the addition of the .fgd file came a lot of modifying the code of my mod. But when I went to compile it in Visual Studio, this error message popped up.

#

I checked, and the client.dll file it's looking for is there.

#

What could possibly be the issue here?

echo dock
winter urchin
#

are you trying to start the mod from visual studio ? if you are you should be starting it from the steam/steamapps/commone/sourcemods folder, if not you need to have the mod in steam/steamapps/commone/sourcemods folder,, adding an .fgd file doesn't need you to recompile the code so you didn't need to do that bit , an .fgd is only for hammer so you can put entities into your maps

raven sparrow
# echo dock

You are not compilng it, you are trying to run it

echo dock
echo dock
#

I know, not a great idea in hindsight. I'mma be honest I was just super excited to finally be mapping for my own mod project.

winter urchin
#

if you download the mapbase template that was posted in one of the main channels after unzipping it inside in the template folder you would find every thing you needed to start mapping including mod .dll's you just have to set up hammer to map and edit the gameinfo.txt in the template folder to change the name of the game ,, the 2 lines in the screen shot , you only need visual studio if you want to code new entities or weapons and npc's but being as your still a beginner i would make some maps for a month and get use to hammer then lwhile still mapping slowly pick up the coding half of the hobby

#

if you really must do coding then we can talk more

echo dock
#

I'm used to Hammer. Been used to it. That's why I wanna move on to making a mod of my own. And yes, I do have NPCs I'd like to add.

#

Again, sorry for the late response lol

winter urchin
#

ok so the easiest way is to make a folder on your desktop clone or download the src code into the folder you made , lets call it mod_src , so in mod_src you have you src code with src and game folders

#

in the src folder run the games.bat so you make the games.sln click that and visual studio will set up , in vs change it from debug to release then do a build

#

when the build is finished the mods .dll's are put in the game/ mod_episodic and/or mod_hl2 mod folders

#

because your mod is already in sourcemods folder you re going to want to make a symlink of the bin folder to your mod folder so download this software https://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html then you right click the bin folder and choose pick link source ,, then in your sourcemods/ mod folder delete or rename the bin folder to bin_default then right click in the folder and sleclect drop as and then symbolic link now when ever you rebuild the src code in visual studio the ew changes are linked to your mod and updated

#

when you have finished your mod and ever want to release it or just back it up copy the original bin folder from the game/mod folder to your mods folder ๐Ÿ˜

#

synlinking saves moving things around and renaming thinks so less problems are likly to happen

echo dock
#

Hey, real sorry 'bout the late responses, I don't get notifications from here for some reason.

So am I just gunna have to redo my mod again? Lol. Cuz this is looking like a thing where I'm just gonna have to start from scratch again and follow this whole tutorial thingy you're givin' me. You know?

winter urchin
#

so long as you have your mod in sourcemods folder you only need to do the part where you symlink the bin folder into your mod from the game mod_hl2 or mod_episodic folder

echo dock
#

Right. I wouldn't be surprised if that's where I either fucked up or just didn't do it lol. The tutorial I followed before was kinda shoddy, and I didn't know what I was doing. So yeah. I'll do that ig lol

winter urchin
#

yeah most tutorials have been around for a while and ppl have found other ways of doing it but its not really complecated when you get use to it

echo dock
#

I'm seeing mention of a src folder. Is this where modelsrc stuff would go?

echo dock
#

The highlighted folder is where I've been putting that stuff this whole time lol

raven sparrow
#

Yea thats a pretty normal place to put it

echo dock
#

O ok

#

Ok so I now have instead of a bin folder in obsconded-cargo, (the main mod folder) I have bin_default, with a bin shortcut inside of it along with the Prefabs folder, client.dll and server.dll files, and the halflife2.txt file.

#

Is this correct?

raven sparrow
#

You don't need a bin_default

#

not sure what that is

#

you should just have a bin folder with client and server dlls inside

echo dock
#

This whole thing is a result of me blindly following other people's instructions lol

#

Idk something about making a symlink of the bin folder to my mod folder

#

Not entirely sure what a symlink is, nor what it does, but it seems important.

#

Maybe I'm doing it wrong lol idk

winter urchin
#

does your mod work

#

when you start it from steam does it run

echo dock
#

Well, now that I've done the symlink thing you sent, no lol

winter urchin
#

which folder did you symlink

echo dock
#

The bin folder

winter urchin
#

from which mod

echo dock
#

Mine

winter urchin
#

no i mean the one where the compiled .dll's are

echo dock
#

Oh. Ffs

winter urchin
#

in your origanl mods bin folder you should have these files

echo dock
#

I have like two of those. The client.dll and server.dll files.

#

That's it.

winter urchin
#

ah ok then you need the discord-rpc.dll and game_shader_dx9.dll or you will get that error on start up of the mod

echo dock
#

I mean the mod runs already, it's just hella buggy

#

Like hella buggy

winter urchin
#

buggy how

echo dock
#

Buggy

#

And actual in-game is just a mess of unrefreshed void

winter urchin
#

in your resource folder open with notepad++

#

find client titlefont

#

and change the font to Ariel

#

to Ariel

echo dock
#

k

#

Heyy that worked.

#

Cool

#

However the background it still black

winter urchin
#

look on the VDc and search for chapters and chapter backgrounds

#

that will show you how to have images or maps as backgrounds

echo dock
#

Right. Ok

echo dock
#

rn my bin folder looks like this

winter urchin
#

if your mod loads then you don't need them

echo dock
#

Ah, ok.

echo dock
winter urchin
#

whats in that bin inside

#

is that the symlinked one

echo dock
#

Yup

winter urchin
#

delete that

echo dock
#

Ok..

winter urchin
#

this bin folder

#

rename it bin_old

#

then in put the symlinked bin folder

#

so in the mod folder you have the symlinked bin folder and the bin_old folder

#

now try load your again

echo dock
#

Is this right? Just for confirmation

#

And yes it does run

winter urchin
#

yes

#

ok good

#

so now when you compile new code changes your mod will use the new .dll's that are made

echo dock
#

How do I compile my mod, exactly? I haven't gotten a clear answer to that quite yet.

winter urchin
#

when you click the games,sln visual studio opens yeah

echo dock
#

When I click the "games,sln?" Is that suppose to be a directory?

#

Ohh

#

wait no

#

Yea, VS does open.

winter urchin
#

it should open vs like this

#

set local debugger to release

echo dock
#

It opened like this tho

winter urchin
#

what did you press

echo dock
#

Ok, so when I open games.sln it opens up blank. I click on the Local Windows Debugger thingy at the top, and that pops up.

#

Looks like this on startup

winter urchin
#

click view then solution explorer

#

this is the solution explorer

echo dock
#

Looks like this?

winter urchin
#

ok your is on the other side , you can drag it across or leave it up to you

#

right click what i highlighted blue then click build solution for 1st ime after that then do rebuild solution when you do new code changes

echo dock
#

It says one failed. Is that bad?
(I turned on line wrap so I could fit it all in the screenshot)

#

I'll betcha it's cuz I did Build Solution instead of Rebuild Solution

#

Oh, no it still says one failed. Hm...

winter urchin
#

um

echo dock
#

Yea that's a lot of text. That's like finding a needle in a haystack

#

The rebuild I did I mean

winter urchin
#

do view and open the error tab

echo dock
winter urchin
#

well if your not using the .dll's from mod_hl2 you can ignore that error

raven sparrow
echo dock
raven sparrow
#

wherever your put source sdk 2013

#

in src i believe

echo dock
#

Ohhh yea there it is

winter urchin
#

infact if your just using the episodic .dll's you can unlock these by right click them and click upload project

#

you won't get the errors then

echo dock
raven sparrow
#

Now build

echo dock
#

Build, not rebuild. Correct?

raven sparrow
#

Yes

#

You almost never need to rebuild

echo dock
#

Aight, built. Now wat lol

winter urchin
#

nothing if you got no errors the .dlls are in the bin folder and your mod can use them because of the symlink

echo dock
#

Ok. So here's a question. If I just compiled my mod, were any NPCs I may have added suppose to appear in the Output string when I built the solution?

winter urchin
#

no if you coded the new npc's correct try create them in a map with console command npc_create "name of the npc" and if you did it right it should spwn in the map

raven sparrow
echo dock
#

Cuz I'm gonna be square with ya'll, I didn't make these NPCs myself. I got most of 'em off ModDB lol. I just put the files where it told me to put 'em, and insert code where it told me to insert code. The .cpp files are in my src/game/server/hl2 directory tho

#

Does that sound right..?

winter urchin
#

whats the moddb link

winter urchin
#

ok

#

load up a map and try create them in the level with npc_create npc_cremator and npc_create npc_cguard ifyou did it right they should spawn in

echo dock
#

Yea it super didn't work

winter urchin
#

then you will want to make an fgd edit with @NPCClass base(BaseNPC) studio("models/cremator.mdl") = npc_cremator : "Cremator" [ spawnflags(Flags) = [ 32768 : "[32768] Wander randomly on idle" : 1 ] skin(integer) : "Skin" : 0 : "Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin instead of the default." ] for the npc_cremator and one for cgaurd but i don't know what you add because i can't find any info for it :/

#

did you do sv_cheats 1 first

echo dock
#

Real quick, wtf is going oooonnn lmao

#

This shit's so broken its hilarious

winter urchin
#

whats meant to be there

echo dock
#

A rebel NPC

winter urchin
#

post image of whats in the sym linked bin folder

echo dock
winter urchin
#

hmm

#

load the map with developer 2 does it show any errors

echo dock
#

Listen bro, Idk about you, but I'm prolly just gonna delete what I got rn and download that template you sent a while ago, and work back up from there. That cool?

winter urchin
#

sure

#

you can always refer back to this thread if you need to re-read any info

echo dock
#

Yea. I've started over from scratch like three times already, so this shouldn't be too bad.

winter urchin
#

hopefully not ๐Ÿ˜

echo dock
#

Could you actually direct me to that template you mentioned? You didn't give an exact location before. Not sure where it's at lol

#

I think you said it had MapBase and stuff already and was already ready for Hammer++ and stuff, right?

#

That would be preferable.

winter urchin
winter urchin
#

inside that is a mod_hl2 and mod_episodic set up you choose which one you want

#

i would use the dropbox link one it seems ready to use and not alot of editing needed except mod name

echo dock
#

Is there a template for all the Visual Studio related stuff? You know?

#

Cuz that'd be pretty convenient.

winter urchin
# echo dock Is there a template for all the Visual Studio related stuff? You know?

what do you mean by Is there a template for all the Visual Studio related stuff? You know? you get the src code to make a mod when you clone a repo either the default source sdk 2013 or one of the community repo's like mapbase, maplabs , souurce 2013CE the community versions have fixes and improvements which the default version doesn't, you pick which you want your mod to be based on then work with that, the only templates are mod templates like mapbasse or maplabs which you can get from moddb these already have the fixes and improvements applied so you only need the src code if you want to add extra new entiitties or npc's to your mod

#

there is this https://www.moddb.com/mods/coterminus which is a mod but also a template so mappers can make maps it has npc's and entities reenabled from the beta , i don't know much about it or how far you can use it, like make a totally new mod using it but they group has a discord and you could ask questions in there if you want to make a mod with there mod .dll's

ModDB

Coterminus aims to recreate and re-add cut content into Half-Life 2, as well as provide a platform for those who wish to do the same.

echo dock
#

Yea I meant the src code and stuff. I was just curious if there were templates/prefabs/whatever of it so I could go ahead and be able to add those custom NPCs from before and compile my mod.
After all, I'm literally only doing this to be able to map my own HL2 campaign with HL2 Beta-derived themes and enemies, hence the Cremator, CGuard, Combine Assassin, Mortar Synth, etc. NPCs I was trying to set up.

echo dock
#

Update:
I got the env. lighting working. Don't know how, it just started working again lol.
Still need to set up the src code stuff, but I'm sure that'll sort itself out eventually.

winter urchin
#

read from here again #1192266126986588232 message

echo dock
#

Ok, so I've got the [mod-name]_src folder on my desktop, with the game and src folders in it, each one with its respective directories inside. Is this right?

winter urchin
#

yes

echo dock
#

Ok, what purpose does the game folder serve if I've already got all that in the mod folder thats in my sourcemods directory?

#

Or is it different and I'm just not realizing lol

winter urchin
#

the game folder is where theres basic mod set ups so when you ompile the src the .dll's are put in them so you can use them as your mod

echo dock
#

So upon mod compile, the .dlls will be put in that game folder, which iirc I use a symlink to connect w/ the sourcemods main mod directory, replacing the old .dlls with the ones from the game folder, correct?

winter urchin
#

yeah when you compile the src the .dll's are put in bin folders in mod_hl2 and mod_episodic , so you symlink either the bin folder from mod_hl2 or mod_episodic to your mods folder

echo dock
#

Does it matter which one?

winter urchin
#

depends if you want the mini strider npc and muscle car and better particles for weapons

#

then use episodic

echo dock
#

But if I use episodic, it won't include the stuff from base HL2, will it? I'd kinda prefer to have both tbh lol

winter urchin
#

yes it has hl2

echo dock
#

Oh ok. Never mind then

winter urchin
#

it hl2 with newer things

echo dock
#

I don't seem to have a sentences file in the main mod folder in sourcemods. Where do I put that stuff for those custom NPCs?

winter urchin
#

look in common\Source SDK Base 2013 Singleplayer\hl2\scripts you might have to copy required files to your mod

#

it'll depend if your custom npc's use the sentences file if they do look for games/mod that have them in it and copy it from that game/mod to yours

#

or make your own

echo dock
#

I sent you the Cremator and CGuard NPCs I got off ModDB, right? It's those. You can refer to it if you need.

#

And yea, it's not in either of the game/mod_[episodic/hl2]/scripts directories either.

winter urchin
#

there a scripts folder in that zip and it has a sentences file addition to use

echo dock
#

Which .zip are you referring to..?

winter urchin
#

the cremator and cguard

echo dock
#

Ohhh yea. But it's just an addition. Do I not need the master sentences file first?

winter urchin
#

yes copy it from where i said

echo dock
#

Right, right. From sdk2013sp

winter urchin
#

if its not in the acutal scripts folder it'll be in a vpk you have to exract from it

echo dock
#

Ok, here's what I got rn

#

Anything else to copy over...?

#

Actually, better question; how am I actually suppose to insert the code for the custom NPC into the sentences file? Like do I just paste it at the bottom, is there a format I need to follow.. anything?

#

I'm gonna quit for the night, I've stayed up too damn late already as it is lol. Do respond whenever you get the chance, tho. I'll respond whenever I can.

winter urchin
#

yes copy at the bottom of the sentences file

echo dock
#

So just separate the code for each NPC in the sentences file by one line?

#

Like for example:

[0101011110101(line of code)110100111101101]

[101010010101(line of copied custom NPC code)101010111]
[001101011010(line of copied custom NPC code)010010101]```
#

And just repeat that each time I add custom code in?

echo dock
#

Then again it also kinda looks like you're trying to use the selected lines to mark what goes where. Are you implying that the first line of the NPC code should be on the third line below the other code perhaps?

#

Like this?

echo dock
#

Hey, new issue.
I went ahead and tried to implement the NPCs based off the knowledge I do have about it, and I really thought I did it all right, but the NPCs don't show up in game at all. Can't spawn them with the npc_create [npc name] command in console.

#

Not sure what I did wrong...

winter urchin
#

does the site explain how to set up the npc's because you don't just add the .cpp files to the src and compile you also have to edit the hl2_gamerules.cpp and .h file so they have an ai relationship , adding new npc's is not where you should start if you've never done coding before especially with source , try googling for tutorials on how to implement npc's you might find ones on the npc_houndeye and bullsquid which will help when you when you cometo add others

winter urchin
#

so i went back to the moddb page and the op posted some instruction to do but hasmentioned about adding npc to the fgd try this and see if it works

winter urchin
echo dock
#

@winter urchin (Sorry for the ping)
Hey, just making sure, the .dlls for my mod after compiling are in the C:\Users\[PC NAME]\Desktop\obsc-carg_mod-src\game\mod_episodic\bin directory, which is symlinked to the mod folder in my sourcemods folder, correct?

#

(Being symlinked to the mod folder effectively allowing the bin folder in the src directory to act as the bin folder in the sourcemods mod folder remotely. (Very nifty and cool.))

echo dock
echo dock
#

So once again, no dice.

winter urchin
#

you'll know you installed them right when you can see them in the solution window

echo dock
#

Yea, I think it shows up lol.

#

Yea I neglected to add npc_cremator.h, only adding npc_cremator.cpp.

#

I've done that now tho.

#

Looks like this now:

#

Did the same thing with the Combine Guard NPC:

#

I also did the Combine Assassin, but I couldn't get all of it in one screenshot.

#

Lol speaking of Combine Assassin.
After rebuilding the solution:

#

Not 100% sure what to do here.

winter urchin
#

double click this and it'll open the .cpp file and go to the error part screen cap that

winter urchin
#

did you also add the npc_assassin.h file

echo dock
#

Not sure what I'm looking for here, but:

winter urchin
#

ok 1st you need to rearrange your tabs so you can output and errors in 1 window and the code in another like this

winter urchin
#

i just comment that bit out with /* */

echo dock
#

Ok, and just to be sure, to comment out a single line, you just put // at the beginning of it, right?

winter urchin
#

yeah but to comment out multiple lines do /* at the start and */ at the end

echo dock
#

Yea. Got it.

winter urchin
#

๐Ÿ™‚

echo dock
winter urchin
#

711

echo dock
#

It'd make it a lot easier than just scrolling through and meticulously scanning every line for the code lol

winter urchin
#

click the error and it'll jump to the line

echo dock
#

Aight, this is what I got rn.

#

Not sure what that error on line 1 is. I clicked on it, and it just took me to line 1 and highlighted the first slash on the header thingy. Should I just ignore it?

winter urchin
#

ok now compile

echo dock
#

Ok.

winter urchin
#

ignore that

#

error

echo dock
#

K, and just to make 100% sure, I'm suppose to be clicking Rebuild Solution, not Build Solution, right?

winter urchin
#

either i do rebuild but build is ok as well

echo dock
#

Aight. I've been using rebuild as well, I just wanted to clarify.

winter urchin
echo dock
#

========== Rebuild All: 10 succeeded, 0 failed, 0 skipped ==========

#

Yippee

winter urchin
#

yay

echo dock
#

Let's see if they show up in-game now lol

winter urchin
#

wheredid you get ur assassin model from

echo dock
#

Yeeaahh about that.

#

Where did you get your assassin model from? Lol

#

I mean hey, pretty sure the hard part's outta the way since it clearly finally showed up in game. So that's cool. I'mma try out the other NPCs real quick as well.

#

Combine Guard works, no missing model for it.

winter urchin
echo dock
#

Ohh. I already have Coterminus installed. Could I just nab the model from there?

winter urchin
#

but you have to use the .cpp and .h file that comes with it or the animations don't work right

#

just drop them where the assassin .cpp .h is in the src folders and rebuild your code

echo dock
#

So the one you used I just gotta put it where you said, recompile, and it should work?

winter urchin
#

yeah there other files like the sound script and stuff but it has a readme file in it

#

if you get the find hint error just do the same thing as you did before comment it out

echo dock
#

So I replace the .cpp and .h files for the Combine Assassin that I have rn with the ones in the file you sent?

winter urchin
#

yes

echo dock
#

Something a little strange with the Cremator NPC, it's Immolator attack doesn't seem to do any damage. It makes the screen go red and the player makes sounds like they're being damaged, but the health isn't actually going down. Not sure why.

#

I also think I need a new .fgd file with all the NPCs in it to spawn them in Hammer. Is there any way to just copy and paste the code for the NPCs into the .fgd I already have?

winter urchin
echo dock
#

I have like one or two other NPCs I was planning on implementing after I figured out how, tho. How would I add those into the .fgd?

winter urchin
#

you'll have to mods that have them in it so you can copy the fgd entry into your fgd

echo dock
#

Uhh...
Elaborate.

winter urchin
#

that cotumus mod has a few beta npc's you can check its fgd

#

the fgd in a text file you can open in notepad++ and read it

echo dock
#

Ok, that covers those NPCs. Here are the other NPCs that I intended on implementing:

winter urchin
#

ok will in a min

echo dock
#

๐Ÿ‘

winter urchin
#

yeah if you do like what you have been you should get them to work

echo dock
#

I just put 'em in the general area of other NPCs in the file. Figured that'd be good enough to work.

winter urchin
#

it should

echo dock
#

Alright. I'mma test this out, and if it works, I'll just apply the steps I took for those to those other NPCs I was planning on adding. (The ones I sent you in the npcs.zip file)

winter urchin
#

๐Ÿ‘

echo dock
#

Oh yea, and while you're here, thoughts on this...?
#source-1-dev message

winter urchin
#

you need a trigger_changelevel and a trigger_transistion and they must use the same info_landmark with the same name

#

the trigger_changelevel has 2 map name you put in it the new one and the one you changed from

#

in both levels

echo dock
#

So basically all entities involved in the level transition gotta be named the same thing.

#

In both maps.

winter urchin
#

no just the landmark entity has to be the same in level change and transition entities

echo dock
#

Hey, so turns out reinstalling Windows to fix my issue with not being able to make new folders is gonna take waaaaay longer than expected, so I just set all my stuff back up and I'm back to working on the mod again.

Basically why I'm here is cuz I'm adding a sort of reimplementation of the dysfunctional npc_missiledefence entity, and the folder I downloaded w/ all the stuff in it has a subfolder in it named "uncompiled files," and its full of .SMD files and a .qc file. What do I do with these?

#

The rest of the files and stuff I know where to put, it's just this one folder that's kinda confusing me.

#

Oh yeah there's also two files organized into the folder with all the stuff relating to the model in it named NewMissileDefence.MAX and UV map.tga. No idea what to do with these, either.

winter urchin
#

in ur mod folder make a model_src and materials_src folders in the model_src folder you can put the .smd's and .qc and in the materials_src folder put .tga r any image format

#

the .MAX file can go in model_src too

echo dock
#

I have a modelsrc folder. Guess I'll have to make the materialssrc folder.
Can I name it that? Or does it like need the underscore? Cuz the modelsrc has worked so far, can't think of any reason why materialssrc wouldn't work.

winter urchin
#

you can name it what like so long you know what in it

#

modelsrc and materialsrc are only for holding things the mod/game doesn't use them

echo dock
#

Ah I see. Ok

echo dock
#

Just to make sure, any modifcations I do in the sourcemods mod folder does not require a recompile of the mod, correct?

winter urchin
#

no , if you add new models ,materials, sounds etc then you don't need to recompile the src code , you do that if you create new npc's or entities

echo dock
#

Right, yeah. Just wanted to make sure.

echo dock
#

Hey, so issue with the Cremator NPC.
I've had this issue since I first implemented it, but I didn't really consider it a priority 'till now. So uh yeah here we are.

Basically when the Cremator attacks the player with its Immolator, the player doesn't take any real damage. Elaboration;
The player seems to show signs of being damaged, (screen flashing red, hurt sfx) but for some reason, the player's health doesn't actually go down any.

echo dock
#

I'm not super concerned about it, since it's prolly gonna be a while until I really implement any combat involving the Cremator NPC. Until then he's mostly a fancy animated setpiece lol. But I do really wanna have the player fight one at some point. So a fix will be necessary eventually.

echo dock
#

Hammer++ / HL2 Mod General Assistance

#

(Changed the title since we're not really talking about Hammer++ specifically anymore lol)

winter urchin
#

i think this is part in the code, it does say it doesn't take damage i guess it just kills you

#

maybe changing the value from 0 to 20 will give 20 damage every second not really sure so i might be wrong :/