Saints Row: The Third Weapon Classes and Vehicles

Which file(s) needs to be edited to enable/disable the usage of a certain weapon while driving a vehicle or riding in it as a passenger? I'd love to be able to enable shotguns while riding on a motorcycle, Terminator 2 style! I know it's related to the weapon_class but I've been unable to change anything related to weapon classes with the tools we have now.
 
You should be able to just change the weapon class to "pistol" or "smg" in weapons.xtbl. Code does restrict the driver's weapon to those classes, plus "script", "thrown", and "sword" for motorcycles only (a holdover from SR2). This is unfortunately not tweakable behavior, so you can't just enable new weapon classes for driving.

I just changed the class of the gang shotgun to "pistol" on an SR4 build I already had ready, and that unlocked the shotgun while driving. As far as I can tell, the code that handles this hasn't changed, so I don't expect there to be a difference.

Changing the weapon class may have other implications beyond this, of course. I don't know what they all might be.

Are you having an issue with a specific motorcycle? That might also play into it.
 
One thing that changing the weapon class did in sr2 was that unlimited ammo unlocks no longer worked for that class. Not that big of a deal, but figured I'd mention it.

EDIT:
For example, if you changed a weapon's shotgun class to pistol, you would need unlimited pistol ammo for it to work and not unlimited shotgun ammo. That really confused the hell out of people with GotR when we made the sawed off a pistol so it could dual wielded and useable on bikes.
 
Yeah, that's one of the side effects.

I'm grasping at straws here, but one other possibility is you might be able to get the inventory Lua to ignore the availability data that gets sent.
 
I think it's vdo_weapon_radial.lua - Vdo_weapon_radial:slots_update. Not too familiar with inventory stuff.

I have no idea what will happen when you change this, but if you bash availability to true before calling slot:update, it *might* allow you to equip the shotgun in the vehicle, or really any time you want.
 
Back
Top