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

Safari Rest Houses

  • 773
    Posts
    14
    Years
    • UK
    • Seen Dec 29, 2024
    I noticed that while in houses in the safari zone it either cancelled the safari if you had safari set to false, or still counted down steps if it was set to true. This adds a new metadata for safarimaprest which keeps the safari running but stops the step count down

    In MiscData under
    Code:
    MetadataMapSize             = 18
    add
    Code:
    MetadataSafariMapRest       = 19

    under
    Code:
    "MapSize"=>[MetadataMapSize,"us"],
    add
    Code:
    "SafariMapRest"=>[MetadataSafariMapRest,"b"],

    In PBattle_Safari under the final end of
    Code:
    def pbInSafari?
    add the following function
    Code:
    def pbInSafariRest?
      if pbSafariState.inProgress?
        if pbGetMetadata($game_map.map_id,MetadataSafariMapRest)
          return true
        end
      end
      return false
    end

    and then replace the function
    Code:
    Events.onStepTakenTransferPossible+=proc {|sender,e|
    with
    Code:
    Events.onStepTakenTransferPossible+=proc {|sender,e|
       handled=e[0]
       next if handled[0]
       if pbInSafari? && pbSafariState.decision==0 && SAFARISTEPS>0
         if !pbInSafariRest?
           pbSafariState.steps-=1
           if pbSafariState.steps<=0
             Kernel.pbMessage(_INTL("PA:  Ding-dong!\1")) 
             Kernel.pbMessage(_INTL("PA:  Your safari game is over!"))
             pbSafariState.decision=1
             pbSafariState.pbGoToStart
             handled[0]=true
           end
         end
       end
    }

    The in the metadata file add the following to the map informaiton

    Code:
    SafariMap=true
    SafariMapRest=true
     
    Back
    Top