Change log/v18

From Essentials Engine wiki

Essentials v18 was released on 2nd September 2020.

Essentials v18.1 was released on 28th September 2020.

Essentials v18

Feature changes and additions

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 returns in procs into nexts
  • 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

Bug fixes

Battle bug fixes
  • Fixed many bugs in battle that I haven't specifically recorded
  • Pokémon in battle now care about their form when positioning their sprites
  • If a Pokémon changes form mid-battle, the new form is now registered as seen in the Pokédex
  • Pokémon whose forms depend on the time (Shaymin, Furfrou, Hoopa, Deerling, Sawsbuck) now cannot change forms because of this during battle
  • Fixed crash when capturing a Pokémon whose species has a getForm handler
  • Paralysis now only halves Speed in the new battle mechanics
  • Fixed revival bugs, including it trying to bring a Pokémon into battle immediately rather than at the end of the round
  • The player now picks up Pay Day money after catching a Pokémon
  • Unused items now get restored to the Bag at the end of battle (e.g. if the battle was ended by a Poké Doll)
  • Fixed Bag contents filter in battle resetting after returning to it from the party screen by cancelling the use of an item
  • You can no longer give/take held items via the Summary screens while in battle
  • You can now choose the target of moves with a target of SingleOpposing
  • Poké Balls can no longer be thrown at semi-invulnerable Pokémon
  • Snag Balls can no longer be thrown in wild battles while there are multiple unfainted wild Pokémon
  • Fixed being able to choose the target of another trainer's Pokémon if they are Encored
  • You can now only try to run from battle if it is the first action you choose in a round, and you can't choose another action in the same round (i.e. in double battles)
  • Made the battle commands disappear immediately upon moving to the attack phase
  • The wild battle victory music now plays after catching a Pokémon in the Safari Zone
  • Fixed bug with move-specific pbBaseAccuracy methods returning the wrong variable
  • Ally Switch now properly swaps effects around as appropriate
  • Beat Up no longer allows the move's user to attack if it has a status problem
  • Made Beat Up only use the Pokémon with the same owner as the user
  • Charge now applies until the Charger next uses a move, not until the end of the next round
  • Fixed bug when using Chatter
  • Fixed bug with Conversion 2's AI
  • Covet/Thief now steal the target's item even if the move knocked it out
  • Fire Fang and Ice Fang now have the correct additional effect chance
  • The elemental Fangs are now affected by Serene Grace and Rainbow
  • Flatter and Swagger now fail if they will have no effect
  • Focus Punch is now used successfully if it didn't show its charging message at the beginning of a round (e.g. it was Encored into using it)
  • Fusion Bolt/Flare now only charge up if the immediately previous move was the other one
  • Moves unusable in gravity can no longer be selected for use while Gravity is in effect
  • Heal Blocked moves can no longer be selected for use
  • Hyperspace Fury now lowers the user's Defense by 1 stage rather than the target's
  • Incinerate no longer says it destroyed an Occa Berry that was consumed to weaken Incinerate
  • A move copied by Mimic now has full PP rather than 5
  • Psych Up can no longer be copied by Mirror Move
  • Chatter, Feint, Magic Room, Metal Burst, Trick Room and Wonder Room can now be copied by Mirror Move
  • Made Outrage cause confusion if it fails during its last turn because of sleeping/paralysis/being ineffective/etc.
  • Both effects of Parting Shot are now reversed if the move is Magic Coated/Magic Bounced
  • The Protect failure rate is now reset upon using a non-protecting move, rather than just before using a protecting move if the previous move was a non-protecting one
  • Fixed Quash and Teeter Dance erroneously being Magic Coatable
  • Quash can now be used on a Quashed Pokémon, but only if another Pokémon was more recently Quashed
  • Quashed Pokémon now move in the order they were Quashed
  • Rage Powder now doesn't redirect the moves of Pokémon that are immune to powders in the new battle mechanics
  • Fixed Relic Song having a 100% effect chance rather than 10%
  • Relic Song's effect of changing the user's form now only activates once per move use, rather than once per target put to sleep
  • Secret Power's additional effect now only happens once per use, rather than once per hit
  • Fixed two Pokémon being able to use Sky Drop on the same target at once
  • Fixed a Pokémon getting locked into being Sky Dropped if the Pokémon using that move on it changes position or leaves battle mid-usage
  • Fixed Smack Down/Avalanche erroneously dealing double damage to targets using an airborne multi-turn move
  • The priority of Pokémon Snatching a move is now the order in which they used Snatch, rather than turn order
  • Two layers of Toxic Spikes now badly poisons Pokémon
  • Fixed Triple Kick's power starting at double what it should be
  • Uproar now wakes up all Pokémon upon its initial use
  • Sleeping Pokémon no longer wake up in an uproar immediately before using a move
  • Stopped the weather animation showing twice when using a weather-inducing move
  • Anger Point no longer triggers if the bearer's substitute took the hit
  • An Illusion's species/gender/form are now registered in the Pokédex as seen, rather than the underlying Pokémon's
  • Mold Breaker no longer negates Aftermath's effect
  • Pressure now also applies to moves which target the opponent's side or the whole field
  • Protean now changes the bearer's type even if the bearer is already half that type
  • Regenerator no longer animates the HP bar, and is now completely invisible
  • Shell Smash now only fails if it can't change any stats at all, rather than failing if it can't raise any stats
  • Slow Start now uses a timer rather than the turn count, and so now works properly if the ability is gained later
  • Fixed Tangled Feet having a wrong multiplier
  • Abilities that trigger upon switching into battle now trigger when acquired by Trace if the bearer couldn't trace an ability immediately upon switching in
  • Truant now flip-flops whether it is loafing each time the bearer tries to use a move, rather than at the end of each round
  • Primordial weather abilities can now be negated
  • Dire Hit now raises the critical hit rate by 2 stages
  • Ether/Elixir now only restore the PP of a move if it was known originally, and not ones temporarily known because of Transform/Mimic
  • Fixed Exp All calculation for Pokémon that didn't participate in the battle
  • Flute items no longer work on Soundproof Pokémon
  • Iron Ball no longer lowers the holder's Speed even if its effect is negated
  • Fixed Leftovers/Black Sludge potentially triggering multiple times per round
  • Life Orb's damaging of the holder is now independent from its damage-boosting effect
  • Fixed the Metronome item not working properly
  • Fixed rounding error in Nest Ball's multiplier
  • Ring Target no longer bypasses being immune to Ground-type moves because of airborne-granting effects
  • Ring Target no longer allows a status condition to be inflicted on the holder if it should be immune to that status condition because of its type (e.g. Electric-types are immune to paralysis)
  • Shed Shell no longer allows a trapped Pokémon to flee from battle
  • Made White Herb also trigger because of stat reduction that happens outside of a move's usage
  • Transform and Imposter now copy the weight change caused by Autotomize
  • Disable and Cursed Body now only work on the last move that the target normally used (i.e. that wasn't called by another move/other effect)
  • Pokémon can now use a disabled move if it was called by another move
  • Pokémon affected by Ingrain or other such effects can no longer switch out in single trainer battles when the opponent's fainted Pokémon is replaced
  • Made King's Rock/Stench still be able to cause flinching even if the bearer faints while using the move
  • Made King's Rock/Stench not apply to Secret Power if it can cause flinching because of the environment
  • Klutz/Magic Room/Embargo now prevent Judgment/Techno Blast from changing types depending on the held item
Other bug fixes
  • Pokémon that Mega Evolve/Primal Revert in a Battle Facility battle now revert to their regular form after battle
  • Burmy now only changes its form at the end of a battle, and only if it participated in it
  • Breeding a Burmy from a Mothim now always results in the Burmy having a Plant Cloak
  • Multitype is now responsible for changing Arceus's type, rather than Arceus's species
  • Pokémon that hatch from eggs now start with a happiness of 120
  • EVs gained at level 100 now apply to the stats (they previously only would if the Pokémon later changed form)
  • When determining a newly generated Pokémon's/egg's moves, duplicate moves are ignored from earlier in the moveset rather than from later
  • Traded Shadow Pokémon can no longer evolve because of the trade
  • Pokémon that evolve when traded for another Pokémon now only do so if neither Pokémon is holding an Everstone
  • Fixed Pokémon of male-only species rarely being female
  • Corrected typo in Dive Ball's description
  • PP Up and PP Max can no longer be used on Sketch
  • Fixed incorrect messages sometimes being shown when using EV-reducing berries
  • In new battle mechanics, Repel now checks the first Pokémon in the party even if it's fainted
  • Fixed typo relating to registered items
  • Fixed opening the Ready Menu in the same frame as a wild encounter occurs causing massive slowdown and a crash
  • Fixed bug with searching the Pokédex according to weight using imperial units
  • Fixed another bug with searching the Pokédex according to weight using imperial units
  • Fixed Pokédex search results not always looking like search results
  • Shadow Pokémon no longer say they're "able" to have an evolution stone on them
  • Made a Pokémon visibly change form in the party screen before trying to do things triggered by changing form, such as learning a new move
  • Fixed the "Able"/"Not able" annotations in the party screen not updating after using an evolution stone on a Pokémon
  • Tweaked party screen to make text and panel annotations refresh before fading back into the screen
  • Fixed crash when trying to use Chatter's out of battle effect
  • Fixed crash in summary screen when looking at a hatched Pokémon without a valid hatch map
  • Fixed bug relating to displaying the default map name on which a Pokémon was obtained
  • Removed the Give/Take Item and View Pokédex options from the interact menu in the summary screen for eggs
  • Fixed misalignment of elements in an egg's summary screen
  • You can no longer view the Pokédex entry of a Pokémon from its summary screen if you don't have a Pokédex
  • Fixed the items in the Bag not refreshing after you sell one at the Mart
  • Refreshed Bag/item storage lists when items are deposited, withdrawn, tossed or given
  • The text box in the Options screen now updates its font if a different one is selected
  • PC menus now remember the last option that was selected when you return to them from a sub-menu/function
  • Shaymin's form now resets if it is deposited into storage
  • Fixed choosing a Pokémon from storage in the Purify Chamber showing a non-interactive party panel
  • The egg hatching animation now cares about a Pokémon's form when positioning its sprite
  • Resolved bitmap in egg hatching screen not being disposed
  • The trading animation now cares about a Pokémon's form when positioning its sprite
  • Fixed crash related to the LevelRain evolution method
  • Fixed images displayed via the event command "Show Picture" being cropped in big screen sizes until the screen size is changed
  • Fixed the location signpost appearing behind the darkness in dark maps
  • Fixed player charset positioning error relating to surf bobbing
  • Fixed attempting to surf when a swimming NPC moves in your way causing you to surf on land
  • Fixed accidental changing priorities of various tiles with priority 4
  • def pbSetSelfSwitch now refreshes the appropriate map, rather than the current map regardless of the map specified
  • def addMovedEvent now accepts passing an event as intended
  • Fixed map flickering when continuing a saved game
  • Fixed the overworld being positioned not quite correctly
  • Fixed events/fogs/etc. jittering around slightly while the screen is moving
  • The overworld is no longer frozen while using an item in the overworld, to be consistent with using moves in the same way
  • Stopped the player's charset being reloaded every frame if it hasn't changed
  • The game map now only refreshes itself due to a change of Game Switch/Game Variable/Self Switch if something was actually changed
  • Stopped events checking twice per frame if they should update themselves
  • Fixed bug that caused infinite triggering of an event with a name of "Trainer(X)" when interacted with from the side/back if that interaction doesn't change the event's page (e.g. by setting a Self Switch)
  • Roaming Pokémon that should be encounterable while fishing can now be encountered by fishing
  • Static/Magnet Pull now attract an alternate form of an encounterable species if that form is the appropriate type
  • Fixed forcing the form of a trainer's Pokémon which decides its own form not actually forcing that form
  • You can no longer have double wild battles in the Safari Zone
  • Fixed battle transitions played via common events not displaying any pictures
  • Fixed battle intro animations not playing properly at a high FPS
  • Fixed the items of Pokémon owned by trainers in the Battle Factory being changed to the items held by the player's Pokémon
  • Bad poisoning now becomes regular poisoning after battle
  • Fixed crash when compiling if "pokemonforms.txt" is empty
  • Fixed egg moves listed in "pokemonforms.txt" not compiling
  • Code now fully supports the unlikely event of having undefined Pokémon sprite position values
  • Tweaked how "form2species.dat" is loaded in the hope it fixes a bug when playing a compiled game
  • When the Compiler creates a new trainer type based on a trainer event, its internal name is now based on the internal name given in the event rather than on the trainer type's name you type in
  • Slight change to def pbImportNewMaps to make it use mapinfos[id] instead of mapinfos.id
  • Changed Struggle's target to SingleOpposing from SingleNonUser
  • The Debug Pokémon editor's moveset editor now allows you to set a move to be learnable at level 0 (for evolution moves)
  • Fixed pressing Tab in the Animation Editor opening the help screen instead of cycling to the next cell
  • Fixed bug in the Day Care debug screen
  • Fixed being able to force a Pokémon to have an invalid gender
  • Duplicating a Pokémon now properly duplicates it
  • Fixed missing parameter in a debug call to map.passableStrict?
  • Fixed several events in the example maps that sell items whose internal names have changed
  • The colour of the selection arrow in a messagebox now matches its text
  • Fixed the code that allows a file named "[num] blah" to animate itself as though it was made of num frames arranged horizontally
  • Fixed some newline bugs in HTTP utility functions
  • Fixed an error that occurs when the game tries to find the mouse's position but can't

Essentials v18.1

Feature changes and additions

Changes and additions
  • Updated jumping to be more like the official games
  • Changed event movement speeds to make walking speed 3 rather than 4, etc.
  • Rewrote evolution method code to make it modular
    • Evolution method parameters can now be of any module (although the in-game data editor won't like new modules)
    • Added a bunch of new evolution methods to flesh things out
  • You can no longer give a Pokémon an item directly from the item storage screen
  • Removed unnecessary text drawing in Options screen
  • Removed unused constants from class PokemonDataBox
  • Grouped all ability blacklists together for tidiness
  • Created def isSpecies? for battlers
  • Made more use of PokeBattle_Pokemon#isSpecies? and PokeBattle_Pokemon#hasItem?
  • The Essentials version is now recorded in save files, to make it easier to identify older save files
  • Error messages now omit the user's computer username in the file path at the end
  • The tileset editor now gives the tileset a bit more space
  • Map events are now only compiled during a full compile, not every time the game is started from RMXP
  • Compiling now states the name of each file being compiled
  • Added error messages if PBS files define the same ID numbers twice
  • Split up some script sections and tidied up code
    • Gave each group of script sections "titles", which help to extract them nicely
  • De-indexed lots of graphics because mkxp-z doesn't like the colour black
  • Removed mentions of "Kernel." in the roadblock event at Ingido Plateau as this phrase is no longer needed


Bug fixes

Battle bug fixes
  • Fixed Bug Bite/Pluck not giving the berry's effect when the user is at full HP/under Heal Block, even if the berry does things other than heal the eater
  • Fixed bug in Dragon Tail's code
  • Fixed missing parameter in check for whether Fling is successful
  • Fixed bug in Judgment's type-determining code
  • Fixed bug in registering Metal Burst's target
  • Fixed error in Mirror Move's code
  • Fixed typos in Powder's code
  • Fixed Rollout doing maximum damage on its first turn
  • Fixed typo in Simple Beam's code
  • Fixed Soak affecting the user rather than the target
  • Fixed Dancer working on all moves rather than just dance moves
  • Fixed typo in Protean's code
  • Fixed Regenerator triggering at the end of battle instead of when switching out
  • Weather-inducing abilities no longer activate if that weather is already in effect (not even to top off its duration)
  • Fixed Flame/Toxic Orb being able to replace another status condition
  • Fixed some items not being consumed when they should upon the holder being hit, and made them trigger Cheeck Pouch/Symbiosis where relevant
  • Fixed call to a method that doesn't exist in Battle Arena battles
  • Fixed swapped parameters in def pbCalcDamageMultiplier
  • Fixed error in PokeBattle_Battler#pbHasMoveType?
  • Fixed missing method in PokeBattle_FakeBattler
  • Fixed crash when a roaming Pokémon is caught or knocked out
  • A Pokémon that faints in battle now cries at a lower pitch
  • Fixed a fainted Pokémon's damage state being reset immediately and stopping certain abilities/effects working properly if they reference it
  • Fixed default weather not returning after a primal weather ends
  • Fixed not gaining Exp upon catching a Pokémon when you should
  • The AI now randomly chooses a move if all move scores end up being 0, rather than going for Struggle
  • Fixed AI never using items
  • Fixed bug in AI for Camoflage
Other bug fixes
  • Fixed Show Animation event command causing the animation to visually glitch
  • Fixed error with surfacing check if the dive map you're in has no surface map
  • The player now moves at walking speed while diving
  • Wild encounters can now also occur when the player turns on the spot
  • Fixed inconsistency in expected suffixes for night versions of BGMs
  • Fixed inaccurate code in MapFactory#isPassable?
  • Fixed Pokémon nicknames being reset/natural names not changing when the species changes
  • Shedinja no longer copies the moves the Ninjask learns after evolving
  • Fixed party screen icon being slow to refresh after evolving because of using an item (evolution stone/Rare Candy)
  • Fixed party screen not animating during certain messages while using items on a Pokémon
  • Fixed the default delay value not being set properly for PngAnimatedBitmaps
  • Fixed bug with callback procs in class PictureEx
  • Fixed prevolution data not being determined for species that don't evolve further
  • Fixed bug when compiling the trainer comment "Outcome: X"
  • Fixed crashes in debug functions if there's a gap in item ID numbers
  • Fixed errant pixels in "NPC 16.png" charset (the nurse)
  • Fixed terrain tag and priority errors for harbour building and jetty leading into it on Route 8
  • Fixed Alolan Ninetales being able to evolve into itself
  • Fixed Greninja not being available with the Battle Bond ability
  • One or two minor bugs fixed