Page 1 of 1

Strife: Bloodbath is *too* aggressive

PostPosted: Thu Apr 17, 2014 4:40 pm
by Gez
When playing in Bloodbath mode in Strife, monsters such as acolyte open fire practically as soon as they see you and then will not do anything else but shoot at you until you hide behind cover. However, in vanilla, they do move around quite a lot, making the start of the game a lot more survivable, as demonstrated here by Belial:

Or here by someone else:


You'll notice that despite the acolytes moving and shooting faster than they do in ZDoom (their states lack the fast flag, as shown here), they're quite easier to kill without getting shredded because they waste a lot of time moving around. In ZDoom, they don't.

Re: Strife: Bloodbath is *too* aggressive

PostPosted: Fri Apr 18, 2014 10:17 am
by FishyClockwork
Hell, I was about to report this. :P

In this case I would suggest something like "StrifeFastMonsters" to be implemented and replace "FastMonsters" in Strife's "Bloodbath" skill definition.

The only thing "StrifeFastMonsters" would do is halve the tic duration of states that are marked with the 'Fast' state flag but otherwise does not influence aggressiveness (i.e. does not make monsters spam their 'Missile' state sequence like they do with "FastMonsters").

Does this sound reasonable?

EDIT: Instead of "StrifeFastMonsters", it could be called "FastMonsters2".

Re: Strife: Bloodbath is *too* aggressive

PostPosted: Fri Apr 18, 2014 10:42 am
by Graf Zahl
I'd call it 'FastStates' and rename 'SlowMonsters' to 'SlowStates' because this has nothing to do with monsters exclusively.

Re: Strife: Bloodbath is *too* aggressive

PostPosted: Fri Apr 18, 2014 11:49 am
by Gez
Or something like Heretic/Hexen's nightmarefast?

Thinking about it, having FastStates, FastChase (for nightmarefast), and FastAim (for this thread's effect) as separate skill settings instead of lumping everything under FastMonsters possibly modified by nightmarefast would be better.

Re: Strife: Bloodbath is *too* aggressive

PostPosted: Fri Apr 18, 2014 12:51 pm
by FishyClockwork
Just to clarify, is "FastAim" supposed to just make monsters spam their 'Missile' state sequence and ignore nightmarefast and the 'Fast' state flag i.e. not modify tic duration?

If so then how about calling it "FastAttack" or "SpamAttacks" since they're not really 'aiming' as much as they are mindlessly standing in place and gunning for you like there's no tomorrow.

Re: Strife: Bloodbath is *too* aggressive

PostPosted: Fri Apr 18, 2014 1:00 pm
by Gez
So, effects of isFast:

AActor::StaticSpawn():
Code: Select allExpand view
   if (actor->isFast() && actor->flags3 & MF3_ISMONSTER)
      actor->reactiontime = 0;


A_DoChase():
Code: Select allExpand view
   // do not attack twice in a row
   if (actor->flags & MF_JUSTATTACKED)
   {
      actor->flags &= ~MF_JUSTATTACKED;
      if (!actor->isFast() && !dontmove)
      {
         P_NewChaseDir (actor);
      }
      actor->flags &= ~MF_INCHASE;
      return;
   }

and
Code: Select allExpand view
      // check for missile attack
      if (missilestate)
      {
         if (!actor->isFast() && actor->movecount)
         {
            goto nomissile;
         }
         
         if (!P_CheckMissileRange (actor))
            goto nomissile;
         
         actor->SetState (missilestate);
         actor->flags |= MF_JUSTATTACKED;
         actor->flags4 |= MF4_INCOMBAT;
         actor->flags &= ~MF_INCHASE;
         return;
      }

as well as:
Code: Select allExpand view
   if (nightmarefast && G_SkillProperty(SKILLP_FastMonsters))
   { // Monsters move faster in nightmare mode
      if (actor->tics > 3)
      {
         actor->tics -= actor->tics / 2;
         if (actor->tics < 3)
         {
            actor->tics = 3;
         }
      }
   }


AActor::GetTics():
Code: Select allExpand view
   if (isFast() && newstate->Fast)
   {
      return tics - (tics>>1);
   }



isFast() itself works like this:
Code: Select allExpand view
bool AActor::isFast()
{
   if (flags5&MF5_ALWAYSFAST) return true;
   if (flags5&MF5_NEVERFAST) return false;
   return !!G_SkillProperty(SKILLP_FastMonsters);
}

and interestingly enough, G_SkillProperty(SKILLP_FastMonsters) doesn't look just for the skill property, but also for the DM flag:
Code: Select allExpand view
      case SKILLP_FastMonsters:
         return AllSkills[gameskill].FastMonsters  || (dmflags & DF_FAST_MONSTERS);


So we have five effects in total. Four of them can be influenced by actor flags; the fifth cannot but can be influenced by A_Chase flags. That last effect comes from Heretic and therefore doesn't apply to Strife. Of the remaining four, one is definitely here (fast states). So which of the three others aren't?
  • reactiontime: interestingly, this one in vanilla is purely a skill setting and cannot be obtained just by -fast. Since ZDoom bundles the DM flag with the skill setting, -fast gives it fast reaction time too. It's difficult to guess whether it applies to Strife or not because reactiontime's effect is exceedingly subtle
  • do not attack twice in a row: this one seems interesting, if I understand what it does it forces the actor to move when calling A_Chase after having attacked. So it's definitely something missing from Strife.
  • shoot even if movecount is non-null: this one is subtle too

Re: Strife: Bloodbath is *too* aggressive

PostPosted: Fri Apr 18, 2014 1:32 pm
by Graf Zahl
Gez wrote:Or something like Heretic/Hexen's nightmarefast?

Thinking about it, having FastStates, FastChase (for nightmarefast), and FastAim (for this thread's effect) as separate skill settings instead of lumping everything under FastMonsters possibly modified by nightmarefast would be better.


Correct. But FastMonsters needs to stay for compatibility with existing mods.

Re: Strife: Bloodbath is *too* aggressive

PostPosted: Fri Jan 29, 2016 7:34 pm
by Graf Zahl
Lots of code fragments, no solution, though. Can you give some pointers? It's been too long that I thought about this.

Re: Strife: Bloodbath is *too* aggressive

PostPosted: Fri Jan 29, 2016 9:17 pm
by Gez
Well we're still stuck in "what do we do about this" mode.

Here's what I'd suggest: split the fast effect into its different constituent parts:
-FastReaction (for setting reactiontime to 0)
-RepeatAttacks (for skipping the "do not attack twice in a row") thing
-FastStates (for the effect on actor states with the fast flag)
-FastChase (for the nightmarefast effect)

The existing FastMonsters property would be a combo deal for backward compatibility.

If that's okay I can prepare a PR for that, unless you'd rather do it yourself.

Re: Strife: Bloodbath is *too* aggressive

PostPosted: Sat Jan 30, 2016 2:41 am
by Graf Zahl
If you got time do do it I'd appreciate it so I can look at other bugs in parallel.