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

Expanded Pokémon Follower transformation functionality #5048

Conversation

AsparagusEduardo
Copy link
Collaborator

@AsparagusEduardo AsparagusEduardo commented Jul 28, 2024

Description

  • Added FORM_CHANGE_OVERWORLD_WEATHER, which fully changes party Pokémon forms based on the overworld weather.
    • Followers now use this form change data instead of hardcoding Castform (and can be disabled via new OW_FOLLOWERS_WEATHER_FORMS config.
  • Previously-exclusive transformations for Ditto/Mew into Wild Pokémon is now based on moves and/or ability (and can be disabled via new OW_FOLLOWERS_COPY_WILD_PKMN config. Either:
    • They have Transform in their moveset.
    • They have Illusion or Imposter in as their ability.
  • Cleaned up some potential UBs when handling form change tables.

Images

mGBA_ox5CJrrFXY mGBA_mrWJG5YcSE mGBA_jcte8wyF1n

Feature(s) this PR does NOT handle:

Couldn't find Sunshine Cherrim overworld sprites, so I didn't add them here.

Discord contact info

AsparagusEduardo

@AlexOn1ine
Copy link
Collaborator

Mentioned by Aero on discord but putting it here so it isn't lost.

Vanilla: Switch -> Stealth Rocks (normal effectiveness) -> Form change (Normal -> Fire type)
Your modification: Switch -> Stealth Rocks (super effective) 

This will produce a non vanilla interaction. Possible solutions are either only transforming the first pokemon or I think a better solution would be to revert all affected mon form changes before the battle begins.

src/field_weather.c Show resolved Hide resolved
Comment on lines +5226 to +5227
&& (MonKnowsMove(mon = GetFirstLiveMon(), MOVE_TRANSFORM)
|| (ability = GetMonAbility(mon)) == ABILITY_IMPOSTER || ability == ABILITY_ILLUSION)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this sort of syntax exists outside of merrp's code, so I don't think we should use it even more

Copy link
Collaborator

@AlexOn1ine AlexOn1ine Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure we have lots of those that look a bit scuffed.

This could look more readable with an early return since there is nothing but returns following this statement so something like:

#define OW_FOLLOWERS_POKEBALLS TRUE // Followers will emerge from the pokeball they are stored in, instead of a normal pokeball
#define OW_FOLLOWERS_BOBBING TRUE // If TRUE, follower Pokémon will bob up and down during their idle & walking animations
#define OW_FOLLOWERS_POKEBALLS TRUE // If TRUE, follower Pokémon will emerge from the Poké Ball they are stored in, instead of a normal Poké Ball
#define OW_FOLLOWERS_WEATHER_FORMS FALSE // If TRUE, follower Pokémon that transform in battle via weather will also transform in the overworld.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forms still change in the party, even with this config disabled
image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may need a config to differentiate between them only changing appearance in the overworld (which is purely cosmetic, like OW_FOLLOWERS_COPY_WILD_PKMN) and one that actually changes the form (since this causes non-vanilla interactions when it enters a battle with starting entry hazards)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't even have to be starting hazards. Actually the first mon won't be affected by it but the transformed mons in the bag will which would be solved by:

This should only affect the Pokémon in the first slot of the party (the one currently following, rather). It's the fact they're out of the ball that makes them change forms. As a result, I think all other species should probably revert back to "normal" conditions if they're not currently outside of the ball.

@AsparagusEduardo
Copy link
Collaborator Author

Forgot to push changes on this, sorry.

@AsparagusEduardo
Copy link
Collaborator Author

AsparagusEduardo commented Aug 7, 2024

This should only affect the Pokémon in the first slot of the party (the one currently following, rather). It's the fact they're out of the ball that makes them change forms. As a result, I think all other species should probably revert back to "normal" conditions if they're not currently outside of the ball.

Makes sense to me. Will update.

I believe forms also don't currently revert when they're deposited in the PC, which is also non-vanilla behaviour (and could deserve a config, again, but it is non-vanilla)

I can add the "Deposit" form change as well to fix this.

@hedara90 hedara90 added category: pokemon Pertains to Pokémon data and functionality category: overworld Pertains to out-of-battle mechanics new-feature Adds a feature and removed category: pokemon Pertains to Pokémon data and functionality labels Aug 17, 2024
@pkmnsnfrn pkmnsnfrn marked this pull request as draft August 28, 2024 02:54
@AlexOn1ine
Copy link
Collaborator

Could you finish this please so we can finally merge it? Blocking for me would be mons not reverting back before a battle begins because this actually affects gameplay

@AsparagusEduardo
Copy link
Collaborator Author

Could you finish this please so we can finally merge it? Blocking for me would be mons not reverting back before a battle begins because this actually affects gameplay

(my last post somehow wasn't here 🤔)
I checked this a bit ago and it seemed that everything in the party was reverting back to normal before the battle.

@AsparagusEduardo AsparagusEduardo marked this pull request as ready for review December 16, 2024 18:31
@AlexOn1ine
Copy link
Collaborator

Could you finish this please so we can finally merge it? Blocking for me would be mons not reverting back before a battle begins because this actually affects gameplay

(my last post somehow wasn't here 🤔) I checked this a bit ago and it seemed that everything in the party was reverting back to normal before the battle.

I'll do some in-game testing

@AlexOn1ine
Copy link
Collaborator

AlexOn1ine commented Jan 5, 2025

what was left for this again?

/Edit: ah, reversion in the storage

@AsparagusEduardo
Copy link
Collaborator Author

what was left for this again?

/Edit: ah, reversion in the storage

Done :D
Ready for re-review :)

@AlexOn1ine AlexOn1ine merged commit cd1482b into rh-hideout:upcoming Jan 18, 2025
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.

4 participants