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

[Scripting Question] Add Terrain Tag - Pokemon don't show up

55
Posts
10
Years
  • Seen Oct 8, 2019
Hey there,

I was adding a new terrain tag for snow (named "powder"), so I followed the instructions from the wikia " Adding new encounter method"

Everything works finde, execpt that a green background (from Land/Grass tags) shows up in a battle, what doesn't look very realistic in a snow area.

Here is what I changed in the script section (highlighted):
PBTerrain
Spoiler:

PBField_Encounter

Spoiler:

Compiler (around Line 2559)
Spoiler:

Editor (around line 2227)
Spoiler:


What else did I do?
- In the editor I changed the tile with the "snow-grass" to 17

- In Graphics/Battlebacks I added a new background "battlebgPowder"
- In encounters.txt I changed the terrain to "Powder" like this:
Code:
359 # Powder Highway
25,10,10
Powder
CLAMPERL,45,65
LUVDISC,45,65
SHELLDER,45,65
SEAKING,45,65
CLOYSTER,45,65
SEAKING,45,65
STARMIE,45,65
STARMIE,45,65
STARYU,45,65
STARYU,45,65
STARYU,45,65
STARYU,45,65
Can anybody tell me what I did wrong? Did I miss anything?... I'm using the latest Essential version v.16.2.

Thanks very much in advance!

Cheers Hargatio

EDIT:
If I open the Editor-->Set Encounter-->New Encounter Type
The encounter-typ "powder" don't show up
 
Last edited:
1,677
Posts
8
Years
  • Age 23
  • Seen today
I'm working on Relic Castle's game jam, so this is gonna be quick, 'kay.
To make your powder backdrop appear, we can either edit the metadata for the map to set the BattleBack property to Powder or edit PBEnvironment and add the line in red
Code:
    Space       = 14
[COLOR="Red"]    Powder       = 15[/COLOR]
Next we need to make this environment selectable, so we must go to def pbGetEnvironment in PField_Field, and add the red.
Code:
else
    case $game_player.terrain_tag
    when PBTerrain::Grass;      return PBEnvironment::Grass       # Normal grass
    when PBTerrain::Sand;       return PBEnvironment::Sand
    when PBTerrain::Rock;       return PBEnvironment::Rock
    when PBTerrain::DeepWater;  return PBEnvironment::MovingWater
    when PBTerrain::StillWater; return PBEnvironment::StillWater
    when PBTerrain::Water;      return PBEnvironment::MovingWater
    when PBTerrain::TallGrass;  return PBEnvironment::TallGrass   # Tall grass
    when PBTerrain::SootGrass;  return PBEnvironment::Grass       # Sooty tall grass
    when PBTerrain::Puddle;     return PBEnvironment::StillWater
[COLOR="red"]    when PBTerrain::Powder;     return PBEnvironment::Powder[/COLOR]
    end
  end
Now we need to go to def pbBackdrop in PokeBattle_Scene and add the red
Code:
    elsif environ==PBEnvironment::Underwater
      backdrop="Underwater"
    elsif environ==PBEnvironment::Rock
      backdrop="Mountain"
[COLOR="red"]    elsif environ==PBEnvironment::Powder
      backdrop="Powder"[/COLOR]

Finally, the reason the Powder encounter type doesn't show in Editor.exe is because the Editor uses it's own scripts. You can edit them by renaming Scripts.rxdata to something else, renaming EditorScripts.rxdata to Scripts.rxdata, and then opening the project in RMXP. (Make backups always.)
 
Last edited:
Back
Top