Importing HL2 Weapon Skins and models into Black Mesa?

I thought It could be beneficial to explore this topic with people far more knowlageable than myself.

Basically there are alot of skins available for Half Life 2 models that I would perhaps like to use in Black Mesa.

But there are issues with porting over models and their animations apparently because of.

1, The field of view is completely different

  1. The Hands model is rigged differently

  2. The Physics are server side (That’s why grenades don’t act like they do in Half Life 2)

Now seeing as the Magnum and crow bar are using the same model from Half Life 2 then surely it is possible to port over the weapon models? and use either originals or re-skins

Also is it possible to port over the hands model from Half life 2 out of curiosity and will this work with the current animations that are in place in Black mesa such as the glock idle animation and the crossbow animations.

Basically I just want to know how it can be done or if it can be done… There is a lot of good skins out there already available and would be a shame to lose these as a resource for re-skining weapons or reverting to Half life 2 defaults.

can you force physics client side via a cvar and see what effect this has on the game?

anyone know about this stuff?

you can adjust the viewmodel fov for each weapon separately, in the script file

can you tell me how to do this?

what is the command?

and does it display correctly?

The weapon’s script files are here: ‘\SteamApps\sourcemods\BMS\scripts

Each file should be named accordingly; for the crowbar, open the file ‘weapon_crowbar.txt’ with a text-editor.


To change the FOV, just add the line below to the script file.

Add this line:

fov "{VALUE}"

Note: Replace {VALUE} with any (valid) value (55 or 75 or 95, ecetera).

Reference (weapon_crowbar.txt):

WeaponData
{
	printname	"Crowbar"
	bucket		"0"
	bucket_position	"0"
	item_flags	"0"
	playermodel	"models/weapons/w_crowbar.mdl"
	viewmodel	"models/weapons/v_crowbar.mdl"
	weight		"0"
	anim_prefix	"crowbar"
	fov "65"

	SoundData
	{
		melee_hit	"weapon_crowbar.Melee_Hit"
		melee_miss	"weapon_crowbar.Melee_Miss"
	}

}

The default setting should be (correct me if I’m wrong, of course):

fov "54"

To reset it back to default, just remove the line, you previously added, entirely.

so importing from HL2 the FOV is 65 to correct this…

Will this give me the animations from HL2 for the crowbar?

after importing the .mdl and associated files.

*** UPDATE ***

I now have an invisible crowbar

why is the crowbar nor rendering from HL2 in BMS it is the same model?

And the arms jave disappeared for this too?

Does anyone know how to import the HL2 animations only so they render

Ok going to bump this one…

Importing the crowbar .mdl from Half life 2 in Black Mesa source made the weapon and the hands invisible.

Why is this and no matter what FOV number I put in the script.txt for the crowbar it would not appear in Black Mesa.

If it is the same model why does it now not render?

Is it to do with the camera set up at the point of creation in the .mdl?

Honestly I don’t understand this at all but know skin swapping is easy but this is a bit more complicated

I’m trying something right now…

If it works, I’ll take some screenies or make a video (in case I manage to change the animations) and a mini-guide, but that’s just wishful thinking, as of now.

Will report back once I’ve accomplished anything (useful).

Thanks for trying this out… I am really lost on this

I forgot to copy the original .mdl so have to re-install BM now… Nevermind though

Basically there has to be a formula to porting over the weapons from HL2 to Black Mesa but I think the Model needs decompiling from HL2 then recompiled under Black Mesa Settings?

Basically I would like to see a MOD that can bring these settings

1 Better Animated Crowbar (or Original HL2 or other well animated crowbar)
2.Shotgun with a stock
3.Improved MP5 animations
4.Half Life 2 Grenades but reskinned
5. Headcrab physics the same as HL2
6. Crossbow zoom/scoped the same as HL2 but with BM overlay
7. Relevant sound and skin improvements
8. Change the crosshair to Half life 2 Crosshair

This would be the dogs if these things can be changed

Yeah, I tried de- and re-compiling it both either way (using StudioCompiler), but neither seemed to work…

(The viewmodels are completely invisible.)

Maybe I am doing something wrong here?

It could have something to do with the way the .qc file’s set up.

Anyway, I’ll try it again, while paying attention to what I actually do, then report back with the results.

Do you know anything about Changing the physics properties of npc_headcrab and grenade_phy

Basically they are now server side where as in HL2 they were client side… Is there a command that can change this in the scripts for grenades and headcrab classic?

I assume the same scaling settings have been applied to npc’s also? or can it be a straihjt swap on this to change the physics info?

Some suggestions of models to use

Crowbar original

shotgun by lamarr
https://gamebanana.com/hl2ep2/skins/47835

Grenade by Kaskad MKII Grenade

Or even swap out the MP5 for the M4 or import the AR2 with a M4 Skin

Obviously getting there permission first if a pack could be made

Ok, so I managed to get the HL2 crowbar into BMS, including HL2’s animations, although it looks a bit weird (in terms of surface properties - it looks like some sort of plastic).

Adjusting the fov via the script file did work, as well.

I’ll take a look at the .vmt files and see if I can somehow change the overall ‘plastically’ looking textures.


EDIT (08 : 35 AM): Imported the shotgun (SPAS-12) model you posted into BMS, including it’s materials and sounds - it seems to be working, but the muzzle-flash is missing, unfortunately.

If you want to try it yourself, don’t forget to rename the sound files (.wav) to the corresponding files BMS uses (based on hearing), before copy and pasting or moving them into BMS’ folder.

Listen to them first, then rename them, if they ‘match’.


Also, would you mind telling what exactly you are trying to accomplish by changing the physic’s properties (are you trying to use HL2’s physics, etc.)?

Was it a straight copy for the shotgun or did you have to decompile and recompile adjusting this?

As for the Crowbar seems like the issue is with the way the hands are rigged… Texture problems might be to do with DX level or HDR / reflective surface perhasps? missing the hdri environment As for the hands sounds like it would need to be rigged to the animation.

the npc headcrab physics stuff… The Headcrab now does not behave the same under physics properties and is forced server side… I want to bring this back over to client side… Wondered if it can be done either in the model properties or .phy or a script file with a command

This also seems to apply to genades and wondered if it can be forced client side like the headcrab see what effect it has?

Basically the threshold is higher on server side physics in relation to damage and it’s physics effects

got any pics?

Just a copypasta (from the ‘correct\folded’ archive).


Sorry, can’t help you with this one, as much as I’d like to. :frowning:

(It’s probably handled in a hardcoded way and thus takes its instructions from one of the .dll files [client.dll or server.dll would be my bet, I could be wrong, though])

I could be wrong on this one, so if you want to try something out - copy and paste ‘headcrabclassic.phy’ from the ‘source models.gcf’ GCF archive into BMS’ models folder, then rename it to ‘headcrab.phy’ and see if it does anything useful.


Yes, just one (using the imported SPAS-12 model), though.

Shotgun Screenshot (using ‘Lamarr’s Spas 12 Redux’):

Note: Ignore the text in the top left corner, forgot to wipe the HUD from unnecessary things, before taking the screenie (apologies for that)…

Note 2: The image is slightly edited, since it appeared relatively dark.


The shotgun seems to be working just fine, even the sounds do, but as I said before - the muzzleflash is missing entirely.

ok thats interesting… You changed the FOV for the shotgun in the script I would imagine what number did you use if so?

I am going to try to replace the .phy file for the headcrab and some other stuff see what happens now I have ruined my crowbar model may aswell use this install to mess about and start from scratch again when I have figured stuff out.

wonder why the muzzle flash is gone it is a sprite set to a co-ordinate so perhaps the co-ordinate needs changing?

Could you upload a pic of what the crow bar actually looks like?

I have a friend who does animation professionally and going to try to persuade him to do a reanimation on the crowbar as a portfolio project… Perhaps he will agree but he will have to want to do it so can only try to nudge him and try to persuade him it would be a good idea. Fingers crossed

I am sure he can rig it and improve it… Example of his work on this link

https://vimeo.com/38433740

I am sure you are right about the .dll I wonder if you can force a specific entity client side though or the infomation is in the .phy will soon see :slight_smile:

EDIT (02:10 PM):

Here, have a screenshot:

Note: Using HL2’s model and textures, as well as not specifying a custom fov value.

Note 2: Turned up the brightness again, just to make it much more visible.


Thought I didn’t touch the fov value at first, but as it turns out, I did (must’ve edited it previously, to test something):

fov "50"

As far as I have seen, while experimenting with different assets of Black Mesa, the muzzleflash is handled by the particle system (.pcf file type).


Just a second, I’ll have to revert the fov back to default, since I put it all the way up to 270 (causing the viewmodel to be upside down), just to see if the import did work.


Good luck on that one. :slight_smile:

What is weird about this is it rigs the hand to the mini crowbar because it is the same model so I gues if you specify a custom fov then does the hand grow in size also?

I cannot understand why It did not work for me is there any other files apart from Model and the materials forgetting the sound that i need to import over?

Thanks alot for all this help Jen I really appreciate it.

Changing over the .Phy file does not seem to have any unusual effects I think it does make physics a bit more resposive but I have edited my config so going to revert back to defaults and give another try now

*** UPDATE ***

Replacing the .phy of the headcrab from HL2 puts it’s physics back client side

So probably safe to assume that this is the same for the world model grenade so making some headway here

Dare I ask, but where do you take the HL2 files from?

(‘source models.gcf’ and ‘source materials.gcf’ would be the correct answer.)[/SIZE]

You need GCFScape to open and extract from .gcf containers, in case you didn’t know.


EDIT (02:47 PM):

Questions aside, all I did was copy and pasting the files, I previously extracted from the GCF archives, into the BMS folders (’\sourcemods\BMS\materials\models\weapons\v_crowbar’ and ‘\sourcemods\BMS\models\weapons’).

Don’t know why the forum splits the text between v_cr and owbar there, by the way…

Yeah thats what I did but perhaps I did the wrong thing by putting the dx7 model too so if I delete this it might work… Could be somthing to do with it.

The .phy replacement works on the headcrab :slight_smile:

It’s funny how these things are usually a case of constant trial and error, but I guess that’s how you learn new things. :smiley:

so if you change the FOV does this fix the crowbar in the script for size or does it act weird?

Updated*

Ok no if you change the field of view to 54 it looks normal but you lose the blood from the crow bar.

Is this part of the texture? Like a feature set of the texture?

As it is the same model I wonder if only changing the materials to the BMS ones will enable the blood back on the crowbar model?

I have lost these files can you try this one out?

Also I assume the shotgun you put in no longer has blood on it I wonder if this an alpha skin on top or something?

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.