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 OW_UNION_DISABLE_CHECK and OW_FLAG_MOVE_UNION_ROOM_CHECK #5448

Merged
merged 7 commits into from
Oct 7, 2024

Conversation

pkmnsnfrn
Copy link
Collaborator

Description

Player enters Pokemon Center without lag

  • Adds OW_UNION_DISABLE_CHECK. When TRUE, the nurse does not inform the player if there is a trainer waiting in the Union Room. This speeds up the loading of the Pokémon Center.
  • Adds OW_FLAG_MOVE_UNION_ROOM_CHECK. If this flag is set, the game will only check if players are in the Union Room while healing Pokémon, and not when players enter the Pokémon Center. This speeds up the loading of the Pokémon Center. This is ignored if OW_UNION_DISABLE_CHECK is TRUE.

Details

Usage

OW_UNION_DISABLE_CHECK

When this is TRUE:

  • InitUnionRoom will never run.
  • BufferUnionRoomPlayerName will never run.

OW_FLAG_MOVE_UNION_ROOM_CHECK

When this is defined:

  • CableClub_OnResume (meaning InitUnionRoom) will run after the Nurse sets the balls on the healing machine, instead of when the player enters the Pokémon Center.

Testing

Clean Branch

You can recreate this branch by applying a patch or pulling the repo. From a clean version of expansion's upcoming, you can either:

Patch

wget https://files.catbox.moe/o0qs9q.patch -O union.patch ; git apply union.patch ; rm union.patch

Repo

git remote add psf-expansion https://github.com/PokemonSanFran/pokeemerald-expansion/ ; git pull psf-expansion noAdapterUnionCheck2

Manual Tests

After replicating the branch, to recreate my testing environment, you can either directly download the debug script, or manually create the changes.

Download

OW_UNION_DISABLE_CHECK == TRUE && OW_FLAG_MOVE_UNION_ROOM_CHECK == 0

wget https://files.catbox.moe/e2aojo.h -O include/config/overworld.h

OW_UNION_DISABLE_CHECK == FALSE && OW_FLAG_MOVE_UNION_ROOM_CHECK == 0

wget https://files.catbox.moe/qkdd2c.h -O include/config/overworld.h

OW_UNION_DISABLE_CHECK == TRUE && OW_FLAG_MOVE_UNION_ROOM_CHECK != 0

wget https://files.catbox.moe/semp2p.h -O include/config/overworld.h

OW_UNION_DISABLE_CHECK == FALSE && OW_FLAG_MOVE_UNION_ROOM_CHECK != 0

wget https://files.catbox.moe/xf1abp.h -O include/config/overworld.h

Manual Testing

  • Modify include/config/overworld.h to the desired values
  • Compile, start a new save
  • Run Cheat Start
  • Leave the truck
  • Enter the Center

Verified Scenarios

All videos start from a Player that has used Cheat Start and saved outside of the Pokemon Center.

  • Walk into Pokemon Center
  • Heal Pokemon with Nurse Joy
  • Walk outside of Pokemon Center
  • Walk into Pokemon Center

OW_UNION_DISABLE_CHECK == TRUE && OW_FLAG_MOVE_UNION_ROOM_CHECK == 0

TRUE0.mp4

OW_UNION_DISABLE_CHECK == FALSE && OW_FLAG_MOVE_UNION_ROOM_CHECK == 0

FALSE0.mp4

OW_UNION_DISABLE_CHECK == TRUE && OW_FLAG_MOVE_UNION_ROOM_CHECK != 0

TRUEset.mp4

OW_UNION_DISABLE_CHECK == FALSE && OW_FLAG_MOVE_UNION_ROOM_CHECK != 0

FALSEset.mp4

People who collaborated with me in this PR

This was originally written by @Deokishisu. Give them all the credit.

Features this PR does NOT handle:

Discord Contact Info

I am pkmnsnfrn on Discord.

@pkmnsnfrn
Copy link
Collaborator Author

this is the improved version of #5050

@AlexOn1ine AlexOn1ine added the new-feature Adds a feature label Sep 30, 2024
@pkmnsnfrn pkmnsnfrn added the category: overworld Pertains to out-of-battle mechanics label Oct 3, 2024
@pkmnsnfrn pkmnsnfrn marked this pull request as draft October 3, 2024 13:46
@pkmnsnfrn pkmnsnfrn marked this pull request as ready for review October 5, 2024 01:22
@Bassoonian Bassoonian merged commit 0dcb28b into rh-hideout:upcoming Oct 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: overworld Pertains to out-of-battle mechanics new-feature Adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants