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

Modifying DECORATE base classes

Recommended Posts

Is there a way to modify/redefine DECORATE's base classes?

More specifically, I know how I can define a new item/monster etc. and place it in a map, but I want to make a sort of expansion pack that replaces base properties of Doom's standard items (let's say...using my own sound lumps for each item) and will work with ANY WAD using standard items (you won't need to edit all items to reflect DECORATE ones).

From what I grasped, that isn't possible or even contemplated in DECORATE, as I can't redefine base classes: while every enemy/item has a decorate equivalent, those can only be used as a template/base class for new ones, and not directly modified.

In fact, ZDoom will bomb if I try to redefine e.g. the Shotgun class to use a certain pickup sound, let's say "MYPICKUP". Help!!!

Share this post


Link to post

DECORATE can't modify existing things at all? Surely there is a way to do it. Isn't there some way to override an existing type with a new one? I'm almost certain I've seen an example of it somewhere.

Share this post


Link to post

I would remember such an example if there was one...but I think it just wasn't contemplated. Most DECORATE projects define new stuff and use them in appropriately modified maps.

I think this is confirmed by the example of the Postal 2 meets Doom mod. No ACS, no DECORATE, but SNDINFO seems to do the trick, so I don't need an answer to the first question anymore. Thanks for replying though.

Share this post


Link to post
Quasar said:

DECORATE can't modify existing things at all? Surely there is a way to do it. Isn't there some way to override an existing type with a new one? I'm almost certain I've seen an example of it somewhere.


You can: Use the replaces keyword.

Share this post


Link to post

A practical example?

E.g. is

actor MyShotgun replaces Shotgun: 2001
{
//.... various definitions, unchanged

// INTENDED CHANGE
inventory.pickupsound MYSOUND

//... other definitions, unchanged

}
}

correct?

Share this post


Link to post

Yeah yeah, I got that to work with

actor MaesShotgun : Shotgun replaces Shotgun
Now, the problem is the new pickup sound doesn't work :-S

The code doesn't bomb, ZDoom starts up nicely, but the shotgun has no pickup sound. None at all. The full code:
actor MaesShotgun : Shotgun replaces Shotgun
{
  inventory.pickupsound "MAESSHTG"
}
Where "MAESSHTG" would be my new sound lump (WAV, 8-bit, 11 KHz, loaded with XWE's "Load" function , not "Load (Raw data)".

UPDATE: The sound was just too low to be heard. It works now, but I also had to alias the "MAESSHTG" sound to something else with SNDINFO, as ZDoom's scripting system doesn't seem to handle direct lump references. Again, thanks for all the replies, they helped me getting this sorted quicker.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
×