Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spellprac detection issues in th08 #7

Merged
merged 4 commits into from Jun 5, 2020

Conversation

Priw8
Copy link
Contributor

@Priw8 Priw8 commented Jun 5, 2020

Apart from fixing the issue I described in #6, now flag 0x4000 is used instead of 128 to check whether spell practice is active. The difference from 128 is that it's always set when in spellprac mode, even when the spell is not active yet (and as far as I can tell, flag 0x4000 is how the game determines whether to load spell practice ECL files in the first place - in fact, that's how I found it). Apart from that, now a spellprac-specific spell ID variable is used when in spell practice - this one is set before the spell even begins. I believe the ECL scripts use this value to determine which spell to even start (not tested but likely).

The result of these changes is that both correct spell ID and spell practice being active are always detected as soon as spell practice starts.

Priw8 added 4 commits June 5, 2020 16:08
...as it has a number of issues when the BGM is disabled. Not sure if there are any bad consequences of that, though?
It seems like flag 0x4000 is always set when in spellprac mode, even before the boss spawns
This allows detecting the spell before the boss starts it in spell practice (also changed spellid to 4 bytes because that's how the game reads and writes to it)
@TheBakaRem TheBakaRem linked an issue Jun 5, 2020 that may be closed by this pull request
@TheBakaRem
Copy link
Owner

Perfect! Thanks for the contribution and the PR!

@TheBakaRem TheBakaRem merged commit 558395d into TheBakaRem:master Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spell practice mode check broken in IN when BGM is disabled
2 participants