An open library of RPG Maker MV plugins, powered by the community.

PGMV - The Community-Driven Plugin Library for RPG Maker MV

MV plugins

TM Same Game - TMSameGame.js

Plugin desc : We will add something that looks like Samegame.

License : MIT License

Author : tomoaky

Desc page : https://github.com/munokura/tomoaky-MV-plugins

Download Page : https://raw.githubusercontent.com/munokura/tomoaky-MV-plugins/refs/heads/master/TMSameGame.js

File name : TMSameGame.js

Help of plugin :

@plugindesc We will add something that looks like Samegame.
@author tomoaky
@url https://github.com/munokura/tomoaky-MV-plugins
@license MIT

@help
English Help Translator: munokura
This is an unofficial English translation of the plugin help,
created to support global RPG Maker users.
Feedback is welcome to improve translation quality
(see: https://github.com/munokura/tomoaky-MV-plugins ).
Original plugin by tomoaky.
-----
Preparation:
Place the image file SamegameCursor.png in the img/system folder.
It is distributed together with this plugin on the distribution page.
https://github.com/munokura/tomoaky-MV-plugins/tree/master/img/system

Rules:
Click (tap) on an area where two or more icons of the same type are adjacent to each other to remove them.
The more icons you remove at once, the higher your score.

How to Use:
Start SameGame by entering [samegame]
in option 1 of the "Show Options" Event's Contents. (The brackets are half-width characters.)
In option 2, enter the following five numbers, separated by a space:
- Number of icons arranged horizontally
- Number of icons arranged vertically
- Width of each icon (number of dots)
- Height of each icon (number of dots)
- Type of icon
Example: 14 8 32 32 5
In this example, we start with five types of 32x32 dot icons, arranged randomly, 14 horizontally and 8 vertically, for a total of 112 icons.

When there are no more icons to clear, the game ends and option 1 is executed.

You can set a time limit in option 3 using half-width numbers. After the number of seconds you entered has elapsed, SameGame will be forced to close and option 3 will be executed.

Plugin Commands:
samegameScore 4 # Assign score to variable 4
samegameTime 5 # Assign required time to variable 5
samegameAllIcons 7 # Assign total remaining icons to variable 7
samegameIcons 0 8 # Assign remaining icons by type to variable 8
The first number specifies the icon type.
If there are 5 icon types, use 0 to 4.
samegameAllIconsS 9 # Assign total initial icons to variable 9
samegameIconsS 0 11 # Assign initial initial icons by type to variable 11.

The results obtained from these commands will be those of the most recently executed SameGame. If you save and load between the execution of SameGame and the execution of the plugin command, you will not be able to obtain the results.

The value obtained from the samegameTime command is in milliseconds.
To convert it to seconds, use the "Variable Operation" Event's Contents and divide the value by 1000.

Notes:
If you launch SameGame immediately after issuing the "Show Text" command,
the message window will not close and SameGame will launch without closing.
If you want to launch SameGame after closing the message window,
add a "Wait" of at least one frame between "Show Text" and "Show Choices."

Also, the vertical position of the SameGame window is affected by the vertical position of the message window, so you can change the vertical position of the SameGame window by using a message window with a transparent background and empty content.

Special Uses:
By using a plugin command with a parallel event while SameGame is running,
you can obtain the current score and time required.
This allows for a variety of tweaks, such as notifying players with pictures or sound effects when time is running low.

@param samegameCommand
@desc SameGame launch string used for the "Show options" command. Default: [samegame]
@default [samegame]

@param samegameIcons
@desc Icon numbers to be used in the game (separated by spaces) Default: 97 128 176 265 301
@default 97 128 176 265 301

@param timeupSe
@desc Sound effect played when time runs out (file name, volume, pitch, pan) Default: Explosion2 90 100 0
@default Explosion2 90 100 0

@param clearSe
@desc Sound effect played when the game ends (file name, volume, pitch, pan) Default: Applause1 90 100 0
@default Applause1 90 100 0

スポンサードリンク

-MV plugins

Copyright© PGMV - The Community-Driven Plugin Library for RPG Maker MV , 2026 All Rights Reserved.