Skip to content

Commit

Permalink
finally
Browse files Browse the repository at this point in the history
  • Loading branch information
RainbowTabitha committed Aug 2, 2024
1 parent 7a37ba4 commit d93f7e2
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 24 deletions.
36 changes: 18 additions & 18 deletions codes/marioParty6.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def getCharacterSpaceCodeSix(amount, amountDec):
0415F230 3880{amount}
'''

def getStarSpaceCodeSix(amount, negAmount, amountDec):
def getStarSpaceCodeSix(amount, negAmount, amountDec, y4, y2, x2, x4):
return f'''
MP6 - Stars Cost {amountDec} Coins
0418333C 2C03{amount}
Expand All @@ -102,25 +102,25 @@ def getStarSpaceCodeSix(amount, negAmount, amountDec):
2C14{amount} 00000000
C2184544 00000001
3880{negAmount} 00000000
'''

def getFaireSquareStarCodeSix(one, two, three, four):
return f'''
MP6 - Stars Can Cost SIXONE, SIXTWO, SIXTHREE, or SIXFOUR During Faire Square's Nightime
04248064 0000{one}
04248068 0000{two}
04248070 0000{three}
04248074 0000{four}
04248D3C 0000{one}
04248D40 0000{two}
04248D48 0000{three}
04248D4C 0000{four}
28265B8A 00000014
00265B8B 000000{amount}
E2000001 80008000
04248064 000000{y4}
04248068 000000{y2}
04248070 000000{amount}
04248074 000000{x2}
04248D3C 000000{x4}
04248D40 000000XX
04248D48 000000YY
04248D4C 000000ZZ
204DDF60 465F6C00
044DDF74 0000{one}
044DDF78 0000{two}
044DDF80 0000{three}
044DDF84 0000{four}
044DDF74 000000WW
044DDF78 000000XX
044DDF80 000000YY
044DDF84 000000ZZ
E2000001 80008000
'''

def getPinkBooSpaceCodeSix(amount, negAmount, amountDec):
Expand Down
8 changes: 7 additions & 1 deletion codes/marioParty7.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def getMinigameCodeSeven(amount, amountDec):
E2000001 80008000
'''

def getStarSpaceCodeSeven(amount, amountDec):
def getStarSpaceCodeSeven(amount, amountDec, x2, x3, x4):
return f'''
MP7 - Stars Cost {amountDec} Coins
04188774 3B80{amount}
Expand All @@ -87,6 +87,12 @@ def getStarSpaceCodeSeven(amount, amountDec):
044E0BAC 38A0{amount}
044E0C8C 1C60000A
E2000001 80008000
204F92AC 804F929D
044F9268 0000{amount}
044F926C 0000{x2}
044F9270 0000{x3}
044F9274 0000{x4}
E2000001 80008000
'''

def getStarSpaceCodeSevenLastFive(amount, amountDec):
Expand Down
10 changes: 9 additions & 1 deletion events/marioParty6_coins.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ def coinsEvent_mp6(blueEntry, redEntry, characterEntry, mgEntry, starEntry, pink
mgSpaceAmountSix = hex(int(mgEntry.get()))[2:].zfill(4).upper() if mgEntry.get() else "DUMMY"
starSpaceAmountSix = hex(int(starEntry.get()))[2:].zfill(4).upper() if starEntry.get() else "DUMMY"
starSpaceAmountNegativeSix = format(-int(starEntry.get()) & 0xFFFFFFFFFFFFFFFF, 'X')[12:] if starEntry.get() else "DUMMY"

starSpacex2 = hex(int(starEntry.get()) * 2)[2:].zfill(4).upper() if starEntry.get() else "DUMMY"
starSpacex4 = hex(int(starEntry.get()) * 4)[2:].zfill(4).upper() if starEntry.get() else "DUMMY"
starSpacey2 = hex(int(starEntry.get()) / 2)[2:].zfill(4).upper() if starEntry.get() else "DUMMY"
starSpacey4 = hex(int(starEntry.get()) / 4)[2:].zfill(4).upper() if starEntry.get() else "DUMMY"



characterSpaceAmountSix = hex(int(characterEntry.get()))[2:].zfill(4).upper() if characterEntry.get() else "DUMMY"

pinkBooCoinsSix = hex(int(pinkBooCoinsEntry.get()))[2:].zfill(4).upper() if pinkBooCoinsEntry.get() else "DUMMY"
Expand All @@ -33,7 +41,7 @@ def coinsEvent_mp6(blueEntry, redEntry, characterEntry, mgEntry, starEntry, pink
marioPartySixRedSpace = getRedSpaceCodeSix(redSpaceAmountNegativeSix, redEntry.get()) if redSpaceAmountNegativeSix != "DUMMY" else ""
marioPartySixCharSpace = getCharacterSpaceCodeSix(characterSpaceAmountSix, characterEntry.get()) if characterSpaceAmountSix != "DUMMY" else ""
marioPartySixMiniGame = getMinigameCodeSix(mgSpaceAmountSix, mgEntry.get()) if mgSpaceAmountSix != "DUMMY" else ""
marioPartySixStarSpace = getStarSpaceCodeSix(starSpaceAmountSix, starSpaceAmountNegativeSix, starEntry.get()) if starSpaceAmountSix != "DUMMY" else ""
marioPartySixStarSpace = getStarSpaceCodeSix(starSpaceAmountSix, starSpaceAmountNegativeSix, starEntry.get(), starSpacey4, starSpacey2, starSpacex2, starSpacex4) if starSpaceAmountSix != "DUMMY" else ""
marioPartySixChompCoins = getPinkBooCoinsSpaceCodeSix(pinkBooCoinsSix, pinkBooCoinsSixNeg, pinkBooCoinsEntry.get()) if pinkBooCoinsSix != "DUMMY" else ""
marioPartySixChompStars = getPinkBooSpaceCodeSix(pinkBooStarsSix, pinkBooStarsSixNeg, pinkBooStarEntry.get()) if pinkBooStarsSix != "DUMMY" else ""
marioPartySixChompBase = getCoinStealBaseSix(pinkBooCoinsMinSix, pinkBooMinEntry.get()) if pinkBooCoinsMinSix != "DUMMY" else ""
Expand Down
6 changes: 5 additions & 1 deletion events/marioParty7_coins.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def coinsEvent_mp7(blueEntry, redEntry, characterEntry, mgEntry, starEntry, star
starSpaceAmountSevenLast5 = hex(int(startLast5.get()))[2:].zfill(4).upper() if startLast5.get() else "DUMMY"
zapSeven = hex(int(zapEntry.get()))[2:].zfill(4).upper() if zapEntry.get() else "DUMMY"

starSpacex2 = hex(int(starEntry.get()) * 2)[2:].zfill(4).upper() if starEntry.get() else "DUMMY"
starSpacex3 = hex(int(starEntry.get()) * 3)[2:].zfill(4).upper() if starEntry.get() else "DUMMY"
starSpacex4 = hex(int(starEntry.get()) * 4)[2:].zfill(4).upper() if starEntry.get() else "DUMMY"

fireballSeven = hex(int(fireballEntry.get()))[2:].zfill(4).upper() if fireballEntry.get() else "DUMMY"
fireballSevenNeg = format(-int(fireballEntry.get()) & 0xFFFFFFFFFFFFFFFF, 'X')[12:] if fireballEntry.get() else "DUMMY"

Expand All @@ -35,7 +39,7 @@ def coinsEvent_mp7(blueEntry, redEntry, characterEntry, mgEntry, starEntry, star
marioPartySevenRedSpace = getRedSpaceCodeSeven(redSpaceAmountNegativeSeven, redEntry.get()) if redSpaceAmountNegativeSeven != "DUMMY" else ""
marioPartySevenCharSpace = getCharacterSpaceCodeSeven(characterSpaceAmountSeven, characterEntry.get()) if characterSpaceAmountSeven != "DUMMY" else ""
marioPartySevenMiniGame = getMinigameCodeSeven(mgSpaceAmountSeven, mgEntry.get()) if mgSpaceAmountSeven != "DUMMY" else ""
marioPartySevenStarSpace = getStarSpaceCodeSeven(starSpaceAmountSeven, starEntry.get()) if starSpaceAmountSeven != "DUMMY" else ""
marioPartySevenStarSpace = getStarSpaceCodeSeven(starSpaceAmountSeven, starEntry.get(), starSpacex2, starSpacex3, starSpacex4, ) if starSpaceAmountSeven != "DUMMY" else ""
marioPartySevenStarSpaceLast5 = getStarSpaceCodeSevenLastFive(starSpaceAmountSevenLast5, startLast5.get()) if starSpaceAmountSevenLast5 != "DUMMY" else ""
marioPartySevenZap = getZapSpaceCodeSeven(zapSeven, zapEntry.get()) if zapSeven != "DUMMY" else ""
marioPartySevenFireball = getFireballSpaceCodeSeven(fireballSeven, fireballSevenNeg, fireballEntry.get()) if fireballSeven != "DUMMY" else ""
Expand Down
4 changes: 1 addition & 3 deletions frames/marioParty7_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,14 @@ def create_entry2(tab, row, icon_path, label_text, color):
mgWin_entry = create_entry(tabview.tab("Coins Mods"), 4, "assets/eventTags/miniGame.png", " Gain ", " Coins when winning a Minigame.")

star_entry = create_entry(tabview.tab("Coins Mods"), 5, "assets/eventTags/starSpace.png", " Costs ", " Coins to buy a Star at a Star Space and when using Flutter. ")
windmill_entryTooltip = CTkToolTip(star_entry, message="Works on Canal, Neon, and Bowser.")
windmill_entryTooltip = CTkToolTip(star_entry, message="Works on Canal, Pagoda, Neon Heights, and Bowser.")

star_last4_entry = create_entry(tabview.tab("Coins Mods"), 6, "assets/eventTags/starSpace.png", " Costs ", " Coins to buy a Star during Last 4 Turns.")
hammerBro_entry = create_entry2(tabview.tab("Coins Mods"), 1, "assets/items/hammerBroCapsule.png", " Steal ", " Coins from Hammer Bro.")
zap_entry = create_entry2(tabview.tab("Coins Mods"), 2, "assets/items/zapCapsule.png", " Lose ", " Coins from Zaps.")
fireball_entry = create_entry2(tabview.tab("Coins Mods"), 3, "assets/items/fireballCapsule.png", " Steal ", " Coins from Fireballs.")
vacuum_entry = create_entry2(tabview.tab("Coins Mods"), 4, "assets/items/vacuumCapsule.png", " Steal ", " Coins despite Vacuum Roulette.")
flower_entry = create_entry2(tabview.tab("Coins Mods"), 5, "assets/items/flowerCapsule.png", " Gain ", " Per Space with Flower.")
#windmill_entry = create_entry2(tabview.tab("Coins Mods"), 6, "assets/eventTags/willmillville.png", " Max ", " coins.")
#windmill_entryTooltip = CTkToolTip(windmill_entry, message="Max Coin Value is 255")

# Create button to generate coins modification codes
parse_coins_button = ctk.CTkButton(master=tabview.tab("Coins Mods"), command=lambda: coinsEvent_mp7(blue_entry, red_entry, character_entry, mgWin_entry, star_entry, star_last4_entry, hammerBro_entry, zap_entry, fireball_entry, vacuum_entry, flower_entry), text="Generate Codes")
Expand Down

0 comments on commit d93f7e2

Please sign in to comment.