[ZScript] Cross-wad "extend class"

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
axredneck
Posts: 354
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia
Contact:

[ZScript] Cross-wad "extend class"

Post 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
User avatar
axredneck
Posts: 354
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia
Contact:

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

Post 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.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

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

Post by Matt »

D2JK
Posts: 543
Joined: Sat Aug 30, 2014 8:21 am

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

Post 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).
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Is it? To me this request is about modifying, which is unlikely to happen, not extending.
D2JK
Posts: 543
Joined: Sat Aug 30, 2014 8:21 am

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

Post 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.
Post Reply

Return to “Feature Suggestions [GZDoom]”