• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Pokemon obedience for non-traded Pokemon

87
Posts
8
Years
    • Seen Jul 24, 2016
    So I have some questions. 1ºst how do I setup the level cap? because in pokemon essentials the only level cap I could find was for traded pokemons and they would disrespect you if, for example, you didn´t have the first badge but their level was higher than 20.
    2ºnd For it to work, do I have to make this: "disobedient=true"? in PokeBattle_Battler?
     
    Last edited by a moderator:
    129
    Posts
    8
    Years
    • Seen Mar 23, 2023
    Look through the Options script section (at the very top of the section list). There are options for MAXIMUMLEVEL for all pokemon. The level of disrespect is outlined in pbObedienceCheck? in PokeBattle_Battler.

    What is it you are trying to do? Because Essentials comes with all the disobedience stuff already there for you. You shouldn't have to modify anything unless you're doing something special.
     
    87
    Posts
    8
    Years
    • Seen Jul 24, 2016
    Look through the Options script section (at the very top of the section list). There are options for MAXIMUMLEVEL for all pokemon. The level of disrespect is outlined in pbObedienceCheck? in PokeBattle_Battler.

    What is it you are trying to do? Because Essentials comes with all the disobedience stuff already there for you. You shouldn't have to modify anything unless you're doing something special.

    Im trying to change the level caps....before each gym...For example and pokemon cant pass level 25 before first gym or he would disrespect you.
     
    1,224
    Posts
    10
    Years
  • Im trying to change the level caps....before each gym...For example and pokemon cant pass level 25 before first gym or he would disrespect you.

    Look in PokeBattle_Battler

    Code:
    ################################################################################
    # Using a move
    ################################################################################
      def pbObedienceCheck?(choice)
        return true if choice[0]!=1
        if @battle.pbOwnedByPlayer?(@index) && @battle.internalbattle
          [COLOR="Red"]badgelevel=10
          badgelevel=20  if @battle.pbPlayer.numbadges>=1
          badgelevel=30  if @battle.pbPlayer.numbadges>=2
          badgelevel=40  if @battle.pbPlayer.numbadges>=3
          badgelevel=50  if @battle.pbPlayer.numbadges>=4
          badgelevel=60  if @battle.pbPlayer.numbadges>=5
          badgelevel=70  if @battle.pbPlayer.numbadges>=6
          badgelevel=80  if @battle.pbPlayer.numbadges>=7
          badgelevel=100 if @battle.pbPlayer.numbadges>=8[/COLOR]
     
    87
    Posts
    8
    Years
    • Seen Jul 24, 2016
    Look in PokeBattle_Battler

    Code:
    ################################################################################
    # Using a move
    ################################################################################
      def pbObedienceCheck?(choice)
        return true if choice[0]!=1
        if @battle.pbOwnedByPlayer?(@index) && @battle.internalbattle
          [COLOR="Red"]badgelevel=10
          badgelevel=20  if @battle.pbPlayer.numbadges>=1
          badgelevel=30  if @battle.pbPlayer.numbadges>=2
          badgelevel=40  if @battle.pbPlayer.numbadges>=3
          badgelevel=50  if @battle.pbPlayer.numbadges>=4
          badgelevel=60  if @battle.pbPlayer.numbadges>=5
          badgelevel=70  if @battle.pbPlayer.numbadges>=6
          badgelevel=80  if @battle.pbPlayer.numbadges>=7
          badgelevel=100 if @battle.pbPlayer.numbadges>=8[/COLOR]

    Oh I thought that was for traded pokemons...Btw do I have to enable "disobedient=true"? that is right below that code u posted?
     
    129
    Posts
    8
    Years
    • Seen Mar 23, 2023
    That is for traded pokemon. Pokemon with you as their original trainer never disobey (because that's never how Pokemon worked). If you're trying to make pokemon you caught disobey you, that's a new thing.

    Why are you trying to level cap gyms anyway? It kind of goes against how RPGs work in general. If the players want to overlevel and sweep the next gym, there shouldn't be anything stopping them from doing that (artificially, at least).
     
    87
    Posts
    8
    Years
    • Seen Jul 24, 2016
    That is for traded pokemon. Pokemon with you as their original trainer never disobey (because that's never how Pokemon worked). If you're trying to make pokemon you caught disobey you, that's a new thing.

    Why are you trying to level cap gyms anyway? It kind of goes against how RPGs work in general. If the players want to overlevel and sweep the next gym, there shouldn't be anything stopping them from doing that (artificially, at least).

    My bad...Again....Since I saw this system in Pokemon Reborn I thought there was an option for that.
     
    1,224
    Posts
    10
    Years
  • My bad...Again....Since I saw this system in Pokemon Reborn I thought there was an option for that.

    The code that causes that is two lines down from what I posted
    Code:
    if [COLOR="Red"]@pokemon.isForeign?(@battle.pbPlayer) && [/COLOR]@level>badgelevel
            a=((@level+badgelevel)*@battle.pbRandom(256)/255).floor
            disobedient|=a<badgelevel
          end
     
    Back
    Top