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

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 2 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 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...

Counter Strike Edition

Counter Strike Edition

Full Version 8 comments

This is very important to anyone who wants to make maps for one of the best Valve games ever, Counter Strike 1.6 This modding kit is NOT for Counter Strike...

Half-Life Summons Version 1.0 Changelog

Half-Life Summons Version 1.0 Changelog

Other

I was checking the archive file for the changelog when I noticed it was missing, This is important because the change log has the impulse commands in...

Half-Life Summons Archive With Changelog

Half-Life Summons Archive With Changelog

Full Version

I was checking the archive file for the changelog when I noticed it was missing, This is important because the change log has the impulse commands in...

Half-Life Summons Installer

Half-Life Summons Installer

Full Version 2 comments

Just something I made to show that I am still working on the modding kit, this is a custom dll that will allow you to spawn any half-life vanilla monster...

Comments  (0 - 10 of 62)
Guest
Guest

everyone's being so mean to you >:(
thank you, badsniper, this helped me a LOT, i'm finally able to start modding

Reply Good karma Bad karma+1 vote
badsniper365 Creator
badsniper365

Your welcome, I am trying to help more people out.

Reply Good karma+2 votes
badsniper365 Creator
badsniper365

I'm trying to setup a forums to get the modding community a little more involved in helping each other fix their modding problems, I do not think that it will be that popular but it might help somebody

Reply Good karma+2 votes
nizan700
nizan700

can you do article on how to make any originaly enemy monster to be not only friendly (just one line of the return class) but also followable with the use key and with follow and stop following lines the npc say same as with scientists and barney? i mannged and tryed to do that on the female assassin by coping barneys followcode with the use and unuse lines she was friendly but not followable and cant figure out how to do that..
so can you do article how to do that please?

Reply Good karma Bad karma+1 vote
badsniper365 Creator
badsniper365

I tried for a long time to put a follow command on a zombie to make a melee ally but I was never successful. The code compiles just fine and the command doesn't go through. Once I figure out how to do it I will upload it. Sorry for really late replies I just been working a lot.

Reply Good karma+1 vote
nizan700
nizan700

can you do article on how to make any originaly enemy monster to be not only friendly (just one line of the return class) but also followable with the use key and with follow and stop following lines the npc say same as with scientists and barney? i mannged and tryed to do that on the female assassin by coping barneys followcode with the use and unuse lines she was friendly but not followable and cant figure out how to do that..
so can you do article how to do that please?

Reply Good karma Bad karma+1 vote
hippykiyay1337
hippykiyay1337

Did anyone make a mod with this yet? If u have leave me a link or something to play it because i want to see if this modding kit really has potential.

Reply Good karma Bad karma+1 vote
badsniper365 Creator
badsniper365

If anyone did make a mod with the kit I would love to play it

Reply Good karma+1 vote
mgfg22
mgfg22

thanks for cs edition check up my page for Counter-Operations Source of Global Warfare MOD.

Reply Good karma Bad karma0 votes
Cube_Effect
Cube_Effect

There's a problem while installing the modding kit
It says
An error occurred while trying to copy a file: Half-Life Modding Kit\Contact us.txt
Is this a problem or should i move to the archive one?

Reply Good karma Bad karma+1 vote
badsniper365 Creator
badsniper365

I have received multiple error reports about the installer, I have not had anytime to upload a new one though.
I would use the archive, that should be glitch free

Reply Good karma+1 vote
Cube_Effect
Cube_Effect

Another thing, how do i make the mod?

Reply Good karma Bad karma+1 vote
badsniper365 Creator
badsniper365

Depending what you want,
For mapping most people use Hammer Editor, I recommend Jackhammer Editor as it is better.
Coding you need Visual Studio 6 or 10
Modeling you need Milkshake 3D to create and modify, or Jeds Model Viewer to modify the skins
Sprites you need Sprite Mage

Reply Good karma+1 vote
Cube_Effect
Cube_Effect

Wow that's like a lot, i have Hammer editor on the source SDK. Should that work?

Reply Good karma Bad karma+1 vote
badsniper365 Creator
badsniper365

I don't think so, There is a HL SDK on steam which has it. If I remember right the 3.X series is for GoldSrc and the 4.X series is for Source

Reply Good 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.8

6 votes submitted.

You Say

-

Ratings closed.

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
50 members
Addons
2
Files
18
Articles
9
Reviews
4