-
Notifications
You must be signed in to change notification settings - Fork 722
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
Stardew Valley: implement new game #1455
Stardew Valley: implement new game #1455
Conversation
f5f2d82
to
127c921
Compare
fa39ec4
to
c9bbcef
Compare
c5ccd46
to
04ba7d6
Compare
7d74383
to
7bf5490
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started looking at things, here are couple so far:
-
we can not really require pytest
For two reasons:- pycharm has its own thing that (hopefully, some) devs use during their development
- pytest's collection code does not pickup packed apworlds and pytest does not honour
load_tests
The two "offending" things I see in the PR are
pytest.mark
- using "bare function" tests (that live outside of a class derived from
unittest.TestCase
)
-
Not sure what I think of test.TestBase.WorldTestBase.player
-
worlds/sv/data
has no python code in it, but you have an__init__.py
there.
I believe a pure data folder should not be a python package, so the__init__.py
should probably go. -
A doc string at the top of scripts/*.py would be nice that explains what they are being used for
-
I believe frozenset(some_set) will make a copy of the set - so this is kind of wasteful in fish_data.py
-
pytest complains about sampling from a set
plus what I commented on inline/below
Oh, and another thing. have not played SV in a while, but shouldn't the shipping container (where you throw stuff in)
be to right of the house?
Player1 sent Shipping Bin to Player1 (Bamboo Pole Cutscene)
But I don't see a shipping container. Is there another step required after receiving the letter?
week_days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] | ||
|
||
|
||
class StardewRule: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate why this boiler plate is necessary? (The whole StardewRule and its subclasses)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's necessary because
- In the first beta, all the rule was made of lambda, like in other games. However, one cannot really know what's in a lambda without actually running it. It's really now convenient for debugging.
- Some locations have such complicated logic that it would be extremely hard to reuse and maintain properly. For instances, with the bundle randomization, the rules changes based on the content of the bundle. I'd argue that having a rule for every possible item being already defined really simplified the implementation.
- In retrospect, the logic framework we built is most likely once of the reason we could release so many features so fast, since it made it really easy to extend the logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's definitely an interesting approach. I'm more wondering if it's worth generalizing it, the .difficulty is hard to generalize though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would definitely make logic debugging easier. I'm however not entirely satisfied of the simplification and the difficulty approximation, so that would probably need some improvement before generalizing.
@black-sliver about the Anyway, I work something out for that. |
About pytest, I used it because that's what is used in the workflows. So if it does not pick up apworlds and stuff, the workflows should be checked as well, because the apworlds won't run. |
I'll just remove |
All Robin's buildings must be constructed at her shop, after receiving them. But they will be free. This is because they can be placed wherever the player desires, even the shipping bin is not locked to a specific spot |
- Removed disabled Option Descriptions for Entrance Randomizer - Improved Game Page's description of the Arcade Machine buffs - Trimmed down the text on the Options page for Arcade Machines, so that it is smaller
…rchipelago into StardewValleyAP0.3.9-main
So turns out that it is required with 3.9 to import stuff from the data folder with |
The workflow does not have to check packed apworlds, because they are only created when you run
The solution I would propose (for now) is moving all tests that do not require pytest to classes (that inherit from unittest.TestCase), and tests that require pytest should be skipped if pytest is not installed (via
Then it should stay. Sorry I didn't check more closely before writing that.
I think it's worth putting that into the tutorial. Everything else that I tested (I only played for a bit) was more or less clear. |
If AP is really moving out of pytest in favor of unittest, then we will as well (once the workflow is migrated). However, I don't think that's necessarily a good decision. pytest is imo way better for running test than unittest, for its features and its console output. I've read a bit on running test from a zip. My understanding is that pytest can run them, if it is supplied with the full qualified name of the test modules. I've seen discussions about including some metadata in the apworld. It would be most likely possible to run the tests of an apworld if the modules are listed somewhere. Anyway, that's a discussion to have once the world manager is in a nearer future. In the meantime, I'll apply your solution. |
I am a bit confused by some statements here. We use pytest for github runs, but otherwise it has always been optional. Personally, on my computer, I run regular unittests through pycharm. Other runners, including pytest, work if so desired. Making pytest required would be the change, not removing it, as it was never a required dependency to begin with. |
I guess I assumed wrongly that pytest was widely used, since it is used in the CI. My bad on that one. All the test have been migrated. All other comments should be addressed as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to have a note that you need to construct all buildings, including the shipping bin, at robin's to the doc? To me it was not clear, so i would recommend documenting that. Having "can now be constructed" it in the letter is probably good enough assuming everybody reads that?
Also is there a limit on client_version yet? I see there are a lot of releases of the mod already, and I have no idea what happens if you accidentally use an old mod with a new seed.
After deciding on this and the little detail below, I think this is ready to be merged.
…rt1412/Archipelago into StardewValleyAP0.3.9-main
I have added a few lines to guide, explaining in more detail how some items can be redeemed.
I am actually not sure how we could accomplish that. The mod uses a different versioning scheme than AP itself, so I don't think the standard client_version will work. We cannot submit to AP's versioning scheme because if thinks continue at the same pace, we go through many different versions within one AP release. I added a comment to the setup page about which version of the mod to use when generating with this instance of the web host. I am open to suggestions on how to enforce it. As far as I am aware for the mod, things will break very loudly if you use the wrong version, because the slot data will not have information that is considered mandatory. This will not crash the game directly, but between the console being filled with errors and warnings, and the player seeing obvious problems in his world, they probably will not get very far before realizing their mistake |
You can put a custom version thingie in the slot data, set min_client_version to 0.3.9, report 0.3.9 from the mod to ap server, and in addition check if slot data looks compatible to the actual mod, show an error otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for a reply on the client version thing before hitting merge, but looks good now :-)
Thanks! |
* Stardew Valley Archipelago implementation * fix breaking changes * - Added and Updated Documentation for the game * Removed fun * Remove entire idea of step, due to possible inconsistency with the main AP core * Commented out the desired steps, fix renaming after rebase * Fixed wording * tests now passes on 3.8 * run flake8 * remove dependency so apworld work again * remove dependency for real * - Fix Formatting in the Game Page - Removed disabled Option Descriptions for Entrance Randomizer - Improved Game Page's description of the Arcade Machine buffs - Trimmed down the text on the Options page for Arcade Machines, so that it is smaller * - Removed blankspace * remove player field * remove None check in options * document the scripts * fix pytest warning * use importlib.resources.files * fix * add version requirement to importlib_resources * remove __init__.py from data folder * increment data version * let the __init__.py for 3.9 * use sorted() instead of list() * replace frozenset from fish_data with tuples * remove dependency on pytest * - Add a bit of text to the guide to tell them about how to redeem some received items * - Added a comment about which mod version to use * change single quotes for double quotes * Minimum client version both ways * Changed version number to be more specific. The mod will handle deciding --------- Co-authored-by: Alex Gilbert <[email protected]>
* Stardew Valley Archipelago implementation * fix breaking changes * - Added and Updated Documentation for the game * Removed fun * Remove entire idea of step, due to possible inconsistency with the main AP core * Commented out the desired steps, fix renaming after rebase * Fixed wording * tests now passes on 3.8 * run flake8 * remove dependency so apworld work again * remove dependency for real * - Fix Formatting in the Game Page - Removed disabled Option Descriptions for Entrance Randomizer - Improved Game Page's description of the Arcade Machine buffs - Trimmed down the text on the Options page for Arcade Machines, so that it is smaller * - Removed blankspace * remove player field * remove None check in options * document the scripts * fix pytest warning * use importlib.resources.files * fix * add version requirement to importlib_resources * remove __init__.py from data folder * increment data version * let the __init__.py for 3.9 * use sorted() instead of list() * replace frozenset from fish_data with tuples * remove dependency on pytest * - Add a bit of text to the guide to tell them about how to redeem some received items * - Added a comment about which mod version to use * change single quotes for double quotes * Minimum client version both ways * Changed version number to be more specific. The mod will handle deciding --------- Co-authored-by: Alex Gilbert <[email protected]>
What is this fixing or adding?
How was this tested?
.apworld
published https://github.com/agilbert1412/Archipelago/releases