How to modify existing things like monsters?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
necros
Posts: 28
Joined: Mon Dec 30, 2019 10:26 pm
Contact:

How to modify existing things like monsters?

Post by necros »

I have this map with a lot of open areas. I'd like to have some flying monsters but the big downer about this is that whenever monsters like cacodemons take damage, they go flying off forever and never seem to recover (you can see them walking forward, and then floating backwards).
I've read that I can get around this by just increasing the mass of the monsters... so I opened up gzdoom.pk3, copied the cacodemon.zs file into my mod folder and changed the mass from 400 to 40000...
problem is when I run zdoom I get this: "File D:/Games/Doom/ne_tall/ is overriding core lump zscript/actors/doom/cacodemon.zs."
Is there a way to modify one aspect of a monster while leaving everything else alone?
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: How to modify existing things like monsters?

Post by Blue Shadow »

necros wrote:Is there a way to modify one aspect of a monster while leaving everything else alone?
Yes, through [wiki=Using_inheritance]inheritance[/wiki].

Code: Select all

actor HeavyCacodemon : Cacodemon
{
    Mass 40000
} 
That creates a version of the Cacodemon which has a higher mass than the original, while retaining everything else the same.
necros
Posts: 28
Joined: Mon Dec 30, 2019 10:26 pm
Contact:

Re: How to modify existing things like monsters?

Post by necros »

Blue Shadow wrote:
necros wrote:Is there a way to modify one aspect of a monster while leaving everything else alone?
Yes, through [wiki=Using_inheritance]inheritance[/wiki].

Code: Select all

actor HeavyCacodemon : Cacodemon
{
    Mass 40000
}
That creates a version of the Cacodemon which has a higher mass than the original, while retaining everything else the same.
Thanks, I didn't realize the answer was to just create a new monster class. I think I'll have to take a look at the zscript stuff a bit since I've just been using the old decorate method until now. I didn't know it was deprecated!
Post Reply

Return to “Scripting”