You may recognize the plugin call PSM_SHOW_POPUP if you've tried to translate (machine or otherwise) certain RPG Maker MV games. If you don't, here's the lowdown:
This call is for a plugin named FTKR_PopupSpriteMessage.js. The PSM_SHOW_POPUP call with its associated arguments (the main one: text, and position, etc) are used to show text anywhere on the screen. There is also PSM_SHOW_POPUP_B which is the same thing but has more options: color, size, font changes, and importantly: offsetWait. That last argument is an integer, and it is processed as follows:
Neat.
Next is the text argument. You may have noticed if you're translating one of these games and you try to add spaces to the text in a PSM_SHOW_POPUP call in e.g. CommonEvents, you'll end up with errors or non-functional popups. This is because normal space characters tell the plugin to move to the next argument; all the things after the space(s) get parsed as arguments (or ignored). If you want to include a space that doesn't break the game, you need to get creative and use something like
Ok, great, you know how to use spaces in your translation now, but it's still awkward to hit \_ - especially while translating. Also, the comment is wrong - you actually need to enter \\_ or the game may not load at all. How can we get around this issue? With
Once you have AHK installed, copy paste that into an .AHK file, compile it and run it! While the script is running, press f12 to toggle the key swap on/off; while it's toggled on, press spacebar and you'll get \\_ instead, so you can translate games that use this plugin more easily. Note that if f12 doesn't work for you as a toggle shortcut you can change it:
Attached are the .AHK script and FTKR_PopupSpriteMessage.js with the modification shown. Paste the .js file into your games ~/www/js/plugins/ folder and replace the one in there. The .AHK script should run from any folder once you have AHK installed and the script compiled. For the .js file, you may want to just update the one you have as there are multiple versions, some of which probably fixed bugs or something.
note: I have heard of truly awful anti-cheat software that will flag any AutoHotkey script as a hack. To be safer, exit the script entirely (right click icon in taskbar) before you start something with anti-cheat.
This call is for a plugin named FTKR_PopupSpriteMessage.js. The PSM_SHOW_POPUP call with its associated arguments (the main one: text, and position, etc) are used to show text anywhere on the screen. There is also PSM_SHOW_POPUP_B which is the same thing but has more options: color, size, font changes, and importantly: offsetWait. That last argument is an integer, and it is processed as follows:
- if it is greater than 0, process the text one character at a time with a delay between each character (delay determined by the "count" argument)
- if it is exactly 0, process the text one character at a time with no delay (used for per-character color, size, etc changes) (this is what PSM_SHOW_POPUP defaults to)
- if it is less than 0, process all the text at once.
You don't have permission to view the spoiler content.
Log in or register now.
Next is the text argument. You may have noticed if you're translating one of these games and you try to add spaces to the text in a PSM_SHOW_POPUP call in e.g. CommonEvents, you'll end up with errors or non-functional popups. This is because normal space characters tell the plugin to move to the next argument; all the things after the space(s) get parsed as arguments (or ignored). If you want to include a space that doesn't break the game, you need to get creative and use something like
You must be registered to see the links
or, as noted in the instructional comments of FTKR_PopupSpriteMessage.js:You don't have permission to view the spoiler content.
Log in or register now.
You must be registered to see the links
! Specifically an .AHK script that looks something like this:You don't have permission to view the spoiler content.
Log in or register now.
You must be registered to see the links
. If you want to
You must be registered to see the links
, the big three are: ! for alt; ^ for control; + for shift. For example, if you wanted control+p to be your toggle, you'd put ^p:: in place of the f12:: - just remember to compile and run again if you change it.Attached are the .AHK script and FTKR_PopupSpriteMessage.js with the modification shown. Paste the .js file into your games ~/www/js/plugins/ folder and replace the one in there. The .AHK script should run from any folder once you have AHK installed and the script compiled. For the .js file, you may want to just update the one you have as there are multiple versions, some of which probably fixed bugs or something.
note: I have heard of truly awful anti-cheat software that will flag any AutoHotkey script as a hack. To be safer, exit the script entirely (right click icon in taskbar) before you start something with anti-cheat.
Last edited: