Skip to content

Conversation

HumanYeeeee
Copy link

@HumanYeeeee HumanYeeeee commented Jul 12, 2025

When the "Allow entering doors without Ashley" option is enabled, it doesn't account for Ashley triggering a trap and getting stuck. In such cases, the player would be unable to enter any doors. By disabling that flag (that is checked in CheckAshleyActive), it overrides that behavior, then the player can enter doors regardless.

Test cases:
I tested this in the game when it's raining after encountering Ashley and bringing her back, in the village where the church is located and many places around it, there are many traps (and doors)

@HumanYeeeee HumanYeeeee deleted the Allow_Ashley branch July 12, 2025 18:44
@HumanYeeeee HumanYeeeee restored the Allow_Ashley branch July 12, 2025 18:45
@HumanYeeeee HumanYeeeee reopened this Jul 12, 2025
if (re4t::cfg->bTrainerAllowEnterDoorsWithoutAsh)
{
GlobalPtr()->flags_STATUS_2_5024[0] &= ~0x20000000;
Copy link
Collaborator

@emoose emoose Jul 12, 2025

Choose a reason for hiding this comment

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

FlagSet(GlobalPtr()->flags_STATUS_0_501C, uint32_t(Flags_STATUS::STA_SUB_CATCHED), false); might unset the same flag, haven't tested that though

Copy link
Author

@HumanYeeeee HumanYeeeee Jul 12, 2025

Choose a reason for hiding this comment

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

Yea it does work. It's also equivalent to:

FlagSet(GlobalPtr()->flags_STATUS_2_5024, uint32_t(Flags_STATUS::STA_PL_CHECK2), false);

To be explicit about which flag would change. I will update the branch

Copy link
Collaborator

@emoose emoose Jul 12, 2025

Choose a reason for hiding this comment

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

STA_SUB_CATCHED should be the right flag afaik:
STA_SUB_CATCHED = 66, // 0x20000000 (@ 0x8)
The @ 0x8 there says FlagSet will add 0x8 to the flag ptr flags_STATUS_0_501C, so it'll be written to flags_STATUS_2_5024 instead (those flags_STATUS_X fields are really just a single array of ints that FlagSet accesses by flagIdx / 32, not actually sure why we left them as separate fields in the struct though)

Copy link
Author

Choose a reason for hiding this comment

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

I was aware of that and debugged FlagSet for both statements, but I wasn't aware of the fact that those flags are meant to be elements of a flag array, even if both statements are equivalent it also dawned on me the name STA_SUB_CATCHED makes more sense, I suppose your FlagSet call makes a lot more sense but I should just add a comment to clarify which flag is modified since it's implicit

Disabling the flag with FlagSet
@HumanYeeeee
Copy link
Author

Hello, just wanted to check in if there is anything potentially missing or worth looking into, not sure this PR is of interest currently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants