v20.1 Defining new terrain tag and encounter method

This thread pertains to v20.1 of Pokémon Essentials.

Tacalmo

Rookie
Member
Joined
Nov 4, 2022
Posts
4
Age
21
I'm attempting to make a new terrain tag and new encounter method in order to replicate the dark grass from BW/B2W2. However, after following this guide my encounter does not work. The encounters set up on encounters.txt pbs file are formatted correctly, and it no longer crashes the game, however no amount of running through the grass gives an encounter. Any script I edited should be exactly the same as in that tutorial, but I've included a document with all the things I changed. Also, I know the guide is for an earlier version but as far as I can tell, the script format/method for this has not changed, and it was the easiest to follow and most updated guide. Thanks for any help in advance!
 

Attachments

  • NewEncoutnerHelp.txt
    4.9 KB · Views: 16

Vendily

Elite Trainer
Member
You never modified def has_land_encounters?. to include type :dgrass. Additionally, the basic DarkGrass encounter type does not have the same type as the other versions, and the returned encounter type should be using the time based method as you've defined time of day encounter types, but the code will only ever return the basic form.
 

Tacalmo

Rookie
Member
Joined
Nov 4, 2022
Posts
4
Age
21
You never modified def has_land_encounters?. to include type :dgrass. Additionally, the basic DarkGrass encounter type does not have the same type as the other versions, and the returned encounter type should be using the time based method as you've defined time of day encounter types, but the code will only ever return the basic form.
I fixed all those things you said, but now when I try to take a step I get this error:
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `dgrass_wild_encounter' for #<GameData::TerrainTag>

Backtrace:
Overworld_WildEncounters:96:in `encounter_possible_here?'
Overworld:202:in `pbBattleOnStepTaken'
Overworld:196:in `block in <main>'
Event_Handlers:89:in `block in trigger'
Event_Handlers:89:in `each_value'
Event_Handlers:89:in `trigger'
Event_HandlerCollections:63:in `trigger'
Game_Player:148:in `turn_generic'
Game_Character:796:in `turn_up'
Game_Player:460:in `update_command_new'
 
Top