设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 70|回复: 0

[转载发布] Game Cheats for your project!

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    7959

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    29925
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    38778

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    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:       
    1. var SOL = SOL || {};
    2. /*:
    3. * @plugindesc v1.00 Allows you to use cheats in game
    4. * @author Soulrender
    5. *
    6. * @help You can use cheats in your game, cool huh?
    7. * How to use this plugin? Simple just install it and in game press
    8. * ~ key on keyboard (it's located under ESC key) and enter one of
    9. * following cheats:
    10. *
    11. * GodMode - makes entire party invincible, however you need to
    12. * setup your state in database that will make actors invincible
    13. *
    14. * ItsRainingCash - Gives X gold to the party, wich can be set in
    15. * plugin parameters, by default this cheat gives 99999999 gold
    16. *
    17. * IFearNoEvil - Revives all dead party members
    18. * SmokeWeed - Restore HP to full for all party members
    19. * DrinkBooze - Restore MP to full for all party members
    20. * KaneWasHere - Restore TP to full for all party members
    21. * IWantItAll - Restore All params for all.
    22. * AlphaOmega - Automaticly Win battle.
    23. *
    24. * @param --- God Mode ---
    25. * @default
    26. *
    27. * @param God Mode Cheat
    28. * @parent --- God Mode ---
    29. * @default GodMode
    30. * @param God Mode State
    31. * @parent --- God Mode ---
    32. * @type number
    33. * @default 3
    34. *
    35. * @param --- Gold Mode ---
    36. * @default
    37. *
    38. * @param Gold Cheat
    39. * @parent --- Gold Mode ---
    40. * @default ItsRainingCash
    41. * @param Gold amount
    42. * @parent --- Gold Mode ---
    43. * @type number
    44. * @default 99999999
    45. *
    46. * @param --- Revival Mode ---
    47. * @default
    48. *
    49. * @param Revival Cheat
    50. * @parent --- Revival Mode ---
    51. * @default IFearNoEvil
    52. *
    53. * @param HP Restore Cheat
    54. * @parent --- Revival Mode ---
    55. * @default SmokeWeed
    56. *
    57. * @param MP Restore Cheat
    58. * @parent --- Revival Mode ---
    59. * @default DrinkBooze
    60. *
    61. * @param TP Restore Cheat
    62. * @parent --- Revival Mode ---
    63. * @default KaneWasHere
    64. *
    65. * @param Restore All Cheat
    66. * @parent --- Revival Mode ---
    67. * @default IWantItAll
    68. *
    69. * @param --- Victory ---
    70. * @default
    71. *
    72. * @param Win Battle Cheat
    73. * @parent --- Victory ---
    74. * @default AlphaOmega
    75. *
    76. *
    77. */
    78. SOL.Parameters = PluginManager.parameters('SOL_Cheats');
    79. SOL.Cheat = SOL.Cheat || {};
    80. SOL.Cheat.godMode = SOL.Parameters["God Mode Cheat"];
    81. SOL.Cheat.godState = Number(SOL.Parameters["God Mode State"]);
    82. SOL.Cheat.goldCheat = SOL.Parameters["Gold Cheat"];
    83. SOL.Cheat.goldCheatCash = Number(SOL.Parameters["Gold amount"]);
    84. SOL.Cheat.reviveCheat = SOL.Parameters["Revival Cheat"];
    85. SOL.Cheat.HP_Cheat = SOL.Parameters["HP Restore Cheat"];
    86. SOL.Cheat.MP_Cheat = SOL.Parameters["MP Restore Cheat"];
    87. SOL.Cheat.TP_Cheat = SOL.Parameters["TP Restore Cheat"];
    88. SOL.Cheat.restoreAllCheat = SOL.Parameters["Restore All Cheat"];
    89. SOL.Cheat.winBattleCheat = SOL.Parameters["Win Battle Cheat"];
    90. var $cheat = null;
    91. Cheat.prototype = Object.create(Cheat.prototype);
    92. Cheat.prototype.constructor = Cheat;
    93. function Cheat(){
    94.     this.initialize.apply(this, arguments);
    95. }
    96. Cheat.prototype.initialize = function() {
    97.     return this;
    98. };
    99. Cheat.prototype.applyGodMode = function(state){
    100.     $gameParty.members().forEach(function(member){
    101.         if (member.isAlive()){
    102.             member.recoverAll();
    103.             member.addState(state);
    104.             console.log(member.name() + " is now immortal and cannot be killed!");
    105.         }
    106.     });
    107. }
    108. Cheat.prototype.applyGoldCheat = function(cash){
    109.     if ($gameParty._gold > 0){
    110.     $gameParty.gainGold(-$gameParty._gold);}
    111.     $gameParty.gainGold(Number(cash));
    112.     console.log(cash + " was set to party account");
    113. }
    114. Cheat.prototype.reviveParty = function(){
    115.     $gameParty.members().forEach(function(member){
    116.         if (member.isDead()){
    117.             member.removeState(1);
    118.             member.recoverAll();
    119.             console.log(member.name() + " was revived!");        
    120.         }
    121.     });
    122. }
    123. Cheat.prototype.recoverHp = function(){
    124.     $gameParty.members().forEach(function(member){
    125.         if (member.isAlive()){
    126.             member.gainHp(member.mhp);
    127.             console.log(member.name() + " is now at full HP");
    128.         }
    129.     });
    130. }
    131. Cheat.prototype.recoverMp = function(){
    132.     $gameParty.members().forEach(function(member){
    133.         if (member.isAlive()){
    134.             member.gainHp(member.mmp);
    135.             console.log(member.name() + " is now at full MP");
    136.         }
    137.     });
    138. }
    139. Cheat.prototype.recoverTp = function(){
    140.     $gameParty.members().forEach(function(member){
    141.         if (member.isAlive()){
    142.             member.gainTp(99999);
    143.             console.log(member.name() + " is now at full TP");
    144.         }
    145.     });
    146. }
    147. Cheat.prototype.recoverAll = function(){
    148.     $gameParty.members().forEach(function(member){
    149.         if (member.isAlive){
    150.             member.recoverAll();
    151.             member.clearStates();
    152.             console.log(member.name() + " is fully recovered");
    153.         }   
    154.     });
    155. }
    156. Cheat.prototype.winBattle = function(){
    157.     if (SceneManager._scene instanceof Scene_Battle){
    158.         $gameTroop.members().forEach(function(enemy){
    159.             if (!enemy.isStateAffected(1)){
    160.                 enemy.addState(1);
    161.                 if (enemy.isDead()){
    162.                     enemy.performCollapse();
    163.                 }
    164.             }   
    165.         });
    166.         BattleManager.processVictory();
    167.         console.log("You won a battle!");
    168.     }
    169. }
    170. Graphics._onKeyDown = function(event) {
    171.     if (event.keyCode === 192){
    172.         if (SceneManager._scene instanceof Scene_Battle || SceneManager._scene instanceof Scene_Map){
    173.             var cheat = prompt("Please Enter your cheat", "Cheat");
    174.             if (cheat === null){
    175.                 window.focus();
    176.                 return;
    177.             } else {
    178.                 switch (cheat){
    179.                     case SOL.Cheat.godMode :
    180.                     {
    181.                         $cheat.applyGodMode(SOL.Cheat.godState);
    182.                         break;
    183.                     }
    184.                     case SOL.Cheat.goldCheat :
    185.                     {
    186.                         $cheat.applyGoldCheat(SOL.Cheat.goldCheatCash);
    187.                         break;
    188.                     }
    189.                     case SOL.Cheat.reviveCheat :
    190.                     {
    191.                         $cheat.reviveParty();
    192.                         break;
    193.                     }
    194.                     case SOL.Cheat.HP_Cheat :
    195.                     {
    196.                         $cheat.recoverHp();
    197.                         break;
    198.                     }
    199.                     case SOL.Cheat.MP_Cheat :
    200.                     {
    201.                         $cheat.recoverMp();
    202.                         break;
    203.                     }               
    204.                     case SOL.Cheat.TP_Cheat :
    205.                     {
    206.                         $cheat.recoverTp();
    207.                         break;
    208.                     }
    209.                     case SOL.Cheat.restoreAllCheat :
    210.                     {
    211.                         $cheat.recoverAll();
    212.                         break;
    213.                     }               
    214.                     case SOL.Cheat.winBattleCheat :
    215.                     {
    216.                         $cheat.winBattle();
    217.                         break;
    218.                     }
    219.                     default:
    220.                     {
    221.                         alert("Unrecognized Cheat, sorry.");
    222.                     }               
    223.                 }
    224.                 window.focus();
    225.             }
    226.         }
    227.         else
    228.         {
    229.             alert("You cannot use cheats here!");
    230.         }
    231.     }
    232. }
    233. $cheat = new Cheat();
    复制代码






    If you have other ideas what type of cheats I could implement then let me know below this post.




    本贴来自国际rpgmaker官方论坛作者:Soulrender处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/game-cheats-for-your-project.125002/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 03:43 , Processed in 0.063321 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表