Puddle/Stillwater Terrain tag, help :(

randaku

Rookie
Member
Joined
Jan 2, 2020
Posts
2
Hello I have a very simple question
I have the essentials v17 and the following happens to me:
When I apply the stillwater and puddle terrain tags they are only visible when they are applied in the first layer in the rpg maker, if I put the tile in the second or third layer they are not seen in the game.
help me please :(


Code:
#===============================================================================
# Terrain tags
#===============================================================================
module PBTerrain
  Ledge           = 1
  Grass           = 2
  Sand            = 3
  Rock            = 4
  DeepWater       = 5
  StillWater      = 6
  Water           = 7
  Waterfall       = 8
  WaterfallCrest  = 9
  TallGrass       = 10
  UnderwaterGrass = 11
  Ice             = 12
  Neutral         = 13
  SootGrass       = 14
  Bridge          = 15
  Puddle          = 16

  def PBTerrain.isSurfable?(tag)
    return PBTerrain.isWater?(tag)
  end

  def PBTerrain.isWater?(tag)
    return tag==PBTerrain::Water ||
           tag==PBTerrain::StillWater ||
           tag==PBTerrain::DeepWater ||
           tag==PBTerrain::WaterfallCrest ||
           tag==PBTerrain::Waterfall
  end

  def PBTerrain.isPassableWater?(tag)
    return tag==PBTerrain::Water ||
           tag==PBTerrain::StillWater ||
           tag==PBTerrain::DeepWater ||
           tag==PBTerrain::WaterfallCrest
  end

  def PBTerrain.isJustWater?(tag)
    return tag==PBTerrain::Water ||
           tag==PBTerrain::StillWater ||
           tag==PBTerrain::DeepWater
  end

  def PBTerrain.isDeepWater?(tag)
    return tag==PBTerrain::DeepWater
  end

  def PBTerrain.isWaterfall?(tag)
    return tag==PBTerrain::WaterfallCrest ||
           tag==PBTerrain::Waterfall
  end

  def PBTerrain.isGrass?(tag)
    return tag==PBTerrain::Grass ||
           tag==PBTerrain::TallGrass ||
           tag==PBTerrain::UnderwaterGrass ||
           tag==PBTerrain::SootGrass
  end

  def PBTerrain.isJustGrass?(tag)   # The Poké Radar only works in these tiles
    return tag==PBTerrain::Grass ||
           tag==PBTerrain::SootGrass
  end

  def PBTerrain.isLedge?(tag)
    return tag==PBTerrain::Ledge
  end

  def PBTerrain.isIce?(tag)
    return tag==PBTerrain::Ice
  end

  def PBTerrain.isBridge?(tag)
    return tag==PBTerrain::Bridge
  end

  def PBTerrain.hasReflections?(tag)
    return tag==PBTerrain::StillWater ||
           tag==PBTerrain::Puddle
  end

  def PBTerrain.onlyWalk?(tag)
    return tag==PBTerrain::TallGrass ||
           tag==PBTerrain::Ice
  end

  def PBTerrain.isDoubleWildBattle?(tag)
    return tag==PBTerrain::TallGrass
  end
end
 

Maruno

Pokémon Essentials dev
Essentials Developer
Joined
Apr 5, 2017
Posts
409
Still water gets rendered below all other layers, no matter which layer the water is drawn on. This makes the reflections work properly. The wiki explains as much.

Why would you draw grass tiles beneath water tiles? You're not going to see them, but the game still has to render them anyway. It's wasteful.
 
Top