Fast demons have a slow pain

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

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 OFF
Smilies are ON

Topic review
   

Expand view Topic review: Fast demons have a slow pain

Re: Fast demons have a slow pain

by Graf Zahl » Sat Jun 16, 2012 10:54 am

See Gez's initial post. It's used just like 'Bright' and only affect the states it's on, not the entire sequence.

Re: Fast demons have a slow pain

by Xtyfe » Sat Jun 16, 2012 10:38 am

How would this keyword be used? Would it only work on the frames its placed on during fast monsters?

Re: Fast demons have a slow pain

by Graf Zahl » Sat Jun 16, 2012 2:23 am

After some thinking I decided to deprecate the flags and render them inoperable.

The thing is, both solutions will create incompatibilities.
The flags haven't been Dehacked-compatible and affected older monsters they shouldn't have so keeping them will cause problems here
Removing the flags will affect a few WADs that derive monsters from the Demon and here's 2 cases: Mods that weren't aware of this behavior and mods that were.

In the end I just think that the mods that are adversely affected by keeping the flags are clearly in the minority - I'm not even sure how well some of these newfangled 'gameplay' mods work with Nightmare mode - and these flags constitute a robustness issue so removing them seems like the best solution in my book.

The new 'Fast' keyword is a much better way to handle this.

Re: Fast demons have a slow pain

by XutaWoo » Wed Jun 13, 2012 8:21 pm

Graf Zahl wrote:The question is, what to do with these flags. They are crude hacks at best and I have no idea how many people might use some monsters inherited from the Demon in fast mode. The flags are inheritable, the state keyword of course is not, if the states are changed.
Make 'em act like +BRIGHT for states after specific labels that don't have the keyword and deprecate 'em? Seems like a simple solution conceptually.

Re: Fast demons have a slow pain

by Xaser » Wed Jun 13, 2012 4:04 pm

Cue Psychic.

Code: Select all

ACTOR NiteShot : PlasmaBall
{ 
    Scale 0.3
    Alpha 0.75
    Damage 8
    Speed 20
    SeeSound "weapons/nightmarebounce"
    DeathSound ""
    Reactiontime 10
    + DOOMBOUNCE
	Damagetype "Nightmare"
	Obituary "%o let %k become %p new nightmare."
    States
    {
    ...
    }
}
;)

Re: Fast demons have a slow pain

by Gez » Wed Jun 13, 2012 3:10 pm

Edward-san wrote:Pain.Nightmare state in Demon actor definition?
That would be a colossal mixup which would make everything impossible to understand. People would go saying "You cannot grasp the true form of ZDoom's custom pain states".

Seriously, though. Pain.Whatever is for Whatever damage. What happens if someone has a weapon that inflicts Nightmare damage and doesn't play in Nightmare! mode?

Re: Fast demons have a slow pain

by Edward-san » Wed Jun 13, 2012 7:01 am

Pain.Nightmare state in Demon actor definition?

Re: Fast demons have a slow pain

by Graf Zahl » Wed Jun 13, 2012 1:57 am

The 'Fast' keyword is a good idea.
The question is, what to do with these flags. They are crude hacks at best and I have no idea how many people might use some monsters inherited from the Demon in fast mode. The flags are inheritable, the state keyword of course is not, if the states are changed.

Re: Fast demons have a slow pain

by Xtyfe » Tue Jun 12, 2012 9:15 pm

Why would this be for demons only? Interesting eitherway

I would also like to see a fast keyword thing

Fast demons have a slow pain

by Gez » Tue Jun 12, 2012 12:59 pm

Since there was some discussion about the subject on the Doom wiki, I've noticed this:

Vanilla Doom:

Code: Select all

	for (i=S_SARG_RUN1 ; i<=S_SARG_PAIN2 ; i++) 
	    states[i].tics >>= 1; 
Still vanilla:

Code: Select all

    {SPR_SARG,0,2,{A_Chase},S_SARG_RUN2,0,0},	// S_SARG_RUN1
    {SPR_SARG,0,2,{A_Chase},S_SARG_RUN3,0,0},	// S_SARG_RUN2
    {SPR_SARG,1,2,{A_Chase},S_SARG_RUN4,0,0},	// S_SARG_RUN3
    {SPR_SARG,1,2,{A_Chase},S_SARG_RUN5,0,0},	// S_SARG_RUN4
    {SPR_SARG,2,2,{A_Chase},S_SARG_RUN6,0,0},	// S_SARG_RUN5
    {SPR_SARG,2,2,{A_Chase},S_SARG_RUN7,0,0},	// S_SARG_RUN6
    {SPR_SARG,3,2,{A_Chase},S_SARG_RUN8,0,0},	// S_SARG_RUN7
    {SPR_SARG,3,2,{A_Chase},S_SARG_RUN1,0,0},	// S_SARG_RUN8
    {SPR_SARG,4,8,{A_FaceTarget},S_SARG_ATK2,0,0},	// S_SARG_ATK1
    {SPR_SARG,5,8,{A_FaceTarget},S_SARG_ATK3,0,0},	// S_SARG_ATK2
    {SPR_SARG,6,8,{A_SargAttack},S_SARG_RUN1,0,0},	// S_SARG_ATK3
    {SPR_SARG,7,2,{NULL},S_SARG_PAIN2,0,0},	// S_SARG_PAIN
    {SPR_SARG,7,2,{A_Pain},S_SARG_RUN1,0,0},	// S_SARG_PAIN2
ZDoom:

Code: Select all

int AActor::GetTics(FState * newstate)
{
	int tics = newstate->GetTics();
	
	if (isFast())
	{
		if (flags5 & MF5_FASTER)
		{
			if (InStateSequence(newstate, SeeState)) return tics - (tics>>1);
		}
		if (flags5 & MF5_FASTMELEE)
		{
			if (InStateSequence(newstate, MeleeState)) return tics - (tics>>1);
		}
	}
	return tics;
}
In vanilla, the demon has the duration of its state halved in the sequences S_SARG_RUN* (See), S_SARG_ATK* (Melee), and S_SARG_PAIN* (Pain). In ZDoom, only See and Melee are halved in this way.

There needs to be an MF6_FASTPAIN flag too, I guess.

It might be complicated by the existence of custom pain types, but vanilla accuracy only requires to handle the generic Pain state with no need to handle more complex things. (Especially given how the FASTER and FASTMELEE flags are a bit useless with the complicated actor scripting that goes on nowaday with A_JumpIfs everywhere and dozens of labels.)


Alternatively, it could be a boolean flag on the state themselves. Kinda like the Bright keyword, there'd be a Fast keyword? The demon's code could look like this:

Code: Select all

States
  {
  Spawn:
    SARG AB 10 A_Look
    Loop
  See:
    SARG AABBCCDD 2 Fast A_Chase
    Loop
  Melee:
    SARG EF 8 Fast A_FaceTarget
    SARG G 8 Fast A_SargAttack
    Goto See
  Pain:
    SARG H Fast 2
    SARG H Fast 2 A_Pain
    Goto See
  Death:
    SARG I 8
    SARG J 8 A_Scream
    SARG K 4
    SARG L 4 A_NoBlocking
    SARG M 4
    SARG N -1
    Stop
  Raise:
    SARG N 5
    SARG MLKJI 5
    Goto See
  }

Top