Skip to content

Commit

Permalink
MP7: Custom Bonus Stars
Browse files Browse the repository at this point in the history
  • Loading branch information
RainbowTabitha committed Sep 6, 2024
1 parent a253782 commit 331c7fa
Show file tree
Hide file tree
Showing 7 changed files with 178 additions and 9 deletions.
4 changes: 2 additions & 2 deletions codes/marioParty6.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def getStarSpaceCodeSix(amount, negAmount, amountDec, y4, y2, x2, x4):

def getPinkBooSpaceCodeSix(amount, negAmount, amountDec):
return f'''
MP4 - Star Stealing Costs {amountDec} with Pink Boo.
MP6 - Star Stealing Costs {amountDec} with Pink Boo.
C21B1FB4 00000001
2C04{amount} 00000000
C21B2634 00000001
Expand All @@ -134,7 +134,7 @@ def getPinkBooSpaceCodeSix(amount, negAmount, amountDec):

def getPinkBooCoinsSpaceCodeSix(amount, negAmount, amountDec):
return f'''
MP4 - Coin Stealing Costs {amountDec} with Pink Boo.
MP6 - Coin Stealing Costs {amountDec} with Pink Boo.
C21B1F28 00000001
2C03{amount} 00000000
C21B2626 00000001
Expand Down
54 changes: 54 additions & 0 deletions codes/marioParty7.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,4 +414,58 @@ def getBattleGame7(p1, p2, p3, p4, p5, s1, s2, s3, s4, s5):
04276F44 0000{p5}
04276F48 0000{p5}
042215E0 60000000
'''

def getStarReplaceSeven1(amount, amountDec):
return f'''
MP7 - Replace Minigame Star with {amountDec}
204E185C A8A70028
044E185C {amount}
E2000001 80008000
'''

def getStarReplaceSeven2(amount, amountDec):
return f'''
MP7 - Replace Orb Star with {amountDec}
204E18D4 A8C3003C
044E18D4 {amount}
E2000001 80008000
'''

def getStarReplaceSeven3(amount, amountDec):
return f'''
MP7 - Replace Happening Star with {amountDec}
204E1A0C 8903001F
044E1A0C {amount}
E2000001 80008000
204E1A10 7D060774
044E1A10 7D064378
E2000001 80008000
'''

def getStarReplaceSeven4(amount, amountDec):
return f'''
MP7 - Replace Shopping Star with {amountDec}
204E1898 A885003E
044E1898 {amount}
E2000001 80008000
'''

def getStarReplaceSeven5(amount, amountDec):
return f'''
MP7 - Replace Running Star with {amountDec}
204E1910 A8C40018
044E1910 {amount}
E2000001 80008000
'''

def getStarReplaceSeven6(amount, amountDec):
return f'''
MP7 - Replace Running Star with {amountDec}
204E198C 8904001D
044E198C {amount}
E2000001 80008000
204E1990 7D060774
044E1990 7D064378
E2000001 80008000
'''
72 changes: 72 additions & 0 deletions events/marioParty7_bonusStarReplace.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# ============================================
# Mario Party Toolkit
# Author: Nayla Hanegan ([email protected])
# Date: 9/6/2024
# License: MIT
# ============================================

from codes.marioParty7 import *
from functions import *

import pyperclip

def customBonusStarEvent_mp7(star1, star2, star3, star4, star5, star6, stars7):
starSlot1 = star1.get()
starSlot2 = star2.get()
starSlot3 = star3.get()
starSlot4 = star4.get()
starSlot5 = star5.get()
starSlot6 = star6.get()

starHex1 = ["NONE", "88A7001C", "88A7001D", "88A7001E", "88A7001F", "88A70023", "88A70021", "88A70020", "88A70024", "A8A70028", "A8A7002C", "88A7003B", "A8A7003C", "A8A7003E", "A8A70018"]
starHex2 = ["NONE", "88C3001C", "88C3001D", "88C3001E", "88C3001F", "88C30023", "88C30021", "88C30020", "88C30024", "A8C30028", "A8C3002C", "88C3003B", "A8C3003C", "A8C3003E", "A8C30018"]
starHex3 = ["NONE", "8803001C", "8803001D", "8803001E", "8803001F", "88030023", "88030021", "88030020", "88030024", "A8030028", "A803002C", "8803003B", "A803003C", "A803003E", "A8030018"]
starHex4 = ["NONE", "8885001C", "8885001D", "8885001E", "8885001F", "88850023", "88850021", "88850020", "88850024", "A8850028", "A885002C", "8885003B", "A885003C", "A885003E", "A8850018"]
starHex5 = ["NONE", "88C4001C", "88C4001D", "88C4001E", "88C4001F", "88C40023", "88C40021", "88C40020", "88C40024", "A8C40028", "A8C4002C", "88C4003B", "A8C4003C", "A8C4003E", "A8C40018"]
starHex6 = ["NONE", "8804001C", "8804001D", "8804001E", "8804001F", "88040023", "88040021", "88040020", "88040024", "A8040028", "A804002C", "8804003B", "A804003C", "A804003E", "A8040018"]

starSlot1Num = stars7.index(starSlot1)
starSlot1Hex = starHex1[starSlot1Num]

starSlot2Num = stars7.index(starSlot2)
starSlot2Hex = starHex2[starSlot2Num]

starSlot3Num = stars7.index(starSlot3)
starSlot3Hex = starHex3[starSlot3Num]

starSlot4Num = stars7.index(starSlot4)
starSlot4Hex = starHex4[starSlot4Num]

starSlot5Num = stars7.index(starSlot5)
starSlot5Hex = starHex5[starSlot5Num]

starSlot6Num = stars7.index(starSlot6)
starSlot6Hex = starHex6[starSlot6Num]

mpStar41 = getStarReplaceSeven1(starSlot1Hex, starSlot1)
mpStar42 = getStarReplaceSeven2(starSlot2Hex, starSlot2)
mpStar43 = getStarReplaceSeven3(starSlot3Hex, starSlot3)
mpStar44 = getStarReplaceSeven4(starSlot4Hex, starSlot4)
mpStar45 = getStarReplaceSeven5(starSlot5Hex, starSlot5)
mpStar46 = getStarReplaceSeven6(starSlot6Hex, starSlot6)

if starSlot1Hex == "NONE":
mpStar41 = ""
if starSlot2Hex == "NONE":
mpStar42 = ""
if starSlot3Hex == "NONE":
mpStar43 = ""
if starSlot4Hex == "NONE":
mpStar44 = ""
if starSlot5Hex == "NONE":
mpStar45 = ""
if starSlot6Hex == "NONE":
mpStar46 = ""

generatedCode = mpStar41 + mpStar42 + mpStar43 + mpStar44 + mpStar45 + mpStar46

generatedCode = generatedCode.strip()
pyperclip.copy(generatedCode)

print("Generated codes copied to the clipboard.")
createDialog("Operation Sucessful", "success", "Generated codes copied to clipboard!.", None)
6 changes: 3 additions & 3 deletions frames/marioParty5_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,19 +488,19 @@ def fillViaCode5Actions():
label.grid(row=0, column=0, sticky="w")

star1 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars6)
star1.grid(row=0, column=1)
star1.grid(row=0, column=1, pady=10)

label = ctk.CTkLabel(master=tabview.tab("Bonus Star Replacement"), text=" Replace Coin Star with: ", font=("Arial", 16))
label.grid(row=1, column=0, sticky="w")

star2 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars6)
star2.grid(row=1, column=1)
star2.grid(row=1, column=1, pady=10)

label = ctk.CTkLabel(master=tabview.tab("Bonus Star Replacement"), text=" Replace Happening Star with: ", font=("Arial", 16))
label.grid(row=2, column=0, sticky="w")

star3 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars6)
star3.grid(row=2, column=1)
star3.grid(row=2, column=1, pady=10)

parseButton = ctk.CTkButton(master=tabview.tab("Bonus Star Replacement"), command=lambda: customBonusStarEvent_mp5(star1, star2, star3, stars6), text="Generate Codes")
parseButton.place(x=10, y=800)
Expand Down
6 changes: 3 additions & 3 deletions frames/marioParty6_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,19 +677,19 @@ def toggle_hide_custom():
label.grid(row=0, column=0, sticky="w")

star1 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars6)
star1.grid(row=0, column=1)
star1.grid(row=0, column=1, pady=10)

label = ctk.CTkLabel(master=tabview.tab("Bonus Star Replacement"), text=" Replace Orb Star with: ", font=("Arial", 16))
label.grid(row=1, column=0, sticky="w")

star2 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars6)
star2.grid(row=1, column=1)
star2.grid(row=1, column=1, pady=10)

label = ctk.CTkLabel(master=tabview.tab("Bonus Star Replacement"), text=" Replace Happening Star with: ", font=("Arial", 16))
label.grid(row=2, column=0, sticky="w")

star3 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars6)
star3.grid(row=2, column=1)
star3.grid(row=2, column=1, pady=10)

parseButton = ctk.CTkButton(master=tabview.tab("Bonus Star Replacement"), command=lambda: customBonusStarEvent_mp6(star1, star2, star3, stars6), text="Generate Codes")
parseButton.place(x=10, y=800)
Expand Down
43 changes: 43 additions & 0 deletions frames/marioParty7_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from events.marioParty7_handicap import *
from events.marioParty7_items import *
from events.marioParty7_spaceReplace import *
from events.marioParty7_bonusStarReplace import *
from events.marioParty7_battle import *

# Import custom tkinter module as ctk
Expand All @@ -32,6 +33,7 @@ def create_mario_party_7_interface(frame):
tabview.add("Initial Orbs")
tabview.add("Battle Minigame")
tabview.add("Star Handicaps")
tabview.add("Bonus Star Replacement")
tabview.add("Board Specific")
tabview.set("Coins Mods")

Expand Down Expand Up @@ -820,5 +822,46 @@ def fillViaCode7Actions():
parse_stars_button = ctk.CTkButton(master=tabview.tab("Battle Minigame"), command=lambda: battleCoins_mp7(fiveCoins, tenCoins, twentyCoins, thirtyCoins, fiftyCoins), text="Generate Codes")
parse_stars_button.place(x=10, y=800)

stars7 = ["None", "Blue Star", "Red Star", "Character Space Star", "Happening Star", "Duel Star", "Mic Star", "Bowser Star", "DK Star", "Minigame Star", "Coin Star", "Star Star", "Orb Star", "Shopping Star", "Running Star"]

label = ctk.CTkLabel(master=tabview.tab("Bonus Star Replacement"), text=" Replace Minigame Star with: ", font=("Arial", 16))
label.grid(row=0, column=0, sticky="w")

star1 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars7)
star1.grid(row=0, column=1, pady=10)

label = ctk.CTkLabel(master=tabview.tab("Bonus Star Replacement"), text=" Replace Orb Star with: ", font=("Arial", 16))
label.grid(row=1, column=0, sticky="w")

star2 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars7)
star2.grid(row=1, column=1, pady=10)

label = ctk.CTkLabel(master=tabview.tab("Bonus Star Replacement"), text=" Replace Happening Star with: ", font=("Arial", 16))
label.grid(row=2, column=0, sticky="w")

star3 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars7)
star3.grid(row=2, column=1, pady=10)

label = ctk.CTkLabel(master=tabview.tab("Bonus Star Replacement"), text=" Replace Red Star with: ", font=("Arial", 16))
label.grid(row=3, column=0, sticky="w")

star4 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars7)
star4.grid(row=3, column=1, pady=10)

label = ctk.CTkLabel(master=tabview.tab("Bonus Star Replacement"), text=" Replace Running Star with: ", font=("Arial", 16))
label.grid(row=4, column=0, sticky="w")

star5 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars7)
star5.grid(row=4, column=1, pady=10)

label = ctk.CTkLabel(master=tabview.tab("Bonus Star Replacement"), text=" Replace Shopping Star with: ", font=("Arial", 16))
label.grid(row=5, column=0, sticky="w")

star6 = ctk.CTkComboBox(master=tabview.tab("Bonus Star Replacement"), values=stars7)
star6.grid(row=5, column=1, pady=10)

parseButton = ctk.CTkButton(master=tabview.tab("Bonus Star Replacement"), command=lambda: customBonusStarEvent_mp7(star1, star2, star3, star4, star5, star6, stars7), text="Generate Codes")
parseButton.place(x=10, y=800)

return frame

2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# License: MIT
# ============================================

versionString = "3.28"
versionString = "3.29"

0 comments on commit 331c7fa

Please sign in to comment.