How'd you do THAT?! Interesting Tips & Tricks for All Makers

Recently @Lomaxient brought up the idea of a thread where we could share all the tricks we've learned to accomplish something in our projects, and I thought that idea was great! We all have some neat tricks and fun tips to get specific effects in our games, but for the most part we don't share them unless we come across someone asking for help since the single trick isn't enough for a full tutorial. The idea for this thread is to share those short tips and tricks all in one place, so hopefully we can help someone before the need to make a thread or we can inspire someone to add something cool to that can improve their projects.

So let's all share some of the little things you use in your games that help make it better! You can share eventing tricks, move route ideas, damage formulas, graphic shortcuts, and more! Just make sure that the main focus is in RPG Maker, not in a program outside of it.

“Should I post here or should I make a tutorial thread?”
I’m not going to make any strict rules about this, but let’s try to keep this thread full of quick-and-easy things to implement. If your trick needs a bunch of steps to explain it or requires a lot of work to set up, please make a tutorial thread. If your trick is one line in an event or damage formula and you can’t expand on it to make a full tutorial, post it here.

Since we are all at different levels of RPG Maker knowledge, let's use a template so that hopefully even newer devs can use these tips without needing to ask too many questions. 🙂

Tips & Tricks Template:

Name of Tip/Trick:
Maker
: [2k,2k3,XP,VX,Ace,MV, MZ] Tell us which RPG Maker this is for, since not every trick will work in every engine. If your trick can work in multiple engines, make sure to list them!

Description: Tell us what the tip accomplishes. Be as description as possible so others know what it does and can find your post while searching.

Required Resources: Does this tip need a plugin or some out-of-engine graphics to work properly? Then share them here.

How to do it: The meat of your trick! Share how you set it up and got it working. Please be as specific as possible so others can also do it, including screenshots as needed.

Reference Links and Thanks: Did you learn how to do this from an older thread or pull some code from someone else's post to get your trick working? Then drop that link or username here, so others can see it and maybe learn something else!
Spoiler: The template without all the descriptions
Name of Tip/Trick:
Maker
: [2k,2k3,XP,VX,Ace,MV, MZ]

Description:

Required Resources:

How to do it:

Reference Links and Thanks:
I'll go ahead and start this off with one trick I use often in my own projects. :ptea:

Checking the number of specific items at the same time:
Maker
: [MV, MZ]

Description: While we can count how many of a specific item with a variable, sometimes it would be easier if we could check a bunch of item counts at once in a conditional branch instead of needing to nest multiple conditional branches. Luckily there is a script call that lets us do just that! It's great for crafting systems where you need more than one type of item to make something or if you want to make side quests where a bunch of different monster drops are needed.

Required Resources: None

How to do it:
Spoiler: Info and examples
We can use this script call:
Code:
$gameParty.numItems($dataItems[n]) == x
^Party must have the exact listed number of the item.

$gameParty.numItems($dataItems[n]) >= x
^Party must have at least the listed number of the item.

$gameParty.numItems($dataItems[n]) <= x
^Party must have the same or less than the listed number of the item.
Where 'n' is replaced with the item's number from the database and the 'x' is how many of the item we're checking for. If we want to check multiple items at once, then we can combine the script calls with '&&' to mean each script call must be true or '||' to mean at least one script call must be true.

We can check more than just items, if we replace the '$dataItems[n]' with either '$dataWeapons[n]' or '$dataArmors[n]' to check weapons and armors respectively. This only check the inventory, not anything equipped, so keep that in mind.

Some examples:
Code:
$gameParty.numItems($dataItems[1]) == 5
^Means that the party must have exactly 5 of Item 1.

$gameParty.numItems($dataItems[1]) >= 5 && $gameParty.numItems($dataItems[2]) >= 5
^Means that the party must have both at least 5 of Item 1 and at least 5 of Item 2.

$gameParty.numItems($dataWeapons[1]) <= 5 && $gameParty.numItems($dataArmors[1]) <= 5
^Means that the party must have less than 5 of both Weapon 1 and Armor 1.

$gameParty.numItems($dataWeapons[1]) >= 3 || $gameParty.numItems($dataWeapons[2]) >= 3
^Means that the party must have at least 3 of Weapon 1 or at least 3 of Weapon 2.

Once we have our code figured out, we can use in a conditional branch during an event. For this example, the party needs to have at least 5 Potions and 5 Magic Waters to create an Elixir, and if they don't have enough then they'll be told that:
Spoiler: In-engine screenshot
1711138204571.png
Reference Links and Thanks: RPG Maker MV / MZ Script Call List
Just a suggestion here:

Include your comments on a line of code ABOVE or BELOW the actual code.
Newcomers might not understand what part is actual code and what's just a comment or explanation.
(Got my own share of experiences in this regard...)
Preloading an image file:

Maker:
[MZ]

Description: There are times when you might want to load an image into memory ahead of time, so that it will be immediately ready to display when you need it. For example, when you switch an event's sprite to another one, you might notice a slight flicker in-between. When that happens, it's generally because the engine has to load the new character image file before it can display the new sprite. If you were to preload that file into cache, sometime before the sprite swap, then there would be no flicker.

There are preloader plugins, but since preloading an image actually only requires one very simple script call, a dedicated plugin is likely overkill for one-off situations.

Required Resources: None

How to do it:
Spoiler: INFO AND EXAMPLES
If the image in question is an event sprite or a walking sprite, then you would use this script call to preload the image:
JavaScript:
ImageManager.loadCharacter('filename');

Just replace filename with the name of the image file (don't include the file extension). So if the file is Actor1.png, then you would use this command:
JavaScript:
ImageManager.loadCharacter('Actor1');

That would keep the file loaded into cache, until the next time you transfer maps. This means that you need to make sure to run the script call in the same map that you intend to use the image. A simple autorun or parallel event, that runs one time as soon as the player enters the map, would do the trick. The image will load asynchronously, meaning that it won't block other things from happening in the meantime, so you can preload as many images as you need without having to worry about it causing the map to load slowly or impacting your framerate.

If the image is not a character file, then you will need to use a different script call. Each type of image has its own script call. Here is a list of each one (I think the names are self-explanatory):
JavaScript:
ImageManager.loadAnimation('filename'); // this is for MV-style animations only
ImageManager.loadBattleback1('filename');
ImageManager.loadBattleback2('filename');
ImageManager.loadEnemy('filename');
ImageManager.loadCharacter('filename');
ImageManager.loadFace('filename');
ImageManager.loadParallax('filename');
ImageManager.loadPicture('filename');
ImageManager.loadSvActor('filename');
ImageManager.loadSvEnemy('filename');
ImageManager.loadSystem('filename'); // you shouldn't need to use this one, because system files are always in cache
ImageManager.loadTileset('filename');
ImageManager.loadTitle1('filename');
ImageManager.loadTitle2('filename');

One special consideration to keep in mind is that, upon entering a map, the engine already automatically loads any pictures that might be shown in that map--provided that you are using the Show Picture event command to show those pictures. So you only need to explicitly preload pictures if you're showing those pictures with a script call instead of the Show Picture event command.
I like the idea of this thread! I'll pick my brain and see if I can think of any that aren't specific to particular plugins.
Set a new party member's level to the party's average level:
Maker
: [MV, MZ]

Description: Sometimes you can't predict what level the player's party is at when they encounter a new party member. Will the new party member be severely underleveled or even severely overleveled? Worry no more! With this tutorial every new party member that joins the player's party will be at the right level.

Required Resources: None

How to do it:
In the event that adds the new party member, use the Script Event Command to calculate the party's average level and store it in a variable (I'm using variable 33, but it can be any variable):
Code:
var totalLevel = 0;
for (var i = 0 ; i < $gameParty.members().length; i++) {
   var ac = $gameParty.members()[i];
   totalLevel += ac.level;
}
$gameVariables.setValue(33, (Math.round(totalLevel / $gameParty.members().length) - 1));

Next, you add the new party member will the Change Party Member Event Command.

Following that, increase the level of the new party member with the variable you used to store the party's average level in.
Screenshot 2024-03-22 221038.png


Lastly, heal the newcomer and reset the variable back to zero.

Your event should something like this:
Screenshot 2024-03-22 221018.png
No-frills Randomized Currency Bag/Container:

Maker:
[VX Ace, but really any]

Description: Want the player to take what currency they can get and be happy about it in a nice random fashion? This is how you do it.

Required Resources: None

How to do it:
You use a variable to represent the currency, and make it equal to a random number of your choice. Add gold equal to that variable, have a dialog window that shows the value equal to the variable, then reset the variable to zero. Makes it random every time.
1712623187165.png
I like the idea of this, so I'll share two things that took me way to long to make during my Game.

Upgrading / Changing Passive Skills that are Equipped:

Maker:
[MZ]

Description: So you have the Passive Skills: Initial Barrier, but you can also learn / upgrade it to Initial Barrier +1 and Initial Barrier +2. All well and good easy peasy, but if you upgrade the Passive skill, it still says equipped using "Fomar0153_PassiveSkills" which isn't good because then they stack, and you still lose whatever it costs to have it equipped and all that nonsense. So...

Required Resources: Fomar0153_PassiveSkills, Skill Learn System VisuStella MZ

How to do it:

<JS On Learn Skill>
$gameActors.actor(X)._passiveSkills.remove(Y);
</JS On Learn Skill>

Replace (X) with your ActorsID, and (Y) with the passive skill that's currently, MAYBE equipped. And place this in the skill notes for the upgraded skill. So when you Learn Initial Barrier +1, it will de-equip Initial Barrier passive skill, you get everything back and it causes no issues. Probably an easier way around this then what I did but hey.

More I think on it, I can probably add some code turning on a variable if it was equipped, to re-equip the +1 version after you remove the normal version, but that's for later.




Reduce Skill Clutter in Skill Learn Menu after learning them:

Maker:
[MZ]

Description: So each skill per character has 2 upgrades, with alot of skills that's alot of clutter. So I'll show you a "before" and "after" the change. Of what it looks like when you start learning all the skills.

Spoiler: Before and After
Eww disgusting bloat!
Untitled 2.png


Ooh crisp and clean bloat!
Untitled 4.png

Required Resources: Skill Learn System VisuStella MZ

How to do it:

Place this in Initial Barrier, or whatever the first tier of your skill is.
<JS Learn Show>
if ($gameParty.members(1)[0].hasSkill(11)) {visible = false;}else{visible = true;}
</JS Learn Show>

And Place this in the second tier or Initial Barrier +1 skill.
<JS Learn Show>
if ($gameParty.members(1)[0].hasSkill(12)) {visible = false;}else{visible = true;}
</JS Learn Show>


So finally how it all comes together is the Tier1 skill checks if you learn the ID of the Tier2 skill, if you did then it hides itself from the Skill Learn Menu. Same for the Tier2 skill. It checks to see if the actor learned the Tier3 skill and if they did it hides itself from the Skill Learn Menu. BUT for the final Tier skill, it DOESN'T check for anything nor hides it so you can see it fully.

Once again, prolly an easier way to do it, but hey. I had "fun spending hours and weeks trying to get this to work". Thanks for reading!
Thought about another thing I do often but see people forget that it's an option in their own games: using an item without choosing an actor to use it on.

Making a Note/Map Item:
Maker
: [MV, MZ]

Description: A lot of games make use of items that activate a common event to show an image or preform an action, but for players it can be a bit annoying to have to also choose the main character each time to use the item. Luckily with a few clicks in the database that effect can be removed!

Required Resources: None

How to do it: Set up your item with its Name, Icon, Description, and Item Type with whatever you want. If you want the item to be able to be bought/sold, set a Price, otherwise leave it at 0. If you want the item to disappear once used, choose 'Yes' for the Consumable option, otherwise go with 'No' if you want your players to be able to use the item repeatedly.

Does your game include battles? Then consider marking the Occasion choice with 'Menu Screen' so that your players can't accidentally waste a turn looking at the item during combat.

Now the important part: set Scope to 'None' and choose an common event in the Effects section that does whatever you need this item to do. If you made a note item you can have the common event use the Show Text command to show a message, or create a world map picture outside of RPG Maker and have the map item activate a picture that appears in the middle of the screen (just remember to set up a way to remove the image so your player can see their screen again).

And with that, your players can now click on an item and have it instantly show a picture or run a message, or whatever you want.
Spoiler: Database image of how it should look:
1713299146007.png

Does anyone else have some database-related tricks they often use?
I like the name of this thread haha
Don't want to use a transparent text box to wait for a show picture? Do this:

Name of Tip/Trick: Picture Wait Mode

Maker:
MV/MZ

Description: Sometimes, you want to be able to show a picture and have the player wait until a button is pressed. The quick workaround usually is using transparent "show text" command. Here, we are going to overwrite the setWaitMode command to include 'picture'.

Video:
(sorry - the video cropped wrong - reuploaded correct version)


Required Resources: Notepad to write plugin and save. Do not overwrite corescripts - always use a plugin.

How to do it: Type/copy/paste this in to your Notepad program (or whatever you use) and save as a .js file. Load into the plugin manager and activate it. Unless you have a plugin that directly affects updateWaitMode(), you shouldn't have any compatibility issues.

JavaScript:
//Overwrite function to add different wait modes
Game_Interpreter.prototype.updateWaitMode = function() {
    var waiting = false;
    switch (this._waitMode) {
        case 'message':
            waiting = $gameMessage.isBusy();
            break;
        case 'transfer':
            waiting = $gamePlayer.isTransferring();
            break;
        case 'scroll':
            waiting = $gameMap.isScrolling();
            break;
        case 'route':
            waiting = this._character.isMoveRouteForcing();
            break;
        case 'animation':
            waiting = this._character.isAnimationPlaying();
            break;
        case 'balloon':
            waiting = this._character.isBalloonPlaying();
            break;
        case 'gather':
            waiting = $gamePlayer.areFollowersGathering();
            break;
        case 'action':
            waiting = BattleManager.isActionForced();
            break;
        case 'video':
            waiting = Graphics.isVideoPlaying();
            break;
        case 'image':
            waiting = !ImageManager.isReady();
            break;
        case 'picture': // custom wait for picture - 'ok' removes all pictures
            waiting = $gameScreen._pictures.length > 0; // true if there is any picture shown
            // clears out all pictures on screen
            if (Input.isTriggered('ok')) $gameScreen._pictures = [];
            break;
    };
    if (!waiting) this._waitMode = '';
    return waiting;
}

Then, in your event after you load a picture or pictures on the screen, you can use the script:
JavaScript:
this.setWaitMode('picture')
and it will wait for the picture on the screen until you press 'ok'. Refactored a few things and realized the waiting would be false anyways if there are no pictures so now it doesn't need the extra wait frame and it's only one line for the if-statement now.
waitmode1.png
You can change the input to whatever you need. I like using Input.isTriggered(Input._latestButton) because then I can press any key I want and it will stop the wait mode for the picture.

You can pretty much set a wait mode for almost any condition case - pictures, audio, etc.

Reference: RPG MV/MZ Corescript - Game_Interpreter (updateWaitMode function)
Use ALT+NUMPAD (Rogue-like) symbols in your files or in RPG maker.

These will generally only work within a windows operating system and I have not tested them in all RPG maker scenarios, so it could result in a bug somewhere. These symbols are useful for the following:
  • Mark files of a special class so you can search sort them later
  • Designate personal files, copyright status, or development stages
  • Mark skills or items in-game according to element or type
  • Strong passwords
  • Personal organization in notes
  • Sharing with others
Rogue.PNG
Use ALT+NUMPAD (Rogue-like) symbols in your files or in RPG maker.
Just as a note, all versions of Windows ship with a utility named Character Map that allows you to see the full symbol listing within any font, as well as the code to type it (you can also select symbols directly to copy and paste from it).

Different fonts will have different expanded options.
This post/thread will be updated as I realize more Ingenious Ideas. I may or may not also ask questions regarding struggles here if this gets enough interest here.



1. HP cost
1739063948649.png

What it says on the tin. Put this in a common event and slot it into a skill. Bam, that skill now cost X% of units max hp. In the event you allow multiple characters to use such skills, you may need to make one for each individual character able to use them.
Requirements: None!

2. Scalable elemental weakening
1739064093467.png

I thought it was kind of weird how I couldn't find any dedicated incremental weakness effects, so I made this little number(s). Increases damage by X%, though I haven't updated the counter number. You can handle that yourself, though. Change it to exponents with a decimal, bam, you got resistance too. Might even work with element absorption too if you get it to be compatible with negatives.
Requirements: Battle Engine Core, Buff/State Core, & Element Core (Yanfly)

3. Pestilence
1739066722557.png

Shin Megami Tensei has a physical attack that does increased damage the more status effects the target has.
This is just a more radical version. Mess about with it as you wish.
Requirements: Damage Core, Skill Core (Yanfly)

Original thread: https://forums.rpgmakerweb.com/threads/howd-you-do-that-interesting-tips-tricks-for-all-makers.167068/