Skip to content

Conversation

@krm01
Copy link
Contributor

@krm01 krm01 commented Nov 30, 2025

i'm hoping someone will be willing to take this and test / adapt to hackerOOT use. this is a script i wrote for indigo. it will edit files and wire things up to give you an enum that can be called in code as a oneshot, like Sfx_PlaySfxCentered(NA_SE_EV_CUSTOM_FOO);.

this also extends the environmentbank to hold 512 samples instead of 256, and then all the custom samples go there. an alternative implementation would create a whole new sample bank just for custom stuff. go ahead if you want to do that, i couldn't be bothered lol.

oh, this also relies on ffmpeg being available in the path as an implicit dependency to convert the .wav file to proper format. added sfx's always seem to quiet so this wrapper has an optional param that boosts the volume before converting and makes things much more better.

usage:

./new_sfx.py --volume 5 My-Custom-SFX.wav

example output:

image

usage help is available from the script by passing --help:

image

@Yanis002
Copy link
Collaborator

Yanis002 commented Nov 30, 2025

is this (partially?) addressing #195? I was planning on making a workaround until decomp fixes it so that's a nice timing actually (the idea would be moving the xml to edit to the root assets folder and have something to delete extracted files on make setup)

btw it's fine if it's not fixing the issue I mentioned, I'm just curious

@krm01
Copy link
Contributor Author

krm01 commented Nov 30, 2025

umm i think the script will install the permanent stuff into assets/ so it can be committed if you haven't already done that as part of preparing the directories and files, so yea i think so?

oh, one thing that probably does need tweaking actually, i just assume the first "game" it finds in the version list is the one to use, im guessing you'd want that to be changed to be the hackeroot game or w/e.

LOG.error("No assets found in extracted/, 'make setup' not yet run?")
sys.exit(1)
# just use the first one found, it's fine (probably)
game = games[0]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what i am referring to in my previous comment above. prolly wanna edit this part to be hackeroot-y

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I think having a --version -v argument would be convenient for HackerOoT, people don't necessarily use ntsc-1.2 (which is the default currently)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right. Oh or probably reading it from the Makefile would be better

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both would be neat actually, that said I don't think anyone would use several versions at the same time lol

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