Every want to make your own Half-Life Mod but never could find all of the right tools, or tutorials or even the models and prefabs you wanted to make it? Now you can in this small (about 350 mb or more) kit. This kit has every thing you need to make a simple or advance mod. The newest version contains modeling tools, reskining tools, texture making tools, map making tools, and much more. Also it updates every once in a while with new programs, models, tutorials, etc that I find around. The next version is even going to have custom dlls (engines) that you can use if your not a good coder, these will feature some new weapons, monsters, pickups etc. If you want to make a Half-Life mod you should really try this. If you do like it please review it and leave a comment, it is appreciated. It is very important to note though that I did not make most of this stuff, I mainly made the tutorials and coded the new dll, all the other stuff is made by truly remarkable people and they deserve the credit. Check out halflifemoddingkit.weebly.com for update news and more. NEW: I am slowly uploading the tutorials to halflifemoddingkit.weebly.com they are in a better format here and the code is color coded

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
Post article RSS Articles

Adding New Skill Healths

Server Side Coding Tutorial

So lets first get started with a little information about what Skill Health is and how it works. If you really don't care just skip this part I won't judge. But it is important to understand how your code works. So first off we will work in the server side part of the code. The reason this is done on server side is so that servers have the values of the monsters, if the clients had the values every player could have a different value for a monster. The way the skill health works is tells the server that the monster has this set link such as zombies have "gSkillData.zombieHealth" which tells the server to go access the zombie health values. But really there are 3 values to access, hard mode, normal mode, and easy mode. Now that's enough learning lets do the coding.

So lets start off by going to your custom monster I am going to use a zombie barney that I codded but all monsters will be the same. Go to your spawn function and you will see this

//=========================================================
// Spawn
//=========================================================
void CZombieB :: Spawn()
{
	Precache( );

	SET_MODEL(ENT(pev), "models/zombiebarney.mdl");
	UTIL_SetSize( pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX );

	pev->solid			= SOLID_SLIDEBOX;
	pev->movetype		= MOVETYPE_STEP;
	m_bloodColor		= BLOOD_COLOR_GREEN;
	pev->health			= gSkillData.zombieHealth;
	pev->view_ofs		= VEC_VIEW;// position of the eyes relative to monster's origin.
	m_flFieldOfView		= 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result )
	m_MonsterState		= MONSTERSTATE_NONE;
	m_afCapability		= bits_CAP_DOORS_GROUP;
    pev->rendercolor = Vector( 255, 0, 0 ); // color
	MonsterInit();
}

This is all the information the server needs to spawn a zombie, what we are interested in is the "pev->health" as you can see it is set as "gSkillData.zombieHealth" this is the default zombie health but we want a new health right? Lets change it to "gSkillData.zombiebarneyHealth" You can use what ever you want just remember what you used. Now lets go to "gamerules.cpp" and search "gSkillData.zombieHealth" it should be around line 200. You will see the link to cvar.

	// Zombie
	gSkillData.zombieHealth = GetSkillCvar( "sk_zombie_health");
	gSkillData.zombieDmgOneSlash = GetSkillCvar( "sk_zombie_dmg_one_slash");
	gSkillData.zombieDmgBothSlash = GetSkillCvar( "sk_zombie_dmg_both_slash")

This simply links the little name we added before to the actual values which we will add next. Just copy the " gSkillData.zombieHealth = GetSkillCvar( "sk_zombie_health");" and add your custom values like this.

// Zombie
	gSkillData.zombiebarneyHealth = GetSkillCvar( "sk_zombiebarney_health");

Remember how I said that there are 3 values, 1 for each game difficulty? We need to add them in now. Open "game.cpp" and search "sk_zombie_health" which is around line 270. You will see part of are 3 values.

// Zombie
cvar_t	sk_zombie_health1 = {"sk_zombie_health1","0"};
cvar_t	sk_zombie_health2 = {"sk_zombie_health2","0"};
cvar_t	sk_zombie_health3 = {"sk_zombie_health3","0"};

The "0" is not the health so do not change it. I am not quite sure what the "0" is but I think it sets default health to 0. Copy and Paste this and change them to what ever value you used last time. For example mine will look like this.

// Zombie Barney
cvar_t	sk_zombiebarney_health1 = {"sk_zombiebarney_health1","0"};
cvar_t	sk_zombiebarney_health2 = {"sk_zombiebarney_health2","0"};
cvar_t	sk_zombiebarney_health3 = {"sk_zombiebarney_health3","0"};

Now if you search "sk_zombie_health" again it will take you to around line 750 and you will see.

	// Zombie
	CVAR_REGISTER ( &sk_zombie_health1 );// {"sk_zombie_health1","0"};
	CVAR_REGISTER ( &sk_zombie_health2 );// {"sk_zombie_health3","0"};
	CVAR_REGISTER ( &sk_zombie_health3 );// {"sk_zombie_health3","0"};

This simply registers the health as a CVAR so that we can use it. I do not know why valve has the comments on the side but I think that at one point the what we last did was done here to. copy and paste this and change it to your custom code, for example mine would be this.

	// Zombie Barney
	CVAR_REGISTER ( &sk_zombiebarney_health1 );
	CVAR_REGISTER ( &sk_zombiebarney_health2 );
	CVAR_REGISTER ( &sk_zombiebarney_health3 );

I took out the comments because they do not do anything. Remember any thing marked by 2 "/" or a set of "/**/" are comments and do not affect the code in any way. Now that last part of coding we need to do will be in "gamerules.cpp" Again search for "sk_zombie_health" and it will take you to around line 220. Here you will see.

// Zombie
	gSkillData.zombieHealth = GetSkillCvar( "sk_zombie_health");

What this piece of code does is real simple, it tells the server that the "gSkillData.zombieHealth" uses the Cvar "sk_zombie_health". Change these to your custom values. Mine will be this.

// Zombie Barney
	gSkillData.zombiebarneyHealth = GetSkillCvar( "sk_zombiebarney_health");

Now compile you dll. If you Spawn your custom monster in the game now it will have the health we set but somethings not right is it? The monster has 1 health so any damage will kill it. What we need to do is edit our "skill.cfg" file that is inside our mod folder. If you do not have one of these in your mod folder copy and paste it from the valve folder. The skill.cfg holds all the information for weapons and monsters that use skill damage or health. This allows the game to change the values based on the difficulty chosen by the player. In the standard Half-Life different difficulties just change how much health the monsters have and nothing else. Some mods like to change health and damage of the weapons, and in the Spirit Of Half-Life Engine you can even set certain monsters or items to only spawn on certain difficulties. If you start your maps from the console by typing "map yourmapname" I think it sets the difficulty o normal. If you open you skill.cfg and search "sk_zombie_health" you will find this.

// Zombie
sk_zombie_health1	"50"
sk_zombie_health2	"50"
sk_zombie_health3	"100"

These are the set health values for each difficulty. "sk_zombie_health1" is easy, "sk_zombie_health2" is normal and "sk_zombie_health3" is hard. Copy and paste this to your custom values mine would be this.

// Zombie Barney
sk_zombiebarney_health1	"60"
sk_zombiebarney_health2	"60"
sk_zombiebarney_health3	"110"

Now I did not set my values to much higher because default zombies take 70% bullet damage, my custom zombie takes P I will cover how to change these in a later tutorial. But that is it. If you start you game now your custom monster will have its own set health. Hope this tutorial helped, I could never find a tutorial on how to add these custom health but it was real easy right? Lets just cover 1 other thing you can do real fast. If you instead don't want to do all this work and want your monster to have 1 health value over all difficulties just go back to your spawn function and change the "gSkillData.zombieHealth" to a number value for example.

//=========================================================
// Spawn
//=========================================================
void CZombieB :: Spawn()
{
	Precache( );

	SET_MODEL(ENT(pev), "models/zombiebarney.mdl");
	UTIL_SetSize( pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX );

	pev->solid			= SOLID_SLIDEBOX;
	pev->movetype		= MOVETYPE_STEP;
	m_bloodColor		= BLOOD_COLOR_GREEN;
	pev->health			= 100;
	pev->view_ofs		= VEC_VIEW;// position of the eyes relative to monster's origin.
	m_flFieldOfView		= 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result )
	m_MonsterState		= MONSTERSTATE_NONE;
	m_afCapability		= bits_CAP_DOORS_GROUP;
    pev->rendercolor = Vector( 255, 0, 0 ); // color
	MonsterInit();
}

This way the custom monster will always have 100 health. I do not recommend doing it this way but it works and it is extremely fast to do. More tutorials can be found on Halflifemoddingkit.weebly.com

The website is a bit of a mess right now but I am working on updating it

How To Change/Fix DiamonD Enhancement Pack For Half Life

How To Change/Fix DiamonD Enhancement Pack For Half Life

UI/HUD Tutorial

Hello , many of you guys have the crosshair problem in the DiamonD HD pack for half life there is 2 problem the first is that sometimes there is a big...

Adding New Impulse "Cheat" Commands

Adding New Impulse "Cheat" Commands

Server Side Coding Tutorial 1 comment

This will cover how to add the basic impulse commands such as spawn monsters, items and weapons

Coding Custom Weapons Part 3 Of 3 Finishing Up

Coding Custom Weapons Part 3 Of 3 Finishing Up

Other Tutorial 1 comment

Well this is the final part of the tutorial, there is no coding and it is really shot compared to the other two. This will go over the final files you...

Coding Custom Weapons Part 2 Of 3 Client Side

Coding Custom Weapons Part 2 Of 3 Client Side

Client Side Coding Tutorial 4 comments

Lets finish up the coding process of our Colt M1911, in this tutorial we will be finishing the Colt we have started in the previous tutorial for server...

Add file RSS Files
Half-Life Modding Kit 3.0 Programs Only

Half-Life Modding Kit 3.0 Programs Only

Full Version 1 comment

This version of the Modding Kit only contains the programs inside of the modding kit.

Half-Life Modding Kit 3.0 Coding Only

Half-Life Modding Kit 3.0 Coding Only

Source Code

Just for the people who are only interested in the coding aspect of Half-Life Modding Kit. This version includes only the Official Half-Life SDK's including...

Half-Life Modding Kit 3.0 Mapping Only

Half-Life Modding Kit 3.0 Mapping Only

Mapping Tool

Not everyone wants all the other tools in Half-Life Modding Kit 3.0. This version only contains the tools used for mapping such as Hammer Editor and compile...

Half-Life Modding Kit 3.0 Complete

Half-Life Modding Kit 3.0 Complete

Full Version 7 comments

Its been over a year since the last update and I wanted to release an update so that people know that the Half-Life Modding Kit is still being updated...

Half-Life Modding Kit 2.2 Installer

Half-Life Modding Kit 2.2 Installer

Full Version 3 comments

Half-life Modding Kit 2.2 is ready are you? Though it does not look like I have put to much into this update I have, I spent a lot of time looking for...

Half-Life Modding Kit 2.2 Archive

Half-Life Modding Kit 2.2 Archive

Full Version 1 comment

Half-life Modding Kit 2.2 is ready are you? Though it does not look like I have put to much into this update I have, I spent a lot of time looking for...

Comments  (0 - 10 of 77)
Jagar-Tharn
Jagar-Tharn

Any attempts on recreating the friendly grunts?

Reply Good karma Bad karma+1 vote
employee426
employee426

I would like to get into modding and have literally no experience unless you count loving half life and all the mods around it experience. Would this be the right way to get into it?

Reply Good karma Bad karma+1 vote
badsniper365 Creator
badsniper365

I think it’s a good way to get started and that’s why I made it. I started out the same way loving half life but no clue how to mod, what I would do is start with basic map making first and work your way to better mapping and possibly coding, modeling and other modifications

Reply Good karma+1 vote
Crestfall2nd
Crestfall2nd

I accidentally double posted.

Reply Good karma Bad karma+1 vote
Crestfall2nd
Crestfall2nd

h t t p s : / / g a m e b a n a n a . c o m / t o o l s / 6 2 3 6

Reply Good karma Bad karma+1 vote
Inepticus
Inepticus

There seems to be a problem with loading the Client.dll

Reply Good karma Bad karma+1 vote
badsniper365 Creator
badsniper365

Which client.dll?

Reply Good karma+1 vote
Inepticus
Inepticus

The client.dll that comews with the "mod" folder. When I try to launch the mod it crashes and says that it could not load library and it points towards the cl_dlls\client.dll directory.

Reply Good karma Bad karma+1 vote
badsniper365 Creator
badsniper365

It is possible that the client.dll got corrupted at some point in time. The dlls in the modding kit are just default valve dlls, just go to your halflife/valve folder and copy the client, I would also copy a new server dll (hl.dll)

Reply Good karma+1 vote
Inepticus
Inepticus

Alright, the default dll's work, I just thought this was a modified dll or something.
Also on your previous comment on adding opposing force weapons, there's really no need to go trough the hassle, I mostly wanted the npc's but that would be too much trouble to code when they're already done in the original dll's.
Plus I can live with the night vision, I was just curious when I asked about the flashlight.

Anyways thank you so much for the help :) <3

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
Half-Life
Game
Half-Life
Creator
Contact
Send Message
Release date
Mod watch
Follow
Share
Community Rating

Average

9.4

8 votes submitted.

You Say

-

Ratings closed.

Highest Rated (2 agree) 10/10

Great Idea for helping the kids!

Jun 4 2016 by cool80s

Embed Buttons
Link to Half Life Modding Kit by selecting a button and using the embed code provided more...
Half Life Modding Kit
Statistics
Last Update
Watchers
62 members
Addons
2
Files
22
Articles
9
Reviews
6