How to properly put in OpFor content into a hl1 mod? Created 6 years ago2018-08-13 17:33:08 UTC by Dr.Cola Dr.Cola

Created 6 years ago2018-08-13 17:33:08 UTC by Dr.Cola Dr.Cola

Posted 6 years ago2018-08-13 17:33:08 UTC Post #340529
I am mostly interested in the enemies and weapons from the op4, but I want to keep the whole H.E.V stuff like the orange HUD as well as flashlight.
I just slammed the op4 dlls over and while it works I get green hud and zooming in with sniper or crossbow makes mouse act weirdly.
Posted 6 years ago2018-08-14 03:21:07 UTC Post #340535
So, making an Op4 mod is straightforward, but what you're aiming to do is complicated. The game dlls hold things like enemy behavior, weapon behavior, and flashlight/night vision stuff. It sounds like you want some elements from HL and some from Op4, and mixing them in this way is probably going to require you to code your own dlls for your hybrid mod.

If you can live with the Op4 night vision and an Op4 style HUD, you should be able to recolor the HUD easily enough.

edit: Sorry, was tired when I wrote that. What it should say is that if you're using Op4 you can't recolor the HUD but you can change how most of it looks since that is set in sprite files.
Posted 6 years ago2018-08-16 17:23:28 UTC Post #340564
I'm not making a op4 mod, rather a hl1 mod. I slapped on op4 dlls to have the weapons and npcs but the consequences are green hud and nightvision instead of flashlight and crossbow/sniper zoom having weird mouse input.
Posted 6 years ago2018-08-16 18:07:41 UTC Post #340565
If you want to use Op4 weapons and enemies but have the HEV suit HUD, you're going to have to recode them from scratch. There have been some mods that attempted to remake all the Op4 content so mappers could use them, but I don't know if any of them are still available these days.
EDIT: I remember 2muchvideogames making a mod that brought in a bunch of Op4 content and other new stuff, if I'm remembering correctly I did a couple model hacks for it. That was years ago and it never released, but maybe he still has the code lying around?
Notewell NotewellGIASFELFEBREHBER
Posted 6 years ago2018-08-16 20:12:49 UTC Post #340566
Probably this @Jeffmod:

https://www.moddb.com/mods/home-sweet-home

@Dr.Cola:

Personally if you do lack coding knowledge you're best advised to either modify your story slightly.. Create a situation early on that your Scientist slips into a Uniform he finds and then he just plays soldier.. The normal Hecu grunts are still in it. The greeting Scientist sounds can get easily replaced. Eventually the soldiers would find out about this and on this part it would be technically the same thing story wise. The Hev sounds are not that important if you ask me.

It might not be the best situation but also allows for new possibilities regarding npc encounters with voices. Either that or use Spirit of Half-Life but then you will be limited to the Pit Drone & the Gnome. I believe Spirit contained all op4 weapons except the grapple gun.

If you can code check this out:

https://drive.google.com/uc?id=1smLdf_iyg0iZ_p4-v9HCCZJj5vgcSyEQ&export=download

It contains working code for all Op4 monsters and weapons. It's then just a matter of implementing that in your every day regular spirit source code version and compiling the whole thing. Some minor adjustments may be necessary. Perhaps somebody could help you on that. For a true coder that would be possibly a matter of 1 or 2 hours.

And the source codes for the various spirit versions:

https://www.moddb.com/mods/spirit-of-half-life/downloads
Posted 6 years ago2018-08-16 20:38:33 UTC Post #340567
Actually, check that download out anyway, I just downloaded it and it looks like it has a fully functional Spirit implementation as well as the OP4 recreation source code. Will investigate further.
EDIT: Yeah, it's not entirely without bugs, and a couple of the weapon behaviors are changed (viewsway, and the game actually plays both the holster and draw animations when swapping weapons) but it seems to be exactly what you're looking for. Where was this 10 years ago when I actually did goldsource modding?
Notewell NotewellGIASFELFEBREHBER
Posted 6 years ago2018-08-16 21:07:32 UTC Post #340568
Ya we abandoned the project when Solokiller began working on Hl Enhanced. My coder was so exited about all the things he was working on that he decided to rather wait for him to finish and then make the required and necessary adjustments afterwards based upon his code version instead of regular spirit. Seeing how 2 years have passed by now and solo began working on an even newer but yet much better version of his project. I'm a little saddened to say the least. Even if in the end we all will get happy beyond imagination, it delayed my efforts. I was planning on having that arriving with an enhanced version of Military Duty that also includes assets of Firestorm (Want to merge these 2 mods into 1 huge mod.)

Say Jeffmod if you would want to fix it and turn this thing release ready I wouldn't mind at all. :D Be my guest. :) After all my coder (he is the guy behind the op4 recreation code btw.) invested so much time and effort into this. It would be a shame to let it go to waste. Not to mention seeing how new comers still arrive here on a daily/weekly basis re-assures us that Hl1 is by far not dead yet.
Having an Op4 Spirit version available certainly would avoid these common Op4/Hl1 mix questions like tie one here. Not to mention we will all get to see much better more varied mods in the future. Might be useful till at least Solokiller hits us with his master piece project. In the hopefully not so distant future. :)

As for holstering weapons etc.. Yeah there were some bugs remaining he intended to fix. But never actually got around in doing so as development ended at that time.. As for the movement in general. That's how Hl1 played in the very first versions back in 1999 but these features were disabled one by one and patch by patch. He felt the need to re-implement those features. It's actually kinda nice. Adds a little more realism to it and it dissolves bunny hopping etc.
Posted 6 years ago2018-08-16 22:23:15 UTC Post #340569
Getting a "Spirit Ultimate" codebase up and running sounds tempting, but coding is the one thing I can't seem to get any kind of grasp on.
I hadn't realized the core gameplay of HL had changed so drastically since launch - learn something new every day!
Notewell NotewellGIASFELFEBREHBER
Posted 6 years ago2018-08-17 18:01:40 UTC Post #340584
Hehe no sweat Jeff.
Posted 6 years ago2018-08-17 18:35:42 UTC Post #340585
It sounds like you want to use the opfor dll (code) but your main problem is that you dont want green opfor HUD sprites. Lucky for you someone actually made a set of sprites specifically for this purpose. I assume you made a copy of opfor folder and used that for you mod. To get the default HEV HUD sprites back, go in your mod folder and into the sprites folder, delete these files:
  • 640_pain.spr
  • 640_train.spr
  • 640_hud1.spr
  • 640_hud2.spr
  • 640_hud3.spr
  • 640_hud4.spr
  • 640_hud5.spr
  • 640_hud6.spr
  • 640_hud7.spr
  • 640_hud8.spr
  • 640_hud9.spr
Deleting these sprites will cause the mod to use the default half-life versions of these files (the HEV HUD sprites)

Next, download this zipped folder: http://host-a.net/u/lnn8v6/Op4_HUD_in_HEV_style.1.zip

This contains HEV HUD versions of the OP4 weapons. Follow the instructions in the readme and credit the guy who made it.

That should be everything you need

PS: If you want both flashlight AND op4 weapons, you will need custom coding.
Posted 6 years ago2018-08-17 21:20:21 UTC Post #340587
Good to know 2muchvideogames.. Thanks for that info.

I'm afraid the sprites + flashlight + hev sounds were exactly what he wanted. How ever seeing that he also no longer replies to follow up posts I assume he scratched that idea or moved on entirely.

Custom code aka spirit it is.
Posted 6 years ago2018-08-18 00:17:16 UTC Post #340591
I am still here, trying to follow what 2much said but I still have a persistent green hud. I don't mind the flashlight problem that much but the HUD is quite frustrating.
What should the sprite folder look like for this to work?
Posted 6 years ago2018-08-18 01:26:56 UTC Post #340593
Like he instructed. According to him to you have to delete all following files

in

*Half-Life\MYMODNAME/Sprites*
  • 640_pain.spr
  • 640_train.spr
  • 640_hud1.spr
  • 640_hud2.spr
  • 640_hud3.spr
  • 640_hud4.spr
  • 640_hud5.spr
  • 640_hud6.spr
  • 640_hud7.spr
  • 640_hud8.spr
  • 640_hud9.spr
It will then auto load the default hl1 orange hud sprites instead. That is once these opposing force sprite files are no longer present within your mod sprites folder.
If it doesn't work make sure you're actually play testing with your mod folder and not the gearbox folder.. And that your maps are getting compiled into your mod/maps folder and not into the gearbox/maps folder.
Posted 6 years ago2018-08-18 04:32:02 UTC Post #340594
if you're using Op4 you can't recolor the HUD but you can change how most of it looks since that is set in sprite files.
As Unquenque said. Ok, I looked around and it turns out client.dll controls the color, that's pretty sad. You only need to edit 3 lines, too. Easiest way would probably be to edit and compile that op4 recreated code that 23-down has. I think i'll take a look in there too.
Posted 6 years ago2018-08-18 11:44:54 UTC Post #340595
@2muchvideogames: Hm be advised though.. The code while working has few bugs and things on the to do list remaining.
In our original plan. We had the idea to add some code that would allow the player later on in the map specific settings - in the editor to choose the color of their hud - green default for op4, orange, blue, yellow, white & red.

Let me recheck through my old bug report lists. There was still be plenty to do:
  • scripted_sentences play a spark + sound over the heads of the speaking npcs.
  • Part1: hand grenades and satchels, rifle nades which explode airborne create flying stones. It would possibly require a condition whether it's airborne or not. Perhaps reduce the size of the parts.
  • sv_grenadegib 1/0 *
  • Part:2 The following sound of the falling rocks is unfitting and to loud.
  • Grunts fire in rapid fire mode. It's unfitting for them and their animations.
  • To walk in water plays a ladder climbing sound.
  • Some dying soldiers drop hand grenades but these are sometimes stuck mid air.
  • The medic is unresponsive to calls for aid of fellow comrades. Furthermore I suggest to enhance the delay 'cause the soldiers are calling him every 3 seconds when being injured.
  • When I walk onto the npcs they crouch and reload their weapons instead of making room for me.
  • When firing against walls I get alien blood decals instead of bullet hole decals.
  • The Voltigore sometimes acts weird. He turns around and shows me his butt instead his front side. Sometimes his energy balls disappear when you walk around a corner. It means the Voltigore runs around with his charging animation in this instance.
  • Sometimes my rifle acts as if it just fired a shot + muzzle flash but without audio. That being said no real shot was fired. A misplaced idle animation no doubt. It seems to happen whenever some trigger activates something. Play in Dev mode to experience this bug.
  • Another glitch is that my body armor loses 1,2 energy points at random. I wasn't attacked at that time nor were any enemies nearby.
  • Sometimes player weapons disappear entirely out of your own hands. Maybe Spirit tries loading some none existing idle animations?
  • Some of the explosion effects are simply put to massive and fill half the map with it's effect. I also recommend to tone down the AOE explosion effect. Maintaining a certain balance with default hl1 mods. In case other people may eventually want to port their mods over to your version.
  • It happens sometimes that your night goggles won't remain active after a map change. While you do have the green screen is still present but the light of the googles is missing what effectively turns you blind. in that case x2 F.
  • Self placed tripmines are like 20cm away of the walls where you placed em.
  • The op4 ammo spores are not working yet. As they won't keep sticking on walls.
  • The baby headcrab uses the regular headcrab model. Easy to fix with a model swap inside your pak.
  • Serious bug: After loading a savegame all Zombies in a map are invincible. That being said Zombies gave 0 damage to me and I was unable to give 0 damage to them. It seems as some values in the skill.cfg were all the sudden ignored. Other monsters were still functioning normally.
  • Baby Voltigors use the wrong death animation.
  • The grapping gun still misses it's alternate fire mode.
  • I recommend fast weapon switching.
  • The knife is identical to the crowbar and requires visual and sound adjustments being made to it. The attack distance is also not the same at the moment.
  • Sometimes your guns aren't reloading automatically. But that bug was also present in default hl1.
  • The Opfor Engineer still requires his Sprites while welding.
  • Noticed that the original default desert background has been swapped. To maintain compatibility I suggest restoring the default one. Additional ones can get added for mappers after release.
  • Encountered a bug in my ported mod maps: Map6 und map14 crash and are unplayable : Wrote erroneous message to buffer.dat
Host_Error: PF_precache_sound_I: Sound 'houndeye/he_blast2.wav' failed to precache because the item count is over the 512 limit.
Reduce the number of brush models and/or regular models in the map to correct this. If possible for you enhance the pre-cache limit. The mod worked fine in Steam on default op4/hl1. So it should be possible.
  • The particle system is still none functioning. All files delivered are present but in game you just get little error message models popping up while they are supposedly playing.
  • The Shock_roach is not yet catch-able/collectable the first time.
  • The shock roach it's turn rate is too slow and should get adjusted to op4 specs.
  • All human grunts wearing helmets can still get head shots at the moment. Bullets need to bounce off on their helmets.
Wishes for next version:

Please add the Black Ops and working spore ammo asap. So that I can continue testing on my mod port.
You must be logged in to post a response.