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

Rounds data stored on stack #575

Open
GigaExcalibur opened this issue Jan 25, 2024 · 0 comments
Open

Rounds data stored on stack #575

GigaExcalibur opened this issue Jan 25, 2024 · 0 comments
Labels
Core Features Issues pertaining to the core functions of the Skill System, its skills, or its dependencies. Enhancement Issues that suggest new and/or improved features.

Comments

@GigaExcalibur
Copy link
Contributor

(Directly paraphrased from Contro's investigation)

Adept, Astra, and other round adding skills presume that the number of rounds in the stack is stored in sp + 38, but making any edits to the function BattleGenerateRoundsHits or the proc loop internals will change this to a different value and as such prevent the skills from adding more rounds to combat.

While you can technically alter the skill code so that it references the correct location on the stack for the recompiled function, a more ideal solution would be to use a fixed free byte in RAM to store the number of rounds instead of on the stack. TMGC, the hack that discovered this issue and Contro helped diagnose, uses $030017c4. But anything works, and I'd sooner call this an enhancement than a bug.

Discussion of the issue can be found here, although it requires access to Retina's server: https://discord.com/channels/826258937992183878/964931538380816454/1198210117791907878

@sme23 sme23 added the Enhancement Issues that suggest new and/or improved features. label Jan 31, 2024
@sme23 sme23 added the Core Features Issues pertaining to the core functions of the Skill System, its skills, or its dependencies. label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Features Issues pertaining to the core functions of the Skill System, its skills, or its dependencies. Enhancement Issues that suggest new and/or improved features.
Projects
None yet
Development

No branches or pull requests

2 participants