• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Innate Abilities (Yet Another "All Abilities Mutation" mod)

Resource Innate Abilities (Yet Another "All Abilities Mutation" mod) 1.5.2

Tsoukinator

Novice
Member
Joined
Mar 12, 2024
Posts
30
Im glad this

I'm glad this is helping you with your project!

As for the suggestion, I can't promise much but I'll give it a try. It shouldn't be difficult to implement.
For reference, how is this variable value going to work?
I'll assume the value it's going to be global for all pokemon, unless you have something more specific in mind that I coukd try and add
Hey, thanks for getting back to me so soon!

Let's assume in this example, a pokemon can have two innates active at one time - but can choose from a pool of 4.

Let's assume I have a Rattata.
I'd list the Innates as normal:
E.g. INNATES= OWNTEMPO,THICKFAT,SPEEDBOOST,LIMBER

I catch Rattata number 1.
Instead of OWNTEMPO being slot 1, and THICKFAT slot 2 - the pokemon will be randomly assigned one of these (e.g. LIMBER) into slot 1, then, randomly assigned another (e.g. OWNTEMPO) into slot 2.

I then catch Rattata number 2.
This Rattata instead receives SPEEDBOOST in slot 1, and LIMBER in slot 2.

~ This kind of implementation would need each Pokemon to save the ability it is referencing for each of it's innate slots. (probably similar to how standard abilities work, when multiple are present, using an ID to reference the ability by order.

e.g.
Rattata1 [Slot 1: 3, Slot2: 1]
Rattata2 [Slot1: 2, Slot2: 3]

Would essentially be:
Rattata1 [Slot 1:LIMBER, Slot2: OWNTEMPO]
Rattata2 [Slot1: SPEEDBOOST, Slot2: LIMBER]
 
Last edited:

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
112
Sonicover updated Innate Abilities (Yet Another "All Abilities Mutation" mod) with a new update entry:

The Randomized Update

BE SURE TO RECOMPILE AND START A NEW SAVE FILE AFTER THIS UPDATE!

Added a new way to have variety in the innates, the randomized system! Now each pokemon can have it's own set of innates with a maxium fron the "Innates =" section of the pbs. If a pokemon has more innates defined than the maximum amount, it will grab them at random! This is permament per species, unless you used the optional item "Innate Shuffler", which graphic and PBS are also...

Read the rest of this update entry...
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
112
Hey, thanks for getting back to me so soon!

Let's assume in this example, a pokemon can have two innates active at one time - but can choose from a pool of 4.

Let's assume I have a Rattata.
I'd list the Innates as normal:
E.g. INNATES= OWNTEMPO,THICKFAT,SPEEDBOOST,LIMBER

I catch Rattata number 1.
Instead of OWNTEMPO being slot 1, and THICKFAT slot 2 - the pokemon will be randomly assigned one of these (e.g. LIMBER) into slot 1, then, randomly assigned another (e.g. OWNTEMPO) into slot 2.

I then catch Rattata number 2.
This Rattata instead receives SPEEDBOOST in slot 1, and LIMBER in slot 2.

~ This kind of implementation would need each Pokemon to save the ability it is referencing for each of it's innate slots. (probably similar to how standard abilities work, when multiple are present, using an ID to reference the ability by order.

e.g.
Rattata1 [Slot 1: 3, Slot2: 1]
Rattata2 [Slot1: 2, Slot2: 3]

Would essentially be:
Rattata1 [Slot 1:LIMBER, Slot2: OWNTEMPO]
Rattata2 [Slot1: SPEEDBOOST, Slot2: LIMBER]
I hope this update fulfills your expectations. Please report any bugs that you might find!
 

Tsoukinator

Novice
Member
Joined
Mar 12, 2024
Posts
30
I hope this update fulfills your expectations. Please report any bugs that you might find!
Amazing! I'm at work, though I've just read through this update, and need to contain my excitement!
That looks pretty good - and yes, it was indeed a randomiser approach I was after (albeit a controlled one).

Looking forward to playing around with this later tonight!
Thanks again!
 

Tsoukinator

Novice
Member
Joined
Mar 12, 2024
Posts
30
Christmas came early this year - this does exactly what I wanted. Amazing job, such a great turnaround. A+ seller, would buy again.
 

Bguy7

Pokémon Sol Version Creator
Member
Joined
Jul 1, 2024
Posts
19

I like the possibilities of this update. It moves this system closer to what I initially imagined for my game. I don't have time to mess around with it right and find out for myself, but I was wondering what would happen if both regular abilities and innates have the same pool of abilities. Would the system stop them from having the same ability twice? Or would it just possibly end up with two copies of the same ability?

Since this update came from a suggestion anyways, if it's not too much to ask for, I would like to further suggest making a system that checks for repeat abilities when assigning the innate and picks a different ability instead if it is a duplicate (if something like that doesn't already exist). It would essentially allow for Pokémon to have two abilities selected from one pool, which is what I've been trying to use your plugin to emulate in my game.

I'll probably take a look into your code myself at some point when I get the time to see if I can manage the change myself, but I figured I'd suggest it in case it's an option you're interested in making for everyone.
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
112
I like the possibilities of this update. It moves this system closer to what I initially imagined for my game. I don't have time to mess around with it right and find out for myself, but I was wondering what would happen if both regular abilities and innates have the same pool of abilities. Would the system stop them from having the same ability twice? Or would it just possibly end up with two copies of the same ability?

Since this update came from a suggestion anyways, if it's not too much to ask for, I would like to further suggest making a system that checks for repeat abilities when assigning the innate and picks a different ability instead if it is a duplicate (if something like that doesn't already exist). It would essentially allow for Pokémon to have two abilities selected from one pool, which is what I've been trying to use your plugin to emulate in my game.

I'll probably take a look into your code myself at some point when I get the time to see if I can manage the change myself, but I figured I'd suggest it in case it's an option you're interested in making for everyone.
Interesting suggestion. The code doesn't check for repeated abilities itself because it assumes the Innates are different from the regular abilities and that the player only sets abilities in the Innate section one time each.

However I'm a bit confused in your endgoal, do you want to have one big pool of abilities and have that set both the regular ability and the group of innates?
I would prefer not to mess with the code of the regular ability because that would imply also having to re write the way the ability index and hidden abilities work, the ability patch/capsule and all the other stuff, and I personally would like to keep this code to be exclusive for the innates

What I COULD do is add a sanity check for the Innate randomizer and make it that, if an innate that would be assigned matches the ID of the regular ability or an already set innate, it skips it and loads the next I'd, or loads nothing in case only duplicates remain. That way if a pokemon has let's say Speedboost as it's hidden ability and one of its possible innates, if the pokemon happens to have it set as it's regular ability it would never roll it for the Innate. And also you can put the same ID in the innates section multiple times to increase the chance to have that innate selected.

I don't know if that would be something you could be interested in any case. I have no problem adding that option but yeah tldr I would prefer not to mess with the regular ability an it's code
 

Tsoukinator

Novice
Member
Joined
Mar 12, 2024
Posts
30
Hey Sonicover, I think I found a bug - have you checked what happens if you inflict an opponent with a status?

So far, I've tried Paralysis, Poison, Toxic - all end up with a similar error.
Let me know if this doesn't happen to you - there might be something wrong on my end
[2024-08-09 00:43:07 +1000]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: NameError
Message: uninitialized constant Battle::AbilityEffects::OnInflictingStatus

Backtrace:
[Innate Abilities] AAM Ability Effects.rb:24:in `block in triggerOnStatusInflicted'
[Innate Abilities] AAM Ability Effects.rb:22:in `each'
[Innate Abilities] AAM Ability Effects.rb:22:in `triggerOnStatusInflicted'
Battler_Statuses:257:in `pbInflictStatus'
Battler_Statuses:381:in `pbParalyze'
MoveEffects_BattlerOther:156:in `pbEffectAgainstTarget'
Battler_UseMove:710:in `block in pbProcessMoveHit'
Battler_UseMove:708:in `each'
Battler_UseMove:708:in `pbProcessMoveHit'
Battler_UseMove:409:in `block in pbUseMove'

And a second error, when being hit with a super effective move, while holding the ability: Filter

[2024-08-09 00:50:44 +1000]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: NameError
Message: undefined local variable or method `battle' for nil:NilClass

Backtrace:
Tsouk_Abilities:40:in `block in <main>'
Event_Handlers:195:in `trigger'
[Innate Abilities] AAM Ability Effects.rb:367:in `block in triggerDamageCalcFromTarget'
[Innate Abilities] AAM Ability Effects.rb:365:in `each'
[Innate Abilities] AAM Ability Effects.rb:365:in `triggerDamageCalcFromTarget'
Move_UsageCalculations:310:in `pbCalcDamageMultipliers'
[Innate Abilities] AAM Move.rb:8:in `pbCalcDamageMultipliers'
Move_UsageCalculations:273:in `pbCalcDamage'
Battler_UseMove:636:in `block in pbProcessMoveHit'
Battler_UseMove:628:in `each'
 
Last edited:

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
112
Hey Sonicover, I think I found a bug - have you checked what happens if you inflict an opponent with a status?

So far, I've tried Paralysis, Poison, Toxic - all end up with a similar error.
Let me know if this doesn't happen to you - there might be something wrong on my end


And a second error, when being hit with a super effective move, while holding the ability: Filter
Odd, I played around with it on testing and didn't found any errors. It appears one handler is broken for the status effect.
As soon as I get home I'll give it a look
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
112
Out of curiosity, are you using the gen 9 pack? Because Poison Puppeteer's code seems to be the issue for setting status. It should work but maybe it broke in the update.

If you are not using it that might be it. If you are then yeah I'll need to re modify the code.

As for the Filter error it appears it's happening inside of your custom block Tsouk_Abilities. If you send the code I can help you but short version it appears it's trying to load the method Battle where it doesn't exist. Perhaps a wrong method in the ability handler of a custom code?
 
Last edited:

Bguy7

Pokémon Sol Version Creator
Member
Joined
Jul 1, 2024
Posts
19
What I COULD do is add a sanity check for the Innate randomizer and make it that, if an innate that would be assigned matches the ID of the regular ability or an already set innate, it skips it and loads the next I'd, or loads nothing in case only duplicates remain. That way if a pokemon has let's say Speedboost as it's hidden ability and one of its possible innates, if the pokemon happens to have it set as it's regular ability it would never roll it for the Innate. And also you can put the same ID in the innates section multiple times to increase the chance to have that innate selected.

I don't know if that would be something you could be interested in any case. I have no problem adding that option but yeah tldr I would prefer not to mess with the regular ability an it's code

Sorry if I was confusing. What you're suggesting here is exactly what I was thinking.

For example, if a Pokémon has, let's say, Steadfast, Inner Focus, and Justified as its possible abilities and hidden ability, and you also manually list Steadfast, Inner Focus, and Justified as its list of innate abilities as well, then the system would make sure that the innate is not a duplicate of the regular ability. So, if it has Steadfast as a regular ability, it will get either Inner Focus or Justified as an innate, but if it has Justified as a regular ability, then it will get either Steadfast or Inner Focus. It would not literally be drawing from one pool of abilities, but it would essentially be the same in practice. Does that make sense?
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
112
Sorry if I was confusing. What you're suggesting here is exactly what I was thinking.

For example, if a Pokémon has, let's say, Steadfast, Inner Focus, and Justified as its possible abilities and hidden ability, and you also manually list Steadfast, Inner Focus, and Justified as its list of innate abilities as well, then the system would make sure that the innate is not a duplicate of the regular ability. So, if it has Steadfast as a regular ability, it will get either Inner Focus or Justified as an innate, but if it has Justified as a regular ability, then it will get either Steadfast or Inner Focus. It would not literally be drawing from one pool of abilities, but it would essentially be the same in practice. Does that make sense?
Ah yes, the sanity check. Pretty much just don't let it randomize duplicates. Sure, it shouldn't be difficult to implement since I just need to make the randomizer check if the ID of the ability its about to add doesn't match any in the array of abilities.
I'll however will have to slightly modify the ability patch / capsule so it rerolls either the entire innates or just the singular innate that might be a duplicate of the new one. Probably ill require to make a method for other instances of the player changing the pokemon's ability which is a bit annoying but oh well. It's necessary.
Hopefully I can get the update either this night pr tomorrow. I'll just wait to solve the bugs reported by Tsuokinator to kill 2 birds in 1 stone with this update
 

Bguy7

Pokémon Sol Version Creator
Member
Joined
Jul 1, 2024
Posts
19
Ah yes, the sanity check. Pretty much just don't let it randomize duplicates. Sure, it shouldn't be difficult to implement since I just need to make the randomizer check if the ID of the ability its about to add doesn't match any in the array of abilities.
I'll however will have to slightly modify the ability patch / capsule so it rerolls either the entire innates or just the singular innate that might be a duplicate of the new one. Probably ill require to make a method for other instances of the player changing the pokemon's ability which is a bit annoying but oh well. It's necessary.
Hopefully I can get the update either this night pr tomorrow. I'll just wait to solve the bugs reported by Tsuokinator to kill 2 birds in 1 stone with this update

Whatever works for you. I really appreciate it.
 

Tsoukinator

Novice
Member
Joined
Mar 12, 2024
Posts
30
Out of curiosity, are you using the gen 9 pack?
I'm not actually using the Gen 9 pack. I'll have to set aside some time to upgrade my project, and ensure I don't lose any of the scripts I've embedded into the standard code (I've been putting it off for a while) ~ at least this should ensure I organise my own custom scripts outside of the standard Essentials ruby scripts.

In short ~ it sounds more like a compatibility issue than a bug - I'll do what I can to wrangle my head around the upgrade over the next few days.
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
112
I'm not actually using the Gen 9 pack. I'll have to set aside some time to upgrade my project, and ensure I don't lose any of the scripts I've embedded into the standard code (I've been putting it off for a while) ~ at least this should ensure I organise my own custom scripts outside of the standard Essentials ruby scripts.

In short ~ it sounds more like a compatibility issue than a bug - I'll do what I can to wrangle my head around the upgrade over the next few days.
Don't worry, it actually loops back to being my fault. When I added Poison Puppeteer's code I added it backwards, so the definition your error presents does exist... AFTER it's needed lol. The reason it didn't cause any crashes in my game it's because, since I have the gen 9 pack and it loads before this plugin, it takes the gen 9's code for it and solves it from there.

Worry not. I'll fix it next patch.
As for the Filter ability, I played around with it, alongside other abilities that use the same handler and got no issues so I don't think the Innate Plugin itself is causing that error. Any other abilities similar cause problems?
 

Tsoukinator

Novice
Member
Joined
Mar 12, 2024
Posts
30
Worry not. I'll fix it next patch.
Thanks, you're a superstar. I reckon my partner will be jealous with how much I'm raving about the "guy from the internet, who is solving all my problems" lately.

As for the Filter ability, I played around with it, alongside other abilities that use the same handler and got no issues so I don't think the Innate Plugin itself is causing that error. Any other abilities similar cause problems?
I just jumped on to double check - I implemented an ability similar to filter - though discovered it was a bug on my end. Nothing for you to fix on this one.
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
112
Sonicover updated Innate Abilities (Yet Another "All Abilities Mutation" mod) with a new update entry:

Added Uniqueness check for the randomizer and some bug fixes

BE SURE TO RECOMPILE AND START A NEW SAVE FILE AFTER THIS UPDATE!

Now the randomizer will check if one of the possible random abilities to be set as an innate does not match either the Pokemon's current regular ability nor any of the given Innates. That way, you can be sure that no ability gets duplicated!
With that in mind, you can add the same ID multiple times in the Innates section of the PBS to increace its chances of being chose...

Read the rest of this update entry...
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
112
Now I'll take a bit of a rest of adding new features because I said I was going to release the first beta of my project this 19th and I've been too bussy with this script lol.

I'll still take time to fix any bugs and errors of course, but as for new stuff first let me release the Beta that I promised to my friends.

The suggestion box is still open tho! If you have any fancy ideas I'll try to get to them ASAP
 

Bguy7

Pokémon Sol Version Creator
Member
Joined
Jul 1, 2024
Posts
19
I hope this fulfills your request! As always please report any bugs that you might find!

It certainly looks like it does. Thank you much. You have now made exactly the feature I always wanted for my game, but was never sure if I'd be able to make it myself, so thank you.
 
Back
Top