Modeldef Inheritance

Forum rules
Please see Code submission guidelines

GZDoom Status:
Image

Legacy Status:
Image Image

QZDoom Status:
Image

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Modeldef Inheritance

Re: Modeldef Inheritance

by lulle » Mon May 30, 2022 11:53 am

Dreams came true!

Re: Modeldef Inheritance

by Major Cooke » Wed Oct 27, 2021 7:41 pm

Something that everyone has been asking for, for a long... long time. Excellent!

Re: Modeldef Inheritance

by Cherno » Fri Oct 15, 2021 4:40 pm

I approve of this feature!

Modeldef Inheritance

by Shiny Metagross » Fri Oct 15, 2021 11:54 am

Pull Request

Intro
Ever find yourself having to copy hundreds, or even thousands of lines for a silly thing such as a skin or model swap? This is a keyword you can use in modeldef. It specifies an actor's modeldef that you can inherit for this new actor's. I created this keyword for model def because my work process on my latest tinkering has been incredibly hampered by the lack of being able to just use a keyword to simply copy the frames I need. If you're creating enemy variants that use models, but also use trivial changes such as a skin or a model, then this is the feature you need.

Usage:
When using this keyword, all properties defined before the keyword will be transfered to each of the inherited frames. As such, this is most useful for models that do not change any properties after defining the first frameindex. In other words, you must first specify the properties you want to replace for the inherited frames, then specify Inherits.

You can use Inherits as many times as you want.

Inheriting flags works by combining the added flags to the inherited frameindices.

Here is a sample wad file of it's usage. Very rudimentary:
modeltest.pk3
(127.28 KiB) Downloaded 222 times

Top