Update 6.8

This commit is contained in:
chardub
2026-07-10 15:42:06 -04:00
parent 5b85e72cb2
commit 6a6f126a18
7871 changed files with 493193 additions and 224825 deletions
@@ -58,26 +58,27 @@ def pbEditMetadata(map_id = 0)
# Construct metadata hash
metadata_hash = {
:id => map_id,
:outdoor_map => data[0],
:announce_location => data[1],
:can_bicycle => data[2],
:always_bicycle => data[3],
:teleport_destination => data[4],
:weather => data[5],
:town_map_position => data[6],
:dive_map_id => data[7],
:dark_map => data[8],
:safari_map => data[9],
:snap_edges => data[10],
:random_dungeon => data[11],
:battle_background => data[12],
:wild_battle_BGM => data[13],
:trainer_battle_BGM => data[14],
:wild_victory_ME => data[15],
:trainer_victory_ME => data[16],
:wild_capture_ME => data[17],
:town_map_size => data[18],
:battle_environment => data[19]
:outdoor_map => data[0],
:announce_location => data[1],
:can_bicycle => data[2],
:always_bicycle => data[3],
:teleport_destination => data[4],
:weather => data[5],
:town_map_position => data[6],
:dive_map_id => data[7],
:dark_map => data[8],
:safari_map => data[9],
:snap_edges => data[10],
:random_dungeon => data[11],
:battle_background => data[12],
:battle_background_water => data[13],
:wild_battle_BGM => data[14],
:trainer_battle_BGM => data[15],
:wild_victory_ME => data[16],
:trainer_victory_ME => data[17],
:wild_capture_ME => data[18],
:town_map_size => data[19],
:battle_environment => data[20]
}
# Add metadata's data to records
GameData::MapMetadata.register(metadata_hash)
@@ -45,8 +45,8 @@ class SpritePositioner
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99999
battlebg = "Graphics/Battlebacks/battlebg/indoorc"
enemybase = "Graphics/Battlebacks/enemybase/indoorc"
playerbase = "Graphics/Battlebacks/playerbase/indoorc"
enemybase = "Graphics/Battlebacks/base/indoorc"
playerbase = "Graphics/Battlebacks/base/indoorc"
@sprites["battle_bg"] = AnimatedPlane.new(@viewport)
@sprites["battle_bg"].setBitmap(battlebg)
@sprites["battle_bg"].z = 0
+116 -5
View File
@@ -126,15 +126,15 @@ def pbChooseSpeciesList(default = nil,max=nil)
max = max ? max : PBSpecies.maxValue
params.setRange(1,max)
params.setInitialValue(defaultNumber)
dexNum = pbMessageChooseNumber("dex number?",params)
dexNum = pbMessageChooseNumber(_INTL("dex number?"),params)
return GameData::Species.get(dexNum)
end
def pbChooseSpeciesTextList(default = nil)
commands = []
for i in 1..NB_POKEMON
for i in 1..NB_POKEMON-4
species = GameData::Species.get(i)
commands.push([species.id_number, species.real_name, species.id])
commands.push([species.id_number, species.name, species.id])
end
return pbChooseList(commands, default, nil, -1)
end
@@ -143,7 +143,7 @@ end
def pbChooseSpeciesFormList(default = nil)
commands = []
GameData::Species.each do |s|
name = (s.form == 0) ? s.real_name : sprintf("%s_%d", s.real_name, s.form)
name = (s.form == 0) ? s.real_name : sprintf("%s_%d", s.name, s.form)
commands.push([s.id_number, name, s.id])
end
return pbChooseList(commands, default, nil, -1)
@@ -156,7 +156,7 @@ end
def pbChooseMoveList(default = nil)
commands = []
GameData::Move.each { |i| commands.push([i.id_number, i.real_name, i.id]) }
return pbChooseList(commands, default, nil, 1)
return pbChooseListWithFilter(commands,0,nil,1,0,0,"Select a move",:longest_value)
end
def pbChooseMoveListForSpecies(species, defaultMoveID = nil)
@@ -386,6 +386,117 @@ def pbChooseList(commands, default = 0, cancelValue = -1, sortType = 1)
return itemID
end
def pbChooseListWithFilter(commands, default = 0, cancelValue = -1, sortType = 1,
window_x = 0, window_y = 0, filter_default_text = "",
width_mode = :filter_text)
filter_height = 60
case width_mode
when :longest_value # Measure the longest display string from commands
longest = commands.map { |c|
sortType <= 0 ? sprintf("%03d: %s", c[0], c[1]) : c[1]
}.max_by(&:length) || ""
# Fall back to filter_default_text if commands is empty
reference_text = longest.length >= filter_default_text.length ? longest : filter_default_text
else # :filter_text (default)
reference_text = filter_default_text
end
filterwin = Window_UnformattedTextPokemon.newWithSize(
reference_text, window_x, window_y, Graphics.width / 2, filter_height
)
filterwin.setTextToFit(reference_text)
filterwin.z = 99999
cmdwin = pbListWindow([])
cmdwin.x = window_x
cmdwin.y = window_y + filter_height
cmdwin.width = filterwin.width
cmdwin.height = Graphics.height - window_y - filter_height
cmdwin.z = 99999
cmdwin.active = true
Input.text_input = true
filterText = ""
itemID = default
itemIndex = 0
sortMode = (sortType >= 0) ? sortType : 0
needsRefresh = true
filteredCommands = []
loop do
if needsRefresh
# Sort
if sortMode == 0
commands.sort! { |a, b| a[0] <=> b[0] }
elsif sortMode == 1
commands.sort! { |a, b| a[1] <=> b[1] }
end
# Filter
filteredCommands = filterText.empty? ? commands.dup : commands.select { |c|
c[1].downcase.include?(filterText.downcase)
}
# Rebuild display strings
realcommands = filteredCommands.map do |command|
sortType <= 0 ? sprintf("%03d: %s", command[0], command[1]) : command[1]
end
# Restore selected index
itemIndex = 0
if itemID.is_a?(Symbol)
filteredCommands.each_with_index { |c, i| itemIndex = i if c[2] == itemID }
elsif itemID && itemID > 0
filteredCommands.each_with_index { |c, i| itemIndex = i if c[0] == itemID }
end
cmdwin.commands = realcommands
cmdwin.index = itemIndex
filterwin.text = filterText.empty? ? filter_default_text : "#{filterText}"
needsRefresh = false
end
Graphics.update
Input.update
cmdwin.update
# Typing
typed = Input.gets
if typed && !typed.empty?
filterText += typed
itemID = -1 # reset selection when filter changes
needsRefresh = true
next
end
if Input.triggerex?(:BACKSPACE) && filterText.length > 0
filterText = filterText[0...-1]
itemID = -1
needsRefresh = true
next
end
if Input.trigger?(Input::ACTION) && sortType < 0
itemID = filteredCommands[cmdwin.index][2] || filteredCommands[cmdwin.index][0]
sortMode = (sortMode + 1) % 2
needsRefresh = true
elsif Input.trigger?(Input::BACK)
itemID = cancelValue
break
elsif Input.trigger?(Input::USE)
itemID = filteredCommands.empty? ? cancelValue : (filteredCommands[cmdwin.index][2] || filteredCommands[cmdwin.index][0])
break
end
end
Input.text_input = false
filterwin.dispose
cmdwin.dispose
return itemID
end
def pbCommandsSortable(cmdwindow,commands,cmdIfCancel,defaultindex=-1,sortable=false)
cmdwindow.commands = commands
cmdwindow.index = defaultindex if defaultindex >= 0
@@ -438,13 +438,13 @@ class Slider < UIControl
color=Color.new(120,120,120)
bitmap.fill_rect(x,y,width,height,Color.new(0,0,0,0))
size=bitmap.text_size(self.label).width
leftarrows=bitmap.text_size(_INTL(" << "))
leftarrows=bitmap.text_size(" << ")
numbers=bitmap.text_size(" XXXX ").width
rightarrows=bitmap.text_size(_INTL(" >> "))
rightarrows=bitmap.text_size(" >> ")
bitmap.font.color=color
shadowtext(bitmap,x,y,size,height,self.label)
x+=size
shadowtext(bitmap,x,y,leftarrows.width,height,_INTL(" << "),
shadowtext(bitmap,x,y,leftarrows.width,height," << ",
self.disabled || self.curvalue==self.minvalue)
@leftarrow=Rect.new(x,y,leftarrows.width,height)
x+=leftarrows.width
@@ -453,7 +453,7 @@ class Slider < UIControl
shadowtext(bitmap,x,y,numbers,height," #{self.curvalue} ",false,1)
end
x+=numbers
shadowtext(bitmap,x,y,rightarrows.width,height,_INTL(" >> "),
shadowtext(bitmap,x,y,rightarrows.width,height," >> ",
self.disabled || self.curvalue==self.maxvalue)
@rightarrow=Rect.new(x,y,rightarrows.width,height)
end
@@ -687,12 +687,12 @@ class TextSlider < UIControl
color=Color.new(120,120,120)
bitmap.fill_rect(x,y,width,height,Color.new(0,0,0,0))
size=bitmap.text_size(self.label).width
leftarrows=bitmap.text_size(_INTL(" << "))
rightarrows=bitmap.text_size(_INTL(" >> "))
leftarrows=bitmap.text_size(" << ")
rightarrows=bitmap.text_size(" >> ")
bitmap.font.color=color
shadowtext(bitmap,x,y,size,height,self.label)
x+=size
shadowtext(bitmap,x,y,leftarrows.width,height,_INTL(" << "),
shadowtext(bitmap,x,y,leftarrows.width,height," << ",
self.disabled || self.curvalue==self.minvalue)
@leftarrow=Rect.new(x,y,leftarrows.width,height)
x+=leftarrows.width
@@ -701,7 +701,7 @@ class TextSlider < UIControl
shadowtext(bitmap,x,y,@maxoptionwidth,height," #{@options[self.curvalue]} ",false,1)
end
x+=@maxoptionwidth
shadowtext(bitmap,x,y,rightarrows.width,height,_INTL(" >> "),
shadowtext(bitmap,x,y,rightarrows.width,height," >> ",
self.disabled || self.curvalue==self.maxvalue)
@rightarrow=Rect.new(x,y,rightarrows.width,height)
end
@@ -288,8 +288,8 @@ def pbCellProperties(canvas)
previewsprite.z=previewwin.z+1
sliderwin2.z=previewwin.z+2
set0=sliderwin2.addSlider(_INTL("Pattern:"),-2,1000,cel[AnimFrame::PATTERN])
set1=sliderwin2.addSlider(_INTL("X:"),-64,512+64,cel[AnimFrame::X])
set2=sliderwin2.addSlider(_INTL("Y:"),-64,384+64,cel[AnimFrame::Y])
set1=sliderwin2.addSlider("X:",-64,512+64,cel[AnimFrame::X])
set2=sliderwin2.addSlider("Y:",-64,384+64,cel[AnimFrame::Y])
set3=sliderwin2.addSlider(_INTL("Zoom X:"),5,1000,cel[AnimFrame::ZOOMX])
set4=sliderwin2.addSlider(_INTL("Zoom Y:"),5,1000,cel[AnimFrame::ZOOMY])
set5=sliderwin2.addSlider(_INTL("Angle:"),0,359,cel[AnimFrame::ANGLE])
@@ -511,7 +511,7 @@ end
def pbSelectSE(canvas,audio)
filename=(audio.name!="") ? audio.name : ""
displayname=(filename!="") ? filename : _INTL("<user's cry>")
displayname=(filename!="") ? filename : "<user's cry>"
animfiles=[]
ret=false
pbRgssChdir(File.join("Audio", "SE", "Anim")) {
@@ -521,7 +521,7 @@ def pbSelectSE(canvas,audio)
animfiles.concat(Dir.glob("*.wma"))
}
animfiles.sort! { |a,b| a.upcase<=>b.upcase }
animfiles=[_INTL("[Play user's cry]")]+animfiles
animfiles=["[Play user's cry]"]+animfiles
cmdwin=pbListWindow(animfiles,320)
cmdwin.height=480
cmdwin.opacity=200
@@ -594,8 +594,8 @@ def pbSelectBG(canvas,timing)
cmdwin.viewport=canvas.viewport
maxsizewindow=ControlWindow.new(320,0,320,32*11)
maxsizewindow.addLabel(_INTL("File: \"{1}\"",filename))
maxsizewindow.addSlider(_INTL("X:"),-500,500,timing.bgX || 0)
maxsizewindow.addSlider(_INTL("Y:"),-500,500,timing.bgY || 0)
maxsizewindow.addSlider("X:",-500,500,timing.bgX || 0)
maxsizewindow.addSlider("Y:",-500,500,timing.bgY || 0)
maxsizewindow.addSlider(_INTL("Opacity:"),0,255,timing.opacity || 0)
maxsizewindow.addSlider(_INTL("Red:"),0,255,timing.colorRed || 0)
maxsizewindow.addSlider(_INTL("Green:"),0,255,timing.colorGreen || 0)
@@ -641,8 +641,8 @@ def pbEditBG(canvas,timing)
ret=false
maxsizewindow=ControlWindow.new(0,0,320,32*11)
maxsizewindow.addSlider(_INTL("Duration:"),0,50,timing.duration)
maxsizewindow.addOptionalSlider(_INTL("X:"),-500,500,timing.bgX || 0)
maxsizewindow.addOptionalSlider(_INTL("Y:"),-500,500,timing.bgY || 0)
maxsizewindow.addOptionalSlider("X:",-500,500,timing.bgX || 0)
maxsizewindow.addOptionalSlider("Y:",-500,500,timing.bgY || 0)
maxsizewindow.addOptionalSlider(_INTL("Opacity:"),0,255,timing.opacity || 0)
maxsizewindow.addOptionalSlider(_INTL("Red:"),0,255,timing.colorRed || 0)
maxsizewindow.addOptionalSlider(_INTL("Green:"),0,255,timing.colorGreen || 0)
@@ -860,8 +860,8 @@ def pbCellBatch(canvas)
sliderwin2.viewport=canvas.viewport
sliderwin2.opacity=200
set0=sliderwin2.addOptionalSlider(_INTL("Pattern:"),-2,1000,0)
set1=sliderwin2.addOptionalSlider(_INTL("X:"),-64,512+64,0)
set2=sliderwin2.addOptionalSlider(_INTL("Y:"),-64,384+64,0)
set1=sliderwin2.addOptionalSlider("X:",-64,512+64,0)
set2=sliderwin2.addOptionalSlider("Y:",-64,384+64,0)
set3=sliderwin2.addOptionalSlider(_INTL("Zoom X:"),5,1000,100)
set4=sliderwin2.addOptionalSlider(_INTL("Zoom Y:"),5,1000,100)
set5=sliderwin2.addOptionalSlider(_INTL("Angle:"),0,359,0)
@@ -36,7 +36,7 @@ class UIntProperty
params = ChooseNumberParams.new
params.setMaxDigits(@maxdigits)
params.setDefaultValue(oldsetting || 0)
return pbMessageChooseNumber(_INTL("Set the value for {1}.",settingname),params)
return pbMessageChooseNumber(_INTL("Set the value for {1} (0-{2}).", settingname, @maxvalue), params)
end
def defaultValue
@@ -60,7 +60,7 @@ class LimitProperty
params = ChooseNumberParams.new
params.setRange(0,@maxvalue)
params.setDefaultValue(oldsetting)
return pbMessageChooseNumber(_INTL("Set the value for {1} (0-#{@maxvalue}).",settingname),params)
return pbMessageChooseNumber(_INTL("Set the value for {1} (0-{2}).",settingname, @maxvalue),params)
end
def defaultValue
@@ -85,7 +85,7 @@ class LimitProperty2
params.setRange(0,@maxvalue)
params.setDefaultValue(oldsetting)
params.setCancelValue(-1)
ret = pbMessageChooseNumber(_INTL("Set the value for {1} (0-#{@maxvalue}).",settingname),params)
ret = pbMessageChooseNumber(_INTL("Set the value for {1} (0-{2}).",settingname, @maxvalue),params)
return (ret>=0) ? ret : nil
end
@@ -431,7 +431,7 @@ module GenderProperty
end
def self.format(value)
return _INTL("-") if !value
return "-" if !value
return (value==0) ? _INTL("Male") : (value==1) ? _INTL("Female") : "-"
end
end
@@ -192,7 +192,7 @@ DebugMenuCommands.register("testwildbattle", {
"name" => _INTL("Test Wild Battle"),
"description" => _INTL("Start a single battle against a wild Pokémon. You choose the species/level."),
"effect" => proc {
species = pbChooseSpeciesList
species = pbChooseSpeciesList(nil, NB_POKEMON-4)
if species
params = ChooseNumberParams.new
params.setRange(1, GameData::GrowthRate.max_level)
@@ -463,20 +463,24 @@ DebugMenuCommands.register("additem", {
"name" => _INTL("Add Item"),
"description" => _INTL("Choose an item and a quantity of it to add to the Bag."),
"effect" => proc {
pbListScreenBlock(_INTL("ADD ITEM"), ItemLister.new) { |button, item|
if button == Input::USE && item
params = ChooseNumberParams.new
params.setRange(1, Settings::BAG_MAX_PER_SLOT)
params.setInitialValue(1)
params.setCancelValue(0)
qty = pbMessageChooseNumber(_INTL("Add how many {1}?",
GameData::Item.get(item).name_plural), params)
if qty > 0
$PokemonBag.pbStoreItem(item, qty)
pbMessage(_INTL("Gave {1}x {2}.", qty, GameData::Item.get(item).name))
end
item_list = []
GameData::Item.each do |item|
item_list.push([item.id_number, sprintf("%-30s %s", sprintf("%03d: %s", item.id_number, item.real_name), item.id), item.id])
end
item = pbChooseListWithFilter(item_list,0,nil,1,0,0,"ADD ITEM",:longest_value)
if item
params = ChooseNumberParams.new
params.setRange(1, Settings::BAG_MAX_PER_SLOT)
params.setInitialValue(1)
params.setCancelValue(0)
qty = pbMessageChooseNumber(_INTL("Add how many {1}?",
GameData::Item.get(item).name_plural), params)
if qty > 0
$PokemonBag.pbStoreItem(item, qty)
pbMessage(_INTL("Gave {1}x {2}.", qty, GameData::Item.get(item).name))
promptRegisterItem(GameData::Item.get(item))
end
}
end
}
})
@@ -599,14 +603,14 @@ DebugMenuCommands.register("quickhatch", {
DebugMenuCommands.register("fillboxes", {
"parent" => "pokemonmenu",
"name" => _INTL("Fill Storage Boxes"),
"description" => _INTL("Add one Pokémon of each species (at Level 50) to storage."),
"description" => _INTL("Add one Pokémon of each species to storage."),
"effect" => proc {
added = 0
box_qty = $PokemonStorage.maxPokemon(0)
completed = true
for num in 1..NB_POKEMON
for num in 1..501#NB_POKEMON
pokemon = getPokemon(num)
pbAddPokemonSilent(pokemon,50)
pbAddPokemonSilent(pokemon,5)
end
@@ -881,6 +885,21 @@ DebugMenuCommands.register("randomid", {
}
})
# DebugMenuCommands.register("setid", {
# "parent" => "playermenu",
# "name" => _INTL("Set Player ID"),
# "description" => _INTL("Set a new ID for the player."),
# "effect" => proc {
# params = ChooseNumberParams.new
# params.setRange(1, 9999999999)
# params.setInitialValue($Trainer.id)
# params.setCancelValue($Trainer.id)
# id = pbMessageChooseNumber(_INTL("Set the trainer ID."), params)
# $Trainer.id = id.to_i
# }
# })
#===============================================================================
# Information editors
#===============================================================================
@@ -922,36 +941,35 @@ DebugMenuCommands.register("terraintags", {
})
DebugMenuCommands.register("positionsprites", {
"parent" => "editorsmenu",
"name" => _INTL("Edit Pokémon Sprite Positions"),
"description" => _INTL("Reposition Pokémon sprites in battle."),
"always_show" => true,
"effect" => proc {
pbFadeOutIn {
sp = SpritePositioner.new
sps = SpritePositionerScreen.new(sp)
sps.pbStart
}
}
})
DebugMenuCommands.register("autopositionsprites", {
"parent" => "editorsmenu",
"name" => _INTL("Auto-Position All Sprites"),
"description" => _INTL("Automatically reposition all Pokémon sprites in battle. Don't use lightly."),
"always_show" => true,
"effect" => proc {
if pbConfirmMessage(_INTL("Are you sure you want to reposition all sprites?"))
msgwindow = pbCreateMessageWindow
pbMessageDisplay(msgwindow, _INTL("Repositioning all sprites. Please wait."), false)
Graphics.update
pbAutoPositionAll
pbDisposeMessageWindow(msgwindow)
end
}
})
# DebugMenuCommands.register("positionsprites", {
# "parent" => "editorsmenu",
# "name" => _INTL("Edit Pokémon Sprite Positions"),
# "description" => _INTL("Reposition Pokémon sprites in battle."),
# "always_show" => true,
# "effect" => proc {
# pbFadeOutIn {
# sp = SpritePositioner.new
# sps = SpritePositionerScreen.new(sp)
# sps.pbStart
# }
# }
# })
#
# DebugMenuCommands.register("autopositionsprites", {
# "parent" => "editorsmenu",
# "name" => _INTL("Auto-Position All Sprites"),
# "description" => _INTL("Automatically reposition all Pokémon sprites in battle. Don't use lightly."),
# "always_show" => true,
# "effect" => proc {
# if pbConfirmMessage(_INTL("Are you sure you want to reposition all sprites?"))
# msgwindow = pbCreateMessageWindow
# pbMessageDisplay(msgwindow, _INTL("Repositioning all sprites. Please wait."), false)
# Graphics.update
# pbAutoPositionAll
# pbDisposeMessageWindow(msgwindow)
# end
# }
# })
DebugMenuCommands.register("animeditor", {
"parent" => "editorsmenu",
"name" => _INTL("Battle Animation Editor"),
@@ -995,42 +1013,42 @@ DebugMenuCommands.register("exportanims", {
#===============================================================================
# Other options
#===============================================================================
# DebugMenuCommands.register("othermenu", {
# "parent" => "main",
# "name" => _INTL("Other options..."),
# "description" => _INTL("Mystery Gifts, translations, compile data, etc."),
# "always_show" => true
# })
DebugMenuCommands.register("othermenu", {
"parent" => "main",
"name" => _INTL("Other options..."),
"description" => _INTL("Mystery Gifts, translations, compile data, etc."),
"always_show" => true
})
DebugMenuCommands.register("mysterygift", {
"parent" => "othermenu",
"name" => _INTL("Test Mystery Gift"),
"description" => _INTL("Place the Mystery Gift JSON in the game's folder (top level)"),
"always_show" => true,
"effect" => proc {
testMysteryGift
}
})
#
# DebugMenuCommands.register("mysterygift", {
# "parent" => "othermenu",
# "name" => _INTL("Manage Mystery Gifts"),
# "description" => _INTL("Edit and enable/disable Mystery Gifts."),
# "always_show" => true,
# "effect" => proc {
# pbManageMysteryGifts
# }
# })
#
# DebugMenuCommands.register("extracttext", {
# "parent" => "othermenu",
# "name" => _INTL("Extract Text"),
# "description" => _INTL("Extract all text in the game to a single file for translating."),
# "always_show" => true,
# "effect" => proc {
# pbExtractText
# }
# })
#
# DebugMenuCommands.register("compiletext", {
# "parent" => "othermenu",
# "name" => _INTL("Compile Text"),
# "description" => _INTL("Import text and converts it into a language file."),
# "always_show" => true,
# "effect" => proc {
# pbCompileTextUI
# }
# })
DebugMenuCommands.register("extracttext", {
"parent" => "othermenu",
"name" => _INTL("Extract Text"),
"description" => _INTL("Extract all text in the game to a single file for translating."),
"always_show" => true,
"effect" => proc {
pbExtractText
}
})
DebugMenuCommands.register("compiletext", {
"parent" => "othermenu",
"name" => _INTL("Compile Text"),
"description" => _INTL("Import text and converts it into a language file."),
"always_show" => true,
"effect" => proc {
pbCompileTextUI
}
})
#
#
# DebugMenuCommands.register("renamesprites", {
@@ -11,7 +11,7 @@ def pbWarpToMapId
params = ChooseNumberParams.new
params.setRange(1,999) #pbMapTree().length)
params.setDefaultValue($game_map.map_id)
map_id = pbMessageChooseNumber("map id?",params)
map_id = pbMessageChooseNumber(_INTL("map id?"),params)
return [map_id,0,0]
end
@@ -561,6 +561,8 @@ def pbExtractText
return
end
pbMessageDisplay(msgwindow,_INTL("Please wait.\\wtnp[0]"))
pbSetTextMessages
MessageTypes.saveMessages
MessageTypes.extract("intl.txt")
pbMessageDisplay(msgwindow,_INTL("All text in the game was extracted and saved to intl.txt.\1"))
pbMessageDisplay(msgwindow,_INTL("To localize the text for a particular language, translate every second line in the file.\1"))
@@ -726,54 +726,6 @@ PokemonDebugMenuCommands.register("setability", {
})
PokemonDebugMenuCommands.register("setability2", {
"parent" => "main",
"name" => _INTL("Set secondary ability"),
"always_show" => true,
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
cmd = 0
commands = [
_INTL("Set possible ability"),
_INTL("Set any ability"),
_INTL("Reset")
]
loop do
if pkmn.ability
msg = _INTL("Ability 2 is {1} (index {2}).", pkmn.ability2.name, pkmn.ability2_index)
else
msg = _INTL("No ability (index {1}).", pkmn.ability2_index)
end
cmd = screen.pbShowCommands(msg, commands, cmd)
break if cmd < 0
case cmd
when 0 # Set possible ability
abils = pkmn.getAbilityList
ability_commands = []
abil_cmd = 0
for i in abils
ability_commands.push(((i[1] < 2) ? "" : "(H) ") + GameData::Ability.get(i[0]).name)
abil_cmd = ability_commands.length - 1 if pkmn.ability2_id == i[0]
end
abil_cmd = screen.pbShowCommands(_INTL("Choose an ability."), ability_commands, abil_cmd)
next if abil_cmd < 0
pkmn.ability2_index = abils[abil_cmd][1]
pkmn.ability2 = nil
screen.pbRefreshSingle(pkmnid)
when 1 # Set any ability
new_ability = pbChooseAbilityList(pkmn.ability2_id)
if new_ability && new_ability != pkmn.ability2_id
pkmn.ability2 = new_ability
screen.pbRefreshSingle(pkmnid)
end
when 2 # Reset
pkmn.ability2_index = nil
pkmn.ability2 = nil
screen.pbRefreshSingle(pkmnid)
end
end
next false
}
})
PokemonDebugMenuCommands.register("setnature", {
"parent" => "main",
@@ -823,9 +775,9 @@ PokemonDebugMenuCommands.register("setgender", {
"name" => _INTL("Set gender"),
"always_show" => true,
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
if pkmn.singleGendered?
screen.pbDisplay(_INTL("{1} is single-gendered or genderless.", pkmn.speciesName))
else
# if pkmn.singleGendered?
# screen.pbDisplay(_INTL("{1} is single-gendered or genderless.", pkmn.speciesName))
# else
cmd = 0
loop do
msg = [_INTL("Gender is male."), _INTL("Gender is female.")][pkmn.male? ? 0 : 1]
@@ -851,7 +803,7 @@ PokemonDebugMenuCommands.register("setgender", {
$Trainer.pokedex.register(pkmn) if !settingUpBattle
screen.pbRefreshSingle(pkmnid)
end
end
#end
next false
}
})
@@ -866,6 +818,17 @@ PokemonDebugMenuCommands.register("printInfo", {
next false
}
})
PokemonDebugMenuCommands.register("jsonExport", {
"parent" => "main",
"name" => _INTL("Export to JSON"),
"always_show" => true,
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
pkmn.export_to_json
next false
}
})
PokemonDebugMenuCommands.register("speciesform", {
"parent" => "main",
"name" => _INTL("Species/form..."),
@@ -895,9 +858,9 @@ PokemonDebugMenuCommands.register("speciesform", {
when 1 # Set form
old_head_dex = get_head_number_from_symbol(pkmn.species)
old_body_dex = get_body_number_from_symbol(pkmn.species)
pbMessage('Head species?')
pbMessage(_INTL("Head species?"))
head_species = pbChooseSpeciesList(old_head_dex,NB_POKEMON)
pbMessage('Body species?')
pbMessage(_INTL("Body species?"))
body_species = pbChooseSpeciesList(old_body_dex,NB_POKEMON)
fused_species_dex = getFusionSpecies(body_species.species, head_species.species)
@@ -1252,14 +1215,14 @@ PokemonDebugMenuCommands.register("shadowpkmn", {
}
})
PokemonDebugMenuCommands.register("mysterygift", {
"parent" => "main",
"name" => _INTL("Mystery Gift"),
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
pbCreateMysteryGift(0, pkmn)
next false
}
})
# PokemonDebugMenuCommands.register("mysterygift", {
# "parent" => "main",
# "name" => _INTL("Mystery Gift"),
# "effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
# pbCreateMysteryGift(0, pkmn)
# next false
# }
# })
PokemonDebugMenuCommands.register("duplicate", {
"parent" => "main",
+1 -1
View File
@@ -396,7 +396,7 @@ class ItemLister
@commands.clear
@ids.clear
cmds = []
end_of_list = [:POKEBALL, :RARECANDY, :DNASPLICERS, :DNAREVERSER, :SLEEPINGBAG]
end_of_list = [:LANTERN, :POKEBALL, :RARECANDY, :DNASPLICERS, :DNAREVERSER, :SLEEPINGBAG, :SPAWNER]
GameData::Item.each do |item|
cmds.push([item.id_number, item.id, item.real_name])
end