Added messages_core.dat and extracted text from it to GitHub, moved game credits to Settings, made credits translatable, tweaked some messages

This commit is contained in:
Maruno17
2023-06-25 16:53:13 +01:00
parent 7d77c5f3fc
commit 22fa0f9c0b
36 changed files with 21505 additions and 100 deletions

View File

@@ -425,6 +425,29 @@ module Settings
"choice 27",
"choice 28"
]
#=============================================================================
# Your game's credits, in an array. You can allow certain lines to be
# translated by wrapping them in _INTL() as shown. Blank lines are just "".
# To split a line into two columns, put "<s>" in it. Plugin credits and
# Essentials engine credits are added to the end of these credits
# automatically.
def self.game_credits
return [
_INTL("My Game by:"),
"Maruno",
"",
_INTL("Also involved were:"),
"Anon<s>Ecksam Pell",
"Jane Doe<s>Nameless",
"Sue Donnim<s>Unknown",
"Untitled<s>",
"",
_INTL("Special thanks to:"),
"Pizza"
]
end
end
# DO NOT EDIT THESE!

View File

@@ -203,7 +203,7 @@ module SaveData
conversion.run(save_data)
Console.echo_done(true)
end
Console.echoln_li_done(_INTL("Successfully applied #{conversions_to_run.length} save file conversion(s)"))
Console.echoln_li_done(_INTL("Successfully applied {1} save file conversion(s)", conversions_to_run.length))
save_data[:essentials_version] = Essentials::VERSION
save_data[:game_version] = Settings::GAME_VERSION
return true

View File

@@ -23,8 +23,8 @@ def pbNewTrainer(tr_type, tr_name, tr_version, save_changes = true)
params = ChooseNumberParams.new
params.setRange(1, GameData::GrowthRate.max_level)
params.setDefaultValue(10)
level = pbMessageChooseNumber(_INTL("Set the level for {1} (max. #{params.maxNumber}).",
GameData::Species.get(species).name), params)
level = pbMessageChooseNumber(_INTL("Set the level for {1} (max. {2}).",
GameData::Species.get(species).name, params.maxNumber), params)
party.push([species, level])
break
else

View File

@@ -454,7 +454,7 @@ MenuHandlers.add(:pc_menu, :hall_of_fame, {
"order" => 40,
"condition" => proc { next $PokemonGlobal.hallOfFameLastNumber > 0 },
"effect" => proc { |menu|
pbMessage(_INTL("\\se[PC access]Accessed the Hall of Fame."))
pbMessage("\\se[PC access]" + _INTL("Accessed the Hall of Fame."))
pbHallOfFamePC
next false
}

View File

@@ -43,62 +43,71 @@ class Scene_Credits
TEXT_BASE_COLOR = Color.new(255, 255, 255, 255)
TEXT_SHADOW_COLOR = Color.new(0, 0, 0, 100)
# This next piece of code is the credits.
# Start Editing
CREDIT = <<~_END_
def convert_names_to_credits_text(names, with_final_new_line = true)
ret = ""
if names.length >= 5
i = 0
loop do
ret += names[i] + "<s>" + (names[i + 1] || "") + "\n"
i += 2
break if i >= names.length
end
else
names.each { |name| ret += name + "\n" }
end
ret += "\n" if with_final_new_line
return ret
end
Your credits go here.
Your credits go here.
Your credits go here.
Your credits go here.
Your credits go here.
{INSERTS_PLUGIN_CREDITS_DO_NOT_REMOVE}
"Pokémon Essentials" was created by:
Poccil (Peter O.)
Maruno
Inspired by work by Flameguru
With contributions from:
AvatarMonkeyKirby<s>Marin
Boushy<s>MiDas Mike
Brother1440<s>Near Fantastica
FL.<s>PinkMan
Genzai Kawakami<s>Popper
Golisopod User<s>Rataime
help-14<s>Savordez
IceGod64<s>SoundSpawn
Jacob O. Wobbrock<s>the__end
KitsuneKouta<s>Venom12
Lisa Anthony<s>Wachunga
Luka S.J.<s>
and everyone else who helped out
"mkxp-z" by:
Roza
Based on "mkxp" by Ancurio et al.
"RPG Maker XP" by:
Enterbrain
Pokémon is owned by:
The Pokémon Company
Nintendo
Affiliated with Game Freak
This is a non-profit fan-made game.
No copyright infringements intended.
Please support the official games!
_END_
# Stop Editing
def get_text
ret = ""
Settings.game_credits.each { |line| ret += line + "\n" }
# Add plugin credits
if PluginManager.plugins.length > 0
ret += "\n\n\n"
PluginManager.plugins.each do |plugin|
pcred = PluginManager.credits(plugin)
ret += _INTL("\"{1}\" v.{2} by:", plugin, PluginManager.version(plugin)) + "\n"
ret += convert_names_to_credits_text(pcred)
end
end
# Add Essentials credits
ret += "\n\n\n"
ret += _INTL("\"Pokémon Essentials\" was created by:") + "\n"
ret += convert_names_to_credits_text([
"Poccil (Peter O.)",
"Maruno",
_INTL("Inspired by work by Flameguru")
])
ret += _INTL("With contributions from:") + "\n"
ret += convert_names_to_credits_text([
"AvatarMonkeyKirby", "Boushy", "Brother1440", "FL.", "Genzai Kawakami",
"Golisopod User", "help-14", "IceGod64", "Jacob O. Wobbrock", "KitsuneKouta",
"Lisa Anthony", "Luka S.J.", "Marin", "MiDas Mike", "Near Fantastica",
"PinkMan", "Popper", "Rataime", "Savordez", "SoundSpawn",
"the__end", "Venom12", "Wachunga"
], false)
ret += _INTL("and everyone else who helped out") + "\n"
ret += "\n"
ret += _INTL("\"mkxp-z\" by:") + "\n"
ret += convert_names_to_credits_text([
"Roza",
_INTL("Based on \"mkxp\" by Ancurio et al.")
])
ret += _INTL("\"RPG Maker XP\" by:") + "\n"
ret += convert_names_to_credits_text(["Enterbrain"])
ret += _INTL("Pokémon is owned by:") + "\n"
ret += convert_names_to_credits_text([
"The Pokémon Company",
"Nintendo",
_INTL("Affiliated with Game Freak")
])
ret += "\n\n"
ret += _INTL("This is a non-profit fan-made game.") + "\n"
ret += _INTL("No copyright infringements intended.") + "\n"
ret += _INTL("Please support the official games!")
return ret
end
def main
@quit = false
@@ -114,24 +123,7 @@ class Scene_Credits
#-------------------------------
# Credits text Setup
#-------------------------------
plugin_credits = ""
PluginManager.plugins.each do |plugin|
pcred = PluginManager.credits(plugin)
plugin_credits << "\"#{plugin}\" v.#{PluginManager.version(plugin)} by:\n"
if pcred.size >= 5
plugin_credits << (pcred[0] + "\n")
i = 1
until i >= pcred.size
plugin_credits << (pcred[i] + "<s>" + (pcred[i + 1] || "") + "\n")
i += 2
end
else
pcred.each { |name| plugin_credits << (name + "\n") }
end
plugin_credits << "\n"
end
CREDIT.gsub!(/\{INSERTS_PLUGIN_CREDITS_DO_NOT_REMOVE\}/, plugin_credits)
credit_lines = CREDIT.split(/\n/)
credit_lines = get_text.split(/\n/)
#-------------------------------
# Make background and text sprites
#-------------------------------

View File

@@ -559,7 +559,7 @@ class PokemonBagScreen
params.setRange(0, Settings::BAG_MAX_PER_SLOT)
params.setDefaultValue(qty)
newqty = pbMessageChooseNumber(
_INTL("Choose new quantity of {1} (max. #{Settings::BAG_MAX_PER_SLOT}).", itemplural), params
_INTL("Choose new quantity of {1} (max. {2}).", itemplural, Settings::BAG_MAX_PER_SLOT), params
) { @scene.pbUpdate }
if newqty > qty
@bag.add(item, newqty - qty)

View File

@@ -94,9 +94,9 @@ class PokemonPhone_Scene
@sprites["list"].top_row = @sprites["list"].itemCount - @sprites["list"].page_item_max
end
# Set info text
infotext = _INTL("Registered<br>")
infotext += _INTL("<r>{1}<br>", @sprites["list"].commands.length)
infotext += _INTL("Waiting for a rematch<r>{1}", rematch_count)
infotext = _INTL("Registered") + "<br>"
infotext += "<r>" + @sprites["list"].commands.length.to_s + "<br>"
infotext += _INTL("Waiting for a rematch") + "<r>" + rematch_count.to_s
@sprites["info"].text = infotext
pbRefreshScreen
end

View File

@@ -18,7 +18,7 @@ def pbEmergencySave
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]"))
pbMessage("\\se[]" + _INTL("Save failed.") + "\\wtnp[30]")
end
$scene = oldscene
end

View File

@@ -72,7 +72,7 @@ class MoveRelearner_Scene
textpos.push([moveData.name, 80, yPos, :left, Color.new(248, 248, 248), Color.black])
textpos.push([_INTL("PP"), 112, yPos + 32, :left, Color.new(64, 64, 64), Color.new(176, 176, 176)])
if moveData.total_pp > 0
textpos.push([_INTL("{1}/{1}", moveData.total_pp), 230, yPos + 32, :right,
textpos.push([moveData.total_pp.to_s + "/" + moveData.total_pp.to_s, 230, yPos + 32, :right,
Color.new(64, 64, 64), Color.new(176, 176, 176)])
else
textpos.push(["--", 230, yPos + 32, :right, Color.new(64, 64, 64), Color.new(176, 176, 176)])

View File

@@ -1297,7 +1297,7 @@ MenuHandlers.add(:pc_menu, :purify_chamber, {
"order" => 30,
"condition" => proc { next $player.seen_purify_chamber },
"effect" => proc { |menu|
pbMessage(_INTL("\\se[PC access]Accessed the Purify Chamber."))
pbMessage("\\se[PC access]" + _INTL("Accessed the Purify Chamber."))
pbPurifyChamber
next false
}

View File

@@ -381,7 +381,7 @@ def pbReceiveMysteryGift(id)
gift[2].obtain_map = $game_map&.map_id || 0
was_owned = $player.owned?(gift[2].species)
if pbAddPokemonSilent(gift[2])
pbMessage(_INTL("\\me[Pkmn get]{1} received {2}!", $player.name, gift[2].name))
pbMessage("\\me[Pkmn get]" + _INTL("{1} received {2}!", $player.name, gift[2].name))
$player.mystery_gifts[index] = [id]
# Show Pokédex entry for new species if it hasn't been owned before
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned && $player.has_pokedex

View File

@@ -297,7 +297,7 @@ class VoltorbFlip
@sprites["animation"].bitmap.clear
end
# Unskippable text block, parameter 2 = wait time (corresponds to ME length)
pbMessage(_INTL("\\me[Voltorb Flip game over]Oh no! You get 0 Coins!\\wtnp[50]"))
pbMessage("\\me[Voltorb Flip game over]" + _INTL("Oh no! You get 0 Coins!") + "\\wtnp[50]")
pbShowAndDispose
@sprites["mark"].bitmap.clear
if @level > 1
@@ -310,7 +310,7 @@ class VoltorbFlip
if @level > newLevel
@level = newLevel
@level = 1 if @level < 1
pbMessage(_INTL("\\se[Voltorb Flip level down]Dropped to Game Lv. {1}!", @level.to_s))
pbMessage("\\se[Voltorb Flip level down]" + _INTL("Dropped to Game Lv. {1}!", @level.to_s))
end
end
# Update level text
@@ -358,10 +358,10 @@ class VoltorbFlip
# Game cleared
if count == 0
@sprites["curtain"].opacity = 100
pbMessage(_INTL("\\me[Voltorb Flip win]Game clear!\\wtnp[40]"))
pbMessage("\\me[Voltorb Flip win]" + _INTL("Game clear!") + "\\wtnp[40]")
# pbMessage(_INTL("You've found all of the hidden x2 and x3 cards."))
# pbMessage(_INTL("This means you've found all the Coins in this game, so the game is now over."))
pbMessage(_INTL("\\se[Voltorb Flip gain coins]{1} received {2} Coins!", $player.name, @points.to_s_formatted))
pbMessage("\\se[Voltorb Flip gain coins]" + _INTL("{1} received {2} Coins!", $player.name, @points.to_s_formatted))
# Update level text
@sprites["level"].bitmap.clear
pbDrawShadowText(@sprites["level"].bitmap, 8, 154, 118, 28, _INTL("Level {1}", @level.to_s),
@@ -382,7 +382,7 @@ class VoltorbFlip
@sprites["curtain"].opacity = 100
if @level < 8
@level += 1
pbMessage(_INTL("\\se[Voltorb Flip level up]Advanced to Game Lv. {1}!", @level.to_s))
pbMessage("\\se[Voltorb Flip level up]" + _INTL("Advanced to Game Lv. {1}!", @level.to_s))
if @firstRound
# pbMessage(_INTL("Congratulations!"))
# pbMessage(_INTL("You can receive even more Coins in the next game!"))

View File

@@ -601,8 +601,7 @@ class MiningGameScene
if @itemswon.length > 0
@itemswon.each do |i|
if $bag.add(i)
pbMessage(_INTL("One {1} was obtained.\\se[Mining item get]\\wtnp[30]",
GameData::Item.get(i).name))
pbMessage(_INTL("One {1} was obtained.", GameData::Item.get(i).name) + "\\se[Mining item get]\\wtnp[30]")
else
pbMessage(_INTL("One {1} was found, but you have no room for it.",
GameData::Item.get(i).name))

View File

@@ -63,7 +63,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
@@ -89,7 +89,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
@@ -575,7 +575,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

View File

@@ -25,7 +25,7 @@ module FileLineData
@section = section
@key = key
if value && value.length > 200
@value = _INTL("{1}...", value[0, 200])
@value = value[0, 200].to_s + "..."
else
@value = (value) ? value.clone : ""
end

View File

@@ -73,9 +73,9 @@ end
# Add to Debug menu
#===============================================================================
MenuHandlers.add(:debug_menu, :print_move_target_functions, {
"name" => _INTL("Print Out Move Targets"),
"name" => "Print Out Move Targets",
"parent" => :main,
"description" => _INTL("Print all blah blah blah."),
"description" => "Print all blah blah blah.",
"effect" => proc {
marListMoveTargetFunctionCodes
}

BIN
Data/messages_core.dat Normal file

Binary file not shown.