Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Community seeds #72

Merged
merged 7 commits into from
Mar 10, 2022
Merged

Community seeds #72

merged 7 commits into from
Mar 10, 2022

Conversation

MattEqualsCoder
Copy link
Collaborator

@MattEqualsCoder MattEqualsCoder commented Mar 6, 2022

Adding the ability to have more granular control over what gets generated where and adding the ability to share configs, opening the possibility for community created seeds for streamers to play.

  • Every location can now have either progression items, junk items, or specific items be specified
  • All progression items can be specified as early items
  • Updated rom generation to handle potentially unwinnable seeds gracefully by displaying an error message upon generating the rom
    • Depending on settings, sometimes you can try regenerating the seed when this error displays, and it'll work successfully. If you requested a particular item at a location where the item isn't needed to get there, it may have randomly picked a logic chain that is impossible.
  • Base 64 encoded settings strings can be generated and shared that house all of the config data
    • This can be retrieved by either right clicking in the rom list page or by viewing the spoiler log
    • All customization such as sprites, cas'troid, etc. should pull from the local player's settings. Only seed info is copied.

…o copy/paste config strings to send to other people
@Vivelin
Copy link
Member

Vivelin commented Mar 6, 2022

I can't really give a thorough review right now but I didn't see anything too out of the ordinary so feel free to continue

@MattEqualsCoder
Copy link
Collaborator Author

@Vivelin I added in the ability to specify any progression item as an early item, but I ran into issues where sometimes specifying them will randomly run into infinite loops when generating seeds (though not always). It handles it somewhat gracefully and warns the user, but want to see if I can figure out why it's happening and think about how to best address it.

- Fixed issue with silver arrows causing problems due to them being referred to as progression in some areas but not others
- Added location/item settings and the config string to spoiler log
- Added seed logging to the debug logs for easier debugging
- Fixed various corner case issues with setting item/locations
- Added test cases
- Handling some errors better in case of seeds that can't be beaten come up
- Fixing some more corner cases where it would try to put a progression item behind a place that needs that item
@MattEqualsCoder MattEqualsCoder marked this pull request as ready for review March 10, 2022 07:12
@MattEqualsCoder
Copy link
Collaborator Author

@Vivelin After pulling my hair out for hours, I think I've got this pretty stable. There were a mountain of corner cases that were arising when I was trying to run stats or unit tests that revolving around how it shuffled items around. Obviously still certain combinations people put in may be unbeatable, but it should catch those situations upon generation and warn people.

I'm going to do some more testing tomorrow, but otherwise this should be good to go.

@Vivelin
Copy link
Member

Vivelin commented Mar 10, 2022

I'll give it a review in a minute. It might be best to release this soon-ish (mark it as pre-release for now?) so there's a little more time to test. I've had some other small changes I wanted to make but we've already got more than enough to warrant a new release, I think.

Vivelin
Vivelin previously approved these changes Mar 10, 2022
@@ -271,6 +190,11 @@
<TextBox x:Name="SeedInput"
Text="{Binding Seed}" />
</controls:LabeledControl>

<controls:LabeledControl Text="Config string (optional):">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Config string" might not be the best name for this in the UI... Maybe import/export buttons? Or "Copy settings" and "Import from clipboard" or something like that?

var selectedRegion = comboBox.SelectedItem as string;
foreach (FrameworkElement obj in LocationsGrid.Children) {
var location = obj.Tag as Location;
obj.Visibility = selectedRegion.Contains(location.Region.Name) ? Visibility.Visible : Visibility.Collapsed;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can cause a null reference exception if Tag is ever not a location or null.

- Fixed not null checking tag
- Updated terminology for config strings in UI
- Added logic options to spoiler log
@MattEqualsCoder
Copy link
Collaborator Author

MattEqualsCoder commented Mar 10, 2022

Fixed all of the above and added the logic config to the spoiler log.

If you aren't able to make a build today, I probably can tonight my time.

@Vivelin
Copy link
Member

Vivelin commented Mar 10, 2022

Yeah, I won't have time today.

@Vivelin Vivelin merged commit db0bc5b into main Mar 10, 2022
@Vivelin Vivelin deleted the community-seeds branch March 10, 2022 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants