A common misconception when using SoundTool, is that builders will select a sound, then hit the "Browse" button, select a sound file, and except the sound to "just work".
In reality: the "Browse" button does not "import" the sound into the project like it feels it would do (based on how a Browse button usually works in applications).
Instead, it simply adds the selected file's name into the list of samples.
So: if a builder downloaded a new sound into their Downloads folder for example, and uses the Browse button to add it to their project, the sound won't work. TE will highlight the sound in red in its level settings (Sound Infos tab), and in-game it will be silent.
Idea
After the user has selected one (or multiple) sounds via this "Browse" button:
- If no reference project is loaded, warn (but only once - until SoundTool is restarted) something like "For this sound* to work, make sure this folder is listed in the Sound Sample Paths tab in the Level Settings of your project." *{note: "this sound" can be kept singular even if the user has selected multiple samples, as we can argue we're talking about the sound ID there 👀}
- If a reference project is loaded, check whether the source folder of the selected samples is found in the reference project's sound sample paths (including their subfolders):
- If the folder is found, do nothing more than usual.
- If the folder is not found, prompt the user: "This path does not belong in the sound sample paths for {project.prj2}. Do you want to add it now?"
- If the user hits "Yes", add the folder's path to the project, at the top of the list.
- If the user hits "No", don't add the folder's path. But still add the samples' names to the list (now it's the user's responsibility to do whatever is necessary)
Considerations
The reference project may be opened in TE when the user does this, and there might be unsaved changes. How to handle this?
Ideally:
- If the file is not in use, ST would write directly to it.
- But if it's opened in an instance of TE (keep in mind there could be multiple open instances referencing the same project file), then TE would do it "in-memory", as if the user had done it manually themselves by opening and editing their Level Settings. And then it's up to the user to save their project before quitting.
A common misconception when using SoundTool, is that builders will select a sound, then hit the "Browse" button, select a sound file, and except the sound to "just work".
In reality: the "Browse" button does not "import" the sound into the project like it feels it would do (based on how a Browse button usually works in applications).
Instead, it simply adds the selected file's name into the list of samples.
So: if a builder downloaded a new sound into their Downloads folder for example, and uses the Browse button to add it to their project, the sound won't work. TE will highlight the sound in red in its level settings (Sound Infos tab), and in-game it will be silent.
Idea
After the user has selected one (or multiple) sounds via this "Browse" button:
Considerations
The reference project may be opened in TE when the user does this, and there might be unsaved changes. How to handle this?
Ideally: