Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Change Audio directory

I'm planning to put together a package release of several games. To cut down on redundancy, I'm planning to have them share an Audio folder. However, this would put the Audio folder in the parent directory of each of the games. How do I make it so that when looking for BGM, ME, etc, it will check in the parent directory as opposed to the game's directory?

Any help is appreciated. Thanks in advance.

EDIT: Alternatively, a better way to accomplish this task would also be appreciated. I figured the easiest thing to do would be to move the Audio directory up rather than try to deal with all the games in the same folder.
 
Actually, the best way to accomplish this is through a custom RTP with an included installer. A custom RTP is achieved through the addition of a registry key that points to the RTP directory, along with a key for the RTP's name. The installer could then be created using one of several installer-creation tools on the internet. Once the RTP is created, it can be used just like the default one. (This gets a bit tough when it comes to VX, but since there was no indication of the software you were using, I assumed it was XP, like the rules state. Or used to state. Not sure if they still say that or not)
 
Glitchfinder":2bt92lwc said:
Actually, the best way to accomplish this is through a custom RTP with an included installer. A custom RTP is achieved through the addition of a registry key that points to the RTP directory, along with a key for the RTP's name. The installer could then be created using one of several installer-creation tools on the internet. Once the RTP is created, it can be used just like the default one. (This gets a bit tough when it comes to VX, but since there was no indication of the software you were using, I assumed it was XP, like the rules state. Or used to state. Not sure if they still say that or not)
Yeah, I'm using XP. Could you point me toward a tutorial for making a custom RTP, or provide more specific instructions?
 
Taken from this post at RRR:

Using the windows' run command, type in "regedit". Then select HKEY_LOCAL_MACHINE, SOFTWARE, ENTERBRAIN, RGSS, and RTP.
Now we're in the right locale, so right click on the right hand box and select "New -> String Value". Enter your RTP name in the upcoming box, EX. VX RTP. After naming it, right click on the name and click, Modify. Now either type in the path of the RTP, EX. {C:\Program Files\Common Files\Enterbrain\RGSS\RPGVX\}. OR open a new window (window button + E) and navigate and copy the path to the RTP.
There you go! You are now the happy owner of a second (or third) RTP!
 
Glitchfinder":2vmeg8fm said:
Taken from this post at RRR:

Using the windows' run command, type in "regedit". Then select HKEY_LOCAL_MACHINE, SOFTWARE, ENTERBRAIN, RGSS, and RTP.
Now we're in the right locale, so right click on the right hand box and select "New -> String Value". Enter your RTP name in the upcoming box, EX. VX RTP. After naming it, right click on the name and click, Modify. Now either type in the path of the RTP, EX. {C:\Program Files\Common Files\Enterbrain\RGSS\RPGVX\}. OR open a new window (window button + E) and navigate and copy the path to the RTP.
There you go! You are now the happy owner of a second (or third) RTP!
Thanks. I appreciate the help, but I can't find the right registry key. It might be because I'm running Windows 7. Under local machine/Software, there's no Enterbrain folder. There is one, however, in current user/Software, but there's no "RTP" folder for RGSS or RPGXP there.

EDIT: Managed to find it due to the Registry's search feature. Got the RTP made, now a couple other questions...
1) RMXP recognizes the Audio files (they're indicated with a blue dot in the editor) and they play correctly in the editor, but they won't play ingame. I imagine it's because it's still looking in the game folder for the files. Is there any way to make it automatically play from the RTP or will I have to manually change every single audio call?
 
Hey there, in my old project i used all game files in one single folder, and you want do a similar thing, what i did on past was, go to your script editor and Search for this exact line: "Audio/
now what you need do is edit it, in my last project i did was: "Graphics/Audio/
and game would load the sound from the graphic/audiot/file folder as you see, but if you want to load from a parent directory, in a not-professional way, i could suggest you try the method of: "../Audio/
this would (theoricaly, i didnt had a chance to test it on this precise moment), force the game to load a folder back from your game, and open the audio on it, imagine this
[Core Games]
> Audio
> Game 1
> Game 2
if that work, it would force any of the game(1&2) to open the previous Audio folder, i think this what you searching for, give it a try, maybe it does work :P
 
I used a similar method to dudenextdoor for my memory cards script, however, if you include the C:\ crap you can choose a universal directory (To windows machines)
I suggest using C:\Program Files\Common Files\Your Game Name\Audio
 
Xilef":2hsd6lt7 said:
I used a similar method to dudenextdoor for my memory cards script, however, if you include the C:\ crap you can choose a universal directory (To windows machines)
I suggest using C:\Program Files\Common Files\Your Game Name\Audio

yes mate, but that has a small disavantage, imagine the 'user' prefer install the game on a different drive or folder, that specific path wouldn't work, while the '..' force game to browse 1 folder back and then open the one specified (at least in theory, i'll test it later myself), this is a non-pro method, i'm sure, there is someone good enough on RGSS who could script to let you 'Choose your Audio Folder' on 1st time you launch game, but my actual knowledge i can't help on that :P


PS: it's just me, or the 'preview' button isnt working right now (<firefox user)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top