• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Custom Feature Question] Global weather but only on outdoor maps

  • 3
    Posts
    1
    Years
    • Seen Mar 28, 2024
    Hello Internet, first post, first try on a Pokemon X Back to Nature game.

    I want have a day system where going to bed changes the weather for today and sets a new one for tomorrow so I can display it on the tv.

    Currently done :
    Code:
    weather today = weather tomorrow;
    weather tomorrow = new weather;
    
    $game_screen.weather(:weather today,power,duration)

    As soon as I use the script event "$game_screen.weather()" the weather starts to appear inside the players house.

    The PBS file "metadata.txt" shows an Outdoor option but it's only for tinting & fly (DUH!?).

    What can I do to show my global & daily weather only on outdoor maps?
     
    Last edited:
    Hello Zanlan. The internet has heard you!
    So, $game_screen.weather overrides any metadata checks that requires the map to be an outdoor one.
    What do we do then?
    Depending on how you calculate which weather appears, will depend on how it is stored
    Let us assume you know how to store future weather, and there is some sort of variable for today's weather
    The TV should call to that variable rather than directly to "$game_screen.weather"
    To allow only outdoor maps to show the weather, you must call the method upon entry to a new map

    So, it would look something like:
    Code:
    EventHandlers.add(:on_enter_map, :change_weather,
      proc { |_old_map_id|
        next if !$game_map
        next unless $game_map.metadata&.outdoor_map
        # next unless # TODAY'S WEATHER IS SET!
        $game_screen.weather(:weather today,power,duration)
      }
    )

    The only time this won't work is if you set the weather in an outside map, but that would not be the most comfortable nap!

    Hope this helps!
    Swdfm
     
    Back
    Top