[ZScript] Cross-wad "extend class"

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

Moderator: GZDoom Developers

[ZScript] Cross-wad "extend class"

Postby axredneck » Mon Jan 14, 2019 5:23 pm

Use case: extend classes defined in gzdoom.pk3, e.g.:
Code: Select allExpand view
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 allExpand view
class Cacodemon : Cacodemon
User avatar
axredneck
excuse me for my bad English
 
Joined: 11 Dec 2017
Location: Russia
Github ID: axredneck
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

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

Postby axredneck » Mon Jan 14, 2019 5:26 pm

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
axredneck
excuse me for my bad English
 
Joined: 11 Dec 2017
Location: Russia
Github ID: axredneck
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

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

Postby Matt » Tue Jan 15, 2019 1:58 am

User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

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

Postby D2JK » Tue Jan 15, 2019 8:40 am

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).
D2JK
 
Joined: 30 Aug 2014

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

Postby Blue Shadow » Tue Jan 15, 2019 10:43 am

Is it? To me this request is about modifying, which is unlikely to happen, not extending.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

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

Postby D2JK » Tue Jan 15, 2019 1:42 pm

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.
D2JK
 
Joined: 30 Aug 2014


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest