MythicMerc
Dragon Master & PokéDad
- 6
- Posts
- 1
- Years
- Seen Jul 28, 2023
I am attempting to add a "desert" encounter method in my game for specific sandy tiles within my desert map (using Essentials v20.1.). I followed all the instructions on the Wiki page for "Adding new encounter methods," but it's still not working for some reason.
Here is what I'm working with...
Within EncounterType, I added the following:
This encounter type should work based on the "taking a step" method, i.e. encounters are only possible when stepping on the specific sandy tiles, so I have the following in Overworld_WildEncounters:
As for the specific tiles that should trigger the encounter, I have labeled them as Terrain Tag #18 within the tileset, and I have added the following to the TerrainTag script section:
Within encounters.txt, I have the listed possible encounters like so:
Am I missing something? I thought I had done all the necessary steps, but when I walk on the tiles, battles never trigger. They show up fine, I can walk on them fine....just no wild battles triggering.
Thanks in advance for any help!!
Here is what I'm working with...
Within EncounterType, I added the following:
Code:
GameData::EncounterType.register({
:id => :Desert,
:type => :none,
:trigger_chance => 21
})
This encounter type should work based on the "taking a step" method, i.e. encounters are only possible when stepping on the specific sandy tiles, so I have the following in Overworld_WildEncounters:
Code:
def encounter_type
time = pbGetTimeNow
ret = nil
if $PokemonGlobal.surfing
ret = find_valid_encounter_type_for_time(:Water, time)
else # Land/Cave (can have both in the same map)
if has_land_encounters? && $game_map.terrain_tag($game_player.x, $game_player.y).land_wild_encounters
ret = :BugContest if pbInBugContest? && has_encounter_type?(:BugContest)
ret = find_valid_encounter_type_for_time(:Land, time) if !ret
end
if !ret && has_cave_encounters?
ret = find_valid_encounter_type_for_time(:Cave, time)
end
if !ret && has_desert_encounters?
ret = find_valid_encounter_type_for_time(:Desert, time)
end
if !ret && has_swamp_encounters?
ret = find_valid_encounter_type_for_time(:Swamp, time)
end
end
return ret
end
As for the specific tiles that should trigger the encounter, I have labeled them as Terrain Tag #18 within the tileset, and I have added the following to the TerrainTag script section:
Code:
GameData::TerrainTag.register({
:id => :Desert,
:id_number => 18,
:battle_environment => :Desert,
:shows_reflections => false
})
Within encounters.txt, I have the listed possible encounters like so:
Code:
Desert,21
20,SANDILE,30,36
20,HIPPOPOTAS,30,36
10,TRAPINCH,30,36
10,CACNEA,30,36
10,PHANPY,30,36
10,VULLABY,30,36
5,BALTOY,30,36
5,SILICOBRA,30,36
4,KROKOROK,30,36
4,VIBRAVA,30,36
1,GIBLE,30,36
1,SANDACONDA,30,36
Am I missing something? I thought I had done all the necessary steps, but when I walk on the tiles, battles never trigger. They show up fine, I can walk on them fine....just no wild battles triggering.
Thanks in advance for any help!!