• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Weather HMs

v19 Weather HMs 2.0

This resource pertains to version 19 of Pokémon Essentials.
Pokémon Essentials Version
v19.1 ➖

WEATHER HMs​



Hi everyone! IKazart here!

Here I present you the Weather HMs script! A script that allows you to use moves like Rain Dance, Sandstorm, etc. in the overworld and change the weather! Turn those moves into HMs!
Now Defog can be used to clear the skies! (Optional)

Moves:
  • Rain Dance
  • Sunny Day
  • Hail
  • Sandstorm
  • Defog




INSTALLATION:
  1. Open the Script Editor on your RPG Maker
  2. Go to [[ Overworld ]] -> Overworld_FieldMoves
  3. Copy the script that follows
  4. Paste it
  5. Go to [[ UI ]] -> UI_ReadyMenu (end)
  6. Delete the pbUseKeyItem method (lines 301 to 327)



USAGE:
You should use just like normal HM moves, open the Pokemon menu, select a Pokemon and use the move!




COMPATIBILITY:
Pokemon Essentials v19.1




SCRIPT:
Ruby:
Expand Collapse Copy
# =============================================================================
# IKazart's Weather HMs
# Version 3.0 - Compatibility: Pokemon Essentials v19.1
# Contact: Send me a message on Discord: IKazart#6758
# =============================================================================
if !PluginManager.installed?("Weather HMs")
    PluginManager.register({                                             
      :name    => "Weather HMs",                                    
      :version => "3.0",                                                 
      :link    => "https://reliccastle.com/resources/846/",         
      :credits => "IKazart"
    })
end
# CONFIG:
# Set this to true if you want Defog to clear weather instead of only
# clearing fogs
CLEAR_WEATHER = true
#===============================================================================
# Rain Dance
#===============================================================================
def pbRainDance
  $game_screen.weather(:Rain, 5, 20)
end
HiddenMoveHandlers::CanUseMove.add(:RAINDANCE,proc { |move,pkmn,showmsg|
  if !GameData::MapMetadata.exists?($game_map.map_id) ||
     !GameData::MapMetadata.get($game_map.map_id).outdoor_map
    pbMessage(_INTL("Can't use that here.")) if showmsg
    next false
  end
  if $game_screen.weather_type == :Rain
    pbMessage(_INTL("It's already raining.")) if showmsg
    next false
  end
  next true
})
HiddenMoveHandlers::UseMove.add(:RAINDANCE,proc { |move,pokemon|
  if !pbHiddenMoveAnimation(pokemon)
    pbMessage(_INTL("{1} used {2}!",pokemon.name,GameData::Move.get(move).name))
  end
  pbRainDance
  next true
})


#===============================================================================
# Sunny Day
#===============================================================================
def pbSunnyDay
  $game_screen.weather(:Sun, 0, 20)
end
HiddenMoveHandlers::CanUseMove.add(:SUNNYDAY,proc { |move,pkmn,showmsg|
  if !GameData::MapMetadata.exists?($game_map.map_id) ||
     !GameData::MapMetadata.get($game_map.map_id).outdoor_map
    pbMessage(_INTL("Can't use that here.")) if showmsg
    next false
  end
  if Time.now.hour>=20 || Time.now.hour<5
    pbMessage(_INTL("Sunny Day can't be used at night.")) if showmsg
    next false
  end
  if $game_screen.weather_type == :Sun
    pbMessage(_INTL("It's already sunny.")) if showmsg
    next false
  end
  next true
})
HiddenMoveHandlers::UseMove.add(:SUNNYDAY,proc { |move,pokemon|
  if !pbHiddenMoveAnimation(pokemon)
    pbMessage(_INTL("{1} used {2}!",pokemon.name,GameData::Move.get(move).name))
  end
  pbSunnyDay
  next true
})


#===============================================================================
# Sandstorm
#===============================================================================
def pbSandstorm
  $game_screen.weather(:Sandstorm, 3, 20)
end
HiddenMoveHandlers::CanUseMove.add(:SANDSTORM,proc { |move,pkmn,showmsg|
  if !GameData::MapMetadata.exists?($game_map.map_id) ||
     !GameData::MapMetadata.get($game_map.map_id).outdoor_map
    pbMessage(_INTL("Can't use that here.")) if showmsg
    next false
  end
  if $game_screen.weather_type == :Sandstorm
    pbMessage(_INTL("You are already in a sandstorm.")) if showmsg
    next false
  end
  next true
})
HiddenMoveHandlers::UseMove.add(:SANDSTORM,proc { |move,pokemon|
  if !pbHiddenMoveAnimation(pokemon)
    pbMessage(_INTL("{1} used {2}!",pokemon.name,GameData::Move.get(move).name))
  end
  pbSandstorm
  next true
})


#===============================================================================
# Hail
#===============================================================================
def pbHail
  $game_screen.weather(:Snow, 8, 20)
end
HiddenMoveHandlers::CanUseMove.add(:HAIL,proc { |move,pkmn,showmsg|
  if !GameData::MapMetadata.exists?($game_map.map_id) ||
     !GameData::MapMetadata.get($game_map.map_id).outdoor_map
    pbMessage(_INTL("Can't use that here.")) if showmsg
    next false
  end
  if $game_screen.weather_type == :Snow
    pbMessage(_INTL("It's already snowing.")) if showmsg
    next false
  end
  next true
})
HiddenMoveHandlers::UseMove.add(:HAIL,proc { |move,pokemon|
  if !pbHiddenMoveAnimation(pokemon)
    pbMessage(_INTL("{1} used {2}!",pokemon.name,GameData::Move.get(move).name))
  end
  pbHail
  next true
})


#===============================================================================
# Defog
#===============================================================================
def pbDefog
  $game_screen.weather(:None, 0, 20)
end
if CLEAR_WEATHER
  HiddenMoveHandlers::CanUseMove.add(:DEFOG,proc { |move,pkmn,showmsg|
    if !GameData::MapMetadata.exists?($game_map.map_id) ||
      !GameData::MapMetadata.get($game_map.map_id).outdoor_map
      pbMessage(_INTL("Can't use that here.")) if showmsg
      next false
    end
    if $game_screen.weather_type == :None
      pbMessage(_INTL("The weather is clear.")) if showmsg
      next false
    end
    next true
  })
  HiddenMoveHandlers::UseMove.add(:DEFOG,proc { |move,pokemon|
    if !pbHiddenMoveAnimation(pokemon)
      pbMessage(_INTL("{1} used {2}!",pokemon.name,GameData::Move.get(move).name))
    end
    pbDefog
    next true
  })
end

# UPDATING USE KEY METHOD (DO NOT CHANGE THIS)
def pbUseKeyItem
  moves = [:CUT, :DEFOG, :DIG, :DIVE, :FLASH, :FLY, :HEADBUTT, :ROCKCLIMB,
           :ROCKSMASH, :SECRETPOWER, :STRENGTH, :SURF, :SWEETSCENT, :TELEPORT,
           :WATERFALL, :WHIRLPOOL,
           :RAINDANCE, :SUNNYDAY, :HAIL, :SANDSTORM]
  real_moves = []
  moves.each do |move|
    $Trainer.pokemon_party.each_with_index do |pkmn, i|
      next if !pkmn.hasMove?(move)
      real_moves.push([move, i]) if pbCanUseHiddenMove?(pkmn, move, false)
    end
  end
  real_items = []
  for i in $PokemonBag.registeredItems
    itm = GameData::Item.get(i).id
    real_items.push(itm) if $PokemonBag.pbHasItem?(itm)
  end
  if real_items.length == 0 && real_moves.length == 0
    pbMessage(_INTL("An item in the Bag can be registered to this key for instant use."))
  else
    $game_temp.in_menu = true
    $game_map.update
    sscene = PokemonReadyMenu_Scene.new
    sscreen = PokemonReadyMenu.new(sscene)
    sscreen.pbStartReadyMenu(real_moves, real_items)
    $game_temp.in_menu = false
  end
end
Credits
IKazart
  • Like
Reactions: Orthanc
Author
IKazart
Views
2,091
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from IKazart

Latest updates

  1. Updated to version 2.0

    Added optional Defog to clear skies
  2. Updated to version 1.1

    Now there's a config section in which you can set whether you want or not the Sunny Day light...
Back
Top