• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

[Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Status
Not open for further replies.
  • 1
    Posts
    14
    Years
    • Seen Dec 22, 2009
    Hey ! Ive downloaded this game, but I can't save ingame... I always have to start a new game when I close the game. But ingame, it tell me that all was saved.

    Why :(

    I would appreciate any help :) Thanks.

    (Sorry for my english).
     

    Luka S.J.

    Jealous Croatian
  • 1,270
    Posts
    15
    Years
    Ok listen, I appreciate you helping me, but stop talking to me as if I am some little kid. I know perfectly how to take a screenshot. It is an actual charset.

    Ok relax for a bit first. What I think you did is in any of your events you have turned on the function "Through ON" for the player. Which makes the player walk as if the "Ctrl" key is held. Just make a random event anywhere and set it to "Through OFF" for the player, which hopefully should resolve your problem. Find the faulty event and fix it. That's all I can say.
     

    KingCharizard

    C++ Developer Extraordinaire
  • 1,229
    Posts
    14
    Years
    Ok listen, I appreciate you helping me, but stop talking to me as if I am some little kid. I know perfectly how to take a screenshot. It is an actual charset.

    I apologize I never ment to make you feel that way its just sometimes people dont know how to capture screens... And what Luka said sounds correct...
     

    |Maximus|

    I'm back~
  • 836
    Posts
    16
    Years
    • Seen Sep 10, 2010
    I apologize I never ment to make you feel that way its just sometimes people dont know how to capture screens... And what Luka said sounds correct...

    Sorry for being rude, I didn't mean it. It isn't that he walks through everything, he walks over everything that has a 'O' in the Database.
     

    KingCharizard

    C++ Developer Extraordinaire
  • 1,229
    Posts
    14
    Years
    Sorry for being rude, I didn't mean it. It isn't that he walks through everything, he walks over everything that has a 'O' in the Database.

    at the risk of sounding repetive and dumb heres what I think could be happening

    Ok are you sure your editing the right tileset... for instance I use two different tilesets for different maps, its the same tileset just with a different orgin...
    Here is what i mean,
    Spoiler:


    see how they all look the same, check map properties make sure you edited the right one... this is my last idea if this doesn't help then i dunno what to tell you, And im sorry i couldnt help.
     

    Luka S.J.

    Jealous Croatian
  • 1,270
    Posts
    15
    Years
    Sorry for being rude, I didn't mean it. It isn't that he walks through everything, he walks over everything that has a 'O' in the Database.

    Then somewhere in the events you set the player to be on top of everything, or you haven't set the priorities of your various terrains right. Check both of those. Things like this are usually RMXP eventing errors, and not the starter kit's scripting.
     
  • 489
    Posts
    16
    Years
    As far as I can tell, this has been fixed in the newest release... Could you post your PokemonPokedex script?

    Anyway, as I said, I've improved the Braille script.

    Code:
    class BrailleWindow < SpriteWindow_Base
    
    attr_reader :text
    attr_accessor :charsPerRow
    attr_accessor :dotSize
    attr_accessor :dotSpacing
    attr_accessor :charSpacing
    attr_accessor :rowSpacing
    attr_accessor :backgroundColor
    attr_accessor :darkColor
    attr_accessor :lightColor
    attr_accessor :borderWidth
    attr_accessor :borderHeight
    
    PATTERNS = [1, 3, 9, 25, 17, 11, 27, 19, 10, 26, 5, 7, 13, 29, 21, 15, 31, 23,
      14, 30, 37, 51, 58, 57, 73, 53]
    
    def initialize(text=nil)
      super(0,0,0,0)
      @text = text
      @charsPerRow = 13
      @dotSize = 6
      @dotSpacing = 6
      @charSpacing = 14
      @rowSpacing = 14
      @backgroundColor = Color.new(255, 255, 255)
      @darkColor = Color.new(16, 16, 16)
      @lightColor = Color.new(208, 208, 200)
      @borderWidth = 16
      @borderHeight = 16
      @charWidth = 0
      @fullDotSize = 0
      @rowHeight = 0
      pbDrawBraille if text
    end
    
    def pbDrawBraille(text=nil)
      @text = text if text
      count = 0
      pbRefreshContents
      self.contents.fill_rect(self.contents.rect, @backgroundColor)
      @text.upcase.each_byte{|c|
        if c >= 65 && c < 91
          pattern = PATTERNS[c - 65]
        elsif c.chr == "."
          pattern = 50
        elsif c.chr == ","
          pattern = 2
        else
          pattern = 0
        end
        for i in 0...6
          self.contents.fill_rect(
            (count % @charsPerRow) * @charWidth + (i / 3) * @fullDotSize + @borderWidth,
            (i % 3) * @fullDotSize + (count / @charsPerRow) * @rowHeight + @borderHeight,
            @dotSize, @dotSize, pattern & (1 << i) > 0 ? @darkColor : @lightColor)
        end
        count += 1
      }
    end
    
    def pbRefreshContents
      @charWidth = 2 * @dotSize + @dotSpacing + @charSpacing
      @fullDotSize = @dotSize + @dotSpacing
      @rowHeight = @dotSize * 3 + @dotSpacing * 2 + @rowSpacing
      numChars = [@charsPerRow, @text.length].min
      self.contents.dispose if self.contents
      self.contents = Bitmap.new(numChars * @charWidth - @charSpacing + @borderWidth * 2,
        @rowHeight * ((@text.length - 1) / @charsPerRow + 1) - @rowSpacing + @borderHeight * 2)
      self.width = self.contents.width + 32
      self.height = self.contents.height + 32
    end
    
    def pbCenter
      self.x = (Graphics.width - self.width) / 2
      self.y = (Graphics.height - self.height) / 2
    end
    
    end
    
    def pbBrailleMessage(text)
      window=BrailleWindow.new(text)
      window.pbCenter
      pbPlayDecisionSE
      loop do
        Graphics.update
        Input.update
        window.update
        pbUpdateSceneMap
        break if Input.trigger?(Input::C) || Input.trigger?(Input::B)
      end
      window.dispose
      Input.update
    end

    Now you don't need to fiddle about with image files etc - just call
    Code:
    pbBrailleMessage(text)
    in an event; for example:
    Code:
    pbBrailleMessage(_I("Open the door. An eternal Pokemon awakes."))
    It's also a lot more customisable. You can change the properties of how the text is drawn; for example, you can change the colours and the dot size. It's up to you how to use it :)

    Hey Wichu, just tried this out and got the following.
    The Braille still shows up on screen however.
    Code:
    ---------------------------
    Pokemon Dusk Gold
    ---------------------------
    Exception: RuntimeError
    
    Message: Script error within event 7, map 159 (Sky Mountain):
    
    Section128:84:in `pbBrailleMessage'undefined local variable or method `pbPlayDecisionSE' for #<Interpreter:0xa6c1058>
    
    ***Full script:
    
    pbBrailleMessage(_I("The creator of 
    Water, Kyogre."))
    
    
    Interpreter:238:in `pbExecuteScript'
    
    (eval):2:in `pbExecuteScript'
    
    Interpreter:1652:in `eval'
    
    Interpreter:238:in `pbExecuteScript'
    
    Interpreter:1652:in `command_355'
    
    Interpreter:496:in `execute_command'
    
    Interpreter:190:in `update'
    
    Interpreter:104:in `loop'
    
    Interpreter:195:in `update'
    
    Scene_Map:100:in `update'
    
    
    
    Interpreter:279:in `pbExecuteScript'
    
    Interpreter:1652:in `command_355'
    
    Interpreter:496:in `execute_command'
    
    Interpreter:190:in `update'
    
    Interpreter:104:in `loop'
    
    Interpreter:195:in `update'
    
    Scene_Map:100:in `update'
    
    Scene_Map:98:in `loop'
    
    Scene_Map:111:in `update'
    
    Scene_Map:67:in `main'
    
    
    
    This exception was logged in errorlog.txt.
    
    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK   
    ---------------------------
     

    thepsynergist

    Vinemon: Sauce Edition Programmer and Composer
  • 795
    Posts
    15
    Years
    As far as I can tell, this has been fixed in the newest release... Could you post your PokemonPokedex script?


    Sure, Here is the code:

    Code:
    class Window_Pokedex < SpriteWindow_Selectable
     attr_reader :baseColor
     attr_reader :shadowColor
     def initialize(x,y,width,height)
      @starting=true
      super(x,y,width,height)
      @selarrow=BitmapCache.load_bitmap("Graphics/Pictures/selarrow.png")
      @pokeball=BitmapCache.load_bitmap("Graphics/Pictures/pokeball.png")
      @baseColor=Color.new(9<<3,9<<3,9<<3)
      @shadowColor=Color.new(26<<3,26<<3,26<<3)
      self.index=0
      @commands=[]
      @item_max=0
      @starting=false
      refresh
     end
     def commands=(value)
      @commands=value
      refresh
     end
     def dispose
      @selarrow.dispose
      @pokeball.dispose
      super
     end
     def species
      return @commands.length==0 ? 0 : @commands[self.index][0]
     end
     def refresh
      return if @starting
      @[email protected]
      dheight=self.height-32
      dwidth=self.width-32
      if !self.contents || self.contents.disposed? ||
          self.contents.height<dheight || self.contents.width<dwidth
       self.contents.dispose if self.contents
       self.contents=Bitmap.new([1,dwidth].max,[1,dheight].max)
       pbSetSystemFont(self.contents)
      end
      self.contents.clear
      contentsWidth=self.contents.width
      ypos=0
      for i in 0...@item_max
       if i<self.top_row || i>self.top_row+self.page_row_max
        next
       end
       pbCopyBitmap(self.contents,@selarrow,0,ypos) if self.index==i
       indexNumber=@commands[i][4]
       species=@commands[i][0]
       if $Trainer.seen[species]
        j=self.top_row
        if $Trainer.owned[species]
         pbCopyBitmap(self.contents,@pokeball,210,(i-j)*32)
        end
        text=_ISPRINTF("No.{1:03d} {2:s}",indexNumber,@commands[i][1])
       else
        text=_ISPRINTF("No.{1:03d} ----------",indexNumber)
       end
       self.contents.font.color=@shadowColor
       pbDrawShadow(self.contents,16,ypos,self.contents.width-16,32,text)
       self.contents.font.color=@baseColor
       self.contents.draw_text(16,ypos,self.contents.width-16,32,text)
       ypos+=32
      end
     end
     def update
      dorefresh=false
      oldindex=self.index
      super
      dorefresh=(self.index!=oldindex)
      refresh if dorefresh
     end
    end
    
    class Window_ComplexCommandPokemon < SpriteWindow_Selectable
     attr_reader :baseColor
     attr_reader :shadowColor
     attr_reader :commands
     def getAutoDims(commands,dims,width=nil)
      windowheight=commands.length*32+32
      windowheight=33 if windowheight<33
      if !width || width<0
       width=0
       tmpbitmap=Bitmap.new(1,1)
       pbSetSystemFont(tmpbitmap)
       for i in commands
        width=[width,tmpbitmap.text_size(i).width].max
       end
       width+=64
       tmpbitmap.dispose
      else
       width=[33,width].max
      end
      dims[0]=width
      dims[1]=windowheight
     end
     def initialize(commands,width=nil)
      @starting=true
      @commands=commands
      dims=[]
      getAutoDims(commands,dims,width)
      super(0,0,dims[0],dims[1])
      @item_max=commands.length
      @selarrow=BitmapCache.load_bitmap("Graphics/Pictures/selarrow.png")
      @index=0
      self.active=true
      @baseColor=Color.new(12*8,12*8,12*8)
      @shadowColor=Color.new(26*8,26*8,25*8)
      refresh
      @starting=false
     end
     def self.newEmpty(x,y,width,height,viewport=nil)
      ret=self.new([],width)
      ret.x=x
      ret.y=y
      ret.width=width
      ret.height=height
      ret.viewport=viewport
      return ret
     end
     def index=(value)
       super
       refresh if !@starting
     end
     def indexToCommand(index)
      curindex=0
      i=0; loop do break unless i<@commands.length
       return [i/2,-1] if index==curindex
       curindex+=1
       return [i/2,index-curindex] if index-curindex<commands[i+1].length
       curindex+=commands[i+1].length
       i+=2
      end
      return [-1,-1]
     end
     def getText(array,index)
      cmd=indexToCommand(index)
      return "" if cmd[0]==-1
      return array[cmd[0]*2] if cmd[1]<0
      return array[cmd[0]*2+1][cmd[1]]
     end
     def commands=(value)
      @commands=value
      @item_max=commands.length  
      self.index=self.index
     end
     def width=(value)
      super
      if !@starting
       self.index=self.index
      end
     end
     def height=(value)
      super
      if !@starting
       self.index=self.index
      end
     end
     def resizeToFit(commands)
      dims=[]
      getAutoDims(commands,dims)
      self.width=dims[0]
      self.height=dims[1]
     end
     def dispose
      @selarrow.dispose
      super
     end
     def baseColor=(value)
      @baseColor=value
      refresh
     end
     def shadowColor=(value)
      @shadowColor=value
      refresh
     end
     def refresh
      dwidth=self.width-32
      dheight=self.height-32
      @item_max=0
      i=0; loop do break unless i<@commands.length
       @item_max+=1+@commands[i+1].length
       i+=2
      end
      if !self.contents || self.contents.disposed? ||
         self.contents.width<dwidth ||
         self.contents.height<dheight
       self.contents.dispose if self.contents
       self.contents=Bitmap.new([1,dwidth].max,[1,dheight].max)
       pbSetSystemFont(self.contents)
      end
      self.contents.clear
      contentsWidth=self.contents.width
      ypos=0
      icommand=0
      i=0; loop do break unless i<@commands.length
       if icommand>=self.top_row && icommand<self.top_row+self.page_row_max
        self.contents.font.color=self.shadowColor
        pbDrawShadow(self.contents,0,ypos,contentsWidth,32,@commands[i])
        self.contents.font.color=self.baseColor
        self.contents.draw_text(0,ypos,contentsWidth,32,@commands[i])
        ypos+=32
       end
       icommand+=1
       for j in 0...@commands[i+1].length
        if icommand>=self.top_row && icommand<self.top_row+self.page_row_max
         pbCopyBitmap(self.contents,@selarrow,0,ypos) if self.index==icommand
         self.contents.font.color=self.shadowColor
         pbDrawShadow(self.contents,16,ypos,contentsWidth-16,32,@commands[i+1][j])
         self.contents.font.color=self.baseColor
         self.contents.draw_text(16,ypos,contentsWidth-16,32,@commands[i+1][j])
         ypos+=32
        end
        icommand+=1
       end
       i+=2
      end
     end
     def update
      oldindex=self.index
      super
      refresh if self.index!=oldindex
     end
    end
    
    
    
    class PokemonPokedexScene
    
    def setIconBitmap(file)
     @sprites["icon"].setBitmap(file)
     if @sprites["icon"].bitmap
      @sprites["icon"].ox=@sprites["icon"].bitmap.width/2
      @sprites["icon"].oy=@sprites["icon"].bitmap.height/2
     end
    end
    
    #
    # Gets the region used for displaying Pokédex entries.
    # Species will be listed according to the given region's
    # numbering and the returned region can have any value
    # defined in the town map data file.  It's currently
    # set to the return value of pbGetCurrentRegion, 
    # and thus will change according to the current map's 
    # MapPosition metadata setting.
    #
    def pbGetPokedexRegion
      return pbGetCurrentRegion()
    end
    
    def pbStartScene
     @sprites={}
     @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
     @viewport.z=99999
     @sprites["pokedex"]=Window_Pokedex.new(
       160,0,Graphics.width-160,Graphics.height)
     @sprites["pokedex"].viewport=@viewport
     @sprites["dexentry"]=SpriteWrapper.new(@viewport)
     @sprites["dexentry"].bitmap=BitmapCache.load_bitmap("Graphics/Pictures/dexentry.png")
     @sprites["dexentry"].visible=false
     @sprites["overlay"]=SpriteWrapper.new(@viewport)
     @sprites["overlay"].bitmap=Bitmap.new(Graphics.width,Graphics.height)
     pbSetSystemFont(@sprites["overlay"].bitmap)
     @sprites["overlay"].x=0
     @sprites["overlay"].y=0
     @sprites["overlay"].visible=false
     @sprites["iconback"]=IconWindow.new(0,0,160,160)
     @sprites["iconback"].viewport=@viewport
     @sprites["auxlist"]=Window_CommandPokemon.newEmpty(272,0,208,224,@viewport)
     @sprites["searchlist"]=Window_ComplexCommandPokemon.newEmpty(0,0,272,224,@viewport)
     @sprites["infowindow"]=Window_UnformattedTextPokemon.newWithSize("",0,160,160,160,@viewport)
     @sprites["messagebox"]=Window_UnformattedTextPokemon.new("")
     pbBottomLeftLines(@sprites["messagebox"],2)
     @sprites["messagebox"].letterbyletter=false
     @sprites["messagebox"].visible=false
     @sprites["messagebox"].viewport=@viewport
     @sprites["auxlist"].visible=false
     @sprites["searchlist"].visible=false
     addBackgroundPlane(@sprites,"searchbg","searchbg.png",@viewport)
    =begin
    #  Suggestion for changing the background depending on region.  You
    #  can change the line below with the following:
     if pbGetPokedexRegion()==-1 # Using national Pokédex
       addBackgroundPlane(@sprites,"background","pokedexbg_national.png",@viewport)
     elsif pbGetPokedexRegion()==0 # Using regional Pokédex
       addBackgroundPlane(@sprites,"background","pokedexbg_regional.png",@viewport)
     end
    =end
     addBackgroundPlane(@sprites,"background","pokedexbg.png",@viewport)
     @sprites["searchbg"].visible=false
     @sprites["icon"]=IconSprite.new(80,80,@viewport)
     @searchResults=false
     pbRefreshDexList($PokemonGlobal.pokedexIndex)
     pbFadeInAndShow(@sprites)
    end
    
    def pbDexSearchCommands(commands,selitem,helptexts=nil)
     ret=-1
     auxlist=@sprites["auxlist"]
     messagebox=@sprites["messagebox"]
     auxlist.commands=commands
     auxlist.index=selitem
     messagebox.text=helptexts ? helptexts[auxlist.index] : "" 
     loop do
       Graphics.update
       Input.update
       oldindex=auxlist.index
       auxlist.update
       if auxlist.index!=oldindex && helptexts
         messagebox.text=helptexts[auxlist.index]
       end
       if Input.trigger?(Input::B)
         ret=selitem
         break
       end
       if Input.trigger?(Input::C)
         ret=auxlist.index
         break
       end
     end
     @sprites["auxlist"].commands=[]
     Input.update
     return ret
    end
    
    def pbCanAddForModeList?(mode,nationalSpecies)
     case mode
      when 0
       return true
      when 1
       return $Trainer.seen[nationalSpecies]
      when 2, 3, 4, 5
       return $Trainer.owned[nationalSpecies]
     end
    end
    
    def pbCanAddForModeSearch?(mode,nationalSpecies)
     case mode
      when 0, 1
       return $Trainer.seen[nationalSpecies]
      when 2, 3, 4, 5
       return $Trainer.owned[nationalSpecies]
     end
    end
    
    
    def pbGetDexList()
     dexlist=[]
     dexdata=pbOpenDexData
     region=pbGetPokedexRegion()
     regionalSpecies=pbAllRegionalSpecies(region)
     if regionalSpecies.length==1
      # No regional species defined,
      # use national Pokédex order
      for i in 1..PBSpecies.getCount
       regionalSpecies.push(i)
      end
     end
     for i in 1...regionalSpecies.length
      nationalSpecies=regionalSpecies[i]
      if pbCanAddForModeList?($PokemonGlobal.pokedexMode,nationalSpecies)
       pbDexDataOffset(dexdata,nationalSpecies,33)
       height=dexdata.fgetw
       weight=dexdata.fgetw
       # Pushing national species, name, height, weight, index number
       dexlist.push([nationalSpecies,
           PBSpecies.getName(nationalSpecies),height,weight,i])
      end
     end
     dexdata.close
     return dexlist
    end
    
    def pbRefreshDexList(index=0)
     dexlist=pbGetDexList()
     case $PokemonGlobal.pokedexMode
      when 0 # Numerical mode
       # Remove species not seen from the list
       i=0; loop do break unless i<dexlist.length
        break if $Trainer.seen[dexlist[i][0]]
        dexlist[i]=nil
        i+=1
       end
       i=dexlist.length-1; loop do break unless i>=0
        break if !dexlist[i] || $Trainer.seen[dexlist[i][0]]
        dexlist[i]=nil
        i-=1
       end
       dexlist.compact!
       # Sort species in ascending order by 
       # index number, not national species
       dexlist.sort!{|a,b| a[4]<=>b[4]}
      when 1 # Alphabetical mode
       dexlist.sort!{|a,b| a[1]<=>b[1]}
      when 2 # Heaviest mode
       dexlist.sort!{|a,b| b[3]<=>a[3]}
      when 3 # Lightest mode
       dexlist.sort!{|a,b| a[3]<=>b[3]}
      when 4 # Tallest mode
       dexlist.sort!{|a,b| b[2]<=>a[2]}
      when 5 # Smallest mode
       dexlist.sort!{|a,b| a[2]<=>b[2]}
     end
     if !@searchResults
       @sprites["infowindow"].text=_ISPRINTF("SEEN: {1:d}\r\nOWN: {2:d}\r\nZ: MENU\r\nF5: SEARCH",$Trainer.pokedexSeen,$Trainer.pokedexOwned)
     else
       @sprites["infowindow"].text=_INTL("X: BACK\r\nZ: MENU\r\nF5: SEARCH")
     end
     @dexlist=dexlist
     @sprites["pokedex"].commands=@dexlist
     @sprites["pokedex"].index=index
     @sprites["pokedex"].refresh
     iconspecies=@sprites["pokedex"].species
     iconspecies=0 if !$Trainer.seen[iconspecies]
     setIconBitmap(pbPokemonBitmapFile(iconspecies,false))
    end
    
    def pbSearchDexList(params)
     dexlist=pbGetDexList()
     if params[0]!=0 # Filter by name
      nameCommands=[
          "",_INTL("ABC"),_INTL("DEF"),_INTL("GHI"),
          _INTL("JKL"),_INTL("MNO"),_INTL("PQR"),
          _INTL("STU"),_INTL("VWX"),_INTL("YZ")
      ]
      scanNameCommand=nameCommands[params[0]].scan(/./)
      dexlist=dexlist.find_all {|item|
       firstChar=item[1][0,1]
       next scanNameCommand.any? { |v|  v==firstChar }
      }
     end
     if params[1]!=0 # Filter by color
      dexlist=dexlist.find_all {|item|
       dexdata.pos=76*(item[0]-1)+6
       color=dexdata.fgetb
       next color==params[1]-1
      }
     end
     if params[2]!=0 || params[3]!=0 # Filter by type
      typeCommands=[
       -1,0,1,2,3,4,5,6,7,8,
       10,11,12,13,14,15,16,17
      ]
      stype1=typeCommands[params[2]]
      stype2=typeCommands[params[3]]
      dexlist=dexlist.find_all {|item|
       dexdata.pos=76*(item[0]-1)+8
       type1=dexdata.fgetb
       type2=dexdata.fgetb
       if stype1>=0 && stype2>=0
         # Find species that match both types
         next (stype1==type1 && stype2==type2) ||
         (stype1==type2 && stype2==type1)
       elsif stype1>=0
         # Find species that match first type entered
         next type1==stype1 || type2==stype1
       else
         # Find species that match second type entered
         next type1==stype2 || type2==stype2
       end
      }
     end
     dexdata.close
     case params[4]
      when 0 # Numerical mode
       # Sort by index number, not
       # national number
       dexlist.sort!{|a,b| a[4]<=>b[4]}
      when 1 # Alphabetical mode
       dexlist.sort!{|a,b| a[1]<=>b[1]}
      when 2 # Heaviest mode
       dexlist.sort!{|a,b| b[3]<=>a[3]}
      when 3 # Lightest mode
       dexlist.sort!{|a,b| a[3]<=>b[3]}
      when 4 # Tallest mode
       dexlist.sort!{|a,b| b[2]<=>a[2]}
      when 5 # Smallest mode
       dexlist.sort!{|a,b| a[2]<=>b[2]}
     end
     return dexlist
    end
    
    
    def pbRefreshDexSearch(params)
     searchlist=@sprites["searchlist"]
     messagebox=@sprites["messagebox"]
     searchlist.commands=[
      _INTL("SEARCH"),[
        _ISPRINTF("NAME: {1:s}",@nameCommands[params[0]]),
        _ISPRINTF("COLOR: {1:s}",@colorCommands[params[1]]),
        _ISPRINTF("TYPE 1: {1:s}",@typeCommands[params[2]]),
        _ISPRINTF("TYPE 2: {1:s}",@typeCommands[params[3]]),
        _ISPRINTF("ORDER: {1:s}",@orderCommands[params[4]]),
        _INTL("START SEARCH")
      ],
      _INTL("SHIFT"),[
        _ISPRINTF("ORDER: {1:s}",@orderCommands[params[5]]),
       _INTL("START SHIFT")
      ],
      _INTL("OTHER"),[
       _INTL("CANCEL")
      ]
     ]
     helptexts=[
      _INTL("Search for Pokémon based on selected parameters."),[
        _INTL("List by the first letter in the name.\r\nSpotted Pokémon only."),
        _INTL("List by body color.\r\nSpotted Pokémon only."),
        _INTL("List by type.\r\nOwned Pokémon only."),
        _INTL("List by type.\r\nOwned Pokémon only."),
        _INTL("Select the Pokédex listing mode."),
        _INTL("Execute search."),
      ],
      _INTL("Switch Pokédex listings."),[
        _INTL("Select the Pokédex listing mode."),
        _INTL("Execute switch."),
      ],
      _INTL("Return to the Pokédex."),[
       _INTL("Return to the Pokédex.")
      ]
     ]
     messagebox.text=searchlist.getText(helptexts,searchlist.index)
    end
    
    def pbChangeToDexEntry(species)
     @sprites["dexentry"].visible=true
     @sprites["overlay"].visible=true
     @sprites["overlay"].bitmap.clear
     basecolor=Color.new(0,0,0)
     shadowcolor=Color.new(184,184,184)
     indexNumber=pbGetRegionalNumber(pbGetPokedexRegion(),species)
     indexNumber=species if indexNumber==0
     textpos=[
      [_ISPRINTF("No. {1:03d}  {2:s}",indexNumber,PBSpecies.getName(species)),96*2,24*2,0,basecolor,shadowcolor],
      [sprintf(_INTL("HT")),96*2,56*2,0,basecolor,shadowcolor],
      [sprintf(_INTL("WT")),96*2,72*2,0,basecolor,shadowcolor]
     ]
     if $Trainer.owned[species]
      dexdata=pbOpenDexData
      pbDexDataOffset(dexdata,species,33)
      height=dexdata.fgetw
      weight=dexdata.fgetw
      dexdata.close
      kind=pbGetMessage(MessageTypes::Kinds,species)
      dexentry=pbGetMessage(MessageTypes::Entries,species)
      inches=(height/0.254).round
      pounds=(weight/0.45359).round
      textpos.push([_ISPRINTF("{1:s} POKéMON",kind),100*2,40*2,0,basecolor,shadowcolor])
      textpos.push([_ISPRINTF("{1:.1f} m",height/10.0),184*2,56*2,1,basecolor,shadowcolor])
      textpos.push([_ISPRINTF("{1:.1f} kg",weight/10.0),184*2,72*2,1,basecolor,shadowcolor])
    #  textpos.push([_ISPRINTF("{1:d}'{2:02d}\"",inches/12,inches%12),146*2,56*2,0,basecolor,shadowcolor])
    #  textpos.push([_ISPRINTF("{1:4.1f} lbs.",pounds/10),184*2,72*2,1,basecolor,shadowcolor])
      drawTextEx(@sprites["overlay"].bitmap,
        8*2,96*2,232*2,4,dexentry,basecolor,shadowcolor)
     else
      textpos.push([_INTL("????? POKéMON"),100*2,40*2,0,basecolor,shadowcolor])
      textpos.push([_INTL("???.? m"),184*2,56*2,1,basecolor,shadowcolor])
      textpos.push([_INTL("???.? kg"),184*2,72*2,1,basecolor,shadowcolor])
    #  textpos.push([_INTL("??'??\""),146*2,56*2,0,basecolor,shadowcolor])
    #  textpos.push([_INTL("???.? lbs."),184*2,72*2,1,basecolor,shadowcolor])
     end
     pbDrawTextPositions(@sprites["overlay"].bitmap,textpos)
     pkmnbitmap=BitmapCache.load_bitmap(pbPokemonBitmapFile(species,false))
     @sprites["overlay"].bitmap.blt(
       40-(pkmnbitmap.width-128)/2,
       48-(pkmnbitmap.height-128)/2,
       pkmnbitmap,pkmnbitmap.rect)
     pkmnbitmap.dispose
     pbPlayCry(species)
     pbFadeInAndShow(@sprites)
    end
    
    
    def pbStartDexEntryScene(species)
     @sprites={}
     @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
     @viewport.z=99999
     @sprites["dexentry"]=SpriteWrapper.new(@viewport)
     @sprites["dexentry"].bitmap=BitmapCache.load_bitmap("Graphics/Pictures/dexentry.png")
     @sprites["dexentry"].visible=false
     @sprites["overlay"]=SpriteWrapper.new(@viewport)
     @sprites["overlay"].bitmap=Bitmap.new(Graphics.width,Graphics.height)
     pbSetSystemFont(@sprites["overlay"].bitmap)
     @sprites["overlay"].x=0
     @sprites["overlay"].y=0
     @sprites["overlay"].visible=false
     pbChangeToDexEntry(species)
    end
    
    def pbMiddleDexEntryScene
     loop do
        Graphics.update
        Input.update
        if Input.trigger?(Input::B) || Input.trigger?(Input::C)
          break
        end
     end
    end
    
    def pbDexEntry(index)
     oldsprites=pbFadeOutAndHide(@sprites)
     pbChangeToDexEntry(@dexlist[index][0])
     curindex=index
     loop do
        Graphics.update
        Input.update
        if Input.trigger?(Input::C)
          pbFadeOutAndHide(@sprites)
          scene=PokemonAreaMapScene.new
          screen=PokemonAreaMap.new(scene)
          screen.pbStartScreen(@dexlist[curindex][0])
          pbChangeToDexEntry(@dexlist[curindex][0])
        elsif Input.trigger?(Input::B)
          break
        elsif Input.trigger?(Input::A)
          pbPlayCry(@dexlist[curindex][0])
        elsif Input.trigger?(Input::UP)
          nextindex=-1
          i=curindex-1; loop do break unless i>=0
           if $Trainer.seen[@dexlist[i][0]]
            nextindex=i
            break
           end
           i-=1
          end
          if nextindex>=0
           Input.update
           pbFadeOutAndHide(@sprites)
           pbChangeToDexEntry(@dexlist[nextindex][0]) 
           curindex=nextindex
          end
          next
        elsif Input.trigger?(Input::DOWN)
          nextindex=-1
          for i in [email protected]
           if $Trainer.seen[@dexlist[i][0]]
            nextindex=i
            break
           end
          end
          if nextindex>=0
           Input.update
           pbFadeOutAndHide(@sprites)
           pbChangeToDexEntry(@dexlist[nextindex][0]) 
           curindex=nextindex
          end
          next
         elsif Input.trigger?(Input::LEFT)
          nextindex=-1
          for i in [email protected]
           if $Trainer.seen[@dexlist[i][0]]
            nextindex=i
            break
           end
          end
          if nextindex>=0
           Input.update
           pbFadeOutAndHide(@sprites)
           pbChangeToDexEntry(@dexlist[nextindex][0]) 
           curindex=nextindex
         end
         next
             elsif Input.trigger?(Input::RIGHT)
          nextindex=-1
          for i in [email protected]
           if $Trainer.seen[@dexlist[i][0]]
            nextindex=i
            break
           end
          end
          if nextindex>=0
           Input.update
           pbFadeOutAndHide(@sprites)
           pbChangeToDexEntry(@dexlist[nextindex][0]) 
           curindex=nextindex
         end
         next
        end
     end
     pbFadeOutAndHide(@sprites)
     $PokemonGlobal.pokedexIndex=curindex if !@searchResults
     @sprites["pokedex"].index=curindex
     @sprites["pokedex"].refresh
     iconspecies=@sprites["pokedex"].species
     iconspecies=0 if !$Trainer.seen[iconspecies]
     setIconBitmap(pbPokemonBitmapFile(iconspecies,false))
     pbFadeInAndShow(@sprites,oldsprites)
    end
    
    def pbDexSearch
     oldsprites=pbFadeOutAndHide(@sprites)
     params=[]
     params[0]=0
     params[1]=0
     params[2]=0
     params[3]=0
     params[4]=0
     params[5]=$PokemonGlobal.pokedexMode
     @nameCommands=[
            _INTL("DON'T SPECIFY"),
            _INTL("ABC"),_INTL("DEF"),_INTL("GHI"),
            _INTL("JKL"),_INTL("MNO"),_INTL("PQR"),
            _INTL("STU"),_INTL("VWX"),_INTL("YZ")
     ]
     @typeCommands=[
            _INTL("NONE"),
            _INTL("NORMAL"),_INTL("FIGHTING"),_INTL("FLYING"),
            _INTL("POISON"),_INTL("GROUND"),_INTL("ROCK"),
            _INTL("BUG"),_INTL("GHOST"),_INTL("STEEL"),
            _INTL("FIRE"),_INTL("WATER"),_INTL("GRASS"),
            _INTL("ELECTRIC"),_INTL("PSYCHIC"),_INTL("ICE"),
            _INTL("DRAGON"),_INTL("DARK")
     ]
     @colorCommands=[
            _INTL("DON'T SPECIFY"),
            _INTL("RED"),_INTL("BLUE"),_INTL("YELLOW"),
            _INTL("GREEN"),_INTL("BLACK"),_INTL("BROWN"),
            _INTL("PURPLE"),_INTL("GRAY"),_INTL("WHITE"),_INTL("PINK")
     ]
     @orderCommands=[
            _INTL("NUMERIC MODE"),
            _INTL("A TO Z MODE"),
            _INTL("HEAVIEST MODE"),
            _INTL("LIGHTEST MODE"),
            _INTL("TALLEST MODE"),
            _INTL("SMALLEST MODE")
     ]
     @orderHelp=[
            _INTL("Pokémon are listed according to their number."),
            _INTL("Spotted and owned Pokémon are listed alphabetically."),
            _INTL("Owned Pokémon are listed from the heaviest to the lightest."),
            _INTL("Owned Pokémon are listed from the lightest to the heaviest."),
            _INTL("Owned Pokémon are listed from the tallest to the smallest."),
            _INTL("Owned Pokémon are listed from the smallest to the tallest.")
     ]
     @sprites["searchlist"].index=1
     searchlist=@sprites["searchlist"]
     messagebox=@sprites["messagebox"]
     @sprites["messagebox"].visible=true
     @sprites["auxlist"].visible=true
     @sprites["searchlist"].visible=true
     @sprites["searchbg"].visible=true
     pbRefreshDexSearch(params)
     pbFadeInAndShow(@sprites)
     loop do
        Graphics.update
        Input.update
        oldindex=searchlist.index
        searchlist.update
        if searchlist.index!=oldindex
          pbRefreshDexSearch(params)
        end
        if Input.trigger?(Input::C)
         command=searchlist.indexToCommand(searchlist.index)
         if command==[2,0]
          break
         end
         if command==[0,0]
          params[0]=pbDexSearchCommands(@nameCommands,params[0])
          pbRefreshDexSearch(params)
         elsif command==[0,1]
          params[1]=pbDexSearchCommands(@colorCommands,params[1])
          pbRefreshDexSearch(params)
         elsif command==[0,2]
          params[2]=pbDexSearchCommands(@typeCommands,params[2])
          pbRefreshDexSearch(params)
         elsif command==[0,3]
          params[3]=pbDexSearchCommands(@typeCommands,params[3])
          pbRefreshDexSearch(params)
         elsif command==[0,4]
          params[4]=pbDexSearchCommands(@orderCommands,params[4],@orderHelp)
          pbRefreshDexSearch(params)
         elsif command==[0,5]
          dexlist=pbSearchDexList(params)
          if dexlist.length==0
           Kernel.pbMessage(_INTL("No matching Pokémon were found."))
          else
           @dexlist=dexlist
           @sprites["pokedex"].commands=@dexlist
           @sprites["pokedex"].index=0
           @sprites["pokedex"].refresh
           iconspecies=@sprites["pokedex"].species
           iconspecies=0 if !$Trainer.seen[iconspecies]
           @sprites["infowindow"].text=_INTL("X: BACK\r\nZ: MENU\r\nF5: SEARCH")
           setIconBitmap(pbPokemonBitmapFile(iconspecies,false))
           @searchResults=true
           break
          end
         elsif command==[1,0]
          params[5]=pbDexSearchCommands(@orderCommands,params[5],@orderHelp)
          pbRefreshDexSearch(params)
         elsif command==[1,1]
          $PokemonGlobal.pokedexMode=params[5]
           pbRefreshDexList
           break
         end
        elsif Input.trigger?(Input::B)
         break
        end
     end
     pbFadeOutAndHide(@sprites)
     pbFadeInAndShow(@sprites,oldsprites)
     Input.update
     return 0
    end
    
    def pbMenu
     ret=0
     commands=[_INTL("BACK TO LIST"),_INTL("LIST TOP"),_INTL("LIST BOTTOM"),_INTL("CLOSE POKéDEX")]
     using(cmdwindow=Window_CommandPokemon.new(commands)) {
       cmdwindow.viewport=@viewport
       cmdwindow.resizeToFit(cmdwindow.commands)
       pbBottomRight(cmdwindow)
       loop do
        Graphics.update
        Input.update
        cmdwindow.update
        if Input.trigger?(Input::B)
         ret=0
         break
        end
        if Input.trigger?(Input::C)
         ret=cmdwindow.index
         break
        end   
       end
     }
     return ret
    end
    
    def pbCloseSearch
     oldsprites=pbFadeOutAndHide(@sprites)
     @searchResults=false
     pbRefreshDexList($PokemonGlobal.pokedexIndex)
     pbFadeInAndShow(@sprites,oldsprites)
    end
    
    def pbPokedex
       loop do
        Graphics.update
        Input.update
        oldindex=@sprites["pokedex"].index
        @sprites["pokedex"].update
        if oldindex!=@sprites["pokedex"].index
         $PokemonGlobal.pokedexIndex=@sprites["pokedex"].index if !@searchResults
         iconspecies=@sprites["pokedex"].species
         iconspecies=0 if !$Trainer.seen[iconspecies]
         setIconBitmap(pbPokemonBitmapFile(iconspecies,false))
        end
        @sprites["icon"].update
        if Input.trigger?(Input::B)
         if @searchResults
          pbCloseSearch
         else
          break
         end
        elsif Input.trigger?(Input::C)
         if $Trainer.seen[@sprites["pokedex"].species]
          pbDexEntry(@sprites["pokedex"].index)
         end
        elsif Input.trigger?(Input::F5)
         pbDexSearch
        elsif Input.trigger?(Input::A)
         retval=pbMenu
         case retval
         when 1 # List Top
          @sprites["pokedex"].index=1
         when 2 # List Bottom
          @sprites["pokedex"].index=@sprites["pokedex"].count-1
         when 3
          if @searchResults
           pbCloseSearch
          else
           break
          end
         end
        end
       end 
    end
    
    def pbEndScene
      pbFadeOutAndHide(@sprites)
      pbDisposeSpriteHash(@sprites)
      @viewport.dispose
    end
    
    end
    
    class PokemonPokedex
    
    def initialize(scene)
     @scene=scene
    end
    
    def pbDexEntry(species)
     @scene.pbStartDexEntryScene(species)
     @scene.pbMiddleDexEntryScene
     @scene.pbEndScene
    end
    
    def pbStartScreen
     @scene.pbStartScene
     @scene.pbPokedex
     @scene.pbEndScene
    end
    
    end
     
  • 2,048
    Posts
    16
    Years
    • Seen Sep 7, 2023
    Hey Wichu, just tried this out and got the following.
    The Braille still shows up on screen however.

    It seems that you are using an older version of the starter kit, which doesn't use the pbPlayDecisionSE method. Change that line in the script to:
    Code:
    Audio.se_play("Audio/SE/Choose.wav")

    Sorry for being rude, I didn't mean it. It isn't that he walks through everything, he walks over everything that has a 'O' in the Database.

    I don't think this has been mentioned yet, and I doubt that it would be this simple, but have you changed the priority settings of the tiles?

    Sure, Here is the code:

    There's a line missing at line 420: underneath where it says
    Code:
    dexlist=pbGetDexList()
    it should say
    Code:
    dexdata=pbOpenDexData()
     

    |Maximus|

    I'm back~
  • 836
    Posts
    16
    Years
    • Seen Sep 10, 2010
    Only use the blank AUTOtile (top left) as a "eraser". Also, try in a event switching off the walk through things. (edit event route >> hero >> Walk Through OFF)

    Thanks for the help but, he doesn't walk through everything, he walks over everthing, even characters. I will take a screenshot soon.
     

    Colbex

    Cobalt Black Creator
  • 169
    Posts
    14
    Years
    Thanks for the help but, he doesn't walk through everything, he walks over everthing, even characters. I will take a screenshot soon.

    If that's the case, then somewhere, on some event for set move route, you've selected "Always On Top ON"

    Find that event for whatever case, and at the end of the move route select "Always on Top OFF"
    That should do the trick. o.o
     
  • 489
    Posts
    16
    Years
    It seems that you are using an older version of the starter kit, which doesn't use the pbPlayDecisionSE method. Change that line in the script to:
    Code:
    Audio.se_play("Audio/SE/Choose.wav")



    I don't think this has been mentioned yet, and I doubt that it would be this simple, but have you changed the priority settings of the tiles?



    There's a line missing at line 420: underneath where it says
    Code:
    dexlist=pbGetDexList()
    it should say
    Code:
    dexdata=pbOpenDexData()

    Thanks Wichu, works perfectly now. Now to think of a good use for it in my game, thinking maybe Ruins of Alph after the Puzzle is solved when you drop into the room below. More helpful for RSE remakes.
     

    ~JV~

    Dev of Pokémon Uranium
  • 684
    Posts
    16
    Years
    Thanks for the help but, he doesn't walk through everything, he walks over everthing, even characters. I will take a screenshot soon.

    Well, do as I said, but in a Set move route event, instead of putting Walk Through OFF, put Always on Top OFF. Good luck =x
     
    Status
    Not open for further replies.
    Back
    Top