mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
064a09664a | ||
|
|
6c621d04e4 | ||
|
|
d523f30eb7 | ||
|
|
b2b8a4ec12 | ||
|
|
33ab16c3c6 | ||
|
|
4730228557 | ||
|
|
984d30d912 | ||
|
|
5fde2bbc1a | ||
|
|
743367f514 | ||
|
|
f6fb6ff545 | ||
|
|
fdd672c0de | ||
|
|
7a2978a329 | ||
|
|
0e42591bfd | ||
|
|
028c6d1442 | ||
|
|
9f95e6a263 | ||
|
|
bf06c26344 | ||
|
|
f9f6f35236 | ||
|
|
804578f4e3 | ||
|
|
234f22e78e | ||
|
|
84d1fe3d86 | ||
|
|
d1c0e4eaf9 | ||
|
|
39d3c159b1 | ||
|
|
6a3b607690 | ||
|
|
c2954b8e84 | ||
|
|
0a7f0cbbef | ||
|
|
b547813995 | ||
|
|
46e7636c65 | ||
|
|
7cc97fb7b9 | ||
|
|
49bf30987f | ||
|
|
83efcd1b35 | ||
|
|
de9029eb1b | ||
|
|
3415c85618 | ||
|
|
de8f9603dc | ||
|
|
5e07802681 | ||
|
|
099af82e47 | ||
|
|
c03fc60c05 | ||
|
|
c473e6ee72 | ||
|
|
d9be9d17f5 | ||
|
|
479cfd07fd | ||
|
|
0a59474542 | ||
|
|
17ca4dcd69 | ||
|
|
950c942b20 | ||
|
|
d2e5dfb8cd | ||
|
|
a674134c62 | ||
|
|
92818790b9 | ||
|
|
f6f85fab1b | ||
|
|
2ae331fd14 | ||
|
|
b89420afd7 | ||
|
|
5085a89614 | ||
|
|
db8f0d6d3e | ||
|
|
57d0118ee9 | ||
|
|
fd053345b1 | ||
|
|
5034855f98 | ||
|
|
4cdd6878fb | ||
|
|
a19b64ebea | ||
|
|
0e8e7da039 | ||
|
|
d22e6b0208 | ||
|
|
a6dc5167d1 | ||
|
|
c846150afd | ||
|
|
81489ec8e6 | ||
|
|
28d3ffc074 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,7 +1,7 @@
|
|||||||
Graphics/CustomBattlers/*
|
Graphics/CustomBattlers/local_sprites/*
|
||||||
Graphics/Battlers/*
|
|
||||||
Graphics/Pokemon/FusionIcons/*
|
Graphics/Pokemon/FusionIcons/*
|
||||||
Data/pokedex/*
|
|
||||||
|
Graphics/CustomBattlers/spritesheets/*
|
||||||
Data/sprites/*
|
Data/sprites/*
|
||||||
Data/VERSION
|
Data/VERSION
|
||||||
|
|
||||||
8
Data/.idea/.gitignore
generated
vendored
Normal file
8
Data/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/../../../../../../../../../../../:\Users\charl\Documents\Jeux\rpgmaker\infinitefusion\dev\infinitefusion-e18\Data\.idea/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
11
Data/.idea/Data.iml
generated
Normal file
11
Data/.idea/Data.iml
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="RUBY_MODULE" version="4">
|
||||||
|
<component name="ModuleRunConfigurationManager">
|
||||||
|
<shared />
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
8
Data/.idea/modules.xml
generated
Normal file
8
Data/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/Data.iml" filepath="$PROJECT_DIR$/.idea/Data.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
Data/.idea/vcs.xml
generated
Normal file
6
Data/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,8 +5,8 @@
|
|||||||
#==============================================================================#
|
#==============================================================================#
|
||||||
module Settings
|
module Settings
|
||||||
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
||||||
GAME_VERSION = '6.4.0'
|
GAME_VERSION = '6.4.5'
|
||||||
GAME_VERSION_NUMBER = "6.4.0"
|
GAME_VERSION_NUMBER = "6.4.5"
|
||||||
LATEST_GAME_RELEASE = "6.4"
|
LATEST_GAME_RELEASE = "6.4"
|
||||||
|
|
||||||
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
|
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
|
||||||
@@ -22,10 +22,11 @@ module Settings
|
|||||||
|
|
||||||
#Infinite fusion settings
|
#Infinite fusion settings
|
||||||
NB_POKEMON = 501
|
NB_POKEMON = 501
|
||||||
CUSTOM_BASE_SPRITES_FOLDER = "Graphics/CustomBattlers/local_spritesBaseSprites/"
|
CUSTOM_BASE_SPRITES_FOLDER = "Graphics/CustomBattlers/local_sprites/BaseSprites/"
|
||||||
CUSTOM_BATTLERS_FOLDER = "Graphics/CustomBattlers/"
|
CUSTOM_BATTLERS_FOLDER = "Graphics/CustomBattlers/"
|
||||||
CUSTOM_SPRITES_TO_IMPORT_FOLDER = "Graphics/CustomBattlers/Sprites to import/"
|
CUSTOM_SPRITES_TO_IMPORT_FOLDER = "Graphics/CustomBattlers/Sprites to import/"
|
||||||
CUSTOM_BATTLERS_FOLDER_INDEXED = "Graphics/CustomBattlers/local_sprites/indexed/"
|
CUSTOM_BATTLERS_FOLDER_INDEXED = "Graphics/CustomBattlers/local_sprites/indexed/"
|
||||||
|
CUSTOM_BASE_SPRITE_FOLDER = "Graphics/CustomBattlers/local_sprites/BaseSprites/"
|
||||||
BATTLERS_FOLDER = "Graphics/Battlers/Autogens/"
|
BATTLERS_FOLDER = "Graphics/Battlers/Autogens/"
|
||||||
DOWNLOADED_SPRITES_FOLDER = "Graphics/temp/"
|
DOWNLOADED_SPRITES_FOLDER = "Graphics/temp/"
|
||||||
DEFAULT_SPRITE_PATH = "Graphics/Battlers/Special/000.png"
|
DEFAULT_SPRITE_PATH = "Graphics/Battlers/Special/000.png"
|
||||||
@@ -35,6 +36,8 @@ module Settings
|
|||||||
BASE_SPRITES_FILE_PATH = "Data/sprites/BASE_SPRITES"
|
BASE_SPRITES_FILE_PATH = "Data/sprites/BASE_SPRITES"
|
||||||
CUSTOM_DEX_ENTRIES_PATH = "Data/pokedex/dex.json"
|
CUSTOM_DEX_ENTRIES_PATH = "Data/pokedex/dex.json"
|
||||||
AI_DEX_ENTRIES_PATH = "Data/pokedex/generated_entries.json"
|
AI_DEX_ENTRIES_PATH = "Data/pokedex/generated_entries.json"
|
||||||
|
POKEDEX_ENTRIES_PATH = "Data/pokedex/all_entries.json"
|
||||||
|
|
||||||
UPDATED_SPRITESHEETS_CACHE = "Data/sprites/updated_spritesheets_cache"
|
UPDATED_SPRITESHEETS_CACHE = "Data/sprites/updated_spritesheets_cache"
|
||||||
|
|
||||||
BACK_ITEM_ICON_PATH = "Graphics/Items/back.png"
|
BACK_ITEM_ICON_PATH = "Graphics/Items/back.png"
|
||||||
@@ -57,8 +60,8 @@ module Settings
|
|||||||
HTTP_CONFIGS_FILE_URL = "https://raw.githubusercontent.com/infinitefusion/pif-downloadables/refs/heads/master/Settings.rb"
|
HTTP_CONFIGS_FILE_URL = "https://raw.githubusercontent.com/infinitefusion/pif-downloadables/refs/heads/master/Settings.rb"
|
||||||
HTTP_CONFIGS_FILE_PATH = "Data/Scripts/DownloadedSettings.rb"
|
HTTP_CONFIGS_FILE_PATH = "Data/Scripts/DownloadedSettings.rb"
|
||||||
|
|
||||||
SPRITES_FILE_URL = "https://raw.githubusercontent.com/infinitefusion/infinitefusion-e18/main/Data/CUSTOM_SPRITES"
|
SPRITES_FILE_URL = "https://raw.githubusercontent.com/infinitefusion/infinitefusion-e18/main/Data/sprites/CUSTOM_SPRITES"
|
||||||
BASE_SPRITES_FILE_URL = "https://raw.githubusercontent.com/infinitefusion/infinitefusion-e18/main/Data/BASE_SPRITES"
|
BASE_SPRITES_FILE_URL = "https://raw.githubusercontent.com/infinitefusion/infinitefusion-e18/main/Data/sprites/BASE_SPRITES"
|
||||||
|
|
||||||
|
|
||||||
STARTUP_MESSAGES = ""
|
STARTUP_MESSAGES = ""
|
||||||
@@ -102,6 +105,9 @@ module Settings
|
|||||||
BASE_POKEMON_SPRITESHEET_URL = "https://infinitefusion.net/spritesheets/spritesheets_base/"
|
BASE_POKEMON_SPRITESHEET_URL = "https://infinitefusion.net/spritesheets/spritesheets_base/"
|
||||||
CUSTOM_FUSIONS_SPRITESHEET_URL = "https://infinitefusion.net/spritesheets/spritesheets_custom/"
|
CUSTOM_FUSIONS_SPRITESHEET_URL = "https://infinitefusion.net/spritesheets/spritesheets_custom/"
|
||||||
|
|
||||||
|
BASE_POKEMON_SPRITESHEET_TRUE_SIZE_URL = "https://infinitefusion.net/spritesheets_truesize/spritesheets_base/"
|
||||||
|
CUSTOM_FUSIONS_SPRITESHEET_TRUE_SIZE_URL = "https://infinitefusion.net/spritesheets_truesize/spritesheets_custom/"
|
||||||
|
|
||||||
RIVAL_STARTER_PLACEHOLDER_SPECIES = :MEW #(MEW)
|
RIVAL_STARTER_PLACEHOLDER_SPECIES = :MEW #(MEW)
|
||||||
VAR_1_PLACEHOLDER_SPECIES = :DIALGA
|
VAR_1_PLACEHOLDER_SPECIES = :DIALGA
|
||||||
VAR_2_PLACEHOLDER_SPECIES = :PALKIA
|
VAR_2_PLACEHOLDER_SPECIES = :PALKIA
|
||||||
@@ -479,7 +485,8 @@ module Settings
|
|||||||
[561, 50, :FLETCHINDER,32,45], #Mt. Ember
|
[561, 50, :FLETCHINDER,32,45], #Mt. Ember
|
||||||
[562, 50, :NINJASK,45,50], #Boon Island
|
[562, 50, :NINJASK,45,50], #Boon Island
|
||||||
[603, 50, :KECLEON,45,50], #Chrono Island
|
[603, 50, :KECLEON,45,50], #Chrono Island
|
||||||
[654, 50, :WHIMSICOTT,32,45] #Brine Road
|
[654, 50, :WHIMSICOTT,32,45], #Brine Road
|
||||||
|
[559, 50, :SCRAGGY,32,45] #Kindle Road
|
||||||
]
|
]
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|||||||
@@ -119,9 +119,11 @@ def downloadAllowed?()
|
|||||||
end
|
end
|
||||||
|
|
||||||
def clean_json_string(str)
|
def clean_json_string(str)
|
||||||
|
#echoln str
|
||||||
|
#return str if $PokemonSystem.on_mobile
|
||||||
# Remove non-UTF-8 characters and unexpected control characters
|
# Remove non-UTF-8 characters and unexpected control characters
|
||||||
cleaned_str = str.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
|
#cleaned_str = str.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
|
||||||
|
cleaned_str = str
|
||||||
# Remove literal \n, \r, \t, etc.
|
# Remove literal \n, \r, \t, etc.
|
||||||
cleaned_str = cleaned_str.gsub(/\\n|\\r|\\t/, '')
|
cleaned_str = cleaned_str.gsub(/\\n|\\r|\\t/, '')
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class BushBitmap
|
|||||||
@isTile = isTile
|
@isTile = isTile
|
||||||
@isBitmap = @bitmap.is_a?(Bitmap)
|
@isBitmap = @bitmap.is_a?(Bitmap)
|
||||||
@depth = depth
|
@depth = depth
|
||||||
@manual_refresh=false
|
@manual_refresh = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def dispose
|
def dispose
|
||||||
@@ -91,14 +91,15 @@ class Sprite_Character < RPG::Sprite
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def setSpriteToAppearance(trainerAppearance)
|
def setSpriteToAppearance(trainerAppearance)
|
||||||
#return if !@charbitmap || !@charbitmap.bitmap
|
#return if !@charbitmap || !@charbitmap.bitmap
|
||||||
new_bitmap = AnimatedBitmap.new(getBaseOverworldSpriteFilename())#@charbitmap
|
begin
|
||||||
new_bitmap.bitmap = generateNPCClothedBitmapStatic(trainerAppearance)
|
new_bitmap = AnimatedBitmap.new(getBaseOverworldSpriteFilename()) #@charbitmap
|
||||||
@bitmap_override = new_bitmap
|
new_bitmap.bitmap = generateNPCClothedBitmapStatic(trainerAppearance)
|
||||||
updateBitmap
|
@bitmap_override = new_bitmap
|
||||||
|
updateBitmap
|
||||||
|
rescue
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def clearBitmapOverride()
|
def clearBitmapOverride()
|
||||||
@@ -133,7 +134,7 @@ class Sprite_Character < RPG::Sprite
|
|||||||
end
|
end
|
||||||
|
|
||||||
def updateBitmap
|
def updateBitmap
|
||||||
@manual_refresh=true
|
@manual_refresh = true
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbLoadOutfitBitmap(outfitFileName)
|
def pbLoadOutfitBitmap(outfitFileName)
|
||||||
@@ -149,7 +150,6 @@ class Sprite_Character < RPG::Sprite
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def generateClothedBitmap()
|
def generateClothedBitmap()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -186,7 +186,7 @@ class Sprite_Character < RPG::Sprite
|
|||||||
return if @character.is_a?(Game_Event) && !@character.should_update?
|
return if @character.is_a?(Game_Event) && !@character.should_update?
|
||||||
super
|
super
|
||||||
if should_update?
|
if should_update?
|
||||||
@manual_refresh=false
|
@manual_refresh = false
|
||||||
@tile_id = @character.tile_id
|
@tile_id = @character.tile_id
|
||||||
@character_name = @character.character_name
|
@character_name = @character.character_name
|
||||||
@character_hue = @character.character_hue
|
@character_hue = @character.character_hue
|
||||||
@@ -209,13 +209,13 @@ class Sprite_Character < RPG::Sprite
|
|||||||
@charbitmap.dispose if @charbitmap
|
@charbitmap.dispose if @charbitmap
|
||||||
|
|
||||||
@charbitmap = updateCharacterBitmap()
|
@charbitmap = updateCharacterBitmap()
|
||||||
@charbitmap= @bitmap_override.clone if @bitmap_override
|
@charbitmap = @bitmap_override.clone if @bitmap_override
|
||||||
|
|
||||||
RPG::Cache.retain('Graphics/Characters/', @character_name, @character_hue) if @charbitmapAnimated = true
|
RPG::Cache.retain('Graphics/Characters/', @character_name, @character_hue) if @charbitmapAnimated = true
|
||||||
@bushbitmap.dispose if @bushbitmap
|
@bushbitmap.dispose if @bushbitmap
|
||||||
@bushbitmap = nil
|
@bushbitmap = nil
|
||||||
#@spriteoffset = @character_name[/offset/i]
|
#@spriteoffset = @character_name[/offset/i]
|
||||||
@spriteoffset = @character_name[/fish/i] || @character_name[/dive/i] || @character_name[/surf/i]
|
@spriteoffset = @character_name[/fish/i] || @character_name[/dive/i] || @character_name[/surf/i]
|
||||||
@cw = @charbitmap.width / 4
|
@cw = @charbitmap.width / 4
|
||||||
@ch = @charbitmap.height / 4
|
@ch = @charbitmap.height / 4
|
||||||
self.ox = @cw / 2
|
self.ox = @cw / 2
|
||||||
@@ -226,7 +226,7 @@ class Sprite_Character < RPG::Sprite
|
|||||||
bushdepth = @character.bush_depth
|
bushdepth = @character.bush_depth
|
||||||
if bushdepth == 0
|
if bushdepth == 0
|
||||||
if @character == $game_player
|
if @character == $game_player
|
||||||
self.bitmap = getClothedPlayerSprite()#generateClothedBitmap()
|
self.bitmap = getClothedPlayerSprite() #generateClothedBitmap()
|
||||||
else
|
else
|
||||||
self.bitmap = (@charbitmapAnimated) ? @charbitmap.bitmap : @charbitmap
|
self.bitmap = (@charbitmapAnimated) ? @charbitmap.bitmap : @charbitmap
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -275,7 +275,6 @@ class PokemonDataBox < SpriteWrapper
|
|||||||
0,(s-1)*STATUS_ICON_HEIGHT,-1,STATUS_ICON_HEIGHT])
|
0,(s-1)*STATUS_ICON_HEIGHT,-1,STATUS_ICON_HEIGHT])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#Draw type icons (foe Pokémon only)
|
#Draw type icons (foe Pokémon only)
|
||||||
if @battler.opposes?(0) && $PokemonSystem.type_icons
|
if @battler.opposes?(0) && $PokemonSystem.type_icons
|
||||||
drawEnemyTypeIcons(imagePos)
|
drawEnemyTypeIcons(imagePos)
|
||||||
@@ -287,6 +286,7 @@ class PokemonDataBox < SpriteWrapper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def drawEnemyTypeIcons(imagePos)
|
def drawEnemyTypeIcons(imagePos)
|
||||||
|
return if @battler.is_a?(PokeBattle_FakeBattler)
|
||||||
type1_number = GameData::Type.get(@battler.type1).id_number
|
type1_number = GameData::Type.get(@battler.type1).id_number
|
||||||
type2_number = GameData::Type.get(@battler.type2).id_number
|
type2_number = GameData::Type.get(@battler.type2).id_number
|
||||||
|
|
||||||
|
|||||||
@@ -887,9 +887,9 @@ def pbReceiveItem(item, quantity = 1, item_name = "", music = nil, canRandom = t
|
|||||||
if item == :LEFTOVERS
|
if item == :LEFTOVERS
|
||||||
pbMessage(_INTL("\\me[{1}]You obtained some \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname))
|
pbMessage(_INTL("\\me[{1}]You obtained some \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname))
|
||||||
elsif item.is_machine? # TM or HM
|
elsif item.is_machine? # TM or HM
|
||||||
if $game_switches[SWITCH_RANDOMIZE_GYMS_SEPARATELY] && $game_switches[SWITCH_RANDOMIZED_GYM_TYPES] && $game_variables[VAR_CURRENT_GYM_TYPE] > -1
|
# if $game_switches[SWITCH_RANDOMIZE_GYMS_SEPARATELY] && $game_switches[SWITCH_RANDOMIZED_GYM_TYPES] && $game_variables[VAR_CURRENT_GYM_TYPE] > -1
|
||||||
item = GameData::Item.get(randomizeGymTM(item))
|
# item = GameData::Item.get(randomizeGymTM(item))
|
||||||
end
|
# end
|
||||||
pbMessage(_INTL("\\me[{1}]You obtained \\c[1]{2} {3}\\c[0]!\\wtnp[30]", meName, itemname, GameData::Move.get(move).name))
|
pbMessage(_INTL("\\me[{1}]You obtained \\c[1]{2} {3}\\c[0]!\\wtnp[30]", meName, itemname, GameData::Move.get(move).name))
|
||||||
elsif quantity > 1
|
elsif quantity > 1
|
||||||
pbMessage(_INTL("\\me[{1}]You obtained {2} #{text_color}{3}\\c[0]!\\wtnp[30]", meName, quantity, itemname))
|
pbMessage(_INTL("\\me[{1}]You obtained {2} #{text_color}{3}\\c[0]!\\wtnp[30]", meName, quantity, itemname))
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ class Player < Trainer
|
|||||||
attr_accessor :unlocked_hairstyles
|
attr_accessor :unlocked_hairstyles
|
||||||
attr_accessor :unlocked_card_backgrounds
|
attr_accessor :unlocked_card_backgrounds
|
||||||
|
|
||||||
|
attr_accessor :dyed_hats
|
||||||
|
attr_accessor :dyed_clothes
|
||||||
|
|
||||||
|
|
||||||
attr_accessor :last_worn_outfit
|
attr_accessor :last_worn_outfit
|
||||||
attr_accessor :last_worn_hat
|
attr_accessor :last_worn_hat
|
||||||
|
|
||||||
@@ -121,6 +125,24 @@ class Player < Trainer
|
|||||||
refreshPlayerOutfit()
|
refreshPlayerOutfit()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def clothes_color=(value)
|
||||||
|
echoln value
|
||||||
|
echoln @clothes
|
||||||
|
echoln $Trainer.dyed_clothes
|
||||||
|
echoln caller
|
||||||
|
|
||||||
|
@clothes_color=value
|
||||||
|
$Trainer.dyed_clothes= {} if !$Trainer.dyed_clothes
|
||||||
|
$Trainer.dyed_clothes[@clothes] = value if value
|
||||||
|
refreshPlayerOutfit()
|
||||||
|
end
|
||||||
|
def hat_color=(value)
|
||||||
|
@hat_color=value
|
||||||
|
$Trainer.dyed_hats= {} if ! $Trainer.dyed_hats
|
||||||
|
$Trainer.dyed_hats[@hat] = value if value
|
||||||
|
refreshPlayerOutfit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
def unlock_clothes(outfitID,silent=false)
|
def unlock_clothes(outfitID,silent=false)
|
||||||
update_global_clothes_list()
|
update_global_clothes_list()
|
||||||
@@ -265,6 +287,10 @@ class Player < Trainer
|
|||||||
@last_worn_outfit = nil
|
@last_worn_outfit = nil
|
||||||
@last_worn_hat = nil
|
@last_worn_hat = nil
|
||||||
|
|
||||||
|
@dyed_hats = {}
|
||||||
|
@dyed_clothes = {}
|
||||||
|
|
||||||
|
|
||||||
@card_background = Settings::DEFAULT_TRAINER_CARD_BG
|
@card_background = Settings::DEFAULT_TRAINER_CARD_BG
|
||||||
@unlocked_card_backgrounds = [@card_background]
|
@unlocked_card_backgrounds = [@card_background]
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ class Player < Trainer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def resync_pokedex
|
def resync_pokedex
|
||||||
|
echoln "syncing pokedex"
|
||||||
@seen_standard = resync_standard_pokedex_array(@seen_standard)
|
@seen_standard = resync_standard_pokedex_array(@seen_standard)
|
||||||
@owned_standard = resync_standard_pokedex_array(@owned_standard)
|
@owned_standard = resync_standard_pokedex_array(@owned_standard)
|
||||||
|
|
||||||
@@ -141,6 +142,7 @@ class Player < Trainer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def set_seen(species, should_refresh_dexes = true)
|
def set_seen(species, should_refresh_dexes = true)
|
||||||
|
try_resync_pokedex()
|
||||||
dexNum = getDexNumberForSpecies(species)
|
dexNum = getDexNumberForSpecies(species)
|
||||||
if isTripleFusion(dexNum)
|
if isTripleFusion(dexNum)
|
||||||
set_seen_triple(species)
|
set_seen_triple(species)
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ _END_
|
|||||||
# Stop Editing
|
# Stop Editing
|
||||||
|
|
||||||
def main
|
def main
|
||||||
#endCredits() if $PokemonSystem.on_mobile
|
endCredits() if $PokemonSystem.on_mobile
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
# Animated Background Setup
|
# Animated Background Setup
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class PokemonPokedexInfo_Scene
|
|||||||
@sprites["infosprite"].zoom_x = Settings::FRONTSPRITE_SCALE
|
@sprites["infosprite"].zoom_x = Settings::FRONTSPRITE_SCALE
|
||||||
@sprites["infosprite"].zoom_y = Settings::FRONTSPRITE_SCALE
|
@sprites["infosprite"].zoom_y = Settings::FRONTSPRITE_SCALE
|
||||||
@spritesLoader = BattleSpriteLoader.new
|
@spritesLoader = BattleSpriteLoader.new
|
||||||
|
@randomEntryText = nil
|
||||||
# @mapdata = pbLoadTownMapData
|
# @mapdata = pbLoadTownMapData
|
||||||
# map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
|
# map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
|
||||||
# mappos = (map_metadata) ? map_metadata.town_map_position : nil
|
# mappos = (map_metadata) ? map_metadata.town_map_position : nil
|
||||||
@@ -323,7 +323,7 @@ class PokemonPokedexInfo_Scene
|
|||||||
# species_data.pokedex_entry, base, shadow)
|
# species_data.pokedex_entry, base, shadow)
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
#$PokemonSystem.use_generated_dex_entries=true if $PokemonSystem.use_generated_dex_entries ==nil
|
||||||
drawEntryText(overlay, species_data)
|
drawEntryText(overlay, species_data)
|
||||||
|
|
||||||
# Draw the footprint
|
# Draw the footprint
|
||||||
@@ -362,7 +362,8 @@ class PokemonPokedexInfo_Scene
|
|||||||
pbDrawImagePositions(overlay, imagepos)
|
pbDrawImagePositions(overlay, imagepos)
|
||||||
end
|
end
|
||||||
|
|
||||||
def drawEntryText(overlay, species_data)
|
|
||||||
|
def drawEntryText(overlay, species_data)
|
||||||
baseColor = Color.new(88, 88, 80)
|
baseColor = Color.new(88, 88, 80)
|
||||||
shadow = Color.new(168, 184, 184)
|
shadow = Color.new(168, 184, 184)
|
||||||
shadowCustom = Color.new(160, 200, 150)
|
shadowCustom = Color.new(160, 200, 150)
|
||||||
@@ -374,12 +375,12 @@ class PokemonPokedexInfo_Scene
|
|||||||
entryText = customEntry
|
entryText = customEntry
|
||||||
shadowColor = shadowCustom
|
shadowColor = shadowCustom
|
||||||
else
|
else
|
||||||
aiEntry = getAIDexEntry(species_data.species, species_data.name)
|
if $PokemonSystem.use_generated_dex_entries && species_data.is_a?(GameData::FusedSpecies)
|
||||||
if aiEntry
|
@randomEntryText = species_data.get_random_dex_entry if !@randomEntryText
|
||||||
entryText = aiEntry
|
entryText = @randomEntryText
|
||||||
shadowColor = shadowAI
|
shadowColor = shadow
|
||||||
else
|
else
|
||||||
entryText = species_data.pokedex_entry
|
entryText = "No custom Pokédex entry available for this Pokémon. Please consider submitting an entry for this Pokémon on the game's Discord."
|
||||||
shadowColor = shadow
|
shadowColor = shadow
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1254,7 +1254,7 @@ class PokemonPartyScreen
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
commands[cmdSwitch = commands.length] = _INTL("Switch") if @party.length > 1
|
commands[cmdSwitch = commands.length] = _INTL("Switch") if @party.length > 1
|
||||||
commands[cmdHat = commands.length] = _INTL("Hat") if !pkmn.egg? && $game_switches[SWITCH_UNLOCKED_POKEMON_HATS]
|
commands[cmdHat = commands.length] = _INTL("Hat") if canPutHatOnPokemon(pkmn)
|
||||||
if !pkmn.egg?
|
if !pkmn.egg?
|
||||||
if pkmn.mail
|
if pkmn.mail
|
||||||
commands[cmdMail = commands.length] = _INTL("Mail")
|
commands[cmdMail = commands.length] = _INTL("Mail")
|
||||||
|
|||||||
@@ -1282,7 +1282,7 @@ class PokemonSummary_Scene
|
|||||||
if pbBattleChallenge.currentChallenge == -1
|
if pbBattleChallenge.currentChallenge == -1
|
||||||
commands[cmdGiveItem = commands.length] = _INTL("Give item")
|
commands[cmdGiveItem = commands.length] = _INTL("Give item")
|
||||||
commands[cmdTakeItem = commands.length] = _INTL("Take item") if @pokemon.hasItem?
|
commands[cmdTakeItem = commands.length] = _INTL("Take item") if @pokemon.hasItem?
|
||||||
commands[cmdHat = commands.length] = _INTL("Hat") if !@pokemon.egg? && $game_switches[SWITCH_UNLOCKED_POKEMON_HATS]
|
commands[cmdHat = commands.length] = _INTL("Hat") if canPutHatOnPokemon(@pokemon)
|
||||||
end
|
end
|
||||||
commands[cmdPokedex = commands.length] = _INTL("View Pokédex") if $Trainer.has_pokedex
|
commands[cmdPokedex = commands.length] = _INTL("View Pokédex") if $Trainer.has_pokedex
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ class PokemonSystem
|
|||||||
attr_accessor :max_nb_sprites_download
|
attr_accessor :max_nb_sprites_download
|
||||||
attr_accessor :on_mobile
|
attr_accessor :on_mobile
|
||||||
attr_accessor :type_icons
|
attr_accessor :type_icons
|
||||||
|
attr_accessor :use_generated_dex_entries
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@textspeed = 1 # Text speed (0=slow, 1=normal, 2=fast)
|
@textspeed = 1 # Text speed (0=slow, 1=normal, 2=fast)
|
||||||
@@ -43,6 +44,7 @@ class PokemonSystem
|
|||||||
@max_nb_sprites_download = 5
|
@max_nb_sprites_download = 5
|
||||||
@on_mobile = false
|
@on_mobile = false
|
||||||
@type_icons = true
|
@type_icons = true
|
||||||
|
@use_generated_dex_entries = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ class DoublePreviewScreen
|
|||||||
spriteLoader = BattleSpriteLoader.new
|
spriteLoader = BattleSpriteLoader.new
|
||||||
bitmap = spriteLoader.load_fusion_sprite(head_pokemon,body_pokemon)
|
bitmap = spriteLoader.load_fusion_sprite(head_pokemon,body_pokemon)
|
||||||
bitmap.scale_bitmap(Settings::FRONTSPRITE_SCALE)
|
bitmap.scale_bitmap(Settings::FRONTSPRITE_SCALE)
|
||||||
|
pif_sprite = spriteLoader.obtain_fusion_pif_sprite(head_pokemon,body_pokemon)
|
||||||
#hasCustom = picturePath.include?("CustomBattlers")
|
#hasCustom = picturePath.include?("CustomBattlers")
|
||||||
#hasCustom = customSpriteExistsBase(body_pokemon,head_pokemon)
|
#hasCustom = customSpriteExistsBase(body_pokemon,head_pokemon)
|
||||||
hasCustom = customSpriteExists(body_pokemon,head_pokemon)
|
hasCustom = customSpriteExists(body_pokemon,head_pokemon)
|
||||||
@@ -123,10 +123,12 @@ class DoublePreviewScreen
|
|||||||
drawFusionInformation(dexNumber, level, x)
|
drawFusionInformation(dexNumber, level, x)
|
||||||
|
|
||||||
if !$Trainer.seen?(dexNumber)
|
if !$Trainer.seen?(dexNumber)
|
||||||
if hasCustom
|
if pif_sprite.local_path()
|
||||||
previewwindow.picture.pbSetColor(150, 255, 150, 200)
|
previewwindow.picture.pbSetColor(170, 200, 250, 200) #blue
|
||||||
|
elsif hasCustom
|
||||||
|
previewwindow.picture.pbSetColor(150, 255, 150, 200) #green
|
||||||
else
|
else
|
||||||
previewwindow.picture.pbSetColor(255, 255, 255, 200)
|
previewwindow.picture.pbSetColor(255, 255, 255, 200) #white
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return previewwindow
|
return previewwindow
|
||||||
|
|||||||
@@ -104,6 +104,14 @@ module GameData
|
|||||||
return @head_pokemon.id_number
|
return @head_pokemon.id_number
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_body_species_symbol
|
||||||
|
return @body_pokemon.id
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_head_species_symbol
|
||||||
|
return @head_pokemon.id
|
||||||
|
end
|
||||||
|
|
||||||
def adjust_stats_with_evs
|
def adjust_stats_with_evs
|
||||||
GameData::Stat.each_main do |s|
|
GameData::Stat.each_main do |s|
|
||||||
@base_stats[s.id] = 1 if !@base_stats[s.id] || @base_stats[s.id] <= 0
|
@base_stats[s.id] = 1 if !@base_stats[s.id] || @base_stats[s.id] <= 0
|
||||||
@@ -289,6 +297,31 @@ module GameData
|
|||||||
return split_and_combine_text(body_entry, head_entry, ".")
|
return split_and_combine_text(body_entry, head_entry, ".")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_random_dex_entry()
|
||||||
|
begin
|
||||||
|
file_path = Settings::POKEDEX_ENTRIES_PATH
|
||||||
|
json_data = File.read(file_path)
|
||||||
|
all_body_entries = HTTPLite::JSON.parse(json_data)
|
||||||
|
|
||||||
|
|
||||||
|
body_entry = all_body_entries[@body_pokemon.id_number.to_s].sample
|
||||||
|
body_entry = body_entry.gsub(/#{@body_pokemon.real_name}/i, @real_name)
|
||||||
|
body_entry = clean_json_string(body_entry).gsub(@body_pokemon.real_name, @real_name)
|
||||||
|
|
||||||
|
head_entry = all_body_entries[@head_pokemon.id_number.to_s].sample
|
||||||
|
head_entry = head_entry.gsub(/#{@head_pokemon.real_name}/i, @real_name)
|
||||||
|
head_entry = clean_json_string(head_entry).gsub(@head_pokemon.real_name, @real_name)
|
||||||
|
rescue
|
||||||
|
body_entry = @body_pokemon.real_pokedex_entry.gsub(@body_pokemon.real_name, @real_name)
|
||||||
|
head_entry = @head_pokemon.real_pokedex_entry.gsub(@head_pokemon.real_name, @real_name)
|
||||||
|
end
|
||||||
|
echoln body_entry
|
||||||
|
echoln head_entry
|
||||||
|
combined_entry = split_and_combine_text(body_entry, head_entry, ".")
|
||||||
|
combined_entry += "." unless combined_entry.end_with?(".")
|
||||||
|
return combined_entry
|
||||||
|
end
|
||||||
|
|
||||||
def calculate_egg_groups
|
def calculate_egg_groups
|
||||||
body_egg_groups = @body_pokemon.egg_groups
|
body_egg_groups = @body_pokemon.egg_groups
|
||||||
head_egg_groups = @head_pokemon.egg_groups
|
head_egg_groups = @head_pokemon.egg_groups
|
||||||
@@ -335,7 +368,7 @@ module GameData
|
|||||||
|
|
||||||
beginningText = beginingText_split[0]
|
beginningText = beginingText_split[0]
|
||||||
endText = endText_split[1] && endText_split[1] != "" ? endText_split[1] : endText_split[0]
|
endText = endText_split[1] && endText_split[1] != "" ? endText_split[1] : endText_split[0]
|
||||||
return beginningText + separator + endText
|
return beginningText + separator + " " + endText
|
||||||
end
|
end
|
||||||
|
|
||||||
def calculate_fused_stats(dominantStat, otherStat)
|
def calculate_fused_stats(dominantStat, otherStat)
|
||||||
|
|||||||
@@ -954,6 +954,7 @@ end
|
|||||||
def drawSpriteCredits(pif_sprite, viewport)
|
def drawSpriteCredits(pif_sprite, viewport)
|
||||||
overlay = BitmapSprite.new(Graphics.width, Graphics.height, @viewport).bitmap
|
overlay = BitmapSprite.new(Graphics.width, Graphics.height, @viewport).bitmap
|
||||||
return if pif_sprite.type == :AUTOGEN
|
return if pif_sprite.type == :AUTOGEN
|
||||||
|
return if pif_sprite.local_path
|
||||||
x = Graphics.width / 2
|
x = Graphics.width / 2
|
||||||
y = 240
|
y = 240
|
||||||
spritename = pif_sprite.to_filename()
|
spritename = pif_sprite.to_filename()
|
||||||
|
|||||||
@@ -2,27 +2,33 @@ class PIFSpriteExtracter
|
|||||||
COLUMNS = 20 # Number of columns in the spritesheet
|
COLUMNS = 20 # Number of columns in the spritesheet
|
||||||
@@spritesheet_cache = SpritesBitmapCache.new
|
@@spritesheet_cache = SpritesBitmapCache.new
|
||||||
|
|
||||||
|
#factor by which the sprite needs to be resized to get it to base game resolution (288x288)
|
||||||
|
def get_resize_scale
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
def load_sprite(pif_sprite,download_allowed=true)
|
def load_sprite(pif_sprite,download_allowed=true)
|
||||||
begin
|
begin
|
||||||
start_time = Time.now
|
start_time = Time.now
|
||||||
bitmap = @@spritesheet_cache.get_bitmap(pif_sprite)
|
bitmap = @@spritesheet_cache.get_bitmap(pif_sprite)
|
||||||
loaded_from_spritesheet=false
|
loaded_from_spritesheet=false
|
||||||
|
|
||||||
if !bitmap
|
if !bitmap
|
||||||
download_new_spritesheet(pif_sprite) if should_update_spritesheet?(pif_sprite) && download_allowed
|
download_new_spritesheet(pif_sprite) if should_update_spritesheet?(pif_sprite) && download_allowed
|
||||||
if pbResolveBitmap(getSpritesheetPath(pif_sprite))
|
if pbResolveBitmap(getSpritesheetPath(pif_sprite))
|
||||||
bitmap = load_bitmap_from_spritesheet(pif_sprite)
|
bitmap = load_bitmap_from_spritesheet(pif_sprite)
|
||||||
loaded_from_spritesheet=true
|
loaded_from_spritesheet=true
|
||||||
@@spritesheet_cache.add(pif_sprite, bitmap)
|
@@spritesheet_cache.add(pif_sprite, bitmap)
|
||||||
else
|
else
|
||||||
return nil
|
return nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
sprite_bitmap = AnimatedBitmap.from_bitmap(bitmap)
|
||||||
sprite_bitmap = AnimatedBitmap.from_bitmap(bitmap)
|
sprite_bitmap.scale_bitmap(get_resize_scale())
|
||||||
end_time = Time.now
|
end_time = Time.now
|
||||||
source = loaded_from_spritesheet ? :"spritesheet" : "cache"
|
source = loaded_from_spritesheet ? :"spritesheet" : "cache"
|
||||||
echoln "Loaded sprite for <head:#{pif_sprite.head_id}, body: #{pif_sprite.body_id}, variant: #{pif_sprite.alt_letter}> from #{source} in #{end_time - start_time} seconds"
|
echoln "Loaded sprite for <head:#{pif_sprite.head_id}, body: #{pif_sprite.body_id}, variant: #{pif_sprite.alt_letter}> from #{source} in #{end_time - start_time} seconds"
|
||||||
return sprite_bitmap
|
return sprite_bitmap
|
||||||
rescue Exception
|
rescue Exception
|
||||||
e = $!
|
e = $!
|
||||||
echoln "Error loading sprite: #{e}" if bitmap
|
echoln "Error loading sprite: #{e}" if bitmap
|
||||||
@@ -85,41 +91,8 @@ class PIFSpriteExtracter
|
|||||||
@@spritesheet_cache.clear
|
@@spritesheet_cache.clear
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class PokemonGlobalMetadata
|
class PokemonGlobalMetadata
|
||||||
attr_accessor :current_spritepack_date
|
attr_accessor :current_spritepack_date
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# class SpritesBitmapCache
|
|
||||||
# @@cache = {} # Cache storage for spritesheets
|
|
||||||
# @@usage_order = [] # Tracks usage order for LRU eviction
|
|
||||||
#
|
|
||||||
# def self.fetch(key)
|
|
||||||
# if @@cache.key?(key)
|
|
||||||
# # Move key to the end to mark it as recently used
|
|
||||||
# @@usage_order.delete(key)
|
|
||||||
# @@usage_order << key
|
|
||||||
# return @@cache[key]
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# # Load spritesheet via block if not found in cache
|
|
||||||
# spritesheet = yield
|
|
||||||
#
|
|
||||||
# if @@cache.size >= Settings::SPRITE_CACHE_MAX_NB
|
|
||||||
# # Evict least recently used (first in order)
|
|
||||||
# oldest_key = @@usage_order.shift
|
|
||||||
# @@cache.delete(oldest_key)
|
|
||||||
# echoln "Evicted: #{oldest_key} from spritesheet cache"
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# # Add new spritesheet to cache and track its usage
|
|
||||||
# @@cache[key] = spritesheet
|
|
||||||
# @@usage_order << key
|
|
||||||
# spritesheet
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
class AutogenExtracter < PIFSpriteExtracter
|
class AutogenExtracter < PIFSpriteExtracter
|
||||||
SPRITESHEET_FOLDER_PATH = "Graphics\\Battlers\\spritesheets_autogen\\"
|
SPRITESHEET_FOLDER_PATH = "Graphics\\Battlers\\spritesheets_autogen\\"
|
||||||
SPRITE_SIZE = 288 # Each sprite is 288x288 pixels
|
SPRITE_SIZE = 96 # Size of each sprite in the spritesheet
|
||||||
COLUMNS = 10 # Number of columns in the spritesheet
|
COLUMNS = 10 # Number of columns in the spritesheet
|
||||||
SHEET_WIDTH = SPRITE_SIZE * COLUMNS # 2880 pixels wide spritesheet
|
SHEET_WIDTH = SPRITE_SIZE * COLUMNS # 2880 pixels wide spritesheet
|
||||||
|
|
||||||
@@ -32,6 +32,9 @@ class AutogenExtracter < PIFSpriteExtracter
|
|||||||
return "#{SPRITESHEET_FOLDER_PATH}#{head_id}.png"
|
return "#{SPRITESHEET_FOLDER_PATH}#{head_id}.png"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_resize_scale
|
||||||
|
return 3
|
||||||
|
end
|
||||||
#
|
#
|
||||||
# # Check cache before loading from disk
|
# # Check cache before loading from disk
|
||||||
# sprite_bitmap = @@spritesheet_cache.fetch(pif_sprite) do
|
# sprite_bitmap = @@spritesheet_cache.fetch(pif_sprite) do
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ class BaseSpriteExtracter < PIFSpriteExtracter
|
|||||||
end
|
end
|
||||||
|
|
||||||
SPRITESHEET_FOLDER_PATH = "Graphics/CustomBattlers/spritesheets/spritesheets_base/"
|
SPRITESHEET_FOLDER_PATH = "Graphics/CustomBattlers/spritesheets/spritesheets_base/"
|
||||||
SPRITE_SIZE = 288 # Original sprite size
|
SPRITE_SIZE = 96 # Original sprite size
|
||||||
SCALED_SIZE = 288 # Scaled sprite size
|
|
||||||
NB_COLUMNS_BASESPRITES = 10
|
NB_COLUMNS_BASESPRITES = 10
|
||||||
SHEET_WIDTH = SPRITE_SIZE * NB_COLUMNS_BASESPRITES # 2880 pixels wide spritesheet
|
SHEET_WIDTH = SPRITE_SIZE * NB_COLUMNS_BASESPRITES # 2880 pixels wide spritesheet
|
||||||
def load_bitmap_from_spritesheet(pif_sprite)
|
def load_bitmap_from_spritesheet(pif_sprite)
|
||||||
@@ -55,4 +54,8 @@ class BaseSpriteExtracter < PIFSpriteExtracter
|
|||||||
|
|
||||||
return !$updated_spritesheets.include?(spritesheet_file)
|
return !$updated_spritesheets.include?(spritesheet_file)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_resize_scale
|
||||||
|
return 3
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -4,6 +4,9 @@ class BattleSpriteLoader
|
|||||||
end
|
end
|
||||||
|
|
||||||
def load_pif_sprite_directly(pif_sprite)
|
def load_pif_sprite_directly(pif_sprite)
|
||||||
|
if pif_sprite.local_path && pbResolveBitmap(pif_sprite.local_path)
|
||||||
|
return AnimatedBitmap.new(pif_sprite.local_path)
|
||||||
|
end
|
||||||
extractor = get_sprite_extractor_instance(pif_sprite.type)
|
extractor = get_sprite_extractor_instance(pif_sprite.type)
|
||||||
return extractor.load_sprite(pif_sprite)
|
return extractor.load_sprite(pif_sprite)
|
||||||
end
|
end
|
||||||
@@ -22,8 +25,8 @@ class BattleSpriteLoader
|
|||||||
def preload_sprite_from_pokemon(pokemon)
|
def preload_sprite_from_pokemon(pokemon)
|
||||||
return if !pokemon
|
return if !pokemon
|
||||||
substitution_id = get_sprite_substitution_id_from_dex_number(pokemon.species)
|
substitution_id = get_sprite_substitution_id_from_dex_number(pokemon.species)
|
||||||
echoln substitution_id
|
# echoln substitution_id
|
||||||
echoln $PokemonGlobal.alt_sprite_substitutions
|
# echoln $PokemonGlobal.alt_sprite_substitutions
|
||||||
pif_sprite = $PokemonGlobal.alt_sprite_substitutions[substitution_id] if $PokemonGlobal
|
pif_sprite = $PokemonGlobal.alt_sprite_substitutions[substitution_id] if $PokemonGlobal
|
||||||
if !pif_sprite
|
if !pif_sprite
|
||||||
pif_sprite = get_pif_sprite_from_species(pokemon.species)
|
pif_sprite = get_pif_sprite_from_species(pokemon.species)
|
||||||
@@ -65,19 +68,25 @@ class BattleSpriteLoader
|
|||||||
def obtain_fusion_pif_sprite(head_id,body_id)
|
def obtain_fusion_pif_sprite(head_id,body_id)
|
||||||
substitution_id = get_sprite_substitution_id_for_fusion(head_id, body_id)
|
substitution_id = get_sprite_substitution_id_for_fusion(head_id, body_id)
|
||||||
pif_sprite = $PokemonGlobal.alt_sprite_substitutions[substitution_id] if $PokemonGlobal
|
pif_sprite = $PokemonGlobal.alt_sprite_substitutions[substitution_id] if $PokemonGlobal
|
||||||
|
pif_sprite.dump_info if pif_sprite
|
||||||
if !pif_sprite
|
if !pif_sprite
|
||||||
pif_sprite = select_new_pif_fusion_sprite(head_id, body_id)
|
pif_sprite = select_new_pif_fusion_sprite(head_id, body_id)
|
||||||
|
local_path = check_for_local_sprite(pif_sprite)
|
||||||
|
if local_path
|
||||||
|
pif_sprite.local_path = local_path
|
||||||
|
pif_sprite.type = :CUSTOM
|
||||||
|
end
|
||||||
substitution_id = get_sprite_substitution_id_for_fusion(head_id, body_id)
|
substitution_id = get_sprite_substitution_id_for_fusion(head_id, body_id)
|
||||||
$PokemonGlobal.alt_sprite_substitutions[substitution_id] = pif_sprite if $PokemonGlobal
|
$PokemonGlobal.alt_sprite_substitutions[substitution_id] = pif_sprite if $PokemonGlobal
|
||||||
end
|
end
|
||||||
return pif_sprite
|
return pif_sprite
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def load_fusion_sprite(head_id, body_id)
|
def load_fusion_sprite(head_id, body_id)
|
||||||
pif_sprite = obtain_fusion_pif_sprite(head_id,body_id)
|
pif_sprite = obtain_fusion_pif_sprite(head_id,body_id)
|
||||||
local_path = check_for_local_sprite(pif_sprite)
|
if pif_sprite.local_path
|
||||||
if local_path
|
return AnimatedBitmap.new(pif_sprite.local_path)
|
||||||
return AnimatedBitmap.new(local_path)
|
|
||||||
end
|
end
|
||||||
extractor = get_sprite_extractor_instance(pif_sprite.type)
|
extractor = get_sprite_extractor_instance(pif_sprite.type)
|
||||||
loaded_sprite = extractor.load_sprite(pif_sprite, @download_allowed)
|
loaded_sprite = extractor.load_sprite(pif_sprite, @download_allowed)
|
||||||
@@ -94,9 +103,8 @@ class BattleSpriteLoader
|
|||||||
pif_sprite = select_new_pif_base_sprite(dex_number)
|
pif_sprite = select_new_pif_base_sprite(dex_number)
|
||||||
$PokemonGlobal.alt_sprite_substitutions[substitution_id] = pif_sprite if $PokemonGlobal
|
$PokemonGlobal.alt_sprite_substitutions[substitution_id] = pif_sprite if $PokemonGlobal
|
||||||
end
|
end
|
||||||
local_path = check_for_local_sprite(pif_sprite)
|
if pif_sprite.local_path
|
||||||
if local_path
|
return AnimatedBitmap.new(pif_sprite.local_path)
|
||||||
return AnimatedBitmap.new(local_path)
|
|
||||||
end
|
end
|
||||||
extractor = get_sprite_extractor_instance(pif_sprite.type)
|
extractor = get_sprite_extractor_instance(pif_sprite.type)
|
||||||
loaded_sprite = extractor.load_sprite(pif_sprite)
|
loaded_sprite = extractor.load_sprite(pif_sprite)
|
||||||
@@ -137,6 +145,7 @@ class BattleSpriteLoader
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_for_local_sprite(pif_sprite)
|
def check_for_local_sprite(pif_sprite)
|
||||||
|
return pif_sprite.local_path if pif_sprite.local_path
|
||||||
if pif_sprite.type == :BASE
|
if pif_sprite.type == :BASE
|
||||||
sprite_path = "#{Settings::CUSTOM_BASE_SPRITES_FOLDER}#{pif_sprite.head_id}#{pif_sprite.alt_letter}.png"
|
sprite_path = "#{Settings::CUSTOM_BASE_SPRITES_FOLDER}#{pif_sprite.head_id}#{pif_sprite.alt_letter}.png"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ class CustomSpriteExtracter < PIFSpriteExtracter
|
|||||||
end
|
end
|
||||||
|
|
||||||
SPRITESHEET_FOLDER_PATH = "Graphics/CustomBattlers/spritesheets/spritesheets_custom/"
|
SPRITESHEET_FOLDER_PATH = "Graphics/CustomBattlers/spritesheets/spritesheets_custom/"
|
||||||
SPRITE_SIZE = 288 # Original sprite size
|
SPRITE_SIZE = 96 # Original sprite size
|
||||||
SCALED_SIZE = 288 # Scaled sprite size
|
|
||||||
SHEET_WIDTH = SPRITE_SIZE * COLUMNS # 2880 pixels wide spritesheet
|
SHEET_WIDTH = SPRITE_SIZE * COLUMNS # 2880 pixels wide spritesheet
|
||||||
|
|
||||||
def load_bitmap_from_spritesheet(pif_sprite)
|
def load_bitmap_from_spritesheet(pif_sprite)
|
||||||
@@ -60,6 +59,11 @@ class CustomSpriteExtracter < PIFSpriteExtracter
|
|||||||
load_sprite(PIFSprite.new(:CUSTOM,head_id,body_id,alt_letter))
|
load_sprite(PIFSprite.new(:CUSTOM,head_id,body_id,alt_letter))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def get_resize_scale
|
||||||
|
return 3
|
||||||
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# def extract_bitmap_to_file(head_id, body_id, alt_letter, folder)
|
# def extract_bitmap_to_file(head_id, body_id, alt_letter, folder)
|
||||||
# # Create the directory if it doesn't exist
|
# # Create the directory if it doesn't exist
|
||||||
|
|||||||
@@ -4,16 +4,33 @@ class PIFSprite
|
|||||||
attr_accessor :head_id
|
attr_accessor :head_id
|
||||||
attr_accessor :body_id
|
attr_accessor :body_id
|
||||||
attr_accessor :alt_letter
|
attr_accessor :alt_letter
|
||||||
|
attr_accessor :local_path
|
||||||
|
|
||||||
#types:
|
#types:
|
||||||
# :AUTOGEN, :CUSTOM, :BASE
|
# :AUTOGEN, :CUSTOM, :BASE
|
||||||
def initialize(type, head_id, body_id, alt_letter="")
|
def initialize(type, head_id, body_id, alt_letter = "")
|
||||||
@type = type
|
@type = type
|
||||||
@head_id = head_id
|
@head_id = head_id
|
||||||
@body_id = body_id
|
@body_id = body_id
|
||||||
@alt_letter = alt_letter
|
@alt_letter = alt_letter
|
||||||
|
@local_path = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def dump_info()
|
||||||
|
echoln "Type: #{@type}"
|
||||||
|
echoln "Head: #{@head_id}"
|
||||||
|
echoln "Body: #{@body_id}"
|
||||||
|
echoln "Alt letter: #{@alt_letter}"
|
||||||
|
echoln "Local path: #{@local_path}"
|
||||||
|
end
|
||||||
|
|
||||||
|
def equals(other_pif_sprite)
|
||||||
|
return @type == other_pif_sprite.type &&
|
||||||
|
@head_id == other_pif_sprite.head_id &&
|
||||||
|
@body_id == other_pif_sprite.body_id &&
|
||||||
|
@alt_letter == other_pif_sprite.alt_letter &&
|
||||||
|
@local_path == other_pif_sprite.local_path
|
||||||
|
end
|
||||||
|
|
||||||
#little hack for old methods that expect a filename for a sprite
|
#little hack for old methods that expect a filename for a sprite
|
||||||
def to_filename()
|
def to_filename()
|
||||||
@@ -27,9 +44,9 @@ class PIFSprite
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_from_spritename(spritename,type)
|
def setup_from_spritename(spritename, type)
|
||||||
@type = type
|
@type = type
|
||||||
cleaned_name = spritename.gsub(".png","")
|
cleaned_name = spritename.gsub(".png", "")
|
||||||
if cleaned_name =~ /(\d+)\.(\d+)([a-zA-Z]*)/
|
if cleaned_name =~ /(\d+)\.(\d+)([a-zA-Z]*)/
|
||||||
head_id = $1
|
head_id = $1
|
||||||
body_id = $2
|
body_id = $2
|
||||||
@@ -40,39 +57,36 @@ class PIFSprite
|
|||||||
@alt_letter = alt_letter
|
@alt_letter = alt_letter
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.from_spritename(spritename,type)
|
def self.from_spritename(spritename, type)
|
||||||
obj = allocate
|
obj = allocate
|
||||||
obj.send(:setup_from_spritename, spritename,type)
|
obj.send(:setup_from_spritename, spritename, type)
|
||||||
obj
|
obj
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_pif_sprite_from_dex_num(type, dexNum,alt_letter)
|
def new_pif_sprite_from_dex_num(type, dexNum, alt_letter)
|
||||||
body_id = getBodyID(dexNum)
|
body_id = getBodyID(dexNum)
|
||||||
head_id = getHeadID(dexNum,body_id)
|
head_id = getHeadID(dexNum, body_id)
|
||||||
return PIFSprite.new(type,head_id,body_id,alt_letter)
|
return PIFSprite.new(type, head_id, body_id, alt_letter)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def pif_sprite_from_spritename(spritename, autogen = false)
|
def pif_sprite_from_spritename(spritename, autogen = false)
|
||||||
spritename = spritename.split(".png")[0] #remove the extension
|
spritename = spritename.split(".png")[0] #remove the extension
|
||||||
if spritename =~ /^(\d+)\.(\d+)([a-zA-Z]*)$/ # Two numbers with optional letters
|
if spritename =~ /^(\d+)\.(\d+)([a-zA-Z]*)$/ # Two numbers with optional letters
|
||||||
type = :CUSTOM
|
type = :CUSTOM
|
||||||
head_id = $1.to_i # Head (e.g., "1" in "1.2.png")
|
head_id = $1.to_i # Head (e.g., "1" in "1.2.png")
|
||||||
body_id = $2.to_i # Body (e.g., "2" in "1.2.png")
|
body_id = $2.to_i # Body (e.g., "2" in "1.2.png")
|
||||||
alt_letter = $3 # Optional trailing letter (e.g., "a" in "1.2a.png")
|
alt_letter = $3 # Optional trailing letter (e.g., "a" in "1.2a.png")
|
||||||
|
|
||||||
elsif spritename =~ /^(\d+)([a-zA-Z]*)$/ # One number with optional letters
|
elsif spritename =~ /^(\d+)([a-zA-Z]*)$/ # One number with optional letters
|
||||||
type = :BASE
|
type = :BASE
|
||||||
head_id = $1.to_i # Head (e.g., "1" in "1.png")
|
head_id = $1.to_i # Head (e.g., "1" in "1.png")
|
||||||
alt_letter = $2 # Optional trailing letter (e.g., "a" in "1a.png")
|
alt_letter = $2 # Optional trailing letter (e.g., "a" in "1a.png")
|
||||||
else
|
else
|
||||||
echoln "Invalid sprite format: #{spritename}"
|
echoln "Invalid sprite format: #{spritename}"
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
type = :AUTOGEN if autogen
|
type = :AUTOGEN if autogen
|
||||||
return PIFSprite.new(type,head_id,body_id,alt_letter)
|
return PIFSprite.new(type, head_id, body_id, alt_letter)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ SWITCH_PINKAN_SIDE_ROCKET=1099
|
|||||||
SWITCH_PINKAN_SIDE_POLICE=1100
|
SWITCH_PINKAN_SIDE_POLICE=1100
|
||||||
SWITCH_LEAVING_PINKAN_ISLAND=1113
|
SWITCH_LEAVING_PINKAN_ISLAND=1113
|
||||||
SWITCH_BLOCK_PINKAN_WHISTLE=1111
|
SWITCH_BLOCK_PINKAN_WHISTLE=1111
|
||||||
|
SWITCH_PINKAN_FINISHED=1119
|
||||||
|
|
||||||
VAR_ORICORIO_FLOWERS = 276
|
VAR_ORICORIO_FLOWERS = 276
|
||||||
#Randomizer Switches
|
#Randomizer Switches
|
||||||
@@ -220,6 +221,7 @@ VAR_NB_ROCKET_MISSIONS = 286
|
|||||||
|
|
||||||
VAR_BOUTIQUE_OUTFIT=290
|
VAR_BOUTIQUE_OUTFIT=290
|
||||||
VAR_FISHING_CONTEST_RECORD=294
|
VAR_FISHING_CONTEST_RECORD=294
|
||||||
|
VAR_FISHING_CONTEST_NERF=333
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -173,14 +173,19 @@ def generate_front_trainer_sprite_bitmap(allowEasterEgg=true, pokeball = nil, cl
|
|||||||
raise "No temp clothes graphics available"
|
raise "No temp clothes graphics available"
|
||||||
end
|
end
|
||||||
|
|
||||||
outfitBitmap = AnimatedBitmap.new(outfitFilename, clothes_color_shift) # if pbResolveBitmap(outfitFilename) #pb
|
outfitBitmap = AnimatedBitmap.new(outfitFilename, clothes_color_shift) if pbResolveBitmap(outfitFilename) #pb
|
||||||
hairBitmapWrapper = AnimatedBitmap.new(hairFilename, hair_color_shift) if pbResolveBitmap(hairFilename)
|
hairBitmapWrapper = AnimatedBitmap.new(hairFilename, hair_color_shift) if pbResolveBitmap(hairFilename)
|
||||||
|
|
||||||
hatBitmap = AnimatedBitmap.new(hatFilename, hat_color_shift) if pbResolveBitmap(hatFilename) #pbLoadOutfitBitmap(hatFilename) if pbResolveBitmap(hatFilename)
|
hatBitmap = AnimatedBitmap.new(hatFilename, hat_color_shift) if pbResolveBitmap(hatFilename) #pbLoadOutfitBitmap(hatFilename) if pbResolveBitmap(hatFilename)
|
||||||
|
|
||||||
baseBitmap.bitmap = baseBitmap.bitmap.clone
|
baseBitmap.bitmap = baseBitmap.bitmap.clone
|
||||||
baseBitmap.bitmap.blt(0, 0, outfitBitmap.bitmap, outfitBitmap.bitmap.rect) if outfitBitmap
|
if outfitBitmap
|
||||||
|
baseBitmap.bitmap.blt(0, 0, outfitBitmap.bitmap, outfitBitmap.bitmap.rect)
|
||||||
|
else
|
||||||
|
outfitFilename = getTrainerSpriteOutfitFilename("temp")
|
||||||
|
outfitBitmap = AnimatedBitmap.new(outfitFilename, 0)
|
||||||
|
baseBitmap.bitmap.blt(0, 0, outfitBitmap.bitmap, outfitBitmap.bitmap.rect)
|
||||||
|
end
|
||||||
baseBitmap.bitmap.blt(0, 0, hairBitmapWrapper.bitmap, hairBitmapWrapper.bitmap.rect) if hairBitmapWrapper
|
baseBitmap.bitmap.blt(0, 0, hairBitmapWrapper.bitmap, hairBitmapWrapper.bitmap.rect) if hairBitmapWrapper
|
||||||
baseBitmap.bitmap.blt(0, 0, hatBitmap.bitmap, hatBitmap.bitmap.rect) if hatBitmap
|
baseBitmap.bitmap.blt(0, 0, hatBitmap.bitmap, hatBitmap.bitmap.rect) if hatBitmap
|
||||||
baseBitmap.bitmap.blt(44, 42, ballBitmap, ballBitmap.rect) if ballBitmap
|
baseBitmap.bitmap.blt(44, 42, ballBitmap, ballBitmap.rect) if ballBitmap
|
||||||
|
|||||||
@@ -155,7 +155,6 @@ end
|
|||||||
|
|
||||||
def get_clothes_by_id(id)
|
def get_clothes_by_id(id)
|
||||||
update_global_outfit_lists()
|
update_global_outfit_lists()
|
||||||
echoln $PokemonGlobal.clothes_data
|
|
||||||
return $PokemonGlobal.clothes_data.has_key?(id) ? $PokemonGlobal.clothes_data[id] : nil
|
return $PokemonGlobal.clothes_data.has_key?(id) ? $PokemonGlobal.clothes_data[id] : nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ CLOTHES_GHOST = "temp"
|
|||||||
CLOTHES_STEEL_M = "steelworkerM"
|
CLOTHES_STEEL_M = "steelworkerM"
|
||||||
CLOTHES_STEEL_F = "steelworkerF"
|
CLOTHES_STEEL_F = "steelworkerF"
|
||||||
|
|
||||||
CLOTHES_FIRE = "firefigther"
|
CLOTHES_FIRE = "fire"
|
||||||
|
|
||||||
CLOTHES_WATER = "waterdress"
|
CLOTHES_WATER = "waterdress"
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ CLOTHES_ELECTRIC = "urbanelectric"
|
|||||||
|
|
||||||
CLOTHES_PSYCHIC = "temp"
|
CLOTHES_PSYCHIC = "temp"
|
||||||
|
|
||||||
CLOTHES_ICE = "temp"
|
CLOTHES_ICE = "iceoutfit"
|
||||||
|
|
||||||
CLOTHES_DRAGON = "dragonconqueror"
|
CLOTHES_DRAGON = "dragonconqueror"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
class OutfitsMartAdapter < PokemonMartAdapter
|
class OutfitsMartAdapter < PokemonMartAdapter
|
||||||
|
attr_accessor :worn_clothes
|
||||||
|
|
||||||
WORN_ITEM_BASE_COLOR = MessageConfig::BLUE_TEXT_MAIN_COLOR
|
WORN_ITEM_BASE_COLOR = MessageConfig::BLUE_TEXT_MAIN_COLOR
|
||||||
WORN_ITEM_SHADOW_COLOR = MessageConfig::BLUE_TEXT_SHADOW_COLOR
|
WORN_ITEM_SHADOW_COLOR = MessageConfig::BLUE_TEXT_SHADOW_COLOR
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user