Jump to content
  • 0

How do i change enemy drops?


Voidic

Question

Ok so im making a partial conversion with different weapons than vanilla, though like for example: When i kill a sergeant they drop the vanilla shotgun instead of the custom shotgun, how do i fix this?

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 1

for GZDoom, there are a few ways to go about it.

 

1. In your DECORATE/ZSCRIPT code for your shotgun replacement, use the "replaces" keyword. It would look something like this:

Actor CUSTOMSHOTGUN : Doomweapon replaces Shotgun
{
	...
}

2. Create new definitions for the enemies with drops that need to be replaced. Continuing with the "CustomShotgun" actor from earlier,

Actor UpdatedShotgunGuy: Shotgunguy replaces Shotgunguy
{
	Dropitem "CustomShotgun"
}

3. Attach the replacement information to each skill definition in your (Z)MAPINFO lump. Once again with the "CustomShotgun",

clearskills

skill ITYTD
{
   AutoUseHealth
   AmmoFactor = 2
   DamageFactor = 0.5
   EasyBossBrain
   SpawnFilter = Baby
   ReplaceActor = "Shotgun", "CustomShotgun"
   Name = "I'm Too Young To Die"
   Key = "i"
}

skill HNTR
{
  ...
  ReplaceActor = "Shotgun", "CustomShotgun"
  ...
}

 

Personally, I think option 1 is the easiest to do, but I can see going for option 2 if you're going to adjust the stock enemies anyway.

Edited by SMG_Man

Share this post


Link to post
  • 0

We need more infos: are you working for vanilla, boom, zandronum or gzdoom (else) compatibility?

Share this post


Link to post
  • 0
5 hours ago, Kan3 said:

We need more infos: are you working for vanilla, boom, zandronum or gzdoom (else) compatibility?

GZDoom

Share this post


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

for GZDoom, there are a few ways to go about it.

 

1. In your DECORATE/ZSCRIPT code for your shotgun replacement, use the "replaces" keyword. It would look something like this:


Actor CUSTOMSHOTGUN : Doomweapon replaces Shotgun
{
	...
}

2. Create new definitions for the enemies with drops that need to be replaced. Continuing with the "CustomShotgun" actor from earlier,


Actor UpdatedShotgunGuy: Shotgunguy replaces Shotgunguy
{
	Dropitem "CustomShotgun"
}

3. Attach the replacement information to each skill definition in your (Z)MAPINFO lump. Once again with the "CustomShotgun",


clearskills

skill ITYTD
{
   AutoUseHealth
   AmmoFactor = 2
   DamageFactor = 0.5
   EasyBossBrain
   SpawnFilter = Baby
   ReplaceActor = "Shotgun", "CustomShotgun"
   Name = "I'm Too Young To Die"
   Key = "i"
}

skill HNTR
{
  ...
  ReplaceActor = "Shotgun", "CustomShotgun"
  ...
}

 

Personally, I think option 1 is the easiest to do, but I can see going for option 2 if you're going to adjust the stock enemies anyway.

Thanks!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...