Page 1 of 1

[ZScript] Cross-wad "extend class"

Posted: Mon Jan 14, 2019 4:23 pm
by axredneck
Use case: extend classes defined in gzdoom.pk3, e.g.:

Code: Select all

extend class Cacodemon
{
	default
	{
		+FORCEXYBILLBOARD;
	}
}
Yes, sometimes "class Cacodemon2 : Cacodemon replaces Cacodemon" is not enough because name of resulting class is different from original class so other actors (including actors from other wads) will consider such actor as not Cacodemon but different monster.

Alternative variant would be to make such expression valid:

Code: Select all

class Cacodemon : Cacodemon

Re: [ZScript] Cross-wad "extend class"

Posted: Mon Jan 14, 2019 4:26 pm
by axredneck
Bigger usecase:
I want to make my own fixes.pk3 which would fix some aspects of original Doom/Heretic/Hexen but at the same time would be compatible with most of community wads.

Re: [ZScript] Cross-wad "extend class"

Posted: Tue Jan 15, 2019 12:58 am
by Matt

Re: [ZScript] Cross-wad "extend class"

Posted: Tue Jan 15, 2019 7:40 am
by D2JK
If I didn't overlook some details, this request is about what was being discussed in the linked thread after the original request got "No'd". So I think it's good that this thread was created as the other one is unlikely to be updated by an addition not originally requested. This way we can get a notification when/if this is added, which is something I was wondering myself (as I'm looking forward to the feature as well).

Re: [ZScript] Cross-wad "extend class"

Posted: Tue Jan 15, 2019 9:43 am
by Blue Shadow
Is it? To me this request is about modifying, which is unlikely to happen, not extending.

Re: [ZScript] Cross-wad "extend class"

Posted: Tue Jan 15, 2019 12:42 pm
by D2JK
Ok. To be clear, what I'm interested in is extending the base actor class, eg. to insert a function into it that all actors in a mod could then call directly.