Battle general
|
- Did a lot of unspecified rewriting and rearranging of battle-related code to add efficiency/clarity/usefulness/tidiness
- Renamed a lot of methods and variables
- Replaced "attacker"/"opponent" with "user"/"target" in battle scripts for consistency
- Broke basically every third party script that affects battle
- Changed when battlers are created, and made them only be created if they exist
- Turned the records of a Pokémon's initial item, Recycle item and Belch into battle properties rather than Pokémon properties
- Altered how the party orders work, and rewrote
def pbLastInTeam (used for Illusion) to account for this
- Merged all "can inflict status" checks into one method
- The type parameter of
def physicalMove? and def specialMove? are now optional, because it turns out that, apart from the AI, they're only called while in the middle of using a move when calcType is always used
- Created
class PokeBattle_ActivePosition for effects that apply to a battler position
- Implemented various Gen 7 mechanics changes (too numerous to list)
- Rewrote how Pokémon forms change in battle, including making them unable to change because of
getForm handler code (e.g. Sky Forme Shaymin won't revert to Land Forme mid-battle if it happens to become night during it)
- Made terrain effects work just like weather
- It is now possible to define default weather/terrain for a battle, which will apply perpetually so long as no other weather/terrain caused by a move/ability is in effect
- Added support for being able to capture multiple Pokémon in a wild battle (disabled by default but easy to enable)
- Battles will now record their outcome in Game Variable 1 by default, including battles against roaming Pokémon
- Safari battles and Bug-Catching Contest battles now also record their outcome in Game Variable 1 (always)
- Tweaked the base escape rate calculation for wild Pokémon in Safari battles
- Shadow Pokémon now take Hyper Mode damage at the end of the round rather than the end of a move's usage
- Added a chance for a Shadow Pokémon in Hyper Mode to snap out of it naturally
- Learning a move in battle now plays the SE for it
- The SE for fleeing from battle now plays as soon as the message about it finishes showing, not after you close that message
- Added an escape SE when you run from a Safari Zone battle
- Added support for a debug menu in battle by pressing F9 (but it has no functionality yet)
- Improved battle debug logging, mainly by now also logging all messages shown to the player
|
Generalising battle sizes, triple battles, etc.
|
- Generalised the battle code to support any number of trainers/Pokémon per side, allowing triple battles, horde battles and other zany options like the player using 2 Pokémon against 2 trainers who use 3 Pokémon between them
- The in-battle code that validates the type of battle (i.e. number of battlers on each side) is now more lenient and tries to adjust the battle type to accommodate what it's been given to use. However, it has a necessary restriction on the number of trainers allowed on each side of a battle if the battle is larger than 2v2
- Settings/variables/messages only exist to support up to 3 battlers on a side, but more can be added quite easily
- Added a Shift action to battles larger than 2v2, which makes a battler swap places with its neighbour instead of using a move
- At the end of each round, if the only Pokémon in battle are not near to each other, they will shift to the centre of their side to ensure they are near each other instead
|
Starting battles
|
- Implemented battle rules which alter the size and various other properties of the next battle
- Rewrote the battle-causing methods
def pbWildBattle , def pbTrainerBattle and so on
- Made methods
pbCanDoubleBattle? and pbCanTripleBattle? which check if the player's side has enough Pokémon for those kinds of battles
|
Battle move/function code-specifics
|
- Added all Gen 7 move effects
- Added rudimentary AI for Gen 7 move effects
- Added three new move target types, and rewrote some move effects to support them
- Created several "generic" battle move classes for some common move effects, which are inherited by some function code classes, to reduce code duplication
def pbHiddenPower now takes a Pokémon object rather than an array of IVs (in case you want to change how the calculation works)
- Edited lots of existing move effects to make them work better
- Fixed code of Counter/Mirror Coat/Metal Burst so they can't choose a random target if the countered target doesn't exist, and they do 1 damage if they took 0 damage
- Tidied up code for Pursuit being used specially during a switch
- Weather Ball now supports different animations for each of its types
- Removed
PBEffects::EncoreIndex in favour of calculating it when needed
- Rewrote Future Sight, Wish, Healing Wish and Lunar Dance to make their effects apply to a position rather than a battler
- Improved code for Ally Switch, and made sure it updates the graphics appropriately
- Added support for common animations that trigger for various kinds of Protect
|
Battle ability/item-specifics
|
- Added all Gen 7 ability/item effects
- Added Grass Pelt ability effect which had somehow been missed previously
- Added effects for Dream Ball (Gen 8's effect) and Beast Ball
- Edited lots of existing ability/item effects to make them work better
- Created the
BattleHandlers module and moved a load of ability/item effects into handlers within this so that their code is more standalone and modular
- Parental Bond's second hit now does 25% the damage of the first hit rather than 50%, as per Gen 7
- Simplified Illusion ability's display of name when switching a little
- Split the code checking whether an item is important to a species (e.g. Griseous Orb for Giratina) into its own method
- Split the Poké Ball shakes calculation into a separate method
- Made the Moon Ball check the Pokémon's evolution family for a Moon Stone rather than hardcoding which species it is effective on
- Changed Poké Flute's effect to awaken all Pokémon in battle
- Altered how type-boosting Gems work, and put their message/animation in the proper place
|
Battle command phase
|
- The player now chooses all of their battle actions in a round before the AI does (in case you want to make the AI cheat by knowing what you're about to do)
- Added code to prevent the player from choosing to use certain items from the Bag in battle that will have no effect
- Removed code duplication in checking whether items used from the Bag in battle will work
- When choosing to use an item on a Pokémon/battler in battle, it now auto-chooses the only available Pokémon/battler if there is only one
- Made display of the command and fight menus in battle more efficient
- Move names in the fight menu in battle are now coloured depending on the move's type
- Implemented a move target-choosing command menu
- Rewrote how the command menus/screens use logic to decide whether the chosen action is allowed (the logic is now kept in the main battle class rather than the scene class)
- Moved the Mega Evolution toggling code into
class PokeBattle_Battle where it belongs
- You can now choose a Poké Ball's target (if relevant/possible)
|
Battle turn processing
|
- Rewrote and simplified the turn priority calculations
- Made Poké Balls and Poké Dolls be used at the same time as any other item (i.e. during turn processing rather than as soon as they're selected)
- Made sure Poké Balls use up all your actions in a round
- Created more "battle usage" numbers for items, and updated "items.txt" to use them
- Moved Pursuit check into its own method, and made sure it triggers at all relevant times
- A Pokémon using Pursuit on a switching target will now Mega Evolve before it does so
- A Pokémon's Illusion now ends immediately before it Mega Evolves
- Improved code that forces the use of an Encored move
- Replaced Mold Breaker code with
@battle.moldBreaker toggled at the start and end of a move's usage
- Tidied up code that adds targets for a move being used
- A single target move whose original target doesn't exist now cannot redirect itself to a different target on the other side of the field
- Swapped move processing around from "all hits for each target in turn" to "all targets are attacked by each hit in turn"
- Base critical hit rate for new battle mechanics is now 1/24 to match Gen 7
- Moved the calculations of the additional effect chance and flinching chance of a move into their own methods
- Shadow Pokémon may now go into Hyper Mode after using any move, not just certain Shadow moves
- Flinching now lasts until the end of the round rather than just for one move's usage (which matters if Instruct causes a Pokémon to use a move twice in the same round)
- Rearranged effects that happen at the end of using a move
- Made
pbCancelMove always be called if a move fails for any reason
- Tweaked a little code relating to effects upon a Pokémon entering battle
- Triggering entry hazards is now done alongside triggering abilities that activate upon switching in, rather than before all abilities
|
Battle appearance, data boxes
|
- Bad poisoning now has its own icon in battle
- Rewrote the data box code and tweaked its graphics, including making the level and HP numbers graphics instead of text
- The data box's HP and Exp bars now fill at fixed rates which are fps-agnostic, and the animations for these changing are now nicer
- The lengths of the data box's HP and Exp bars now snap to the nearest two pixels
- Made data box bobbing and battler sprite flashing FPS-agnostic and synchronised
- Added a Puddle environment
- Split the Forest environment into Forest and ForestGrass (same effects but they show different base graphics)
- Somewhat altered how the filenames of battle background graphics are determined
- Made the bar graphic at the bottom of the battle scene depend on the background used
- Rewrote the code for battler sprites and shadow sprites to give them more functionality
- Rewrote how a battler sprite's base position is determined/how its metrics are applied
- Created an ability splash bar that appears when an ability triggers
- Allowed text formatting in battle messages
- Pressing the C button while a message is appearing in battle will now make the rest of it (or as much as can be shown at once) display instantly
- The B button is now usable for messages shown in battle, and does the same things as the C button
- Most messages in battle that automatically close after a fixed time can now be closed immediately by pressing the C/B button
- Changed and tweaked various messages
- Safari battles now show the overworld weather (it has no effect)
|
Battle animations
|
- Altered
class PictureEx to make it fps agnostic and improve the calculations and general usefulness
- Created a parent
class PokeBattle_Animation for hardcoded animations in battle, which makes use of PictureEx
- Rewrote various hardcoded battle animations as
PokeBattle_Animation ones, such as Poké Ball-throwing, sending out, data box appearing/disappearing, battle intro (with all its sliding around), and so on
- Rewrote code relating to the showing of animations in battle
- The battle intro animation now moves the background around as well as the bases and trainers/wild Pokémon
- Added support for playing a one-off animation when a Pokémon appears in battle (playing its cry is part of this)
- Wild Pokémon now stagger playing their cries/intro animations when several appear in wild battles
- Made the trainer-sends-out-a-Pokémon animations overlap each other if multiple Pokémon are being sent out at once (only applies to the start of a battle)
- Added support for Poké Ball tumbling frames
- Added support for all appropriate Poké Ball burst animations (3 kinds in total), and made battlers glow a colour during send out/recall depending on the type of Poké Ball they're in
- The animation for taking damage from a move (including the HP bar lowering) now plays simultaneously for all Pokémon on the same side rather than one after the other (allies first, then foes)
- Party lineups now appear when switching Pokémon (including sending out a replacement for a fainted Pokémon) if that Pokémon's side only has one position in it
- Increased the number of cells allowed per animation frame to 60
- Made move animations FPS agnostic
- Created folder /Graphics/Battle animations/ for graphics used only in battle animations
- Tidied up code relating to in-battle weather animations and messages
- Improved on the choice of default move animations, which now takes into consideration the move's category and target(s)
- Make new Stealth Rock animations
- Tweaked some existing move animations (String Shot, Fake Tears, some common animations)
- Added support for additional common animations, such as "EatBerry", "Toxic", "LevelUp" and terrain ones
- Made the user and target parameters of
pbCommonAnimation optional, as the vast majority have no target and some have no user either
- Swapped the two Future Sight/Doom Desire animations for consistency (the main animation is for the damaging, and the second animation is for charging)
|
Battle AI
|
- Moved AI code into its own class
- Rewrote some AI to make use of ability/item effect handlers
- Rewrote the AI's item usage choice code, and added more items it knows how to use
- Made the AI using an item from their Bag in battle use the same code as when the player does
- Rewrote the main move-choosing AI for efficiency and support for any number of battlers
|
Non-battle general
|
- Added code for Gen 7 items and Pokémon, including Alolan forms
- Added code that determines Espurr's/Meowstic's form based on its gender
- Added changes to moves known when Kyurem/Necrozma change forms
- Added
def nicknamed? and def isSpecies? to class PokeBattle_Pokemon
- Tweaked the ways of gaining happiness and how much of it you get to be more accurate
- Added ways to maximise a Pokémon's IVs and override its nature (for stat calculation only), which are useful for Hyper Training/Mints
- Pokémon sprites/icons now default to using the species 000 ones, because I'm sick of seeing people posting about errors caused by not having the graphics they should have
- If a roaming Pokémon's Game Switch number is 0, it will always be roaming (until defeated/caught)
- Removed the restriction on roaming Pokémon not being able to roam to the last two maps the player visited
- Added defs
pbQuantity , pbHasItem? , pbCanStore? , pbStoreItem and pbStoreAllOrNone , which are the same as the $PokemonBag methods of the same names but with less text
def pbHasSpecies? now also has an optional form parameter
- Made a TM/HM inheriting the PP of the move it replaces an old battle mechanics-only feature
- Pickup and Honey Gather now also trigger if a wild battle was ended by catching the wild Pokémon
- Ensured properties of a trainer's Pokémon remain consistent each time you rebattle them
- Night BGM now have "_n" at the end of the filenames rather than just "n"
- Screenshots taken by pressing F8 are now saved as png files with better filenames, and they include the screen border if it's enabled
- Improved code relating to updating characters and the player, including their animations
- Events no longer return to looking in their initial direction after interacting with them
|
People's appearance/movement
|
- Added move route methods
move_random_range(xrange=-1,yrange=-1) , move_random_LR(range=-1) and move_random_UD(range=-1)
- Improved the player's movement speed to be completely accurate to Gen 3
- Event movement speeds are now identical to the player's movement speeds (4=walking, 5=running, 6=cycling rather than double running speed)
- The player and events moving at cycling speed now animate half as frequently, which isn't true to Gen 3 but is true to Gen 4 and looks nicer
- The player's fishing-while-surfing charset is now again different to their fishing-while-on-land charset
|
PBS files
|
- Created Gen 7 versions of several PBS files, which are provided alongside the Gen 5 versions
- Tweaked the layouts of some PBS files, such as adding header comments and separator lines where appropriate
- Lines in PBS files that are written like "XXX=YYY" will now have spaces put around the "=" when they are modified and saved in-game (all PBS files are now written like this, although no-spaces versions are still usable)
- Made several tweaks and fixes to PBS files to fix values and adjust descriptions to make them fit the spaces they're displayed in
- Made encounter species lines in "encounters.txt" be indented when the game rewrites that file (e.g. after changing the wild encounters via the editor) for legibility
- "tm.txt" and "encounters.txt" now allow the use of form internal names such as
PBSpecies::PIKACHU_1
- In "items.txt", changed various "item usage in battle" numbers
- "pokemon.txt" and "pokemonforms.txt":
- Added more sprite positioning metrics, and added support for multiple sizes of Pokémon shadows in battle, as well as species-specific shadows
- Changed the sprite position editor to work for all metrics
- Updated Pokémon colours to Gen 7 standards, including differing colours for different forms
- Added the evolution method LevelEvening
- Added support for an evolution method's parameter being an ability's internal name
- Added data for the glowing fused Kyurem forms
- In "pokemonforms.txt", added the new PokedexForm property which is the form that should be registered as seen in the Pokédex instead of this one
- In "pokemonforms.txt", allowed Compatibility to be a defined property
- In "pokemonforms.txt", a form can now be defined with an evolution method of "None", which overrides the base form's evolutions but is treated as non-existent (used for spiky-eared Pichu)
- In "pokemonforms.txt", allowed the sections to be written like [PIKACHU,1] and [PIKACHU 1] as well as [PIKACHU-1]
- Each form defined in "pokemonforms.txt" is now given its own species internal name in the form of
PBSpecies::PIKACHU_1 (most places where you might think of using it are untested)
- "trainers.txt":
- Rewrote the trainers.txt compiler and related scripts to add support for another data format
- Added the ability to set all 6 IVs for a trainer's Pokémon individually, or use a single value for all of them (new trainers.txt format only)
- Added the ability to edit the EVs of a trainer's Pokémon, with the same functionality as setting IVs (new trainers.txt format only)
- Added the new LoseText property, which is used if no message is given as an argument in the battle-starting method
- "metadata.txt":
- Added a new map-specific metadata: "Environment"
- Allowed the successful wild Pokémon capture ME to be defined in the metadata (both global and per-map) and to be overridden for the next battle
- "moves.txt":
- Added support for move targets to be words (enums) as well as numbers, and renamed those enums
- Updated moves.txt with new move targets (as enums) to support their usability in triple battles
- Added more available move flags, all the way to z
- Move function codes are now strings rather than hexadecimal numbers and can be any length
- Move base powers can now exceed 255
|
Debug
|
- The Individual Trainers editor now asks before saving changes rather than automatically saving them, and only does so upon quitting that editor rather than after every change
- Modified the Individual Trainers editor to work with the new data format and to generally be a bit better
- The Debug screen that lists trainers now also shows the Pokémon that each trainer has
- Using the arrow keys to move cells around in the Animation Editor now moves them by just 1 pixel if Alt is held
- Made the Animation Editor's cell outlines smaller
- Tweaked the animation organiser method to give it better addition/deletion code
- Added the animation organiser to the Debug menu
- Made a Debug menu command that starts a wild battle against any number of Pokémon with a user-defined battle size, along with allowing the Pokémon to be completely modifiable
- Made a Debug menu command that starts a trainer battle against any number of trainers with a user-defined battle size
- The Pokémon EV debug feature no longer allows you to give a Pokémon more EVs than it can legally have
- Added "Randomize EVs" Pokémon debug features
- Pokémon EV and IV debug features now show total values and percentages
- Removed/relaxed the limitations on some properties when editing them, typically ones whose max value was arbitrarily 255
|
UI
|
- Altered the text colours you get with "\c[1]" through "\c[8]", made them look nicer for dark windowskins, and added a few new colours
- Made the light default text colour "\c[12]" not invert itself on a dark background
- Tweaked the colour threshold between light and dark windowskins
- Stopped dialog lines auto-balancing their lengths when there are exactly two of them
- Standardised elapsed time display format to 3h 42m
- Greatly increased FPS while scrolling through a long list
- Added a shiny icon to the party screen panels
- Made the lengths of HP/Exp bars in the party screen and summary screens snap to the nearest two pixels
- Improved the Options screen's support of windowskins of various dimensions
- Improved FPS in the Options screen
- Made the Pokédex "search by type" background picture automatically use a different background if 18 regular types are defined (i.e. if Fairy-type is added)
- Made Pokémon icons in the storage screen support all (square) sizes, not just 64x64
- Tweaked the trading animation
|
Minigames
|
- Added a "noprize" rule for Triple Triad, which means no cards are won or lost in a match that uses it
- Modified how Triple Triad card stats and prices are calculated
- Redesigned the Triple Triad graphics
- You can now see a preview of the selected Triple Triad card when you're buying/selling them
- Added a sound effect when buying or selling items/Triple Triad cards
- Triple Triad cards now support a form property (although it's not used)
- Tweaked the rock thicknesses for the mining minigame
|
FPS agnosticism
|
- Made quite a few animations FPS-agnostic, meaning they will play at the same real world rate regardless of the game's frame rate (some things will still speed up at a higher FPS)
- Player/event movement speed and animation, event movement frequency are now FPS-agnostic
- Various overworld movements, including jumping (over ledges, starting/stopping surfing), fishing and map scrolling are now FPS-agnostic
- Waits and tone changes/fades caused by event commands and move routes are now FPS-agnostic
- Message box slides, pauses and arrow animations are now FPS-agnostic
- Fading in/out of black is now FPS-agnostic
- Overworld animations (as defined in the Database) are now FPS-agnostic, play at a default of 20 FPS, and can have a different FPS defined by writing "[40]" (or whatever the desired FPS is) at the end of the animation's name
- Animations for Flash's expansion of the light circle, Sweet Scent's flashing, cave entrance/exit animations and the "using move outside battle" animation are now FPS-agnostic
- Made overworld animations update their positions every frame rather than just the frames they change their position in
- Improved the autotile animation speed and made it FPS-agnostic
- The time for a trainer in the phone to be ready for a rematch is now FPS-agnostic
- The initial screen flashing before battle intro animations, and the battle Vs animation, are now FPS-agnostic
- The Town Map's animations and cursor movement are now FPS-agnostic
- The egg-hatching, evolution and trading animations are now FPS-agnostic
- Some animations in the party screen, storage screen and naming screen are now FPS-agnostic
- Pokémon icons, icons in the text entry screen and the player's icon in the Continue panel are now FPS-agnostic
- The Duel, Triple Triad, slow machine, Voltowb Flip and tile puzzles minigames are now all FPS-agnostic
- Intro splashes and the title screen are now fully FPS-agnostic
- Made the credits FPS-agnostic, and also support non-integer text scrolling speeds
|
Error messages
|
- Prettied up error messages and their logging, now with timestamps!
- Improved error message when trying to generate a Pokémon with an invalid species symbol
- Detailed error messages are now shown for Hangup errors (when the game stops responding)
|
Example maps
|
- Updated the roadblock event outside Ingido Plateau to explain how to properly move events after using
Kernel.pbNoticePlayer
- Tweaked the roadblock event outside Ingido Plateau so that you can no longer talk to the guard from the side, which causes a retriggering bug
- Clarified Bill's explanation of storage box wallpapers in the example maps
- Turned the random swimmer on Route 8 into an example for move_random_range
- Edited the example maps to use the water rocks autotile, and to put water on the bottom layer
- The yellow path tiles in the tilesets no longer have terrain tag 3 (sand)
|
Other files
|
- Added sprites for Kyurem's glowing fused forms
- Improved the flower autotiles
- Edited the graphics depicting types to have the Fairy type as the 18th instead of the Shadow type
- Replaced most MEs and SEs with ones ripped from HGSS by Thunder (thanks!), and added a few new ones
- Updated water battle transition graphics with ripped ones
- Replaced battle background and base graphics with ones personally ripped from Gen 4 (there are now more of them, and some are noticeably recoloured)
- Tweaked the player back sprite graphics (the ones with throwing frames) to keep the player aligned throughout each one
- Slightly shrunk the border graphic so that you can get a larger full screen mode on a 1080p monitor
- Renamed an animation spritesheet with an accented character
- Tweaked townmapgen.html to improve its layout and text handling
- Moved trainer sprites out of the Characters folder into their own folder
- Replaced shortcut file to the Essentials wiki
- Optimised all graphics to reduce file sizes
|
More technical stuff
|
- Created script section Ruby Utilities with some useful things
- Added plugin manager script by Marin
- Renamed some Settings constants for easier reading
- Removed "Kernel." from all method names
- General code tidying (spacing of
{| , removal of redundant .is_a?(Symbol) stuff, some variable renaming/snakeCasing)
- Turned a bunch of
return s in procs into next s
- Replaced uses of "<c2>" in scripts with the more user-friendly "<c3>"
- Simplified some regex for text formatting
- Prettified the battle-causing methods
- All "getName" methods can now accept strings and symbols
- Rearranged the code that stops off-screen events from updating to simplify things a little
- Turned gender rates, growth rates and habitats into modules for completeness
- Moved the code which determines the stat modifiers due to a Pokémon's nature into
module PBNatures
- Made helper methods that yield each stat in turn (main/battle/main battle ones)
- Added a couple of new
PBEnvironment values
- Made all references to the maximum level point to a method, to allow easily turning it into a calculation
- Replaced all mentions of type effectiveness numbers with calls to methods that evaluate them instead
- Made various item property-checking methods like
pbGetPocket and pbIsMulch? accept symbols
- Turned the maximum IVs per stat into a variable rather than hardcoding it
- Removed the limit on the number of evolution methods that can be defined
- Moved the obtaining of an encounter table when generating wild Pokémon into its own method, for somewhat easier modifying
- Move flags are now stored internally as strings instead of converted to numbers by the compiler
- Enabled the expected order of base stats and effort points as defined in "pokemon.txt" and "pokemonforms.txt" to be changed simply by renumbering the stats in
module PBStats
- Make Pokémon remember their levels rather than recalculate them every time they're accessed
- Improved code that shows Pokémon icons
- Added functionality for setting the origin point of a Pokémon icon
drawTextEx now spaces lines automatically depending on the font size
- Added an optional parameter to
drawFormattedTextEx for setting line spacing
- Images drawn with
pbDrawImagePositions now have a default rect size of the whole bitmap (i.e. 0,0,-1,-1) so this can be omitted
- Animating a graphic by naming it "[num] blah" can now optionally take a second value like "[num,num] blah" which is the frame delay (default 10)
- Rewrote the cry-playing methods
- Removed call to
p from def pbIsJsonString
- Minor change to
def pbPostData which somehow makes it work better
- Reduced the number of input key codes checked each frame to just the ones that are used in Essentials (was 256, now 74)
- Added some more CSV record types
def prepline (used by some compilers) now also removes whitespace from the beginning of lines
- Split compiler scripts into three script sections, and added a bunch of comments to them
- Moved the code which calls the compiler scripts into the Main script section
- Rewrote the trainer event compiler script (the thing that turns trainer comments into a trainer event) to make use of battle rules
- Trainer comments are now not rewritten (by default) into an event that is written because of those comments; you can change this by setting
rewriteComments to true
- Rewrote how various PBS files are compiled into data files for consistency and to improve access speed
- Nearly all compiled data files are now cached after first accessed
- Battle animations data is now cached at the start of the game
- Renamed and tidied up various compiled data files
|