• 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.

force 3v3 and 2v2 wild encounters as regular for V18

NeroCraft

NeroGameCraft FGO project
3
Posts
4
Years
  • This script will change wild encounter battles by next rules:
    1 pokemon in party - 1v1
    2 pokemons or 1 + partner - 2v2
    3+ pokemons or 2 + partner - 3v3

    only ready to battle pokemons counted (without eggs or fainted)

    Find def pbBattleOnStepTaken(repel=false) block in PField_Field and replace with this code:


    Code:
    def pbBattleOnStepTaken(repel=false)
      return if $Trainer.ablePokemonCount==0
      encounterType = $PokemonEncounters.pbEncounterType
      return if encounterType<0
      return if !$PokemonEncounters.isEncounterPossibleHere?
      $PokemonTemp.encounterType = encounterType
      encounter = $PokemonEncounters.pbGenerateEncounter(encounterType)
      encounter = EncounterModifier.trigger(encounter)
      if $PokemonEncounters.pbCanEncounter?(encounter,repel)
        if !$PokemonTemp.forceSingleBattle && !pbInSafari? && ((($PokemonGlobal.partner ) && ($Trainer.ablePokemonCount>=2)) ||
           ($Trainer.ablePokemonCount>=3))
            encounter2 = $PokemonEncounters.pbEncounteredPokemon(encounterType)
            encounter2 = EncounterModifier.trigger(encounter2)
            encounter3 = $PokemonEncounters.pbEncounteredPokemon(encounterType)
            encounter3 = EncounterModifier.trigger(encounter3)
            pbTripleWildBattle(encounter[0],encounter[1],encounter2[0],encounter2[1],encounter3[0],encounter3[1])
            elsif
            !$PokemonTemp.forceSingleBattle && !pbInSafari? && ((($PokemonGlobal.partner ) && ($Trainer.ablePokemonCount>=1)) ||
            ($Trainer.ablePokemonCount>=2))
            encounter2 = $PokemonEncounters.pbEncounteredPokemon(encounterType)
            encounter2 = EncounterModifier.trigger(encounter2)
            pbDoubleWildBattle(encounter[0],encounter[1],encounter2[0],encounter2[1])
     
          else
          pbWildBattle(encounter[0],encounter[1])
        end
        $PokemonTemp.encounterType = -1
      end
      $PokemonTemp.forceSingleBattle = false
      EncounterModifier.triggerEncounterEnd
    end
     
    Last edited:
    3
    Posts
    4
    Years
    • Seen Oct 10, 2020
    Exception: ArgumentError
    Message: wrong number of arguments(2 for 1)
    PField_Field:1490:in `pbCanEncounter?'
    PField_Field:1490:in `pbBattleOnStepTaken'
    PField_Field:1529:in `pbOnStepTaken'
    Game_Player:484:in `update_old'
    Walk_Run:78:in `update'
    Scene_Map:104:in `update'
    Scene_Map:101:in `loop'
    Scene_Map:114:in `update'
    Scene_Map:68:in `main'
    Scene_Map:65:in `loop'

    help please
     

    YashPokeFan123

    #PokeFan
    283
    Posts
    3
    Years
    • Seen Apr 28, 2023
    This script will change wild encounter battles by next rules:
    1 pokemon in party - 1v1
    2 pokemons or 1 + partner - 2v2
    3+ pokemons or 2 + partner - 3v3

    only ready to battle pokemons counted (without eggs or fainted)

    Find def pbBattleOnStepTaken(repel=false) block in PField_Field and replace with this code:


    Code:
    def pbBattleOnStepTaken(repel=false)
      return if $Trainer.ablePokemonCount==0
      encounterType = $PokemonEncounters.pbEncounterType
      return if encounterType<0
      return if !$PokemonEncounters.isEncounterPossibleHere?
      $PokemonTemp.encounterType = encounterType
      encounter = $PokemonEncounters.pbGenerateEncounter(encounterType)
      encounter = EncounterModifier.trigger(encounter)
      if $PokemonEncounters.pbCanEncounter?(encounter,repel)
        if !$PokemonTemp.forceSingleBattle && !pbInSafari? && ((($PokemonGlobal.partner ) && ($Trainer.ablePokemonCount>=2)) ||
           ($Trainer.ablePokemonCount>=3))
            encounter2 = $PokemonEncounters.pbEncounteredPokemon(encounterType)
            encounter2 = EncounterModifier.trigger(encounter2)
            encounter3 = $PokemonEncounters.pbEncounteredPokemon(encounterType)
            encounter3 = EncounterModifier.trigger(encounter3)
            pbTripleWildBattle(encounter[0],encounter[1],encounter2[0],encounter2[1],encounter3[0],encounter3[1])
            elsif
            !$PokemonTemp.forceSingleBattle && !pbInSafari? && ((($PokemonGlobal.partner ) && ($Trainer.ablePokemonCount>=1)) ||
            ($Trainer.ablePokemonCount>=2))
            encounter2 = $PokemonEncounters.pbEncounteredPokemon(encounterType)
            encounter2 = EncounterModifier.trigger(encounter2)
            pbDoubleWildBattle(encounter[0],encounter[1],encounter2[0],encounter2[1])
     
          else
          pbWildBattle(encounter[0],encounter[1])
        end
        $PokemonTemp.encounterType = -1
      end
      $PokemonTemp.forceSingleBattle = false
      EncounterModifier.triggerEncounterEnd
    end

    Will it also appears like Oh a wild [Pokemon],[Pokemon] and [Pokemon] appeared and also can you do for Pokeminer Modular Battle Scene 5 wild encounters
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    Will it also appears like Oh a wild [Pokemon],[Pokemon] and [Pokemon] appeared and also can you do for Pokeminer Modular Battle Scene 5 wild encounters

    Punctuation please ^^"
    This line "Oh a wild [Pokémon 1], [Pokémon 2] and [Pokémon 3] appeared" is not handled in this function, but rather, in
    Code:
      def pbStartBattleSendOut(sendOuts)
    that Pokeminer also rewrites. So there should be no problem here.

    As for the other question, I think you should ask Pokeminer directly, it's the kind of things he can do. I've looked into his script and I think this should work:
    Spoiler:


    You can change the probabilities of the different battle formats if you want to test (put 100 into the format you want to test).
    With these values, you have a 10% chance of having a 5v5 wild battle; then a 10% chance of having a 4v4 wild battle, then a 10% chance of 3v3, then a 30% chance of having a 2v2, and finally if you get nothing, you'll get a 1v1 wild battle. (The probabilities are not exact but still, you get the idea).

    I haven't tested it though.
     

    YashPokeFan123

    #PokeFan
    283
    Posts
    3
    Years
    • Seen Apr 28, 2023
    Punctuation please ^^"
    This line "Oh a wild [Pokémon 1], [Pokémon 2] and [Pokémon 3] appeared" is not handled in this function, but rather, in
    Code:
      def pbStartBattleSendOut(sendOuts)
    that Pokeminer also rewrites. So there should be no problem here.

    As for the other question, I think you should ask Pokeminer directly, it's the kind of things he can do. I've looked into his script and I think this should work:
    Spoiler:


    You can change the probabilities of the different battle formats if you want to test (put 100 into the format you want to test).
    With these values, you have a 10% chance of having a 5v5 wild battle; then a 10% chance of having a 4v4 wild battle, then a 10% chance of 3v3, then a 30% chance of having a 2v2, and finally if you get nothing, you'll get a 1v1 wild battle. (The probabilities are not exact but still, you get the idea).

    I haven't tested it though.

    Thank You!
    You helped me lot of times.
     

    YashPokeFan123

    #PokeFan
    283
    Posts
    3
    Years
    • Seen Apr 28, 2023
    Spoiler:



    can you do it for partner trainers also
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    can you do it for partner trainers also

    What do you mean? Partner trainers do not work like this. (Besides, you cannot get notified by five trainers at the same time).
    This time I won't try, you should ask Pokeminer instead ^^"
     

    YashPokeFan123

    #PokeFan
    283
    Posts
    3
    Years
    • Seen Apr 28, 2023
    What do you mean? Partner trainers do not work like this. (Besides, you cannot get notified by five trainers at the same time).
    This time I won't try, you should ask Pokeminer instead ^^"

    Ok but Pokemon sprites are coming out of screen
     
    50
    Posts
    4
    Years
    • Seen Oct 17, 2023
    I tried it, it's great.

    I have a curiosity, is it possible to assign that only happens in a specific terrain?
     
    Back
    Top