Grouped action specials in DECORATE
Moderator: GZDoom Developers
Re: Grouped action specials in DECORATE
I can see the benefits of using #### as Gez proposed. I would Search & Replace that out in all of my mods in a heartbeat if GZDoom Builder supported it like SLADE does... but it's not really a high priority for me at this moment and I can live with it not being implemented in GZDB.
Re: Grouped action specials in DECORATE
Seeing that is possibly gonna happen makes me excited as hell. I can't help but wonder, is the syntax going to be something like this?
Code: Select all
CustomAF A_RebelChase
{
if( CheckClass("SpectralMonster", AAPTR_TARGET, true) )
{
A_ChangeFlag("FRIGHTENED", 1);
if( random(1,100) <= 10 )
A_PlaySound("rebel/runforyourlives", CHAN_VOICE);
A_Chase("", "", CHF_NOPLAYACTIVE);
}
else
{
A_ChangeFlag("FRIGHTENED", 0);
A_Chase;
}
}
Actor NewRebel : Rebel
{
States
{
See:
HMN1 AABBCCDD 3 A_RebelChase
Loop
}
}
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: Grouped action specials in DECORATE
That actually looks like something I'd expect too, Fishy. 

- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Grouped action specials in DECORATE
You won't get a 'CustomAF', of course, but the long term plan is to be able to add custom code to actors - not just action functions, but also extensions to internal methods.
Re: Grouped action specials in DECORATE
Could you please elaborate what you mean by 'internal methods'? Does this include being able to, say, decide if an actor should or should not change its target to what's attacking it right now based on certain criteria (what class is the attacker, is it a player, etc) IE kind of like how OkayToSwitchTarget works?Graf Zahl wrote:...but also extensions to internal methods.
Or am I getting my hopes up for no good reason?
Re: Grouped action specials in DECORATE
Does that mean custom functions created for an actor cannot be reused by another without inheritance, or am I reading this wrong?Graf Zahl wrote:You won't get a 'CustomAF', of course, but the long term plan is to be able to add custom code to actors - not just action functions, but also extensions to internal methods.
Re: Grouped action specials in DECORATE
Will that do, or am I missing something?Nash wrote:I can see the benefits of using #### as Gez proposed. I would Search & Replace that out in all of my mods in a heartbeat if GZDoom Builder supported it like SLADE does...
Code: Select all
public static bool IsIgnoredSpriteName(string name)
{
return (name.StartsWith("TNT1A") || name.StartsWith("NULL") || name.StartsWith("----") || name.Contains("#"));
}
Re: Grouped action specials in DECORATE
I guess that'll do? But I don't know too much about programming and what other implications or side effects this may cause... will only be able to find out when I actually run the program. :D
Re: Grouped action specials in DECORATE
By "am I missing something?" I meant "are there some other 'special' sprite names, which should be ignored?"
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Grouped action specials in DECORATE
With TNT1, the frame letter doesn't matter to the engine. Any frame (A-Z, [, \, ]) works the same, it's TNT1 that does the magic.MaxED wrote:Will that do, or am I missing something?
Also, NULL has no special meaning to the engine and shouldn't be ignored. Bad practices are not to be encouraged.

Re: Grouped action specials in DECORATE
This way then? (some refactoring was applied)
Code: Select all
// Ignore some odd ZDoom things
if (!spritename.StartsWith("TNT1") && !spritename.StartsWith("----") && !spritename.Contains("#"))
{
sprites.Add(spritename);
}
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Grouped action specials in DECORATE
Looks good to me.
Re: Grouped action specials in DECORATE
OK, fixed in r2163.
Re: Grouped action specials in DECORATE
What DDF converter?Snarboo wrote:I wonder if that DDF converter that was promised will make it in?
Re: Grouped action specials in DECORATE
From the [wiki=DoomScript]DoomScript[/wiki] article:
A DDF->DoomScript converter will be available so that people can both see how something done in DDF relates to something done in DoomScript, and also so that DDF mods will work with ZDoom. A DeHackEd->DoomScript converter might also be made, although doing anything with DeHackEd outside the original doom.exe is very problematic, and it might not be realistically possible to convert it to DoomScript with an automatic tool.