forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Arbitrary trainer scripts + on frame/trigger softlock prevention #5033
Draft
mrgriffin
wants to merge
9
commits into
rh-hideout:upcoming
Choose a base branch
from
mrgriffin:rhh-script-has-no-effect
base: upcoming
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+947
−446
Commits on Jul 25, 2024
-
Arbitrary trainer scripts + on frame/trigger softlock prevention
Script_HasNoEffect returns TRUE if the script definitely has no player- visible effect, or FALSE if it may/does have a player-visible effect. Opcodes have been manually tagged with whether they abort if they would have a player-visible effect, and the natives and specials have been manually tagged with whether they definitely have no player-visible effect or not. Using these, we're able to execute scripts until they either exit with no effect, or would possibly have an effect. This allows us to: 1. Not run on frame map scripts or triggers if they would have no effect. 2. Support arbitrary control flow in trainer scripts. The trainer does not see the player if the script has no effect, and the trainer will use whichever trainerbattle command is branched to. 3. Support arbitrary scripts in trainer scripts. cant_see and cant_see_if_* commands have been introduced so that scripts are able to do something when the player interacts with the trainer even if that trainer wouldn't see them.
Configuration menu - View commit details
-
Copy full SHA for 1eb51c4 - Browse repository at this point
Copy the full SHA 1eb51c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 525d2a7 - Browse repository at this point
Copy the full SHA 525d2a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4315fae - Browse repository at this point
Copy the full SHA 4315faeView commit details -
Configuration menu - View commit details
-
Copy full SHA for d2f5e3c - Browse repository at this point
Copy the full SHA d2f5e3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f7ba91 - Browse repository at this point
Copy the full SHA 7f7ba91View commit details
Commits on Jul 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 47be8d4 - Browse repository at this point
Copy the full SHA 47be8d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a8d4b6 - Browse repository at this point
Copy the full SHA 1a8d4b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for dbb61e8 - Browse repository at this point
Copy the full SHA dbb61e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 937d4a4 - Browse repository at this point
Copy the full SHA 937d4a4View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.