diff --git a/Data/Scripts/001_Settings.rb b/Data/Scripts/001_Settings.rb index 5e0740024..229df4d42 100644 --- a/Data/Scripts/001_Settings.rb +++ b/Data/Scripts/001_Settings.rb @@ -18,28 +18,50 @@ module Settings #============================================================================= - # The default screen width (at a scale of 1.0). - SCREEN_WIDTH = 512 - # The default screen height (at a scale of 1.0). - SCREEN_HEIGHT = 384 - # The default screen scale factor. Possible values are 0.5, 1.0, 1.5 and 2.0. - SCREEN_SCALE = 1.0 + # The maximum amount of money the player can have. + MAX_MONEY = 999_999 + # The maximum number of Game Corner coins the player can have. + MAX_COINS = 99_999 + # The maximum number of Battle Points the player can have. + MAX_BATTLE_POINTS = 9_999 + # The maximum amount of soot the player can have. + MAX_SOOT = 9_999 + # The maximum length, in characters, that the player's name can be. + MAX_PLAYER_NAME_SIZE = 10 + # The maximum number of Pokémon that can be in the party. + MAX_PARTY_SIZE = 6 + # The maximum level Pokémon can reach. + MAXIMUM_LEVEL = 100 + # The level of newly hatched Pokémon. + EGG_LEVEL = 1 + # The odds of a newly generated Pokémon being shiny (out of 65536). + SHINY_POKEMON_CHANCE = (MECHANICS_GENERATION >= 6) ? 16 : 8 + # Whether super shininess is enabled (uses a different shiny animation). + SUPER_SHINY = (MECHANICS_GENERATION >= 8) + # The odds of a wild Pokémon/bred egg having Pokérus (out of 65536). + POKERUS_CHANCE = 3 #============================================================================= - # The maximum level Pokémon can reach. - MAXIMUM_LEVEL = 100 - # The level of newly hatched Pokémon. - EGG_LEVEL = 1 - # The odds of a newly generated Pokémon being shiny (out of 65536). - SHINY_POKEMON_CHANCE = (MECHANICS_GENERATION >= 6) ? 16 : 8 - # Whether super shininess is enabled (uses a different shiny animation). - SUPER_SHINY = (MECHANICS_GENERATION >= 8) - # Whether shiny wild Pokémon are more likely to appear if the player has - # previously defeated/caught lots of other Pokémon of the same species. - HIGHER_SHINY_CHANCES_WITH_NUMBER_BATTLED = (MECHANICS_GENERATION >= 8) - # The odds of a wild Pokémon/bred egg having Pokérus (out of 65536). - POKERUS_CHANCE = 3 + # Whether outdoor maps should be shaded according to the time of day. + TIME_SHADING = true + # Whether poisoned Pokémon will lose HP while walking around in the field. + POISON_IN_FIELD = (MECHANICS_GENERATION <= 4) + # Whether poisoned Pokémon will faint while walking around in the field + # (true), or survive the poisoning with 1 HP (false). + POISON_FAINT_IN_FIELD = (MECHANICS_GENERATION <= 3) + # Whether planted berries grow according to Gen 4 mechanics (true) or Gen 3 + # mechanics (false). + NEW_BERRY_PLANTS = (MECHANICS_GENERATION >= 4) + # Whether fishing automatically hooks the Pokémon (true), or whether there is + # a reaction test first (false). + FISHING_AUTO_HOOK = false + # The ID of the common event that runs when the player starts fishing (runs + # instead of showing the casting animation). + FISHING_BEGIN_COMMON_EVENT = -1 + # The ID of the common event that runs when the player stops fishing (runs + # instead of showing the reeling in animation). + FISHING_END_COMMON_EVENT = -1 # Whether Pokémon in the Day Care gain Exp for each step the player takes. # This is true for the Day Care and false for the Pokémon Nursery, both of # which use the same code in Essentials. @@ -53,21 +75,54 @@ module Settings # Whether a bred baby Pokémon can inherit egg moves from its mother. It can # always inherit egg moves from its father. BREEDING_CAN_INHERIT_EGG_MOVES_FROM_MOTHER = (MECHANICS_GENERATION >= 6) + # Whether you get 1 Premier Ball for every 10 of any kind of Poké Ball bought + # at once (true), or 1 Premier Ball for buying 10+ Poké Balls (false). + MORE_BONUS_PREMIER_BALLS = (MECHANICS_GENERATION >= 8) + # The number of steps allowed before a Safari Zone game is over (0=infinite). + SAFARI_STEPS = 600 + # The number of seconds a Bug Catching Contest lasts for (0=infinite). + BUG_CONTEST_TIME = 20 * 60 # 20 minutes #============================================================================= - # The maximum amount of money the player can have. - MAX_MONEY = 999_999 - # The maximum number of Game Corner coins the player can have. - MAX_COINS = 99_999 - # The maximum number of Battle Points the player can have. - MAX_BATTLE_POINTS = 9_999 - # The maximum amount of soot the player can have. - MAX_SOOT = 9_999 - # The maximum length, in characters, that the player's name can be. - MAX_PLAYER_NAME_SIZE = 10 - # The maximum number of Pokémon that can be in the party. - MAX_PARTY_SIZE = 6 + # If a move taught by a TM/HM/TR replaces another move, this setting is + # whether the machine's move retains the replaced move's PP (true), or whether + # the machine's move has full PP (false). + TAUGHT_MACHINES_KEEP_OLD_PP = (MECHANICS_GENERATION == 5) + # Whether various HP-healing items heal the amounts they do in Gen 7+ (true) + # or in earlier Generations (false). + REBALANCED_HEALING_ITEM_AMOUNTS = (MECHANICS_GENERATION >= 7) + # Whether Rage Candy Bar acts as a Full Heal (true) or a Potion (false). + RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS = (MECHANICS_GENERATION >= 7) + # Whether vitamins can add EVs no matter how many that stat already has in it + # (true), or whether they can't make that stat's EVs greater than 100 (false). + NO_VITAMIN_EV_CAP = (MECHANICS_GENERATION >= 8) + # Whether Rare Candy can be used on a Pokémon that is already at its maximum + # level if it is able to evolve by level-up (if so, triggers that evolution). + RARE_CANDY_USABLE_AT_MAX_LEVEL = (MECHANICS_GENERATION >= 8) + # Whether the player can choose how many of an item to use at once on a + # Pokémon. This applies to Exp-changing items (Rare Candy, Exp Candies) and + # EV-changing items (vitamins, feathers, EV-lowering berries). + USE_MULTIPLE_STAT_ITEMS_AT_ONCE = (MECHANICS_GENERATION >= 8) + + #============================================================================= + + # Whether Repel uses the level of the first Pokémon in the party regardless of + # its HP (true), or it uses the level of the first unfainted Pokémon (false). + REPEL_COUNTS_FAINTED_POKEMON = (MECHANICS_GENERATION >= 6) + # Whether more abilities affect whether wild Pokémon appear, which Pokémon + # they are, etc. + MORE_ABILITIES_AFFECT_WILD_ENCOUNTERS = (MECHANICS_GENERATION >= 8) + # Whether the Black/White Flutes will raise/lower the levels of wild Pokémon + # respectively (true), or will lower/raise the wild encounter rate + # respectively (false). + FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS = (MECHANICS_GENERATION >= 6) + # Whether shiny wild Pokémon are more likely to appear if the player has + # previously defeated/caught lots of other Pokémon of the same species. + HIGHER_SHINY_CHANCES_WITH_NUMBER_BATTLED = (MECHANICS_GENERATION >= 8) + # Whether overworld weather can set the default terrain effect in battle. + # Storm weather sets Electric Terrain, and fog weather sets Misty Terrain. + OVERWORLD_WEATHER_SETS_BATTLE_TERRAIN = (MECHANICS_GENERATION >= 8) #============================================================================= @@ -82,48 +137,6 @@ module Settings #============================================================================= - # Whether outdoor maps should be shaded according to the time of day. - TIME_SHADING = true - - #============================================================================= - - # Whether poisoned Pokémon will lose HP while walking around in the field. - POISON_IN_FIELD = (MECHANICS_GENERATION <= 4) - # Whether poisoned Pokémon will faint while walking around in the field - # (true), or survive the poisoning with 1 HP (false). - POISON_FAINT_IN_FIELD = (MECHANICS_GENERATION <= 3) - # Whether planted berries grow according to Gen 4 mechanics (true) or Gen 3 - # mechanics (false). - NEW_BERRY_PLANTS = (MECHANICS_GENERATION >= 4) - # Whether fishing automatically hooks the Pokémon (true), or whether there is - # a reaction test first (false). - FISHING_AUTO_HOOK = false - # The ID of the common event that runs when the player starts fishing (runs - # instead of showing the casting animation). - FISHING_BEGIN_COMMON_EVENT = -1 - # The ID of the common event that runs when the player stops fishing (runs - # instead of showing the reeling in animation). - FISHING_END_COMMON_EVENT = -1 - - #============================================================================= - - # The number of steps allowed before a Safari Zone game is over (0=infinite). - SAFARI_STEPS = 600 - # The number of seconds a Bug Catching Contest lasts for (0=infinite). - BUG_CONTEST_TIME = 20 * 60 # 20 minutes - - #============================================================================= - - # Pairs of map IDs, where the location signpost isn't shown when moving from - # one of the maps in a pair to the other (and vice versa). Useful for single - # long routes/towns that are spread over multiple maps. - # e.g. [4,5,16,17,42,43] will be map pairs 4,5 and 16,17 and 42,43. - # Moving between two maps that have the exact same name won't show the - # location signpost anyway, so you don't need to list those maps here. - NO_SIGNPOSTS = [] - - #============================================================================= - # Whether you need at least a certain number of badges to use some hidden # moves in the field (true), or whether you need one specific badge to use # them (false). The amounts/specific badges are defined below. @@ -145,54 +158,6 @@ module Settings #============================================================================= - # If a move taught by a TM/HM/TR replaces another move, this setting is - # whether the machine's move retains the replaced move's PP (true), or whether - # the machine's move has full PP (false). - TAUGHT_MACHINES_KEEP_OLD_PP = (MECHANICS_GENERATION == 5) - # Whether the Black/White Flutes will raise/lower the levels of wild Pokémon - # respectively (true), or will lower/raise the wild encounter rate - # respectively (false). - FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS = (MECHANICS_GENERATION >= 6) - # Whether Repel uses the level of the first Pokémon in the party regardless of - # its HP (true), or it uses the level of the first unfainted Pokémon (false). - REPEL_COUNTS_FAINTED_POKEMON = (MECHANICS_GENERATION >= 6) - # Whether various HP-healing items heal the amounts they do in Gen 7+ (true) - # or in earlier Generations (false). - REBALANCED_HEALING_ITEM_AMOUNTS = (MECHANICS_GENERATION >= 7) - # Whether Rage Candy Bar acts as a Full Heal (true) or a Potion (false). - RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS = (MECHANICS_GENERATION >= 7) - # Whether vitamins can add EVs no matter how many that stat already has in it - # (true), or whether they can't make that stat's EVs greater than 100 (false). - NO_VITAMIN_EV_CAP = (MECHANICS_GENERATION >= 8) - # Whether Rare Candy can be used on a Pokémon that is already at its maximum - # level if it is able to evolve by level-up (if so, triggers that evolution). - RARE_CANDY_USABLE_AT_MAX_LEVEL = (MECHANICS_GENERATION >= 8) - # Whether the player can choose how many of an item to use at once on a - # Pokémon. This applies to Exp-changing items (Rare Candy, Exp Candies) and - # EV-changing items (vitamins, feathers, EV-lowering berries). - USE_MULTIPLE_STAT_ITEMS_AT_ONCE = (MECHANICS_GENERATION >= 8) - # Whether you get 1 Premier Ball for every 10 of any kind of Poké Ball bought - # at once (true), or 1 Premier Ball for buying 10+ Poké Balls (false). - MORE_BONUS_PREMIER_BALLS = (MECHANICS_GENERATION >= 8) - # Whether more abilities affect whether wild Pokémon appear, which Pokémon - # they are, etc. - MORE_ABILITIES_AFFECT_WILD_ENCOUNTERS = (MECHANICS_GENERATION >= 8) - # Whether weather effects set the default terrains in battle (true) or - # not (false). Eg.: - # * Storm weather sets Electric Terrain - # * Fog weather sets Misty Terrain - OVERWORLD_WEATHERS_SET_TERRAINS = (MECHANICS_GENERATION >= 8) - - #============================================================================= - - # The number of boxes in Pokémon storage. - NUM_STORAGE_BOXES = 40 - # Whether putting a Pokémon into Pokémon storage will heal it. IF false, they - # are healed by the Recover All: Entire Party event command (at Poké Centers). - HEAL_STORED_POKEMON = true - - #============================================================================= - # The names of each pocket of the Bag. def self.bag_pocket_names return [ @@ -215,6 +180,14 @@ module Settings #============================================================================= + # The number of boxes in Pokémon storage. + NUM_STORAGE_BOXES = 40 + # Whether putting a Pokémon into Pokémon storage will heal it. IF false, they + # are healed by the Recover All: Entire Party event command (at Poké Centers). + HEAL_STORED_POKEMON = (MECHANICS_GENERATION >= 8) + + #============================================================================= + # Whether the Pokédex list shown is the one for the player's current region # (true), or whether a menu pops up for the player to manually choose which # Dex list to view if more than one is available (false). @@ -268,6 +241,16 @@ module Settings #============================================================================= + # Pairs of map IDs, where the location signpost isn't shown when moving from + # one of the maps in a pair to the other (and vice versa). Useful for single + # long routes/towns that are spread over multiple maps. + # e.g. [4,5,16,17,42,43] will be map pairs 4,5 and 16,17 and 42,43. + # Moving between two maps that have the exact same name won't show the + # location signpost anyway, so you don't need to list those maps here. + NO_SIGNPOSTS = [] + + #============================================================================= + # A list of maps used by roaming Pokémon. Each map has an array of other maps # it can lead to. ROAMING_AREAS = { @@ -362,6 +345,15 @@ module Settings #============================================================================= + # The default screen width (at a scale of 1.0). + SCREEN_WIDTH = 512 + # The default screen height (at a scale of 1.0). + SCREEN_HEIGHT = 384 + # The default screen scale factor. Possible values are 0.5, 1.0, 1.5 and 2.0. + SCREEN_SCALE = 1.0 + + #============================================================================= + # An array of available languages in the game, and their corresponding message # file in the Data folder. Edit only if you have 2 or more languages to choose # from. diff --git a/Data/Scripts/002_BattleSettings.rb b/Data/Scripts/002_BattleSettings.rb index 6c8ff7240..28fbb7602 100644 --- a/Data/Scripts/002_BattleSettings.rb +++ b/Data/Scripts/002_BattleSettings.rb @@ -1,23 +1,8 @@ module Settings - # Whether a move's physical/special category depends on the move itself as in - # newer Gens (true), or on its type as in older Gens (false). - MOVE_CATEGORY_PER_MOVE = (MECHANICS_GENERATION >= 4) # Whether turn order is recalculated after a Pokémon Mega Evolves. RECALCULATE_TURN_ORDER_AFTER_MEGA_EVOLUTION = (MECHANICS_GENERATION >= 7) # Whether turn order is recalculated after a Pokémon's Speed stat changes. RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES = (MECHANICS_GENERATION >= 8) - # Whether critical hits do 1.5x damage and have 4 stages (true), or they do 2x - # damage and have 5 stages as in Gen 5 (false). Also determines whether - # critical hit rate can be copied by Transform/Psych Up. - NEW_CRITICAL_HIT_RATE_MECHANICS = (MECHANICS_GENERATION >= 6) - # Whether several effects apply relating to a Pokémon's type: - # * Electric-type immunity to paralysis - # * Ghost-type immunity to being trapped - # * Grass-type immunity to powder moves and Effect Spore - # * Poison-type Pokémon can't miss when using Toxic - MORE_TYPE_EFFECTS = (MECHANICS_GENERATION >= 6) - # Whether weather caused by an ability lasts 5 rounds (true) or forever (false). - FIXED_DURATION_WEATHER_FROM_ABILITY = (MECHANICS_GENERATION >= 6) # Whether any Pokémon (originally owned by the player or foreign) can disobey # the player's commands if the Pokémon is too high a level compared to the # number of Gym Badges the player has. @@ -25,6 +10,33 @@ module Settings # Whether foreign Pokémon can disobey the player's commands if the Pokémon is # too high a level compared to the number of Gym Badges the player has. FOREIGN_HIGH_LEVEL_POKEMON_CAN_DISOBEY = true + # Whether a move's physical/special category depends on the move itself as in + # newer Gens (true), or on its type as in older Gens (false). + MOVE_CATEGORY_PER_MOVE = (MECHANICS_GENERATION >= 4) + # Whether critical hits do 1.5x damage and have 4 stages (true), or they do 2x + # damage and have 5 stages as in Gen 5 (false). Also determines whether + # critical hit rate can be copied by Transform/Psych Up. + NEW_CRITICAL_HIT_RATE_MECHANICS = (MECHANICS_GENERATION >= 6) + + #============================================================================= + + # Whether several effects apply relating to a Pokémon's type: + # * Electric-type immunity to paralysis + # * Ghost-type immunity to being trapped + # * Grass-type immunity to powder moves and Effect Spore + # * Poison-type Pokémon can't miss when using Toxic + MORE_TYPE_EFFECTS = (MECHANICS_GENERATION >= 6) + # Whether weather caused by an ability lasts 5 rounds (true) or forever (false). + FIXED_DURATION_WEATHER_FROM_ABILITY = (MECHANICS_GENERATION >= 6) + # Whether X items (X Attack, etc.) raise their stat by 2 stages (true) or 1 + # (false). + X_STAT_ITEMS_RAISE_BY_TWO_STAGES = (MECHANICS_GENERATION >= 7) + # Whether some Poké Balls have catch rate multipliers from Gen 7 (true) or + # from earlier generations (false). + NEW_POKE_BALL_CATCH_RATES = (MECHANICS_GENERATION >= 7) + # Whether Soul Dew powers up Psychic and Dragon-type moves by 20% (true) or + # raises the holder's Special Attack and Special Defense by 50% (false). + SOUL_DEW_POWERS_UP_TYPES = (MECHANICS_GENERATION >= 7) #============================================================================= @@ -40,21 +52,6 @@ module Settings #============================================================================= - # Whether X items (X Attack, etc.) raise their stat by 2 stages (true) or 1 - # (false). - X_STAT_ITEMS_RAISE_BY_TWO_STAGES = (MECHANICS_GENERATION >= 7) - # Whether a Pokémon holding a Power item gains 8 (true) or 4 (false) EVs in - # the relevant stat. - MORE_EVS_FROM_POWER_ITEMS = (MECHANICS_GENERATION >= 7) - # Whether some Poké Balls have catch rate multipliers from Gen 7 (true) or - # from earlier generations (false). - NEW_POKE_BALL_CATCH_RATES = (MECHANICS_GENERATION >= 7) - # Whether Soul Dew powers up Psychic and Dragon-type moves by 20% (true) or - # raises the holder's Special Attack and Special Defense by 50% (false). - SOUL_DEW_POWERS_UP_TYPES = (MECHANICS_GENERATION >= 7) - - #============================================================================= - # The minimum number of badges required to boost each stat of a player's # Pokémon by 1.1x, in battle only. NUM_BADGES_BOOST_ATTACK = (MECHANICS_GENERATION >= 4) ? 999 : 1 @@ -79,6 +76,9 @@ module Settings # that much Exp (false). This also applies to Exp gained via the Exp Share # (held item version) being distributed to all Exp Share holders. SPLIT_EXP_BETWEEN_GAINERS = (MECHANICS_GENERATION <= 5) + # Whether a Pokémon holding a Power item gains 8 (true) or 4 (false) EVs in + # the relevant stat. + MORE_EVS_FROM_POWER_ITEMS = (MECHANICS_GENERATION >= 7) # Whether the critical capture mechanic applies. Note that its calculation is # based on a total of 600+ species (i.e. that many species need to be caught # to provide the greatest critical capture chance of 2.5x), and there may be @@ -86,9 +86,12 @@ module Settings ENABLE_CRITICAL_CAPTURES = (MECHANICS_GENERATION >= 5) # Whether Pokémon gain Exp for capturing a Pokémon. GAIN_EXP_FOR_CAPTURE = (MECHANICS_GENERATION >= 6) + + #============================================================================= + # The Game Switch which, whie ON, prevents the player from losing money if # they lose a battle (they can still gain money from trainers for winning). - NO_MONEY_LOSS = 33 + NO_MONEY_LOSS = 33 # Whether party Pokémon check whether they can evolve after all battles # regardless of the outcome (true), or only after battles the player won (false). CHECK_EVOLUTION_AFTER_ALL_BATTLES = (MECHANICS_GENERATION >= 6) diff --git a/Data/Scripts/003_Game processing/006_Event_HandlerCollections.rb b/Data/Scripts/003_Game processing/006_Event_HandlerCollections.rb index 842a79760..bb4e81588 100644 --- a/Data/Scripts/003_Game processing/006_Event_HandlerCollections.rb +++ b/Data/Scripts/003_Game processing/006_Event_HandlerCollections.rb @@ -72,6 +72,7 @@ end #------------------------------------------------------------------------------- # Pause menu # Pokégear main menu +# Options screen # PC main menu # Various debug menus (main, Pokémon, battle, battle Pokémon) #=============================================================================== diff --git a/Data/Scripts/012_Overworld/002_Battle triggering/001_Overworld_BattleStarting.rb b/Data/Scripts/012_Overworld/002_Battle triggering/001_Overworld_BattleStarting.rb index 15b1a1556..61e7f0796 100644 --- a/Data/Scripts/012_Overworld/002_Battle triggering/001_Overworld_BattleStarting.rb +++ b/Data/Scripts/012_Overworld/002_Battle triggering/001_Overworld_BattleStarting.rb @@ -109,7 +109,7 @@ def pbPrepareBattle(battle) battle.showAnims = ($PokemonSystem.battlescene == 0) battle.showAnims = battleRules["battleAnims"] if !battleRules["battleAnims"].nil? # Terrain - if battleRules["defaultTerrain"].nil? && Settings::OVERWORLD_WEATHERS_SET_TERRAINS + if battleRules["defaultTerrain"].nil? && Settings::OVERWORLD_WEATHER_SETS_BATTLE_TERRAIN case $game_screen.weather_type when :Storm battle.defaultTerrain = :Electric