Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Phml

DeHacked - putting weapons in different slots

Recommended Posts

I wanted to have the shotgun as the starting weapon and on slot 2, rather than the pistol, so I replaced the pistol with the shotgun and turned the old shotgun into a "nothing" weapon that doesn't appear at all (making sergeants drop shells rather than shotguns).

Problem is, everytime I'm out of ammo on the chaingun and walk on a clip while using the shotgun, the doomguy immediately switches to the chaingun. I suppose it's unavoidable, but just to be sure - is it ?

Share this post


Link to post

Changing the order/preference of weapons in the original executable would require binary hacks, I am afraid.

Share this post


Link to post

Yeah, DeHackEd weapon mods for vanilla have to correlate weapons by ammo type and not break the usual weapon ranks much. What you can do is make the SSG slot 4, and the chaingun and pistol slot 3. It's still a bit lame because the chaingun gets priority over most weapons when something runs out of ammo. If your mod is for Boom, you could note the recommended weapon switching order in the text file.

Share this post


Link to post

If your mod is for Boom, you could note the recommended weapon switching order in the text file.


Thanks ! My mod is actually for Boom (well, PrBoom+, but with Boom compatibility). I had no clue you could change the weapon switching order in that port. I took a look in BOOMREF.txt and didn't find how to do it there. How would I go about doing that ?

Share this post


Link to post

I think he means that you can change the weapon order from the in game menus.

Options -> Setup -> Weapons.

Share this post


Link to post

Right. First time I notice that, hehe. Thanks for the help everyone. :)

Edit : just tried moving things around in the PrBoom+ weapons menu, but nothing seem to change. I.e., setting the pistol (2) in top priority doesn't make it switch to the pistol if I'm out of ammo and pick a clip, and on the other hand I still switch from pistol to shotgun if I walk on shotgun shells while using the pistol. There's something I don't get here.

Share this post


Link to post

AFAIK the weapon preference is only used when you run out of ammo.
I don't think the preferences apply when you pick up ammo.
I may be wrong but I think that choice may be hard coded.

Share this post


Link to post

Yeah, it seems to be buggy. The code that controls weapon switching when you pick up an item must be different from the code used when you run out of ammo, and only the latter is affected by the user-configurable weapon order.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×