NOTE: This guide is a work in progress, which means that you might find it very short, lacking of information, poorly done or with terrible spelling. If you have any suggestions, ideas or you know any workarounds, please go to the comments section.
If you are not a programmer, or don't have one in your team, it might present a problem for the development of your mod. The next course of action would be to use other mods as a base (like
Featureful or Opposing Force). However, in some cases, you may not be able to use custom code either. This is where this guide comes in: it contains a list of cool Half-Life features and stuff that you can implement in your mod!
Most of these went unused, or are workarounds rather than features themselves. It also contains some cool map tricks (such as the screen tint). These are meant to solve or tackle specific problems.
The main problem of no-coding workarounds and dummied out features
- They tend to be VERY specific. This means that they aim to replace certain problems, like the lack of a special entity that isn't on vanilla Half-Life, a variation of certain models, etc. You are not going to be able to add new weapons, NPCs, or similar to your mod, unfortunately.
- They are also very complicated and time consuming. Implementing them in your mod will be like trying to build a fully functional motorbike out of empty soup cans. Yes, it's possible, but not quite simple, and it can escalate pretty quickly.
Main menu music
A common feature in a lot of mods. Add an .mp3 file named
gamestartup.mp3
to
YourMod/media
. This file should contain your selected main menu music. It will be played every time the game is launched. However, the music plays in a loop and does not play again when the player leaves the game or disconnects from a server.
Mapping/Level editing
Screen tint
This one was created by the user
Mota. The original map presents a México-yellowish tint, but you can change this to other colors to fit your needs.
Normal Screen picture by Mota
Tinted Screen picture by Mota
Warning: Copypasted text up ahead!
The tint effect is achieved by having an
env_fade (
screen_tint
) repeatedly triggered by a
trigger_multiple (
mexico
) covering the whole area it's supposed to affect.
Both the fade's "Hold Fade" time and the trigger's delay before reset are set to 1 second, so the fade gets re-triggered every second while the player stays inside the trigger.
That would be enough for a continuous tint that fades away when the player leaves the area, but if you also want it to fade in smoothly, it'll need a more complex setup - especially if the player can move freely between areas like in this example.
For the smooth transition, I used:
- A second env_fade (
screen_tint_start
) with "Fade From" disabled
- A second trigger_multiple (
mexico_border
) at the threshold between areas with a 0.5 second delay before trigger
- Two pairs of trigger_changetarget, named
change1
and change2
When the player crosses the border, this is what happens:
- The threshold's trigger_multiple,
mexico_border
, targets the pair of trigger_changetarget called change1
after a delay of 0.5s
- Meanwhile, the area's trigger_multiple,
mexico
, targets screen_tint_start
, as that is its initial target
- The
change1
pair activates, making it so mexico
now targets screen_tint
every second from now on, and mexico_border
now targets the change2
pair
- If the player walks back through the border,
mexico_border
will now trigger the change2
pair, which reset both mexico
and mexico_border
to their initial targets so this whole sequence can be repeated
Loading embedded content: Vault Item #6681
Advanced Half-Life FGD
This FGD implements plenty of dummied out features from Half-Life, such as
Dynamic Lights, the inclusion of new unused entities like item_sodacan or grenade. Keep in mind,
this FGD is meant for Hammer. Other programs, like J.A.C.K. editor, can't really handle some features, and cause bugs.
Loading embedded content: Vault Item #6618
Models
Different models for a single entity
You can make variations of pickups, monsters, etc. by adding a bodygroup to the model and adding the "body" property in a map editor:
Pickups
Monsters
You can also add "limitless" body/skingroups to entities that already use them like HECU grunts or scientists. I wrote "limitless" because there is still a limit on every model. According to
The303.org, the limits are:
- 32 submodels
- 32 skingroups
A problem with this workaround is that
entities that already work with bodygroups and skingroups (like the scientists and security guards)
can't have more groups added, since this will break the models.
An example can be found
here, by UrbaNebula.
Loading embedded content: Vault Item #6409
Misc
(LEGACY) Different launch screen
NOTE: This may no longer work, as the game got an update for the 25 anniversary. If you really want to use this feature, consider switching to steam_legacy version.
Half-Life uses a single background image both for the menu and when the game is loading. However, you can add different backgrounds for the loading screen and menu.
Main Menu
Loading screen
This can be achieved by modifying the file
YourMod/resource/BackgroundLoadingLayout.txt
, and adding your new background files. A recommended way to organize the backgrounds is putting the files in different folders, rather than putting everything in the
background
folder:
Image
monster_*
entities.func_*
entities include the effects key by default.When I once used the func_conveyor entity in ka_airtrain, it also compiled with a light effect in the map, even though I didn't do anything unconventional with it.
It's hard to say because this entity was deleted by me a long time ago.