Registrarse

[RPG Maker] Pregunta/respuesta rápida

Estado
Cerrado para nuevas respuestas.
Respuesta: Pedidos de RPG Maker

Vaya, parece que al descargarme los archivos no aparece ninguna extension con esos nombres;(

EDIT: @Ertincontike, he movido los últimos mensajes de tus dudas a este tema, que encaja mejor que en pedidos.
 

KleinStudio

Un plato es un plato
Miembro del equipo
Webmaster
Respuesta: Pedidos de RPG Maker

Vaya, parece que al descargarme los archivos no aparece ninguna extension con esos nombres;(
¿A qué te refieres? En el zip vienen los dll.
Por cierto, continuemos la resolución de tu duda via mensaje privado para no llenar todo el tema de pedidos con una duda.

EDIT: @KleinStudio, he movido los últimos mensajes de tus respuestas a @Ertincontike a este tema, que encaja mejor que en pedidos.
 

Scraft

Campeón de Kastilia
Tengo intención de introducir nuevas balls pero me surgen varias dudas:

- En que script están los ratios de capturas?
- Se podría incluir una excepción con un array donde almacenas el nombre interno de un Pokémon y así poner otro tipo de rato de la ball si se cumple esta condición?
- Uso el script EliteBattleSystem y los gráficos de las balls son algo diferentes. Donde debo incluir las animaciones de estas nuevas balls?
- Supongo que se pueden modificar los ratios de captura de las balls existentes ¿no?
 

Green Tepig

Paseando por el foro...
¿Cómo puedo meter un texto centrado al inicio del juego tipo:
"Hace millones de años..."(el fondo es negro obviamente)

No sé si me hago entender,

Muchísimas gracias,

Saludos.
 

~Black

¡Estoy de vuelta!
¿Cómo puedo meter un texto centrado al inicio del juego tipo:
"Hace millones de años..."(el fondo es negro obviamente)

No sé si me hago entender,

Muchísimas gracias,

Saludos.
En eventos le das a insertar opciones de texto, le das a centro y sin borde, después insertas el texto que quieres y para quitarlo solamente tienes que ir a opciones de texto y desmarcar lo que marcaste
 

WinDS

Ganador de Ligas
Funcionamiento:


El funcionamiento de este tema es muy simple. El usuario que tenga una duda, simplemente postea y espera a que otro usuario le responda, así de sencillo.


Reglas:


  • Debes leer y seguir las Reglas de Dudas antes de postear, así como las Reglas Generales del Foro.
  • Recuerda incluir en tu pregunta toda la información necesaria, especialmente la ROM base que usas.
  • Este tema debe ser utilizado sólo para dudas/cuestiones rápidas/de respuesta rápida, para problemas o dudas complejas crea un tema en este mismo subforo.
  • Aquí sólamente van dudas relacionadas con el ROM Hacking. Para las dudas relacionadas con el RPG Maker, utiliza este tema.
    También existe un tema similar para dudas relacionadas con el ROM Hacking GBC y otro para el scripting, pero igualmente este tema está permitido este para ello.



Saludos, Flame
Estoy trabajando en mi proyecto y a la hora de los eventos del rival no se como hacerlos, me podrian explicar como hacerlos
 
Hola, he visto algunos proyectos muy interesantes lo cuales me gustaria probar, pero no se si es posible poder jugarlo desde una plataforma como android, tengo supuestamente instalado una app para rpg maker xp, pero por lo pronto todos los proyectos que he visto tienen formato .exe (he jugado muy poco a juegos hechos de esta forma, no se como ira la cosa, o si siempre es asi.
 
Si tienes un ordenador mejor juegalos ahí, ya que la app que probé yo daba bastantes errores, y me imagino que siendo el Pokémon Essentials la base de los juegos pues muchos más, ya que cambia la resolución, algunos tienen .gifs, etc...

Saludos! :)
 

Clara

Mi padre mato a miutu
Hola, he visto algunos proyectos muy interesantes lo cuales me gustaria probar, pero no se si es posible poder jugarlo desde una plataforma como android, tengo supuestamente instalado una app para rpg maker xp, pero por lo pronto todos los proyectos que he visto tienen formato .exe (he jugado muy poco a juegos hechos de esta forma, no se como ira la cosa, o si siempre es asi.
Lo mejor es jugarlos en pc, aunque haya una aplicacion para jurgarlos desde el movil no te lo recomiendo por que los juegos de rpg maker suelen pesar muchisimo por los recursos, y el movil no te daria para mas, ademas la unica aplicacion que emula juegos de rpg maker (al menos que yo conozca) es unicamemte para las versiones 2000 y 2003, cosa que impide la emulacion de juegos hechos en pokemon essentials y las versiones posteriores de rpg maker a excepcion de la ultima.

Salu2
 

minipunky8

Profesional de WaH
Una pregunta, tengo un amigo que sabe usar el rpg maker VX ace, pero no es igual que el xp, se puede hacer un hack con el vx ace igualmente? y que quede visualmente igual/muy parecido.
Gracias :3
 

KleinStudio

Un plato es un plato
Miembro del equipo
Webmaster
Una pregunta, tengo un amigo que sabe usar el rpg maker VX ace, pero no es igual que el xp, se puede hacer un hack con el vx ace igualmente? y que quede visualmente igual/muy parecido.
Gracias :3
Con el RPG Maker no se hackea, se crea directamente.
Pokémon Essentials es la base que se utiliza para los proyectos de RPG Maker de Pokémon, es simplemente un proyecto con todos los scripts necesarios y todo preparado para empezar a crear el juego.
Pokémon Essentials es compatible con RPG Maker XP y si no me equivoco tenía compatibilidad con RGSS2 pero no con VX (y mucho menos VX Ace), por lo que no, o creáis el engine de Pokémon para VX Ace (con conocimientos de programación en RGSS3/Ruby y unos cuantos años) o pasaros a XP que es hasta más fácil de usar que el VX Ace ;)
 
Hola, tengo un problema. En una batalla contra un Eevee, el pokemon usa Sand Attack/Ataque Arena y el juego se cierra.
 

Karlsetin

Leyenda de WaH
Bueno, he estado un poco recio a pedir ayuda pero gracias a Clarita encontré la zona scripts essentials de Pokeco y veo que el tema allá es ya viejo y la pregunta que haría resultaría algo complicada de que me respondan.


Siguiendo todos los pasos expuestos en: Tutorial para agregar opciones a Pokegear

Siguiendo el tutorial y el post #5 que habla sobre la introducción de la Pokedex al Pokegear, seguí todos los pasos allí indicados para lograr el tan deseado resultado...

En principio se puede, al tener la Pokegear se abre el menú y ahí está la Pokedex, pero es al salir de ella que lanza el error que ya he señalado... la verdad no sé que es lo que ocurre y será triste deshacer todo lo hecho porque costó demasiado copiar y pegar u-u

Pokegear dijo:
#===============================================================================
# - Scene_Pokegear
#-------------------------------------------------------------------------------
# Modified By Harshboy
# Modified by Peter O.
# Also Modified By OblivionMew
# Overhauled by Maruno
#===============================================================================
class Scene_Pokegear
#-----------------------------------------------------------------------------
# initialize
#-----------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#-----------------------------------------------------------------------------
# main
#-----------------------------------------------------------------------------
def main
commands=[]
# OPTIONS - If you change these, you should also change update_command below.
@cmdMap=-1
@cmdPhone=-1
@cmdJukebox=-1
@cmdPokedex=-1
commands[@cmdMap=commands.length]=_INTL("MAP")
commands[@cmdPhone=commands.length]=_INTL("PHONE") if $PokemonGlobal.phoneNumbers &&
$PokemonGlobal.phoneNumbers.length>0
commands[@cmdJukebox=commands.length]=_INTL("JUKEBOX")
commands[@cmdPokedex=commands.length]=_INTL("POKEDEX")
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@button=AnimatedBitmap.new("Graphics/Pictures/pokegearButton")
@sprites={}
@sprites["background"] = IconSprite.new(0,0)
femback=pbResolveBitmap(sprintf("Graphics/Pictures/pokegearbgf"))
if $Trainer.gender==1 && femback
@sprites["background"].setBitmap("Graphics/Pictures/pokegearbgf")
else
@sprites["background"].setBitmap("Graphics/Pictures/pokegearbg")
end
@sprites["command_window"] = Window_CommandPokemon.new(commands,160)
@sprites["command_window"].index = @menu_index
@sprites["command_window"].x = Graphics.width
@sprites["command_window"].y = 0
for i in 0...commands.length
x=22
y=142 - (commands.length*24) + (i*48)
@sprites["button#{i}"]=PokegearButton.new(x,y,commands,i,@viewport)
@sprites["button#{i}"].selected=(i==@sprites["command_window"].index)
@sprites["button#{i}"].update
end
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
pbDisposeSpriteHash(@sprites)
end
#-----------------------------------------------------------------------------
# update the scene
#-----------------------------------------------------------------------------
def update
pbUpdateSpriteHash(@sprites)
for i in 0...@sprites["command_window"].commands.length
sprite=@sprites["button#{i}"]
sprite.selected=(i==@sprites["command_window"].index) ? true : false
end
#update command window and the info if it's active
if @sprites["command_window"].active
update_command
return
end
end
#-----------------------------------------------------------------------------
# update the command window
#-----------------------------------------------------------------------------
def update_command
if Input.trigger?(Input::B)
pbPlayCancelSE()
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if @cmdMap>=0 && @sprites["command_window"].index==@cmdMap
pbPlayDecisionSE()
pbShowMap(-1,false)
end
if @cmdPhone>=0 && @sprites["command_window"].index==@cmdPhone
pbPlayDecisionSE()
pbFadeOutIn(99999) {
PokemonPhoneScene.new.start
}
end
if @cmdJukebox>=0 && @sprites["command_window"].index==@cmdJukebox
pbPlayDecisionSE()
$scene = Scene_Jukebox.new
end
if @cmdPokedex>=0 && @sprites["command_window"].index==@cmdPokedex # I copied for menu script
pbPlayDecisionSE()
if DEXDEPENDSONLOCATION
pbFadeOutIn(99999) {
scene=PokemonPokedexScene.new
screen=PokemonPokedex.new(scene)
screen.pbStartScreen
}
else
if $PokemonGlobal.pokedexViable.length==1
$PokemonGlobal.pokedexDex=$PokemonGlobal.pokedexViable[0]
$PokemonGlobal.pokedexDex=-1 if $PokemonGlobal.pokedexDex==$PokemonGlobal.pokedexUnlocked.length-1
pbFadeOutIn(99999) {
scene=PokemonPokedexScene.new
screen=PokemonPokedex.new(scene)
screen.pbStartScreen
}
else
$scene = Scene_PokedexMenu.new # Changed
end
end
end
if @cmdStorage>=0 && @sprites["command_window"].index==@cmdStorage
pbFadeOutIn(99999){
scene=PokemonStorageScene.new
screen=PokemonStorageScreen.new(scene,$PokemonStorage,false) # 3 parameters
screen.pbStartScreen(2)
}
end
return
end
end
end
class PokegearButton < SpriteWrapper
attr_reader :index
attr_reader :name
attr_accessor :selected

def initialize(x,y,name="",index=0,viewport=nil)
super(viewport)
@index=index
@name=name
@selected=false
fembutton=pbResolveBitmap(sprintf("Graphics/Pictures/pokegearButtonf"))
if $Trainer.gender==1 && fembutton
@button=AnimatedBitmap.new("Graphics/Pictures/pokegearButtonf")
else
@button=AnimatedBitmap.new("Graphics/Pictures/pokegearButton")
end
@contents=BitmapWrapper.new(@button.width,@button.height)
self.bitmap=@contents
self.x=x
self.y=y
update
end

def dispose
@button.dispose
@contents.dispose
super
end

def refresh
self.bitmap.clear
self.bitmap.blt(0,0,@button.bitmap,Rect.new(0,0,@button.width,@button.height))
pbSetSystemFont(self.bitmap)
textpos=[ # Name is written on both unselected and selected buttons
[@name,self.bitmap.width/2,10,2,Color.new(0,0,0),Color.new(224,248,160)],
[@name,self.bitmap.width/2,62,2,Color.new(0,0,0),Color.new(224,248,160)]
]
pbDrawTextPositions(self.bitmap,textpos)
icon=sprintf("Graphics/Pictures/pokegear"+@name)
imagepos=[ # Icon is put on both unselected and selected buttons
[icon,18,10,0,0,-1,-1],
[icon,18,62,0,0,-1,-1]
]
pbDrawImagePositions(self.bitmap,imagepos)
end

def update
if self.selected
self.src_rect.set(0,self.bitmap.height/2,self.bitmap.width,self.bitmap.height/2)
else
self.src_rect.set(0,0,self.bitmap.width,self.bitmap.height/2)
end
refresh
super
end
end





Pokedex dijo:
#===============================================================================
# Pokédex menu screen
# * For choosing which region list to view. Only appears when there is more
# than one viable region list to choose from, and if DEXDEPENDSONLOCATION is
# false.
# * Adapted from the Pokégear menu script by Maruno.
#===============================================================================
class Window_DexesList < Window_CommandPokemon
def initialize(commands,width,seen,owned)
@seen=seen
@owned=owned
super(commands,width)
@selarrow=AnimatedBitmap.new("Graphics/Pictures/selarrowwhite")
self.windowskin=nil
end

def drawItem(index,count,rect)
super(index,count,rect)
if index>=0 && index<@seen.length
pbDrawShadowText(self.contents,rect.x+136,rect.y,96,rect.height,
@seen[index],self.baseColor,self.shadowColor,1)
pbDrawShadowText(self.contents,rect.x+200,rect.y,96,rect.height,
@owned[index],self.baseColor,self.shadowColor,1)
end
end
end



class Scene_PokedexMenu
def initialize(menu_index = 0)
@menu_index = menu_index
end

def main
commands=[]; seen=[]; owned=[]
dexnames=pbDexNames
for i in 0...$PokemonGlobal.pokedexViable.length
index=$PokemonGlobal.pokedexViable
if dexnames[index]==nil
commands.push(_INTL("POKéDEX"))
else
if dexnames[index].is_a?(Array)
commands.push(dexnames[index][0])
else
commands.push(dexnames[index])
end
end
index=-1 if index>=$PokemonGlobal.pokedexUnlocked.length-1
seen.push($Trainer.pokedexSeen(index).to_s)
owned.push($Trainer.pokedexOwned(index).to_s)
end
commands.push(_INTL("EXIT"))
@sprites={}
@sprites["background"] = IconSprite.new(0,0)
@sprites["background"].setBitmap("Graphics/Pictures/pokedexMenubg")
@sprites["commands"] = Window_DexesList.new(commands,Graphics.width,seen,owned)
@sprites["commands"].index = @menu_index
@sprites["commands"].x = 0
@sprites["commands"].y = 85
@sprites["commands"].width = Graphics.width-0
@sprites["commands"].height = 176
@sprites["commands"].windowskin=nil
@sprites["commands"].baseColor=Color.new(255,255,255)
@sprites["commands"].shadowColor=Color.new(0,0,0)
@sprites["headings"]=Window_AdvancedTextPokemon.newWithSize(
_INTL("<c3=FFFFFF,000000>SEE<r>OWN</c3>"),160,37,152,64,@viewport)
@sprites["headings"].windowskin=nil
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
pbDisposeSpriteHash(@sprites)
end

def update
pbUpdateSpriteHash(@sprites)
if @sprites["commands"].active
update_command
return
end
end

def update_command
if Input.trigger?(Input::B)
pbPlayCancelSE()
$scene = Scene_Pokegear.new
return
end
if Input.trigger?(Input::C)
case @sprites["commands"].index
when @sprites["commands"].itemCount-1
pbPlayDecisionSE()
$scene = Scene_Pokegear.new
else
pbPlayDecisionSE()
$PokemonGlobal.pokedexDex=$PokemonGlobal.pokedexViable[@sprites["commands"].index]
$PokemonGlobal.pokedexDex=-1 if $PokemonGlobal.pokedexDex==$PokemonGlobal.pokedexUnlocked.length-1
pbFadeOutIn(99999) {
scene=PokemonPokedexScene.new
screen=PokemonPokedex.new(scene)
screen.pbStartScreen
}
end
return
end
end
end



#===============================================================================
# Pokédex main screen
#===============================================================================
class Window_CommandPokemonWhiteArrow < Window_CommandPokemon
def drawCursor(index,rect)
selarrow=AnimatedBitmap.new("Graphics/Pictures/selarrowwhite")
if self.index==index
pbCopyBitmap(self.contents,selarrow.bitmap,rect.x,rect.y)
end
return Rect.new(rect.x+16,rect.y,rect.width-16,rect.height)
end
end



class Window_Pokedex < Window_DrawableCommand
def initialize(x,y,width,height)
@pokeballOwned=AnimatedBitmap.new("Graphics/Pictures/pokedexOwned")
@pokeballSeen=AnimatedBitmap.new("Graphics/Pictures/pokedexSeen")
@commands=[]
super(x,y,width,height)
self.windowskin=nil
self.baseColor=Color.new(255,255,255)
self.shadowColor=Color.new(0,0,0)
end

def drawCursor(index,rect)
selarrow=AnimatedBitmap.new("Graphics/Pictures/pokedexSel")
if self.index==index
pbCopyBitmap(self.contents,selarrow.bitmap,rect.x,rect.y)
end
return Rect.new(rect.x+16,rect.y,rect.width-16,rect.height)
end

def commands=(value)
@commands=value
refresh
end

def dispose
@pokeballOwned.dispose
@pokeballSeen.dispose
super
end

def species
return @commands.length==0 ? 0 : @commands[self.index][0]
end

def itemCount
return @commands.length
end

def drawItem(index,count,rect)
return if index >= self.top_row + self.page_item_max
rect=drawCursor(index,rect)
indexNumber=@commands[index][4]
species=@commands[index][0]
if $Trainer.seen[species]
if $Trainer.owned[species]
pbCopyBitmap(self.contents,@pokeballOwned.bitmap,rect.x-4,rect.y+18)
else
pbCopyBitmap(self.contents,@pokeballSeen.bitmap,rect.x-4,rect.y+18)
end
text=_ISPRINTF("{1:03d}{2:s} {3:s}",(@commands[index][5]) ? indexNumber-1 : indexNumber," ",@commands[index][1])
else
text=_ISPRINTF("{1:03d}\n ----------",(@commands[index][5]) ? indexNumber-1 : indexNumber)
end
pbDrawShadowText(self.contents,rect.x+16,rect.y+6,rect.width,rect.height,text,
self.baseColor,self.shadowColor)
overlapCursor=drawCursor(index-1,itemRect(index-1))
end
end



class Window_ComplexCommandPokemon < Window_DrawableCommand
attr_reader :commands

def initialize(commands,width=nil)
@starting=true
@commands=commands
dims=[]
getAutoDims(commands,dims,width)
super(0,0,dims[0],dims[1])
@selarrow=AnimatedBitmap.new("Graphics/Pictures/selarrowwhite")
@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 itemCount
mx=0
i=0; loop do break unless i<@commands.length
mx+=1+@commands[i+1].length
i+=2
end
return mx
end

def drawItem(index,count,rect)
command=indexToCommand(index)
return if command[0]<0
text=getText(@commands,index)
if command[1]<0
pbDrawShadowText(self.contents,rect.x+32,rect.y,rect.width,rect.height,text,
self.baseColor,self.shadowColor)
else
rect=drawCursor(index,rect)
pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,text,
self.baseColor,self.shadowColor)
end
end
end



class PokemonPokedexScene
def pbUpdate
pbUpdateSpriteHash(@sprites)
end

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 is currently set to the
# return value of pbGetCurrentRegion, and thus will change according to the
# current map's MapPosition metadata setting.
def pbGetPokedexRegion
if DEXDEPENDSONLOCATION
region=pbGetCurrentRegion
region=-1 if region>=$PokemonGlobal.pokedexUnlocked.length-1
return region
else
return $PokemonGlobal.pokedexDex # National Dex -1, regional dexes 0 etc.
end
end

# Determines which index of the array $PokemonGlobal.pokedexIndex to save the
# "last viewed species" in. All regional dexes come first in order, then the
# National Dex at the end.
def pbGetSavePositionIndex
index=pbGetPokedexRegion
if index==-1 # National Dex
index=$PokemonGlobal.pokedexUnlocked.length-1 # National Dex index comes
end # after regional Dex indices
return index
end

def pbStartScene
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@sprites["pokedex"]=Window_Pokedex.new(110,0,210,268)
@sprites["pokedex"].viewport=@viewport
@sprites["dexentry"]=IconSprite.new(0,0,@viewport)
@sprites["dexentry"].setBitmap(_INTL("Graphics/Pictures/pokedexEntry"))
@sprites["dexentry"].visible=false
@sprites["overlay"]=BitmapSprite.new(Graphics.width,Graphics.height,@viewport)
pbSetSystemFont(@sprites["overlay"].bitmap)
@sprites["overlay"].x=0
@sprites["overlay"].y=0
@sprites["overlay"].visible=false
@sprites["searchtitle"]=Window_AdvancedTextPokemon.newWithSize("",2,-11,Graphics.width,64,@viewport)
@sprites["searchtitle"].windowskin=nil
@sprites["searchtitle"].baseColor=Color.new(255,255,255)
@sprites["searchtitle"].shadowColor=Color.new(0,0,0)
@sprites["searchtitle"].text=_ISPRINTF("<ac>SEARCH</ac>")
@sprites["searchtitle"].visible=false
@sprites["searchlist"]=Window_ComplexCommandPokemon.newEmpty(0,21,304,160,@viewport)
@sprites["searchlist"].baseColor=Color.new(255,255,255)
@sprites["searchlist"].shadowColor=Color.new(0,0,0)
@sprites["searchlist"].visible=false
@sprites["auxlist"]=Window_CommandPokemonWhiteArrow.newEmpty(0,165,304,128,@viewport)
@sprites["auxlist"].baseColor=Color.new(255,255,255)
@sprites["auxlist"].shadowColor=Color.new(0,0,0)
@sprites["auxlist"].visible=false
@sprites["messagebox"]=Window_UnformattedTextPokemon.newWithSize("",16,288,304,128,@viewport)
@sprites["messagebox"].baseColor=Color.new(255,255,255)
@sprites["messagebox"].shadowColor=Color.new(0,0,0)
@sprites["messagebox"].visible=false
@sprites["messagebox"].letterbyletter=false
@sprites["dexname"]=Window_AdvancedTextPokemon.newWithSize("",-96,133,Graphics.width,64,@viewport)
@sprites["dexname"].windowskin=nil
@sprites["dexname"].baseColor=Color.new(255,255,255)
@sprites["dexname"].shadowColor=Color.new(0,0,0)
@sprites["species"]=Window_AdvancedTextPokemon.newWithSize("",320,288,160,64,@viewport)
@sprites["species"].windowskin=nil
@sprites["species"].baseColor=Color.new(255,255,255)
@sprites["species"].shadowColor=Color.new(0,0,0)
@sprites["seen"]=Window_AdvancedTextPokemon.newWithSize("",-10,165,152,64,@viewport)
@sprites["seen"].windowskin=nil
@sprites["seen"].baseColor=Color.new(255,255,255)
@sprites["seen"].shadowColor=Color.new(0,0,0)
@sprites["owned"]=Window_AdvancedTextPokemon.newWithSize("",-10,197,152,64,@viewport)
@sprites["owned"].windowskin=nil
@sprites["owned"].baseColor=Color.new(255,255,255)
@sprites["owned"].shadowColor=Color.new(0,0,0)
addBackgroundPlane(@sprites,"searchbg",_INTL("pokedexSearchbg"),@viewport)
@sprites["searchbg"].visible=false
@searchResults=false
=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",@viewport)
elsif pbGetPokedexRegion==0 # Using first regional Pokédex
addBackgroundPlane(@sprites,"background","pokedexbg_regional",@viewport)
end
=end
addBackgroundPlane(@sprites,"background",_INTL("pokedexbg"),@viewport)
@sprites["slider"]=IconSprite.new(Graphics.width-12,10,@viewport)
@sprites["slider"].setBitmap(sprintf("Graphics/Pictures/pokedexSlider"))
@sprites["icon"]=IconSprite.new(62,72,@viewport)
pbRefreshDexList($PokemonGlobal.pokedexIndex[pbGetSavePositionIndex])
pbDeactivateWindows(@sprites)
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] : ""
pbActivateWindow(@sprites,"auxlist"){
loop do
Graphics.update
Input.update
oldindex=auxlist.index
pbUpdate
if auxlist.index!=oldindex && helptexts
messagebox.text=helptexts[auxlist.index]
end
if Input.trigger?(Input::B)
ret=selitem
pbPlayCancelSE()
break
end
if Input.trigger?(Input::C)
ret=auxlist.index
pbPlayDecisionSE()
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
# If no regional species defined, use National Pokédex order
for i in 1..PBSpecies.maxValue
regionalSpecies.push(i)
end
end
for i in 1...regionalSpecies.length
nationalSpecies=regionalSpecies
if pbCanAddForModeList?($PokemonGlobal.pokedexMode,nationalSpecies)
pbDexDataOffset(dexdata,nationalSpecies,33)
height=dexdata.fgetw
weight=dexdata.fgetw
# Pushing national species, name, height, weight, index number
shift=DEXINDEXOFFSETS.include?(region)
dexlist.push([nationalSpecies,
PBSpecies.getName(nationalSpecies),height,weight,i,shift])
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[0]]
dexlist=nil
i+=1
end
i=dexlist.length-1; loop do break unless i>=0
break if !dexlist || $Trainer.seen[dexlist[0]]
dexlist=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] ? a[4]<=>b[4] : a[1]<=>b[1]}
when 2 # Heaviest mode
dexlist.sort!{|a,b| a[3]==b[3] ? a[4]<=>b[4] : b[3]<=>a[3]}
when 3 # Lightest mode
dexlist.sort!{|a,b| a[3]==b[3] ? a[4]<=>b[4] : a[3]<=>b[3]}
when 4 # Tallest mode
dexlist.sort!{|a,b| a[2]==b[2] ? a[4]<=>b[4] : b[2]<=>a[2]}
when 5 # Smallest mode
dexlist.sort!{|a,b| a[2]==b[2] ? a[4]<=>b[4] : a[2]<=>b[2]}
end
dexname=_INTL("POKéDEX")
if $PokemonGlobal.pokedexUnlocked.length>1
thisdex=pbDexNames[pbGetSavePositionIndex]
if thisdex!=nil
if thisdex.is_a?(Array)
dexname=thisdex[0]
else
dexname=thisdex
end
end
end
if !@searchResults
@sprites["seen"].text=_ISPRINTF("SEE:<r>{1:d}",$Trainer.pokedexSeen(pbGetPokedexRegion))
@sprites["owned"].text=_ISPRINTF("OWN:<r>{1:d}",$Trainer.pokedexOwned(pbGetPokedexRegion))
@sprites["dexname"].text=_ISPRINTF("<ac>{1:s}</ac>",dexname)
else
seenno=0
ownedno=0
for i in dexlist
seenno+=1 if $Trainer.seen[i[0]]
ownedno+=1 if $Trainer.owned[i[0]]
end
@sprites["seen"].text=_ISPRINTF("SEE:<r>{1:d}",seenno)
@sprites["owned"].text=_ISPRINTF("OWN:<r>{1:d}",ownedno)
@sprites["dexname"].text=_ISPRINTF("<ac>{1:s}</ac>",dexname)
end
@dexlist=dexlist
@sprites["pokedex"].commands=@dexlist
@sprites["pokedex"].index=index
@sprites["pokedex"].refresh
# Draw the slider
ycoord=10
if @sprites["pokedex"].itemCount>1
ycoord+=242.0 * @sprites["pokedex"].index/(@sprites["pokedex"].itemCount-1)
end
@sprites["slider"].y=ycoord
iconspecies=@sprites["pokedex"].species
iconspecies=0 if !$Trainer.seen[iconspecies]
setIconBitmap(pbPokemonBitmapFile(iconspecies,false))
if iconspecies>0
@sprites["species"].text=_ISPRINTF("<ac>{1:s}</ac>",PBSpecies.getName(iconspecies))
else
@sprites["species"].text=_ISPRINTF("")
end
end

def pbSearchDexList(params)
$PokemonGlobal.pokedexMode=params[4]
dexlist=pbGetDexList()
dexdata=pbOpenDexData()
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|
next false if !$Trainer.seen[item[0]]
firstChar=item[1][0,1]
next scanNameCommand.any? { |v| v==firstChar }
}
end
if params[1]!=0 # Filter by color
dexlist=dexlist.find_all {|item|
next false if !$Trainer.seen[item[0]]
pbDexDataOffset(dexdata,item[0],6)
color=dexdata.fgetb
next color==params[1]-1
}
end
if params[2]!=0 || params[3]!=0 # Filter by type
typeCommands=[-1]
for i in 0..PBTypes.maxValue
if !PBTypes.isPseudoType?(i)
typeCommands.push(i) # Add type
end
end
stype1=typeCommands[params[2]]
stype2=typeCommands[params[3]]
dexlist=dexlist.find_all {|item|
next false if !$Trainer.owned[item[0]]
pbDexDataOffset(dexdata,item[0],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
dexlist=dexlist.find_all {|item| # Remove all unseen species from the results
next ($Trainer.seen[item[0]])
}
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("SORT"),[
_ISPRINTF("ORDER: {1:s}",@orderCommands[params[5]]),
_INTL("START SORT")
]
]
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 sort."),
]
]
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(255,255,255)
shadowcolor=Color.new(0,0,0)
indexNumber=pbGetRegionalNumber(pbGetPokedexRegion(),species)
indexNumber=species if indexNumber==0
indexNumber-=1 if DEXINDEXOFFSETS.include?(pbGetPokedexRegion)
textpos=[
[_ISPRINTF("{1:03d}",indexNumber," ",PBSpecies),
64,120,0,Color.new(255,255,255),Color.new(0,0,0)],
[_ISPRINTF("{1:s}",PBSpecies.getName(species)),
128,40,0,Color.new(255,255,255),Color.new(0,0,0)],
[sprintf(_INTL("HT")),134,104,0,basecolor,shadowcolor],
[sprintf(_INTL("WT")),134,136,0,basecolor,shadowcolor]
]
if $Trainer.owned[species]
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,species,8)
type1=dexdata.fgetb
type2=dexdata.fgetb
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}",kind),128,72,0,basecolor,shadowcolor])
if pbGetCountry()==0xF4 # If the user is in the United States
textpos.push([_ISPRINTF("{1:d}'{2:02d}"",inches/12,inches%12),304,104,1,basecolor,shadowcolor])
textpos.push([_ISPRINTF("{1:4.1f} lbs.",pounds/10.0),304,136,1,basecolor,shadowcolor])
else
textpos.push([_ISPRINTF("{1:.1f} m",height/10.0),304,104,1,basecolor,shadowcolor])
textpos.push([_ISPRINTF("{1:.1f} kg",weight/10.0),304,136,1,basecolor,shadowcolor])
end
drawTextEx(@sprites["overlay"].bitmap,
16,168,Graphics.width-(42*2),3,dexentry,basecolor,shadowcolor)
footprintfile=pbPokemonFootprintFile(species)
if footprintfile
footprint=BitmapCache.load_bitmap(footprintfile)
@sprites["overlay"].bitmap.blt(272,16,footprint,footprint.rect)
footprint.dispose
end
pbDrawImagePositions(@sprites["overlay"].bitmap,[["Graphics/Pictures/pokedexOwned",8,130,0,0,-1,-1]])
typebitmap=AnimatedBitmap.new(_INTL("Graphics/Pictures/pokedexTypes"))
type1rect=Rect.new(0,type1*28,64,28)
type2rect=Rect.new(0,type2*28,64,28)
@sprites["overlay"].bitmap.blt(128,10,typebitmap.bitmap,type1rect)
@sprites["overlay"].bitmap.blt(192,10,typebitmap.bitmap,type2rect) if type1!=type2
typebitmap.dispose
else
textpos.push([_INTL("?????"),128,72,0,basecolor,shadowcolor])
if pbGetCountry()==0xF4 # If the user is in the United States
textpos.push([_INTL("???'??""),304,104,1,basecolor,shadowcolor])
textpos.push([_INTL("????.? lbs."),304,136,1,basecolor,shadowcolor])
else
textpos.push([_INTL("????.? m"),304,104,1,basecolor,shadowcolor])
textpos.push([_INTL("????.? kg"),304,136,1,basecolor,shadowcolor])
end
end
pbDrawTextPositions(@sprites["overlay"].bitmap,textpos)
pkmnbitmap=AnimatedBitmap.new(pbPokemonBitmapFile(species,false))
@sprites["overlay"].bitmap.blt(
-2-(pkmnbitmap.width-128)/2,
8-(pkmnbitmap.height-128)/2,
pkmnbitmap.bitmap,pkmnbitmap.bitmap.rect)
pkmnbitmap.dispose
pbPlayCry(species)
end

def pbStartDexEntryScene(species) # Used only when capturing a new species
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@sprites["dexentry"]=IconSprite.new(0,0,@viewport)
@sprites["dexentry"].setBitmap(_INTL("Graphics/Pictures/pokedexentry"))
@sprites["dexentry"].visible=false
@sprites["overlay"]=BitmapSprite.new(Graphics.width,Graphics.height,@viewport)
pbSetSystemFont(@sprites["overlay"].bitmap)
@sprites["overlay"].x=0
@sprites["overlay"].y=0
@sprites["overlay"].visible=false
pbChangeToDexEntry(species)
pbDrawImagePositions(@sprites["overlay"].bitmap,[[_INTL("Graphics/Pictures/pokedexBlank"),0,272,0,0,-1,-1]])
pbFadeInAndShow(@sprites)
end

def pbMiddleDexEntryScene # Used only when capturing a new species
pbActivateWindow(@sprites,nil){
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])
pbFadeInAndShow(@sprites)
curindex=index
page=1
newpage=0
ret=0
pbActivateWindow(@sprites,nil){
loop do
Graphics.update if page==1
Input.update
pbUpdate
if Input.trigger?(Input::B) || ret==1
if page==1
pbPlayCancelSE()
pbFadeOutAndHide(@sprites)
end
break
elsif Input.trigger?(Input::UP) || ret==8
nextindex=-1
i=curindex-1; loop do break unless i>=0
if $Trainer.seen[@dexlist[0]]
nextindex=i
break
end
i-=1
end
if nextindex>=0
curindex=nextindex
newpage=page
end
pbPlayCursorSE() if newpage>1
elsif Input.trigger?(Input::DOWN) || ret==2
nextindex=-1
for i in curindex+1...@dexlist.length
if $Trainer.seen[@dexlist[0]]
nextindex=i
break
end
end
if nextindex>=0
curindex=nextindex
newpage=page
end
pbPlayCursorSE() if newpage>1
elsif Input.trigger?(Input::LEFT) || ret==4
newpage=page-1 if page>1
pbPlayCursorSE() if newpage>1
elsif Input.trigger?(Input::RIGHT) || ret==6
newpage=page+1 if page<3
pbPlayCursorSE() if newpage>1
elsif Input.trigger?(Input::A)
pbPlayCry(@dexlist[curindex][0])
end
ret=0
if newpage>0
page=newpage
newpage=0
listlimits=0
listlimits+=1 if curindex==0 # At top of list
listlimits+=2 if curindex==@dexlist.length-1 # At bottom of list
case page
when 1 # Show entry
pbChangeToDexEntry(@dexlist[curindex][0])
when 2 # Show nest
region=-1
if !DEXDEPENDSONLOCATION
dexnames=pbDexNames
if dexnames[pbGetSavePositionIndex].is_a?(Array)
region=dexnames[pbGetSavePositionIndex][1]
end
end
scene=PokemonNestMapScene.new
screen=PokemonNestMap.new(scene)
ret=screen.pbStartScreen(@dexlist[curindex][0],region,listlimits)
when 3 # Show forms
scene=PokedexFormScene.new
screen=PokedexForm.new(scene)
ret=screen.pbStartScreen(@dexlist[curindex][0],listlimits)
end
end
end
}
$PokemonGlobal.pokedexIndex[pbGetSavePositionIndex]=curindex if !@searchResults
@sprites["pokedex"].index=curindex
@sprites["pokedex"].refresh
iconspecies=@sprites["pokedex"].species
iconspecies=0 if !$Trainer.seen[iconspecies]
setIconBitmap(pbPokemonBitmapFile(iconspecies,false))
if iconspecies>0
@sprites["species"].text=_ISPRINTF("<ac>{1:s}</ac>",PBSpecies.getName(iconspecies))
else
@sprites["species"].text=_ISPRINTF("")
end
# Update the slider
ycoord=10
if @sprites["pokedex"].itemCount>1
ycoord+=242.0 * @sprites["pokedex"].index/(@sprites["pokedex"].itemCount-1)
end
@sprites["slider"].y=ycoord
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 heaviest to lightest."),
_INTL("Owned POKéMON are listed from lightest to heaviest."),
_INTL("Owned POKéMON are listed from tallest to smallest."),
_INTL("Owned POKéMON are listed from smallest to tallest.")
]
@sprites["searchlist"].index=1
searchlist=@sprites["searchlist"]
@sprites["messagebox"].visible=true
@sprites["auxlist"].visible=true
@sprites["searchlist"].visible=true
@sprites["searchbg"].visible=true
@sprites["searchtitle"].visible=true
pbRefreshDexSearch(params)
pbFadeInAndShow(@sprites)
pbActivateWindow(@sprites,"searchlist"){
loop do
Graphics.update
Input.update
oldindex=searchlist.index
pbUpdate
if searchlist.index==0
if oldindex==9 && Input.trigger?(Input::DOWN)
searchlist.index=1
elsif oldindex==1 && Input.trigger?(Input::UP)
searchlist.index=9
else
searchlist.index=1
end
elsif searchlist.index==7
if oldindex==8
searchlist.index=6
else
searchlist.index=8
end
end
if searchlist.index!=oldindex
pbRefreshDexSearch(params)
end
if Input.trigger?(Input::C)
pbPlayDecisionSE()
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]
setIconBitmap(pbPokemonBitmapFile(iconspecies,false))
if iconspecies>0
@sprites["species"].text=_ISPRINTF("<ac>{1:s}</ac>",PBSpecies.getName(iconspecies))
else
@sprites["species"].text=_ISPRINTF("")
end
seenno=0
ownedno=0
for i in dexlist
seenno+=1 if $Trainer.seen[i[0]]
ownedno+=1 if $Trainer.owned[i[0]]
end
@sprites["seen"].text=_ISPRINTF("SEE:<r>{1:d}",seenno)
@sprites["owned"].text=_ISPRINTF("OWN:<r>{1:d}",ownedno)
dexname=_INTL("POKéDEX")
if $PokemonGlobal.pokedexUnlocked.length>1
thisdex=pbDexNames[pbGetSavePositionIndex]
if thisdex!=nil
if thisdex.is_a?(Array)
dexname=thisdex[0]
else
dexname=thisdex
end
end
end
@sprites["dexname"].text=_ISPRINTF("<ac>{1:s}</ac>",dexname)
# Update the slider
ycoord=10
if @sprites["pokedex"].itemCount>1
ycoord+=242.0 * @sprites["pokedex"].index/(@sprites["pokedex"].itemCount-1)
end
@sprites["slider"].y=ycoord
@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]
$PokemonGlobal.pokedexIndex[pbGetSavePositionIndex]=0
pbRefreshDexList
break
end
elsif Input.trigger?(Input::B)
pbPlayCancelSE()
break
end
end
}
pbFadeOutAndHide(@sprites)
pbFadeInAndShow(@sprites,oldsprites)
Input.update
return 0
end

def pbCloseSearch
oldsprites=pbFadeOutAndHide(@sprites)
@searchResults=false
$PokemonGlobal.pokedexMode=0
pbRefreshDexList($PokemonGlobal.pokedexIndex[pbGetSavePositionIndex])
pbFadeInAndShow(@sprites,oldsprites)
end

def pbPokedex
pbActivateWindow(@sprites,"pokedex"){
loop do
Graphics.update
Input.update
oldindex=@sprites["pokedex"].index
pbUpdate
if oldindex!=@sprites["pokedex"].index
$PokemonGlobal.pokedexIndex[pbGetSavePositionIndex]=@sprites["pokedex"].index if !@searchResults
iconspecies=@sprites["pokedex"].species
iconspecies=0 if !$Trainer.seen[iconspecies]
setIconBitmap(pbPokemonBitmapFile(iconspecies,false))
if iconspecies>0
@sprites["species"].text=_ISPRINTF("<ac>{1:s}</ac>",PBSpecies.getName(iconspecies))
else
@sprites["species"].text=_ISPRINTF("")
end
# Update the slider
ycoord=10
if @sprites["pokedex"].itemCount>1
ycoord+=242.0 * @sprites["pokedex"].index/(@sprites["pokedex"].itemCount-1)
end
@sprites["slider"].y=ycoord
end
if Input.trigger?(Input::B)
pbPlayCancelSE()
if @searchResults
pbCloseSearch
else
break
end
elsif Input.trigger?(Input::C)
if $Trainer.seen[@sprites["pokedex"].species]
pbPlayDecisionSE()
pbDexEntry(@sprites["pokedex"].index)
end
elsif Input.trigger?(Input::F5)
pbPlayDecisionSE()
pbDexSearch
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


 

Kaiser de Emperana

Called in hand
Bueno, he estado un poco recio a pedir ayuda pero gracias a Clarita encontré la zona scripts essentials de Pokeco y veo que el tema allá es ya viejo y la pregunta que haría resultaría algo complicada de que me respondan.


Siguiendo todos los pasos expuestos en: Tutorial para agregar opciones a Pokegear

Siguiendo el tutorial y el post #5 que habla sobre la introducción de la Pokedex al Pokegear, seguí todos los pasos allí indicados para lograr el tan deseado resultado...

En principio se puede, al tener la Pokegear se abre el menú y ahí está la Pokedex, pero es al salir de ella que lanza el error que ya he señalado... la verdad no sé que es lo que ocurre y será triste deshacer todo lo hecho porque costó demasiado copiar y pegar u-u


Siendo sincero, no conozco casi nada el código de essentials. Pero si aporta de algo, bueno...

El error que te está tirando el rpg maker es en la línea 185 del script del Pokegear, porque está intentando comparar una variable que no tiene ningún valor asignado con un número.
Sería en:

if @cmdStorage>=0 && @sprites["command_window"].index==@cmdStorage
pbFadeOutIn(99999){
scene=PokemonStorageScene.new
screen=PokemonStorageScreen.new(scene,$PokemonStor age,false) # 3 parameters
screen.pbStartScreen(2)
}
end
Lo que no le encuentro mucho sentido es que el código está armado como si en el menú del pokegear debiera haber un botón que abre las cajas de almacenamiento pokemon.

Decís que estuviste haciendo copy paste. ¿Estás seguro de que no cometiste algún error y copiaste alguna parte de código extra o te falta alguna otra parte?

No estoy seguro, porque no me puse a analizar detenidamente todo el script, pero si ponés como comentario esa parte que te señale, es probable que el error desaparezca.

De todos modos. ¿Qué es exactamente lo que hiciste? ¿Modificaste el script de a partes? ¿Copiaste el script completo? ¿O qué exactamente?
 

Karlsetin

Leyenda de WaH
Siendo sincero, no conozco casi nada el código de essentials. Pero si aporta de algo, bueno...

El error que te está tirando el rpg maker es en la línea 185 del script del Pokegear, porque está intentando comparar una variable que no tiene ningún valor asignado con un número.
Sería en:



Lo que no le encuentro mucho sentido es que el código está armado como si en el menú del pokegear debiera haber un botón que abre las cajas de almacenamiento pokemon.

Decís que estuviste haciendo copy paste. ¿Estás seguro de que no cometiste algún error y copiaste alguna parte de código extra o te falta alguna otra parte?

No estoy seguro, porque no me puse a analizar detenidamente todo el script, pero si ponés como comentario esa parte que te señale, es probable que el error desaparezca.

De todos modos. ¿Qué es exactamente lo que hiciste? ¿Modificaste el script de a partes? ¿Copiaste el script completo? ¿O qué exactamente?
Pues respecto al link copié lo que salía exactamente donde decía :/ por lo que no sabría como funciona aquello. Además es ajeno a mi el conocimiento total sobre scripting, por lo que tampoco se me haría sencillo entenderlo a grandes rasgos. Pero gracias por intentar ayudar
 

nKuroo

Profesional de WaH
Buenas ^^
La duda que tengo es, ¿cómo se cambia la font y el color de la barra de vida en batalla?
 

Kaiser de Emperana

Called in hand
Pues respecto al link copié lo que salía exactamente donde decía :/ por lo que no sabría como funciona aquello. Además es ajeno a mi el conocimiento total sobre scripting, por lo que tampoco se me haría sencillo entenderlo a grandes rasgos. Pero gracias por intentar ayudar
Me puse a ver el tema de pokecommunity (perdón lo hubiera hecho anoche pero andaba con mucha pereza xD). Es lo que me parecía, el tema hablaba de agregar dos funciones nuevas, ver el almacenamiento pokemon y ver la pokedex.
Vos hiciste el primero a medias y por eso te da error.

Si queres poder ver el almacenamiento desde el pokegear lo que tenes que hacer es poner al principio del script:
@cmdStorage=-1
commands[@cmdStorage=commands.length]=_INTL("STORAGE")
Si no te interesa, lo que tenes que hacer es borrar:
if @cmdStorage>=0 && @sprites["command_window"].index==@cmdStorage
pbFadeOutIn(99999){
scene=PokemonStorageScene.new
screen=PokemonStorageScreen.new(scene,$PokemonStorage,false) # 3 parameters
screen.pbStartScreen(2)
}
end
Y todos los cambios que hayas hecho en PokemonStorage.

Suerte!
 
Estado
Cerrado para nuevas respuestas.
Arriba