Skip to content

Earlier assignment of seed-generation in Game:start_run#218

Closed
larswijn wants to merge 2 commits into
Steamodded:mainfrom
larswijn:earlier-seed-gen
Closed

Earlier assignment of seed-generation in Game:start_run#218
larswijn wants to merge 2 commits into
Steamodded:mainfrom
larswijn:earlier-seed-gen

Conversation

@larswijn
Copy link
Copy Markdown
Contributor

Currently, Game:start_run first applies any stake and deck modifiers, and only assigns the seed afterwards. Any randomness used for any of these modifiers cannot make use of the seed of that run.

By replacing the original seed generation with an empty line, and adding a hard-coded copy earlier in the function, the seed is assigned earlier and can be used by both stakes and decks when applying to the start of the run.

@Aurelius7309
Copy link
Copy Markdown
Member

Note: playing cards are still generated after apply_to_run, and Game:start_run() relies on this ordering. There needs to be a better way for decks to modify the starting deck.

@Aurelius7309
Copy link
Copy Markdown
Member

Deck manipulation already requires using events, and the game's seed is available when the event fires. Thus this is not needed at this time, but a better way to implement deck effects will come later

@larswijn larswijn deleted the earlier-seed-gen branch September 10, 2024 16:01
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