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

Setting a custom encounter type

91
Posts
14
Years
    • Seen Sep 5, 2015
    I want to create a new encounter if the player is in a different type of tile, and found this:

    http://pokemonessentials.wikia.com/wiki/Forum:Encounters_for_different_types_of_grass?

    and

    http://pokemonessentials.wikia.com/wiki/Adding_new_encounter_methods

    Which wants me to add this

    enctype=EncounterTypes::[custom encounter name] if self.hasEncounter?(EncounterTypes::LandSymbol) && $game_map.map_id==42 &&
    $game_player.x>5 && $game_player.x<12 &&
    $game_player.y>15 && $game_player.y<21

    in pbEncounterType (in PokemonEncounters) but I dont know exactly where. Can someone help with this?

    (Those $game map id blabla and player.x and y are just the coords and map id to apply the encounter type to a specific point in a map that I have to manually set)

    How the encounter should work:
    - In an outdoor map (that also uses Land/LandNight etc) there should be a specific part with different encounters that ignore any other encounter types. Won't be using it in Caves so compatibility isn't needed.

    Additional info: My custom "grass" tile, the one that I want to be different to common grass (much like dark grass in Unova) doesn't make the Player half transparent and does not show the grass graphic when I walk, even though in the tileset editor it is set with the "bush" tag. Should it also be set terrain tag 2? Then it's just common grass and wouldn't work with the encounter type Im trying to set up, would it? :/


    Halp
     
    Last edited:
    91
    Posts
    14
    Years
    • Seen Sep 5, 2015
    There's a better tutorial here
    And you just have to set the bush tag, that doesn't affect its terrain tag.

    Your tutorial is very helpful... But I couldn't make it work. I'm using GS Essentials but I don't see how can that be a problem... My new Encounter doesn't work, and when I added a Land one, every 3 steps (even outside of grass) I get this:
    EDIT: This only happens in maps with encounters, it doesnt in maps without set encounters.

    Code:
    ---------------------------
    Pokemon Essentials GS
    ---------------------------
    Exception: NoMethodError
    
    Message: undefined method `isEgg?' for #<PokeBattle_Pokemon:0x9f78368>
    
    PokemonEncounters:260:in `pbGenerateEncounter'
    
    PokemonField:1471:in `pbBattleOnStepTaken'
    
    PokemonField:1503:in `pbOnStepTaken'
    
    Game_Player_:449:in `update_old'
    
    Walk_Run:75: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'

    Im going to try and simply replace LandMorning with the functionality Im trying to achieve instead of creating a new type... Wish me luck... If there's anything you can help with, please hop in. Is there any leftover proyect already working that I can take a look at? Know any fangame that features this?
     
    Last edited:
    91
    Posts
    14
    Years
    • Seen Sep 5, 2015
    If you're using v14, the method isEgg? doesn't exists: it's called egg?

    Weirdest thing ever... Replacing isEgg? with Egg? still resulted in errors... I just backed up Field and Encounters and its fine now, but all my "progress" (none) wiped with it.
     
    296
    Posts
    9
    Years
  • If you using a version older than 15, the method "isEgg?" doesn't exists. The correct one is "egg", without capitals.
     
    91
    Posts
    14
    Years
    • Seen Sep 5, 2015
    Still can't get it working... Fixed the crash, but my custom encounter still doesn't work.
     
    277
    Posts
    15
    Years
  • Adding a new encounter type problem

    I am trying to create an encounter method to simulate finding pokemon in flowers from the 6th gen games. After following the instructions on the wikia my game was riddled with compile errors, so starting over with a guide generously provided by Radical Raptr here: http://www.pokecommunity.com/showthread.php?t=349967

    Unfortunately, Every location I place the flowers now act like a cave and the selected pokemon to appear in them will pop up on every walk-able tile.

    can anyone help me with this issue? I will provide more information if needed.
     
    Back
    Top