FANDOM


Improving Pokégear Radio
This tutorial was written by -FL-. Please give credit.

This tutorial is related to the following pages:

Click here for more tutorials!


The Pokégear Radio is divided in normal musics and custom musics. The normal musics are 3 musics that replaces the current map musics and goes out when you change maps. The custom music are ALL musics in the BGM folder ordered by format and alphabetical, when you play it replace ALL musics util you press the Default option. The Pokégear Radio "Radio - March" activate White Flute effect, the "Radio - March" activate Black Flute effect. All other songs deactivate these effects. All the codes are in the script PokemonJukebox.

More musics in non-custom menu

To add a music in non-custom menu put the highlighted code like this example:

   @choices=[
    _INTL("March"),
    _INTL("Lullaby"),
    _INTL("Oak"),
    _INTL("Custom"),
    _INTL("Mart"),
    _INTL("Exit")
   ]

The above script is the name of menu item (Mart in this example). The bellow is the music name (PokeMart in this example).

       $PokemonMap.whiteFluteUsed=false if $PokemonMap
     when 3
       pbPlayDecisionSE()
       pbBGMPlay("PokeMart", 100, 100)
       $PokemonMap.whiteFluteUsed=false if $PokemonMap
       $PokemonMap.blackFluteUsed=false if $PokemonMap
     when 4
       files=[_INTL("(Default)")]

The "3" is the custom "when" number. Don't forge to add one to the custom option and the exit (4 and 5 in this example).

Delete the flute effect

To dele the changing of flutes that radio does, simply remove all lines that have the word "Flute" in this script.

Remove custom musics option

To remove the Custom Musics Option, delete the following yellow highlighted code and add the blue ones:

   @choices=[
    _INTL("March"),
    _INTL("Lullaby"),
    _INTL("Oak"),
    _INTL("Custom"),
    _INTL("Exit")
   ]

And

       $PokemonMap.blackFluteUsed=false if $PokemonMap
     when 3
       files=[_INTL("(Default)")]
       Dir.chdir("Audio/BGM/"){
        Dir.glob("*.mp3"){|f| files.push(f) }
        Dir.glob("*.MP3"){|f| files.push(f) }
        Dir.glob("*.mid"){|f| files.push(f) }
        Dir.glob("*.MID"){|f| files.push(f) }
       }
       @sprites["command_window"].commands=files
       @sprites["command_window"].index=0
       @custom=true
     when 4 3
       pbPlayDecisionSE()

You can use this method for removing radio musics, just remember to reorder the "when"s.

Adjusts musics priority

To adjusts non-custom musics prioritys to be like customs ones change every 'pbBGMPlay("ZZZ", 100, 100)' to '$game_system.setDefaultBGM("ZZZ")' where 'ZZZ' is the music name.

Make the default custom option resets the music

To make the default custom option make the map music to be played again after use the radio insert the following highlighted code:

   end
   if Input.trigger?(Input::C)
     $PokemonMap.whiteFluteUsed=false if $PokemonMap
     $PokemonMap.blackFluteUsed=false if $PokemonMap
     if @sprites["command_window"].index==0
       $game_system.setDefaultBGM(nil)
       $game_map.autoplay
     else
       $game_system.setDefaultBGM(
          @sprites["command_window"].commands[@sprites["command_window"].index]
       )        
     end

Make an item to acess Pokégear radio

This one is usefull if you want the radio but don't put the pokégear in your game. This modification consists in three parts: add the item in txt, add the item effect in script and put to radio when close goes to map screen instead of Pokégear screen. Add in the item.txt (you can change the internal number and some others details):

522,POKePOD,Poképod,5,0,"A new music player device that can be use for hear lots of music.",2,0,0,

In Radio script, change every 'Scene_Pokegear.new' to 'Scene_Map.new'. In PokemonDefaultItems, around line 20 insert the following highlighted code:

ItemHandlers::UseFromBag.add(:TOWNMAP,proc{|item|
   pbShowMap
   next 1 # Continue
})
ItemHandlers::UseFromBag.add(:MACHBIKE,proc{|item|
   next pbBikeCheck ? 2 : 0
})
ItemHandlers::UseFromBag.add(:POKePOD,proc{|item|
   $scene = Scene_Jukebox.new
   next 2
})
ItemHandlers::UseFromBag.copy(:ACROBIKE,:MACHBIKE)
ItemHandlers::UseFromBag.add(:POKeBLOCKCASE,proc{|item| next 2 })

And around line 620:

# UseInField handlers
#
ItemHandlers::UseInField.add(:POKePOD,proc{|item|
   $scene = Scene_Jukebox.new
   next 2
})
   ItemHandlers::UseInField.add(:COINCASE,proc{|item|

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.