Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - KK20

RPG Maker Scripts / MOVED: [MV] DoubleX RMMV Skill Hotkeys
September 09, 2017, 06:34:53 pm
This topic has been moved to RMMV Script Database.

TIL something in the bbcode for the script's header needs to be in all caps for it to be put into the database.

[CENTER][SIZE=24pt][b]DoubleX RMMV Skill Hotkeys[/b][/SIZE]
[SIZE=16pt]Authors: DoubleX[/SIZE]
[SIZE=16pt]Version: v1.00a[/SIZE]
[SIZE=14pt]Type: Actor Skill Input Add-on[/SIZE]
Key Term: Actor Add-on[/CENTER]
General Discussion / RPG Maker Fes
June 25, 2017, 02:47:12 am
So the latest RPG Maker installment is upon us now, at least on a world-wide basis. RPG Maker Fes(tival) runs on the Nintendo 3DS; finally, a game console version in years (was the last one, in English, for the Playstation? I know one was released for the Nintendo DS only in Japan). I took it upon myself to look thoroughly through the engine and what it could offer. I needed to know what is actually possible. Despite the game being out in Japan since late last year, there really hasn't been much information.

This thread is for any discussion, news, updates, and tricks relating to anything about RMF.

I'm sure we all knew there would be a lot of features pulled out to compensate for the handheld system. But the amount of things pulled is a bit staggering than I thought. For starters, here are the hard number limits:
  • 99 Maps, strictly of sizes 32x32, 64x64, and 128x128; 3 drawing layers
  • 16 actors; 16 professions (classes); 64 items, weapons, and armor each; 128 skills/abilities
  • 99 monsters and troops (enemies are in sizes small, medium, and large; there are unique troop formations that restrict how many of each type you can have--at most, you can only have 6 small enemies, 3 medium enemies, and 1 large enemy; you can randomize the number that appear)
  • 64 teleport locations, which also handles vehicle starting locations
  • 99 event commands; 10 event pages; 2 conditional checks per event page (except for the first one); not sure if there's an event limit per map as it's not indicated anywhere
  • 500 switches and variables each
  • Each game takes 9 blocks of memory, just over 1MB; almost every new object created takes memory (e.g. a new event takes roughly 100 bytes)
    Now for events
  • Move commands are very limited--to move characters, you have to draw them a path to follow, no "move forward x spaces" or the like; only other commands are jumping and turning
  • You can show two variables on screen in a window positioned in the corners (pretty neat)
  • Variables are neutered--you can't make them interact with other variables and the only operations you can do are set, add, and subtract (values range from 0 ~ 999999); there's also no way to do anything like "heal HP based on a variable"; their sole purpose now is for page conditions and setting some database attributes to equal their value (e.g. you can make a sword's attack be equal to a variable ala an upgrade system)
  • Conditional branches only exist for user-input commands, like yes/no or entering a password; you have to rely on page events' conditions to get the job done
    It will take quite a bit of ingenuity to make some staple features present in previous installments of RM.

    Graphically, the assets are pretty great. It would be really nice if they could export these to the computer-versions. The tileset style is somewhat reminiscent of VXA, but the charsets are closer to MV. Currently, there is only a Fantasy theme which has a decent amount of icons and characters to choose from. The tileset is chock-full of buildings, terrain, and objects. Music selection is somewhat samey. Thankfully there are going to be more themes released, two confirmed are Sci-Fi and Modern. I believe Modern is going to be free while the Sci-Fi will not. Shame really.

    You can upload one game to their online service for others to play for free (RMF Player is a free download) with each subsequent slot requiring about $1 USD. Again, a shame, but at least this kinda entices users to make a GOOD game and not flood the servers with buggy test-demos.

    Interfaces are streamlined well, though it sometimes gets confusing with all the different button inputs to change tabs. You really should utilize the 3DS's touch screen for almost all menu navigation. The only irksome thing to me is the load times between scenes. For example, if I want to edit an event's command, I have to
    Event Editor > Choose Map > Move cursor to event > Open event page > Open event commands > Choose command > Edit the properties
    where each > is a pause ranging from half a second to almost two. And that really adds up in the long run. This might be mitigated with the New 3DS, but I can't confirm.

    As the above limitations mentioned, making creative systems in your game will require a LOT of thinking. Just making a simple push event (like using Strength in Pokemon) takes 5 events, 1 switch and variable. Want to make it so that you have to push it onto a button? Now it's 7 events, 2 switches, and 3 variables. It really does complicate simple features that could be made in mere seconds in RM2k. The latter took me about an hour to create. Just the fact that variables have very few uses makes it frustrating for me.

    The game does receive updates. Currently I'm using version 1.1.2; a small update was released launch day for EU/AUS in the form of 1.1.3 (probably typo fixes). I'm hoping these updates bring along new creative features. I'm assuming it does as I have seen some videos on Japanese games that had things like zooming in on a character sprite, which is not possible currently.

    Is it worth $40 USD? Being half the cost of RMMV, not really. Adding the fact that they're "nickle-and-dime-ing" you for future content is enough as is. I'd probably spend $20 at most for this in its current state. Until they update it enough to warrant a purchase, I'll continue messing with this pirated-copy. Maybe information will start picking up once NA gets it on Tuesday.
Just signal boosting this again. As of March 15, 2017 Dropbox changed the Public folder to private. Any public links you may have shared over the interwebs are now broken. You will need to create a new public link again to allow others access.

More on the info:

Because of this change, it may be possible that a lot of user submitted resources are no longer available. That includes any scripts, images, or projects. Please try to contact the topic owner of any broken Dropbox links.

But I do agree that this is a pretty huge dick move by them. I don't understand why this change needed to happen and why it was forced upon everyone. Especially for communities like us, this just adds to the headaches.
Tutorials / [WIP] Single Executable for RPG Maker
September 22, 2016, 02:02:48 am
I'm guessing when it comes to distributing your games, most people would like to just hand a single file to their users. It's simple, organized, and hard to access your game files (cuz we all know how to extract assets from compressed games and modify them with our own :P). Following this tutorial, you will be able to do just that! This guide uses the freeware Enigma Virtual Box to achieve this effect. I'm also using RPG Maker XP as the example because, let's face it, it is the superior RM around /bias. The tutorial should work for any version though.

Step 1: Download Enigma Virtual Box
Go to the website and download said program. Run the installer, choose a place to install it to, couple more clicks, and done. Really easy.
Spoiler: ShowHide

Step 2: Load Your Project
Upon running the software, you should see something similar to this:
Spoiler: ShowHide

At the top, hit the Browse button next to the "Enter Input File Name" textbox. Select your project's Game.exe file and OK. It will auto-generate an Output File Name in the same project directory. Go ahead and change it so that it outputs elsewhere (like to your Desktop) and rename it to "Game.exe".

Now click the Add button below and choose to Add Folder Recursive.
Spoiler: ShowHide

Locate and select your project folder.
Spoiler: ShowHide

You will get a pop-up that looks like this:
Spoiler: ShowHide

It is okay to leave it as is, so go ahead and OK it. %DEFAULT FOLDER% will ensure that your game's files will be "extracted" in the same location as your single executable (this is what we want).

Step 3: Finalize
Go ahead and remove the Game.rxproj as this is not needed. Mess with the other options if you know what you're doing, but you're pretty much done here. Click on Process to compile everything together and generate your stand-alone EXE.
Spoiler: ShowHide

A new Game.exe file should have appeared on your desktop. Try running it and see if your game works. Now give that to a friend!

Step 3a: RPG Maker ACE and Gothic Font
If working with RPG Maker VXA or XPA, you'll probably see a "Unable to find VL Gothic font". Right click the two VL Gothic font files, select Properties, and change their Virtualization Method to Write to Disk if not Exists.
Spoiler: ShowHide

This will create a Fonts folder containing these two files when you run the Game.exe. Not exactly a single file anymore but...I don't know any other way to resolve that error message. Of course, you could just tell your players to install the font instead of having to do this.

Just a reminder: Your stand-alone EXE has to have the SAME FILENAME as your INI file. If it's ChaosProject.ini, it will have to be ChaosProject.exe. Otherwise, the game will not work.
RMXP Script Database / [XP] Mouse Wheel Scroll
July 04, 2016, 04:40:27 am
Mouse Wheel Scroll
Authors: KK20
Version: 1.0
Type: Input Add-on
Key Term: Misc System


This script allows the use of scrolling the mouse wheel. It was written as an extension to Blizzard's Mouse Controller:,4710.0.html

Note that this script is not necessarily complete. It is up to you, the developer, to make use of this script's features. I only added the ability to scroll through Window_Selectable contents.


  • Players can scroll the mouse wheel

  • Additional configuration option to allow the cursor to be visible at all times

  • Windows_Selectable#update allows the ability to scroll through the windows via mouse wheel






Spoiler: ShowHide

# Mouse Wheel Scroll for Mouse Controller
# Version: 1.0
# Type: Custom Input System
# Date: July 4 2016
# Compatibility:
#   Requires Blizzard's Mouse Controller
#   Be sure the Mouse Controller is placed above this script.
# Features:
#   - allows the ability to scroll the mouse wheel
#   - adds an option to keep the mouse cursor constantly displayed on screen
# Instructions:
#   Add the file MouseWheel.dll to your game project. Configure below.
# - Script Calls:
#   The following commands are possible:
#    Input.scroll_up?       Returns TRUE if the wheel scrolled up
#    Input.scroll_down?     Returns TRUE if the wheel scrolled down
#    Input.scroll?          Returns TRUE if the wheel scrolled
#    Input.wheel_delta      Returns the number of times the wheel scrolled this
#                           frame (Positive for up, Negative for down)
# Side Note:
#   Feel free to use this script in any way you want. If you would like the
#   mouse wheel scrolling for another mouse script, you may modify this script
#   accordingly.
# If you find any bugs, please report them here:

# Mouse
class Mouse
# START Configuration
  # If true, the Windows cursor will always be displayed over the game window.
  # If HIDE_WINDOWS_CURSOR is true, this option will be ignored.
# END Configuration

  StartWheel ='MouseWheel', 'Initialize', 'i', 'i') ? 0 : (ALWAYS_VISIBLE ? 1 : 0))
  WheelDelta ='MouseWheel', 'WheelDelta', '', 'i')

  attr_reader :delta

  alias init_mouse_scroll initialize
  def initialize
    @delta = 0

  alias update_for_mouse_scroll update
  def update
    @delta =

# Input
module Input

  def self.scroll_up?
    $ > 0

  def self.scroll_down?
    $ < 0

  def self.scroll?
    $ != 0

  def self.wheel_delta
# Window_Selectable

class Window_Selectable
  alias update_for_mouse_wheel update
  def update
      if Input.scroll_up?
        self.top_row -= 1
      elsif Input.scroll_down? &&
            self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
        self.top_row += 1



Requires Blizzard's Mouse Controller script (link above). The Controller should be placed above this add-on in the script list.
Download the required DLL here (includes source code): Download
All other instructions in script.


Requires Blizzard's Mouse Controller.

Credits and Thanks

  • KK20 - Script and DLL

  • Blizzard - Assistance with making DLL

Author's Notes

Performance might be slow on terrible computers. I would appreciate it if people can test this for me.
If you wish to adapt this script to other existing mouse controller scripts, you are free to do so.
RPG Maker Scripts / Mouse Wheel Scroll Message
June 28, 2016, 12:08:34 am
EDIT: Script:,15450.0.html

Overall goal is to know, with a script call, how many times (in which direction) the mouse wheel has scrolled.

I started off with seeing if someone already made something in RPG Maker, and found this at the top of the list:
GetMessage, from what I understand, waits until a message is received before processing any further. The script does work (with some missed inputs here and there), but FPS takes a massive hit.

I then found PeekMessage, which I thought functioned much like GetMessage but without the waiting. Turns out that was wrong; I wasn't getting any mouse wheel messages (unless I furiously moved the mouse around and scrolled at the same time, in which I received the message every now and then).

A callback sounds like the best solution, but I don't really have any experience with setting those up. I looked at this and am not sure if I can figure out how to incorporate it into a DLL.

How difficult is this really?


Okay so the stackoverflow actually helped a lot. After fumbling around with it, I figured out how to put it into a separate thread, accumulate the number of times the wheel scrolled, and have another DLL method return the number of times (positive for scrolling up, negative for down). I do not know the elegance of this nor the practicality, so I'm hoping someone can give valuable input. Game runs at 60 FPS and is registering every instance of a mouse wheel scroll.

I guess the ONLY bad thing right now is it accepts the mouse scroll regardless of what the active window is. So if your game pauses when it's not active, you scroll the wheel a lot, and click back on the game, the first call could be a massive accumulation. I could just make it return only -1 or 1 instead, but whatever.
Spoiler: ShowHide

// Since I'm doing this in CodeBlocks, I found out you have to do this for RAWINPUTDEVICE to work.
// Visual Studios already has a high enough version that this is unnecessary if building in it.
#ifdef __MINGW32__
#   define _WIN32_WINNT 0x0501

#include "main.h"
#include <windows.h>
#include <stdio.h>

int delta = 0;

LRESULT CALLBACK MyWindowProc( HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam ) {

    switch ( uiMsg ) {

        case WM_INPUT: {
            UINT dwSize;
            HRAWINPUT hRawInput = reinterpret_cast<HRAWINPUT>( lParam );
            UINT uiRetCode = GetRawInputData( hRawInput, RID_INPUT, NULL, &dwSize,
                                              static_cast<UINT>( sizeof( RAWINPUTHEADER ) ) );
            if ( uiRetCode != 0xffffffff ) {
                LPBYTE lpb = new BYTE[ dwSize ];
                uiRetCode = GetRawInputData( hRawInput, RID_INPUT, lpb, &dwSize,
                                             static_cast<UINT>( sizeof( RAWINPUTHEADER ) ) );
                if ( uiRetCode > 0 ) {
                    RAWINPUT* praw = reinterpret_cast<RAWINPUT*>( lpb );
                    if ( praw->header.dwType == RIM_TYPEMOUSE ) {
                        if ( praw->data.mouse.usButtonFlags & RI_MOUSE_WHEEL ) {
                            signed int siDelta = static_cast<SHORT>( praw->data.mouse.usButtonData );
                            delta += siDelta / 120;
                delete[] lpb;

        } // WM_INPUT

            return DefWindowProc( hWnd, uiMsg, wParam, lParam );

    return 0;

    HWND hWnd;
    WNDCLASS WndClass;

    memset( &WndClass, 0, sizeof( WndClass ) );
    WndClass.hInstance = GetModuleHandle( NULL );
    WndClass.lpszClassName = "MyRawInputClass";
    WndClass.lpfnWndProc = MyWindowProc;
    RegisterClass( &WndClass );

    hWnd = CreateWindow( WndClass.lpszClassName, NULL, 0, 0, 0, 0, 0,
                              HWND_MESSAGE, 0, WndClass.hInstance, 0 );

    RAWINPUTDEVICE RawInputDevice;
    RawInputDevice.usUsagePage = 0x01; // Generic Desktop Controls
    RawInputDevice.usUsage = 0x02; // Mouse
    RawInputDevice.dwFlags = RIDEV_INPUTSINK;
    RawInputDevice.hwndTarget = hWnd;
    BOOL bWin32Success = RegisterRawInputDevices( &RawInputDevice, 1,
                                                  static_cast<UINT>( sizeof( RAWINPUTHEADER ) ) );

    BOOL bRet;
    MSG msg;

    while( ( bRet = GetMessage( &msg, NULL, 0, 0 ) ) != 0 ) {
        if (bRet != -1) {

    DestroyWindow( hWnd );
    UnregisterClass( WndClass.lpszClassName, WndClass.hInstance );

    return 0;

// Call this method first from the game
int DLL_EXPORT Start()
    if (CreateThread(NULL, 0, CheckWheel, NULL, 0, 0) == NULL) return -1;
    return 0;
// Call this to get the number of times the wheel scrolled in a certain direction
// + for UP
// - for DOWN
int DLL_EXPORT WheelDelta()
    int copyDelta = delta;
    delta = 0;
    return copyDelta;