Changing Clash Speed On Proffie Saber

If you (temporarily) remove the CONFIG_PROP section from your config file, does that change how this behaves for you?

Yes, doing this helped and actually fixed the problem! Thank you very much for the help!

So I guess it’s something different about how clashes behave in the fett263 prop then?

Yeah, I have a demonstration of what the clashes are like now that I have changed it.

HandleClash() is the only thing I can think of but it’s a millisecond of “waiting”, but I suppose in spamming instances maybe it would come into play?

It might be because PropBase::Clash2 has a 400ms timeout before the next clash if Event(EVENT_CLASH) returns true, but only a 100ms timeout otherwise.

1 Like

Is this necessary or something that could be changed?

But do you have a video of what it was like before? When it was slow?

I have an example of someone else demonstrating this earlier in the post named proffie clashes.

The intention was to have “actions” (like changing preset with a clash) have a longer clash timeout than regular clashes. There is lots of ways to do this of course. I’m wondering if maybe your prop should override one of the clash functions instead of relying on Event(CLASH) though…

2 Likes

Per your recommendation, how’s this look?

How’s this:

prop_base

  virtual void Clash3() {
    IgnoreClash(400);
  }

  virtual void Clash2(bool stab, float strength) {
    SaberBase::SetClashStrength(strength);
    if (Event(BUTTON_NONE, stab ? EVENT_STAB : EVENT_CLASH)) {
      Clash3();
    } else {
      IgnoreClash(100);
      // Saber must be on and not in lockup mode for stab/clash.
      if (SaberBase::IsOn() && !SaberBase::Lockup()) {
        if (stab) {
          SaberBase::DoStab();
        } else {
          SaberBase::DoClash();
        }
      }
    }
  }

then in my prop

  void Clash3() override {
    IgnoreClash(100);
  }

Is this correct thinking since HandleClash() in my prop will determine the “Do” for the Effects? I just need to reduce the IgnoreClash() delay, right or do I need an additional step?

This could work, but I don’t think it’s the right way to do it if your prop ever uses clahses to trigger actions. If it does, it would only have a 100ms timeout, and it would be too easy to trigger multiple actions.

I think it would be better to move out the parts on the other side of the if/else into Clash3(), then in your code you would need to separate clash-as-action and clash-as-clash code. The clash-as-clash code would move into Clash3 while anything using clash as an action would remain in Event2().

Would you consider, Lockup, Melt, Drag, Stab as clash-as-action or clash-as-clash? I’d think they were clash-as-clash in which case my prop doesn’t use Clash for actions.

Those are all clash-as-clash IMHO.
If your prop doesn’t use clash for actions, then your solution would work fine, but I still don’t think it’s the right way to do it.

So, I’ll just move the if() from Clash2() into Clash3() in prop_base and then leave the override in my prop to just IgnoreClash(100)? Is that the better approach?

Or should I just make Clash2 virtual and override it?

Clash2 is already virtual, so you could override that directly.
I think it should look like this though:


  virtual void Clash2(bool stab, float strength) {
    SaberBase::SetClashStrength(strength);
    if (Event(BUTTON_NONE, stab ? EVENT_STAB : EVENT_CLASH)) {
      IgnoreClash(400);
    } else {
      IgnoreClash(100);
      Clash3(stab);
    }
  }

  virtual void Clash3(bool stab) {
      // Saber must be on and not in lockup mode for stab/clash.
      if (SaberBase::IsOn() && !SaberBase::Lockup()) {
        if (stab) {
          SaberBase::DoStab();
        } else {
          SaberBase::DoClash();
        }
      }
  }

Then you override Clash3() to do all your clash handling and remove anything that tries to handle clashes from Event() / Event2().

Wouldn’t this still add the 400ms where I use HandleClash() if I only override Clash3() or am I missing something?

Just a thought, what if the above if statement and IgnoreClash(400) was made an override in the props that need clash-for-action instead?

It would only use the 400ms if Event(BUTTON_NONE, EVENT_CLASH) returns true.
If you remove the clash handling from Event(), then it will not return true.