Tutorial  Updated

Stardew Valley Vita Sound Modding Tutorial

First off I apologize for not being word-perfect in English it is not my first language so please be gentle =)


Prerequisites:
  • A hacked PS Vita
  • Stardew Valley v1.03
  • at9tool
  • HxD
  • Audacity
  • unxwb (optional)
  • rePatch plugin
  • ID List



Step 1. Get your Music.xwb

1. Open VitaShell and navigate to your copy of Stardew Valley to get the Music.xwb. You should find it under

"ux0:/app/PCSB01226/Content/XACT/”

2. Connect your Vita and use USB or FTP to make a copy somewhere on your PC.



Step 2. (optional) Extract the music files

1. Download unxwb and extract the archive in the same place you stored your Music.xwb.

2. Open cmd.exe and navigate to the same folder or press Strg+ right click to get the option to open cmd.exe in the same folder so you don´t need to navigate to the right path.

3. Type in unxwb -R -D Music.xwb without the “ “ and hit Enter.

4. You will get 84 .dat files which are the sound files of the game. You should move them to a new folder to organize it.

5. These .dat files are WAV Files with the ATRAC 9 CODEC, so if you change for example 0000000.dat to 0000000.at9 you could play the file for example with VGAStream.



Step 3. Get the music to want to add

1. In the next step we need to convert the music we want use in the game into the right format. Every sound file you want to add needs to be in the .wav format, so if you have some tracks which are for example in .mp3 you can use Audacity to convert them into .WAV 16-bit PCM files.

2. If your sound files are now in the .WAV format you need to convert them with the at9tool. Copy your sound files in the same folder with the at9tool. Open cmd.exe in the same folder and type this

"at9tool -e -br 96 Yourmusicname.wav Yourmusicname.at9"

3. Just change "Yourmusicname.wav" to your Filename and Yourmusicname.at9 to whatever you want.

4. Now you should have a new created .at9 file in the same folder.



Step 4. Hex editing

1. Open HxD and with it you need to open your Music.xwb and your own created .at9 file. First of remove the header from the .at9 file with the Hex editor. It should always look the same in every .at9 file. Look at the picture to be sure to remove the right part.

2. Now after you remove the .WAV header you need to mark everything and press Strg + C to copy it.

3. Switch between the tabs to your Music.xwb and press Strg + E to get into the menu to mark a specific area in the file. Now you need to know in which part each music track is stored. I have made a list where you can find in which offset you can find the specific soundtrack of the game you want to switch out. So, look up in the list and type in the offset values from the song to want to replace. Link to the list is at the end of this post!

4. Hit OK and right after that press Strg +B and confirm it again to write your hex values which your new created .at9 file into the Music.xwb.

5. Save your modded Music.xwb.



Step 5. Add your new Music.xwb to the game
1. For the last step you need have to use rePatch for the Vita. There are plenty of guides and tools to install it, so I won´t explain it here. If you have rePatch installed open the repatch folder on your PC or directly on your Vita with Vitashell and create the following folder structure

"PCSB01226/Content/XACT/"


2.Now copy your modded Music.xwb into the XACT folder and start your game. If everything works out you should now hear your soundtrack whenever the normal soundtrack would play.




IMPORTANT in regards to the ID list:
The ID list is not complete because I don’t know the name of every soundtrack. Also, I cannot guarantee that got all the hex values are right. Maby I misstyped or got the wrong line in the Hex editor so feel free to contribute to the list if you find any mistakes. I just tested a few songs and it worked for me.


Link to the list --> https://drive.google.com/file/d/1KoojoQD8fJT6oAHMe784Zk-HN1Eo5Sjr/view?usp=sharing
 
Last edited by Gaara4,

stev88982

Active Member
Newcomer
Joined
Oct 3, 2019
Messages
27
Trophies
0
Age
28
XP
73
Country
United Kingdom
so hard doing this for PCSE01235 us version only replace portraits and characters trying to get chrono trigger music to work

repatch or mai dump better?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    btw @BigOnYa the health bar doesnt decrease when i take damage (and yes i put the "at the beggining of the scene change value of greenflatbar: set to Protagonistcopmode.Health::Health())
  • S @ salazarcosplay:
    i the protagonist
  • S @ salazarcosplay:
    human, robot, cyborg
  • S @ salazarcosplay:
    human with cyborg enhancements
  • S @ salazarcosplay:
    or like terminatior
  • S @ salazarcosplay:
    with living tissue
  • BigOnYa @ BigOnYa:
    @Xdqwerty there is health behaviour you can add to your character, then to use a health bar is lil more complicated, google n watch a few tutorial video on it, be too hard to explain here.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, the character has the health behavior
  • BigOnYa @ BigOnYa:
    I know you have to create a health and health max variable. Then there is a calculation you use in code to subtract width size of the health bar. Google few vids.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, the "greenflatbar" is one of the preset health bars btw
  • BigOnYa @ BigOnYa:
    Yea you can use any bar/sprite. It will just change the width. Ok good luck and have fun. I'm off to go shoot some pool at the bar. Talk to you later.
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, why does the health behavior exist if you can just use a variable?
  • Xdqwerty @ Xdqwerty:
    and nope the number still doesnt change
  • Xdqwerty @ Xdqwerty:
    ok im gonna make my own asset
  • Xdqwerty @ Xdqwerty:
    nvm i think i fixed it
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, I fixed it
    +1
  • S @ salazarcosplay:
    how are you\
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, we just talked like 2 hours ago
  • BigOnYa @ BigOnYa:
    I had the Goodyear blimp fly real low right over my house this morning, was weird out of nowhere looking up and seeing it that close up. Memorial golf tourney going on by me in Dublin Ohio and its there.
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, i tried the gdevelop mobile app and theres a event limit and you have to pay to add more events
  • BigOnYa @ BigOnYa:
    I never used the mobile or online versions, just the pc version.
    BigOnYa @ BigOnYa: I never used the mobile or online versions, just the pc version.