Garry's Mod

Garry's Mod

Drivable prop_vehicle_apc
A Call for a supplementary addon.
I know you said that you weren't doing anything to THIS addon specifically, but when I was driving the APC, I couldn't help but feel that there should at least be a supplementary addon of some kind that boosts the APC's Capabilities to a point where it feels like it has a use.

Right now my complaints are all about speed, It's incredibly slippery and it's slow & doesn't have a lot of power behind it. All it has going for it right now are its rockets & gun, and Since there isn't a delay on the Gun's ROF like the NPC, it expends its 10-round clip VERY FAST and there isn't a way to change that.

I'd also like for the addon to have a model modification where it does add proper placements for player & camera.

There are 2 mods you could use as candidates for the modification.

1. https://gamebanana.com/mods/181981

This (decade and a half-old mod, impressively) could be used for the model, whatever you do, use the SMOD NPC Replacement version, since the base HL2 variant has a worse camera view.

(there's also a muzzleflash screw up in this version since the tracers & flash for the pulse gun come from the rocket cannon)

There are scripts linked to this version, but right now, they have a very big lack in the steering department, but could be used to modify this to a more satisfactory value.


2. https://gamebanana.com/mods/181957

If you wanted to add an interior and entry animation, this buggy replacement addon could likely be modified to suit the proper APC.

If you ever decide to tackle this, make it a separate addon from the core APC driving functionality this mod grants.
< >
Showing 1-15 of 15 comments
TotalChaos 13 Oct, 2023 @ 2:02pm 
Fixing the steering and speed would require editing one of the APC's scripts (apc.txt, apc_npc.txt, or even driveway.txt for beta, but driveway.txt doesn't work normally because it's not set up right for modern versions of the vehicle entities). But, it's an APC (Armoured Personnel Carrier). Real life APCs are made to be slow, powerful, and to be able to transport soldiers and other equipment from one place to another. So this is accurate to real APCs.
https://en.wikipedia.org/wiki/Armoured_personnel_carrier

However, you don't need to modify one of those old Half-Life 2 mods to fix the Combine APC model. You can just use the official source from the 2023 gigaleak and add the required attachments, or you can decompile the retail model and add attachments to that (you would have to fix the physics model, though, because its position and rotation get messed up when it's decompiled). After that, you won't have to bother with fixing the machine gun because this addon fixes that in code.

In fact, here's a fix I made right here:
https://drive.google.com/file/d/19w6ZW9aRm0FdRJ8c8KlLEsnU137_AJFY/view?usp=sharing
I also made an edited version of jeep_test.txt to use Combine APC sound effects and to fix the suspension for the Combine APC model. Replaces both apc.txt and apc_npc.txt.
I made the scripts so that the Combine APC performs more like the jeep, just because you wanted it to perform better.
The only problem is that the textures are a bit low resolution when looked at up-close. But I don't see that as an issue personally, so I'm not gonna fix that.

No, I will not be porting this to Half-Life 2.
Last edited by TotalChaos; 13 Oct, 2023 @ 2:14pm
TotalChaos 13 Oct, 2023 @ 2:11pm 
About that mod with an interior and enter/exit animation...
I DID modify that model to fix a few bugs, and make it compatible with Garry's Mod. But because it's not my mod, I will not be releasing it.

Also, something else I wanted to point out, nearly every Combine APC model replacement will work with this addon that fixes prop_vehicle_apc. It'll even fix the guns. Just needs the right attachments, and it'll work just fine.
Gordon? GORDAN! 13 Oct, 2023 @ 3:59pm 
I believe that Gamebanana addons have been uploaded to Garry's Mod without much hazard to the uploader or creator.

Just try to credit them for the original creation and things will likely go smoothly.
smartshout 14 Oct, 2023 @ 10:29pm 
Gamebanana work for GMOD?
Gordon? GORDAN! 14 Oct, 2023 @ 10:36pm 
Yes.

some Gamebanana addons work for GMod, just put them in the addons folder & GMod will use them.
Gordon? GORDAN! 15 Oct, 2023 @ 11:40pm 
@Totalchaos

To your knowledge, I wonder if there's a way to edit the APC's guns & magazines as well as possibly reverse-engineer a vehicle destuction sequence onto other Vehicles like the Airboat, Scout Car, or Jalopy to make them be able to be destroyed with enough firepower?
kwaHliveD  [developer] 16 Oct, 2023 @ 10:26am 
following is easier to modify:

apc primary ammo count
apc primary ammo reload delay
apc primary ammo damage (bound to a cvar)
apc secondary ammo count
apc secondary ammo reload delay
apc secondary fire interval

it is also possible to implement a similar explosion sequence for all other vehicles, but not something within my plans.
TotalChaos 16 Oct, 2023 @ 10:47am 
Originally posted by kwaHliveD:
following is easier to modify:

apc primary ammo count
apc primary ammo reload delay
apc primary ammo damage (bound to a cvar)
apc secondary ammo count
apc secondary ammo reload delay
apc secondary fire interval

it is also possible to implement a similar explosion sequence for all other vehicles, but not something within my plans.
Please add primary and secondary gun CVars in the next update. prop_vehicle_apc in Half-Life 2 was balanced for the player to fight it, not for the player to be controlling it. Which is why I think Valve didn't add a cooldown to the Tau Cannon, and why the airboat's gun works the way it does.
Last edited by TotalChaos; 16 Oct, 2023 @ 10:48am
Gordon? GORDAN! 16 Oct, 2023 @ 4:10pm 
Prop_vehicle_apc's gun seems to answer to the sk_npc_ar2_dmg command in terms of primary damage output.

Which means that Prop_vehicle_apc's gun has the exact same damage equivalent to an AR2 used by an NPC, only with more firerate (when used by a player, npc_apcdriver seems to "pace" its shots to give the illusion of a heavier, slower gun when it's ANYTHING but) and only the measly clip size of 10 per magazine before needing to reload again.
Last edited by Gordon? GORDAN!; 16 Oct, 2023 @ 4:12pm
TotalChaos 17 Oct, 2023 @ 1:22pm 
Originally posted by Gordon? GORDAN!:
Prop_vehicle_apc's gun seems to answer to the sk_npc_ar2_dmg command in terms of primary damage output.

Which means that Prop_vehicle_apc's gun has the exact same damage equivalent to an AR2 used by an NPC, only with more firerate (when used by a player, npc_apcdriver seems to "pace" its shots to give the illusion of a heavier, slower gun when it's ANYTHING but) and only the measly clip size of 10 per magazine before needing to reload again.
Just checked the source code, and prop_vehicle_apc's code doesn't mention sk_npc_dmg_ar2 anywhere (I don't know how to read the code that controls the firing, so I'm not sure how much damage it really does).
I agree that something needs to be done with how many bullets it can fire before reloading. Plus, I think aiming needs to be improved, because right now it's very hard to tell where you're aiming the gun or the rocket (and now I see why the auto-aim stuff was implemented for the rockets).
Gordon? GORDAN! 19 Oct, 2023 @ 5:26pm 
I think it deals around 3 to 2 damage per shot.

I saw it in action with https://steamproxy.net/sharedfiles/filedetails/?id=1452536113&searchtext=Health+bar+addon

Shooting Props or NPCs, and then getting out to inspect it.
Last edited by Gordon? GORDAN!; 19 Oct, 2023 @ 5:26pm
kwaHliveD  [developer] 20 Oct, 2023 @ 12:52pm 
there will be that next update with more cvars. i have more personal stuff, though.

about the bullet damage: in hl2 source code, bullet damage is retrieved automatically from the ammo type of the bullet. at https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/sp/src/game/server/hl2/vehicle_apc.cpp#L845 you can clearly see the apc fires ammo type "AR2". and at https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/sp/src/game/shared/hl2/hl2_gamerules.cpp#L1801C111-L1801C111 the AR2 damage is bound to the cvar named "sk_plr_dmg_ar2" and "sk_npc_dmg_ar2".

in gmod's glua, it is easier to modify damage through the bullet table which you preconstruct before firing the bullet, or even modify bullet damage by other hooks, giving the scripter more freedom on using any bullet type and choosing damage count externally, independent of bullet type. but in hl2 c++ code, you must determine ammo type before firing the bullet, and that bullet must already have set its damage count because your bullets are going to retrieve the damage from that "ammo" definition array.
Last edited by kwaHliveD; 20 Oct, 2023 @ 12:58pm
Gordon? GORDAN! 22 Oct, 2023 @ 3:01pm 
Originally posted by TotalChaos:
Fixing the steering and speed would require editing one of the APC's scripts (apc.txt, apc_npc.txt, or even driveway.txt for beta, but driveway.txt doesn't work normally because it's not set up right for modern versions of the vehicle entities). But, it's an APC (Armoured Personnel Carrier). Real life APCs are made to be slow, powerful, and to be able to transport soldiers and other equipment from one place to another. So this is accurate to real APCs.
https://en.wikipedia.org/wiki/Armoured_personnel_carrier

However, you don't need to modify one of those old Half-Life 2 mods to fix the Combine APC model. You can just use the official source from the 2023 gigaleak and add the required attachments, or you can decompile the retail model and add attachments to that (you would have to fix the physics model, though, because its position and rotation get messed up when it's decompiled). After that, you won't have to bother with fixing the machine gun because this addon fixes that in code.

In fact, here's a fix I made right here:
https://drive.google.com/file/d/19w6ZW9aRm0FdRJ8c8KlLEsnU137_AJFY/view?usp=sharing
I also made an edited version of jeep_test.txt to use Combine APC sound effects and to fix the suspension for the Combine APC model. Replaces both apc.txt and apc_npc.txt.
I made the scripts so that the Combine APC performs more like the jeep, just because you wanted it to perform better.
The only problem is that the textures are a bit low resolution when looked at up-close. But I don't see that as an issue personally, so I'm not gonna fix that.

No, I will not be porting this to Half-Life 2.


A bit late of a reply, I know, but I think your addon conflicts with the APC in this addon

https://steamproxy.net/sharedfiles/filedetails/?id=831680603&searchtext=%5Bsimpfhys%5D+armed

It causes the "seat" for the player in the Simfphys one to be lifted into the air.

I really do like both addons. I'm just bringing this to your attention.
TotalChaos 22 Oct, 2023 @ 6:19pm 
Originally posted by Gordon? GORDAN!:

A bit late of a reply, I know, but I think your addon conflicts with the APC in this addon

https://steamproxy.net/sharedfiles/filedetails/?id=831680603&searchtext=%5Bsimpfhys%5D+armed

It causes the "seat" for the player in the Simfphys one to be lifted into the air.

I really do like both addons. I'm just bringing this to your attention.
My guess is that addon uses the default Combine APC model (combine_apc.mdl), and does its own fixes in code. If that's the case, then I can't fix that. You're gonna have to go into the addon's code and either delete or comment out the code that fixes the model.
Or, you can copy the original Combine APC model somewhere else, and tell the addon to use that model instead. Either way, I'm pretty sure it's that addon at fault, not mine.
Last edited by TotalChaos; 22 Oct, 2023 @ 6:20pm
Gordon? GORDAN! 22 Oct, 2023 @ 6:22pm 
That's what I suspected.
< >
Showing 1-15 of 15 comments
Per page: 1530 50