From b9bf3e8b83d818a8ccfe8f5f761439b8289c0155 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sat, 15 Apr 2023 20:29:47 +0100 Subject: [PATCH] Added message saving back to compiler, tweaked various messages, fixed typo of constant, fixed missing attr_reader --- .../001_Technical/003_Intl_Messages.rb | 6 +-- .../001_Hardcoded data/011_TerrainTag.rb | 1 + .../003_Battle_ExpAndMoveLearning.rb | 3 +- .../011_Battle/004_Scene/001_Battle_Scene.rb | 2 +- .../002_BugContestBattle.rb | 2 +- .../004_BattleArenaBattle.rb | 28 +++++++------- Data/Scripts/012_Overworld/001_Overworld.rb | 38 +++++++++---------- .../012_Overworld/004_Overworld_FieldMoves.rb | 4 +- .../006_Overworld_BerryPlants.rb | 16 ++++---- Data/Scripts/013_Items/001_Item_Utilities.rb | 18 ++++----- Data/Scripts/013_Items/002_Item_Effects.rb | 6 +-- Data/Scripts/013_Items/004_Item_Phone.rb | 6 +-- .../001_Pokemon-related/001_FormHandlers.rb | 4 +- .../003_UI_EggHatching.rb | 10 ++--- .../004_UI_Evolution.rb | 6 +-- .../001_Non-interactive UI/005_UI_Trading.rb | 10 ++--- .../006_UI_HallOfFame.rb | 14 +++---- Data/Scripts/016_UI/005_UI_Party.rb | 6 +-- Data/Scripts/016_UI/013_UI_Load.rb | 6 +-- Data/Scripts/016_UI/014_UI_Save.rb | 14 +++---- Data/Scripts/016_UI/019_UI_PC.rb | 8 ++-- Data/Scripts/016_UI/023_UI_PurifyChamber.rb | 4 +- Data/Scripts/016_UI/024_UI_MysteryGift.rb | 16 ++++---- .../017_Minigames/002_Minigame_TripleTriad.rb | 4 +- .../017_Minigames/004_Minigame_VoltorbFlip.rb | 4 +- .../001_SafariZone.rb | 2 +- .../019_Utilities/002_Utilities_Pokemon.rb | 14 +++---- .../003_Debug menus/002_Debug_MenuCommands.rb | 12 ------ .../004_Debug_BattleCommands.rb | 8 ++-- Data/Scripts/021_Compiler/001_Compiler.rb | 5 +++ 30 files changed, 135 insertions(+), 142 deletions(-) diff --git a/Data/Scripts/001_Technical/003_Intl_Messages.rb b/Data/Scripts/001_Technical/003_Intl_Messages.rb index 590b70292..1cdd00024 100644 --- a/Data/Scripts/001_Technical/003_Intl_Messages.rb +++ b/Data/Scripts/001_Technical/003_Intl_Messages.rb @@ -338,11 +338,11 @@ module Translator end msg_window.textspeed = MessageConfig.pbSettingToTextSpeed($PokemonSystem.textspeed) if core_text - pbMessageDisplay(msg_window, _INTL("All core text was extracted to files in the folder \"{1}\".\1", dir_name)) + pbMessageDisplay(msg_window, _INTL("All core text was extracted to files in the folder \"{1}\".", dir_name) + "\1") else - pbMessageDisplay(msg_window, _INTL("All game text was extracted to files in the folder \"{1}\".\1", dir_name)) + pbMessageDisplay(msg_window, _INTL("All game text was extracted to files in the folder \"{1}\".", dir_name) + "\1") end - pbMessageDisplay(msg_window, _INTL("To localize this text, translate every second line in those files.\1")) + pbMessageDisplay(msg_window, _INTL("To localize this text, translate every second line in those files.") + "\1") pbMessageDisplay(msg_window, _INTL("After translating, choose \"Compile Translated Text\" in the Debug menu.")) pbDisposeMessageWindow(msg_window) end diff --git a/Data/Scripts/010_Data/001_Hardcoded data/011_TerrainTag.rb b/Data/Scripts/010_Data/001_Hardcoded data/011_TerrainTag.rb index 16a3c4c9f..52ec76c28 100644 --- a/Data/Scripts/010_Data/001_Hardcoded data/011_TerrainTag.rb +++ b/Data/Scripts/010_Data/001_Hardcoded data/011_TerrainTag.rb @@ -18,6 +18,7 @@ module GameData attr_reader :bridge attr_reader :shows_reflections attr_reader :must_walk + attr_reader :must_walk_or_run attr_reader :ignore_passability DATA = {} diff --git a/Data/Scripts/011_Battle/001_Battle/003_Battle_ExpAndMoveLearning.rb b/Data/Scripts/011_Battle/001_Battle/003_Battle_ExpAndMoveLearning.rb index b950d71f5..b4d22d06b 100644 --- a/Data/Scripts/011_Battle/001_Battle/003_Battle_ExpAndMoveLearning.rb +++ b/Data/Scripts/011_Battle/001_Battle/003_Battle_ExpAndMoveLearning.rb @@ -173,8 +173,7 @@ class Battle newLevel = growth_rate.level_from_exp(expFinal) if newLevel < curLevel debugInfo = "Levels: #{curLevel}->#{newLevel} | Exp: #{pkmn.exp}->#{expFinal} | gain: #{expGained}" - raise _INTL("{1}'s new level is less than its\r\ncurrent level, which shouldn't happen.\r\n[Debug: {2}]", - pkmn.name, debugInfo) + raise _INTL("{1}'s new level is less than its current level, which shouldn't happen.", pkmn.name) + "\r\n[#{debugInfo}]" end # Give Exp if pkmn.shadowPokemon? diff --git a/Data/Scripts/011_Battle/004_Scene/001_Battle_Scene.rb b/Data/Scripts/011_Battle/004_Scene/001_Battle_Scene.rb index 339c016a0..d22c61a0d 100644 --- a/Data/Scripts/011_Battle/004_Scene/001_Battle_Scene.rb +++ b/Data/Scripts/011_Battle/004_Scene/001_Battle_Scene.rb @@ -234,7 +234,7 @@ class Battle::Scene pbWaitMessage pbShowWindow(MESSAGE_BOX) cw = @sprites["messageWindow"] - cw.text = _INTL("{1}\1", msg) + cw.text = msg + "\1" PBDebug.log(msg) yielded = false timer = 0.0 diff --git a/Data/Scripts/011_Battle/007_Other battle types/002_BugContestBattle.rb b/Data/Scripts/011_Battle/007_Other battle types/002_BugContestBattle.rb index aa97a0963..6e9c951cf 100644 --- a/Data/Scripts/011_Battle/007_Other battle types/002_BugContestBattle.rb +++ b/Data/Scripts/011_Battle/007_Other battle types/002_BugContestBattle.rb @@ -59,7 +59,7 @@ class BugContestBattle < Battle if pbBugContestState.lastPokemon lastPokemon = pbBugContestState.lastPokemon pbDisplayPaused(_INTL("You already caught a {1}.", lastPokemon.name)) - helptext = _INTL("STOCK POKéMON:\n {1} Lv.{2} MaxHP: {3}\nTHIS POKéMON:\n {4} Lv.{5} MaxHP: {6}", + helptext = _INTL("Stock Pokémon:\n{1} Lv.{2} Max HP: {3}\nThis Pokémon:\n{4} Lv.{5} Max HP: {6}", lastPokemon.name, lastPokemon.level, lastPokemon.totalhp, pkmn.name, pkmn.level, pkmn.totalhp) @scene.pbShowHelp(helptext) diff --git a/Data/Scripts/011_Battle/007_Other battle types/004_BattleArenaBattle.rb b/Data/Scripts/011_Battle/007_Other battle types/004_BattleArenaBattle.rb index eafa3b799..ade18b37a 100644 --- a/Data/Scripts/011_Battle/007_Other battle types/004_BattleArenaBattle.rb +++ b/Data/Scripts/011_Battle/007_Other battle types/004_BattleArenaBattle.rb @@ -177,7 +177,7 @@ class BattleArenaBattle < Battle ratings2.each { |val| points[1] += val } # Make judgment if points[0] == points[1] - pbDisplay(_INTL("{1} tied the opponent\n{2} in a referee's decision!", + pbDisplay(_INTL("{1} tied the opponent {2} in a referee's decision!", @battlers[0].name, @battlers[1].name)) # NOTE: Pokémon doesn't really lose HP, but the effect is mostly the # same. @@ -186,12 +186,12 @@ class BattleArenaBattle < Battle @battlers[1].hp = 0 @battlers[1].pbFaint(false) elsif points[0] > points[1] - pbDisplay(_INTL("{1} defeated the opponent\n{2} in a referee's decision!", + pbDisplay(_INTL("{1} defeated the opponent {2} in a referee's decision!", @battlers[0].name, @battlers[1].name)) @battlers[1].hp = 0 @battlers[1].pbFaint(false) else - pbDisplay(_INTL("{1} lost to the opponent\n{2} in a referee's decision!", + pbDisplay(_INTL("{1} lost to the opponent {2} in a referee's decision!", @battlers[0].name, @battlers[1].name)) @battlers[0].hp = 0 @battlers[0].pbFaint(false) @@ -259,8 +259,8 @@ class Battle::Scene end def pbBattleArenaBattlers(battler1, battler2) - pbMessage(_INTL("REFEREE: {1} VS {2}!\nCommence battling!\\wtnp[20]", - battler1.name, battler2.name)) { pbBattleArenaUpdate } + pbMessage(_INTL("REFEREE: {1} VS {2}!\nCommence battling!", + battler1.name, battler2.name) + "\\wtnp[20]") { pbBattleArenaUpdate } end def pbBattleArenaJudgment(battler1, battler2, ratings1, ratings2) @@ -271,7 +271,7 @@ class Battle::Scene msgwindow = pbCreateMessageWindow dimmingvp = Viewport.new(0, 0, Graphics.width, Graphics.height - msgwindow.height) pbMessageDisplay(msgwindow, - _INTL("REFEREE: That's it! We will now go to judging to determine the winner!\\wtnp[20]")) do + _INTL("REFEREE: That's it! We will now go to judging to determine the winner!") + "\\wtnp[20]") do pbBattleArenaUpdate dimmingvp.update end @@ -299,21 +299,21 @@ class Battle::Scene end updateJudgment(infowindow, 1, battler1, battler2, ratings1, ratings2) pbMessageDisplay(msgwindow, - _INTL("REFEREE: Judging category 1, Mind!\nThe Pokémon showing the most guts!\\wtnp[40]")) do + _INTL("REFEREE: Judging category 1, Mind!\nThe Pokémon showing the most guts!") + "\\wtnp[40]") do pbBattleArenaUpdate dimmingvp.update infowindow.update end updateJudgment(infowindow, 2, battler1, battler2, ratings1, ratings2) pbMessageDisplay(msgwindow, - _INTL("REFEREE: Judging category 2, Skill!\nThe Pokémon using moves the best!\\wtnp[40]")) do + _INTL("REFEREE: Judging category 2, Skill!\nThe Pokémon using moves the best!") + "\\wtnp[40]") do pbBattleArenaUpdate dimmingvp.update infowindow.update end updateJudgment(infowindow, 3, battler1, battler2, ratings1, ratings2) pbMessageDisplay(msgwindow, - _INTL("REFEREE: Judging category 3, Body!\nThe Pokémon with the most vitality!\\wtnp[40]")) do + _INTL("REFEREE: Judging category 3, Body!\nThe Pokémon with the most vitality!") + "\\wtnp[40]") do pbBattleArenaUpdate dimmingvp.update infowindow.update @@ -326,23 +326,23 @@ class Battle::Scene end if total1 == total2 pbMessageDisplay(msgwindow, - _INTL("REFEREE: Judgment: {1} to {2}!\nWe have a draw!\\wtnp[40]", total1, total2)) do + _INTL("REFEREE: Judgment: {1} to {2}!\nWe have a draw!", total1, total2) + "\\wtnp[40]") do pbBattleArenaUpdate dimmingvp.update infowindow.update end elsif total1 > total2 pbMessageDisplay(msgwindow, - _INTL("REFEREE: Judgment: {1} to {2}!\nThe winner is {3}'s {4}!\\wtnp[40]", - total1, total2, @battle.pbGetOwnerName(battler1.index), battler1.name)) do + _INTL("REFEREE: Judgment: {1} to {2}!\nThe winner is {3}'s {4}!", + total1, total2, @battle.pbGetOwnerName(battler1.index), battler1.name) + "\\wtnp[40]") do pbBattleArenaUpdate dimmingvp.update infowindow.update end else pbMessageDisplay(msgwindow, - _INTL("REFEREE: Judgment: {1} to {2}!\nThe winner is {3}!\\wtnp[40]", - total1, total2, battler2.name)) do + _INTL("REFEREE: Judgment: {1} to {2}!\nThe winner is {3}!", + total1, total2, battler2.name) + "\\wtnp[40]") do pbBattleArenaUpdate dimmingvp.update infowindow.update diff --git a/Data/Scripts/012_Overworld/001_Overworld.rb b/Data/Scripts/012_Overworld/001_Overworld.rb index eb11ed113..cb4b3c838 100644 --- a/Data/Scripts/012_Overworld/001_Overworld.rb +++ b/Data/Scripts/012_Overworld/001_Overworld.rb @@ -97,7 +97,7 @@ EventHandlers.add(:on_player_step_taken_can_transfer, :poison_party, pkmn.hp -= 1 if pkmn.hp > 1 || Settings::POISON_FAINT_IN_FIELD if pkmn.hp == 1 && !Settings::POISON_FAINT_IN_FIELD pkmn.status = :NONE - pbMessage(_INTL("{1} survived the poisoning.\\nThe poison faded away!\1", pkmn.name)) + pbMessage(_INTL("{1} survived the poisoning.\\nThe poison faded away!", pkmn.name)) next elsif pkmn.hp == 0 pkmn.changeHappiness("faint") @@ -114,7 +114,7 @@ EventHandlers.add(:on_player_step_taken_can_transfer, :poison_party, def pbCheckAllFainted if $player.able_pokemon_count == 0 - pbMessage(_INTL("You have no more Pokémon that can fight!\1")) + pbMessage(_INTL("You have no more Pokémon that can fight!") + "\1") pbMessage(_INTL("You blacked out!")) pbBGMFade(1.0) pbBGSFade(1.0) @@ -450,7 +450,7 @@ end module PBMoveRoute DOWN = 1 LEFT = 2 - RRIGHT = 3 + RIGHT = 3 UP = 4 LOWER_LEFT = 5 LOWER_RIGHT = 6 @@ -667,15 +667,15 @@ def pbItemBall(item, quantity = 1) if $bag.add(item, quantity) # If item can be picked up meName = (item.is_key_item?) ? "Key item get" : "Item get" if item == :DNASPLICERS - pbMessage(_INTL("\\me[{1}]You found \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) + pbMessage("\\me[#{meName}]" + _INTL("You found \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") elsif item.is_machine? # TM or HM - pbMessage(_INTL("\\me[{1}]You found \\c[1]{2} {3}\\c[0]!\\wtnp[30]", meName, itemname, GameData::Move.get(move).name)) + pbMessage("\\me[#{meName}]" + _INTL("You found \\c[1]{1} {2}\\c[0]!", itemname, GameData::Move.get(move).name) + "\\wtnp[30]") elsif quantity > 1 - pbMessage(_INTL("\\me[{1}]You found {2} \\c[1]{3}\\c[0]!\\wtnp[30]", meName, quantity, itemname)) + pbMessage("\\me[#{meName}]" + _INTL("You found {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[30]") elsif itemname.starts_with_vowel? - pbMessage(_INTL("\\me[{1}]You found an \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) + pbMessage("\\me[#{meName}]" + _INTL("You found an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") else - pbMessage(_INTL("\\me[{1}]You found a \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) + pbMessage("\\me[#{meName}]" + _INTL("You found a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") end pbMessage(_INTL("You put the {1} in\\nyour Bag's \\c[1]{3}\\c[0] pocket.", itemname, pocket, PokemonBag.pocket_names[pocket - 1])) @@ -683,13 +683,13 @@ def pbItemBall(item, quantity = 1) end # Can't add the item if item.is_machine? # TM or HM - pbMessage(_INTL("You found \\c[1]{1} {2}\\c[0]!\\wtnp[30]", itemname, GameData::Move.get(move).name)) + pbMessage(_INTL("You found \\c[1]{1} {2}\\c[0]!", itemname, GameData::Move.get(move).name) + "\\wtnp[30]") elsif quantity > 1 - pbMessage(_INTL("You found {1} \\c[1]{2}\\c[0]!\\wtnp[30]", quantity, itemname)) + pbMessage(_INTL("You found {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[30]") elsif itemname.starts_with_vowel? - pbMessage(_INTL("You found an \\c[1]{1}\\c[0]!\\wtnp[30]", itemname)) + pbMessage(_INTL("You found an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") else - pbMessage(_INTL("You found a \\c[1]{1}\\c[0]!\\wtnp[30]", itemname)) + pbMessage(_INTL("You found a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") end pbMessage(_INTL("But your Bag is full...")) return false @@ -706,15 +706,15 @@ def pbReceiveItem(item, quantity = 1) move = item.move meName = (item.is_key_item?) ? "Key item get" : "Item get" if item == :DNASPLICERS - pbMessage(_INTL("\\me[{1}]You obtained \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) + pbMessage("\\me[#{meName}]" + _INTL("You obtained \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") elsif item.is_machine? # TM or HM - pbMessage(_INTL("\\me[{1}]You obtained \\c[1]{2} {3}\\c[0]!\\wtnp[30]", meName, itemname, GameData::Move.get(move).name)) + pbMessage("\\me[#{meName}]" + _INTL("You obtained \\c[1]{1} {2}\\c[0]!", itemname, GameData::Move.get(move).name) + "\\wtnp[30]") elsif quantity > 1 - pbMessage(_INTL("\\me[{1}]You obtained {2} \\c[1]{3}\\c[0]!\\wtnp[30]", meName, quantity, itemname)) + pbMessage("\\me[#{meName}]" + _INTL("You obtained {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[30]") elsif itemname.starts_with_vowel? - pbMessage(_INTL("\\me[{1}]You obtained an \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) + pbMessage("\\me[#{meName}]" + _INTL("You obtained an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") else - pbMessage(_INTL("\\me[{1}]You obtained a \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) + pbMessage("\\me[#{meName}]" + _INTL("You obtained a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") end if $bag.add(item, quantity) # If item can be added pbMessage(_INTL("You put the {1} in\\nyour Bag's \\c[1]{3}\\c[0] pocket.", @@ -733,7 +733,7 @@ def pbBuyPrize(item, quantity = 1) item_name = (quantity > 1) ? item.portion_name_plural : item.portion_name pocket = item.pocket return false if !$bag.add(item, quantity) - pbMessage(_INTL("\\CNYou put the {1} in\\nyour Bag's \\c[1]{3}\\c[0] pocket.", - item_name, pocket, PokemonBag.pocket_names[pocket - 1])) + pbMessage("\\CN" + _INTL("You put the {1} in\\nyour Bag's \\c[1]{3}\\c[0] pocket.", + item_name, pocket, PokemonBag.pocket_names[pocket - 1])) return true end diff --git a/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb b/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb index 8716fdd30..1d3f3bb8a 100644 --- a/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb +++ b/Data/Scripts/012_Overworld/004_Overworld_FieldMoves.rb @@ -658,7 +658,7 @@ def pbStrength pbMessage(_INTL("It's a big boulder, but a Pokémon may be able to push it aside.")) return false end - pbMessage(_INTL("It's a big boulder, but you may be able to push it aside with a hidden move.\1")) + pbMessage(_INTL("It's a big boulder, but you may be able to push it aside with a hidden move.") + "\1") if pbConfirmMessage(_INTL("Would you like to use Strength?")) speciesname = (movefinder) ? movefinder.name : $player.name pbMessage(_INTL("{1} used {2}!", speciesname, GameData::Move.get(move).name)) @@ -688,7 +688,7 @@ HiddenMoveHandlers::CanUseMove.add(:STRENGTH, proc { |move, pkmn, showmsg| HiddenMoveHandlers::UseMove.add(:STRENGTH, proc { |move, pokemon| if !pbHiddenMoveAnimation(pokemon) - pbMessage(_INTL("{1} used {2}!\1", pokemon.name, GameData::Move.get(move).name)) + pbMessage(_INTL("{1} used {2}!", pokemon.name, GameData::Move.get(move).name) + "\1") end pbMessage(_INTL("Strength made it possible to move boulders around!")) $PokemonMap.strengthUsed = true diff --git a/Data/Scripts/012_Overworld/006_Overworld_BerryPlants.rb b/Data/Scripts/012_Overworld/006_Overworld_BerryPlants.rb index 8b9c1175e..bd6694fbf 100644 --- a/Data/Scripts/012_Overworld/006_Overworld_BerryPlants.rb +++ b/Data/Scripts/012_Overworld/006_Overworld_BerryPlants.rb @@ -360,7 +360,7 @@ def pbBerryPlant break if !pbConfirmMessage(_INTL("Want to sprinkle some water with the {1}?", GameData::Item.get(item).name)) berry_plant.water - pbMessage(_INTL("{1} watered the plant.\\wtnp[40]", $player.name)) + pbMessage(_INTL("{1} watered the plant.", $player.name) + "\\wtnp[40]") if Settings::NEW_BERRY_PLANTS pbMessage(_INTL("There! All happy!")) else @@ -375,7 +375,7 @@ def pbBerryPlant if Settings::NEW_BERRY_PLANTS # New mechanics if berry_plant.mulch_id - pbMessage(_INTL("{1} has been laid down.\1", GameData::Item.get(berry_plant.mulch_id).name)) + pbMessage(_INTL("{1} has been laid down.", GameData::Item.get(berry_plant.mulch_id).name)) else case pbMessage(_INTL("It's soft, earthy soil."), [_INTL("Fertilize"), _INTL("Plant Berry"), _INTL("Exit")], -1) @@ -391,7 +391,7 @@ def pbBerryPlant if mulch_data.is_mulch? berry_plant.mulch_id = mulch $bag.remove(mulch) - pbMessage(_INTL("The {1} was scattered on the soil.\1", mulch_data.name)) + pbMessage(_INTL("The {1} was scattered on the soil.", mulch_data.name)) else pbMessage(_INTL("That won't fertilize the soil!")) return @@ -404,7 +404,7 @@ def pbBerryPlant end else # Old mechanics - return if !pbConfirmMessage(_INTL("It's soft, loamy soil.\nPlant a berry?")) + return if !pbConfirmMessage(_INTL("It's soft, loamy soil. Want to plant a berry?")) ask_to_plant = false end if !ask_to_plant || pbConfirmMessage(_INTL("Want to plant a Berry?")) @@ -453,13 +453,13 @@ def pbPickBerry(berry, qty = 1) end $bag.add(berry, qty) if qty > 1 - pbMessage(_INTL("\\me[Berry get]You picked the {1} \\c[1]{2}\\c[0].\\wtnp[30]", qty, berry_name)) + pbMessage("\\me[Berry get]" + _INTL("You picked the {1} \\c[1]{2}\\c[0].", qty, berry_name) + "\\wtnp[30]") else - pbMessage(_INTL("\\me[Berry get]You picked the \\c[1]{1}\\c[0].\\wtnp[30]", berry_name)) + pbMessage("\\me[Berry get]" + _INTL("You picked the \\c[1]{1}\\c[0].", berry_name) + "\\wtnp[30]") end pocket = berry.pocket - pbMessage(_INTL("{1} put the \\c[1]{2}\\c[0] in the \\c[1]{4}\\c[0] Pocket.\1", - $player.name, berry_name, pocket, PokemonBag.pocket_names[pocket - 1])) + pbMessage(_INTL("You put the {1} in\\nyour Bag's \\c[1]{3}\\c[0] pocket.", + berry_name, pocket, PokemonBag.pocket_names[pocket - 1]) + "\1") if Settings::NEW_BERRY_PLANTS pbMessage(_INTL("The soil returned to its soft and earthy state.")) else diff --git a/Data/Scripts/013_Items/001_Item_Utilities.rb b/Data/Scripts/013_Items/001_Item_Utilities.rb index 8062f7f0e..1d3c75935 100644 --- a/Data/Scripts/013_Items/001_Item_Utilities.rb +++ b/Data/Scripts/013_Items/001_Item_Utilities.rb @@ -591,11 +591,11 @@ def pbLearnMove(pkmn, move, ignore_if_known = false, by_machine = false, &block) return false elsif pkmn.numMoves < Pokemon::MAX_MOVES pkmn.learn_move(move) - pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]", pkmn_name, move_name), &block) + pbMessage("\\se[]" + _INTL("{1} learned {2}!", pkmn_name, move_name) + "\\se[Pkmn move learnt]", &block) return true end - pbMessage(_INTL("{1} wants to learn {2}, but it already knows {3} moves.\1", - pkmn_name, move_name, pkmn.numMoves.to_word), &block) + pbMessage(_INTL("{1} wants to learn {2}, but it already knows {3} moves.", + pkmn_name, move_name, pkmn.numMoves.to_word) + "\1", &block) if pbConfirmMessage(_INTL("Should {1} forget a move to learn {2}?", pkmn_name, move_name), &block) loop do move_index = pbForgetMove(pkmn, move) @@ -606,9 +606,9 @@ def pbLearnMove(pkmn, move, ignore_if_known = false, by_machine = false, &block) if by_machine && Settings::TAUGHT_MACHINES_KEEP_OLD_PP pkmn.moves[move_index].pp = [oldmovepp, pkmn.moves[move_index].total_pp].min end - pbMessage(_INTL("1, 2, and...\\wt[16] ...\\wt[16] ...\\wt[16] Ta-da!\\se[Battle ball drop]\1"), &block) - pbMessage(_INTL("{1} forgot how to use {2}.\\nAnd...\1", pkmn_name, old_move_name), &block) - pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]", pkmn_name, move_name), &block) + pbMessage(_INTL("1, 2, and...\\wt[16] ...\\wt[16] ...\\wt[16] Ta-da!") + "\\se[Battle ball drop]\1", &block) + pbMessage(_INTL("{1} forgot how to use {2}.\\nAnd..." + "\1", pkmn_name, old_move_name), &block) + pbMessage("\\se[]" + _INTL("{1} learned {2}!", pkmn_name, move_name) + "\\se[Pkmn move learnt]", &block) pkmn.changeHappiness("machine") if by_machine return true elsif pbConfirmMessage(_INTL("Give up on learning {1}?", move_name), &block) @@ -714,7 +714,7 @@ def pbUseItemOnPokemon(item, pkmn, scene) elsif !pkmn.compatible_with_move?(machine) pbMessage(_INTL("{1} can't learn {2}.", pkmn.name, movename)) { scene.pbUpdate } else - pbMessage(_INTL("\\se[PC access]You booted up the {1}.\1", itm.portion_name)) { scene.pbUpdate } + pbMessage("\\se[PC access]" + _INTL("You booted up the {1}.", itm.portion_name) + "\1") { scene.pbUpdate } if pbConfirmMessage(_INTL("Do you want to teach {1} to {2}?", movename, pkmn.name)) { scene.pbUpdate } if pbLearnMove(pkmn, machine, false, true) { scene.pbUpdate } $bag.remove(item) if itm.consumed_after_use? @@ -785,9 +785,9 @@ def pbGiveItemToPokemon(item, pkmn, scene, pkmnid = 0) if pkmn.hasItem? olditemname = pkmn.item.portion_name if newitemname.starts_with_vowel? - scene.pbDisplay(_INTL("{1} is already holding an {2}.\1", pkmn.name, olditemname)) + scene.pbDisplay(_INTL("{1} is already holding an {2}.", pkmn.name, olditemname) + "\1") else - scene.pbDisplay(_INTL("{1} is already holding a {2}.\1", pkmn.name, olditemname)) + scene.pbDisplay(_INTL("{1} is already holding a {2}.", pkmn.name, olditemname) + "\1") end if scene.pbConfirm(_INTL("Would you like to switch the two items?")) $bag.remove(item) diff --git a/Data/Scripts/013_Items/002_Item_Effects.rb b/Data/Scripts/013_Items/002_Item_Effects.rb index 0372d035a..2d75fd82f 100644 --- a/Data/Scripts/013_Items/002_Item_Effects.rb +++ b/Data/Scripts/013_Items/002_Item_Effects.rb @@ -74,7 +74,7 @@ ItemHandlers::UseFromBag.addIf(:move_machines, item_data = GameData::Item.get(item) move = item_data.move next 0 if !move - pbMessage(_INTL("\\se[PC access]You booted up {1}.\1", item_data.name)) + pbMessage("\\se[PC access]" + _INTL("You booted up the {1}.", item_data.name) + "\1") next 0 if !pbConfirmMessage(_INTL("Do you want to teach {1} to a Pokémon?", GameData::Move.get(move).name)) next 1 if pbMoveTutorChoose(move, nil, true, item_data.is_TR?) @@ -320,11 +320,11 @@ ItemHandlers::UseInField.add(:ITEMFINDER, proc { |item| when 8 then $game_player.turn_up end pbWait(Graphics.frame_rate * 3 / 10) - pbMessage(_INTL("Huh? The {1}'s responding!\1", GameData::Item.get(item).name)) + pbMessage(_INTL("Huh? The {1}'s responding!", GameData::Item.get(item).name) + "\1") pbMessage(_INTL("There's an item buried around here!")) end else - pbMessage(_INTL("... \\wt[10]... \\wt[10]... \\wt[10]...\\wt[10]Nope! There's no response.")) + pbMessage(_INTL("... \\wt[10]... \\wt[10]... \\wt[10]... \\wt[10]Nope! There's no response.")) end next true }) diff --git a/Data/Scripts/013_Items/004_Item_Phone.rb b/Data/Scripts/013_Items/004_Item_Phone.rb index d3e8b8c88..bfba3a297 100644 --- a/Data/Scripts/013_Items/004_Item_Phone.rb +++ b/Data/Scripts/013_Items/004_Item_Phone.rb @@ -430,7 +430,7 @@ class Phone end def start_message(contact = nil) - pbMessage(_INTL("......\\wt[5] ......\\1")) + pbMessage(_INTL("......\\wt[5] ......") + "\1") end def play(dialogue, contact) @@ -454,14 +454,14 @@ class Phone message.gsub!(/\\TP/, contact_pokemon_species) message.gsub!(/\\TE/, random_encounter_species) message.gsub!(/\\TM/, contact_map_name) - message += "\\1" if i < messages.length - 1 + message += "\1" if i < messages.length - 1 pbMessage(gender_colour_text + message) end end_message(contact) end def end_message(contact = nil) - pbMessage(_INTL("Click!\\wt[10]\n......\\wt[5] ......\\1")) + pbMessage(_INTL("Click!\\wt[10]\n......\\wt[5] ......") + "\1") end #=========================================================================== diff --git a/Data/Scripts/014_Pokemon/001_Pokemon-related/001_FormHandlers.rb b/Data/Scripts/014_Pokemon/001_Pokemon-related/001_FormHandlers.rb index 8c401e24b..d643bcc5f 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon-related/001_FormHandlers.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon-related/001_FormHandlers.rb @@ -254,8 +254,8 @@ MultipleForms.register(:ROTOM, { # Replace the old move with the new move (keeps the same index) pkmn.moves[old_move_index].id = new_move_id new_move_name = pkmn.moves[old_move_index].name - pbMessage(_INTL("{1} forgot {2}...\1", pkmn.name, old_move_name)) - pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]\1", pkmn.name, new_move_name)) + pbMessage(_INTL("{1} forgot {2}...", pkmn.name, old_move_name) + "\1") + pbMessage("\\se[]" + _INTL("{1} learned {2}!", pkmn.name, new_move_name) + "\\se[Pkmn move learnt]") end elsif !new_move_id.nil? # Just learn the new move diff --git a/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb b/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb index c5cce55c4..d78ecb7b1 100644 --- a/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb +++ b/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb @@ -99,7 +99,7 @@ class PokemonEggHatch_Scene pbBGMStop pbMEPlay("Evolution success") @pokemon.name = nil - pbMessage("\\se[]" + _INTL("{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update } + pbMessage("\\se[]" + _INTL("{1} hatched from the Egg!", @pokemon.name) + "\\wt[80]") { update } # Record the Pokémon's species as owned in the Pokédex was_owned = $player.owned?(@pokemon.species) $player.pokedex.register(@pokemon) @@ -194,7 +194,7 @@ end # #=============================================================================== def pbHatchAnimation(pokemon) - pbMessage(_INTL("Huh?\1")) + pbMessage(_INTL("Huh?") + "\1") pbFadeOutInWithMusic do scene = PokemonEggHatch_Scene.new screen = PokemonEggHatchScreen.new(scene) @@ -214,9 +214,9 @@ def pbHatch(pokemon) pokemon.hatched_map = $game_map.map_id pokemon.record_first_moves if !pbHatchAnimation(pokemon) - pbMessage(_INTL("Huh?\1")) - pbMessage(_INTL("...\1")) - pbMessage(_INTL("... .... .....\1")) + pbMessage(_INTL("Huh?") + "\1") + pbMessage(_INTL("...") + "\1") + pbMessage(_INTL("... .... .....") + "\1") pbMessage(_INTL("{1} hatched from the Egg!", speciesname)) was_owned = $player.owned?(pokemon.species) $player.pokedex.register(pokemon) diff --git a/Data/Scripts/016_UI/001_Non-interactive UI/004_UI_Evolution.rb b/Data/Scripts/016_UI/001_Non-interactive UI/004_UI_Evolution.rb index a85379867..0784b09a7 100644 --- a/Data/Scripts/016_UI/001_Non-interactive UI/004_UI_Evolution.rb +++ b/Data/Scripts/016_UI/001_Non-interactive UI/004_UI_Evolution.rb @@ -535,7 +535,7 @@ class PokemonEvolutionScene metaplayer1.play metaplayer2.play pbBGMStop - pbMessageDisplay(@sprites["msgwindow"], "\\se[]" + _INTL("What?") + "\\1") { pbUpdate } + pbMessageDisplay(@sprites["msgwindow"], "\\se[]" + _INTL("What?") + "\1") { pbUpdate } pbPlayDecisionSE @pokemon.play_cry @sprites["msgwindow"].text = _INTL("{1} is evolving!", @pokemon.name) @@ -591,8 +591,8 @@ class PokemonEvolutionScene pbMEPlay("Evolution success") newspeciesname = GameData::Species.get(@newspecies).name pbMessageDisplay(@sprites["msgwindow"], - "\\se[]" + _INTL("Congratulations! Your {1} evolved into {2}!\\wt[80]", - @pokemon.name, newspeciesname)) { pbUpdate } + "\\se[]" + _INTL("Congratulations! Your {1} evolved into {2}!", + @pokemon.name, newspeciesname) + "\\wt[80]") { pbUpdate } @sprites["msgwindow"].text = "" # Check for consumed item and check if Pokémon should be duplicated pbEvolutionMethodAfterEvolution diff --git a/Data/Scripts/016_UI/001_Non-interactive UI/005_UI_Trading.rb b/Data/Scripts/016_UI/001_Non-interactive UI/005_UI_Trading.rb index dfbcc0a85..dbbca5f67 100644 --- a/Data/Scripts/016_UI/001_Non-interactive UI/005_UI_Trading.rb +++ b/Data/Scripts/016_UI/001_Non-interactive UI/005_UI_Trading.rb @@ -175,19 +175,19 @@ class PokemonTrade_Scene speciesname1 = GameData::Species.get(@pokemon.species).name speciesname2 = GameData::Species.get(@pokemon2.species).name pbMessageDisplay(@sprites["msgwindow"], - _ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}\\wtnp[0]", - @pokemon.name, @pokemon.owner.public_id, @pokemon.owner.name)) { pbUpdate } + _ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}", + @pokemon.name, @pokemon.owner.public_id, @pokemon.owner.name) + "\\wtnp[0]") { pbUpdate } pbMessageWaitForInput(@sprites["msgwindow"], 50, true) { pbUpdate } pbPlayDecisionSE pbScene1 pbMessageDisplay(@sprites["msgwindow"], - _INTL("For {1}'s {2},\r\n{3} sends {4}.\1", @trader1, speciesname1, @trader2, speciesname2)) { pbUpdate } + _INTL("For {1}'s {2},\r\n{3} sends {4}.", @trader1, speciesname1, @trader2, speciesname2) + "\1") { pbUpdate } pbMessageDisplay(@sprites["msgwindow"], _INTL("{1} bids farewell to {2}.", @trader2, speciesname2)) { pbUpdate } pbScene2 pbMessageDisplay(@sprites["msgwindow"], - _ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}\1", - @pokemon2.name, @pokemon2.owner.public_id, @pokemon2.owner.name)) { pbUpdate } + _ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}", + @pokemon2.name, @pokemon2.owner.public_id, @pokemon2.owner.name) + "\1") { pbUpdate } pbMessageDisplay(@sprites["msgwindow"], _INTL("Take good care of {1}.", speciesname2)) { pbUpdate } # Show Pokédex entry for new species if it hasn't been owned before diff --git a/Data/Scripts/016_UI/001_Non-interactive UI/006_UI_HallOfFame.rb b/Data/Scripts/016_UI/001_Non-interactive UI/006_UI_HallOfFame.rb index e833df101..cb80f12b1 100644 --- a/Data/Scripts/016_UI/001_Non-interactive UI/006_UI_HallOfFame.rb +++ b/Data/Scripts/016_UI/001_Non-interactive UI/006_UI_HallOfFame.rb @@ -283,21 +283,21 @@ class HallOfFame_Scene hour = totalsec / 60 / 60 min = totalsec / 60 % 60 pubid = sprintf("%05d", $player.public_ID) - lefttext = _INTL("Name{1}
", $player.name) - lefttext += _INTL("ID No.{1}
", pubid) + lefttext = _INTL("Name{1}", $player.name) + "
" + lefttext += _INTL("ID No.{1}", pubid) + "
" if hour > 0 - lefttext += _INTL("Time{1}h {2}m
", hour, min) + lefttext += _INTL("Time{1}h {2}m", hour, min) + "
" else - lefttext += _INTL("Time{1}m
", min) + lefttext += _INTL("Time{1}m", min) + "
" end - lefttext += _INTL("Pokédex{1}/{2}
", - $player.pokedex.owned_count, $player.pokedex.seen_count) + lefttext += _INTL("Pokédex{1}/{2}", + $player.pokedex.owned_count, $player.pokedex.seen_count) + "
" @sprites["messagebox"] = Window_AdvancedTextPokemon.new(lefttext) @sprites["messagebox"].viewport = @viewport @sprites["messagebox"].width = 192 if @sprites["messagebox"].width < 192 @sprites["msgwindow"] = pbCreateMessageWindow(@viewport) pbMessageDisplay(@sprites["msgwindow"], - _INTL("League champion!\nCongratulations!\\^")) + _INTL("League champion!\nCongratulations!") + "\\^") end def writePokemonData(pokemon, hallNumber = -1) diff --git a/Data/Scripts/016_UI/005_UI_Party.rb b/Data/Scripts/016_UI/005_UI_Party.rb index 3ec3d2a00..13a870824 100644 --- a/Data/Scripts/016_UI/005_UI_Party.rb +++ b/Data/Scripts/016_UI/005_UI_Party.rb @@ -1454,16 +1454,16 @@ MenuHandlers.add(:party_menu_item, :move, { newitem = newpkmn.item newitemname = newitem.portion_name if newitemname.starts_with_vowel? - screen.pbDisplay(_INTL("{1} is already holding an {2}.\1", newpkmn.name, newitemname)) + screen.pbDisplay(_INTL("{1} is already holding an {2}.", newpkmn.name, newitemname) + "\1") else - screen.pbDisplay(_INTL("{1} is already holding a {2}.\1", newpkmn.name, newitemname)) + screen.pbDisplay(_INTL("{1} is already holding a {2}.", newpkmn.name, newitemname) + "\1") end next if !screen.pbConfirm(_INTL("Would you like to switch the two items?")) newpkmn.item = item pkmn.item = newitem screen.scene.pbClearSwitching screen.pbRefresh - screen.pbDisplay(_INTL("{1} was given the {2} to hold.", newpkmn.name, portionitemname)) + screen.pbDisplay(_INTL("{1} was given the {2} to hold.", newpkmn.name, portionitemname) + "\1") screen.pbDisplay(_INTL("{1} was given the {2} to hold.", pkmn.name, newitemname)) moved = true break diff --git a/Data/Scripts/016_UI/013_UI_Load.rb b/Data/Scripts/016_UI/013_UI_Load.rb index ec4735d35..93794abb1 100644 --- a/Data/Scripts/016_UI/013_UI_Load.rb +++ b/Data/Scripts/016_UI/013_UI_Load.rb @@ -240,7 +240,7 @@ class PokemonLoadScreen # Called if all save data is invalid. # Prompts the player to delete the save files. def prompt_save_deletion - pbMessage(_INTL("The save file is corrupt, or is incompatible with this game.")) + pbMessage(_INTL("The save file is corrupt, or is incompatible with this game.") + "\1") exit unless pbConfirmMessageSerious( _INTL("Do you want to delete the save file and start anew?") ) @@ -254,9 +254,9 @@ class PokemonLoadScreen @scene.pbStartScene2 if SaveData.exists? if pbConfirmMessageSerious(_INTL("Delete all saved data?")) - pbMessage(_INTL("Once data has been deleted, there is no way to recover it.\1")) + pbMessage(_INTL("Once data has been deleted, there is no way to recover it.") + "\1") if pbConfirmMessageSerious(_INTL("Delete the saved data anyway?")) - pbMessage(_INTL("Deleting all data. Don't turn off the power.\\wtnp[0]")) + pbMessage(_INTL("Deleting all data. Don't turn off the power.") + "\\wtnp[0]") self.delete_save_data end end diff --git a/Data/Scripts/016_UI/014_UI_Save.rb b/Data/Scripts/016_UI/014_UI_Save.rb index b292362f2..effa058af 100644 --- a/Data/Scripts/016_UI/014_UI_Save.rb +++ b/Data/Scripts/016_UI/014_UI_Save.rb @@ -15,8 +15,8 @@ def pbEmergencySave end end if Game.save - pbMessage("\\se[]" + - _INTL("The game was saved.\\me[GUI save game] The previous save file has been backed up.\\wtnp[30]")) + pbMessage("\\se[]" + _INTL("The game was saved.") + "\\me[GUI save game]\\wtnp[30]") + pbMessage("\\se[]" + _INTL("The previous save file has been backed up.") + "\\wtnp[30]") else pbMessage("\\se[]" + _INTL("Save failed.\\wtnp[30]")) end @@ -102,9 +102,9 @@ class PokemonSaveScreen @scene.pbStartScreen if pbConfirmMessage(_INTL("Would you like to save the game?")) if SaveData.exists? && $game_temp.begun_new_game - pbMessage(_INTL("WARNING!")) - pbMessage(_INTL("There is a different game file that is already saved.")) - pbMessage(_INTL("If you save now, the other file's adventure, including items and Pokémon, will be entirely lost.")) + pbMessage(_INTL("WARNING!") + "\1") + pbMessage(_INTL("There is a different game file that is already saved.") + "\1") + pbMessage(_INTL("If you save now, the other file's adventure, including items and Pokémon, will be entirely lost.") + "\1") if !pbConfirmMessageSerious(_INTL("Are you sure you want to save now and overwrite the other save file?")) pbSEPlay("GUI save choice") @scene.pbEndScreen @@ -114,10 +114,10 @@ class PokemonSaveScreen $game_temp.begun_new_game = false pbSEPlay("GUI save choice") if Game.save - pbMessage("\\se[]" + _INTL("{1} saved the game.\\me[GUI save game]\\wtnp[30]", $player.name)) + pbMessage("\\se[]" + _INTL("{1} saved the game.", $player.name) + "\\me[GUI save game]\\wtnp[30]") ret = true else - pbMessage("\\se[]" + _INTL("Save failed.\\wtnp[30]")) + pbMessage("\\se[]" + _INTL("Save failed.") + "\\wtnp[30]") ret = false end else diff --git a/Data/Scripts/016_UI/019_UI_PC.rb b/Data/Scripts/016_UI/019_UI_PC.rb index 0a526e36b..254fd995a 100644 --- a/Data/Scripts/016_UI/019_UI_PC.rb +++ b/Data/Scripts/016_UI/019_UI_PC.rb @@ -108,7 +108,7 @@ end # #=============================================================================== def pbTrainerPC - pbMessage(_INTL("\\se[PC open]{1} booted up the PC.", $player.name)) + pbMessage("\\se[PC open]" + _INTL("{1} booted up the PC.", $player.name)) pbTrainerPCMenu pbSEPlay("PC close") end @@ -132,7 +132,7 @@ end # #=============================================================================== def pbPokeCenterPC - pbMessage(_INTL("\\se[PC open]{1} booted up the PC.", $player.name)) + pbMessage("\\se[PC open]" + _INTL("{1} booted up the PC.", $player.name)) # Get all commands command_list = [] commands = [] @@ -166,7 +166,7 @@ MenuHandlers.add(:pc_menu, :pokemon_storage, { }, "order" => 10, "effect" => proc { |menu| - pbMessage(_INTL("\\se[PC access]The Pokémon Storage System was opened.")) + pbMessage("\\se[PC access]" + _INTL("The Pokémon Storage System was opened.")) command = 0 loop do command = pbShowCommandsWithHelp(nil, @@ -222,7 +222,7 @@ MenuHandlers.add(:pc_menu, :player_pc, { "name" => proc { next _INTL("{1}'s PC", $player.name) }, "order" => 20, "effect" => proc { |menu| - pbMessage(_INTL("\\se[PC access]Accessed {1}'s PC.", $player.name)) + pbMessage("\\se[PC access]" + _INTL("Accessed {1}'s PC.", $player.name)) pbTrainerPCMenu next false } diff --git a/Data/Scripts/016_UI/023_UI_PurifyChamber.rb b/Data/Scripts/016_UI/023_UI_PurifyChamber.rb index 1c8390998..bdb61a5fe 100644 --- a/Data/Scripts/016_UI/023_UI_PurifyChamber.rb +++ b/Data/Scripts/016_UI/023_UI_PurifyChamber.rb @@ -531,7 +531,7 @@ class PurifyChamberScreen end end if pbCheckPurify - @scene.pbDisplay(_INTL("There is a Pokémon that is ready to open its heart!\1")) + @scene.pbDisplay(_INTL("There is a Pokémon that is ready to open its heart!") + "\1") @scene.pbCloseSetDetail pbDoPurify return false @@ -579,7 +579,7 @@ class PurifyChamberScreen pbStorePokemon(@chamber[set].shadow) @chamber.setShadow(set, nil) # Remove shadow Pokemon from set if (i + 1) != purifiables.length - @scene.pbDisplay(_INTL("There is another Pokémon that is ready to open its heart!")) + @scene.pbDisplay(_INTL("There is another Pokémon that is ready to open its heart!") + "\1") if !@scene.pbConfirm(_INTL("Would you like to switch sets?")) @scene.pbCloseSet break diff --git a/Data/Scripts/016_UI/024_UI_MysteryGift.rb b/Data/Scripts/016_UI/024_UI_MysteryGift.rb index 19ad93db2..e10255fb6 100644 --- a/Data/Scripts/016_UI/024_UI_MysteryGift.rb +++ b/Data/Scripts/016_UI/024_UI_MysteryGift.rb @@ -245,7 +245,7 @@ def pbDownloadMysteryGift(trainer) addBackgroundPlane(sprites, "background", "mysterygift_bg", viewport) pbFadeInAndShow(sprites) sprites["msgwindow"] = pbCreateMessageWindow - pbMessageDisplay(sprites["msgwindow"], _INTL("Searching for a gift.\nPlease wait...\\wtnp[0]")) + pbMessageDisplay(sprites["msgwindow"], _INTL("Searching for a gift.\nPlease wait...") + "\\wtnp[0]") string = pbDownloadToString(MysteryGift::URL) if nil_or_empty?(string) pbMessageDisplay(sprites["msgwindow"], _INTL("No new gifts are available.")) @@ -268,7 +268,7 @@ def pbDownloadMysteryGift(trainer) commands.push(gift[3]) end commands.push(_INTL("Cancel")) - pbMessageDisplay(sprites["msgwindow"], _INTL("Choose the gift you want to receive.\\wtnp[0]")) + pbMessageDisplay(sprites["msgwindow"], _INTL("Choose the gift you want to receive.") + "\\wtnp[0]") command = pbShowCommands(sprites["msgwindow"], commands, -1) if command == -1 || command == commands.length - 1 break @@ -302,7 +302,7 @@ def pbDownloadMysteryGift(trainer) pbUpdateSceneMap end sprites["msgwindow"].visible = true - pbMessageDisplay(sprites["msgwindow"], _INTL("The gift has been received!")) { sprite.update } + pbMessageDisplay(sprites["msgwindow"], _INTL("The gift has been received!") + "\1") { sprite.update } pbMessageDisplay(sprites["msgwindow"], _INTL("Please pick up your gift from the deliveryman in any Poké Mart.")) { sprite.update } trainer.mystery_gifts.push(gift) pending.delete_at(command) @@ -408,14 +408,14 @@ def pbReceiveMysteryGift(id) itm = GameData::Item.get(item) itemname = (qty > 1) ? itm.portion_name_plural : itm.portion_name if itm.is_machine? # TM or HM - pbMessage(_INTL("\\me[Item get]You obtained \\c[1]{1} {2}\\c[0]!\\wtnp[30]", itemname, - GameData::Move.get(itm.move).name)) + pbMessage("\\me[Item get]" + _INTL("You obtained \\c[1]{1} {2}\\c[0]!", itemname, + GameData::Move.get(itm.move).name) + "\\wtnp[30]") elsif qty > 1 - pbMessage(_INTL("\\me[Item get]You obtained {1} \\c[1]{2}\\c[0]!\\wtnp[30]", qty, itemname)) + pbMessage("\\me[Item get]" + _INTL("You obtained {1} \\c[1]{2}\\c[0]!", qty, itemname) + "\\wtnp[30]") elsif itemname.starts_with_vowel? - pbMessage(_INTL("\\me[Item get]You obtained an \\c[1]{1}\\c[0]!\\wtnp[30]", itemname)) + pbMessage("\\me[Item get]" + _INTL("You obtained an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") else - pbMessage(_INTL("\\me[Item get]You obtained a \\c[1]{1}\\c[0]!\\wtnp[30]", itemname)) + pbMessage("\\me[Item get]" + _INTL("You obtained a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") end $player.mystery_gifts[index] = [id] return true diff --git a/Data/Scripts/017_Minigames/002_Minigame_TripleTriad.rb b/Data/Scripts/017_Minigames/002_Minigame_TripleTriad.rb index f180a4815..2155cb8d2 100644 --- a/Data/Scripts/017_Minigames/002_Minigame_TripleTriad.rb +++ b/Data/Scripts/017_Minigames/002_Minigame_TripleTriad.rb @@ -1126,7 +1126,7 @@ def pbBuyTriads $PokemonGlobal.triads.add(item, quantity) $player.money -= price goldwindow.text = _INTL("Money:\r\n{1}", pbGetGoldString) - pbMessage(_INTL("Here you are! Thank you!\\se[Mart buy item]")) + pbMessage(_INTL("Here you are! Thank you!") + "\\se[Mart buy item]") end end cmdwindow.dispose @@ -1220,7 +1220,7 @@ def pbSellTriads $player.money += price goldwindow.text = _INTL("Money:\r\n{1}", pbGetGoldString) $PokemonGlobal.triads.remove(item, quantity) - pbMessage(_INTL("Turned over the {1} card and received ${2}.\\se[Mart buy item]", itemname, price.to_s_formatted)) + pbMessage(_INTL("Turned over the {1} card and received ${2}.", itemname, price.to_s_formatted) + "\\se[Mart buy item]") commands = [] $PokemonGlobal.triads.length.times do |i| item = $PokemonGlobal.triads[i] diff --git a/Data/Scripts/017_Minigames/004_Minigame_VoltorbFlip.rb b/Data/Scripts/017_Minigames/004_Minigame_VoltorbFlip.rb index 54bd775ac..8eecdca6c 100644 --- a/Data/Scripts/017_Minigames/004_Minigame_VoltorbFlip.rb +++ b/Data/Scripts/017_Minigames/004_Minigame_VoltorbFlip.rb @@ -111,8 +111,8 @@ class VoltorbFlip pbMessage(_INTL("You've gathered {1} Coins. You cannot gather any more.", Settings::MAX_COINS.to_s_formatted)) $player.coins = Settings::MAX_COINS # As a precaution @quit = true -# elsif !pbConfirmMessage(_INTL("Play Voltorb Flip Lv. {1}?",@level)) && $player.coins 0 - pbMessage(_INTL("PA: Ding-dong!\1")) + pbMessage(_INTL("PA: Ding-dong!") + "\1") pbMessage(_INTL("PA: Your safari game is over!")) pbSafariState.decision = 1 pbSafariState.pbGoToStart diff --git a/Data/Scripts/019_Utilities/002_Utilities_Pokemon.rb b/Data/Scripts/019_Utilities/002_Utilities_Pokemon.rb index edc3e22af..b69dd8c5e 100644 --- a/Data/Scripts/019_Utilities/002_Utilities_Pokemon.rb +++ b/Data/Scripts/019_Utilities/002_Utilities_Pokemon.rb @@ -16,7 +16,7 @@ end def pbStorePokemon(pkmn) if pbBoxesFull? - pbMessage(_INTL("There's no more room for Pokémon!\1")) + pbMessage(_INTL("There's no more room for Pokémon!") + "\1") pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!")) return end @@ -32,7 +32,7 @@ end def pbNicknameAndStore(pkmn) if pbBoxesFull? - pbMessage(_INTL("There's no more room for Pokémon!\1")) + pbMessage(_INTL("There's no more room for Pokémon!") + "\1") pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!")) return end @@ -48,13 +48,13 @@ end def pbAddPokemon(pkmn, level = 1, see_form = true) return false if !pkmn if pbBoxesFull? - pbMessage(_INTL("There's no more room for Pokémon!\1")) + pbMessage(_INTL("There's no more room for Pokémon!") + "\1") pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!")) return false end pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon) species_name = pkmn.speciesName - pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $player.name, species_name)) + pbMessage(_INTL("{1} obtained {2}!", $player.name, species_name) + "\\me[Pkmn get]\\wtnp[80]") was_owned = $player.owned?(pkmn.species) $player.pokedex.set_seen(pkmn.species) $player.pokedex.set_owned(pkmn.species) @@ -96,7 +96,7 @@ def pbAddToParty(pkmn, level = 1, see_form = true) return false if !pkmn || $player.party_full? pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon) species_name = pkmn.speciesName - pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $player.name, species_name)) + pbMessage(_INTL("{1} obtained {2}!", $player.name, species_name) + "\\me[Pkmn get]\\wtnp[80]") was_owned = $player.owned?(pkmn.species) $player.pokedex.set_seen(pkmn.species) $player.pokedex.set_owned(pkmn.species) @@ -133,9 +133,9 @@ def pbAddForeignPokemon(pkmn, level = 1, owner_name = nil, nickname = nil, owner pkmn.name = nickname[0, Pokemon::MAX_NAME_SIZE] if !nil_or_empty?(nickname) pkmn.calc_stats if owner_name - pbMessage(_INTL("\\me[Pkmn get]{1} received a Pokémon from {2}.\1", $player.name, owner_name)) + pbMessage(_INTL("{1} received a Pokémon from {2}.", $player.name, owner_name) + "\\me[Pkmn get]\\wtnp[80]") else - pbMessage(_INTL("\\me[Pkmn get]{1} received a Pokémon.\1", $player.name)) + pbMessage(_INTL("{1} received a Pokémon.", $player.name) + "\\me[Pkmn get]\\wtnp[80]") end was_owned = $player.owned?(pkmn.species) $player.pokedex.set_seen(pkmn.species) diff --git a/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb b/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb index 11cd1d83b..562065a08 100644 --- a/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb +++ b/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb @@ -1180,18 +1180,6 @@ MenuHandlers.add(:debug_menu, :rename_files, { } }) -MenuHandlers.add(:debug_menu, :collate_script_and_event_text, { - "name" => _INTL("Collate Script/Event Texts For Translation"), - "parent" => :files_menu, - "description" => _INTL("Find translatable text in scripts/map events. Do this before extracting text."), - "effect" => proc { - Translator.gather_script_and_event_texts - MessageTypes.save_default_messages - MessageTypes.load_default_messages if safeExists?("Data/messages_core.dat") - pbMessage(_INTL("Translatable text gathered from scripts and map events and saved in data files.")) - } -}) - MenuHandlers.add(:debug_menu, :extract_text, { "name" => _INTL("Extract Text For Translation"), "parent" => :files_menu, diff --git a/Data/Scripts/020_Debug/003_Debug menus/004_Debug_BattleCommands.rb b/Data/Scripts/020_Debug/003_Debug menus/004_Debug_BattleCommands.rb index a8ab301ec..184783eb9 100644 --- a/Data/Scripts/020_Debug/003_Debug menus/004_Debug_BattleCommands.rb +++ b/Data/Scripts/020_Debug/003_Debug menus/004_Debug_BattleCommands.rb @@ -467,14 +467,14 @@ MenuHandlers.add(:battle_debug_menu, :position_effects, { if battler && !battler.fainted? text = "[#{i}] #{battler.name}" else - text = _INTL("[#{i}] (empty)", i) + text = "[#{i}] " + _INTL("(empty)") end if battler.pbOwnedByPlayer? - text += " (yours)" + text += " " + _INTL("(yours)") elsif battle.opposes?(i) - text += " (opposing)" + text += " " + _INTL("(opposing)") else - text += " (ally's)" + text += " " + _INTL("(ally's)") end cmds.push(text) end diff --git a/Data/Scripts/021_Compiler/001_Compiler.rb b/Data/Scripts/021_Compiler/001_Compiler.rb index 7ae172fe2..0a35080c2 100644 --- a/Data/Scripts/021_Compiler/001_Compiler.rb +++ b/Data/Scripts/021_Compiler/001_Compiler.rb @@ -1015,6 +1015,11 @@ module Compiler compile_pbs_files compile_animations compile_trainer_events(mustCompile) + Console.echo_li(_INTL("Saving messages...")) + Translator.gather_script_and_event_texts + MessageTypes.save_default_messages + MessageTypes.load_default_messages if safeExists?("Data/messages_core.dat") + Console.echo_done(true) Console.echoln_li_done(_INTL("Successfully compiled all game data")) end