Code Monkey home page Code Monkey logo

thetrackercouncil / smz3randomizer Goto Github PK

View Code? Open in Web Editor NEW
23.0 4.0 8.0 66.91 MB

Tracker presents: a casual standalone version of the Super Metroid & A Link to the Past Crossover Randomizer with built-in automatic item tracking and Twitch integration

Home Page: https://vivelin.net/projects/smz3

License: MIT License

C# 69.18% PowerShell 0.10% Inno Setup 0.97% Batchfile 0.04% Shell 0.01% Python 0.71% Assembly 28.98%
randomizer snes csharp wpf voice-recognition alttp super-metroid

smz3randomizer's Introduction

SMZ3 Cas’ Randomizer

“This is the cas'est version of the rando you’ll ever see.”
— Diabetus, 2021

The SMZ3 Cas’ Randomizer is a fork of the original Super Metroid & A Link to the Past Crossover Randomizer. It’s aimed at making it a more approachable and casual experience by removing some decidedly uncas’ elements such as IBJ (Infinite Bomb Jump).

A Windows installer for latest version of the SMZ3 Cas’ Randomizer can be found on the GitHub releases page. You can also find information about limited cross-platform version that supports Linux here.

Features

In addition to making IBJ completely optional, there is also:

  • Integrated voice-enabled/automated item & location tracker;
  • Built-in MSU-1 support for custom music packs;
  • More logic customization options;
  • Various accessibility patches;
  • Customizable ship sprites;
  • Patches for modern Super Metroid controls;
  • In game hint tiles and voice-enabled hints via tracker;
  • Sprites made by members of Diabetus’ community and others;

Credits

  • Below you can find a list of all of the sprites included and their creators
  • Various Super Metroid patches were pulled from the VARIA Randomizer by theonlydude
  • Diabetus and PinkKittyRose and the members of their communities have helped test and stream with this fork

The original repository can be found at https://github.com/tewtal/SMZ3Randomizer.

Hosting a SMZ3 Cas' Multiplayer Server

Interested in hosting your own server for multiplayer games? Take a look at the Server Setup Documentation.

smz3randomizer's People

Contributors

cpcolin avatar dorkmasterflek avatar fxbx avatar jcbantuelle avatar mattequalscoder avatar mcen1 avatar rebelusquo avatar shinesyndrome avatar skeleskele avatar smolbig avatar tarthoron avatar tewtal avatar therealfragger avatar vivelin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

smz3randomizer's Issues

Feature toggles

Make it possible to toggle specific features on or off.

This should let us experiment a little more freely and as a bonus, gives users the ability to turn off parts entirely (e.g. the hints and spoilers module).

Pegasus Boots location option

  • Randomized (default)
  • Early (as the others)
  • Sahasrahla's Hut (since vanilla is green pendant locked, which... isn't a great option for a randomizer.)

Upgrade to .NET 6, enable nullable references, support YAML for configs

Some basic maintainability stuff.

  • Upgrade projects from .NET 5 to .NET 6
  • Enable nullable references in all projects
    • This might be a big one. We'll have to see.
  • Enable YAML configuration support, falling back to JSON if tracker.yml, locations.yml etc. don't exist.
    • YAML should be a more natural and readable format for non-tech people, and is considered a superset of JSON so everything should still be supported.

Depends on:

  • #16
    • We can't really ask everyone to manually install the .NET runtime again. If it can't be done easily with InnoSetup, we should consider switching, instead.

Tracker subtitles option

There's an event on the Text to Speech engine that lets us see what word tracker is speaking as it's being spoken. We could use this to implement a subtitles option, which could be useful to debug some pronunciation issues, as well as potentially help with accessibility.

Split Tracker good/useless item categorization into three

Currently, deciding whether an item is good ("progression") is largely arbitrary and depends exclusively on the item type itself.

Some effort was made to extend this to include more logic in 719153e, but it is ultimately still mostly flawed because it relies on whether the item at the end of the chain is "good" or not.

My suggestion would be to split this into three categories:

  • Strictly required for go mode. This depends on logic and currently tracked items.
    Examples: Morph Ball; Pegasus Boots when GT Big Key is on Bob's Torch; the first (two) Power Bombs.
  • Nice to have but technically skippable. For example, mail upgrades.
  • Everything else, like missiles, arrows, rupees, etc.

Make it possible to fully customize a seed

Unlike the current item placement options, this mode should override the filling algorithm completely — you're expected to manually customize a seed in its entirety.

This could be achieved e.g. by uploading an edited spoiler log?

In addition to making "plando" seeds possible, this should also facilitate version-agnostic seed sharing, as the logic (which is version-dependent) isn't taken into account.

Requirements

  • All items, including junk, should be placeable at any location.
    • This includes keys, maps and compasses (but not keycards unless keysanity is enabled).
  • Dungeon rewards (pendant/crystal) should be customizable.
  • Show a warning (either before or after generating the seed this way) that this seed overrides logic and may or may not be completable.

Nice to have

  • Export plando configuration from seed.
  • Ability to customize enemy drops.
    • If going by the "upload a spoiler log" solution, we should write drop RNG to the spoiler log.

OAuth token security

  • Don't show the OAuth token in plain text.

    Even better: don't show it all, and instead show a "Logged in as " and possibly a logout button that revokes the access token. This should double as a way to make sure the token is still valid.

  • Store the token securely.

    This isn't super relevant right now, since the only scopes are chat:read and chat:edit, but this is very necessary if we ever need more access than this.

List installed MSU packs

  • Auto-detect MSU packs from *.msu and *.pcm files
  • Allow saving and loading MSU packs as YAML
  • Replace MSU pack text field with dropdown

Generate custom game

Add the ability to generate a custom game completely by, for example, generating a seed from a spoiler log.

Could potentially add a UI to choose specific item locations, although this would likely require a complete rework of the randomization process.

Rework Super Metroid locations into Rooms

I've added Rooms to group together related locations and applied it to Zelda, e.g. Kakariko Well has 5 chests grouped together into the Kakariko Well room.

Unlike Zelda, Super Metroid doesn't have an overworld and consists exclusively of Rooms. We should make use of this and move every Super Metroid item location into rooms.

Afterwards, we should consider adding empty Rooms and the connections between them, to open up new possibilities, such as commands like "Hey tracker, how do I get to X from Y?" (see #117)

Tracker.cs rework

Tracker.cs is getting kind of chonky. In additon, now that there's multiple ways of tracking things and clearing locations, there needs to be some consistency.

My suggestion is to identify and split up several core tracking functionalities into services, e.g. an Item service for tracking and untracking items, and a Location service for clearing locations.

Tracker.cs will likely still contain the main methods that are called from the voice commands, but the UI will have the option between those and more fine-grained control using the services (but still remain consistent with the rest of tracker).

Swordless Agahnim

There's some references to enabling this, but it seems the actual ROM patches requires for this are missing.

Clearing a dungeon doesn't work properly

When saying "Hey tracker, clear Hyrule Castle" with treasure remaining on the counter, tracker will sometimes say "But there's only X left". It's got something to do with tracking treasure but not clearing locations.

The best solution is probably just writing a specific method to clear dungeons, as it's different from clearing any other location and making that method a lot more convoluted than necessary.

Tracker cheat codes

Since this is apparently possible now:

  • Allow tracker to give the player power bombs, missiles, health, etc.
  • Allow tracker to kill the player given specific commands (e.g. "Hey tracker, fuck you" — "Fuck you too, buddy" followed by player death)
  • Undo should be supported.
  • Must be enabled like hints and spoilers (e.g. "Hey tracker, enable cheats", "Hey tracker, sv_cheats 1", etc.) or confirmed (imagine Clippy going "📎Do you need some help with that?")

Alternative filler algorithms

The Filler from the original SMZ3 randomizer is hard to understand and with recent additions, like picking specific item locations, can be unstable.

We should add different filler algorithms to see how they affect the randomization. If #14 is done, we could even add one that fills items based on distance from other items, or something like that.

Better keysanity support in Tracker

It's already possible to track small and big keys, and technically possible to add them to the tracker layout without a code change. This is far from ideal, however.

  • A better space-optimized layout for keys might be necessary;
  • Separate "playing/tracking logic" from "randomizer logic";
    • The logic only accounts for randomized keys found in chests, not other keys that people playing would probably track;
    • Also makes sense for things like the green pendant and defeating Agahnim.
  • Keys in A Link to the Past are straightforward enough. Keycards in Super Metroid, however, were hacked in, and make little sense to most people.
    • Once a keycard has been tracked, newly unlocked locations should show up on the map. That will already help, but...
    • ...it would be nice to figure out a way to visualize the keycards on the various Super Metroid maps.

Ganon's Tower Big Key guessing game support

With the new Twitch integration we can add some voice commands to facility the GT Big Key guessing game more easily:

  • A voice command to start tracking guesses in chat, e.g. "Hey tracker, start the GT big key guessing game"
  • A voice command to stop tracking guesses in chat, e.g. "Hey tracker, stop tracking guesses" or "Hey tracker, the floor is now closed"
  • A voice command to announce the winning number that'll prompt Tracker to announce the viewers with the correct guess, e.g. "Hey tracker, who guessed <1–21>?" or "Hey tracker, the big key is in chest <1–21>".

Once this has been proven to work correctly, provided the user is logged in to Twitch as a moderator, it would be possible to tracker to delete messages once they have been accepted as guess using /delete <msg id>

Possible Not-So-Cas' situation: going through Lava Dive Room without Gravity Suit mandatory to complete

Seed 1977650472

Gravity Suit is in Upper Norfair, West - Ice Beam - it would be possible with mockball, though the Tricks option MockBall was not checked while generating the ROM [if it was checked I wouldn't be entering this in]
Speed Booster is in Lower Norfair, West - Missile (Gold Torizo) - though you can see it by entering via Misery Mire, apparently without TAS-grade glitches it is inaccessible
Therefore you'd have to enter Lower Norfair via Lava Dive Room to get the Speed Booster, which without Gravity Suit or Speed Booster is non-trivial

Spoiler log attached
SMZ3_Cas_20220410-231501_1977650472.txt

Use DisplayName instead of username when pronouncing user names

Capitalization helps TTS pronounce it correctly (e.g. PinkKittyRose vs pinkkittyrose, where the former is pronounced correctly and the latter is butchered)

On a similar note, the pronunciation dictionary should be case insensitive, for the same reason.

Run history / seed manager

Store generated seeds in a database like the original randomizer used to do, and use this to show a history of previously generated games with a new UI to replace the spoiler log text file. Make it possible to start tracker for a past run.

Add nicknames for chat / update pronunciation

As suggested in #83

It would be nice to let viewers change the pronunciation of their username or even just have them add nicknames. We should, however, figure out how to prevent or reduce abuse from this.

Starting equipment

I'd be pretty sweet to be able to select what equipment to start with, e.g. starting with 10 bombs in Zelda.

The Baby ship sprite crashes

The randomizer shouldn't crash when a patch doesn't work. It might be possible to fix the IPS patch, too.

Crash log:

2022-03-04T13:03:01.9092403-04:00	CRIT	[Randomizer.App.App]	[0]	[CRASH] Uncaught ArgumentOutOfRangeException in Dispatcher: System.ArgumentOutOfRangeException: Super Metroid offset must be below 0x00300000 (Parameter 'offset')
Actual value was 4194303.
   at Randomizer.SMZ3.FileData.Rom.TranslateSuperMetroidOffset(Int32 offset) in D:\Source\SMZ3Randomizer\src\Randomizer.SMZ3\FileData\Rom.cs:line 76
   at Randomizer.SMZ3.FileData.Rom.ApplyIps(Byte[] rom, Stream ips, Func`2 translateOffset) in D:\Source\SMZ3Randomizer\src\Randomizer.SMZ3\FileData\Rom.cs:line 97
   at Randomizer.SMZ3.FileData.Rom.ApplySuperMetroidIps(Byte[] rom, Stream ips) in D:\Source\SMZ3Randomizer\src\Randomizer.SMZ3\FileData\Rom.cs:line 71
   at Randomizer.App.RomGenerator.GenerateRomBytes(RandomizerOptions options, SeedData& seed) in D:\Source\SMZ3Randomizer\src\Randomizer.App\RomGenerator.cs:line 131
   at Randomizer.App.RomGenerator.GenerateRom(RandomizerOptions options, String& path, String& error, GeneratedRom& rom) in D:\Source\SMZ3Randomizer\src\Randomizer.App\RomGenerator.cs:line 45
   at Randomizer.App.GenerateRomWindow.GenerateRomButton_Click(Object sender, RoutedEventArgs e) in D:\Source\SMZ3Randomizer\src\Randomizer.App\Windows\GenerateRomWindow.xaml.cs:line 142
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Move location names to tracker config

Make location names customizable like item and dungeon names in tracker.json. They're mostly only used by tracker, anyway.

Merge this with the new map location data, in the same way item data contains properties about tracker display.

e.g.

{
  "Id": 18,
  "Name": [ 
    "Mockball - Back room hidden item", 
    "Ron Popeil missiles", 
    [ "Missile (green Brinstar behind missile)", 0 ]
  ],
  "X": 392,
  "Y": 212
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.