Showing posts with label Source Engine (HL2). Show all posts
Showing posts with label Source Engine (HL2). Show all posts

Tuesday, January 29, 2013

Inventory and Survival

Notice the Left 4 Dead style glow to the items on the desk. This effect is not exactly a shader and was added with the use of the stencil buffer.
Inventory items, and player stats have not really been staples of the Half-life saga so they had to be added to the mod. One of the features we've added is an endurance meter which functions similarly to player hunger in RPG's. Over time, the player's endurance decreases. Energy-intensive actions such as running for prolonged periods of time, stress-heavy situations, and healing also decrease the endurance over time. The player can refill their endurance by consuming food items and beverages scattered randomly in the game.

Disclaimer: This map is not in the final game, it is a map from the Dawn of the Dead source mod used for testing purposes only
We also have the standard HealthPoints and Armor Items which regenerate the player hp and armor respectively. HP items are very rare in the game and can only be found (if at all) at infirmaries, hospitals or other logical locations. HP items include Health kits, health vials, health sprays, and bandages. Armor items are more common, as they are usually carried by enemy npc's and can be looted off of them. Armor decreases the amount of incoming damage, and also prevents the player from bleeding. If the player gets damaged while having little to no armor, he gets a chance of bleeding, which can only be stopped by taking health items, or by bleeding out. Some armor items include helmets and kevlar.

Disclaimer: This map is not in the final game, it is a map from the Dawn of the Dead source mod used for testing purposes only
We then also have utility items such as Flares, flashlights, glow-sticks, gas-masks, night-vision goggles, and silencers (this is not a complete list). All of these items have their own special behavior. Some help towards combat, others with sneaking, others with health/armor.

Lastly, but definitively not least, we have our weapons. Underhell's weapon system is something of a hybrid between modern shooters and older shooters in the weapon capacity sense. The player can carry as many weapons as he wants, but he can only carry one of each type. These are all the weapon types in the game:

  1. Melee
  2. Pistols (may or may not be one-handed)
  3. Sub-Machineguns
  4. Shotguns
  5. Rifles
  6. Explosive
These are all governed by a Free-aiming and Iron-sighting aiming styles which I will demonstrate on a later post.


Click Here for a video demonstration of some (and more!) of the features I've talked about here

BodyGroup Usage in Source


Dismemberment is one of the new features I've added to Underhell. The game take's advantage of Source's implementation of bodygroups. A bodygroup is an index of a specific mesh within a model. This index can be used to toggle the presence of a mesh, or altogether swap it out in real time.

For dismemberment, a hitbox and the corresponding model bodygroup for the damaged npc is either swapped out or toggled off to demonstrate harm. The corresponding model for that limb is then instantiated as its own object.



As seen, bodygroups provide an easy implementation for gore, but also nice way to randomize the appearance (and sometimes the behavior of ) the same npc type. For example, below we have a standard soldier npc with randomized bodygroups on spawn. On spawn the following attributes are decided: health, armor, weapon, skin, extra equipment, and ( for our zombie friends) any limbs that they might already be missing.


Even hitboxes are swapped out:

Wednesday, February 22, 2012

Env_message Entity modification HL2 (for Underhell mod)

A modification to Env_message. The button on the left is an Env_message entity with a parameter override in a new input function. This mod uses that override to specify which message index to print. This way numerous different messages can be displayed with only one Env_message entity.


The right-most button is a game_text entity and the middle two are Env_message entities using keyvalues instead of parameter overrides to print a message. Source code for this is available on request.

Ambient Generic entity fixed (for Underhell mod)

This fixes the Ambient Generic stop and toggle methods to stop and toggle a non-looping sound.


This online guide:https://developer.valvesoftware.com/wiki/Ambient_generic:_stop_and_toggle_fix


did not work correctly until I notted (! operator) m_fLooping in the if statement.


Shooting the white block toggles the sound and shooting the other block stops the sound.

Friday, January 13, 2012

Inception-Themed HL2 MAP/MOD

Third, and most definitively my favorite part of the small hl2 mod I made over the summer. Music not by me.

Mod Lab Part 2


Part 2 of the second level of a small mod I made over the summer. This video shows part of a burning building with weakened wooden supports. Touching them results in whatever is left of the ceiling to come crashing down.

Mod Lab Part1

First part of level 2 of a small unreleased mod I made over the summer in my spare time. Music not by me.

Grapple weapon mod hl2

My attempt to make a grapple in HL2. Inspired by Batman: Arkham Asylum.

Explosive Crossbow HL2



Very simple crossbow mod in the source engine .Ive added a few lines  to create an explosion when a crossbow bolt hits something (and does not rebound). I was going for a Ramboish effect.