Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 0e94a15
Author: PoryGone <[email protected]>
Date:   Sun Feb 11 00:38:39 2024 -0500

    Fix typo

commit 7599c25
Author: PoryGone <[email protected]>
Date:   Sun Feb 11 00:26:32 2024 -0500

    Add new popup option

commit 7ad8bb6
Author: PoryGone <[email protected]>
Date:   Sun Feb 11 00:14:43 2024 -0500

    Missing Special Zone Location

commit 630b61e
Author: PoryGone <[email protected]>
Date:   Sat Feb 10 23:52:14 2024 -0500

    Remove debug text

commit 4c66a0b
Author: PoryGone <[email protected]>
Date:   Sat Feb 10 23:45:10 2024 -0500

    Fix option text

commit 1420729
Author: TheLX5 <[email protected]>
Date:   Sat Feb 10 19:56:31 2024 -0700

    SMW v2 - More small adjustments (ArchipelagoMW#29)

    * Very small logic tweaks

    * Adjusted levels with vertical scroll

    * Added a small failsafe on reading the amount of items received

commit 5698486
Author: TheLX5 <[email protected]>
Date:   Wed Jan 24 21:13:01 2024 -0700

    SMW v2 - Beta 2 fixes (ArchipelagoMW#27)

    * Fix Reverse Trap issues

    * Enable vertical scroll in DP1 main room & CI1 copies

commit 758f06c
Merge: 3f7c5ea aa72f67
Author: PoryGone <[email protected]>
Date:   Sun Jan 21 13:52:16 2024 -0500

    Merge branch 'main' into smw-main

commit 3f7c5ea
Author: TheLX5 <[email protected]>
Date:   Fri Jan 19 01:03:35 2024 -0700

    SMW v2 - Additional changes to a hidden feature (ArchipelagoMW#25)

    * More changes to the hidden player swap feature

    * Fix yoshi poses during the map

commit 7ac687e
Author: PoryGone <[email protected]>
Date:   Thu Jan 18 16:58:52 2024 -0500

    Fix missed option reference

commit 17f649a
Author: PoryGone <[email protected]>
Date:   Wed Jan 17 23:40:52 2024 -0500

    Change 'Reverse Controls Trap' to 'Reverse Trap'

commit 5142739
Merge: 5be46e3 e530202
Author: PoryGone <[email protected]>
Date:   Wed Jan 17 23:38:22 2024 -0500

    Merge branch 'smw-main' of https://github.com/PoryGoneDev/Pory_Archipelago into smw-main

commit 5be46e3
Author: PoryGone <[email protected]>
Date:   Wed Jan 17 23:38:14 2024 -0500

    Sort itempool to place eggs last

commit e530202
Author: TheLX5 <[email protected]>
Date:   Wed Jan 17 21:34:09 2024 -0700

    SMW v2 - Beta test fixes (ArchipelagoMW#24)

    * Blocksanity updates

    * Do not remove Yoshi's House from the json

    * Add mushroom requirement to DP2 vine block

    * Make dragon coins counter go up to 255

    * Update level_blocks_data with up to date blocksanity info

    * Add new traps

    * Give SFX to Reverse Controls Trap

    * Batch of changes

    * Revert coin junk items values

commit ea099e1
Author: PoryGone <[email protected]>
Date:   Wed Jan 10 04:02:15 2024 -0500

    Revamp handling of Yoshi Egg options

commit 08a6569
Author: TheLX5 <[email protected]>
Date:   Mon Jan 8 23:35:44 2024 -0700

    Update DP1 GSP wall to only require GSP and Cape (ArchipelagoMW#23)

commit 22be7ae
Author: PoryGone <[email protected]>
Date:   Tue Jan 9 01:17:33 2024 -0500

    Handle Auto-tracking current room

commit 0f707fe
Author: PoryGone <[email protected]>
Date:   Thu Jan 4 00:47:55 2024 -0500

    Finish options cleanup

commit a86afab
Merge: 6e0fa4d 7406a1e
Author: PoryGone <[email protected]>
Date:   Wed Jan 3 23:39:07 2024 -0500

    Merge branch 'main' into smw-main

commit 6e0fa4d
Author: TheLX5 <[email protected]>
Date:   Wed Jan 3 21:30:30 2024 -0700

    Additional changes to SMW v2 (ArchipelagoMW#22)

    * Batch of changes

    * Remove additional get_filler_item_name

    * Added a way for the client to write to level clear and all blocksanity blocks flags on !collect

commit 0151f69
Author: PoryGone <[email protected]>
Date:   Sat Dec 2 19:28:19 2023 -0500

    Singularity SFX shuffle

commit e8ca4a5
Author: PoryGone <[email protected]>
Date:   Sat Dec 2 19:00:31 2023 -0500

    Condense Level Palette Shuffles into a single option

commit 67044ab
Author: PoryGone <[email protected]>
Date:   Sat Dec 2 03:26:53 2023 -0500

    Clean up MultiWorld usage and options access

commit c3fca02
Merge: e3c0e08 6e38126
Author: PoryGone <[email protected]>
Date:   Fri Dec 1 21:40:48 2023 -0500

    Merge branch 'main' into smw-main

commit e3c0e08
Author: TheLX5 <[email protected]>
Date:   Fri Dec 1 19:37:09 2023 -0700

    Possible SMW v2 implementation (ArchipelagoMW#18)

    * Initial v2 files

    they work on AP 0.4.3

    * Removed code used for debugging

    * Reverted EasyEarlyLevels option

    * Location name adjustments

    * Reverted added logic for Funky

    * Removed easy early levels option

    * Removed options for junk item weights

    * Reworked the vertical scroll hack

    * Change item names from the init file

    * trimming

    * Blocksanity data is now computed from the json file instead of using a bin file

    * Added a missing blocksanity location

    * Bring back import settings and related code

    * Bring back more settings... again!

    * Attempt to solve merge conflict

    * Bring back ROM expansion

    * Attempt ArchipelagoMW#2 to fix merge conflicts

    * Changed junk item "15 coins" to "50 coins"

    * Remove unused things

    * Configured the vertical scroll setting table

    * Modified the map indicator for Hidden 1-Ups

    * Adjusted some palettes

    * Changed 1-Up Checkpoint references to Hidden 1-Up

    Also changed some of the options' descriptions
    ... and changed the name of a location in Donut Ghost House

    * Fixed the logic for a block that could be either a green or yellow switch palace block

    * Make impossible to receive checks during boss battles

    * Several palette fixes

    arbustos

    * Rework palette shuffle options

commit 5e65477
Merge: eb30a71 d2e9bfb
Author: PoryGone <[email protected]>
Date:   Sat Nov 4 21:53:53 2023 -0400

    Merge branch 'main' into smw-main

commit eb30a71
Merge: f33d98b dc2aa5f
Author: PoryGone <[email protected]>
Date:   Mon Jan 30 19:47:00 2023 -0500

    Merge branch 'main' into smw-main

commit f33d98b
Author: PoryGone <[email protected]>
Date:   Sun Jan 29 23:51:38 2023 -0500

    Update worlds/smw/Client.py to use `getattr`

    Co-authored-by: Fabian Dill <[email protected]>

commit 7c8e34b
Author: PoryGone <[email protected]>
Date:   Thu Jan 19 18:52:00 2023 -0500

    Fix Chocolate Island 4 Dragon Coins logic

commit f8e1d2e
Merge: 4a2eab8 02d3eef
Author: PoryGone <[email protected]>
Date:   Thu Jan 19 18:43:33 2023 -0500

    Merge branch 'main' into smw-main

commit 4a2eab8
Author: PoryGone <[email protected]>
Date:   Wed Dec 21 19:30:09 2022 -0500

    Add option to fully exclude Special Zone levels from the seed

commit a84e36c
Merge: 406e188 4cfc73b
Author: PoryGone <[email protected]>
Date:   Mon Dec 19 19:36:50 2022 -0500

    Merge branch 'main' into smw-main

commit 406e188
Author: PoryGone <[email protected]>
Date:   Mon Dec 19 00:08:22 2022 -0500

    Address unconnected regions

commit a2ffeec
Merge: f65d47b e0be796
Author: PoryGone <[email protected]>
Date:   Sun Dec 18 23:49:46 2022 -0500

    Merge branch 'main' into smw-main

commit f65d47b
Author: PoryGone <[email protected]>
Date:   Sun Dec 18 23:49:28 2022 -0500

    Tooltip text edit

commit f595db7
Author: PoryGone <[email protected]>
Date:   Sun Dec 18 18:09:34 2022 -0500

    Add correct tooltip for Early Climb

commit 2a4c2db
Author: PoryGone <[email protected]>
Date:   Sun Dec 18 17:51:44 2022 -0500

    Early Climb and Overworld Speed

commit 8fb3d1e
Author: PoryGone <[email protected]>
Date:   Fri Dec 16 20:31:27 2022 -0500

    Fix trap name and actually create them

commit 5a0e389
Author: PoryGone <[email protected]>
Date:   Fri Dec 16 03:11:11 2022 -0500

    Handle Queuing traps and new Timer Trap

commit 67c37d8
Author: PoryGone <[email protected]>
Date:   Thu Dec 15 00:43:30 2022 -0500

    Fix Literature Trap typo

commit 3ef9594
Author: PoryGone <[email protected]>
Date:   Thu Dec 15 00:28:48 2022 -0500

    Overworld Palette Shuffle

commit 9d8faec
Author: PoryGone <[email protected]>
Date:   Wed Dec 14 19:08:29 2022 -0500

    Remove extra space

commit 10bd729
Author: PoryGone <[email protected]>
Date:   Wed Dec 14 01:09:13 2022 -0500

    Add boss shuffle

commit 13c74ca
Author: PoryGone <[email protected]>
Date:   Mon Dec 12 02:37:41 2022 -0500

    Baseline for Bowser Rooms shuffling

commit 61c1d2f
Merge: 7f4eb70 32820ba
Author: PoryGone <[email protected]>
Date:   Sun Dec 11 17:20:01 2022 -0500

    Merge branch 'main' into smw-main

commit 7f4eb70
Merge: a161083 2cdd03f
Author: PoryGone <[email protected]>
Date:   Sat Dec 10 21:58:41 2022 -0500

    Merge branch 'main' into smw-main

commit a161083
Merge: b92024e ef66f64
Author: PoryGone <[email protected]>
Date:   Thu Dec 1 01:26:49 2022 -0500

    Merge branch 'main' into smw-main

commit b92024e
Author: PoryGone <[email protected]>
Date:   Wed Nov 16 11:42:49 2022 -0500

    Increment Data Package version

    Changed a location name.

commit dcf4108
Merge: aa281ef 4d79920
Author: PoryGone <[email protected]>
Date:   Tue Nov 15 18:01:50 2022 -0500

    Merge branch 'main' into smw-main

commit aa281ef
Author: PoryGone <[email protected]>
Date:   Tue Nov 15 18:01:03 2022 -0500

    Make Bowser unkillable on Egg Hunt
  • Loading branch information
TheLX5 committed Mar 2, 2024
1 parent 983da12 commit b0961c1
Show file tree
Hide file tree
Showing 395 changed files with 8,417 additions and 722 deletions.
901 changes: 878 additions & 23 deletions worlds/smw/Aesthetics.py

Large diffs are not rendered by default.

267 changes: 237 additions & 30 deletions worlds/smw/Client.py

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions worlds/smw/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ class SMWItem(Item):

# Separate tables for each type of item.
junk_table = {
ItemName.one_up_mushroom: ItemData(0xBC0001, False),
ItemName.one_coin: ItemData(0xBC0017, False),
ItemName.five_coins: ItemData(0xBC0018, False),
ItemName.ten_coins: ItemData(0xBC0019, False),
ItemName.fifty_coins: ItemData(0xBC001A, False),
ItemName.one_up_mushroom: ItemData(0xBC0001, False)
}

collectable_table = {
Expand All @@ -36,6 +40,7 @@ class SMWItem(Item):
ItemName.progressive_powerup: ItemData(0xBC000A, True),
ItemName.p_balloon: ItemData(0xBC000B, True),
ItemName.super_star_active: ItemData(0xBC000D, True),
ItemName.special_world_clear: ItemData(0xBC001B, True)
}

switch_palace_table = {
Expand All @@ -46,10 +51,12 @@ class SMWItem(Item):
}

trap_table = {
ItemName.ice_trap: ItemData(0xBC0013, False, True),
ItemName.stun_trap: ItemData(0xBC0014, False, True),
ItemName.literature_trap: ItemData(0xBC0015, False, True),
ItemName.timer_trap: ItemData(0xBC0016, False, True),
ItemName.ice_trap: ItemData(0xBC0013, False, True),
ItemName.stun_trap: ItemData(0xBC0014, False, True),
ItemName.literature_trap: ItemData(0xBC0015, False, True),
ItemName.timer_trap: ItemData(0xBC0016, False, True),
ItemName.reverse_controls_trap: ItemData(0xBC001C, False, True),
ItemName.thwimp_trap: ItemData(0xBC001D, False, True),
}

event_table = {
Expand Down
722 changes: 714 additions & 8 deletions worlds/smw/Levels.py

Large diffs are not rendered by default.

764 changes: 760 additions & 4 deletions worlds/smw/Locations.py

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions worlds/smw/Names/ItemName.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Junk Definitions
one_up_mushroom = "1-Up Mushroom"
one_coin = "1 coin"
five_coins = "5 coins"
ten_coins = "10 coins"
fifty_coins = "50 coins"

# Collectable Definitions
yoshi_egg = "Yoshi Egg"
Expand All @@ -22,11 +26,16 @@
red_switch_palace = "Red Switch Palace"
blue_switch_palace = "Blue Switch Palace"

# Special Zone clear flag definition
special_world_clear = "Special Zone Clear"

# Trap Definitions
ice_trap = "Ice Trap"
stun_trap = "Stun Trap"
literature_trap = "Literature Trap"
timer_trap = "Timer Trap"
ice_trap = "Ice Trap"
stun_trap = "Stun Trap"
literature_trap = "Literature Trap"
timer_trap = "Timer Trap"
reverse_controls_trap = "Reverse Trap"
thwimp_trap = "Thwimp Trap"

# Other Definitions
victory = "The Princess"
Expand Down
608 changes: 608 additions & 0 deletions worlds/smw/Names/LocationName.py

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions worlds/smw/Names/TextBox.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

from BaseClasses import MultiWorld
from worlds.AutoWorld import World

import math

Expand Down Expand Up @@ -63,21 +64,23 @@ def generate_text_box(input_string):
return out_bytes


def generate_goal_text(world: MultiWorld, player: int):
def generate_goal_text(world: World):
out_array = bytearray()
if world.goal[player] == "yoshi_egg_hunt":
required_yoshi_eggs = max(math.floor(
world.number_of_yoshi_eggs[player].value * (world.percentage_of_yoshi_eggs[player].value / 100.0)), 1)
if world.options.goal == "yoshi_egg_hunt":
required_yoshi_eggs = world.required_egg_count
actual_yoshi_eggs = world.actual_egg_count
out_array += bytearray([0x9F, 0x9F])
out_array += string_to_bytes(" You must acquire")
out_array[-1] += 0x80
out_array += string_to_bytes(f' {required_yoshi_eggs:02} Yoshi Eggs,')
out_array += string_to_bytes(f' {required_yoshi_eggs:03} of {actual_yoshi_eggs:03}')
out_array[-1] += 0x80
out_array += string_to_bytes(f' Yoshi Eggs,')
out_array[-1] += 0x80
out_array += string_to_bytes("then return here.")
out_array[-1] += 0x80
out_array += bytearray([0x9F, 0x9F, 0x9F])
out_array += bytearray([0x9F, 0x9F])
else:
bosses_required = world.bosses_required[player].value
bosses_required = world.options.bosses_required.value
out_array += bytearray([0x9F, 0x9F])
out_array += string_to_bytes(" You must defeat")
out_array[-1] += 0x80
Expand Down
185 changes: 138 additions & 47 deletions worlds/smw/Options.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from dataclasses import dataclass
import typing

from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionList
from Options import Choice, Range, Option, Toggle, DeathLink, DefaultOnToggle, OptionList, PerGameCommonOptions


class Goal(Choice):
Expand All @@ -27,11 +28,13 @@ class BossesRequired(Range):

class NumberOfYoshiEggs(Range):
"""
How many Yoshi Eggs are in the pool for Yoshi Egg Hunt
Maximum possible number of Yoshi Eggs that will be in the item pool
If fewer available locations exist in the pool than this number, the number of available locations will be used instead.
Required Percentage of Yoshi Eggs will be calculated based off of that number.
"""
display_name = "Total Number of Yoshi Eggs"
display_name = "Max Number of Yoshi Eggs"
range_start = 1
range_end = 80
range_end = 255
default = 50


Expand All @@ -52,6 +55,40 @@ class DragonCoinChecks(Toggle):
display_name = "Dragon Coin Checks"


class MoonChecks(Toggle):
"""
Whether collecting a 3-Up Moon in a level will grant a check
"""
display_name = "3up Moon Checks"


class Hidden1UpChecks(Toggle):
"""
Whether collecting a hidden 1-Up mushroom in a level will grant a check
These checks are considered cryptic as there's no actual indicator that they're in their respective places
Enable this option at your own risk
"""
display_name = "Hidden 1-Up Checks"


class BonusBlockChecks(Toggle):
"""
Whether collecting a 1-Up mushroom from a Bonus Block in a level will grant a check
"""
display_name = "Bonus Block Checks"


class Blocksanity(Toggle):
"""
Whether hitting a block with an item or coin inside will grant a check
Note that some blocks are excluded due to how the option and the game works!
Exclusion list:
* Blocks in Top Secret Area & Front Door/Bowser Castle
* Blocks that are unreachable unless you glitch your way in
"""
display_name = "Blocksanity"


class BowserCastleDoors(Choice):
"""
How the doors of Bowser's Castle behave
Expand Down Expand Up @@ -145,7 +182,18 @@ class DisplayReceivedItemPopups(Choice):
option_none = 0
option_all = 1
option_progression = 2
default = 2
option_progression_minus_yoshi_eggs = 3
default = 3


class JunkFillPercentage(Range):
"""
Replace a percentage of non-required Yoshi Eggs in the item pool with random junk items (only applicable on Yoshi Egg Hunt goal)
"""
display_name = "Junk Fill Percentage"
range_start = 0
range_end = 100
default = 0


class TrapFillPercentage(Range):
Expand Down Expand Up @@ -197,6 +245,20 @@ class TimerTrapWeight(BaseTrapWeight):
display_name = "Timer Trap Weight"


class ReverseTrapWeight(BaseTrapWeight):
"""
Likelihood of a receiving a trap which causes the controls to be reversed in the current level
"""
display_name = "Reverse Trap Weight"


class ThwimpTrapWeight(BaseTrapWeight):
"""
Likelihood of a receiving a trap which causes a Thwimp to spawn above the player
"""
display_name = "Thwimp Trap Weight"


class Autosave(DefaultOnToggle):
"""
Whether a save prompt will appear after every level
Expand Down Expand Up @@ -239,6 +301,21 @@ class MusicShuffle(Choice):
default = 0


class SFXShuffle(Choice):
"""
Shuffles almost every instance of sound effect playback
Archipelago elements that play sound effects aren't randomized
None: No SFX are shuffled
Full: Each individual SFX call has a random SFX
Singularity: The entire game uses one SFX for every SFX call
"""
display_name = "Sound Effect Shuffle"
option_none = 0
option_full = 1
option_singularity = 2
default = 0


class MarioPalette(Choice):
"""
Mario palette color
Expand All @@ -255,25 +332,33 @@ class MarioPalette(Choice):
default = 0


class ForegroundPaletteShuffle(Toggle):
"""
Whether to shuffle level foreground palettes
"""
display_name = "Foreground Palette Shuffle"


class BackgroundPaletteShuffle(Toggle):
class LevelPaletteShuffle(Choice):
"""
Whether to shuffle level background palettes
Whether to shuffle level palettes
off: Do not shuffle palettes
on_legacy: Uses only the palette sets from the original game
on_curated: Uses custom palette sets created by some people
Setting this option will also force Backgrounds to use those palettes
"""
display_name = "Background Palette Shuffle"
display_name = "Level Palette Shuffle"
option_off = 0
option_on_legacy = 1
option_on_curated = 2
default = 0


class OverworldPaletteShuffle(Toggle):
class OverworldPaletteShuffle(Choice):
"""
Whether to shuffle overworld palettes
off: Do not shuffle palettes
on_legacy: Uses only the palette sets from the original game
on_curated: Uses custom palette sets created by some people
"""
display_name = "Overworld Palette Shuffle"
option_off = 0
option_on_legacy = 1
option_on_curated = 2
default = 0


class StartingLifeCount(Range):
Expand All @@ -286,34 +371,40 @@ class StartingLifeCount(Range):
default = 5



smw_options: typing.Dict[str, type(Option)] = {
"death_link": DeathLink,
"goal": Goal,
"bosses_required": BossesRequired,
"number_of_yoshi_eggs": NumberOfYoshiEggs,
"percentage_of_yoshi_eggs": PercentageOfYoshiEggs,
"dragon_coin_checks": DragonCoinChecks,
"bowser_castle_doors": BowserCastleDoors,
"bowser_castle_rooms": BowserCastleRooms,
"level_shuffle": LevelShuffle,
"exclude_special_zone": ExcludeSpecialZone,
"boss_shuffle": BossShuffle,
"swap_donut_gh_exits": SwapDonutGhostHouseExits,
#"display_sent_item_popups": DisplaySentItemPopups,
"display_received_item_popups": DisplayReceivedItemPopups,
"trap_fill_percentage": TrapFillPercentage,
"ice_trap_weight": IceTrapWeight,
"stun_trap_weight": StunTrapWeight,
"literature_trap_weight": LiteratureTrapWeight,
"timer_trap_weight": TimerTrapWeight,
"autosave": Autosave,
"early_climb": EarlyClimb,
"overworld_speed": OverworldSpeed,
"music_shuffle": MusicShuffle,
"mario_palette": MarioPalette,
"foreground_palette_shuffle": ForegroundPaletteShuffle,
"background_palette_shuffle": BackgroundPaletteShuffle,
"overworld_palette_shuffle": OverworldPaletteShuffle,
"starting_life_count": StartingLifeCount,
}
@dataclass
class SMWOptions(PerGameCommonOptions):
death_link: DeathLink
goal: Goal
bosses_required: BossesRequired
max_yoshi_egg_cap: NumberOfYoshiEggs
percentage_of_yoshi_eggs: PercentageOfYoshiEggs
dragon_coin_checks: DragonCoinChecks
moon_checks: MoonChecks
hidden_1up_checks: Hidden1UpChecks
bonus_block_checks: BonusBlockChecks
blocksanity: Blocksanity
bowser_castle_doors: BowserCastleDoors
bowser_castle_rooms: BowserCastleRooms
level_shuffle: LevelShuffle
exclude_special_zone: ExcludeSpecialZone
boss_shuffle: BossShuffle
swap_donut_gh_exits: SwapDonutGhostHouseExits
#display_sent_item_popups: DisplaySentItemPopups
display_received_item_popups: DisplayReceivedItemPopups
junk_fill_percentage: JunkFillPercentage
trap_fill_percentage: TrapFillPercentage
ice_trap_weight: IceTrapWeight
stun_trap_weight: StunTrapWeight
literature_trap_weight: LiteratureTrapWeight
timer_trap_weight: TimerTrapWeight
reverse_trap_weight: ReverseTrapWeight
thwimp_trap_weight: ThwimpTrapWeight
autosave: Autosave
early_climb: EarlyClimb
overworld_speed: OverworldSpeed
music_shuffle: MusicShuffle
sfx_shuffle: SFXShuffle
mario_palette: MarioPalette
level_palette_shuffle: LevelPaletteShuffle
overworld_palette_shuffle: OverworldPaletteShuffle
starting_life_count: StartingLifeCount
Loading

0 comments on commit b0961c1

Please sign in to comment.