• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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
    5
    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:
    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
     
    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
     
    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.
     
    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.
     
    Spoiler:



    can you do it for partner trainers also
     
    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 ^^"
     
    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
     
    Ok but Pokemon sprites are coming out of screen

    This is an issue with Pokeminer's script. The function I defined here doesn't change anything related to Pokeminer's script.
     
    I tried it, it's great.

    I have a curiosity, is it possible to assign that only happens in a specific terrain?
     
    I tried it, it's great.

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

    I think you can try something with pbGetTerrainTag.
     
    Back
    Top