mirror of
https://gitlab.com/Nanolx/patchimage.git
synced 2024-12-26 17:21:50 +01:00
add support for exchanging items in Mario Kart
This commit is contained in:
parent
a667ee3b92
commit
412f9de872
@ -1,3 +1,11 @@
|
||||
v4.97:
|
||||
- changed IDs in the game selection menu (old A..Z for Wii, 1..9
|
||||
for ROMs / new <ID>1..<ID>..99 ; example: NSMB1, NSMB2, NSMB3)
|
||||
- mkwiimm_items: support for exchanging items in Mario Kart Wii
|
||||
(your item choices are saved and can be re-used, so if you want
|
||||
to modifiy more than one Mario Kart you only have to choose the
|
||||
items once for all mods)
|
||||
|
||||
v4.96:
|
||||
- wiimmfi/mkwiimm/kirbywii: minor improvements and fixups
|
||||
- support RVLution Wii (a NewSMB Mod)
|
||||
|
@ -20,7 +20,7 @@ Supported Versions: EUR, JAP, USA
|
||||
|
||||
check_input_image_special () {
|
||||
|
||||
check_input_image_kirby
|
||||
check_input_image_mkwiimm
|
||||
|
||||
}
|
||||
|
||||
|
37
script.d/mkwiimm_items.db
Normal file
37
script.d/mkwiimm_items.db
Normal file
@ -0,0 +1,37 @@
|
||||
gyb.brres:ballon.brres:Yellow and Green Ballons:Atlas
|
||||
nmm.brres:big_kinoko.brres:Negative Mega Mushroom:Darkybenji
|
||||
rmm.brres:big_kinoko.brres:Inverted Mega Mushroom:Atlas
|
||||
bbb.brres:bomb.brres:Dark and light blue Bob-Omb:Atlas
|
||||
wpb.brres:gesso.brres:White poisoned Bloober:Atlas
|
||||
ykw.brres:kart_killer.brres:Yellow drill Bullet Bill:KTH
|
||||
wik.brres:item_killer.brres:Whisp item killer:KTH
|
||||
kww.brres:jugem_reverse.brres:Lakitu Keep Calm instead of Wrong Way:Atlas
|
||||
fnl.brres:jugemu.brres:Funky Neon Lakitu:Atlas
|
||||
rkw.brres:kart_killer.brres:Blue Bullet Bill with red shine and green fire:Atlas
|
||||
ukw.brres:kart_killer.brres:Ultimate-Turning Bullet Bill:Atlas
|
||||
bwc.brres:jugemu_signal.brres:White and coloured puzzle start signal:Atlas
|
||||
buk.brres:kinoko.brres:Blue Mushroom:Atlas
|
||||
yek.brres:kinoko.brres:Yellow Mushroom:Atlas
|
||||
puk.brres:kinoko.brres:Purple Mushroom:Atlas
|
||||
tuk.brres:kinoko.brres:Turquoise Mushroom:Atlas
|
||||
ork.brres:kinoko.brres:Orange Mushroom:Atlas
|
||||
pik.brres:kinoko.brres:Pink Mushroom:Atlas
|
||||
blk.brres:kinoko.brres:Black Mushroom:Atlas
|
||||
snk.brres:kinoko.brres:Snowy Mushroom:Atlas
|
||||
whk.brres:kinoko.brres:White Mushroom:Atlas
|
||||
udk.brres:kinoko.brres:Ultimate Dangerous Mushroom:Atlas
|
||||
dbk.brres:kinoko.brres:Dark Blue face Mushroom:Atlas
|
||||
grp.brres:koura_green.brres:Green Penguin:Atlas
|
||||
rep.brres:koura_red.brres:Red Penguin:Atlas
|
||||
hob.brres:koura_red.brres:Honeball:Tock
|
||||
rtc.brres:kumo.brres:Red Thounder-Cloud:Atlas
|
||||
boo.brres:kumo.brres:Boo:Koops9999vr
|
||||
cpk.brres:kinoko_p.brres:Colored puzzle king Mushroom:Atlas
|
||||
bss.brres:kinoko_p.brres:Blue sonic's shoe:Atlas
|
||||
cpb.brres:pow_bloc.brres:Colored puzzle block:Atlas
|
||||
cpp.brres:pow_bloc_plane.brres:Colored puzzle block:Atlas
|
||||
rth.brres:thunder.brres:Green Thunder:Atlas
|
||||
gth.brres:thunder.brres:Red Thunder:Atlas
|
||||
lat.brres:togezo_koura.brres:Latios:Guilmon35249vr
|
||||
blp.brres:togezo_koura.brres:Penguin:Tock
|
||||
bye.brres:togezo_koura.brres:Blue Yoshi Egg:Atlas
|
145
script.d/mkwiimm_items.sh
Normal file
145
script.d/mkwiimm_items.sh
Normal file
@ -0,0 +1,145 @@
|
||||
#!/bin/bash
|
||||
|
||||
GAME_TYPE="MKWIIMM"
|
||||
GAME_NAME="Mario Kart Wiimm"
|
||||
ITEMS_BASE="http://riivolution.nanolx.org/mkwiimm_items"
|
||||
CSZS="files/Race/Common.szs"
|
||||
CSZD="files/Race/Common.d"
|
||||
|
||||
show_notes () {
|
||||
|
||||
echo -e \
|
||||
"************************************************
|
||||
${GAMENAME}
|
||||
|
||||
Custom Mario Kart Wii
|
||||
|
||||
Source: http://wiiki.wii-homebrew.com/Wiimms_Mario_Kart_Fun
|
||||
Base Image: Mario Kart Wii (RMC?01)
|
||||
Supported Versions: EUR, JAP, USA
|
||||
************************************************"
|
||||
|
||||
}
|
||||
|
||||
check_input_image_special () {
|
||||
|
||||
check_input_image_mkwiimm
|
||||
ask_input_image_mkwiimm ${IMAGE%/*}
|
||||
echo -e "type RMC???.wbfs:\n"
|
||||
read ID
|
||||
|
||||
if [[ ! -f ${IMAGE%/*}/${ID} ]]; then
|
||||
echo "wrong id from user-input given."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
items=( "ballon.brres:Balloon (Battle Object)"
|
||||
"big_kinoko.brres:Mega Mushroom (Item)"
|
||||
"bomb.brres:Bob-omb (Item)"
|
||||
"gesso.brres:Blooper (Item)"
|
||||
"kart_killer.brres:Bullet Bill (In Use)"
|
||||
"item_killer.brres:Bullet Bill (Item, when dropped)"
|
||||
"jugem_reverse.brres:Lakitus Wrong Way Sign"
|
||||
"jugemu.brres:Lakitu"
|
||||
"jugemu_signal.brres:Lakitus Countdown Lights"
|
||||
"kinoko.brres:Super Mushroom (Item) "
|
||||
"koura_green.brres:Green Shell (Item)"
|
||||
"koura_red.brres:Red Shell (Item)"
|
||||
"kumo.brres:Thundercloud (Item)"
|
||||
"kinoko_p.brres:Golden Mushroom (Item, when dropped)"
|
||||
"pow_bloc.brres:Pow Block (Item, when dropped)"
|
||||
"pow_bloc_plane.brres:Pow Block (Item, in use) "
|
||||
"thunder.brres:Lightning (Item, When dropped)"
|
||||
"togezo_koura.brres:Spiny Shell (Item)" )
|
||||
|
||||
ask_items () {
|
||||
|
||||
if [[ -f ${HOME}/.patchimage.choice ]]; then
|
||||
echo "Your choices from last time can be re-used."
|
||||
echo "y (yes) or n (no)"
|
||||
read choice
|
||||
|
||||
if [[ ${choice} == y ]]; then
|
||||
source ${HOME}/.patchimage.choice
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${choosenitems[@]} == "" ]]; then
|
||||
|
||||
for item in "${items[@]}"; do
|
||||
slot=${item/:*}
|
||||
desc=${item/*:}
|
||||
|
||||
echo -e "\n\nChoose item for ${desc}
|
||||
|
||||
orig Original item"
|
||||
|
||||
gawk -F \: "/${slot}/"'{print $1 "\t" $3}' < ${PATCHIMAGE_SCRIPT_DIR}/mkwiimm_items.db
|
||||
echo -e "\ntype orig or ???.brres"
|
||||
read slotid
|
||||
echo "<<<<<<>>>>>>"
|
||||
choosenitems=( ${choosenitems[@]} ${slot}:${slotid} )
|
||||
done
|
||||
|
||||
echo ${choosenitems[@]}
|
||||
echo "choosenitems=( ${choosenitems[@]} )" > ${HOME}/.patchimage.choice
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
download_items () {
|
||||
|
||||
for item in ${choosenitems[@]}; do
|
||||
id=${item/*:}
|
||||
if [[ ! -f ${PATCHIMAGE_RIIVOLUTION_DIR}/${id} ]]; then
|
||||
wget -O ${PATCHIMAGE_RIIVOLUTION_DIR}/${id} \
|
||||
${ITEMS_BASE}/${id} &>/dev/null \
|
||||
|| (echo "download of ${id} failed." \
|
||||
&& rm ${PATCHIMAGE_RIIVOLUTION_DIR}/${id})
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
download_wiimm () {
|
||||
|
||||
ask_items
|
||||
download_items
|
||||
|
||||
}
|
||||
|
||||
build_mkwiimm () {
|
||||
|
||||
rm -rf workdir
|
||||
echo "*** 5) extracting image"
|
||||
${WIT} extract ${IMAGE%/*}/${ID} workdir -q
|
||||
|
||||
echo "*** 6) replacing items"
|
||||
rm -rf workdir/${CSZD}
|
||||
${SZS} extract workdir/${CSZS} -q
|
||||
for item in ${choosenitems[@]}; do
|
||||
slot=${image/:*}
|
||||
newi=${image/*:}
|
||||
if [[ -f ${PATCHIMAGE_RIIVOLUTION_DIR}/${newi} ]]; then
|
||||
cp ${PATCHIMAGE_RIIVOLUTION_DIR}/${newi} \
|
||||
${CSZD}/${slot}
|
||||
fi
|
||||
done
|
||||
${SZS} create -o workdir/${CSZD} -q
|
||||
rm -rf workdir/${CSZD}
|
||||
|
||||
echo "*** 7) rebuilding game"
|
||||
echo " (storing game in ${PATCHIMAGE_GAME_DIR}/${ID})"
|
||||
${WIT} cp -o -q -B workdir ${PATCHIMAGE_GAME_DIR}/${ID} || exit 51
|
||||
|
||||
rm -rf workdir
|
||||
|
||||
}
|
||||
|
||||
patch_wiimm () {
|
||||
|
||||
build_mkwiimm
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user