Game Cheats for your project!

Introduction:
There are numerous games made with RPG Maker MV / VX / VX Ace / older versions, but I haven't seen any to have implemented cheats codes, so I spent my free morning and I wrote for you small plugin for RPG Maker MV wich allows to use cheats in game.​
​
How this plugin works:
After adding my cheat plugin to plugin manager simply test run your game and press ~ key on keyboard and enter one of following cheats:​
​
GodMode - Your party members will be invincible, but you need to setup in database state that will make them invincible, how you do it it's up to you!​
​
ItsRainingCash - Your team gains 99999999 gold.​
IFearNoEvil - Instantly revives all fallen party members with full HP and MP​
SmokeWeed - Recovers to Full HP​
DrinkBooze - Recovers to Full MP​
KaneWasHere - Recovers to Full TP​
IWantItAll - Restores to Full all states for all party members​
AlphaOmega - while you are in battle you automaticly win and still get rewards.​
​
​
Of course you can set in plugin manager your own cheats!​

​
Terms of use:
This plugin is completly FREE to use in commercial and non-commercial games, you can also edit this plugin for your needs, however I only what I ask is to NOT repost it elsewhere and credit me in your game.​
​
Screenshots:
Plugin Parameters
Entering cheat for immortality
Log from console about activating cheat

​
Plugin download:
Pastebin.com

Spoiler
JavaScript:
var SOL = SOL || {};
/*:
* @plugindesc v1.00 Allows you to use cheats in game
* @author Soulrender
*
* @help You can use cheats in your game, cool huh?
* How to use this plugin? Simple just install it and in game press
* ~ key on keyboard (it's located under ESC key) and enter one of
* following cheats:
*
* GodMode - makes entire party invincible, however you need to
* setup your state in database that will make actors invincible
*
* ItsRainingCash - Gives X gold to the party, wich can be set in
* plugin parameters, by default this cheat gives 99999999 gold
*
* IFearNoEvil - Revives all dead party members
* SmokeWeed - Restore HP to full for all party members
* DrinkBooze - Restore MP to full for all party members
* KaneWasHere - Restore TP to full for all party members
* IWantItAll - Restore All params for all.
* AlphaOmega - Automaticly Win battle.
*
* @param --- God Mode ---
* @default
*
* @param God Mode Cheat
* @parent --- God Mode ---
* @default GodMode
* @param God Mode State
* @parent --- God Mode ---
* @type number
* @default 3
*
* @param --- Gold Mode ---
* @default
*
* @param Gold Cheat
* @parent --- Gold Mode ---
* @default ItsRainingCash
* @param Gold amount
* @parent --- Gold Mode ---
* @type number
* @default 99999999
*
* @param --- Revival Mode ---
* @default
*
* @param Revival Cheat
* @parent --- Revival Mode ---
* @default IFearNoEvil
*
* @param HP Restore Cheat
* @parent --- Revival Mode ---
* @default SmokeWeed
*
* @param MP Restore Cheat
* @parent --- Revival Mode ---
* @default DrinkBooze
*
* @param TP Restore Cheat
* @parent --- Revival Mode ---
* @default KaneWasHere
*
* @param Restore All Cheat
* @parent --- Revival Mode ---
* @default IWantItAll
*
* @param --- Victory ---
* @default
*
* @param Win Battle Cheat
* @parent --- Victory ---
* @default AlphaOmega
*
*
*/

SOL.Parameters = PluginManager.parameters('SOL_Cheats');
SOL.Cheat = SOL.Cheat || {};
SOL.Cheat.godMode = SOL.Parameters["God Mode Cheat"];
SOL.Cheat.godState = Number(SOL.Parameters["God Mode State"]);
SOL.Cheat.goldCheat = SOL.Parameters["Gold Cheat"];
SOL.Cheat.goldCheatCash = Number(SOL.Parameters["Gold amount"]);
SOL.Cheat.reviveCheat = SOL.Parameters["Revival Cheat"];
SOL.Cheat.HP_Cheat = SOL.Parameters["HP Restore Cheat"];
SOL.Cheat.MP_Cheat = SOL.Parameters["MP Restore Cheat"];
SOL.Cheat.TP_Cheat = SOL.Parameters["TP Restore Cheat"];
SOL.Cheat.restoreAllCheat = SOL.Parameters["Restore All Cheat"];
SOL.Cheat.winBattleCheat = SOL.Parameters["Win Battle Cheat"];

var $cheat = null;

Cheat.prototype = Object.create(Cheat.prototype);
Cheat.prototype.constructor = Cheat;

function Cheat(){
    this.initialize.apply(this, arguments);
}

Cheat.prototype.initialize = function() {
    return this;
};

Cheat.prototype.applyGodMode = function(state){
    $gameParty.members().forEach(function(member){
        if (member.isAlive()){
            member.recoverAll();
            member.addState(state);
            console.log(member.name() + " is now immortal and cannot be killed!");
        }
    });
}

Cheat.prototype.applyGoldCheat = function(cash){
    if ($gameParty._gold > 0){
    $gameParty.gainGold(-$gameParty._gold);}
    $gameParty.gainGold(Number(cash));
    console.log(cash + " was set to party account");
}

Cheat.prototype.reviveParty = function(){
    $gameParty.members().forEach(function(member){
        if (member.isDead()){
            member.removeState(1);
            member.recoverAll();
            console.log(member.name() + " was revived!");        
        }
    });
}

Cheat.prototype.recoverHp = function(){
    $gameParty.members().forEach(function(member){
        if (member.isAlive()){
            member.gainHp(member.mhp);
            console.log(member.name() + " is now at full HP");
        }

    });
}

Cheat.prototype.recoverMp = function(){
    $gameParty.members().forEach(function(member){
        if (member.isAlive()){
            member.gainHp(member.mmp);
            console.log(member.name() + " is now at full MP");
        }

    });
}

Cheat.prototype.recoverTp = function(){
    $gameParty.members().forEach(function(member){
        if (member.isAlive()){
            member.gainTp(99999);
            console.log(member.name() + " is now at full TP");
        }
    });
}

Cheat.prototype.recoverAll = function(){
    $gameParty.members().forEach(function(member){
        if (member.isAlive){
            member.recoverAll();
            member.clearStates();
            console.log(member.name() + " is fully recovered");
        }    
    });
}

Cheat.prototype.winBattle = function(){
    if (SceneManager._scene instanceof Scene_Battle){
        $gameTroop.members().forEach(function(enemy){
            if (!enemy.isStateAffected(1)){
                enemy.addState(1);
                if (enemy.isDead()){
                    enemy.performCollapse();
                }
            }    
        });
        BattleManager.processVictory();
        console.log("You won a battle!");
    }
}

Graphics._onKeyDown = function(event) {
    if (event.keyCode === 192){
        if (SceneManager._scene instanceof Scene_Battle || SceneManager._scene instanceof Scene_Map){
            var cheat = prompt("Please Enter your cheat", "Cheat");
            if (cheat === null){
                window.focus();
                return;
            } else {
                switch (cheat){
                    case SOL.Cheat.godMode :
                    {
                        $cheat.applyGodMode(SOL.Cheat.godState);
                        break;
                    }
                    case SOL.Cheat.goldCheat :
                    {
                        $cheat.applyGoldCheat(SOL.Cheat.goldCheatCash);
                        break;
                    }
                    case SOL.Cheat.reviveCheat :
                    {
                        $cheat.reviveParty();
                        break;
                    }
                    case SOL.Cheat.HP_Cheat :
                    {
                        $cheat.recoverHp();
                        break;
                    }
                    case SOL.Cheat.MP_Cheat :
                    {
                        $cheat.recoverMp();
                        break;
                    }                
                    case SOL.Cheat.TP_Cheat :
                    {
                        $cheat.recoverTp();
                        break;
                    }
                    case SOL.Cheat.restoreAllCheat :
                    {
                        $cheat.recoverAll();
                        break;
                    }                
                    case SOL.Cheat.winBattleCheat :
                    {
                        $cheat.winBattle();
                        break;
                    }
                    default:
                    {
                        alert("Unrecognized Cheat, sorry.");
                    }                
                }
                window.focus();
            }
        }
        else
        {
            alert("You cannot use cheats here!");
        }
    }
}
$cheat = new Cheat();

If you have other ideas what type of cheats I could implement then let me know below this post.​
Your font is too black, it's very hard to read for those of us who use the dark theme on this forums.
I corrected it, but on light theme difference is barely seen
@Soulrender, the purple is too dark maybe try green or orange. I think that would cut in middle between light and dark themes.
Amazing! Yanfly posted a bunch of videos on YT that showed how to do this with his options plugin.

Having a plugin to take care of it by itself is amazing!
you can also create an NPC or ifferent way using events, and codes in a
conditional branch, I check this out how it works out 🙂
@ShadowDragon that would require to place that npc on each map, This plugin was designed as classic game cheats input. Its not that great as yanflys plugins or other top scripters but it works, please note that there is do far one cheat that will work in battle and I dont See how it would like to place a npc in battle without additional plugin. I designed it to be as simple as possible and useful in most used scenes, like scene_map and scene_battle, using it on other scenes would require to reload scene
@Soulrender some cheats can be at the very start before game starts,
but if you make a NPC in town or towns, I dont see the issue by than.
but I dont use cheats, but you can make it available after you beat the game
for example.
@Soulrender some cheats can be at the very start before game starts,
but if you make a NPC in town or towns, I dont see the issue by than.
but I dont use cheats, but you can make it available after you beat the game
for example.

This is exactly what I was hoping for.
Thanks, friend. I've been looking for something like this for a long time.
Thank you very much for providing the codes. They were handy to me, and I enjoyed using them.
Creating cheat codes for RPG Maker MV can add a whole new layer of fun and customization to games. Your plugin sounds like a handy tool for fellow game developers. It's great to see the variety of cheats you've included, from GodMode to boosting gold and more.

Speaking of game development tools, have you ever explored resources like the Unreal Engine Dumper? It's a useful tool for Unreal Engine game developers, allowing for more advanced tinkering with games. If you're ever looking to expand your knowledge or explore new horizons in game development, it could be an interesting avenue to check out.
Why not add a customizable cheat code that calls a common event? This way, anyone can make their own cheats.
@ave36 I did that in my cheatEngine, but unlike this one, it require JS.
but while mine works differently, you can create battle cheats and map cheats.

so if you don't know javascript, you can event it out in a common event to tell
what happens as it will be easier for most users.

only mine is a bit more advanced, but can be very userfriendly.

this one is also nice, but to extend it, it require javascript, or return
to a common event constantly, but while the prompt = window based or browser
based you use, mine can be customised if you know CSS for its styling, but it
require JS to set things up differently.
I have modified the plugin and added some extra cheats. There are also sound effects now for correct and incorrect cheats.

The "All Magic" cheat, like the God Mode, requires setting up a state. In the traits of the state, you should add all the spells in your game using the trait Add Skill.

The three Custom Cheats call common events.

Code:
var SOL = SOL || {};
/*:
 * @plugindesc v1.00 Allows you to use cheats in game
 * @author Soulrender
 *
 * @help You can use cheats in your game, cool huh?
 * How to use this plugin? Simple just install it and in game press
 * ~ key on keyboard (it's located under ESC key) and enter one of
 * following cheats:
 *
 * GodMode - makes entire party invincible, however you need to
 * setup your state in database that will make actors invincible
 *
 * ItsRainingCash - Gives X gold to the party, wich can be set in
 * plugin parameters, by default this cheat gives 99999999 gold
 *
 * IFearNoEvil - Revives all dead party members
 * SmokeWeed - Restore HP to full for all party members
 * DrinkBooze - Restore MP to full for all party members
 * KaneWasHere - Restore TP to full for all party members
 * IWantItAll - Restore All params for all.
 * AlphaOmega - Automaticly Win battle.
 *
 * @param --- God Mode ---
 * @default
 *
 * @param God Mode Cheat
 * @parent --- God Mode ---
 * @default GodMode
 * @param All Magic Cheat
 * @parent --- God Mode ---
 * @default AllMagic
 * @param God Mode State
 * @parent --- God Mode ---
 * @type number
 * @default 3
 * @param All Magic State
 * @parent --- God Mode ---
 * @type number
 * @default 3
 *
 * @param --- Gold Mode ---
 * @default
 *
 * @param Gold Cheat
 * @parent --- Gold Mode ---
 * @default ItsRainingCash
 * @param Gold amount
 * @parent --- Gold Mode ---
 * @type number
 * @default 99999999
 *
 * @param --- Revival Mode ---
 * @default
 *
 * @param Revival Cheat
 * @parent --- Revival Mode ---
 * @default IFearNoEvil
 *
 * @param HP Restore Cheat
 * @parent --- Revival Mode ---
 * @default SmokeWeed
 *
 * @param MP Restore Cheat
 * @parent --- Revival Mode ---
 * @default DrinkBooze
 *
 * @param TP Restore Cheat
 * @parent --- Revival Mode ---
 * @default KaneWasHere
 *
 * @param Restore All Cheat
 * @parent --- Revival Mode ---
 * @default IWantItAll
 *
 * @param --- Victory ---
 * @default
 *
 * @param Win Battle Cheat
 * @parent --- Victory ---
 * @default AlphaOmega
 *
 * @param --- Custom Cheats ---
 * @default
 *
 * @param Custom Cheat 1
 * @parent --- Custom Cheats ---
 * @default Custom001
 * @param Custom 1 Event
 * @parent --- Custom Cheats ---
 * @type number
 * @default 3
 *
 * @param Custom Cheat 2
 * @parent --- Custom Cheats ---
 * @default Custom002
 * @param Custom 2 Event
 * @parent --- Custom Cheats ---
 * @type number
 * @default 3
 *
 * @param Custom Cheat 3
 * @parent --- Custom Cheats ---
 * @default Custom003
 * @param Custom 3 Event
 * @parent --- Custom Cheats ---
 * @type number
 * @default 3
 */

SOL.Parameters = PluginManager.parameters('SOL_Cheats');
SOL.Cheat = SOL.Cheat || {};
SOL.Cheat.godMode = SOL.Parameters["God Mode Cheat"];
SOL.Cheat.godState = Number(SOL.Parameters["God Mode State"]);
SOL.Cheat.allMode = SOL.Parameters["All Magic Cheat"];
SOL.Cheat.allState = Number(SOL.Parameters["All Magic State"]);
SOL.Cheat.goldCheat = SOL.Parameters["Gold Cheat"];
SOL.Cheat.goldCheatCash = Number(SOL.Parameters["Gold amount"]);
SOL.Cheat.reviveCheat = SOL.Parameters["Revival Cheat"];
SOL.Cheat.HP_Cheat = SOL.Parameters["HP Restore Cheat"];
SOL.Cheat.MP_Cheat = SOL.Parameters["MP Restore Cheat"];
SOL.Cheat.TP_Cheat = SOL.Parameters["TP Restore Cheat"];
SOL.Cheat.restoreAllCheat = SOL.Parameters["Restore All Cheat"];
SOL.Cheat.winBattleCheat = SOL.Parameters["Win Battle Cheat"];
SOL.Cheat.customCheat1 = SOL.Parameters["Custom Cheat 1"];
SOL.Cheat.customCheat1event = Number(SOL.Parameters["Custom 1 Event"]);
SOL.Cheat.customCheat2 = SOL.Parameters["Custom Cheat 2"];
SOL.Cheat.customCheat2event = Number(SOL.Parameters["Custom 2 Event"]);
SOL.Cheat.customCheat3 = SOL.Parameters["Custom Cheat 3"];
SOL.Cheat.customCheat3event = Number(SOL.Parameters["Custom 3 Event"]);

var $cheat = null;

Cheat.prototype = Object.create(Cheat.prototype);
Cheat.prototype.constructor = Cheat;

function Cheat(){
    this.initialize.apply(this, arguments);
}

Cheat.prototype.initialize = function() {
    return this;
};

Cheat.prototype.applyGodMode = function(state){
    $gameParty.members().forEach(function(member){
        if (member.isDead){
            member.removeState(1);
            member.recoverAll();
            member.addState(state);
            console.log(member.name() + " is now immortal and cannot be killed!");
        }
    });
}

Cheat.prototype.applyAllMode = function(state){
    $gameParty.members().forEach(function(member){
            member.addState(state);
            console.log(member.name() + " has now all magic!");
    });
}

Cheat.prototype.applyGoldCheat = function(cash){
    if ($gameParty._gold > 0){
    $gameParty.gainGold(-$gameParty._gold);}
    $gameParty.gainGold(Number(cash));
    console.log(cash + " was set to party account");
}

Cheat.prototype.reviveParty = function(){
    $gameParty.members().forEach(function(member){
        if (member.isDead()){
            member.removeState(1);
            member.recoverAll();
            console.log(member.name() + " was revived!");        
        }
    });
}

Cheat.prototype.recoverHp = function(){
    $gameParty.members().forEach(function(member){
        if (member.isAlive()){
            member.gainHp(member.mhp);
            console.log(member.name() + " is now at full HP");
        }

    });
}

Cheat.prototype.recoverMp = function(){
    $gameParty.members().forEach(function(member){
        if (member.isAlive()){
            member.gainHp(member.mmp);
            console.log(member.name() + " is now at full MP");
        }

    });
}

Cheat.prototype.recoverTp = function(){
    $gameParty.members().forEach(function(member){
        if (member.isAlive()){
            member.gainTp(99999);
            console.log(member.name() + " is now at full TP");
        }
    });
}

Cheat.prototype.recoverAll = function(){
    $gameParty.members().forEach(function(member){
        if (member.isAlive){
            member.recoverAll();
            member.clearStates();
            console.log(member.name() + " is fully recovered");
        }    
    });
}

Cheat.prototype.winBattle = function(){
    if (SceneManager._scene instanceof Scene_Battle){
        $gameTroop.members().forEach(function(enemy){
            if (!enemy.isStateAffected(1)){
                enemy.addState(1);
                if (enemy.isDead()){
                    enemy.performCollapse();
                }
            }    
        });
        BattleManager.processVictory();
        console.log("You won a battle!");
    }
}

Graphics._onKeyDown = function(event) {
    if (event.keyCode === 192){
        if (SceneManager._scene instanceof Scene_Battle || SceneManager._scene instanceof Scene_Map){
            var cheat = prompt("Enter cheat code:", "Cheat");
            if (cheat === null){
                window.focus();
                return;
            } else {
                switch (cheat){
                    case SOL.Cheat.godMode :
                    {
                        $cheat.applyGodMode(SOL.Cheat.godState);
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }
                    case SOL.Cheat.allMode :
                    {
                        $cheat.applyAllMode(SOL.Cheat.allState);
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }
                    case SOL.Cheat.goldCheat :
                    {
                        $cheat.applyGoldCheat(SOL.Cheat.goldCheatCash);
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }
                    case SOL.Cheat.reviveCheat :
                    {
                        $cheat.reviveParty();
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }
                    case SOL.Cheat.HP_Cheat :
                    {
                        $cheat.recoverHp();
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }
                    case SOL.Cheat.MP_Cheat :
                    {
                        $cheat.recoverMp();
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }                
                    case SOL.Cheat.TP_Cheat :
                    {
                        $cheat.recoverTp();
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }
                    case SOL.Cheat.restoreAllCheat :
                    {
                        $cheat.recoverAll();
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }                
                    case SOL.Cheat.winBattleCheat :
                    {
                        $cheat.winBattle();
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }
                    case SOL.Cheat.customCheat1 :
                    {
                        $gameTemp.reserveCommonEvent(SOL.Cheat.customCheat1event);
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }
                    case SOL.Cheat.customCheat2 :
                    {
                        $gameTemp.reserveCommonEvent(SOL.Cheat.customCheat2event);
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }
                    case SOL.Cheat.customCheat3 :
                    {
                        $gameTemp.reserveCommonEvent(SOL.Cheat.customCheat3event);
                        AudioManager.playSe({name: 'Sound1', pan: 0, pitch: 100, volume: 100});
                        break;
                    }
                    default:
                    {
                        AudioManager.playSe({name: 'Buzzer1', pan: 0, pitch: 100, volume: 100});
                    }                
                }
                window.focus();
            }
        }
        else
        {
            alert("You cannot use cheats here!");
        }
    }
}
$cheat = new Cheat();

Here is an example of what my config looks like.

1703532517581.png


Custom Cheat 1 calls a shop anywhere with all the items and stuff. Custom Cheat 2 teleports you to the developer's test room. Custom Cheat 3 adds all triple triad cards.

Original thread: https://forums.rpgmakerweb.com/threads/game-cheats-for-your-project.125002/