So the theory of this would be.
You get the wild pokemon's name with
PBSpecies
Then you would have to have the player type out the name.
This gives you two strings, the real name and the name the player gave you.
This then goes one of two ways.
If you want to make the capture rate vary on how close the player got, then - Really Hard
Then you are going to have to learn how to do string manipulation to figure out the length of the species name and then running it through a loop compare correct letters and their positions to figure out a capture rate.
However if you want to take the much easier route and have the ball have a 0% capture rate and only 100% if the name is correct then. - Easy...er
playerinput == PBSpecies.getName(), then this is easier because it's one check compared to doing string maths.
Let us just start simple and make a new ball type in
PItem_PokeBalls
You want to start with finding
$BallTypes and adding the ball to the list with the others. (You also need to create the ball as an actual Item in PBS item.txt you can copy another pokeball and renumber, name and flavor text it.)
Next comes defining the ball handler...
Actually we don't have to do any maths for the implementation.
After the last ballhandler in
PItem_PokeBalls
Code:
BallHandlers::ModifyCatchRate.add(:#REPLACEWITHBALL#,proc{|ball,catchRate,battle,battler|
next (catchRate=0).floor
})
What we have here is a ball with a 0 catchRate, good luck catching anything with this.
If we wanted to make the ball like a masterball or 100% catch rate you would change
to
Code:
next (catchRate=256).floor
In Essentials 17 the way an instant catch is caculated is if the ball is 'isUnconditional' or x>255 (x is a number calculated on some things.)