2016-07-01 20:07:53 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
GAMENAME="Tokyo Mirage Sessions #FE Uncensored"
|
|
|
|
GAME_TYPE=DELTA
|
|
|
|
|
2016-07-03 12:20:54 +02:00
|
|
|
PATCH_FILES=( 000_map 010_character 030_etc 031_message 050_movie 999_etc_om 999_lua )
|
2016-07-01 20:07:53 +02:00
|
|
|
|
|
|
|
show_notes () {
|
|
|
|
|
|
|
|
echo -e \
|
|
|
|
"************************************************
|
|
|
|
${GAMENAME}
|
|
|
|
|
|
|
|
Source: https://gbatemp.net/threads/tokyo-mirage-sessions-fe-restoration.429651/
|
|
|
|
Base Image: Tokyo Mirage Sessions #FE
|
|
|
|
Supported Versions: EUR, US
|
|
|
|
************************************************"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
menu () {
|
|
|
|
|
2016-07-01 22:06:13 +02:00
|
|
|
echo -e "\nTokyo Mirage Sessions #FE restoration patcher"
|
|
|
|
|
|
|
|
status=3
|
2016-07-01 20:07:53 +02:00
|
|
|
|
2016-07-01 21:58:50 +02:00
|
|
|
if [[ ! ${XDELTA_PATH} ]]; then
|
2016-07-01 22:06:13 +02:00
|
|
|
echo -e "\nEnter path to the directory containing the delta patches:\n"
|
2016-07-01 22:00:58 +02:00
|
|
|
read XDELTA_PATH || exit 75
|
2016-07-01 22:06:13 +02:00
|
|
|
else status=4
|
2016-07-01 21:58:50 +02:00
|
|
|
fi
|
2016-07-01 20:07:53 +02:00
|
|
|
|
2016-07-01 21:58:50 +02:00
|
|
|
if [[ ! ${CPK_PATH} ]]; then
|
|
|
|
echo -e "\nEnter path to the directory containing the game files (cpk):\n"
|
2016-07-01 22:00:58 +02:00
|
|
|
read CPK_PATH || exit 75
|
2016-07-01 22:06:13 +02:00
|
|
|
else status=4
|
2016-07-01 21:58:50 +02:00
|
|
|
fi
|
2016-07-01 20:07:53 +02:00
|
|
|
|
|
|
|
if [[ ! -d ${XDELTA_PATH} ]]; then
|
2016-07-01 21:58:50 +02:00
|
|
|
echo "PATH \"${XDELTA_PATH}\" does not exist!"
|
2016-07-01 22:00:58 +02:00
|
|
|
exit 21
|
2016-07-01 20:07:53 +02:00
|
|
|
elif [[ ! -f ${XDELTA_PATH}/patch_000_map.xdelta ]]; then
|
2016-07-01 21:58:50 +02:00
|
|
|
echo "PATH \"${XDELTA_PATH}\" does not contain the xdelta patches!"
|
2016-07-01 22:00:58 +02:00
|
|
|
exit 21
|
2016-07-01 20:07:53 +02:00
|
|
|
elif [[ ! -d ${CPK_PATH} ]]; then
|
2016-07-01 21:58:50 +02:00
|
|
|
echo "PATH \"${CPK_PATH}\" does not exist!"
|
2016-07-01 22:00:58 +02:00
|
|
|
exit 15
|
2016-07-01 20:07:53 +02:00
|
|
|
elif [[ ! -f ${CPK_PATH}/pack_000_map.cpk ]]; then
|
2016-07-01 21:58:50 +02:00
|
|
|
echo "PATH \"${CPK_PATH}\" does not contain the game files (cpk)!"
|
2016-07-01 22:00:58 +02:00
|
|
|
exit 15
|
2016-07-01 20:07:53 +02:00
|
|
|
fi
|
|
|
|
|
2016-07-01 22:06:13 +02:00
|
|
|
echo ">>> status: ${status}"
|
|
|
|
|
2016-07-01 20:07:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
patch () {
|
|
|
|
|
2016-07-02 07:33:12 +02:00
|
|
|
if [[ -d ${PWD}/TMSxFE-Uncensored ]]; then
|
|
|
|
echo -e "\nremoving old files"
|
|
|
|
rm -rf ${PWD}/TMSxFE-Uncensored
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -e "\n> copying cpk files"
|
|
|
|
mkdir ${PWD}/TMSxFE-Uncensored
|
|
|
|
for file in ${PATCH_FILES[@]}; do
|
|
|
|
cp ${CPK_PATH}/pack_${file}.cpk \
|
|
|
|
${PWD}/TMSxFE-Uncensored
|
|
|
|
done
|
|
|
|
|
2016-07-03 13:06:20 +02:00
|
|
|
cur=0
|
|
|
|
all=${#PACH_FILES[@]}
|
2016-07-01 20:07:53 +02:00
|
|
|
echo -e "\n> Patching Files"
|
|
|
|
for patch in ${PATCH_FILES[@]}; do
|
2016-07-03 20:18:59 +02:00
|
|
|
cur=$((cur+1))
|
2016-07-03 13:06:20 +02:00
|
|
|
echo ">> [${cur}/${all}] pack_${patch}.cpk"
|
2016-07-02 07:33:12 +02:00
|
|
|
${XD3} -d -f -s ${PWD}/TMSxFE-Uncensored/pack_${patch}.cpk \
|
2016-07-01 20:07:53 +02:00
|
|
|
${XDELTA_PATH}/patch_${patch}.xdelta \
|
2016-07-02 07:33:12 +02:00
|
|
|
${PWD}/TMSxFE-Uncensored/pack_${patch}.cpk_new || exit 51
|
2016-07-01 20:07:53 +02:00
|
|
|
|
2016-07-02 07:33:12 +02:00
|
|
|
mv ${PWD}/TMSxFE-Uncensored/pack_${patch}.cpk_new \
|
|
|
|
${PWD}/TMSxFE-Uncensored/pack_${patch}.cpk
|
2016-07-01 20:07:53 +02:00
|
|
|
done
|
|
|
|
|
2016-07-02 07:33:12 +02:00
|
|
|
echo -e "\n< Done patching
|
|
|
|
<< Find your modified cpk files in:
|
2016-07-02 10:38:10 +02:00
|
|
|
\n\t${PWD}/TMSxFE-Uncensored
|
|
|
|
|
|
|
|
Copy your complete dump (content, code, meta folders) to your SD-Card in
|
|
|
|
|
|
|
|
<sd-card-path>/wiiu/games/Tokyo Mirage Sessions FE [ASEP01]
|
|
|
|
|
|
|
|
then copy the modified cpk files into
|
|
|
|
|
|
|
|
<sd-card-path>/wiiu/games/Tokyo Mirage Sessions FE [ASEP01]/content/Pack/
|
|
|
|
|
|
|
|
keep a copy of the unmodified cpk files, in case the patches are being updated!
|
|
|
|
"
|
2016-07-01 20:07:53 +02:00
|
|
|
|
|
|
|
}
|