Commit Graph

26 Commits

Author SHA1 Message Date
FosterProgramming
e95b4de84e
Add trainers submenu for debug menu (#8399) 2025-12-27 16:57:13 +01:00
Martin Griffin
7e2215e05a
waitmovementall (#8333) 2025-12-11 14:52:58 +01:00
hedara90
174bc2f29f
Fixed typo in requests_effects (#6215)
Co-authored-by: Hedara <hedara90@gmail.com>
2025-02-09 16:59:31 -05:00
Martin Griffin
ed0c9a4671
Restore lock/lockall/locktrainer/release/releaseall in triggers (#5976) 2025-01-15 10:22:26 -03:00
Martin Griffin
bb781f21a1
Arbitrary trainer scripts + map script/trigger softlock prevention (#5033)
Script_RunImmediatelyUntilEffect runs a script until either a specified
effect may occur or it reaches an end.

All existing script commands and natives, and some specials, call
Script_RequestEffects which allows us to analyze them.

Any downstream script commands/natives/specials will be statically known
not to call Script_RequestEffects and treated as if they have all
effects. Manually tagging them with requests_effects=1 and calling
Script_RequestEffects will make them analyzable.

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. Immediately run triggers if they only affect flags/vars. This removes
   the lag frames when biking into the Cycling Road, for example.
3. Migrate on load/on transition/on resume/on return to field/on dive
   warp scripts onto the global script context if they would block
   (approximated via SCREFF_HARDWARE).
4. 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.
5. 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.
2025-01-08 10:27:00 +00:00
pkmnsnfrn
30cc06785d Fixed global variable naming conventions 2024-08-12 06:55:33 -07:00
pkmnsnfrn
4387b6ef70 Removed SetWalkingIntoSignVars per https://github.com/rh-hideout/pokeemerald-expansion/pull/5044\#discussion_r1712963824 2024-08-11 18:10:18 -07:00
pkmnsnfrn
c3c433439e Removed ClearMsgBoxCancelableState per https://github.com/rh-hideout/pokeemerald-expansion/pull/5044\#discussion_r1712963672 2024-08-11 18:01:52 -07:00
pkmnsnfrn
846e8a29da Removed IsMsgSignPost per https://github.com/rh-hideout/pokeemerald-expansion/pull/5044\#discussion_r1712963672 2024-08-11 17:49:07 -07:00
pkmnsnfrn
b5c58e53de Removed all comments 2024-07-25 19:35:28 -07:00
pkmnsnfrn
28183ec299 first merge of ghoul's branch 2024-07-15 21:35:58 -07:00
ghoulslash
5657f8369e merge w pret 2023-05-11 10:44:18 -04:00
sbird
569fa0a60a [script-command] add dynmultichoice
* supports variable length arguments
 * automatically scrolls
 * supports building list menus from a stack
2023-01-17 21:49:06 +01:00
tustin2121
ec73158f16 Moving documentation comments per request
from the discord chat.
2022-08-15 16:37:38 -04:00
tustin2121
1cb659df8c Renaming Script Contexts
- Determined how the various script contexts were used and renamed accordingly.
- ScriptContext2_Enable/Disable => Lock/UnlockPlayerFieldControls - The sole purpose of the flag is to make sure the player can't move around in the overworld. It has nothing to do with script contexts.
- ScriptContext1 => ScriptContext - It is the global script context used to set up scripts which run over many frames.
- ScriptContext2_RunNewScript => RunScriptImmediately - ScriptContext2's sole purpose was to run scripts immediately and in a separate context, usually while the global context is waiting for things like map loads or screen changes.
2022-08-15 15:18:12 -04:00
ghoulslash
dfce7f1548 add auto read signposts 2021-04-01 09:45:17 -06:00
GriffinR
e52b46ab43 Clean up script.c 2021-02-24 11:03:17 -05:00
GriffinR
ec3e86f1d2 Standardize Event Object to Object Event 2019-11-20 22:55:44 -05:00
GriffinR
dd01942c4f Document aqua/magma hideout scripts 2019-11-01 17:22:45 -05:00
PikalaxALT
d220f876fc Some symbol documentation 2019-04-03 17:04:42 -05:00
Phlosioneer
49bef25856 Clean up the last extern functions 2019-03-02 03:18:08 -05:00
Phlosioneer
5f7a971313 Source file part of map script renaming 2019-02-25 08:01:22 -06:00
Diegoisawesome
e75f0b4f80 Port/decompile field_control_avatar 2018-10-16 21:47:08 -05:00
Diegoisawesome
f300f853c8 Add const qualifiers to scrcmd 2017-10-12 14:39:18 -05:00
DizzyEggg
a2a66181fb decompile script.s 2017-09-10 23:05:23 +02:00
DizzyEggg
4a1b2967ca make lots of define files 2017-09-07 19:45:32 +02:00