Pokémon Essentials, version 21.1 - 30th July 2023

This is NOT a help thread! If you want help with something, ask elsewhere.

Pokémon Essentials, version 21.1
30th July 2023

Change log
Download v21.1
v21.1 Hotfixes plugin

Essentials v21.1 has now been released. This version contains improvements to messages, more sound effects and a new battle rule, plus a few other tweaks and a number of bug fixes. Download it today!

There is a v21.1 Hotfixes plugin which adds some bug fixes.

Pokémon Essentials, version 21
28th June 2023

Change log

The trend these days is for Essentials to get a new release each year. This is mostly unintentional, and a year just seems to be how long it takes to make a version's worth of changes. Still, here's the next one. This post is a summary of the bigger changes, and you can check out the change log linked above to see a more exhaustive list of what's new.

AI XL

A year ago, I asked people what they most wanted to be done to Essentials, and the biggest response was "improve the AI". So I did. I broke it into more manageable chunks and rewrote pretty much all of it. I also added a lot of new code and calculations to give the AI a better idea of how things work and what situations are good and bad.

There's a bit less randomness now, as trainers will completely avoid using a move they know will fail. They'll also avoid using a move which scores significantly worse than another move they could use - previously it would just have a smaller chance to use such bad moves. And if the AI breaks while deciding what to do, it will no longer give the player a free shot by doing nothing at all for that round.

Skill flags were supported in previous versions of Essentials, but were unused. Now, though, some skill flags have been invented, which dictate how a trainer's AI behaves. There's a flag for whether the trainer should keep their final Pokémon until last, for example. Many of these skill flags are given to a trainer automatically based on their trainer type's skill level. Certain wild Pokémon, namely Legendary/Mythical/Ultra Beast Pokémon, can have a higher skill level and will not use moves entirely at random - this also depends on a flag, but one in pokemon.txt rather than trainer_types.txt.

Oh yes, and the AI can now use Revives. I can't promise it will be that clever about it, but at least the AI now knows what a Revive does.

Gotta Go Faster

mkxp-z is the replacement to RGSS that Essentials uses, and is the basic game framework on which Essentials is built. It has been updated to v2.4.2.ee8dc7e, which is a mouthful, but it brings various performance and functionality improvements, including the possibility of multi-track BGMs. You'll most notice the performance improvements, though, which coupled with some rewriting of the Compiler code means that the Compiler is about 10 times faster than it used to be. That's quite a big deal.

The rest of the game will also run better because of mkxp-z's update. It'll also run more smoothly because Essentials is now fully FPS agnostic, which means it runs at the same rate no matter what the FPS number is. Its FPS is now whatever your monitor's refresh rate is, rather than a fixed 40, and v-sync is enabled to reduce screen tearing.

If you want some extra speed in your gameplay, though, an "instant" text display speed has been added to the Options. However, this just makes it easier for players to rush through dialogue and then complain that they don't know what to do, so maybe you'll want to remove that option.

I also fixed the camera lag that happened when sliding on ice, and the camera overshoot when jumping over some ledges.

Oops! All PBS Files

The big new thing with PBS files is that you can now have lots of them for each data type (e.g. items, moves, map metadata). They need to be named "items_XYZ.txt", where "XYZ" can be whatever you want, but that's the only limitation. This lets you organise your data much more conveniently now. A separate moves.txt file for moves of each elemental type? Split trainers into files depending on their location? Put your new items/abilities/etc. into their own files, separate from the "vanilla" content? Sure, you can do all of this now.

One example is Shadow Pokémon. There is now a folder in the PBS folder containing files for Shadow Pokémon-related content. To add them to your game, simply move those files into the main PBS folder and compile. You don't need to edit anything. Oh, and shadow_pokemon.txt now supports sections for individual forms of a species.

Other changes to PBS files include: pokemon.txt having fixes to movesets and additional compatible tutor moves, being able to give a species more than two types, items having portion names for some messages (e.g. "bag of Soft Sand"), and Poké Radar-exclusive encounters now belong in encounters.txt rather than the Settings. There are other changes too, mentioned elsewhere in this post and in the change log.

Lingua Pokémonica

Game translations are now a bit easier to do. All game text is now split into two data files: core (for text common to most games, such as messages in scripts and item names) and game (for text unique to your game, such as trainer names and event dialogue). The core messages stay as they are across all games, which means translated versions of them can be provided as resources and they won't get in the way of game-specific text that also needs translating.

When you extract text for translation, it goes into multiple files now instead of just one, in a dedicated folder for better organisation. You can split the text up into more files if you want, e.g. "translated" and "untranslated", because importing translated text simply imports everything in the folder regardless of filename. It's also a bit more user-friendly to extract and import text.

Some messages have been tweaked to make them better for translating. The game's credits and the nicknames of trainers' Pokémon can now be translated.

Call You Call Me

The mechanics of how the phone and rematchable trainers work have been changed. For starters, there's now a map metadata flag "NoPhoneSignal" which does what you'd expect it to do. The randomly generated dialogue spouted by trainers during phone calls has also been improved, with additional message options and the ability to define a set of messages for individual trainers (phone.txt now looks quite different because of this). If you want more control over what trainers say, you can easily make them run a Common Event for their phone calls instead.

The phone's UI and functionality has been improved a little. You can now delete contacts, and you can rearrange the list of contacts. You can also see whether you have a signal.

As far as rematches go, you can toggle whether rematches are possible (for example, in HGSS, rematches are only possible after Gym 7/beating Team Rocket in the Radio Tower). You can also limit which version of their party a trainer can attain, and change that limit during your game to ensure that rematchable trainers can end up with powerful teams of Pokémon but not too soon.

Because of the changes to the phone, the event commands required to register a new contact in the phone have changed, and you will need to update these yourself. The old registering commands should still work for now, but you'll need to change them eventually.

And Some Other Things

The Debug menu has additional functionality, such as being able to modify the lingering overworld effects (e.g. Repel steps, whether Flash is used), being able to modify the time/steps remaining and number of Poké Balls you have in the Safari Zone/Bug-Catching Contest, and many more properties of the phone and the contacts therein. When you end a battle in Debug mode when holding Ctrl, you can choose the outcome of the battle, and you can now end the battle even if the "Run" command has been replaced by "Call".

The random dungeon generator code has been overhauled. It now produces nicer-looking caves and uses more than three tiles to draw them. It also supports snapping the generation to a 2x2 tile grid, which is useful for forest dungeons because trees are 2x2 tiles in size. There's some random decoration too. There are two new PBS files to support all this, one defining which tiles exist in a random dungeon's tileset that can be used to draw it, and one defining locations which each have parameters such as the shape of the floor and size/number of rooms.

The Battle Frontier facilities now hand out BP instead of Rare Candies (different amounts depending on how well you did), and there's a BP shop in the local Poké Mart. Many items have been given BP prices (the default is 1).

All the graphics for various UI screens have been moved out of the Graphics/Pictures folder and into the new Graphics/UI folder. Some have been renamed and/or put into subfolders for added organisation. And speaking of UI, the Pokédex will no longer show male/female form options for species which don't have gender differences (i.e. if a female sprite doesn't exist).

I also added something to the game stats which counts how many times the player walks into something. They'll now also animate when they do so.

There are plenty of bug fixes too, and other things I haven't mentioned here. Have a look at the change log to find out more.

Enjoy!
 
Last edited:

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
183
Age
29
This is one of the version with the most bugs I ever seen. It's like your trying to work with an alpha version. almost everything in this version is broken.
I don't know what's going on but I have several issues:
  • Can't use Fullscreen option, it will distortion the image
  • Game Crashes sometimes with no error, just closes out of no where.
  • If you transfer your player across a map sometimes instead of been transferred the sprite starts walking to the point in a strait line and goes through anything in it's path.
Respectfully, there is no need to have such a negative tone. I don't personally know the Essentials Dev team, but I can assume they are providing updates to Essentials through passion for development and Pokemon and spending personal time doing so. Your comment here acts like it is their full-time job to provide you with a AAA engine to make games. Everything about Pokemon Essentials revolves around fans of Pokemon making games because it's fun. The negative demeanor of your post makes it less likely someone is going to take time out of their day to help you, especially with blanket statements like "almost everything in this version is broken" or calling something that takes a lot of work "an alpha version". If you don't like it, move on to something else; you're not being forced to use Pokemon Essentials. There is a difference between being frustrated and looking for answers in a civil way and berating the work of others.

I spend a lot of my time on this forum looking to help people in ways I can. Sorry to say, I will not be looking to help you out if I see posts from you if this is your attitude on this site. Posts like this are what make me question my choice to check the site daily to help others.

Take a breath, and consider how you word things next time you post.
 

CarlosPR

Novice
Member
Joined
Mar 6, 2022
Posts
34
Age
29
Respectfully, there is no need to have such a negative tone. I don't personally know the Essentials Dev team, but I can assume they are providing updates to Essentials through passion for development and Pokemon and spending personal time doing so. Your comment here acts like it is their full-time job to provide you with a AAA engine to make games. Everything about Pokemon Essentials revolves around fans of Pokemon making games because it's fun. The negative demeanor of your post makes it less likely someone is going to take time out of their day to help you, especially with blanket statements like "almost everything in this version is broken" or calling something that takes a lot of work "an alpha version". If you don't like it, move on to something else; you're not being forced to use Pokemon Essentials. There is a difference between being frustrated and looking for answers in a civil way and berating the work of others.

I spend a lot of my time on this forum looking to help people in ways I can. Sorry to say, I will not be looking to help you out if I see posts from you if this is your attitude on this site. Posts like this are what make me question my choice to check the site daily to help others.

Take a breath, and consider how you word things next time you post.
I'm sorry if my response looked that way. I wasn't trying to be rude or negative. I was having so Manny issues upgrading my project that, I couldn't understand what was the problem with the project since the game wasn't specific on what was the problem, After hours of research I found some fixes for most of the problems. I still have some problems with it but now at least it's playable.

And Like I said at the start I wasn't trying to be rude, I was trying to say what problems I was having.
 

CarlosPR

Novice
Member
Joined
Mar 6, 2022
Posts
34
Age
29
The bug report forum is here-

But if you say a bug is “just randomly happening with no cause”, and nobody else has reported it in the two months since a version was released, that’s usually a sign of user error, not a bug in the engine. ( Map transfers weren’t even changed in v21 as far as I can tell)
Something changed on the map transfer because the only way I could fix it was to make all the event transfers from scratch.
 
Something changed on the map transfer
This is the code for the map transfer command in v21:
1695874671680.png

This is the code for the map transfer command in v20.

1695875417323.png

I've compared them on text-compare to make sure I didn't overlook anything, they're identical.

The change log for v21 only mentions map transfers once - "The player now dismounts the Bicycle after various map transfers." - and a quick Ctrl+Shift+F for pbDismountBike shows it was added in some scripted transfers like the blackout transfer, starting the safari zone/bug contest, and using field moves like Fly/Dig/Teleport. This change did not affect the Transfer Player command.
because the only way I could fix it was to make all the event transfers from scratch.
So now your description of the problem has changed - before, this happened "sometimes", now it's happening consistently with every event transfer, and you were able to fix it by changing the event. (Which sounds like the problem is "Your events weren't set up right", not "v21 broke map transfers")

Again, you are the only person who's reported this happening. You are not the only person who's used v21. Map transfers are a pretty fundamental part of games, so you can be pretty confident other people are using them when they work with v21. In fact, there's an event that uses a map transfer to the same map in the player's house, the very first map in the game. Do you think that nobody has tried these stairs in the two months since v21 was released? I just tried it now to confirm, and I did not have the problem you described. (Nor did I have it when I made a new event with just the map transfer command)

You haven't even shared what your events look like so that people could check them for errors, you just assumed the problem was with the kit itself.
 

CarlosPR

Novice
Member
Joined
Mar 6, 2022
Posts
34
Age
29
This is the code for the map transfer command in v21:
View attachment 21611
This is the code for the map transfer command in v20.

View attachment 21612
I've compared them on text-compare to make sure I didn't overlook anything, they're identical.

The change log for v21 only mentions map transfers once - "The player now dismounts the Bicycle after various map transfers." - and a quick Ctrl+Shift+F for pbDismountBike shows it was added in some scripted transfers like the blackout transfer, starting the safari zone/bug contest, and using field moves like Fly/Dig/Teleport. This change did not affect the Transfer Player command.

So now your description of the problem has changed - before, this happened "sometimes", now it's happening consistently with every event transfer, and you were able to fix it by changing the event. (Which sounds like the problem is "Your events weren't set up right", not "v21 broke map transfers")

Again, you are the only person who's reported this happening. You are not the only person who's used v21. Map transfers are a pretty fundamental part of games, so you can be pretty confident other people are using them when they work with v21. In fact, there's an event that uses a map transfer to the same map in the player's house, the very first map in the game. Do you think that nobody has tried these stairs in the two months since v21 was released? I just tried it now to confirm, and I did not have the problem you described. (Nor did I have it when I made a new event with just the map transfer command)

You haven't even shared what your events look like so that people could check them for errors, you just assumed the problem was with the kit itself
Ok yes I assumed the issue was with the kit, because i wasn't having the issue on v20.1 and also yes it was happening frequently on the stairs events (Transfers in the same map) not events that transfers you to another map.
But here is how I had the transfer event on V20.1
Screenshot 2023-09-28 072157.png

And here is the same event updated on V21.1
Screenshot 2023-09-28 072356.png

They look similar. also I forgot to add the auto save script on the new one.
I just added the script and it's working like a charm.
I try to replicate the issue and I manage to discover that if you change the speed of the player that's when the issue occurs.
 
Last edited:
But here is how I had the transfer event on V20.1
View attachment 21622
And here is the same event updated on V21.1
View attachment 21623
They look similar. also I forgot to add the auto save script on the new one.
I just added the script and it's working like a charm.
I try to replicate the issue and I manage to discover that if you change the speed of the player that's when the issue occurs.
So, when you changed the event to fix it, you changed the parts of the event that weren't the Transfer Player command... and then declared that the Transfer Player command was what was broken...

This is why providing full context is so important, whether you're asking for help with an error or trying to make a bug report. Let's say you're 100% right and the issue happens every time you use a Transfer Player command after a Set Move Route command that changed the player's speed. How is anyone going to be able to test for this bug if none of your posts mention Set Move Route at all?

Now that you've shared the screencaps, I can recreate the event and see the behavior you described. But this does not happen just because you changed the player's speed right before a map transfer on the same map. This happens because your event is not set up right. You don't have Wait For Move's Completion after your moveroute, so the transfer is happening in the middle of it, and you left Through On in the moveroute, so the player can move through obstacles. Here's a video of me recreating your event and fixing it as I described. (You can fix it by just adding Wait for Move's Completion, by just adding Through Off, or by doing both.)

View: https://www.youtube.com/watch?v=oH-8-LMTaec
 
Top