pkNX icon indicating copy to clipboard operation
pkNX copied to clipboard

Inherit ability from preevolutions not working correctly?

Open prbilly opened this issue 5 years ago • 5 comments

I have tried messing around with the settings but I cannot seem to make it so that the inherit abilities in the evolution section of the enhancement tab works. No matter what I do, they always end up with different abilities. Untitled bulb ivy

prbilly avatar Oct 11 '20 21:10 prbilly

image Gee, wonder why ;)

kwsch avatar Oct 11 '20 22:10 kwsch

Hello, sorry I just need some clarification here. So I have InheritAbilityNeitherChance set to zero which means there is 0% chance that it won't inherit either preevolution ability and InheritAbilityOnlyOneChance set to zero so there is 0% chance that it will inherit only one ability from the preevolution. Shouldn't this mean that there is still the option open to inherit both abilities? That is what I am trying to accomplish.

On Sun, Oct 11, 2020 at 6:00 PM Kurt [email protected] wrote:

Closed #98 https://github.com/kwsch/pkNX/issues/98.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kwsch/pkNX/issues/98#event-3864127791, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKXYVPHNHH3L5IYPUNAWX3SKITJHANCNFSM4SMA2TEA .

prbilly avatar Oct 11 '20 23:10 prbilly

Logic in question: https://github.com/kwsch/pkNX/blob/4cf69da7e5941fbb2b033cf28cb5411541ed3a1a/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs#L230-L250

Logic seems kinda backwards, but just put "Inherit 1 chance" to 100% and you should get inherited abilities.

kwsch avatar Oct 12 '20 00:10 kwsch

Thank you for responding. I have tried what you said and it for some reason still doesn't inherit abilities. I have also tried changing the InheritAbilitySetting between shared, one, two, and all but this doesn't produce the result either. I reset the Sword and Shield files back to default before each attempt so it's not something that got messed up while randomizing the same file over and over and I also tried reinstalling the newest version of pkNX but the issue still persists. Sorry if I am being a pain or I am doing something wrong. Let me know. Thank you.

On Sun, Oct 11, 2020 at 8:30 PM Kurt [email protected] wrote:

prbilly avatar Oct 12 '20 01:10 prbilly

Logic in question:

https://github.com/kwsch/pkNX/blob/4cf69da7e5941fbb2b033cf28cb5411541ed3a1a/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs#L230-L250

Logic seems kinda backwards, but just put "Inherit 1 chance" to 100% and you should get inherited abilities.

This part of the code is never called because of the AlreadyProcessed condition setting itself to true before getting checked a second time.

https://github.com/kwsch/pkNX/blob/fe9e21749fa548f5efbf150867b6373bdd30ca99/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs#L62-L111

It is called a first time in RandomizeChain, then once again in ProcessEvolutions with the same index value. ~~It is unclear to me if those calls were supposed to be checking the same table or not~~, but they are currently making the inheriting part not working.

Edit: I have dug a bit deeper, the index used for the AlreadyProcessed call in ProcessEvolutions seems to be the wrong one simply enough. I've made a pull request for a fix.

Salier13 avatar Jul 27 '22 11:07 Salier13