5 Commits

Author SHA1 Message Date
chardub
4ea80c50da Fixes quest icon lingering on map transfers 2025-03-24 13:11:02 -04:00
chardub
91449316d5 Quest symbols (WIP) 2025-03-23 23:04:48 -04:00
chardub
0f90a62dba musicians graphics 2025-03-21 21:52:22 -04:00
chardub
5b6751083a Jigglypuff improvements 2025-03-21 10:41:10 -04:00
chardub
4d69d60fbc Different colors for regional & city exclusive outfits in outfits shops 2025-03-20 22:23:31 -04:00
52 changed files with 236 additions and 26 deletions

BIN
Audio/ME/lullaby.mp3 Normal file

Binary file not shown.

BIN
Data/.DS_Store vendored

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.

View File

@@ -81,6 +81,14 @@ class Scene_Map
$game_switches[SWITCH_ILEX_FOREST_SPOOKED_POKEMON] = false
end
def clear_quest_icons()
for sprite in $scene.spriteset.character_sprites
if sprite.is_a?(Sprite_Character) && sprite.questIcon
sprite.removeQuestIcon
end
end
end
def transfer_player(cancelVehicles = true)
reset_switches_for_map_transfer()
$game_temp.player_transferring = false
@@ -88,6 +96,7 @@ class Scene_Map
autofade($game_temp.player_new_map_id)
pbBridgeOff
@spritesetGlobal.playersprite.clearShadows
clear_quest_icons()
if $game_map.map_id != $game_temp.player_new_map_id
$MapFactory.setup($game_temp.player_new_map_id)
end

View File

@@ -166,4 +166,56 @@ end
def get_hair_by_id(id)
update_global_outfit_lists()
return $PokemonGlobal.hairstyles_data.has_key?(id) ? $PokemonGlobal.hairstyles_data[id] : nil
end
def generate_clothes_choice(baseOptions=true,additionalIds=[],additionalTags=[],filterOutTags=[])
list = []
list += additionalIds
list += search_clothes(additionalTags)
if baseOptions
list += get_clothes_base_options()
list += search_clothes(get_regional_sets_tags())
end
return list
end
CITY_OUTFIT_TAGS= [
"pewter","cerulean","vermillion","lavender","celadon","fuchsia","cinnabar",
"crimson","goldenrod","azalea", "violet", "blackthorn", "mahogany", "ecruteak",
"olivine","cianwood", "kin"
]
def list_city_exclusive_clothes()
tags_list = CITY_OUTFIT_TAGS
echoln search_clothes(tags_list)
return search_clothes(tags_list)
end
def list_city_exclusive_hats()
tags_list = CITY_OUTFIT_TAGS
return search_hats(tags_list)
end
def list_city_exclusive_hairstyles()
tags_list = CITY_OUTFIT_TAGS
return search_hairstyles(tags_list)
end
def list_regional_clothes()
selector = OutfitSelector.new
tags_list = selector.get_regional_sets_tags()
return search_clothes(tags_list)
end
def list_regional_hats()
selector = OutfitSelector.new
tags_list = selector.get_regional_sets_tags()
return search_hats(tags_list)
end
def list_regional_hairstyles()
selector = OutfitSelector.new
tags_list = selector.get_regional_sets_tags()
return search_hairstyles(tags_list)
end

View File

@@ -144,4 +144,5 @@ HAIR_CRESSELIA = "lunarbob"
HAIR_LYCANROC="lycanrocshorthair"
HAIR_HAPPINY="happinysuit"
HAIR_LATIAS="SpecialLatias"
HAIR_GARDEVOIR="gardevoir"
HAIR_GARDEVOIR="gardevoir"
HAIR_EEVEE="eeveetail"

View File

@@ -6,6 +6,13 @@ class OutfitsMartAdapter < PokemonMartAdapter
WORN_ITEM_BASE_COLOR = MessageConfig::BLUE_TEXT_MAIN_COLOR
WORN_ITEM_SHADOW_COLOR = MessageConfig::BLUE_TEXT_SHADOW_COLOR
REGIONAL_SET_BASE_COLOR = Color.new(76,72,104)
REGIONAL_SET_SHADOW_COLOR = Color.new(173,165,189)
CITY_EXCLUSIVE_BASE_COLOR = Color.new(61 , 125, 70) #Color.new(72 , 104, 83)
CITY_EXCLUSIVE_SHADOW_COLOR = Color.new(165, 189, 178)
def initialize(stock = [], isShop = true, isSecondaryHat = false)
@is_secondary_hat = isSecondaryHat
@items = stock
@@ -14,6 +21,19 @@ class OutfitsMartAdapter < PokemonMartAdapter
@version = nil
$Trainer.dyed_hats = {} if !$Trainer.dyed_hats
$Trainer.dyed_clothes = {} if !$Trainer.dyed_clothes
#todo: refactor to get the list from the first search when
# setting the stock instead of searching twice
@regional_set_items = @isShop ? list_regional_set_items : []
@city_exclusive_items = @isShop ? list_city_exclusive_items : []
end
def list_regional_set_items()
return []
end
def list_city_exclusive_items()
return []
end
def getDisplayName(item)
@@ -85,13 +105,23 @@ class OutfitsMartAdapter < PokemonMartAdapter
super
end
def isItemInRegionalSet(item)
return @regional_set_items.include?(item.id)
end
def isItemCityExclusive(item)
return @city_exclusive_items.include?(item.id)
end
def getBaseColorOverride(item)
return WORN_ITEM_BASE_COLOR if isWornItem?(item)
return nil
return REGIONAL_SET_BASE_COLOR if isItemInRegionalSet(item)
return CITY_EXCLUSIVE_BASE_COLOR if isItemCityExclusive(item)
return nil
end
def getShadowColorOverride(item)
return WORN_ITEM_SHADOW_COLOR if isWornItem?(item)
return REGIONAL_SET_SHADOW_COLOR if isItemInRegionalSet(item)
return CITY_EXCLUSIVE_SHADOW_COLOR if isItemCityExclusive(item)
return nil
end

View File

@@ -10,6 +10,14 @@ class ClothesMartAdapter < OutfitsMartAdapter
end
end
def list_regional_set_items()
return list_regional_clothes
end
def list_city_exclusive_items
return list_city_exclusive_clothes
end
def initialize(stock = nil, isShop = nil)
super
end
@@ -103,4 +111,6 @@ class ClothesMartAdapter < OutfitsMartAdapter
def isWornItem?(item)
super
end
end

View File

@@ -143,4 +143,4 @@ def changeOutfit()
break
end
end
end
end

View File

@@ -43,6 +43,15 @@ class HairMartAdapter < OutfitsMartAdapter
return false
end
def list_regional_set_items()
return list_regional_hairstyles
end
def list_city_exclusive_items
return list_city_exclusive_hairstyles
end
def toggleEvent(item)
pbSEPlay("GUI storage put down", 80, 100)
toggleHatVisibility()

View File

@@ -27,6 +27,14 @@ class HatsMartAdapter < OutfitsMartAdapter
end
end
def list_regional_set_items()
return list_regional_hats
end
def list_city_exclusive_items
return list_city_exclusive_hats
end
def set_secondary_hat(value)
@is_secondary_hat = value
end

View File

@@ -507,4 +507,14 @@ def new_spritepack_was_released()
return true
end
return false
end
end
def get_spritecharacter_for_event(event_id)
for sprite in $scene.spriteset.character_sprites
if sprite.character.id == event_id
return sprite
end
end
end

View File

@@ -87,13 +87,14 @@ QUESTS = {
"pewter_1" => Quest.new("pewter_1", "Mushroom Gathering", "A lady in Pewter City wants you to bring her 3 TinyMushroom from Viridian Forest to make a stew.", QuestBranchHotels, "BW (74)", "Pewter City", HotelQuestColor),
"pewter_2" =>Quest.new("pewter_2", "Lost Medicine", "A youngster in Pewter City needs your help to find a lost Revive. He lost it by sitting on a bench somewhere in Pewter City.", QuestBranchHotels, "BW (19)", "Pewter City", HotelQuestColor),
"pewter_3" =>Quest.new("pewter_3", "Bug Evolution ", "A Bug Catcher in Pewter City wants you to show him a fully-evolved Bug Pokémon.", QuestBranchHotels, "BWBugCatcher_male", "Pewter City", HotelQuestColor),
63 => Quest.new(63, "I Choose You!", "A Pikachu in the PokéMart has lost its official Pokémon League Hat. Find one and give it to the Pikachu!", QuestBranchField, "YOUNGSTER_LeagueHat", "Pewter City", FieldQuestColor),
"pewter_field_1" => Quest.new("pewter_field_1", "Nectar garden", "An old man wants you to bring differently colored flowers for the city's garden.", QuestBranchField, "BW (039)", "Pewter City", FieldQuestColor),
"pewter_field_2" => Quest.new("pewter_field_2", "I Choose You!", "A Pikachu in the PokéMart has lost its official Pokémon League Hat. Find one and give it to the Pikachu!", QuestBranchField, "YOUNGSTER_LeagueHat", "Pewter City", FieldQuestColor),
#Cerulean hotel
3 => Quest.new(3, "Playing Cupid", "A boy in Cerulean City wants you bring a love letter to a Pokémon Breeder named Maude. She's probably somewhere in one of the routes near Cerulean City", QuestBranchHotels, "BW (18)", "Cerulean City", HotelQuestColor),
4 => Quest.new(4, "Fishing for Sole", "A fisherman wants you to fish up an old boot. Hook it up with the old rod in any body of water.", QuestBranchHotels, "BW (71)", "Cerulean City", HotelQuestColor),
"cerulean_1" => Quest.new("cerulean_1", "Playing Cupid", "A boy in Cerulean City wants you bring a love letter to a Pokémon Breeder named Maude. She's probably somewhere in one of the routes near Cerulean City", QuestBranchHotels, "BW (18)", "Cerulean City", HotelQuestColor),
"cerulean_2" => Quest.new("cerulean_2", "Type Experts", "Defeat all of the Type Experts scattered around the Kanto region (#{pbGet(VAR_TYPE_EXPERTS_BEATEN)}/#{TOTAL_NB_TYPE_EXPERTS})", QuestBranchHotels, "expert-normal", "Cerulean City", HotelQuestColor),
5 => Quest.new(5, "Johto Pokémon", "A traveler in the PokéMart wants you to show him a Pokémon native to the Johto region.", QuestBranchHotels, "traveler_johto", "Cerulean City", HotelQuestColor),
"cerulean_2" => Quest.new(5, "Type Experts", "Defeat all of the Type Experts scattered around the Kanto region (#{pbGet(VAR_TYPE_EXPERTS_BEATEN)}/#{TOTAL_NB_TYPE_EXPERTS})", QuestBranchHotels, "expert-normal", "Cerulean City", HotelQuestColor),
#Route 24
6 => Quest.new(6, "Field Research (Part 1)", "Professor Oak's aide wants you to catch an Abra.", QuestBranchField, "BW (82)", "Route 24", FieldQuestColor),
@@ -101,12 +102,12 @@ QUESTS = {
8 => Quest.new(8, "Field Research (Part 3)", "Professor Oak's aide wants you to catch a Buneary using the Pokéradar.", QuestBranchField, "BW (82)", "Route 24", FieldQuestColor),
#Vermillion City
9 => Quest.new(9, "Unusual Types 1", "A woman at the hotel wants you to show her a Water/Fire-type Pokémon", QuestBranchHotels, "BW (58)", "Vermillion City", HotelQuestColor),
10 => Quest.new(10, "Trainer House", "Earn 10 Trainer Points at the Trainer House in Viridian City", QuestBranchHotels, "BW (55)", "Vermillion City", HotelQuestColor),
11 => Quest.new(11, "Powering the Lighthouse", "Catch some Voltorb to power up the lighthouse", QuestBranchHotels, "BW (43)", "Vermillion City", HotelQuestColor),
12 => Quest.new(12, "Seafood Cocktail ", "Get some steamed Krabby legs from the S.S. Anne's kitchen and bring them back to the hotel before they get cold", QuestBranchHotels, "BW (36)", "Vermillion City", HotelQuestColor),
13 => Quest.new(13, "Building Materials ", "Get some wooden planks from Viridian City and some Bricks from Pewter City.", QuestBranchField, "BW (36)", "Vermillion City", FieldQuestColor),
64 => Quest.new(64, "Waiter on the Water", "The S.S. Anne waiter wants you to take restaurant orders while he went to get a replacement cake.", QuestBranchField, "BW (53)", "S.S. Anne", FieldQuestColor),
"vermillion_2" => Quest.new("vermillion_2", "Fishing for Sole", "A fisherman wants you to fish up an old boot. Hook it up with the old rod in any body of water.", QuestBranchHotels, "BW (71)", "Cerulean City", HotelQuestColor),
"vermillion_1" => Quest.new("vermillion_1", "Unusual Types 1", "A woman at the hotel wants you to show her a Water/Fire-type Pokémon", QuestBranchHotels, "BW (58)", "Vermillion City", HotelQuestColor),
11 => Quest.new(11, "Powering the Lighthouse", "Catch some Voltorb to power up the lighthouse", QuestBranchHotels, "BW (43)", "Vermillion City", HotelQuestColor),
"vermillion_3" => Quest.new("vermillion_3", "Seafood Cocktail ", "Get some steamed Krabby legs from the S.S. Anne's kitchen and bring them back to the hotel before they get cold", QuestBranchHotels, "BW (36)", "Vermillion City", HotelQuestColor),
"vermillion_field_1" => Quest.new("vermillion_field_1", "Building Materials ", "Get some wooden planks from Viridian City and some Bricks from Pewter City.", QuestBranchField, "BW (36)", "Vermillion City", FieldQuestColor),
"vermillion_field_2" => Quest.new("vermillion_field_2", "Waiter on the Water", "The S.S. Anne waiter wants you to take restaurant orders while he went to get a replacement cake.", QuestBranchField, "BW (53)", "S.S. Anne", FieldQuestColor),
#Celadon City
14 => Quest.new(14, "Sun or Moon", "Show the Pokémon that Eevee evolves when exposed to a Moon or Sun stone to help the scientist with her research.", QuestBranchHotels, "BW (82)", "Celadon City", HotelQuestColor),
@@ -178,7 +179,6 @@ QUESTS = {
52 => Quest.new(52, "The long night (Part 5)", "You found a strange fruit that appears to be related to the mysterious darkness. Go see professor Oak to have it analyzed.", QuestBranchLegendary, "BW029", "Safari Zone", LegendaryQuestColor),
53 => Quest.new(53, "The long night (Part 6)", "The strange plant you found appears to glow in the mysterious darkness that now covers the entire region. Try to follow the glow to find out the source of the disturbance.", QuestBranchLegendary, "BW-oak", "Pallet Town", LegendaryQuestColor),
54 => Quest.new(54, "Nectar garden", "An old man wants you to bring differently colored flowers for the city's garden.", QuestBranchField, "BW (039)", "Pewter City", FieldQuestColor),
55 => Quest.new(55, "The Cursed Forest", "A child wants you to find a floating tree stump in Ilex Forest. What could she be talking about?", QuestBranchHotels, "BW109", "Goldenrod City", HotelQuestColor),
56 => Quest.new(56, "Bitey Pokémon", "A fisherman wants to know what is the sharp-toothed Pokémon that bit him in the Safari Zone's lake.", QuestBranchHotels, "BW (71)", "Fuchsia City", HotelQuestColor),
@@ -203,6 +203,8 @@ def pbAcceptNewQuest(id, bubblePosition = 20, show_description=true)
title = QUESTS[id].name
description = QUESTS[id].desc
showNewQuestMessage(title,description,show_description)
character_sprite = get_spritecharacter_for_event(@event_id)
character_sprite.removeQuestIcon if character_sprite
pbAddQuest(id)
end
@@ -219,22 +221,34 @@ def showNewQuestMessage(title,description, show_description)
end
def isQuestAlreadyAccepted?(id)
$Trainer.quests = [] if $Trainer.quests.class == NilClass
for quest in $Trainer.quests
return true if quest.id == id
end
return false
$Trainer.quests ||= [] # Initializes quests as an empty array if nil
$Trainer.quests.any? { |quest| quest.id.to_s == id.to_s }
end
def finishQuest(id, silent=false)
return if pbCompletedQuest?(id)
pbMEPlay("Register phone") if !silent
Kernel.pbMessage("\\C[6]Quest completed!") if !silent
$game_variables[222] += 1 # karma
$game_variables[97] -= 1 #nb. quests active
$game_variables[98] += 1 #nb. quests completed
pbSetQuest(id, true)
character_sprite = get_spritecharacter_for_event(@event_id)
character_sprite.removeQuestIcon if character_sprite
# character_sprite = $scene.spriteset.character_sprites[@event_id]
# echoln character_sprite
# if character_sprite
# character_sprite.removeQuestIcon
# end
# $scene.reset_map(true,false) #to remove the quest icon
end
def pbCompletedQuest?(id)
@@ -267,10 +281,10 @@ end
def pbSetQuest(id, completed)
$Trainer.quests = [] if $Trainer.quests.class == NilClass
for q in $Trainer.quests
echoln id
echoln q.id
echoln q.completed
echoln "----"
# echoln id
# echoln q.id
# echoln q.completed
# echoln "----"
q.completed = completed if q.id == id
end
end

View File

@@ -0,0 +1,67 @@
class Sprite_Character
QUEST_NPC_TRIGGER = "questNPC"
QUEST_ICON_FOLDER = "Graphics/Pictures/Quests/"
QUEST_ICON_NAME = "Graphics/Pictures/Quests/questIcon"
attr_accessor :questIcon
alias questIcon_init initialize
def initialize(viewport, character = nil)
questIcon_init(viewport,character)
quest_id = detectQuestSwitch(character)
if quest_id
echoln "balablbi #{quest_id}"
addQuestMarkerToSprite
end
end
alias questIcon_update update
def update
questIcon_update
positionQuestIndicator if @questIcon
#removeQuestIcon if @questIcon && isQuestAlreadyAccepted?(@quest_switch)
end
# Event name must contain questNPC(x) for a quest icon to be displayed
# Where x is the quest ID
# if the quest has not already been accepted, the quest marker will be shown
def detectQuestSwitch(event)
return nil if event.is_a?(Game_Player)
name = event.name.clone
match = name.match(/#{Regexp.escape(QUEST_NPC_TRIGGER)}\(([^)]+)\)/) # Capture anything inside parentheses
return nil unless match
quest_id = match[1]
quest_id = quest_id.gsub(/^['"]|['"]$/, '') # Remove quotes if they exist
return nil if isQuestAlreadyAccepted?(quest_id)
return quest_id
end
def addQuestMarkerToSprite()
removeQuestIcon if @questIcon
@questIcon = Sprite.new(@viewport)
@questIcon.bmp(QUEST_ICON_NAME)
positionQuestIndicator
end
def positionQuestIndicator()
y_offset =-70
@questIcon.ox = @questIcon.bitmap.width / 2.0
@questIcon.oy = @questIcon.bitmap.height / 2.0
x_position = @character.screen_x
y_position = @character.screen_y + y_offset
@questIcon.x = x_position
@questIcon.y = y_position
@questIcon.z = 999
end
def removeQuestIcon()
echoln "REMOVAL for #{self}"
@questIcon.dispose
@questIcon = nil
end
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 KiB

After

Width:  |  Height:  |  Size: 447 KiB