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

Add Code Entry functionality #5951

Draft
wants to merge 3 commits into
base: upcoming
Choose a base branch
from
Draft

Conversation

Pawkkie
Copy link
Collaborator

@Pawkkie Pawkkie commented Jan 4, 2025

Description

Adds code entry functionality. This is the functional skeleton to support event scripting where the player enters a string that gets checked against a specified list, and actions are taken depending on what the string matches.

This implementation does not include any event script changes, but it does include a thorough guide on how to use the two new specials EnterCode and GetCodeFeedback in event scripting. All functionality for the codes themselves is also left to the user, and a tutorial for how to add your own is included in the aforementioned guide.

In very abbreviated, you can use the following in an event script:

special EnterCode
waitstate
special GetCodeFeedback

To prompt the player with a text box for entry and compare that entry against results. GetCodeFeedback is flexible such that you can perform operations using C code for particular code entry in that function, or use the results it returns to lead to specific event scripting, for things that may be better handled in scripts (ie. givemon). The tutorial document covers examples of both of these cases.

People who collaborated with me in this PR

@PCG06 for the Mystery Gift iteration

Discord contact info

@Pawkkie

@Pawkkie Pawkkie marked this pull request as draft January 4, 2025 01:54
@Pawkkie Pawkkie added the new-feature Adds a feature label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant