Half-Payne is a Half-Life mod that aims to bring some gameplay bits from Max Payne. It ended up as interesting way to replay the game and this is the first time ever I tried to mod the game by dwelling into it's source.

Here's the list of all changes that have been made:

Slowmotion ability

  • Simillar to original Max Payne game, there's hourglass icon which shows how much slowmotion charge do you have. Fill the hourglass by killing your enemies, the more dangerous the enemy - the more charge you get for the kill.
  • Slowmotion toggle button is bindable in the options and defaults to MOUSE3, you can also toggle the slowmotion using "impulse 22".
  • You can activate infinite slowmotion cheat using "impulse 24".

Diving move

  • Simillar to original Max Payne games, you can make a dive move (shootdodge). Dive works simillar to long jump module, but isn't that far and can be done in any direction. You can make diving move only if you have enough slowmotion charge (which is 10%). Slowmotion charge won't deplete during the actual dive afterwards.
  • You can cancel slowmotion during your dive by toggling slowmotion.
  • Diving is bindable in the options and defaults to LSHIFT, you can also dive using "+alt1".

Painkillers and player's health

  • Simillar to original Max Payne games, you use painkillers to heal yourself.
  • All portable medpacks are now considered as painkillers.
  • All Medical stations have been replaced with animated Med cabinets which contain 2-4 painkillers depending on your difficulty level.
  • You can hold up to 9 painkillers and only when you have the suit on.
  • Taking painkillers is bindable in the options and defaults to G, you can also take painkillers using "impulse 23".
  • All suit charging stations and batteries have been removed to counter the ability to take painkillers at any time.
  • Health regenerates up to 20.
  • Player's health is displayed with replica of Max Payne healthbar.

Max Payne

  • You're actually playing as Max Payne now - you can see that on replaced playermodel and weapon viewmodels.
  • Instead of wearing HEV suit, you have to pickup your coat. It's located in your closet (c1a0d map).
  • Max will comment when certain things occur. Commentary on story events is achieved by map configuration files. Max will also comment on gameplay situations, such as:
    • Finding or taking painkillers
    • Taking damage
    • Taking huge damage dealt by player himself
    • Being near death while (not) having painkillers
    • Wasting bullets
    • Killing innocent people
    • Having no ammo in the gun
    • Answering a very important rhetorical question

Bullet Physics

  • Which by default is present when slowmotion is active and can only be shot by enemies. Physical bullets are simillar to crossbow bolts and also emit trail effect when shot in slowmotion.
  • Turning it on for player can be done in custom game modes.

Dual Berettas - new weapon

  • Picking up a pistol when you already have one allows you to dual wield them.
  • Both pistols have independent clips. Ammo in the clip is preserved when you switch back and forth to single or dual pistols.
  • Dual pistols rate of fire is alittle higher compared to single one.

Desert Eagle - revolver replacement

  • Replacement model comes from Opposing Force, but got it's laser sight cut off.
  • In previous versions of Half-Payne, revolver's fire cooldown has been shortened.
  • Max ammo in the clip has been increased from 6 to 7.

Weapon behavior

  • Each shot of Beretta, Deagle and Shotgun has to be done by yourself. In other words, you can't hold the button to fire continiously.
  • Secondary fire of Beretta has been disabled, you have to do rapid fire by yourself.
  • Shotgun annoying reload time has been shortened.
  • SMG is much more accurate now if you don't shoot it too much.
  • Hand grenades and SMG grenades can be shot down. During marine encouters, you can shoot grenades in slowmotion while maintaining your cover.
  • Punchangle (recoil effect) for some weapons affects your actual accuracy (especially noticeable on revolver).
  • All pistols, shotguns, MP5 and turrets produce tracer effects.
  • Weapons reload faster when in slowmotion, but turning the slowmotion off while reloading doesn't make the reload finish as fast as it had to.

hud_fastswitch

  • Implemented proper 'hud_fastswitch' behavior. 'hud_fastswitch 1' only works with weapons that only take one slot in the weapon group, otherwise weapons selection works as usual.
  • Use 'hud_fastswitch 2' to make it work just like in Half-Life 2. Pressing slot3 three times selects crossbow etc.

hud_autoswitch

  • You can turn off automatic weapon switching after picking up the weapon by setting 'hud_autoswitch 0'.

Classic viewmodel bobbing

  • This was present in the original WON version of Half-Life. You can turn it on by setting 'cl_bobclassic' console variable to 1.

Classic viewroll

  • This was also present in the original WON version of Half-Life. You can turn it on by setting 'cl_rollenabled' console variable to 1.

Black Mesa Minute gamemode

  • Rush through the levels against the minute while killing your enemies the most efficient way as possible.
  • Basically it's somewhat time attack mode where score is your time at the end. It resembles New York Minute from Max Payne 3 and has simillar time bonuses.
    • Ordinary kill - 5 seconds
    • Headshot kill - 6 seconds
    • Explosive kill - 10 seconds
    • Crowbar kill - 10 seconds
    • Projectile destroyed - 1 second (when you destroy enemy grenades)

Score Attack Game Mode

  • Play through familiar levels while killing as many enemies as possible and keeping your combo multiplier at max.
  • You can read additional info on scoring in README file.

Custom Game Modes

  • Play singleplayer game with a custom loadout and additional mods that change gameplay (simillar to Unreal Tournament mutators).

Misc.

  • Max Payne style deathcam, complete with proper soundtrack.
  • Disabled fast bunnyhop prevention.
  • Player doesn't collide with enemies in their dying animations.
  • Marine or Barney's helmet now absorbs up to 10 damage before it will stop reflecting projectiles.
  • Infinite flashlight charge.
  • White HUD colorscheme.
  • All weapons have the same white dot for the crosshair.
  • Health more than 100 (like when using infinite health door glitch) is shown on hud.
  • You can kill G-Man, seriously just screw him.
  • Gibbable barnacles.
  • HGrunts turn around faster when playing on Medium or Hard difficulty.
  • Sentry turrets emit sparks when you hit them.
  • Fixed not being able to use certain cheats (like impulse 101) after loading save files.

Credits

  • Directed by suXin
  • Max Payne viewmodels, vanilla Barney with Beretta and minor coding help - Rara
  • Main menu background by Ninja_Nub[NOR]
  • Max Payne resources ripped from
    • Original Max Payne game, made by Remedy
    • Max Payne 3, by Rockstar
    • Med cabinet model rip from Max Payne by Xinus22
  • Several custom mods ideas by Facepunch pals and ~my buddy~
  • Code changes that allow you to walk with reversed gravity - YaLTeR
  • sys_timescale hint - SoloKiller
  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
Post article RSS Articles

HALF-PAYNE

GAME MODE ACCESSIBILITY AND MUSIC ENHANCEMENTS

Plenty of new game modes were planned for the next update, but so it's happened that I focused on something else entirely.


After last major release I had to rest from working on Half-Payne, but perhaps I was avoiding working on it for too much and some other projects also held it off. It wasn't a complete waste of time though, because I got excited at implementing the features you've seen in this video above, but I still don't like the fact I wasn't focused on game modes in the first place. Anyway, below are some details on Half-Life features that I've never seen implemented before.

ImGUI AND BETTER GAME MODE ACCESSIBILITY

Let's be honest - launching custom game modes in Half-Payne is pain. You're supposed to check out the README file and then use console commands - not everyone can do that and with this approach some people will never notice there are custom game modes.

Obviously, GUI (Graphic User Interface) has to be made - you're supposed to launch game modes using windows and buttons like the ones in Half-Life, everyone knows how they work and they get the job done by showing what you can play and game mode rules. The problem is - I couldn't provide this solution, there's no GameUI.dll source code and most likely never will be. Someone may say: "What about VGUI?" and I will answer that after a tiny peek at VGUI I concluded that this nightmare is not worth it, and VGUI is only available when you actually play the game. Imagine creating a dummy map which's only purpose is to provide dumb and clunky VGUI menu, it wasn't worth it.

One day I stumble upon ImGUI - a bloat-free graphical user interface library for C++ . Docs say that it supports SDL, which is what Half-Life using nowadays. I got challenged with question if it's possible to bring ImGUI into Half-Life - the answer is yes.

At first I just copied the ImGUI SDL example to the client.dll source code. I must do it on client because I need to draw ImGUI in the main menu, before the actual game starts (server.dll is not loaded yet). Unfortunately, this resulted in flickering, making the whole thing useless.



The problem was caused by SDL_GL_SwapWindow function call which is a must for ImGUI to be drawn. It wasn't the call itself that caused the problem, but the fact that it was called two times. One time in the engine (hw.dll), and the second time by myself on client, which causes the flickering.

Obviously, the only way I could win is by making the engine somehow execute my ImGUI code before calling SDL_GL_SwapWindow. SoloKiller pointed out that I could put the ImGUI code in TeamFortressViewport::paintBackground() function (name looks unexpected huh?), but it would be only executing while playing the game, which doesn't suit me because I had to draw ImGUI in the main menu, so this was ditched.
The real first step was to find where exactly the CALL SDL_GL_SwapWindow engine's command resorts in the memory. I found it by using APIMonitor, which can trace DLL function calls. By filtering calls only to SDL_GL_SwapWindow, it was no problem to see where the function was called from - see the top of stack trace.


Peeking in the memory itself, there's x86 E8 OP CODE, which means 'call the function by address relative to itself'. First byte is the command itself, next 4 bytes are offset. I just have to calculate the offset to my ImGUI drawing function, you can see how exactly this is done on GitHub (keep in mind the 'origin' is outdated though).


This got me ImGUI test window drawn without flickering, after that I started working on game mode selection window. No more console command bullshit!
It also opens up possibilities of making game mode config maker which will be available right inside the game instead of being separate application.


MUSIC ENHANCEMENTS AND FIXES

Maybe you noticed that if you launch whatever Half-Life mod and trigger CD audio - it will just stop playing after level change. Apparently engine checks that if current mod folder is not 'valve' - it actually has to stop the music playback. No idea why this was done, but it sucks.
Obivously the fix could be made by hacking/patching the engine again, like the ImGUI case above, but to be honest I hate hacks like this, they always seem illegal, and in this case it wouldn't let me to do the fancy stuff.

By utilising BASS audio library, I'm gaining better control over sounds and music. Having a total control over music already guarantees that music won't stop when you go through level change. This also allows me to change the way music sounds when slowmotion is active and be able to set music playback back where it was when you load savefiles.
At the moment, there are two effects available for music when slowmotion is active: low pass filter and lower pitch, both of them can be configured. There's also a smooth transition for both effects.
Half-Payne has music directory which is about 25 MBs because the audio consists of .wav files. BASS can play .mp3, which means directory size can be severely lowered.
Expect that I will also implement music playback support for map and custom game mode configs! Playlists and repeat option will most likely will be here too.

I'm also having thoughts on trying to implement dynamic music system, like modern games do. This is something I'd do late in development though.
Note that BASS is used only for music playback, I'm not daring using it to replace engine's sound system.


RANDOMLY CHANGING BACKGROUNDS

Goldsource games today can only show one main menu background and it can't be random, but I had a random idea recently that I could rewrite resource/BackgroundLayout.txt and resource/BackgroundLoadingLayout.txt files each time I load up the game, so they point to different background folders. Files are not locked for write so it's definetely possible.
If I succeed - I will add fan backgrounds in the next update.

IN CONCLUSION

Today I want to believe that Half-Payne mod is not just about Max Payne meeting Half-Life and Black Mesa, but more about making hacky stuff for vanilla GoldSource that has never been done before, I often call this mod Hack-Payne because of that.


After I'm done with polishing of the new music system, I'm proceeding to work on new gameplay mods as I planned. The problem is - chances I won't meet my original deadline, which is August 31th, I'm afraid it will be pushed to September 31th instead.

Half-Payne - Definitive Fixes Released

Half-Payne - Definitive Fixes Released

News 5 comments

Half-Payne latest update fixes several issues, thanks to the feedback.

Half-Payne - Definitive Update Released

Half-Payne - Definitive Update Released

News 21 comments

Half-Payne Definitive Update has been released! Play the mod the way it was meant to be from the beginning.

Half-Payne - April Progress

Half-Payne - April Progress

News 8 comments

Latest article covers Score Attack Gamemode, Max's commentary on gameplay, New ending and the Release date.

Half-Payne - March Progress

Half-Payne - March Progress

News 5 comments

I've got enough progress this month to sum it up in a new article: Bullet physics, Max's commentary, Custom game modes.

Add file RSS Files
Half-Payne / May 29th 2017 Patch

Half-Payne / May 29th 2017 Patch

Patch 2 comments

* Fixed Max's commentary not being played sometimes when visiting a new map. * Fixed minor annoyance in the ending.

Half-Payne / May 17th 2017

Half-Payne / May 17th 2017

Full Version 12 comments

Unpack 'half_payne' folder in your Half-Life Steam directory and restart Steam. You should see 'Half-Payne' in your Games list, launch it to start playing...

Half-Payne / May 07th 2017

Half-Payne / May 07th 2017

Full Version 10 comments

Unpack 'half_payne' folder in your Half-Life Steam directory and restart Steam. You should see 'Half-Payne' in your Games list, launch it to start playing...

Half-Payne / August 01st 2016

Half-Payne / August 01st 2016

Full Version 1 comment

* Fixed level states being saved in Black Mesa Minute when you restart using mouse click after dying. * Added "holdtimer" to [mods] section for Black...

Half-Payne / July 29th 2016

Half-Payne / July 29th 2016

Full Version

New update for Half-Payne which includes many fixes and Black Mesa Minute polishment.

Half-Payne / June 24th 2016

Half-Payne / June 24th 2016

Full Version 2 comments

Black Mesa Minute update. Read more about how to play the new gamemode in bmm_cfg\_README.txt

Comments  (0 - 10 of 123)
Guest
Guest

This comment is currently awaiting admin approval, join now to view.

Ailin
Ailin

Sooo how do I use the VVVVVV mode?

Reply Good karma Bad karma+1 vote
suXin Creator
suXin

type 'cgm vvvvvv' in console

Reply Good karma+2 votes
Ailin
Ailin

Thank you for the swift reply and for the fun game mode!

Reply Good karma Bad karma+1 vote
MatthewsBF
MatthewsBF

Best mod for Half Life 1!

Reply Good karma Bad karma+1 vote
Heckington
Heckington

Is it possible to run it on Xash3D?

Reply Good karma Bad karma+1 vote
suXin Creator
suXin

Most likely not.

Reply Good karma+2 votes
HonScottoSolo
HonScottoSolo

I tried it on xash3d, but there is a problem with xash3d and Half-Payne. When you shootdodge, you can't get back up, you are stick in crouch until the next part of the level. I'll still ask you to stick with the Steam version of Half-Life.

Reply Good karma Bad karma+1 vote
suXin Creator
suXin

Jesus christ it actually launches? And this problem sounds really weird, because movement related code should not be Xash related.

Reply Good karma+2 votes
HonScottoSolo
HonScottoSolo

It does launch the mod, and works but haven't tried the other modes.

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

8.6

20 votes submitted.

You Say

-

Ratings closed.

Style
Twitter

Latest tweets from @suxinjke

RT @BirdPerHour: #birdbot T.co

5hours ago

If I ever get to Japan this is where I'm headed T.co

7hours ago

T.co

23hours ago

Twiggy are you implying that we have to dinner on table tennis table? T.co

23hours ago

Think I'm done with basics of music system for #HalfPayne, that means I can move forward to more gameplay mods now Github.com

23hours ago

RT @BirdPerHour: #birdbot T.co

Aug 21 2017

RT @BirdPerHour: #birdbot T.co

Aug 20 2017

Embed Buttons
Link to Half-Payne by selecting a button and using the embed code provided more...
Half-Payne
Statistics
Last Update
Watchers
288 members
Addons
2
Files
7
Articles
11
Reviews
14