mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-07-22 07:37:00 +00:00
Update 6.8
This commit is contained in:
@@ -103,22 +103,24 @@ class PokemonEggHatch_Scene
|
||||
@pokemon.play_cry
|
||||
updateScene(frames)
|
||||
pbBGMStop()
|
||||
pbMEPlay("Evolution success")
|
||||
pbMEPlay("evolution_success")
|
||||
@pokemon.name = nil
|
||||
pbMessage(_INTL("\\se[]{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update }
|
||||
if pbConfirmMessage(
|
||||
if $PokemonSystem.prompt_nicknames
|
||||
if pbConfirmMessage(
|
||||
_INTL("Would you like to nickname the newly hatched {1}?", @pokemon.name)) { update }
|
||||
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?", @pokemon.name),
|
||||
0, Pokemon::MAX_NAME_SIZE, "", @pokemon, true)
|
||||
@pokemon.name = nickname
|
||||
@nicknamed = true
|
||||
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?", @pokemon.name),
|
||||
0, Pokemon::MAX_NAME_SIZE, "", @pokemon, true)
|
||||
@pokemon.name = nickname
|
||||
@nicknamed = true
|
||||
end
|
||||
end
|
||||
|
||||
if !$Trainer.pokedex.owned?(@pokemon.species)
|
||||
$Trainer.pokedex.register(@pokemon)
|
||||
$Trainer.pokedex.set_owned(@pokemon.species)
|
||||
pbMessage(_INTL("{1}'s data was added to the Pokédex", @pokemon.name))
|
||||
pbShowPokedex(@pokemon.species)
|
||||
pbShowPokedex(@pokemon)
|
||||
end
|
||||
nb_eggs_hatched = pbGet(VAR_NB_EGGS_HATCHED)
|
||||
pbSet(VAR_NB_EGGS_HATCHED,nb_eggs_hatched+1)
|
||||
@@ -205,7 +207,7 @@ def pbHatch(pokemon)
|
||||
pokemon.name = nil
|
||||
pokemon.owner = Pokemon::Owner.new_from_trainer($Trainer)
|
||||
pokemon.happiness = 120
|
||||
pokemon.timeEggHatched = pbGetTimeNow
|
||||
pokemon.timeEggHatched = Time.new.to_i
|
||||
pokemon.obtain_method = 1 # hatched from egg
|
||||
pokemon.hatched_map = $game_map.map_id
|
||||
if player_on_hidden_ability_map
|
||||
|
||||
@@ -492,6 +492,8 @@ class PokemonEvolutionScene
|
||||
def pbStartScreen(pokemon,newspecies,reversing=false)
|
||||
@pokemon = pokemon
|
||||
@newspecies = newspecies
|
||||
spriteLoader = BattleSpriteLoader.new
|
||||
evolution_pif_sprite = spriteLoader.obtain_pif_sprite(newspecies)
|
||||
@sprites = {}
|
||||
@bgviewport = Viewport.new(0,0,Graphics.width,Graphics.height)
|
||||
@bgviewport.z = 99999
|
||||
@@ -508,9 +510,12 @@ class PokemonEvolutionScene
|
||||
rsprite1.setPokemonBitmap(@pokemon,false)
|
||||
rsprite1.x = Graphics.width/2
|
||||
rsprite1.y = (Graphics.height-64)/2
|
||||
@pokemon.preEvolved_pif_sprite = @pokemon.pif_sprite
|
||||
@pokemon.pif_sprite = evolution_pif_sprite
|
||||
rsprite2 = PokemonSprite.new(@viewport)
|
||||
rsprite2.setOffset(PictureOrigin::Center)
|
||||
rsprite2.setPokemonBitmapSpecies(@pokemon,@newspecies,false)
|
||||
|
||||
rsprite2.setPokemonBitmapPIFSprite(evolution_pif_sprite)
|
||||
rsprite2.x = rsprite1.x
|
||||
rsprite2.y = rsprite1.y
|
||||
rsprite2.opacity = 0
|
||||
@@ -551,7 +556,7 @@ class PokemonEvolutionScene
|
||||
pbPlayDecisionSE
|
||||
oldstate = pbSaveSpriteState(@sprites["rsprite1"])
|
||||
oldstate2 = pbSaveSpriteState(@sprites["rsprite2"])
|
||||
pbMEPlay("Evolution start")
|
||||
pbMEPlay("evolution_start")
|
||||
pbBGMPlay("Evolution")
|
||||
canceled = false
|
||||
begin
|
||||
@@ -570,10 +575,20 @@ class PokemonEvolutionScene
|
||||
end while metaplayer1.playing? && metaplayer2.playing?
|
||||
pbFlashInOut(canceled,oldstate,oldstate2)
|
||||
if canceled
|
||||
pbMessageDisplay(@sprites["msgwindow"],
|
||||
_INTL("Huh? {1} stopped evolving!",@pokemon.name)) { pbUpdate }
|
||||
pbMessageDisplay(@sprites["msgwindow"], _INTL("Huh? {1} stopped evolving!",@pokemon.name)) { pbUpdate }
|
||||
pbMessageDisplay(@sprites["msgwindow"], _INTL("The evolution can be prompted again from the party menu.")) { pbUpdate }
|
||||
if @pokemon.preEvolved_pif_sprite
|
||||
@pokemon.pif_sprite = @pokemon.preEvolved_pif_sprite
|
||||
@pokemon.preEvolved_pif_sprite = nil
|
||||
else
|
||||
spriteLoader = BattleSpriteLoader.new
|
||||
evolution_pif_sprite = spriteLoader.obtain_pif_sprite(@pokemon.species)
|
||||
@pokemon.pif_sprite = evolution_pif_sprite
|
||||
end
|
||||
@pokemon.evolve_from_party = true
|
||||
else
|
||||
pbEvolutionSuccess(reversing)
|
||||
@pokemon.evolve_from_party = false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -587,7 +602,7 @@ class PokemonEvolutionScene
|
||||
pbUpdate
|
||||
end
|
||||
# Success jingle/message
|
||||
pbMEPlay("Evolution success")
|
||||
pbMEPlay("evolution_success")
|
||||
sprite_bitmap=@sprites["rsprite2"].getBitmap
|
||||
|
||||
#drawSpriteCredits(sprite_bitmap.filename,sprite_bitmap.path, @viewport)
|
||||
@@ -626,7 +641,7 @@ class PokemonEvolutionScene
|
||||
$Trainer.pokedex.set_owned(@newspecies)
|
||||
Kernel.pbMessageDisplay(@sprites["msgwindow"],
|
||||
_INTL("{1}'s data was added to the Pokédex", newspeciesname))
|
||||
@scene.pbShowPokedex(@newspecies)
|
||||
@scene.pbShowPokedex(@pokemon)
|
||||
end
|
||||
|
||||
|
||||
@@ -654,9 +669,12 @@ class PokemonEvolutionScene
|
||||
new_pkmn.markings = 0
|
||||
new_pkmn.poke_ball = :POKEBALL
|
||||
new_pkmn.item = nil
|
||||
new_pkmn.personalID = new_pkmn.generate_personal_id
|
||||
new_pkmn.pif_sprite = nil
|
||||
new_pkmn.clearAllRibbons
|
||||
new_pkmn.calc_stats
|
||||
new_pkmn.heal
|
||||
|
||||
# Add duplicate Pokémon to party
|
||||
$Trainer.party.push(new_pkmn)
|
||||
# See and own duplicate Pokémon
|
||||
|
||||
@@ -249,7 +249,7 @@ def pbStartTrade(pokemonIndex,newpoke,nickname,trainerName,trainerGender=0,saveg
|
||||
evo.pbEndScreen
|
||||
}
|
||||
$Trainer.party[pokemonIndex] = yourPokemon
|
||||
|
||||
$Trainer.stats&.incr_nb_trades
|
||||
setDialogIconOff(@event_id) if @event_id
|
||||
return yourPokemon
|
||||
end
|
||||
|
||||
@@ -430,32 +430,32 @@ class HallOfFame_Scene
|
||||
|
||||
|
||||
def getCurrentGameMode()
|
||||
gameMode = "Classic mode"
|
||||
gameMode = _INTL("Classic mode")
|
||||
if $game_switches[SWITCH_MODERN_MODE]
|
||||
gameMode = "Remix mode"
|
||||
gameMode = _INTL("Remix mode")
|
||||
end
|
||||
if $game_switches[SWITCH_EXPERT_MODE]
|
||||
gameMode = "Expert mode"
|
||||
gameMode = _INTL("Expert mode")
|
||||
end
|
||||
if $game_switches[SWITCH_SINGLE_POKEMON_MODE]
|
||||
pokemon_number = pbGet(VAR_SINGLE_POKEMON_MODE)
|
||||
if pokemon_number.is_a?(Integer) && pokemon_number > 0
|
||||
pokemon = GameData::Species.get(pokemon_number)
|
||||
gameMode = pokemon.real_name + " mode"
|
||||
gameMode = _INTL("{1} mode",pokemon.name)
|
||||
else
|
||||
gameMode = "Debug mode"
|
||||
gameMode = _INTL("Debug mode")
|
||||
end
|
||||
end
|
||||
if $game_switches[SWITCH_RANDOMIZED_AT_LEAST_ONCE]
|
||||
gameMode = "Randomized mode"
|
||||
gameMode = _INTL("Randomized mode")
|
||||
end
|
||||
|
||||
if $game_switches[SWITCH_LEGENDARY_MODE]
|
||||
gameMode = "Legendary mode"
|
||||
gameMode = _INTL("Legendary mode")
|
||||
end
|
||||
|
||||
if $game_switches[ENABLED_DEBUG_MODE_AT_LEAST_ONCE] || $DEBUG
|
||||
gameMode = "Debug mode"
|
||||
gameMode = _INTL("Debug mode")
|
||||
end
|
||||
return gameMode
|
||||
end
|
||||
|
||||
@@ -1,385 +0,0 @@
|
||||
#==============================================================================
|
||||
# * Scene_Credits
|
||||
#------------------------------------------------------------------------------
|
||||
# Scrolls the credits you make below. Original Author unknown.
|
||||
#
|
||||
## Edited by MiDas Mike so it doesn't play over the Title, but runs by calling
|
||||
# the following:
|
||||
# $scene = Scene_Credits.new
|
||||
#
|
||||
## New Edit 3/6/2007 11:14 PM by AvatarMonkeyKirby.
|
||||
# Ok, what I've done is changed the part of the script that was supposed to make
|
||||
# the credits automatically end so that way they actually end! Yes, they will
|
||||
# actually end when the credits are finished! So, that will make the people you
|
||||
# should give credit to now is: Unknown, MiDas Mike, and AvatarMonkeyKirby.
|
||||
# -sincerly yours,
|
||||
# Your Beloved
|
||||
# Oh yea, and I also added a line of code that fades out the BGM so it fades
|
||||
# sooner and smoother.
|
||||
#
|
||||
## New Edit 24/1/2012 by Maruno.
|
||||
# Added the ability to split a line into two halves with <s>, with each half
|
||||
# aligned towards the centre. Please also credit me if used.
|
||||
#
|
||||
## New Edit 22/2/2012 by Maruno.
|
||||
# Credits now scroll properly when played with a zoom factor of 0.5. Music can
|
||||
# now be defined. Credits can't be skipped during their first play.
|
||||
#
|
||||
## New Edit 25/3/2020 by Maruno.
|
||||
# Scroll speed is now independent of frame rate. Now supports non-integer values
|
||||
# for SCROLL_SPEED.
|
||||
#
|
||||
## New Edit 21/8/2020 by Marin.
|
||||
# Now automatically inserts the credits from the plugins that have been
|
||||
# registered through the PluginManager module.
|
||||
#==============================================================================
|
||||
class Scene_Credits
|
||||
# Backgrounds to show in credits. Found in Graphics/Titles/ folder
|
||||
BACKGROUNDS_LIST = ["credits1", "credits2", "credits3", "credits4", "credits5"]
|
||||
BGM = "Credits"
|
||||
SCROLL_SPEED = 62 # Pixels per second , ajuster pour fitter avec la musique
|
||||
SECONDS_PER_BACKGROUND = 4
|
||||
TEXT_OUTLINE_COLOR = Color.new(0, 0, 128, 255)
|
||||
TEXT_BASE_COLOR = Color.new(255, 255, 255, 255)
|
||||
TEXT_SHADOW_COLOR = Color.new(0, 0, 0, 100)
|
||||
NB_SPRITES_TO_PRELOAD = 30
|
||||
|
||||
TOTAL_NB_FRAMES = 4000 #set manually, depends on music length
|
||||
|
||||
FUSION_SPRITES_MAX_OPACITY=200
|
||||
NB_FRAMES_AT_MAX_OPACITY=30
|
||||
|
||||
# This next piece of code is the credits.
|
||||
# Start Editing
|
||||
CREDIT = <<_END_
|
||||
|
||||
Pokémon Infinite Fusion
|
||||
By Chardub (Frogzilla)
|
||||
|
||||
Programming / Game design:
|
||||
Chardub
|
||||
|
||||
Fused Pokemon Sprites :
|
||||
Japeal - Pokefusion 2
|
||||
http://japeal.com/pkm
|
||||
|
||||
Special thanks to Aegide and Reizod for
|
||||
helping to download the autogenerated sprites
|
||||
and to the owners of Japeal for accepting to
|
||||
share their sprites.
|
||||
|
||||
Maps:
|
||||
Chardub
|
||||
Kiwikelly
|
||||
Some of the maps were based on work by:
|
||||
BenGames, Zeak6464
|
||||
|
||||
Gameplay / Story :
|
||||
Chardub
|
||||
Kiwikelly
|
||||
|
||||
Title screen and logo
|
||||
Doctor Miawoo
|
||||
|
||||
Custom sprites collecting and handling
|
||||
Kiwikelly, Payapon, Thornsoflight
|
||||
|
||||
Discord custom sprites coordination
|
||||
avianAnnihilator<s>Blaquaza
|
||||
BéBoutton<s>CaBiNE
|
||||
CoramSun<s>hero.drawing
|
||||
Howls<s>Ignus
|
||||
Kiwi<s>Maelmc
|
||||
Milchik the Miltank<s>Payapon
|
||||
Pix<s>Rosemagwin
|
||||
Thornsoflight
|
||||
|
||||
All of the custom fused Pokémon sprites
|
||||
were made by various members of the
|
||||
Pokémon Infinite Fusion Discord
|
||||
|
||||
Including significant contributions from:
|
||||
|
||||
{SPRITER_CREDITS}
|
||||
|
||||
Other custom graphics:
|
||||
Kiwikelly<s>Knuckles
|
||||
UnworthyPie<s>Doctor Miawoo
|
||||
Chardub<s>TCGrunler#4583
|
||||
|
||||
Elite 4 rematch teams
|
||||
duskrd<s>anaconja<s>taraline
|
||||
|
||||
French translation
|
||||
anthonygourmand
|
||||
locpic_
|
||||
blood.wolf58 (Willi)
|
||||
|
||||
The following free ressources were also used
|
||||
with their respective authors' consent:
|
||||
|
||||
Public use tileset graphics:
|
||||
Alucus BoOmxBiG<s>chimcharsfireworkd
|
||||
EpicDay<s>EternalTakai
|
||||
Gallanty Heavy-Metal-Lover<s>Hek-el-grande
|
||||
DirtyWiggles<s>iametrine
|
||||
Jorginho<s>kizemaru-kurunosuke
|
||||
KKKaito<s>kyle-dove
|
||||
Minorthreat0987<s>Phyromatical
|
||||
Pokemon-Diamond<s>rayd12smitty
|
||||
Rossay<s>Shiney570
|
||||
Spacemotion<s>Speedialga
|
||||
ThatsSoWitty Thurpok<s>TyranitarDark
|
||||
UltimoSpriter<s>WesleyFG
|
||||
|
||||
Public use music:
|
||||
Pokeli, TailDoll666100
|
||||
Kazune Sawatari, sentsinkantéun,
|
||||
Nanashima, CharizardTheMaster, The Zame Jack
|
||||
|
||||
{INSERTS_PLUGIN_CREDITS_DO_NOT_REMOVE}
|
||||
|
||||
"Pokémon Essentials" was created by:
|
||||
Flameguru
|
||||
Poccil (Peter O.)
|
||||
Maruno
|
||||
|
||||
With contributions from:
|
||||
AvatarMonkeyKirby<s>MiDas Mike
|
||||
Boushy<s>Near Fantastica
|
||||
Brother1440<s>PinkMan
|
||||
FL.<s>Popper
|
||||
Genzai Kawakami<s>Rataime
|
||||
Harshboy<s>SoundSpawn
|
||||
help-14<s>the__end
|
||||
IceGod64<s>Venom12
|
||||
Jacob O. Wobbrock<s>Wachunga
|
||||
KitsuneKouta<s>xLeD
|
||||
Lisa Anthony<s>
|
||||
and everyone else who helped out
|
||||
|
||||
"mkxp-z" by:
|
||||
Roza
|
||||
Based on MKXP by Ancurio et al.
|
||||
|
||||
"RPG Maker XP" by:
|
||||
Enterbrain
|
||||
|
||||
This game was inspired by the original
|
||||
fusion generator:
|
||||
alexonsager.alexonsager.net
|
||||
|
||||
All generated fusion sprites in this game
|
||||
come from the Pokémon Fusion Generator:
|
||||
https://japeal.com/pkm/
|
||||
|
||||
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.
|
||||
_END_
|
||||
# Stop Editing
|
||||
|
||||
def main
|
||||
endCredits() if $PokemonSystem.on_mobile
|
||||
#-------------------------------
|
||||
# Animated Background Setup
|
||||
#-------------------------------
|
||||
@counter = 0.0 # Counts time elapsed since the background image changed
|
||||
@bg_index = 0
|
||||
@bitmap_height = Graphics.height # For a single credits text bitmap
|
||||
@trim = Graphics.height / 10
|
||||
# Number of game frames per background frame
|
||||
@realOY = -(Graphics.height - @trim)
|
||||
@customSpritesList = getSpritesList()
|
||||
#-------------------------------
|
||||
# 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.gsub!(/{SPRITER_CREDITS}/, format_names_for_game_credits())
|
||||
|
||||
credit_lines = CREDIT.split(/\n/)
|
||||
|
||||
#-------------------------------
|
||||
# Make background and text sprites
|
||||
#-------------------------------
|
||||
viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||
viewport.z = 99999
|
||||
text_viewport = Viewport.new(0, @trim, Graphics.width, Graphics.height - (@trim * 2))
|
||||
text_viewport.z = 99999
|
||||
@background_sprite = IconSprite.new(0, 0)
|
||||
@background_sprite.setBitmap("Graphics/Titles/" + BACKGROUNDS_LIST[0])
|
||||
@credit_sprites = []
|
||||
@total_height = credit_lines.size * 32
|
||||
lines_per_bitmap = @bitmap_height / 32
|
||||
num_bitmaps = (credit_lines.size.to_f / lines_per_bitmap).ceil
|
||||
for i in 0...num_bitmaps
|
||||
credit_bitmap = Bitmap.new(Graphics.width, @bitmap_height)
|
||||
pbSetSystemFont(credit_bitmap)
|
||||
for j in 0...lines_per_bitmap
|
||||
line = credit_lines[i * lines_per_bitmap + j]
|
||||
next if !line
|
||||
line = line.split("<s>")
|
||||
xpos = 0
|
||||
align = 1 # Centre align
|
||||
linewidth = Graphics.width
|
||||
for k in 0...line.length
|
||||
if line.length > 1
|
||||
xpos = (k == 0) ? 0 : 20 + Graphics.width / 2
|
||||
align = (k == 0) ? 2 : 0 # Right align : left align
|
||||
linewidth = Graphics.width / 2 - 20
|
||||
end
|
||||
credit_bitmap.font.color = TEXT_SHADOW_COLOR
|
||||
credit_bitmap.draw_text(xpos, j * 32 + 8, linewidth, 32, line[k], align)
|
||||
credit_bitmap.font.color = TEXT_OUTLINE_COLOR
|
||||
credit_bitmap.draw_text(xpos + 2, j * 32 - 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, j * 32 - 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, j * 32 - 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos + 2, j * 32, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, j * 32, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos + 2, j * 32 + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, j * 32 + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, j * 32 + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.font.color = TEXT_BASE_COLOR
|
||||
credit_bitmap.draw_text(xpos, j * 32, linewidth, 32, line[k], align)
|
||||
end
|
||||
end
|
||||
credit_sprite = Sprite.new(text_viewport)
|
||||
credit_sprite.bitmap = credit_bitmap
|
||||
credit_sprite.z = 9998
|
||||
credit_sprite.oy = @realOY - @bitmap_height * i
|
||||
@credit_sprites[i] = credit_sprite
|
||||
end
|
||||
#-------------------------------
|
||||
# Setup
|
||||
#-------------------------------
|
||||
# Stops all audio but background music
|
||||
previousBGM = $game_system.getPlayingBGM
|
||||
pbMEStop
|
||||
pbBGSStop
|
||||
pbSEStop
|
||||
pbBGMFade(2.0)
|
||||
pbBGMPlay(BGM)
|
||||
Graphics.transition(20)
|
||||
loop do
|
||||
Graphics.update
|
||||
Input.update
|
||||
update
|
||||
break if $scene != self
|
||||
end
|
||||
pbBGMFade(2.0)
|
||||
Graphics.freeze
|
||||
viewport.color = Color.new(0, 0, 0, 255) # Ensure screen is black
|
||||
Graphics.transition(20, "fadetoblack")
|
||||
@background_sprite.dispose
|
||||
@credit_sprites.each { |s| s.dispose if s }
|
||||
text_viewport.dispose
|
||||
viewport.dispose
|
||||
$PokemonGlobal.creditsPlayed = true
|
||||
pbBGMPlay(previousBGM)
|
||||
end
|
||||
|
||||
def getSpritesList()
|
||||
spritesList = []
|
||||
$PokemonGlobal.alt_sprite_substitutions.each_value do |value|
|
||||
if value.is_a?(PIFSprite)
|
||||
spritesList << value
|
||||
end
|
||||
end
|
||||
selected_spritesList = spritesList.sample(NB_SPRITES_TO_PRELOAD)
|
||||
spriteLoader = BattleSpriteLoader.new
|
||||
for sprite in selected_spritesList
|
||||
spriteLoader.preload(sprite)
|
||||
end
|
||||
|
||||
return selected_spritesList
|
||||
end
|
||||
|
||||
# Check if the credits should be cancelled
|
||||
def cancel?
|
||||
if Input.trigger?(Input::USE) && $PokemonGlobal.creditsPlayed
|
||||
endCredits
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def endCredits
|
||||
$scene = Scene_Map.new
|
||||
pbBGMFade(1.0)
|
||||
end
|
||||
|
||||
# Checks if credits bitmap has reached its ending point
|
||||
def last?
|
||||
if @realOY > @total_height + @trim
|
||||
$scene = ($game_map) ? Scene_Map.new : nil
|
||||
pbBGMFade(2.0)
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def update
|
||||
delta = Graphics.delta_s
|
||||
@counter += delta
|
||||
@sprites_counter = 0 if !@sprites_counter
|
||||
#@background_sprite.setBitmap("Graphics/Titles/" + BACKGROUNDS_LIST[@bg_index])
|
||||
# # Go to next slide
|
||||
@frames_counter = 0 if !@frames_counter
|
||||
@frames_counter+=1
|
||||
|
||||
stopShowingSprites = @frames_counter >= (TOTAL_NB_FRAMES-300)
|
||||
pbBGSStop if @frames_counter > TOTAL_NB_FRAMES
|
||||
|
||||
spriteLoader = BattleSpriteLoader.new
|
||||
if @counter >= SECONDS_PER_BACKGROUND && @customSpritesList.length > 0 && !stopShowingSprites
|
||||
@sprites_counter=0
|
||||
randomSprite = @customSpritesList.sample
|
||||
@customSpritesList.delete(randomSprite)
|
||||
@background_sprite.setBitmapDirectly(spriteLoader.load_pif_sprite(randomSprite))
|
||||
@background_sprite.x = rand(0..300)
|
||||
@background_sprite.y = rand(0..200)
|
||||
@counter -= SECONDS_PER_BACKGROUND
|
||||
@background_sprite.opacity = 50
|
||||
@fadingIn=true
|
||||
end
|
||||
if @fadingIn
|
||||
if @background_sprite.opacity < FUSION_SPRITES_MAX_OPACITY
|
||||
@background_sprite.opacity +=5
|
||||
else
|
||||
@fadingIn=false
|
||||
end
|
||||
|
||||
else
|
||||
@sprites_counter += 1
|
||||
if @sprites_counter >= NB_FRAMES_AT_MAX_OPACITY
|
||||
@background_sprite.opacity-=3
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return if cancel?
|
||||
return if last?
|
||||
@realOY += SCROLL_SPEED * delta
|
||||
@credit_sprites.each_with_index { |s, i| s.oy = @realOY - @bitmap_height * i }
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,178 @@
|
||||
class HallOfFameSimple_Scene < HallOfFame_Scene
|
||||
|
||||
#Hardcoded for Hoenn Pt.1
|
||||
NB_QUESTS_AVAILABLE = 20 #Doesn't count main quests or unavailable quests.
|
||||
NB_TEAM_QUESTS_AVAILABLE = 7
|
||||
NB_QUESTS_PRODUCER = 7
|
||||
|
||||
TOTAL_NPC_TRAINERS = 101 #Includes rival, wally, gym leaders, but not non-rematchable trainers like team magma, move tutors, etc.
|
||||
|
||||
ANIMATION = true
|
||||
ENTRYMUSIC = "part1_end"
|
||||
|
||||
def getHallOfFameBackground
|
||||
return "Graphics/Pictures/HallOfFame/hoenn_part1"
|
||||
end
|
||||
|
||||
def saveHallEntry
|
||||
for i in 0...$Trainer.party.length
|
||||
@hallEntry.push($Trainer.party[i].clone) if !$Trainer.party[i].egg? || ALLOWEGGS
|
||||
end
|
||||
end
|
||||
def pbUpdateAnimation
|
||||
if @battlerIndex <= @hallEntry.size
|
||||
if @xmovement[@battlerIndex] != 0 || @ymovement[@battlerIndex] != 0
|
||||
spriteIndex = (@battlerIndex < @hallEntry.size) ? @battlerIndex : -1
|
||||
moveSprite(spriteIndex)
|
||||
else
|
||||
@battlerIndex += 1
|
||||
if @battlerIndex <= @hallEntry.size
|
||||
# If it is a pokémon, write the pokémon text, wait the
|
||||
# ENTRYWAITTIME and goes to the next battler
|
||||
# @hallEntry[@battlerIndex - 1].play_cry
|
||||
# writePokemonData(@hallEntry[@battlerIndex - 1])
|
||||
# (ENTRYWAITTIME * Graphics.frame_rate / 20).times do
|
||||
# Graphics.update
|
||||
# Input.update
|
||||
# pbUpdate
|
||||
# end
|
||||
if @battlerIndex < @hallEntry.size # Preparates the next battler
|
||||
setPokemonSpritesOpacity(@battlerIndex, OPACITY)
|
||||
@sprites["overlay"].bitmap.clear
|
||||
else
|
||||
# Show the welcome message and preparates the trainer
|
||||
setPokemonSpritesOpacity(-1)
|
||||
writeWelcome
|
||||
createTrainerBattler
|
||||
(ENTRYWAITTIME * 2 * Graphics.frame_rate / 20).times do
|
||||
moveSprite(-1)
|
||||
Graphics.update
|
||||
Input.update
|
||||
pbUpdate
|
||||
end
|
||||
|
||||
writeInfo
|
||||
while !(waitForInput)
|
||||
Graphics.update
|
||||
Input.update
|
||||
pbUpdate
|
||||
end
|
||||
setPokemonSpritesOpacity(-1, OPACITY) # if !@singlerow
|
||||
end
|
||||
end
|
||||
end
|
||||
elsif @battlerIndex > @hallEntry.size
|
||||
# Write the trainer data and fade
|
||||
writeTrainerData
|
||||
while !(waitForInput)
|
||||
Graphics.update
|
||||
Input.update
|
||||
pbUpdate
|
||||
end
|
||||
fadeSpeed = ((Math.log(2 ** 12) - Math.log(FINALFADESPEED)) / Math.log(2)).floor
|
||||
pbBGMFade((2 ** fadeSpeed).to_f / 20) if @useMusic
|
||||
slowFadeOut(@sprites, fadeSpeed) { pbUpdate }
|
||||
@alreadyFadedInEnd = true
|
||||
@battlerIndex += 1
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def pbStartSceneEntry
|
||||
@singlerow = true
|
||||
pbStartScene
|
||||
@useMusic = (ENTRYMUSIC && ENTRYMUSIC != "")
|
||||
pbBGMPlay(ENTRYMUSIC) if @useMusic
|
||||
saveHallEntry
|
||||
@xmovement = Array.new(@hallEntry.size, 0)
|
||||
@ymovement = Array.new(@hallEntry.size, 0)
|
||||
createBattlers(false)
|
||||
pbFadeInAndShow(@sprites) { pbUpdate }
|
||||
end
|
||||
|
||||
def writeTrainerData
|
||||
lefttext = _INTL("<ac>PIF2 (Part 1) - Completion </ac>")
|
||||
lefttext += _INTL("{1} ({2})<br>", getCurrentGameMode, getDisplayDifficulty)
|
||||
lefttext += _INTL("Pokédex:<r>{1} / {2}<br>", $Trainer.pokedex.owned_count, NB_POKEMON)
|
||||
lefttext += _INTL("Side Quests:<r>{1}<br>", getSidequestsStats())
|
||||
lefttext += _INTL("Hats Unlocked:<r>{1} / {2}<br>", $Trainer.unlocked_hats.length, $PokemonGlobal.hats_data.length)
|
||||
lefttext += _INTL("Clothes Unlocked:<r>{1} / {2}<br>", $Trainer.unlocked_clothes.length, $PokemonGlobal.clothes_data.length)
|
||||
nb_friends = listNPCFriends().length
|
||||
lefttext += _INTL("Trainers Befriended:<r>{1}/{2}<br>", nb_friends,TOTAL_NPC_TRAINERS)
|
||||
|
||||
for n in 0...@hallEntry.size
|
||||
if @sprites["pokemon#{n}"]
|
||||
@sprites["pokemon#{n}"].y += 136
|
||||
@sprites["pokemon#{n}"].opacity = 255
|
||||
end
|
||||
end
|
||||
@sprites["trainer"].y += 136 if @sprites["trainer"]
|
||||
|
||||
@sprites["hallbars"].visible = false if @sprites["hallbars"]
|
||||
@sprites["overlay"].bitmap.clear if @sprites["overlay"]
|
||||
@sprites["messagebox"] = Window_AdvancedTextPokemon.new(lefttext)
|
||||
@sprites["messagebox"].opacity=200
|
||||
@sprites["messagebox"].viewport = @viewport
|
||||
@sprites["messagebox"].width = 192 if @sprites["messagebox"].width < 192
|
||||
#@sprites["msgwindow"] = pbCreateMessageWindow(@viewport)
|
||||
end
|
||||
|
||||
|
||||
|
||||
def writeWelcome
|
||||
overlay = @sprites["overlay"].bitmap
|
||||
overlay.clear
|
||||
pbDrawTextPositions(overlay, [[_INTL("Pokémon Infinite Fusion 2: Hoenn"),
|
||||
Graphics.width / 2, Graphics.height - 80, 2, BASECOLOR, SHADOWCOLOR]])
|
||||
pbDrawTextPositions(overlay, [[_INTL("Part 1"),
|
||||
Graphics.width / 2, Graphics.height - 50, 2, BASECOLOR, SHADOWCOLOR]])
|
||||
end
|
||||
def writeInfo
|
||||
overlay = @sprites["overlay"].bitmap
|
||||
overlay.clear
|
||||
pbDrawTextPositions(overlay, [[_INTL("Pokémon Infinite Fusion 2: Hoenn (Part 1)"),
|
||||
Graphics.width / 2, Graphics.height - 80, 2, BASECOLOR, SHADOWCOLOR]])
|
||||
writeDate(overlay, 120, Graphics.height - 50)
|
||||
writeGameMode(overlay, (Graphics.width / 2) + 100, Graphics.height - 50)
|
||||
end
|
||||
|
||||
#List every battled trainer that is at at least 1 heart
|
||||
def listNPCFriends
|
||||
fixRivalsFriendship
|
||||
friends_list = []
|
||||
$PokemonGlobal.battledTrainers.each do |id, trainer|
|
||||
friends_list << id if trainer.friendship_level >= 1
|
||||
end
|
||||
return friends_list
|
||||
end
|
||||
|
||||
#set rival friendships if not already set (for older versions compatibility)
|
||||
def fixRivalsFriendship
|
||||
rival = getRebattledTrainerFromKey(BATTLED_TRAINER_RIVAL_KEY)
|
||||
wally = getRebattledTrainerFromKey(BATTLED_TRAINER_WALLY_KEY)
|
||||
if rival.friendship_level == 0
|
||||
rival.friendship_level = 2
|
||||
$PokemonGlobal.battledTrainers[BATTLED_TRAINER_RIVAL_KEY] = rival
|
||||
end
|
||||
if wally.friendship_level == 0
|
||||
wally.friendship_level = 1
|
||||
$PokemonGlobal.battledTrainers[BATTLED_TRAINER_WALLY_KEY] = wally
|
||||
end
|
||||
end
|
||||
|
||||
def getSidequestsStats
|
||||
nb_completed = get_completed_quests(false,false).length
|
||||
nb_total = NB_QUESTS_AVAILABLE + NB_QUESTS_PRODUCER + NB_TEAM_QUESTS_AVAILABLE
|
||||
message = _INTL("{1} / {2}",nb_completed, nb_total)
|
||||
return message
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
def pbHallOfFameSimple
|
||||
scene = HallOfFameSimple_Scene.new
|
||||
screen = HallOfFameScreen.new(scene)
|
||||
screen.pbStartScreenEntry
|
||||
end
|
||||
@@ -0,0 +1,461 @@
|
||||
#==============================================================================
|
||||
# * Scene_Credits
|
||||
#------------------------------------------------------------------------------
|
||||
# Scrolls the credits you make below. Original Author unknown.
|
||||
#
|
||||
## Edited by MiDas Mike so it doesn't play over the Title, but runs by calling
|
||||
# the following:
|
||||
# $scene = Scene_Credits.new
|
||||
#
|
||||
## New Edit 3/6/2007 11:14 PM by AvatarMonkeyKirby.
|
||||
# Ok, what I've done is changed the part of the script that was supposed to make
|
||||
# the credits automatically end so that way they actually end! Yes, they will
|
||||
# actually end when the credits are finished! So, that will make the people you
|
||||
# should give credit to now is: Unknown, MiDas Mike, and AvatarMonkeyKirby.
|
||||
# -sincerly yours,
|
||||
# Your Beloved
|
||||
# Oh yea, and I also added a line of code that fades out the BGM so it fades
|
||||
# sooner and smoother.
|
||||
#
|
||||
## New Edit 24/1/2012 by Maruno.
|
||||
# Added the ability to split a line into two halves with <s>, with each half
|
||||
# aligned towards the centre. Please also credit me if used.
|
||||
#
|
||||
## New Edit 22/2/2012 by Maruno.
|
||||
# Credits now scroll properly when played with a zoom factor of 0.5. Music can
|
||||
# now be defined. Credits can't be skipped during their first play.
|
||||
#
|
||||
## New Edit 25/3/2020 by Maruno.
|
||||
# Scroll speed is now independent of frame rate. Now supports non-integer values
|
||||
# for SCROLL_SPEED.
|
||||
#
|
||||
## New Edit 21/8/2020 by Marin.
|
||||
# Now automatically inserts the credits from the plugins that have been
|
||||
# registered through the PluginManager module.
|
||||
#==============================================================================
|
||||
class Scene_Credits
|
||||
# Backgrounds to show in credits. Found in Graphics/Titles/ folder
|
||||
BACKGROUNDS_LIST_HOENN = [
|
||||
"Graphics/Battlebacks/battlebg/ocean_night",
|
||||
"Graphics/Battlebacks/battlebg/ocean",
|
||||
"Graphics/Battlebacks/battlebg/oceanicmuseum",
|
||||
"Graphics/Battlebacks/battlebg/oceanseaweed_eve",
|
||||
"Graphics/Battlebacks/battlebg/oceanseaweed_night",
|
||||
"Graphics/Battlebacks/battlebg/oceanseaweed",
|
||||
"Graphics/Battlebacks/battlebg/ocean_eve",
|
||||
"Graphics/Battlebacks/battlebg/mauvilletunnel",
|
||||
"Graphics/Battlebacks/battlebg/pond",
|
||||
"Graphics/Battlebacks/battlebg/pond_night",
|
||||
"Graphics/Battlebacks/battlebg/pond_eve",
|
||||
"Graphics/Battlebacks/battlebg/field_night",
|
||||
"Graphics/Battlebacks/battlebg/field",
|
||||
"Graphics/Battlebacks/battlebg/cyclingroad_eve",
|
||||
"Graphics/Battlebacks/battlebg/cyclingroad_night",
|
||||
"Graphics/Battlebacks/battlebg/cyclingroad",
|
||||
"Graphics/Battlebacks/battlebg/cave_eve",
|
||||
"Graphics/Battlebacks/battlebg/cave_night",
|
||||
"Graphics/Battlebacks/battlebg/cave-granite_night",
|
||||
"Graphics/Battlebacks/battlebg/cave-granite",
|
||||
"Graphics/Battlebacks/battlebg/cave",
|
||||
"Graphics/Battlebacks/battlebg/beach_eve",
|
||||
"Graphics/Battlebacks/battlebg/beach_night",
|
||||
"Graphics/Battlebacks/battlebg/beachspecial_night",
|
||||
"Graphics/Battlebacks/battlebg/beach",
|
||||
"Graphics/Battlebacks/battlebg/field_eve",
|
||||
"Graphics/Battlebacks/battlebg/cave.png",
|
||||
"Graphics/Battlebacks/battlebg/beach_eve.png",
|
||||
"Graphics/Battlebacks/battlebg/beach_night.png",
|
||||
"Graphics/Battlebacks/battlebg/beach.png",
|
||||
"Graphics/Battlebacks/battlebg/field_eve.png",
|
||||
"Graphics/Battlebacks/battlebg/mangroves.png",
|
||||
"Graphics/Battlebacks/battlebg/mangroves_eve.png",
|
||||
"Graphics/Battlebacks/battlebg/mangroves_night.png",
|
||||
"Graphics/Battlebacks/battlebg/beach.png",
|
||||
"Graphics/Battlebacks/battlebg/beach.png",
|
||||
"Graphics/Battlebacks/battlebg/mountain.png",
|
||||
"Graphics/Battlebacks/battlebg/mountain_eve.png",
|
||||
"Graphics/Battlebacks/battlebg/mountain_night.png",
|
||||
"Graphics/Battlebacks/battlebg/forest.png",
|
||||
"Graphics/Battlebacks/battlebg/forest_night.png",
|
||||
"Graphics/Battlebacks/battlebg/forest_eve.png",
|
||||
"Graphics/Battlebacks/battlebg/gym_2.png",
|
||||
"Graphics/Battlebacks/battlebg/gym_3.png",
|
||||
|
||||
#"Graphics/Titles/bg_back"
|
||||
]
|
||||
BACKGROUNDS_LIST_KANTO = [""]
|
||||
|
||||
BGM = "Credits"
|
||||
KANTO_SCROLL_SPEED = 70 # Pixels per second , ajuster pour fitter avec la musique
|
||||
HOENN_SCROLL_SPEED = 52
|
||||
|
||||
SECONDS_PER_BACKGROUND = 8
|
||||
SECONDS_PER_POKEMON_SPRITE = 6
|
||||
TEXT_OUTLINE_COLOR = Color.new(0, 0, 128, 255)
|
||||
TEXT_BASE_COLOR = Color.new(255, 255, 255, 255)
|
||||
TEXT_SHADOW_COLOR = Color.new(0, 0, 0, 100)
|
||||
|
||||
TEXT_TITLE_COLOR = Color.new(154, 216, 8)
|
||||
TEXT_TITLE_OUTLINE_COLOR = Color.new(0, 100, 0, 255)
|
||||
|
||||
NB_SPRITES_TO_PRELOAD = 25
|
||||
|
||||
TOTAL_NB_FRAMES = 4000 # set manually, depends on music length
|
||||
|
||||
FUSION_SPRITES_MAX_OPACITY = 200
|
||||
NB_FRAMES_AT_MAX_OPACITY = 30
|
||||
|
||||
def main
|
||||
endCredits() if $PokemonSystem.on_mobile
|
||||
|
||||
@counter = 0.0
|
||||
@bg_index = 0
|
||||
@bitmap_height = Graphics.height
|
||||
@trim = Graphics.height / 10
|
||||
@realOY = -(Graphics.height - @trim)
|
||||
@customSpritesList = getSpritesList()
|
||||
if Settings::KANTO
|
||||
@scroll_speed = KANTO_SCROLL_SPEED
|
||||
@bg_list = BACKGROUNDS_LIST_KANTO
|
||||
else
|
||||
@scroll_speed = HOENN_SCROLL_SPEED
|
||||
@bg_list = BACKGROUNDS_LIST_HOENN
|
||||
end
|
||||
@bg_queue = @bg_list.shuffle
|
||||
|
||||
@bg_transitioning = :fade_in
|
||||
@bg_transition_timer = 0.0
|
||||
|
||||
#-------------------------------
|
||||
# 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
|
||||
credits_version = Settings::KANTO ? CREDIT_KANTO : CREDIT_HOENN
|
||||
credits_version.gsub!(/\{INSERTS_PLUGIN_CREDITS_DO_NOT_REMOVE\}/, plugin_credits)
|
||||
credits_version.gsub!(/{SPRITER_CREDITS}/, format_names_for_game_credits())
|
||||
credits_version.gsub!(/{CC_CREDITS}/, format_character_customization_names_for_game_credits(50))
|
||||
credit_lines = credits_version.split(/\n/)
|
||||
|
||||
#-------------------------------
|
||||
# Make background and text sprites
|
||||
#-------------------------------
|
||||
viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||
viewport.z = 99999
|
||||
text_viewport = Viewport.new(0, @trim, Graphics.width, Graphics.height - (@trim * 2))
|
||||
text_viewport.z = 99999
|
||||
|
||||
# Single @bg creation — zoom and drift applied immediately
|
||||
@bg = IconSprite.new(0, 0)
|
||||
@bg.setBitmap(@bg_queue.shift) # Pop first image off the queue
|
||||
@bg.opacity = 0
|
||||
setup_bg_zoom_and_drift(@bg)
|
||||
|
||||
@pokemon_sprite = IconSprite.new(0, 0)
|
||||
@pokemon_sprite.z = @bg.z + 1
|
||||
@pokemon_sprite.setBitmap(@bg_queue[0] || @bg_list[0]) # placeholder bitmap
|
||||
@pokemon_sprite.opacity = 0
|
||||
|
||||
@credit_sprites = []
|
||||
@total_height = credit_lines.size * 32
|
||||
lines_per_bitmap = @bitmap_height / 32
|
||||
num_bitmaps = (credit_lines.size.to_f / lines_per_bitmap).ceil
|
||||
for i in 0...num_bitmaps
|
||||
credit_bitmap = Bitmap.new(Graphics.width, @bitmap_height)
|
||||
pbSetSystemFont(credit_bitmap)
|
||||
for j in 0...lines_per_bitmap
|
||||
line = credit_lines[i * lines_per_bitmap + j]
|
||||
next if !line
|
||||
line = line.split("<s>")
|
||||
xpos = 0
|
||||
align = 1 # Centre align
|
||||
linewidth = Graphics.width
|
||||
for k in 0...line.length
|
||||
if line.length > 1
|
||||
xpos = (k == 0) ? 0 : 20 + Graphics.width / 2
|
||||
align = (k == 0) ? 2 : 0
|
||||
linewidth = Graphics.width / 2 - 20
|
||||
end
|
||||
|
||||
# Strip <title> tag if present; use title color for the fill pass
|
||||
text_to_draw = line[k]
|
||||
is_title = false
|
||||
if text_to_draw =~ /\A<title>(.*)\z/m
|
||||
is_title = true
|
||||
text_to_draw = $1
|
||||
end
|
||||
|
||||
base_color = is_title ? TEXT_TITLE_COLOR : TEXT_BASE_COLOR
|
||||
outline_color = is_title ? TEXT_TITLE_OUTLINE_COLOR : TEXT_OUTLINE_COLOR
|
||||
|
||||
credit_bitmap.font.color = TEXT_SHADOW_COLOR
|
||||
credit_bitmap.draw_text(xpos, j * 32 + 4, linewidth, 32, text_to_draw, align)
|
||||
credit_bitmap.font.color = outline_color
|
||||
credit_bitmap.draw_text(xpos + 2, j * 32 - 2, linewidth, 32, text_to_draw, align)
|
||||
credit_bitmap.draw_text(xpos, j * 32 - 2, linewidth, 32, text_to_draw, align)
|
||||
credit_bitmap.draw_text(xpos - 2, j * 32 - 2, linewidth, 32, text_to_draw, align)
|
||||
credit_bitmap.draw_text(xpos + 2, j * 32, linewidth, 32, text_to_draw, align)
|
||||
credit_bitmap.draw_text(xpos - 2, j * 32, linewidth, 32, text_to_draw, align)
|
||||
credit_bitmap.draw_text(xpos + 2, j * 32 + 2, linewidth, 32, text_to_draw, align)
|
||||
credit_bitmap.draw_text(xpos, j * 32 + 2, linewidth, 32, text_to_draw, align)
|
||||
credit_bitmap.draw_text(xpos - 2, j * 32 + 2, linewidth, 32, text_to_draw, align)
|
||||
credit_bitmap.font.color = base_color
|
||||
credit_bitmap.draw_text(xpos, j * 32, linewidth, 32, text_to_draw, align)
|
||||
end
|
||||
end
|
||||
credit_sprite = Sprite.new(text_viewport)
|
||||
credit_sprite.bitmap = credit_bitmap
|
||||
credit_sprite.z = 9998
|
||||
credit_sprite.oy = @realOY - @bitmap_height * i
|
||||
@credit_sprites[i] = credit_sprite
|
||||
end
|
||||
|
||||
#-------------------------------
|
||||
# Setup
|
||||
#-------------------------------
|
||||
# Stops all audio but background music
|
||||
previousBGM = $game_system.getPlayingBGM
|
||||
pbMEStop
|
||||
pbBGSStop
|
||||
pbSEStop
|
||||
pbBGMFade(2.0)
|
||||
pbBGMPlay(BGM)
|
||||
Graphics.transition(20)
|
||||
loop do
|
||||
Graphics.update
|
||||
Input.update
|
||||
update
|
||||
break if $scene != self
|
||||
end
|
||||
pbBGMFade(2.0)
|
||||
Graphics.freeze
|
||||
viewport.color = Color.new(0, 0, 0, 255) # Ensure screen is black
|
||||
Graphics.transition(20, "fadetoblack")
|
||||
@pokemon_sprite.dispose
|
||||
@bg.dispose
|
||||
@credit_sprites.each { |s| s.dispose if s }
|
||||
text_viewport.dispose
|
||||
viewport.dispose
|
||||
$PokemonGlobal.creditsPlayed = true
|
||||
pbBGMPlay(previousBGM)
|
||||
end
|
||||
|
||||
def setup_pokemon_drift
|
||||
# Copy background velocity exactly so pokemon moves with the background
|
||||
@pokemon_drift_vx = @drift_vx
|
||||
@pokemon_drift_vy = @drift_vy
|
||||
@pokemon_drift_x = @pokemon_sprite.x.to_f
|
||||
@pokemon_drift_y = @pokemon_sprite.y.to_f
|
||||
end
|
||||
def setup_bg_zoom_and_drift(sprite)
|
||||
zoom = 1.5
|
||||
sprite.zoom_x = zoom
|
||||
sprite.zoom_y = zoom
|
||||
|
||||
sprite.x = -(Graphics.width / 2)
|
||||
sprite.y = -(Graphics.height / 2) + 180
|
||||
|
||||
speed = 16.0
|
||||
angle = rand * 2 * Math::PI
|
||||
@drift_vx = Math.cos(angle) * speed
|
||||
@drift_vy = Math.sin(angle) * speed
|
||||
|
||||
@drift_x = sprite.x.to_f
|
||||
@drift_y = sprite.y.to_f
|
||||
end
|
||||
|
||||
# def getSpritesList()
|
||||
# spritesList = []
|
||||
# $PokemonSystem.alt_sprite_substitutions.each_value do |value|
|
||||
# if value.is_a?(PIFSprite)
|
||||
# spritesList << value
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# selected_spritesList = spritesList.sample(NB_SPRITES_TO_PRELOAD)
|
||||
# spriteLoader = BattleSpriteLoader.new
|
||||
# for sprite in selected_spritesList
|
||||
# spriteLoader.preload(sprite)
|
||||
# end
|
||||
#
|
||||
# return selected_spritesList
|
||||
# end
|
||||
|
||||
def getSpritesList()
|
||||
spriteLoader = BattleSpriteLoader.new
|
||||
seen_pairs = []
|
||||
|
||||
fusions = $Trainer.pokedex.list_seen_fusions
|
||||
fusions.each_with_index do |bodies, head_id|
|
||||
next if bodies.nil? || head_id == 0
|
||||
bodies.each_with_index do |seen, body_id|
|
||||
next if body_id == 0
|
||||
seen_pairs << [head_id, body_id] if seen == true
|
||||
end
|
||||
end
|
||||
|
||||
return [] if seen_pairs.empty?
|
||||
|
||||
sample_size = [NB_SPRITES_TO_PRELOAD, seen_pairs.size].min
|
||||
chosen_pairs = seen_pairs.sample(sample_size)
|
||||
|
||||
chosen_pairs.map do |head_id, body_id|
|
||||
head_species = GameData::Species.get(head_id).species
|
||||
body_species = GameData::Species.get(body_id).species
|
||||
sprite = spriteLoader.obtain_pif_sprite(
|
||||
GameData::Species.get(fusionOf(head_species, body_species))
|
||||
)
|
||||
spriteLoader.preload(sprite)
|
||||
sprite
|
||||
end
|
||||
end
|
||||
|
||||
# Check if the credits should be cancelled
|
||||
def cancel?
|
||||
if Input.trigger?(Input::USE) && $PokemonGlobal.creditsPlayed
|
||||
endCredits
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def endCredits
|
||||
$scene = Scene_Map.new
|
||||
pbBGMFade(1.0)
|
||||
end
|
||||
|
||||
# Checks if credits bitmap has reached its ending point
|
||||
def last?
|
||||
if @realOY > @total_height + @trim
|
||||
$scene = ($game_map) ? Scene_Map.new : nil
|
||||
pbBGMFade(2.0)
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def update
|
||||
delta = Graphics.delta_s
|
||||
@counter += delta
|
||||
@bg_transition_timer += delta
|
||||
|
||||
fade_duration = 0.8 # seconds to fade out or in
|
||||
hold_duration = SECONDS_PER_BACKGROUND - (fade_duration * 2)
|
||||
|
||||
case @bg_transitioning
|
||||
when :fade_in
|
||||
progress = [@bg_transition_timer / fade_duration, 1.0].min
|
||||
@bg.opacity = (progress * 200).to_i # max opacity 200 for subtle look
|
||||
if @bg_transition_timer >= fade_duration
|
||||
@bg_transitioning = :hold
|
||||
@bg_transition_timer = 0.0
|
||||
end
|
||||
|
||||
when :hold
|
||||
@bg.opacity = 200
|
||||
if @bg_transition_timer >= hold_duration
|
||||
@bg_transitioning = :fade_out
|
||||
@bg_transition_timer = 0.0
|
||||
end
|
||||
|
||||
when :fade_out
|
||||
progress = [@bg_transition_timer / fade_duration, 1.0].min
|
||||
@bg.opacity = (200 * (1.0 - progress)).to_i
|
||||
if @bg_transition_timer >= fade_duration
|
||||
# Refill and reshuffle only once the queue is fully exhausted
|
||||
if @bg_queue.empty?
|
||||
@bg_queue = @bg_list.shuffle
|
||||
end
|
||||
@bg.setBitmap(@bg_queue.shift)
|
||||
setup_bg_zoom_and_drift(@bg)
|
||||
@bg_transitioning = :fade_in
|
||||
@bg_transition_timer = 0.0
|
||||
end
|
||||
end
|
||||
|
||||
# Apply drift to background
|
||||
@drift_x += @drift_vx * delta
|
||||
@drift_y += @drift_vy * delta
|
||||
new_bg_x = @drift_x.round
|
||||
new_bg_y = @drift_y.round
|
||||
if @bg.x != new_bg_x || @bg.y != new_bg_y
|
||||
@bg.x = new_bg_x
|
||||
@bg.y = new_bg_y
|
||||
end
|
||||
|
||||
# Apply drift to Pokémon sprite
|
||||
# if @pokemon_drift_vx
|
||||
# @pokemon_drift_x += @pokemon_drift_vx * delta
|
||||
# @pokemon_drift_y += @pokemon_drift_vy * delta
|
||||
# new_pk_x = @pokemon_drift_x.round
|
||||
# new_pk_y = @pokemon_drift_y.round
|
||||
# if @pokemon_sprite.x != new_pk_x || @pokemon_sprite.y != new_pk_y
|
||||
# @pokemon_sprite.x = new_pk_x
|
||||
# @pokemon_sprite.y = new_pk_y
|
||||
# end
|
||||
# end
|
||||
|
||||
# --- Pokemon sprite counter init ---
|
||||
@sprites_counter = 0 if !@sprites_counter
|
||||
@frames_counter = 0 if !@frames_counter
|
||||
@frames_counter += 1
|
||||
|
||||
stopShowingSprites = @frames_counter >= (TOTAL_NB_FRAMES - 300)
|
||||
pbBGSStop if @frames_counter > TOTAL_NB_FRAMES
|
||||
|
||||
spriteLoader = BattleSpriteLoader.new
|
||||
|
||||
# Pokémon Sprite Overlay
|
||||
@pokemon_cycle_timer = 0.0 if !@pokemon_cycle_timer
|
||||
@pokemon_cycle_timer += delta
|
||||
if @pokemon_cycle_timer >= SECONDS_PER_POKEMON_SPRITE
|
||||
@pokemon_cycle_timer -= SECONDS_PER_POKEMON_SPRITE
|
||||
if @customSpritesList.length > 0 && !stopShowingSprites
|
||||
@sprites_counter = 0
|
||||
randomSprite = @customSpritesList.sample
|
||||
@customSpritesList.delete(randomSprite)
|
||||
@pokemon_sprite.setBitmapDirectly(spriteLoader.load_random_alt_for_pif_sprite(randomSprite))
|
||||
@pokemon_sprite.x = rand(0..300)
|
||||
@pokemon_sprite.y = rand(0..200)
|
||||
@pokemon_sprite.opacity = 50
|
||||
@fadingIn = true
|
||||
setup_pokemon_drift
|
||||
end
|
||||
end
|
||||
|
||||
# Handle Pokémon Sprite Fading (unchanged)
|
||||
if @fadingIn
|
||||
if @pokemon_sprite.opacity < FUSION_SPRITES_MAX_OPACITY
|
||||
@pokemon_sprite.opacity += 5
|
||||
else
|
||||
@fadingIn = false
|
||||
end
|
||||
else
|
||||
@sprites_counter += 1
|
||||
if @sprites_counter >= NB_FRAMES_AT_MAX_OPACITY
|
||||
@pokemon_sprite.opacity -= 3
|
||||
end
|
||||
end
|
||||
|
||||
return if cancel?
|
||||
return if last?
|
||||
|
||||
# Scroll the text
|
||||
@realOY += @scroll_speed * delta
|
||||
@credit_sprites.each_with_index { |s, i| s.oy = @realOY - @bitmap_height * i }
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,217 @@
|
||||
class Scene_Credits
|
||||
CREDIT_HOENN = <<_END_
|
||||
|
||||
<title>Pokémon Infinite Fusion 2: Hoenn
|
||||
<title>PART 1
|
||||
By Chardub (Frogzilla)
|
||||
|
||||
<title>Game design
|
||||
Chardub<s>Payapon
|
||||
|
||||
<title>Programming:
|
||||
Chardub
|
||||
|
||||
<title>Autogenerated Sprites :
|
||||
Japeal - Pokefusion 2
|
||||
http://japeal.com/pkm
|
||||
|
||||
Special thanks to Aegide and Reizod for
|
||||
helping to download the autogenerated sprites
|
||||
and to the owners of Japeal for accepting to
|
||||
share their sprites.
|
||||
|
||||
<title>Maps
|
||||
Chardub<s>Payapon
|
||||
Kiwikelly<s>
|
||||
|
||||
<title>Gameplay / Story
|
||||
Chardub<s>Payapon
|
||||
|
||||
<title>Title screen and logo
|
||||
Doctor Miawoo
|
||||
|
||||
<title>Intro animation:
|
||||
Kiwikelly
|
||||
|
||||
<title>Music:
|
||||
Pory
|
||||
|
||||
<title>Game Assets Management
|
||||
Payapon
|
||||
|
||||
<title>Custom sprites collecting and handling
|
||||
Payapon
|
||||
|
||||
With contributions and tools by:
|
||||
Kiwikelly, Greystorm, Sapphire_chuu
|
||||
|
||||
<title>Trainer Teams and dialogs:
|
||||
.realthree<s>chardub
|
||||
funkytomate<s>kiwikelly
|
||||
pory<s>shiro0170
|
||||
gordogamr<s>theheroicorange
|
||||
|
||||
<title>Overworld Pokémon Sprites:
|
||||
milchik<s>.payapon
|
||||
gordogamr<s>.realthree
|
||||
chardub<s>
|
||||
|
||||
<title>Battle Backgrounds Coordination:
|
||||
.realthree<s>piponus
|
||||
|
||||
<title>Battle Backgrounds Art:
|
||||
.realthree<s>koalagators
|
||||
piponus<s>aplastic
|
||||
cynder_<s>chansondoree
|
||||
kiwikelly<s>revellr
|
||||
slowforest<s>takopus
|
||||
|
||||
<title>QA Testing (Part 1)
|
||||
adonis9410<s>casinosluck
|
||||
firesword2562<s>divinelunaria
|
||||
sapphire_chuu<s>vampvixen
|
||||
|
||||
<title>Character Customization graphics coordination:
|
||||
Chardub
|
||||
Gummy.Frog
|
||||
Payapon
|
||||
|
||||
<title>Discord custom sprites coordination:
|
||||
CaBiNE<s>hero.drawing
|
||||
Howls<s>Milchik
|
||||
Payapon<s>
|
||||
|
||||
<title>Pokedex entries coordination:
|
||||
.izik<s>.realthree
|
||||
|
||||
<title>Pokedex entries quality control
|
||||
dragon_hunter_70<s>.izik
|
||||
knilk<s>lordjoostmeister
|
||||
quackquackattack<s>.realthree
|
||||
eiskitsune<s>wildheartrazorfangs
|
||||
ziggaway<s>
|
||||
|
||||
Pokédex entries were submitted by the community
|
||||
The individual credits are displayed in-game
|
||||
|
||||
<title>Custom Sprites
|
||||
All of the custom fused Pokémon sprites
|
||||
were made by various members of the
|
||||
Pokémon Infinite Fusion Discord
|
||||
The individual credits are displayed in-game
|
||||
|
||||
It includes significant contributions from:
|
||||
|
||||
{SPRITER_CREDITS}
|
||||
|
||||
<title>Character Customization Graphics
|
||||
<title>(Top Contributors)
|
||||
{CC_CREDITS}
|
||||
|
||||
<title>Other custom graphics:
|
||||
Kiwikelly<s>Payapon
|
||||
Knucklese<s>UnworthyPie
|
||||
Doctor Miawoo<s>TCGrunler#4583
|
||||
Chardub<s>
|
||||
|
||||
<title>French Translation
|
||||
ITG<s>Piduf
|
||||
Maydangel<s>Maxifurius
|
||||
desregah<s>Zemelix
|
||||
PokemonInfiniteFusionFR Discord
|
||||
Coordinated by anthonygourmand
|
||||
|
||||
<title>Chinese Translation
|
||||
翻译、UI:Leon (Leonnovation)
|
||||
技术支持:白崎时绘 (Shiroe)
|
||||
文本参考:阿省呦 (Sheng)
|
||||
标题图像:未蓝啊 (Weilan)
|
||||
字体支持:狼人小林 (FusionPixel)
|
||||
其他支持:小鱼转晴 (XploreLight)
|
||||
|
||||
The following free resources were also used
|
||||
with their respective authors' consent:
|
||||
|
||||
<title>Trainer Overworld and Battle sprites
|
||||
Pokémon Destination Project
|
||||
Adapted by Payapon
|
||||
|
||||
<title>Pokémon Overworld sprites
|
||||
Dewitty<s>Chocosrawloid
|
||||
Kymontonian<s>milomilotic11
|
||||
Neo-Spriteman<s>hamsterskull
|
||||
Sparta<s>pokewiki.de
|
||||
|
||||
<title>Public use tileset graphics:
|
||||
Alucus BoOmxBiG<s>chimcharsfireworkd
|
||||
EpicDay<s>EternalTakai
|
||||
Gallanty Heavy-Metal-Lover<s>Hek-el-grande
|
||||
DirtyWiggles<s>iametrine
|
||||
Jorginho<s>kizemaru-kurunosuke
|
||||
KKKaito<s>kyle-dove
|
||||
Minorthreat0987<s>Phyromatical
|
||||
Pokemon-Diamond<s>rayd12smitty
|
||||
Rossay<s>Shiney570
|
||||
Spacemotion<s>Speedialga
|
||||
ThatsSoWitty Thurpok<s>TyranitarDark
|
||||
UltimoSpriter<s>WesleyFG
|
||||
|
||||
{INSERTS_PLUGIN_CREDITS_DO_NOT_REMOVE}
|
||||
|
||||
<title>Pokémon Contests & Berry Dex script
|
||||
wrigty12<s>bo4p5687
|
||||
Marin<s>mej71
|
||||
Maruno<s>FL
|
||||
JV<s>Umbreon/Hansiec
|
||||
Radical Raptr<s>FL
|
||||
Luka S.J.<s>TastyRedTomato
|
||||
Adapted by Chardub
|
||||
|
||||
<title>"Pokémon Essentials" was created by:
|
||||
Flameguru
|
||||
Poccil (Peter O.)
|
||||
Maruno
|
||||
|
||||
With contributions from:
|
||||
AvatarMonkeyKirby<s>MiDas Mike
|
||||
Boushy<s>Near Fantastica
|
||||
Brother1440<s>PinkMan
|
||||
FL.<s>Popper
|
||||
Genzai Kawakami<s>Rataime
|
||||
Harshboy<s>SoundSpawn
|
||||
help-14<s>the__end
|
||||
IceGod64<s>Venom12
|
||||
Jacob O. Wobbrock<s>Wachunga
|
||||
KitsuneKouta<s>xLeD
|
||||
Lisa Anthony<s>
|
||||
and everyone else who helped out
|
||||
|
||||
<title>"mkxp-z" by:
|
||||
Roza
|
||||
Based on MKXP by Ancurio et al.
|
||||
|
||||
<title>"RPG Maker XP" by:
|
||||
Enterbrain
|
||||
|
||||
This game was inspired by the original
|
||||
fusion generator:
|
||||
alexonsager.alexonsager.net
|
||||
|
||||
All generated fusion sprites in this game
|
||||
come from the Pokémon Fusion Generator:
|
||||
https://japeal.com/pkm/
|
||||
|
||||
Pokémon is owned by:
|
||||
The Pokémon Company
|
||||
Nintendo
|
||||
Affiliated with Game Freak
|
||||
|
||||
|
||||
<title>Thank for playing!
|
||||
<title>We hope you're looking forward to the full game!
|
||||
|
||||
|
||||
<title>This is a non-profit fan-made game.
|
||||
<title>No copyright infringements intended.
|
||||
_END_
|
||||
end
|
||||
@@ -0,0 +1,144 @@
|
||||
class Scene_Credits
|
||||
CREDIT_KANTO = <<_END_
|
||||
|
||||
<title>Pokémon Infinite Fusion
|
||||
<title>By Chardub (Frogzilla)
|
||||
|
||||
<title>Programming / Game design:
|
||||
Chardub
|
||||
|
||||
<title>Fused Pokemon Sprites :
|
||||
Japeal - Pokefusion 2
|
||||
http://japeal.com/pkm
|
||||
|
||||
Special thanks to Aegide and Reizod for
|
||||
helping to download the autogenerated sprites
|
||||
and to the owners of Japeal for accepting to
|
||||
share their sprites.
|
||||
|
||||
<title>Maps:
|
||||
Chardub
|
||||
Kiwikelly
|
||||
Some of the maps were based on work by:
|
||||
BenGames, Zeak6464
|
||||
|
||||
<title>Gameplay / Story :
|
||||
Chardub
|
||||
Kiwikelly
|
||||
|
||||
<title>Title screen and logo
|
||||
Doctor Miawoo
|
||||
|
||||
<title>Intro animation:
|
||||
Kiwikelly
|
||||
|
||||
<Music>
|
||||
mystora (Team Rocket Saffron City)
|
||||
|
||||
<title>Custom sprites collecting and handling
|
||||
Kiwikelly, Payapon, Thornsoflight, Greystorm
|
||||
|
||||
|
||||
<title>Discord custom sprites coordination
|
||||
avianAnnihilator<s>Blaquaza
|
||||
BéBoutton<s>CaBiNE
|
||||
CoramSun<s>hero.drawing
|
||||
Howls<s>Ignus
|
||||
Kiwi<s>Maelmc
|
||||
Milchik the Miltank<s>Payapon
|
||||
Pix<s>Rosemagwin
|
||||
Thornsoflight
|
||||
|
||||
All of the custom fused Pokémon sprites
|
||||
were made by various members of the
|
||||
Pokémon Infinite Fusion Discord
|
||||
|
||||
Including significant contributions from:
|
||||
|
||||
{SPRITER_CREDITS}
|
||||
|
||||
<title>Character Customization Graphics
|
||||
(Top Contributors)
|
||||
{CC_CREDITS}
|
||||
|
||||
<title>Other custom graphics:
|
||||
Kiwikelly<s>Knuckles
|
||||
UnworthyPie<s>Doctor Miawoo
|
||||
Chardub<s>TCGrunler#4583
|
||||
|
||||
<title>Elite 4 rematch teams
|
||||
duskrd<s>anaconja<s>taraline
|
||||
|
||||
<title>French translation
|
||||
anthonygourmand
|
||||
locpic_
|
||||
blood.wolf58 (Willi)
|
||||
ragzzh
|
||||
|
||||
<title>The following free resources were also used
|
||||
<title>with their respective authors' consent:
|
||||
|
||||
<title>Public use tileset graphics:
|
||||
Alucus BoOmxBiG<s>chimcharsfireworkd
|
||||
EpicDay<s>EternalTakai
|
||||
Gallanty Heavy-Metal-Lover<s>Hek-el-grande
|
||||
DirtyWiggles<s>iametrine
|
||||
Jorginho<s>kizemaru-kurunosuke
|
||||
KKKaito<s>kyle-dove
|
||||
Minorthreat0987<s>Phyromatical
|
||||
Pokemon-Diamond<s>rayd12smitty
|
||||
Rossay<s>Shiney570
|
||||
Spacemotion<s>Speedialga
|
||||
ThatsSoWitty Thurpok<s>TyranitarDark
|
||||
UltimoSpriter<s>WesleyFG
|
||||
|
||||
<title>Public use music:
|
||||
Pokeli, TailDoll666100
|
||||
Kazune Sawatari, sentsinkantéun,
|
||||
Nanashima, CharizardTheMaster, The Zame Jack
|
||||
|
||||
{INSERTS_PLUGIN_CREDITS_DO_NOT_REMOVE}
|
||||
|
||||
<title>"Pokémon Essentials" was created by:
|
||||
Flameguru
|
||||
Poccil (Peter O.)
|
||||
Maruno
|
||||
|
||||
With contributions from:
|
||||
AvatarMonkeyKirby<s>MiDas Mike
|
||||
Boushy<s>Near Fantastica
|
||||
Brother1440<s>PinkMan
|
||||
FL.<s>Popper
|
||||
Genzai Kawakami<s>Rataime
|
||||
Harshboy<s>SoundSpawn
|
||||
help-14<s>the__end
|
||||
IceGod64<s>Venom12
|
||||
Jacob O. Wobbrock<s>Wachunga
|
||||
KitsuneKouta<s>xLeD
|
||||
Lisa Anthony<s>
|
||||
and everyone else who helped out
|
||||
|
||||
<title>"mkxp-z" by:
|
||||
Roza
|
||||
Based on MKXP by Ancurio et al.
|
||||
|
||||
<title>"RPG Maker XP" by:
|
||||
Enterbrain
|
||||
|
||||
<title>This game was inspired by the original
|
||||
<title>fusion generator:
|
||||
alexonsager.alexonsager.net
|
||||
|
||||
<title>All generated fusion sprites in this game
|
||||
<title>come from the Pokémon Fusion Generator:
|
||||
https://japeal.com/pkm/
|
||||
|
||||
<title>Pokémon is owned by:
|
||||
The Pokémon Company
|
||||
Nintendo
|
||||
Affiliated with Game Freak
|
||||
|
||||
<title>This is a non-profit fan-made game.
|
||||
<title>No copyright infringements intended.
|
||||
_END_
|
||||
end
|
||||
Reference in New Issue
Block a user