I used this to change the nature's stat boost:
if nature==PBNatures::NATURE_NAME
pvalues=[100,100,100,100,100]
pvalues in the array are [Atk,Def,Spd,SpA,SpD]. just change these to increase or decrease the stat.
It's not what you asked, but It might be useful to you.