• The Eevee Expo Game Jam is on! 📝 Head on over to the game jam forum and read through the rules if you want to participate.
    From June 30th to August 10th, 2025, participants have a little over a month to create a game!
  • Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Misc MKXP Utilities for your game

any version Misc MKXP Utilities for your game 1.0

This resource does not pertain to any specific version of Pokémon Essentials.
Pokémon Essentials Version
Non-applicable
Hello everyone, this tutorial will show you some cool things that you can add to your game without much effort, part of this tutorial only covers what MKXP already allows you to offer (and some more basic Tweaks that I know in future updates).
if you want to know all the possible extensions, check out the Mkxp repository!

Side Note: This tutorial was made with v21.1 in mind, but I believe it should work in a similar way for previous versions.​



1 - Button with redirect link:

Useful to add some button that takes you to your social networks or the Fangame Discord, I don't see many doing this, but believe me, it's simple!

First, locate where the scripts are on your Load screen, in this case the "UI_Load".

Look for where the buttons are set, search for "cmd_continue = -1" to be easier.

add a new one, call it what you want, in mine I called it "cmd_discord = -1"

Right below, you'll see something like "[cmd_options = commands.length]", add one here as well, like:
commands[cmd_discord = commands.length] = _INTL('Discord Server')

Scroll down a bit further and find "Case Command", here where the button functions are called.

after an 'end' or before a 'when', add:​
when cmd_discord
System.launch("https://discord.gg/YOURLINK")​

Save the changes, recompile, and voila!

This works for any link if you're curious

There are some variations of this function, such as:
  • System.launch(cmd: String[, args: Array[String]]) opens the path or link address with the user's default program.

  • System.launch(System.data_directory) would open the game's save folder in the file explorer, and System.launch("log.txt") would open a plaintext file using whatever the user has assigned to open plaintext files with. On Windows and macOS you can also optionally supply args for programs. Raises an MKXPError if it fails for whatever reason.



2 - How to update your Mkxp:

There are 2 ways to do this, one simpler and one more complex.
I suppose you opt for the easy way, the hardest way involve you making a build of Mxkp yourself.
Also, you will need to have an GitHub account for this and to download the Build.

First, go to the Mxkp repository, there will be a Builds tab there (the 'Actions' Tab), choose the one you want and dowload (choose the respective file if you are on Mac, Windows or Linux), you will need 4 files if you want to really update:

  • Mkx-z.exe (rename it to Game.exe)
  • x64-msvcrt-ruby310.dll
  • zlib1.dll
  • mkxp.json

Remember to make a backup before changing these files, they are extremely important. I also recommend changing some lines from the new mkxp.json to the same ones that are in the old mkxp.json, or you may have some technical problems, especially with FPS.

Once you replace these files, recompile. The Console will show some message in yellow that Essentials is made for another Mkxp build, but as far as I've tested, I haven't encountered any issues, so I suppose you can ignore that warning.

Depending on the version, this will also allow you to associate the Gamepad keys in the F1 Menu, which for some reason stopped working properly in v21.




3 - Video Playback:

mkxp-z had support for video playback contributed a while back.
you can use this if you want to do some animated Cutscene or Intro, but remember to call in some script:
# file to play volume scene is skippable?
Graphics.play_movie(filename: String[, volume: Integer[, skip: Boolean = false]])​

"You must use Ogg-Theora (.ogv) video with a YUV420p pixel format.
If the video isn't OGV, the function will fail. If the video is OGV but not YUV420p, the program will panic and abort.

You may set volume with volume, and whether or not the scene is allowed to be skipped with skip. If skipping is allowed, pressing 'Input::B' or 'Input::C' will immediately end video playback.

Videos are scaled to fit the game's screen (not the window), with a black letterbox placed behind them when aspect ratios do not match. If the letterbox isn't desired, both the letterbox and the video are just normal Sprites backed by bitmaps; the letterbox has a z-level of 4999, and the video has a z-level of 5001. This means that you can create a new sprite with a z-level of 5000 and it will appear between the letterbox and the video, effectively letting you replace or "remove" the letterbox."​




4 - Random Utilities:

I don't think it's worth a specific category for them, but maybe they can be useful, depending on what you plan to do with them.
  • Mouse button states can be checked using "standard" RGSS input codes:​

Input.press? Input::MOUSELEFT
Input.press? Input::MOUSEMIDDLE
Input.press? Input::MOUSERIGHT
Input.press? Input::MOUSEX1 # Mouse Button 4
Input.press? Input::MOUSEX2 # Mouse Button 5​

  • mkxp-z can play multiple BGM tracks at once. to enable this functionality, just raise the BGMTrackCount setting in the JSON configuration to however many tracks you think you'll need.
  • Each BGM function now has an additional optional argument that indicates which track you want it to operate upon. This value is zero-indexed, compared to the one-indexed value in the JSON, so if you ask for 4 tracks, you can use 0-3 as track values.

.bgm_volume([track: Integer|Nil]) returns current volume levels, in values from 0 to 100.
.bgm_set_volume(vol: Integer[, track: Integer|Nil]) sets current volume levels, using a value from 0 to 100.

  • mkxp-z supports a number of optional graphical enhancements compared to Enterbrain's runtime.

Smooth scaling. You can use a variety of smooth scaling algorithms for both the framebuffer and for Bitmaps. See the smoothScaling options in mkxp.json.
High-resolution Bitmap replacement. You can replace images with higher-resolution (or otherwise customized) versions, without editing the game's Ruby code. See the enableHires option in mkxp.json.




Part of what is here was just taken from the repository since they are self-explanatory in their own way, maybe I'll update this if I can make/find something different for the games to have something spicier.​
Credits
No need to credit since this is just basic things that MKXP can offer.
Author
Willøw
Views
1,116
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Willøw

Back
Top