Skip to content

Conversation

@ShrineFox
Copy link
Contributor

@ShrineFox ShrineFox commented Apr 18, 2025

Here are some changes I made so that I could update my RSTB via heaventool with one click, which is handy for adding the RSTB patching process to batch files.

How It's Implemented

  • The RSTB updating function has been separated from the UpdateFromModdedRomFs_Click procedure and made public so it can be reused in Program.cs for commandline arguments.
  • When more than one commandline argument is supplied for RSTB editing, the program will assume the 2nd argument is the path to the romFS folder and use that to overwrite the input RSTB with a patched one.
  • If a third argument is supplied, it will assume the 3rd path is the output RSTB and save it there instead of overwriting.

To make this work without further user input, I had to add bools for whether or not to show messagebox prompts to the RSTB saving and updating functions. This way, the program assumes that you always want to compress the RSTB and doesn't show the results messagebox when updating via commandline.

Possible Issues

One issue I've noticed is that occasionally there is a popup about the collection being modified while in a for loop. I assume this is some kind of race condition relating to the RSTB update function being asynchronous, but I'm not sure.

When more than one argument is supplied for RSTB editing, the program will assume the 2nd argument is the path to the romFS folder and use that to overwrite the input RSTB with a patched one.
If a third argument is supplied, it will assume the 3rd path is the output RSTB and save it there instead of overwriting.
To make this work without further user input, I had to add bools for whether or not to show messagebox prompts to the RSTB saving and updating functions. This way, the program assumes that you always want to compress the RSTB and doesn't show the results messagebox when updating via commandline.

One issue I've noticed is that occasionally there is a popup about the collection being modified while in a for loop. I assume this is some kind of race condition relating to updating being an async function, but I'm not sure.
@Rafacasari Rafacasari merged commit 6618816 into acnhmodding:master Apr 20, 2025
@Rafacasari
Copy link
Collaborator

Thanks!

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.

2 participants