Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
m3_mapper

How do I change the weapons a player spawns with?

Question

Hi, I'm trying to work on a mod with modified weapons, and I was wondering how possible it would be to alter which weapons the player would start with. For example, is there a way I could make the player start with a shotgun instead of a pistol? Could I remove the fist from the starting roster? Things like that.

Share this post


Link to post

15 answers to this question

Recommended Posts

  • 7

You'll need to create a new/inherited player class with all the weapons, ammo and items you want to start with via Decorate or ZScript, and then add the playerclass to the gameinfo section in your mapinfo lump so the game starts with the player you created.

Share this post


Link to post
  • 2
1 hour ago, m3_mapper said:

I got to look at the decorate stuff, and not only do I have no clue what half of it does but how to get the gameinfo section to recognise it.

In that case I recommend looking through your favorite mods that have custom classes, and seeing how they do it. If you're unsure of what something does, just type "zdoom" followed by the term you want to know more about into google and the most relevant zdoom.org link should be at the top.

 

Here's a wad that should demonstrate how it's done.

shotgun-player.zip

Share this post


Link to post
  • 1
15 hours ago, m3_mapper said:

yea and were talking gzdoom here

 

Fair, but the correct answer was already posted, so I wrote the vanilla explanation in case someone in a pair of years has the same question but for vanilla, and finds this thread through google or something.

Share this post


Link to post
  • 1

If you are looking for help for gzdoom, head over to the zdoom forums. Doomworld is focused more on vanilla and dehacked, so most people wont give you any clue regarding gzdoom.

Share this post


Link to post
  • 1
15 hours ago, ramon.dexter said:

If you are looking for help for gzdoom, head over to the zdoom forums. Doomworld is focused more on vanilla and dehacked, so most people wont give you any clue regarding gzdoom.

?

 

The top reply in this thread is Lippeth giving a consice a GZDoom-compatible answer, and I see decorate/UDMF questions getting answered over here all the time.. Not to say you shouldn't go to ZDoom or anything, but it just seems like a weird post given that I see "non vanilla/non oldschool" questions answered over here daily, lol

Share this post


Link to post
  • 0

There has been a rise with vanilla, a lot of people prefer source ports such as DSDA-Doom, Doom Retro, even Chocolate Doom, but back on topic I cant help you with that, another person can though.

Share this post


Link to post
  • 0
2 minutes ago, Redoom said:

There has been a rise with vanilla, a lot of people prefer source ports such as DSDA-Doom, Doom Retro, even Chocolate Doom, but back on topic I cant help you with that, another person can though.

who would that be?

Share this post


Link to post
  • 0

For vanilla, I'm like 99% sure (never did this myself, but the options are there) you can, say, replace all the pistol sprites by the shotgun sprites, and the shooting codepointers as well. But I'm pretty sure starting with the fists and the gun in slot 2 is hardcoded.

Share this post


Link to post
  • 0
53 minutes ago, Albertoni said:

For vanilla, I'm like 99% sure (never did this myself, but the options are there) you can, say, replace all the pistol sprites by the shotgun sprites, and the shooting codepointers as well. But I'm pretty sure starting with the fists and the gun in slot 2 is hardcoded.

yea and were talking gzdoom here

Share this post


Link to post
  • 0
1 hour ago, Lippeth said:

You'll need to create a new/inherited player class with all the weapons, ammo and items you want to start with via Decorate or ZScript, and then add the playerclass to the gameinfo section in your mapinfo lump so the game starts with the player you created.

I got to look at the decorate stuff, and not only do I have no clue what half of it does but how to get the gameinfo section to recognise it.

Share this post


Link to post
  • 0

If you're using GZDoom, modifying decorate files is probably overkill and might conflict with other mods. Easiest way is probably to use an ACS script that runs when the player enters the map with the takeinventory/clearinventory and giveinventory commands.

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
×