Wensber / TextTheSpire

18 stars 4 forks source link

Unlimited Relic Pickups After Boss Battle #2

Open ertay opened 4 years ago

ertay commented 4 years ago

There is a bug that lets you pick up all three relics after beating a boss. I am not sure if this is true for all chests.

Steps to reproduce:

  1. Beat a boss.
  2. Pick up gold and card
  3. Proceed
  4. Open chest
  5. Select a relic from the three offered relics.
  6. Instead of entering Proceed, enter 1. This causes the chest to be opened again.
  7. Choose another relic.
  8. Instead of entering proceed, enter 1, chest will be opened once again.
  9. Choose the third unpicked relic.
Wensber commented 4 years ago

Hello,

So I have already been made away of this issue and I know what causes this.

These choices make use of the Communication Mod to discover available choices, number them, and then make the selected choice. All numbered choices and most combat commands use the Communication mod.

The Communication Mod has its own way of checking if it should accept commands at a given time. However using that from my mod is more difficult as I'm just using a small part of Communication Mod.

The bug happens because my mod is feeding the Communication Mod commands before the Game is ready to accept more commands. This also happens in rest spots letting you upgrade and rest multiple times.

My current solution is to set a timer between choices executing. Right now it's set at 100 update cycles which is fairly fast but noticeable if you input commands quickly. Commands are still queued up so it just means that commands input within these 100 cycles will be delayed briefly.

If similar issue appear even with this fix I might have to redo a chunk of the mod to incorporate the Communication Mod's own state checking.

Thanks, Wensber

On Sun, Jun 14, 2020 at 10:02 AM ertay notifications@github.com wrote:

There is a bug that lets you pick up all three relics after beating a boss. I am not sure if this is true for all chests.

Steps to reproduce:

  1. Beat a boss.
  2. Pick up gold and card
  3. Proceed
  4. Open chest
  5. Select a relic from the three offered relics.
  6. Instead of entering Proceed, enter 1. This causes the chest to be opened again.
  7. Choose another relic.
  8. Instead of entering proceed, enter 1, chest will be opened once again.
  9. Choose the third unpicked relic.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Wensber/TextTheSpire/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONINOF4XZK5FHS6GP7ZZH3RWT7DJANCNFSM4N5Q65AQ .

ertay commented 4 years ago

Thanks for the quick response. That's good to know. Just an idea but, would triggering the proceed function automatically after choosing a relic, or deciding to rest fix the issue? Or are there many exceptions to this use case that would require you to modify a lot of other things to get it to work?

Wensber commented 4 years ago

Hello,

The issue ended up being that I was feeding the Communication Mod commands before it was ready. The game has states when it doesn't accept commands and the Communication Mod normally doesn't execute commands during this time.

My solution right now is to add a delay between executing commands. You may still queue up commands within this time but it will not execute until the delay is over. The delay is 100 update cycles which shouldn't be more than 2 seconds. If this bug appears again then I might need to make a more elegant solution.

Thanks, Wensber

On Sun, Jun 14, 2020 at 10:37 AM ertay notifications@github.com wrote:

Thanks for the quick response. That's good to know. Just an idea but, would triggering the proceed function automatically after choosing a relic, or deciding to rest fix the issue? Or are there many exceptions to this use case that would require you to modify a lot of other things to get it to work?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Wensber/TextTheSpire/issues/2#issuecomment-643797880, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONINOGOK3OFHILCSA6UMATRWUDEZANCNFSM4N5Q65AQ .

ertay commented 4 years ago

Gotcha. Thanks for your great work, looking forward to the next release.