Add starting items to ManualWorld to allow interacting with in hooks#210
Add starting items to ManualWorld to allow interacting with in hooks#210fraxker wants to merge 1 commit intoManualForArchipelago:mainfrom
Conversation
silasary
left a comment
There was a problem hiding this comment.
I think you're missing some commits?
No, as of the current stable the from .Game import game_name, filler_item_name, starting_itemsAnd then referenced on lines 207 & 208 if starting_items:
for starting_item_block in starting_items:In the current version, lines 207 & 208 reference the imported (global) version but after adding the This one line change has been battle tested in an unreleased Manual archipelago of Wizard101 I and the other speedrunners have been developing over the last couple months. The hook I shared is a real example that is in use today. |
|
I know how scoping works. But starting_items is a dict, which is a mutable type. You're not actually changing anything by changing the scope of a reference variable. It's still the same globally defined dict, and modifying it when you have multiple slots with different yaml settings will not do what you want it to do. At the bare minimum, you need to be using But I'd much rather have it as either a new hook, or a parameter on |
|
Wdym undocumented field? This seemed like a documented feature of the game.json schema. Apologies if I am being difficult. I assumed this was a straight forward change that honestly seemed like an oversight as it is the only one of the three imports from game.py that is not saved on the world object (but is referenced inside it). From my experience, while the global dict may be a mutable type, any changes to it do not get saved to the reference of the dict that is imported for when The main feature here that we are using this for mapping choice options to if an item is included in |
This PR adds the ability to set starting items from within hooks. Useful when there are items that the player could start with or could be placed into generation depending on settings.