Fate-Grand-Order_Lua icon indicating copy to clipboard operation
Fate-Grand-Order_Lua copied to clipboard

Script will stuck when "Can't cast NP" debuff active on our servant

Open 29988122 opened this issue 6 years ago • 4 comments

Yeah, it's an edge case. And why don't I fix it myself? Simple. I was like, literally slept for like only 7 hours in the past 48 hours.

Guess I should still document this bug here.

Few notes: -Language dependent (debuff icon on NP cards) -Others ways (like always click more than 3 command cards whether the subroutine is in Autoskill or in Spam_NP or Danger_NP.) to circumvent it.

29988122 avatar Nov 03 '18 09:11 29988122

Hope you got a good night's sleep today. 😅

-Others ways (like always click more than 3 command cards whether the subroutine is in Autoskill or in Spam_NP or Danger_NP.) to circumvent it.

Sorry, what?

potchy avatar Nov 04 '18 03:11 potchy

I forgot the FGO application behavior when the script clicked on the servant with NO_NP_DEBUFF.

So consider the following three scenarios(one of them is actual app behavior):

  1. Shows an extra window, can be closed by clicking anywhere outside the window.
  2. Just don't let you click that NP card.
  3. Card can be selected, but shows "Chain failed"(unlikely, or the script won't misbehave).

~separation line~

Therefore, for now, the card selection behavior looked like this if I recall correctly:

  1. Autoskill NP commands: Click NP card + 2 more regular command cards.
  2. Battle NP and enemy selection == Spam: Click NP + 3 more regular command cards.

~separation line~

I sometimes make the script more robust by adding extra click here and there - whether it does nothing, or the extra click will close those extra windows that appeared in edge cases, effectively eliminated the need to catch edge cases(lazy lol).

One of the examples was like, if all the skill's in cooldown, and your Autoskill executed abc4. By modifying your skill commands as a1b1c14 EVEN IF it's not a targeted skill, the extra"1" will close extra windows effectively by clicking outside the skill-in-cooldown-wtf window.

I "guess" we can make command card selection subroutine to select for 4~6 cards, to eliminate the following two edge cases:

  1. Servant stunned.
  2. NO_NP_DEBUFF on your 100%+ NP servant

Since the battle animation will start as long as you've selected 3 command cards in total, those extra clicks will do no harm.

29988122 avatar Nov 04 '18 10:11 29988122

  1. Autoskill NP commands: Click NP card + 2 more regular command cards.
  2. Battle NP and enemy selection == Spam: Click NP + 3 more regular command cards.

As far as I recall, the script always clicks three command cards, regardless if NPs were cast or not.

I "guess" we can make command card selection subroutine to select for 4~6 cards

Hmm, I think it would be better to click a corner of the screen. Poor doBattleLogic()-kun shouldn't need to deal with other functions' problems.

potchy avatar Nov 04 '18 19:11 potchy

Thank you for your important tip.

Poor doBattleLogic()-kun shouldn't need to deal with other functions' problems.

That is something I was seeing all the time(coding style/best practices), but only until now I truly what that means.

Eureka! I guess. : P

29988122 avatar Nov 05 '18 06:11 29988122