Page 1 of 1

How to modify existing things like monsters?

PostPosted: Thu Nov 18, 2021 4:21 pm
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?

Re: How to modify existing things like monsters?

PostPosted: Thu Nov 18, 2021 11:16 pm
by Blue Shadow
necros wrote:Is there a way to modify one aspect of a monster while leaving everything else alone?

Yes, through inheritance.

Code: Select allExpand view
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.

Re: How to modify existing things like monsters?

PostPosted: Sat Nov 20, 2021 10:39 pm
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 inheritance.

Code: Select allExpand view
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!