[
  {
    "path": ".gitignore",
    "content": "src/MVPluginPatcher/.vs\r\nsrc/MVPluginPatcher/Debug\r\nsrc/MVPluginPatcher/Release\r\nsrc/MVPluginPatcher/x64\r\nsrc/MVPluginPatcher/MVPluginPatcher/Debug\r\nsrc/MVPluginPatcher/MVPluginPatcher/Release\r\nsrc/MVPluginPatcher/MVPluginPatcher/x64\r\n*.sdf"
  },
  {
    "path": "Cheat_Menu/patchPlugins.sh",
    "content": "#!/bin/sh\n\n[ \"$(id -u)\" = 0 ] && echo \"Please run without root perms\" && exit\n\necho \"Searching for and patching RPGM Plugins.js\"\nPATTERN='/];/i ,{\"name\":\"Cheat_Menu\",\"status\":true,\"description\":\"\",\"parameters\":{}}'\nif [ -f \"www/js/plugins.js\" ]; then\n\tcp -v www/js/plugins.js www/js/plugins.js~ 2>/dev/null &&\n\t\tsed -i \"$PATTERN\" www/js/plugins.js\nelif [ -f \"js/plugins.js\" ]; then\n\tcp -v js/plugins.js js/plugins.js~ 2>/dev/null &&\n\t\tsed -i \"$PATTERN\" js/plugins.js\nelse\n    echo \"No RPGM installation found.\"\nfi"
  },
  {
    "path": "Cheat_Menu/plugins_patch.txt",
    "content": "{\"name\":\"Cheat_Menu\",\"status\":true,\"description\":\"\",\"parameters\":{}}"
  },
  {
    "path": "Cheat_Menu/www/js/plugins/Cheat_Menu.css",
    "content": "#cheat_menu{\r\n\tposition: absolute;\r\n\twidth: 280px;\r\n\theight: 100px;\r\n\tz-index: 1000;\r\n\tbackground-color: #000000;\r\n\tcolor: #ffffff;\r\n\topacity: 0.75;\r\n\ttext-align: center;\r\n\tpadding: 10px;\r\n}\r\n\r\n#cheat_menu_text{\r\n\tposition: absolute;\r\n\twidth: 300px;\r\n\tz-index: 1001;\r\n\tbackground-color: transparent;\r\n\tcolor: #ffffff;\r\n\topacity: 1;\r\n\ttext-align: center;\r\n\tpadding: 10px;\r\n\r\n\tborder-spacing: 0; \r\n}\r\n\r\n.scroll_selector_row {\r\n\twidth: 100%;\r\n\ttext-align: center;\r\n}\r\n\r\n.scroll_selector_buttons:hover {\r\n\tcolor: #ff0000;\r\n\ttext-shadow: 0 0 5px #ff0000;\r\n}\r\n\r\n.cheat_menu_buttons:hover {\r\n\tcolor: #ff0000;\r\n\ttext-shadow: 0 0 5px #ff0000;\r\n}\r\n\r\n.cheat_menu_cell {\r\n\tborder-bottom: 1px solid #6f6f6f;\r\n\tmax-width: 100px;\r\n\twidth: 100px;\r\n\r\n\tfont-weight: normal;\r\n\tfont-size: 15px;\r\n\tpadding-top: 5px;\r\n\tpadding-bottom: 5px;\r\n}\r\n\r\n.cheat_menu_cell_title {\r\n\tmax-width: 100px;\r\n\twidth: 100px;\r\n\tfont-weight: bold;\r\n\tfont-size: 20px;\r\n\tpadding-top: 8px;\r\n\tpadding-bottom: 5px;\r\n}"
  },
  {
    "path": "Cheat_Menu/www/js/plugins/Cheat_Menu.js",
    "content": "\r\n\r\n/////////////////////////////////////////////////\r\n// Cheat Menu Plugin Class\r\n/////////////////////////////////////////////////\r\n// Check if already defined (allows game specific extensions to be loaded in any order)\r\nif (typeof Cheat_Menu == \"undefined\") { Cheat_Menu = {}; }\r\n\r\nCheat_Menu.initialized = false;\r\nCheat_Menu.cheat_menu_open = false;\r\nCheat_Menu.overlay_openable = false;\r\nCheat_Menu.position = 1;\r\nCheat_Menu.menu_update_timer = null;\r\n\r\nCheat_Menu.cheat_selected = 0;\r\nCheat_Menu.cheat_selected_actor = 1;\r\nCheat_Menu.amounts = [1, 10, 100, 1000, 10000, 100000, 1000000];\r\nCheat_Menu.amount_index = 0;\r\nCheat_Menu.stat_selection = 0;\r\nCheat_Menu.item_selection = 1;\r\nCheat_Menu.weapon_selection = 1;\r\nCheat_Menu.armor_selection = 1;\r\nCheat_Menu.move_amounts = [0.5, 1, 1.5, 2];\r\nCheat_Menu.move_amount_index = 1;\r\n\r\nCheat_Menu.variable_selection = 1;\r\nCheat_Menu.switch_selection = 1;\r\n\r\nCheat_Menu.saved_positions = [{m: -1, x: -1, y: -1}, {m: -1, x: -1, y: -1}, {m: -1, x: -1, y: -1}];\r\n\r\nCheat_Menu.teleport_location = {m: 1, x: 0, y: 0};\r\n\r\nCheat_Menu.speed = null;\r\nCheat_Menu.speed_unlocked = true;\r\nCheat_Menu.speed_initialized = false;\r\n\r\n\r\n/////////////////////////////////////////////////\r\n// Initial values for reseting on new game/load\r\n/////////////////////////////////////////////////\r\n\r\n// Check if already defined (allows game specific extensions to be loaded in any order)\r\nif (typeof Cheat_Menu.initial_values == \"undefined\") { Cheat_Menu.initial_values = {}; }\r\n\r\n\r\n// All values below are the inital values for a new saved game\r\n//\tupon loading a saved game these values will be loaded from the\r\n//\tsave game if possible overwriting the below values\r\n//\tBecause of this all of these variables should be non recursive\r\nCheat_Menu.initial_values.position = 1;\r\nCheat_Menu.initial_values.cheat_selected = 0;\r\nCheat_Menu.initial_values.cheat_selected_actor = 1;\r\nCheat_Menu.initial_values.amount_index = 0;\r\nCheat_Menu.initial_values.stat_selection = 0;\r\nCheat_Menu.initial_values.item_selection = 1;\r\nCheat_Menu.initial_values.weapon_selection = 1;\r\nCheat_Menu.initial_values.armor_selection = 1;\r\nCheat_Menu.initial_values.move_amount_index = 1;\r\nCheat_Menu.initial_values.variable_selection = 1;\r\nCheat_Menu.initial_values.switch_selection = 1;\r\nCheat_Menu.initial_values.saved_positions = [{m: -1, x: -1, y: -1}, {m: -1, x: -1, y: -1}, {m: -1, x: -1, y: -1}];\r\nCheat_Menu.initial_values.teleport_location = {m: 1, x: 0, y: 0};\r\nCheat_Menu.initial_values.speed = null;\r\nCheat_Menu.initial_values.speed_unlocked = true;\r\n\r\n/////////////////////////////////////////////////\r\n// Cheat Functions\r\n/////////////////////////////////////////////////\r\n\r\n// enable god mode for an actor\r\nCheat_Menu.god_mode = function(actor) {\r\n\tif (actor instanceof Game_Actor && !(actor.god_mode)) {\r\n\t\tactor.god_mode = true;\r\n\r\n\t\tactor.gainHP_bkup = actor.gainHp;\r\n\t\tactor.gainHp = function(value) {\r\n\t\t\tvalue = this.mhp;\r\n\t\t\tthis.gainHP_bkup(value);\r\n\t\t};\r\n\r\n\t\tactor.setHp_bkup = actor.setHp;\r\n\t\tactor.setHp = function(hp) {\r\n\t\t\thp = this.mhp;\r\n\t\t\tthis.setHp_bkup(hp);\r\n\t\t};\r\n\r\n\t\tactor.gainMp_bkup = actor.gainMp;\r\n\t\tactor.gainMp = function (value) {\r\n\t\t\tvalue = this.mmp;\r\n\t\t\tthis.gainMp_bkup(value);\r\n\t\t};\r\n\r\n\t\tactor.setMp_bkup = actor.setMp;\r\n\t\tactor.setMp = function(mp) {\r\n\t\t\tmp = this.mmp;\r\n\t\t\tthis.setMp_bkup(mp);\r\n\t\t};\r\n\r\n\t\tactor.gainTp_bkup = actor.gainTp;\r\n\t\tactor.gainTp = function (value) {\r\n\t\t\tvalue = this.maxTp();\r\n\t\t\tthis.gainTp_bkup(value);\r\n\t\t};\r\n\r\n\t\tactor.setTp_bkup = actor.setTp;\r\n\t\tactor.setTp = function(tp) {\r\n\t\t\ttp = this.maxTp();\r\n\t\t\tthis.setTp_bkup(tp);\r\n\t\t};\r\n\r\n\t\tactor.paySkillCost_bkup = actor.paySkillCost;\r\n\t\tactor.paySkillCost = function (skill) {\r\n\t\t\t// do nothing\r\n\t\t};\r\n\r\n\t\tactor.god_mode_interval = setInterval(function() {\r\n\t\t\tactor.gainHp(actor.mhp);\r\n\t\t\tactor.gainMp(actor.mmp);\r\n\t\t\tactor.gainTp(actor.maxTp());\r\n\t\t}, 100);\r\n\t}\r\n};\r\n\r\n\r\n// disable god mode for an actor\r\nCheat_Menu.god_mode_off = function(actor) {\r\n\tif (actor instanceof Game_Actor && actor.god_mode) {\r\n\t\tactor.god_mode = false;\r\n\r\n\t\tactor.gainHp = actor.gainHP_bkup;\r\n\t\tactor.setHp = actor.setHp_bkup;\r\n\t\tactor.gainMp = actor.gainMp_bkup;\r\n\t\tactor.setMp = actor.setMp_bkup;\r\n\t\tactor.gainTp = actor.gainTp_bkup;\r\n\t\tactor.setTp = actor.setTp_bkup;\r\n\t\tactor.paySkillCost = actor.paySkillCost_bkup;\r\n\r\n\t\tclearInterval(actor.god_mode_interval);\r\n\t}\r\n};\r\n\r\n// set all party hp\r\nCheat_Menu.set_party_hp = function(hp, alive) {\r\n\tvar members = $gameParty.allMembers();\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tif ((alive && members[i]._hp != 0) || !alive) {\r\n\t\t\tmembers[i].setHp(hp);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// set all party mp\r\nCheat_Menu.set_party_mp = function(mp, alive) {\r\n\tvar members = $gameParty.allMembers();\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tif ((alive && members[i]._hp != 0) || !alive) {\r\n\t\t\tmembers[i].setMp(mp);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// set all party tp\r\nCheat_Menu.set_party_tp = function(tp, alive) {\r\n\tvar members = $gameParty.allMembers();\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tif ((alive && members[i]._hp != 0) || !alive) {\r\n\t\t\tmembers[i].setTp(tp);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// party full recover hp\r\nCheat_Menu.recover_party_hp = function(alive) {\r\n\tvar members = $gameParty.allMembers();\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tif ((alive && members[i]._hp != 0) || !alive) {\r\n\t\t\tmembers[i].setHp(members[i].mhp);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// party full recover mp\r\nCheat_Menu.recover_party_mp = function(alive) {\r\n\tvar members = $gameParty.allMembers();\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tif ((alive && members[i]._hp != 0) || !alive) {\r\n\t\t\tmembers[i].setMp(members[i].mmp);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// party max tp\r\nCheat_Menu.recover_party_tp = function(alive) {\r\n\tvar members = $gameParty.allMembers();\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tif ((alive && members[i]._hp != 0) || !alive) {\r\n\t\t\tmembers[i].setTp(members[i].maxTp());\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// set all enemies hp\r\nCheat_Menu.set_enemy_hp = function(hp, alive) {\r\n\tvar members = $gameTroop.members();\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tif (members[i]) {\r\n\t\t\tif ((alive && members[i]._hp != 0) || !alive) {\r\n\t\t\t\tmembers[i].setHp(hp);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// increase exp\r\nCheat_Menu.give_exp = function(actor, amount) {\r\n\tif (actor instanceof Game_Actor) {\r\n\t\tactor.gainExp(amount);\r\n\t}\r\n};\r\n\r\n// increase stat bonus\r\nCheat_Menu.give_stat = function(actor, stat_index, amount) {\r\n\tif (actor instanceof Game_Actor) {\r\n\t\tif (actor._paramPlus[stat_index] != undefined) {\r\n\t\t\tactor.addParam(stat_index, amount);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// increase gold\r\nCheat_Menu.give_gold = function(amount) {\r\n\t$gameParty.gainGold(amount);\r\n};\r\n\r\n// increase item count for party of item, by id\r\nCheat_Menu.give_item = function(item_id, amount) {\r\n\tif ($dataItems[item_id] != undefined) {\r\n\t\t$gameParty.gainItem($dataItems[item_id], amount);\r\n\t}\r\n};\r\n\r\n// increase weapon count for party of item, by id\r\nCheat_Menu.give_weapon = function(weapon_id, amount) {\r\n\tif ($dataWeapons[weapon_id] != undefined) {\r\n\t\t$gameParty.gainItem($dataWeapons[weapon_id], amount);\r\n\t}\r\n};\r\n\r\n// increase armor count for party of item, by id\r\nCheat_Menu.give_armor = function(armor_id, amount) {\r\n\tif ($dataArmors[armor_id] != undefined) {\r\n\t\t$gameParty.gainItem($dataArmors[armor_id], amount);\r\n\t}\r\n};\r\n\r\n// initialize speed hook for locking\r\nCheat_Menu.initialize_speed_lock = function() {\r\n\tif (!Cheat_Menu.speed_initialized) {\r\n\t\tCheat_Menu.speed = $gamePlayer._moveSpeed;\r\n\t\tObject.defineProperty($gamePlayer, \"_moveSpeed\", {\r\n\t\t\tget: function() {return Cheat_Menu.speed;},\r\n\t\t\tset: function(newVal) {if(Cheat_Menu.speed_unlocked) {Cheat_Menu.speed = newVal;}}\r\n\t\t});\r\n\t\tCheat_Menu.speed_initialized = true;\r\n\t}\r\n};\r\n\r\n// change player movement speed\r\nCheat_Menu.change_player_speed = function(amount) {\r\n\tCheat_Menu.initialize_speed_lock();\r\n\tCheat_Menu.speed += amount;\r\n};\r\n\r\n// toggle locking of player speed\r\nCheat_Menu.toggle_lock_player_speed = function(amount) {\r\n\tCheat_Menu.initialize_speed_lock();\r\n\tCheat_Menu.speed_unlocked = !Cheat_Menu.speed_unlocked;\r\n};\r\n\r\n\r\n// clear active states on an actor\r\nCheat_Menu.clear_actor_states = function(actor) {\r\n\tif (actor instanceof Game_Actor) {\r\n\t\tif (actor._states != undefined && actor._states.length > 0) {\r\n\t\t\tactor.clearStates();\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// clear active states on party\r\nCheat_Menu.clear_party_states = function() {\r\n\tvar members = $gameParty.allMembers();\r\n\tfor (var i = 0; i < members.length; i++) {\r\n\t\tCheat_Menu.clear_actor_states(members[i]);\r\n\t}\r\n};\r\n\r\n// change game variable value, by id\r\nCheat_Menu.set_variable = function(variable_id, value) {\r\n\tif ($dataSystem.variables[variable_id] != undefined) {\r\n\t\tvar new_value = $gameVariables.value(variable_id) + value;\r\n\t\t$gameVariables.setValue(variable_id, new_value);\r\n\t}\r\n};\r\n\r\n// toggle game switch value, by id\r\nCheat_Menu.toggle_switch = function(switch_id) {\r\n\tif ($dataSystem.switches[switch_id] != undefined) {\r\n\t\t$gameSwitches.setValue(switch_id, !$gameSwitches.value(switch_id));\r\n\t}\r\n};\r\n\r\n// Change location by map id, and x, y position\r\nCheat_Menu.teleport = function(map_id, x_pos, y_pos) {\r\n\t$gamePlayer.reserveTransfer(map_id, x_pos, y_pos, $gamePlayer.direction(), 0);\r\n\t$gamePlayer.setPosition(x_pos, y_pos);\r\n};\r\n\r\n/////////////////////////////////////////////////\r\n// Cheat Menu overlay\r\n/////////////////////////////////////////////////\r\n\r\n// HTML elements and some CSS for positioning\r\n//\tother css in in CSS file attached\r\nCheat_Menu.overlay_box = document.createElement('div');\r\nCheat_Menu.overlay_box.id = \"cheat_menu\";\r\nCheat_Menu.overlay_box.style.left = \"5px\";\r\nCheat_Menu.overlay_box.style.top = \"5px\";\r\nCheat_Menu.overlay_box.style.right = \"\";\r\nCheat_Menu.overlay_box.style.bottom = \"\";\r\n\r\nCheat_Menu.overlay = document.createElement('table');\r\nCheat_Menu.overlay.id = \"cheat_menu_text\";\r\nCheat_Menu.overlay.style.left = \"5px\";\r\nCheat_Menu.overlay.style.top = \"5px\";\r\nCheat_Menu.overlay.style.right = \"\";\r\nCheat_Menu.overlay.style.bottom = \"\";\r\n\r\n\r\n// Attach other css for styling\r\nCheat_Menu.style_css = document.createElement(\"link\");\r\nCheat_Menu.style_css.type = \"text/css\";\r\nCheat_Menu.style_css.rel = \"stylesheet\";\r\nCheat_Menu.style_css.href = \"js/plugins/Cheat_Menu.css\";\r\ndocument.head.appendChild(Cheat_Menu.style_css);\r\n\r\n\r\n// keep menu in correct location\r\nCheat_Menu.position_menu = function(event) {\r\n\t//middle of screen\r\n\tif (Cheat_Menu.position == 0) {\r\n\t\tCheat_Menu.overlay_box.style.left = \"\" + (window.innerWidth / 2) + \"px\";\r\n\t\tCheat_Menu.overlay_box.style.top = \"\" + (window.innerHeight / 2) + \"px\";\r\n\t\tCheat_Menu.overlay_box.style.right = \"\";\r\n\t\tCheat_Menu.overlay_box.style.bottom = \"\";\r\n\r\n\t\tCheat_Menu.overlay_box.style.marginLeft = \"-110px\";\r\n\t\tCheat_Menu.overlay_box.style.marginTop = \"-50px\";\r\n\r\n\t\tCheat_Menu.overlay.style.left = \"\" + (window.innerWidth / 2) + \"px\";\r\n\t\tCheat_Menu.overlay.style.top = \"\" + (window.innerHeight / 2) + \"px\";\r\n\t\tCheat_Menu.overlay.style.right = \"\";\r\n\t\tCheat_Menu.overlay.style.bottom = \"\";\r\n\r\n\t\tCheat_Menu.overlay.style.marginLeft = \"-110px\";\r\n\t\tCheat_Menu.overlay.style.marginTop = \"-50px\";\r\n\t}\r\n\t// top left corner\r\n\telse if (Cheat_Menu.position == 1) {\r\n\t\tCheat_Menu.overlay_box.style.left = \"5px\";\r\n\t\tCheat_Menu.overlay_box.style.top = \"5px\";\r\n\t\tCheat_Menu.overlay_box.style.right = \"\";\r\n\t\tCheat_Menu.overlay_box.style.bottom = \"\";\r\n\r\n\t\tCheat_Menu.overlay_box.style.marginLeft = \"\";\r\n\t\tCheat_Menu.overlay_box.style.marginTop = \"\";\r\n\r\n\t\tCheat_Menu.overlay.style.left = \"5px\";\r\n\t\tCheat_Menu.overlay.style.top = \"5px\";\r\n\t\tCheat_Menu.overlay.style.right = \"\";\r\n\t\tCheat_Menu.overlay.style.bottom = \"\";\r\n\r\n\t\tCheat_Menu.overlay.style.marginLeft = \"\";\r\n\t\tCheat_Menu.overlay.style.marginTop = \"\";\r\n\t}\r\n\t// top right corner\r\n\telse if (Cheat_Menu.position == 2) {\r\n\t\tCheat_Menu.overlay_box.style.left = \"\";\r\n\t\tCheat_Menu.overlay_box.style.top = \"5px\";\r\n\t\tCheat_Menu.overlay_box.style.right = \"5px\";\r\n\t\tCheat_Menu.overlay_box.style.bottom = \"\";\r\n\r\n\t\tCheat_Menu.overlay_box.style.marginLeft = \"\";\r\n\t\tCheat_Menu.overlay_box.style.marginTop = \"\";\r\n\r\n\t\tCheat_Menu.overlay.style.left = \"\";\r\n\t\tCheat_Menu.overlay.style.top = \"5px\";\r\n\t\tCheat_Menu.overlay.style.right = \"-15px\";\r\n\t\tCheat_Menu.overlay.style.bottom = \"\";\r\n\r\n\t\tCheat_Menu.overlay.style.marginLeft = \"\";\r\n\t\tCheat_Menu.overlay.style.marginTop = \"\";\r\n\t}\r\n\t// bottom right corner\r\n\telse if (Cheat_Menu.position == 3) {\r\n\t\tCheat_Menu.overlay_box.style.left = \"\";\r\n\t\tCheat_Menu.overlay_box.style.top = \"\";\r\n\t\tCheat_Menu.overlay_box.style.right = \"5px\";\r\n\t\tCheat_Menu.overlay_box.style.bottom = \"5px\";\r\n\r\n\t\tCheat_Menu.overlay_box.style.marginLeft = \"\";\r\n\t\tCheat_Menu.overlay_box.style.marginTop = \"\";\r\n\r\n\t\tCheat_Menu.overlay.style.left = \"\";\r\n\t\tCheat_Menu.overlay.style.top = \"\";\r\n\t\tCheat_Menu.overlay.style.right = \"-15px\";\r\n\t\tCheat_Menu.overlay.style.bottom = \"5px\";\r\n\r\n\t\tCheat_Menu.overlay.style.marginLeft = \"\";\r\n\t\tCheat_Menu.overlay.style.marginTop = \"\";\r\n\t}\r\n\t// bottom left corner\r\n\telse if (Cheat_Menu.position == 4) {\r\n\t\tCheat_Menu.overlay_box.style.left = \"5px\";\r\n\t\tCheat_Menu.overlay_box.style.top = \"\";\r\n\t\tCheat_Menu.overlay_box.style.right = \"\";\r\n\t\tCheat_Menu.overlay_box.style.bottom = \"5px\";\r\n\r\n\t\tCheat_Menu.overlay_box.style.marginLeft = \"\";\r\n\t\tCheat_Menu.overlay_box.style.marginTop = \"\";\r\n\r\n\t\tCheat_Menu.overlay.style.left = \"5px\";\r\n\t\tCheat_Menu.overlay.style.top = \"\";\r\n\t\tCheat_Menu.overlay.style.right = \"\";\r\n\t\tCheat_Menu.overlay.style.bottom = \"5px\";\r\n\r\n\t\tCheat_Menu.overlay.style.marginLeft = \"\";\r\n\t\tCheat_Menu.overlay.style.marginTop = \"\";\r\n\t}\r\n\t\r\n\t// adjust background box size to match contents\r\n\tvar height = 20;\r\n\tfor (var i = 0; i < Cheat_Menu.overlay.children.length; i++) {\r\n\t\theight += Cheat_Menu.overlay.children[i].scrollHeight;\r\n\t}\r\n\tCheat_Menu.overlay_box.style.height = \"\" + height + \"px\";\r\n};\r\n\r\n/////////////////////////////////////////////////\r\n// Menu item types\r\n/////////////////////////////////////////////////\r\n\r\n// insert row with buttons to scroll left and right for some context\r\n//\tappears as:\r\n//\t<-[key1] text [key2]->\r\n//\tscrolling is handled by scroll_left_handler and scroll_right_handler functions\r\n//\ttext: string \r\n//\tkey1,key2: key mapping\r\n//\tscroll_handler: single function that handles the left and right scroll arguments should be (direction, event)\r\nCheat_Menu.append_scroll_selector = function(text, key1, key2, scroll_handler) {\r\n\tvar scroll_selector = Cheat_Menu.overlay.insertRow();\r\n\tscroll_selector.className = \"scroll_selector_row\";\r\n\r\n\tvar scroll_left_button = scroll_selector.insertCell();\r\n\tscroll_left_button.className = \"scroll_selector_buttons cheat_menu_cell\";\r\n\r\n\t\r\n\tvar scroll_text = scroll_selector.insertCell();\r\n\tscroll_text.className = \"cheat_menu_cell\";\r\n\r\n\tvar scroll_right_button = scroll_selector.insertCell();\r\n\tscroll_right_button.className = \"scroll_selector_buttons cheat_menu_cell\";\r\n\t\r\n\tscroll_left_button.innerHTML = \"←[\" + key1 + \"]\";\r\n\tscroll_text.innerHTML = text;\r\n\tscroll_right_button.innerHTML =  \"[\" + key2 + \"]→\";\r\n\r\n\tscroll_left_button.addEventListener('mousedown', scroll_handler.bind(null, \"left\"));\r\n\tscroll_right_button.addEventListener('mousedown', scroll_handler.bind(null, \"right\"));\r\n\r\n\tCheat_Menu.key_listeners[key1] = scroll_handler.bind(null, \"left\");\r\n\tCheat_Menu.key_listeners[key2] = scroll_handler.bind(null, \"right\");\r\n};\r\n\r\n// Insert a title row\r\n//\tA row in the menu that is just text\r\n//\ttitle: string\r\nCheat_Menu.append_title = function(title) {\r\n\tvar title_row = Cheat_Menu.overlay.insertRow();\r\n\tvar temp = title_row.insertCell()\r\n\ttemp.className = \"cheat_menu_cell_title\";\r\n\tvar title_text = title_row.insertCell();\r\n\ttitle_text.className = \"cheat_menu_cell_title\";\r\n\ttemp = title_row.insertCell()\r\n\ttemp.className = \"cheat_menu_cell_title\";\r\n\ttitle_text.innerHTML = title;\r\n};\r\n\r\n// Insert a desciption row\r\n//\tA row in the menu that is just text (smaller than title)\r\n//\ttext: string\r\nCheat_Menu.append_description = function(text) {\r\n\tvar title_row = Cheat_Menu.overlay.insertRow();\r\n\tvar temp = title_row.insertCell()\r\n\ttemp.className = \"cheat_menu_cell\";\r\n\tvar title_text = title_row.insertCell();\r\n\ttitle_text.className = \"cheat_menu_cell\";\r\n\ttemp = title_row.insertCell()\r\n\ttemp.className = \"cheat_menu_cell\";\r\n\ttitle_text.innerHTML = text;\r\n};\r\n\r\n// Append a cheat with some handler to activate\r\n//\tAppears as:\r\n//\tcheat text\tstatus text[key]\r\n//\tcheat_text: string\r\n//\tstatus_text: string \r\n//\tkey: key mapping\r\n//\tclick_handler: function\r\nCheat_Menu.append_cheat = function(cheat_text, status_text, key, click_handler) {\r\n\tvar cheat_row = Cheat_Menu.overlay.insertRow();\r\n\r\n\tvar cheat_title = cheat_row.insertCell();\r\n\tcheat_title.className = \"cheat_menu_cell\"\r\n\tvar temp = cheat_row.insertCell()\r\n\ttemp.className = \"cheat_menu_cell\";\r\n\tvar cheat = cheat_row.insertCell();\r\n\tcheat.className = \"cheat_menu_buttons cheat_menu_cell\";\r\n\r\n\tcheat_title.innerHTML = cheat_text;\r\n\tcheat.innerHTML = status_text + \"[\" + key + \"]\";\r\n\r\n\tcheat.addEventListener('mousedown', click_handler);\r\n\tCheat_Menu.key_listeners[key] = click_handler;\r\n};\r\n\r\n/////////////////////////////////////////////////////////////\r\n// Various functions to settup each page of the cheat menu\r\n/////////////////////////////////////////////////////////////\r\n\r\n\r\n// Left and right scrollers for handling switching between menus\r\nCheat_Menu.scroll_cheat = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.cheat_selected--;\r\n\t\tif (Cheat_Menu.cheat_selected < 0) {\r\n\t\t\tCheat_Menu.cheat_selected = Cheat_Menu.menus.length - 1;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.cheat_selected++;\r\n\t\tif (Cheat_Menu.cheat_selected > Cheat_Menu.menus.length - 1) {\r\n\t\t\tCheat_Menu.cheat_selected = 0;\r\n\t\t}\r\n\t}\r\n\r\n\tSoundManager.playSystemSound(0);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// Menu title with scroll options to go between menu, should be first\r\n//\tappend on each menu\r\nCheat_Menu.append_cheat_title = function(cheat_name) {\r\n\tCheat_Menu.append_title(\"Cheat\");\r\n\tCheat_Menu.append_scroll_selector(cheat_name, 2, 3, Cheat_Menu.scroll_cheat);\r\n};\r\n\r\n// Left and right scrollers for handling switching selected actors\r\nCheat_Menu.scroll_actor = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.cheat_selected_actor--;\r\n\t\tif (Cheat_Menu.cheat_selected_actor < 0) {\r\n\t\t\tCheat_Menu.cheat_selected_actor = $gameActors._data.length - 1;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.cheat_selected_actor++;\r\n\t\tif (Cheat_Menu.cheat_selected_actor >= $gameActors._data.length) {\r\n\t\t\tCheat_Menu.cheat_selected_actor = 0;\r\n\t\t}\r\n\t}\r\n\t\r\n\tSoundManager.playSystemSound(0);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// Append actor selection to the menu\r\nCheat_Menu.append_actor_selection = function(key1, key2) {\r\n\tCheat_Menu.append_title(\"Actor\");\r\n\r\n\tvar actor_name;\r\n\r\n\tif ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor]._name) {\r\n\t\tactor_name = \"<font color='#0088ff'>\" + $gameActors._data[Cheat_Menu.cheat_selected_actor]._name + \"</font>\";\r\n\t}\r\n\telse {\r\n\t\tactor_name = \"<font color='#ff0000'>NULL</font>\";\r\n\t}\r\n\r\n\tCheat_Menu.append_scroll_selector(actor_name, key1, key2, Cheat_Menu.scroll_actor);\r\n};\r\n\r\n// Hanler for the god_mode cheat\r\nCheat_Menu.god_mode_toggle = function(event) {\r\n\tif ($gameActors._data[Cheat_Menu.cheat_selected_actor]) {\r\n\t\tif (!($gameActors._data[Cheat_Menu.cheat_selected_actor].god_mode)) {\r\n\t\t\tCheat_Menu.god_mode($gameActors._data[Cheat_Menu.cheat_selected_actor]);\r\n\t\t\tSoundManager.playSystemSound(1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tCheat_Menu.god_mode_off($gameActors._data[Cheat_Menu.cheat_selected_actor]);\r\n\t\t\tSoundManager.playSystemSound(2);\r\n\t\t}\r\n\t\tCheat_Menu.update_menu();\r\n\t}\r\n};\r\n\r\n// Append the god_mode cheat to the menu\r\nCheat_Menu.append_godmode_status = function() {\r\n\tvar status_text;\r\n\tif ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor].god_mode) {\r\n\t\tstatus_text = \"<font color='#00ff00'>on</font>\";\r\n\t}\r\n\telse {\r\n\t\tstatus_text = \"<font color='#ff0000'>off</font>\";\r\n\t}\r\n\r\n\tCheat_Menu.append_cheat(\"Status:\", status_text, 6, Cheat_Menu.god_mode_toggle);\r\n};\r\n\r\n// handler for the enemy hp to 0 cheat alive only\r\nCheat_Menu.enemy_hp_cheat_1 = function() {\r\n\tCheat_Menu.set_enemy_hp(0, true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the enemy hp to 1 cheat alive only\r\nCheat_Menu.enemy_hp_cheat_2 = function() {\r\n\tCheat_Menu.set_enemy_hp(1, true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the enemy hp to 0 cheat all\r\nCheat_Menu.enemy_hp_cheat_3 = function() {\r\n\tCheat_Menu.set_enemy_hp(0, false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the enemy hp to 1 cheat all\r\nCheat_Menu.enemy_hp_cheat_4 = function() {\r\n\tCheat_Menu.set_enemy_hp(1, false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// Append the enemy hp cheats to the menu\r\nCheat_Menu.append_enemy_cheats = function(key1, key2, key3, key4) {\r\n\tCheat_Menu.append_title(\"Alive\");\r\n\tCheat_Menu.append_cheat(\"Enemy HP to 0\", \"Activate\", key1, Cheat_Menu.enemy_hp_cheat_1);\r\n\tCheat_Menu.append_cheat(\"Enemy HP to 1\", \"Activate\", key2, Cheat_Menu.enemy_hp_cheat_2);\r\n\tCheat_Menu.append_title(\"All\");\r\n\tCheat_Menu.append_cheat(\"Enemy HP to 0\", \"Activate\", key3, Cheat_Menu.enemy_hp_cheat_3);\r\n\tCheat_Menu.append_cheat(\"Enemy HP to 1\", \"Activate\", key4, Cheat_Menu.enemy_hp_cheat_4);\r\n};\r\n\r\n// handler for the party hp cheat to 0 alive only\r\nCheat_Menu.party_hp_cheat_1 = function() {\r\n\tCheat_Menu.set_party_hp(0, true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party hp cheat to 1 alive only\r\nCheat_Menu.party_hp_cheat_2 = function() {\r\n\tCheat_Menu.set_party_hp(1, true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party hp cheat to full alive only\r\nCheat_Menu.party_hp_cheat_3 = function() {\r\n\tCheat_Menu.recover_party_hp(true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party hp cheat to 0 all\r\nCheat_Menu.party_hp_cheat_4 = function() {\r\n\tCheat_Menu.set_party_hp(0, false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party hp cheat to 1 all\r\nCheat_Menu.party_hp_cheat_5 = function() {\r\n\tCheat_Menu.set_party_hp(1, false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party hp cheat full all\r\nCheat_Menu.party_hp_cheat_6 = function() {\r\n\tCheat_Menu.recover_party_hp(false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n\r\n// append the party hp cheats\r\nCheat_Menu.append_hp_cheats = function(key1, key2, key3, key4, key5, key6) {\r\n\tCheat_Menu.append_title(\"Alive\");\r\n\tCheat_Menu.append_cheat(\"Party HP to 0\", \"Activate\", key1, Cheat_Menu.party_hp_cheat_1);\r\n\tCheat_Menu.append_cheat(\"Party HP to 1\", \"Activate\", key2, Cheat_Menu.party_hp_cheat_2);\r\n\tCheat_Menu.append_cheat(\"Party Full HP\", \"Activate\", key3, Cheat_Menu.party_hp_cheat_3);\r\n\tCheat_Menu.append_title(\"All\");\r\n\tCheat_Menu.append_cheat(\"Party HP to 0\", \"Activate\", key4, Cheat_Menu.party_hp_cheat_4);\r\n\tCheat_Menu.append_cheat(\"Party HP to 1\", \"Activate\", key5, Cheat_Menu.party_hp_cheat_5);\r\n\tCheat_Menu.append_cheat(\"Party Full HP\", \"Activate\", key6, Cheat_Menu.party_hp_cheat_6);\r\n};\r\n\r\n// handler for the party mp cheat to 0 alive only\r\nCheat_Menu.party_mp_cheat_1 = function() {\r\n\tCheat_Menu.set_party_mp(0, true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party mp cheat to 1 alive only\r\nCheat_Menu.party_mp_cheat_2 = function() {\r\n\tCheat_Menu.set_party_mp(1, true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party mp cheat to full alive only\r\nCheat_Menu.party_mp_cheat_3 = function() {\r\n\tCheat_Menu.recover_party_mp(true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party mp cheat to 0 all\r\nCheat_Menu.party_mp_cheat_4 = function() {\r\n\tCheat_Menu.set_party_mp(0, false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party mp cheat to 1 all\r\nCheat_Menu.party_mp_cheat_5 = function() {\r\n\tCheat_Menu.set_party_mp(1, false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party mp cheat full all\r\nCheat_Menu.party_mp_cheat_6 = function() {\r\n\tCheat_Menu.recover_party_mp(false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n\r\n// append the party mp cheats\r\nCheat_Menu.append_mp_cheats = function(key1, key2, key3, key4, key5, key6) {\r\n\tCheat_Menu.append_title(\"Alive\");\r\n\tCheat_Menu.append_cheat(\"Party MP to 0\", \"Activate\", key1, Cheat_Menu.party_mp_cheat_1);\r\n\tCheat_Menu.append_cheat(\"Party MP to 1\", \"Activate\", key2, Cheat_Menu.party_mp_cheat_2);\r\n\tCheat_Menu.append_cheat(\"Party Full MP\", \"Activate\", key3, Cheat_Menu.party_mp_cheat_3);\r\n\tCheat_Menu.append_title(\"All\");\r\n\tCheat_Menu.append_cheat(\"Party MP to 0\", \"Activate\", key4, Cheat_Menu.party_mp_cheat_4);\r\n\tCheat_Menu.append_cheat(\"Party MP to 1\", \"Activate\", key5, Cheat_Menu.party_mp_cheat_5);\r\n\tCheat_Menu.append_cheat(\"Party Full MP\", \"Activate\", key6, Cheat_Menu.party_mp_cheat_6);\r\n};\r\n\r\n// handler for the party tp cheat to 0 alive only\r\nCheat_Menu.party_tp_cheat_1 = function() {\r\n\tCheat_Menu.set_party_tp(0, true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party tp cheat to 1 alive only\r\nCheat_Menu.party_tp_cheat_2 = function() {\r\n\tCheat_Menu.set_party_tp(1, true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party tp cheat to full alive only\r\nCheat_Menu.party_tp_cheat_3 = function() {\r\n\tCheat_Menu.recover_party_tp(true);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party tp cheat to 0 all\r\nCheat_Menu.party_tp_cheat_4 = function() {\r\n\tCheat_Menu.set_party_tp(0, false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party tp cheat to 1 all\r\nCheat_Menu.party_tp_cheat_5 = function() {\r\n\tCheat_Menu.set_party_tp(1, false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// handler for the party tp cheat full all\r\nCheat_Menu.party_tp_cheat_6 = function() {\r\n\tCheat_Menu.recover_party_tp(false);\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n\r\n// append the party tp cheats\r\nCheat_Menu.append_tp_cheats = function(key1, key2, key3, key4, key5, key6) {\r\n\tCheat_Menu.append_title(\"Alive\");\r\n\tCheat_Menu.append_cheat(\"Party TP to 0\", \"Activate\", key1, Cheat_Menu.party_tp_cheat_1);\r\n\tCheat_Menu.append_cheat(\"Party TP to 1\", \"Activate\", key2, Cheat_Menu.party_tp_cheat_2);\r\n\tCheat_Menu.append_cheat(\"Party Full TP\", \"Activate\", key3, Cheat_Menu.party_tp_cheat_3);\r\n\tCheat_Menu.append_title(\"All\");\r\n\tCheat_Menu.append_cheat(\"Party TP to 0\", \"Activate\", key4, Cheat_Menu.party_tp_cheat_4);\r\n\tCheat_Menu.append_cheat(\"Party TP to 1\", \"Activate\", key5, Cheat_Menu.party_tp_cheat_5);\r\n\tCheat_Menu.append_cheat(\"Party Full TP\", \"Activate\", key6, Cheat_Menu.party_tp_cheat_6);\r\n};\r\n\r\n// handler for the toggle no clip cheat\r\nCheat_Menu.toggle_no_clip_status = function(event) {\r\n\t$gamePlayer._through = !($gamePlayer._through);\r\n\tCheat_Menu.update_menu();\r\n\tif ($gamePlayer._through) {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n};\r\n\r\n// appen the no clip cheat\r\nCheat_Menu.append_no_clip_status = function(key1) {\r\n\tvar status_text;\r\n\tif ($gamePlayer._through) {\r\n\t\tstatus_text = \"<font color='#00ff00'>on</font>\";\r\n\t}\r\n\telse {\r\n\t\tstatus_text = \"<font color='#ff0000'>off</font>\";\r\n\t}\r\n\r\n\tCheat_Menu.append_cheat(\"Status:\", status_text, key1, Cheat_Menu.toggle_no_clip_status);\r\n};\r\n\r\n// Left and right scrollers for handling switching amount to modify numerical cheats\r\nCheat_Menu.scroll_amount = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.amount_index--;\r\n\t\tif (Cheat_Menu.amount_index < 0) {\r\n\t\t\tCheat_Menu.amount_index = 0;\r\n\t\t}\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.amount_index++;\r\n\t\tif (Cheat_Menu.amount_index >= Cheat_Menu.amounts.length) {\r\n\t\t\tCheat_Menu.amount_index = Cheat_Menu.amounts.length - 1;\r\n\t\t}\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\t\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the amount selection to the menu\r\nCheat_Menu.append_amount_selection = function(key1, key2) {\r\n\tCheat_Menu.append_title(\"Amount\");\r\n\r\n\tvar current_amount = \"<font color='#0088ff'>\" + Cheat_Menu.amounts[Cheat_Menu.amount_index] + \"</font>\";\r\n\tCheat_Menu.append_scroll_selector(current_amount, key1, key2, Cheat_Menu.scroll_amount);\r\n};\r\n\r\n// Left and right scrollers for handling switching amount to modify for the movement cheat\r\nCheat_Menu.scroll_move_amount = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.move_amount_index--;\r\n\t\tif (Cheat_Menu.move_amount_index < 0) {\r\n\t\t\tCheat_Menu.move_amount_index = 0;\r\n\t\t}\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.move_amount_index++;\r\n\t\tif (Cheat_Menu.move_amount_index >= Cheat_Menu.move_amounts.length) {\r\n\t\t\tCheat_Menu.move_amount_index = Cheat_Menu.move_amounts.length - 1;\r\n\t\t}\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\t\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the movement speed amount to the menu\r\nCheat_Menu.append_move_amount_selection = function(key1, key2) {\r\n\tCheat_Menu.append_title(\"Amount\");\r\n\r\n\tvar current_amount = \"<font color='#0088ff'>\" + Cheat_Menu.move_amounts[Cheat_Menu.move_amount_index] + \"</font>\";\r\n\tCheat_Menu.append_scroll_selector(current_amount, key1, key2, Cheat_Menu.scroll_move_amount);\r\n};\r\n\r\n// handlers for the exp cheat\r\nCheat_Menu.apply_current_exp = function(direction, event) {\r\n\tvar amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];\r\n\tif (direction == \"left\") {\r\n\t\tamount = -amount;\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\tCheat_Menu.give_exp($gameActors._data[Cheat_Menu.cheat_selected_actor], amount);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the exp cheat to the menu\r\nCheat_Menu.append_exp_cheat = function(key1, key2) {\r\n\tvar current_exp = \"NULL\";\r\n\tif ($gameActors._data[Cheat_Menu.cheat_selected_actor]) {\r\n\t\tcurrent_exp = $gameActors._data[Cheat_Menu.cheat_selected_actor].currentExp();\r\n\t}\r\n\tCheat_Menu.append_title(\"EXP\");\r\n\tCheat_Menu.append_scroll_selector(current_exp, key1, key2, Cheat_Menu.apply_current_exp);\r\n};\r\n\r\n// Left and right scrollers for handling switching between stats for the selected character\r\nCheat_Menu.scroll_stat = function(direction, event) {\r\n\tif ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus) {\r\n\t\tif (direction == \"left\") {\r\n\t\t\tCheat_Menu.stat_selection--;\r\n\t\t\tif (Cheat_Menu.stat_selection < 0) {\r\n\t\t\t\tCheat_Menu.stat_selection = $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus.length - 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tCheat_Menu.stat_selection++;\r\n\t\t\tif (Cheat_Menu.stat_selection >= $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus.length) {\r\n\t\t\t\tCheat_Menu.stat_selection = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.stat_selection = 0;\r\n\t}\r\n\tSoundManager.playSystemSound(0);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// handlers for the stat cheat\r\nCheat_Menu.apply_current_stat = function(direction, event) {\r\n\tvar amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];\r\n\tif (direction == \"left\") {\r\n\t\tamount = -amount;\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\tCheat_Menu.give_stat($gameActors._data[Cheat_Menu.cheat_selected_actor], Cheat_Menu.stat_selection , amount);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n\r\n// append the stat selection to the menu\r\nCheat_Menu.append_stat_selection = function(key1, key2, key3, key4) {\r\n\tCheat_Menu.append_title(\"Stat\");\r\n\r\n\tvar stat_string = \"\";\r\n\r\n\tvar stat_string = \"\";\r\n\tif ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus) {\r\n\t\tif (Cheat_Menu.stat_selection >= $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus.length) {\r\n\t\t\tCheat_Menu.stat_selection = 0;\r\n\t\t}\r\n\t\tstat_string += $dataSystem.terms.params[Cheat_Menu.stat_selection];\r\n\t}\r\n\r\n\tCheat_Menu.append_scroll_selector(stat_string, key1, key2, Cheat_Menu.scroll_stat);\r\n\tvar current_value = \"NULL\";\r\n\tif ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus) {\r\n\t\tcurrent_value = $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus[Cheat_Menu.stat_selection];\r\n\t}\r\n\tCheat_Menu.append_scroll_selector(current_value, key3, key4, Cheat_Menu.apply_current_stat);\r\n};\r\n\r\n// handlers for the gold cheat\r\nCheat_Menu.apply_current_gold = function(direction, event) {\r\n\tvar amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];\r\n\tif (direction == \"left\") {\r\n\t\tamount = -amount;\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\tCheat_Menu.give_gold(amount);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the gold cheat to the menu\r\nCheat_Menu.append_gold_status = function(key1, key2) {\r\n\tCheat_Menu.append_title(\"Gold\");\r\n\tCheat_Menu.append_scroll_selector($gameParty._gold, key1, key2, Cheat_Menu.apply_current_gold);\r\n};\r\n\r\n// handler for the movement speed cheat\r\nCheat_Menu.apply_speed_change = function(direction, event) {\r\n\tvar amount = Cheat_Menu.move_amounts[Cheat_Menu.move_amount_index];\r\n\tif (direction == \"left\") {\r\n\t\tamount = -amount;\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\tCheat_Menu.change_player_speed(amount);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\nCheat_Menu.apply_speed_lock_toggle = function() {\r\n\tCheat_Menu.toggle_lock_player_speed();\r\n\tif (Cheat_Menu.speed_unlocked) {\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the movement speed to the menu\r\nCheat_Menu.append_speed_status = function(key1, key2, key3) {\r\n\tCheat_Menu.append_title(\"Current Speed\");\r\n\tCheat_Menu.append_scroll_selector($gamePlayer._moveSpeed, key1, key2, Cheat_Menu.apply_speed_change);\r\n\tvar status_text;\r\n\tif (!Cheat_Menu.speed_unlocked) {\r\n\t\tstatus_text = \"<font color='#00ff00'>false</font>\";\r\n\t}\r\n\telse {\r\n\t\tstatus_text = \"<font color='#ff0000'>true</font>\";\r\n\t}\r\n\tCheat_Menu.append_cheat(\"Speed Unlocked\", status_text, key3, Cheat_Menu.apply_speed_lock_toggle);\r\n};\r\n\r\n// Left and right scrollers for handling switching between items selected\r\nCheat_Menu.scroll_item = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.item_selection--;\r\n\t\tif (Cheat_Menu.item_selection < 0) {\r\n\t\t\tCheat_Menu.item_selection = $dataItems.length - 1;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.item_selection++;\r\n\t\tif (Cheat_Menu.item_selection >= $dataItems.length) {\r\n\t\t\tCheat_Menu.item_selection = 0;\r\n\t\t}\r\n\t}\r\n\tSoundManager.playSystemSound(0);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// handlers for the item cheat\r\nCheat_Menu.apply_current_item = function(direction, event) {\r\n\tvar amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];\r\n\tif (direction == \"left\") {\r\n\t\tamount = -amount;\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\tCheat_Menu.give_item(Cheat_Menu.item_selection, amount);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the item cheat to the menu\r\nCheat_Menu.append_item_selection = function(key1, key2, key3, key4) {\r\n\tCheat_Menu.append_title(\"Item\");\r\n\tvar current_item = \"\";\r\n\tif ($dataItems[Cheat_Menu.item_selection] && $dataItems[Cheat_Menu.item_selection].name && $dataItems[Cheat_Menu.item_selection].name.length > 0) {\r\n\t\tcurrent_item = $dataItems[Cheat_Menu.item_selection].name;\r\n\t}\r\n\telse {\r\n\t\tcurrent_item = \"NULL\";\r\n\t}\r\n\r\n\tCheat_Menu.append_scroll_selector(current_item, key1, key2, Cheat_Menu.scroll_item);\r\n\tvar current_item_amount = 0;\r\n\tif ($gameParty._items[Cheat_Menu.item_selection] != undefined) {\r\n\t\tcurrent_item_amount = $gameParty._items[Cheat_Menu.item_selection];\r\n\t}\r\n\tCheat_Menu.append_scroll_selector(current_item_amount, key3, key4, Cheat_Menu.apply_current_item);\r\n};\r\n\r\n// Left and right scrollers for handling switching between weapon selected\r\nCheat_Menu.scroll_weapon = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.weapon_selection--;\r\n\t\tif (Cheat_Menu.weapon_selection < 0) {\r\n\t\t\tCheat_Menu.weapon_selection = $dataWeapons.length - 1;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.weapon_selection++;\r\n\t\tif (Cheat_Menu.weapon_selection >= $dataWeapons.length) {\r\n\t\t\tCheat_Menu.weapon_selection = 0;\r\n\t\t}\r\n\t}\r\n\tSoundManager.playSystemSound(0);\r\n\t\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// handlers for the weapon cheat\r\nCheat_Menu.apply_current_weapon = function(direction, event) {\r\n\tvar amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];\r\n\tif (direction == \"left\") {\r\n\t\tamount = -amount;\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\tCheat_Menu.give_weapon(Cheat_Menu.weapon_selection, amount);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the weapon cheat to the menu\r\nCheat_Menu.append_weapon_selection = function(key1, key2, key3, key4) {\r\n\tCheat_Menu.append_title(\"Weapon\");\r\n\tvar current_weapon = \"\";\r\n\tif ($dataWeapons[Cheat_Menu.weapon_selection] && $dataWeapons[Cheat_Menu.weapon_selection].name && $dataWeapons[Cheat_Menu.weapon_selection].name.length > 0) {\r\n\t\tcurrent_weapon = $dataWeapons[Cheat_Menu.weapon_selection].name;\r\n\t}\r\n\telse {\r\n\t\tcurrent_weapon = \"NULL\";\r\n\t}\r\n\r\n\tCheat_Menu.append_scroll_selector(current_weapon, key1, key2, Cheat_Menu.scroll_weapon);\r\n\tvar current_weapon_amount = 0;\r\n\tif ($gameParty._weapons[Cheat_Menu.weapon_selection] != undefined) {\r\n\t\tcurrent_weapon_amount = $gameParty._weapons[Cheat_Menu.weapon_selection];\r\n\t}\r\n\tCheat_Menu.append_scroll_selector(current_weapon_amount, key3, key4, Cheat_Menu.apply_current_weapon);\r\n};\r\n\r\n// Left and right scrollers for handling switching between armor selected\r\nCheat_Menu.scroll_armor = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.armor_selection--;\r\n\t\tif (Cheat_Menu.armor_selection < 0) {\r\n\t\t\tCheat_Menu.armor_selection = $dataArmors.length - 1;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.armor_selection++;\r\n\t\tif (Cheat_Menu.armor_selection >= $dataArmors.length) {\r\n\t\t\tCheat_Menu.armor_selection = 0;\r\n\t\t}\r\n\t}\r\n\tSoundManager.playSystemSound(0);\r\n\t\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// handler for the armor cheat\r\nCheat_Menu.apply_current_armor = function(direction, event) {\r\n\tvar amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];\r\n\tif (direction == \"left\") {\r\n\t\tamount = -amount;\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\tCheat_Menu.give_armor(Cheat_Menu.armor_selection, amount);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the armor cheat to the menu\r\nCheat_Menu.append_armor_selection = function(key1, key2, key3, key4) {\r\n\tCheat_Menu.append_title(\"Armor\");\r\n\tvar current_armor = \"\";\r\n\tif ($dataArmors[Cheat_Menu.armor_selection] && $dataArmors[Cheat_Menu.armor_selection].name && $dataArmors[Cheat_Menu.armor_selection].name.length > 0) {\r\n\t\tcurrent_armor = $dataArmors[Cheat_Menu.armor_selection].name;\r\n\t}\r\n\telse {\r\n\t\tcurrent_armor = \"NULL\";\r\n\t}\r\n\r\n\tCheat_Menu.append_scroll_selector(current_armor, key1, key2, Cheat_Menu.scroll_armor);\r\n\tvar current_armor_amount = 0;\r\n\tif ($gameParty._armors[Cheat_Menu.armor_selection] != undefined) {\r\n\t\tcurrent_armor_amount = $gameParty._armors[Cheat_Menu.armor_selection];\r\n\t}\r\n\tCheat_Menu.append_scroll_selector(current_armor_amount, key3, key4, Cheat_Menu.apply_current_armor);\r\n};\r\n\r\n// handler for the clear actor state cheat\r\nCheat_Menu.clear_current_actor_states = function() {\r\n\tCheat_Menu.clear_actor_states($gameActors._data[Cheat_Menu.cheat_selected_actor]);\r\n\tSoundManager.playSystemSound(1);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// handler for the party state clear cheat\r\nCheat_Menu.party_clear_states_cheat = function() {\r\n\tCheat_Menu.clear_party_states();\r\n\tSoundManager.playSystemSound(1);\r\n};\r\n\r\n// append the party hp cheats\r\nCheat_Menu.append_party_state = function(key1) {\r\n\tCheat_Menu.append_cheat(\"Clear Party States\", \"Activate\", key1, Cheat_Menu.party_clear_states_cheat);\r\n};\r\n\r\n// append the clear actor state cheat to the menu\r\nCheat_Menu.append_current_state = function(key1) {\r\n\tCheat_Menu.append_title(\"Current State\");\r\n\tvar number_states = 0;\r\n\r\n\tif ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor]._states && $gameActors._data[Cheat_Menu.cheat_selected_actor]._states.length >= 0) {\r\n\t\tnumber_states = $gameActors._data[Cheat_Menu.cheat_selected_actor]._states.length;\r\n\t}\r\n\telse {\r\n\t\tnumber_states = null;\r\n\t}\r\n\r\n\tCheat_Menu.append_cheat(\"Number Effects:\", number_states, key1, Cheat_Menu.clear_current_actor_states);\r\n};\r\n\r\n// Left and right scrollers for handling switching between selected variable\r\nCheat_Menu.scroll_variable = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.variable_selection--;\r\n\t\tif (Cheat_Menu.variable_selection < 0) {\r\n\t\t\tCheat_Menu.variable_selection = $dataSystem.variables.length - 1;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.variable_selection++;\r\n\t\tif (Cheat_Menu.variable_selection >= $dataSystem.variables.length) {\r\n\t\t\tCheat_Menu.variable_selection = 0;\r\n\t\t}\r\n\t}\r\n\tSoundManager.playSystemSound(0);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// handlers for the setting the current variable\r\nCheat_Menu.apply_current_variable = function(direction, event) {\r\n\tvar amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];\r\n\tif (direction == \"left\") {\r\n\t\tamount = -amount;\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\tCheat_Menu.set_variable(Cheat_Menu.variable_selection, amount);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the variable cheat to the menu\r\nCheat_Menu.append_variable_selection = function(key1, key2, key3, key4) {\r\n\tCheat_Menu.append_title(\"Variable\");\r\n\tvar current_variable = \"\";\r\n\tif ($dataSystem.variables[Cheat_Menu.variable_selection] && $dataSystem.variables[Cheat_Menu.variable_selection].length > 0) {\r\n\t\tcurrent_variable = $dataSystem.variables[Cheat_Menu.variable_selection];\r\n\t}\r\n\telse {\r\n\t\tcurrent_variable = \"NULL\";\r\n\t}\r\n\r\n\tCheat_Menu.append_scroll_selector(current_variable, key1, key2, Cheat_Menu.scroll_variable);\r\n\tvar current_variable_value = 'NULL';\r\n\tif ($gameVariables.value(Cheat_Menu.variable_selection) != undefined) {\r\n\t\tcurrent_variable_value = $gameVariables.value(Cheat_Menu.variable_selection);\r\n\t}\r\n\tCheat_Menu.append_scroll_selector(current_variable_value, key3, key4, Cheat_Menu.apply_current_variable);\r\n};\r\n\r\n// Left and right scrollers for handling switching between selected switch\r\nCheat_Menu.scroll_switch = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.switch_selection--;\r\n\t\tif (Cheat_Menu.switch_selection < 0) {\r\n\t\t\tCheat_Menu.switch_selection = $dataSystem.switches.length - 1;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.switch_selection++;\r\n\t\tif (Cheat_Menu.switch_selection >= $dataSystem.switches.length) {\r\n\t\t\tCheat_Menu.switch_selection = 0;\r\n\t\t}\r\n\t}\r\n\tSoundManager.playSystemSound(0);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// handler for the toggling the current switch\r\nCheat_Menu.toggle_current_switch = function(event) {\r\n\tCheat_Menu.toggle_switch(Cheat_Menu.switch_selection);\r\n\tif ($gameSwitches.value(Cheat_Menu.switch_selection)) {\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the switch cheat to the menu\r\nCheat_Menu.append_switch_selection = function(key1, key2, key3) {\r\n\tCheat_Menu.append_title(\"Switch\");\r\n\tvar current_switch = \"\";\r\n\tif ($dataSystem.switches[Cheat_Menu.switch_selection] && $dataSystem.switches[Cheat_Menu.switch_selection].length > 0) {\r\n\t\tcurrent_switch = $dataSystem.switches[Cheat_Menu.switch_selection];\r\n\t}\r\n\telse {\r\n\t\tcurrent_switch = \"NULL\";\r\n\t}\r\n\r\n\tCheat_Menu.append_scroll_selector(current_switch, key1, key2, Cheat_Menu.scroll_switch);\r\n\tvar current_switch_value = 'NULL';\r\n\tif ($gameSwitches.value(Cheat_Menu.switch_selection) != undefined) {\r\n\t\tcurrent_switch_value = $gameSwitches.value(Cheat_Menu.switch_selection);\r\n\t}\r\n\tCheat_Menu.append_cheat(\"Status:\", current_switch_value, key3, Cheat_Menu.toggle_current_switch);\r\n};\r\n\r\n// handler for saving positions\r\nCheat_Menu.save_position = function(pos_num, event) {\r\n\tCheat_Menu.saved_positions[pos_num].m = $gameMap.mapId();\r\n\tCheat_Menu.saved_positions[pos_num].x = $gamePlayer.x;\r\n\tCheat_Menu.saved_positions[pos_num].y = $gamePlayer.y;\r\n\r\n\tSoundManager.playSystemSound(1);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// handler for loading/recalling positions\r\nCheat_Menu.recall_position = function(pos_num, event) {\r\n\tif (Cheat_Menu.saved_positions[pos_num].m != -1) {\r\n\t\tCheat_Menu.teleport(Cheat_Menu.saved_positions[pos_num].m, Cheat_Menu.saved_positions[pos_num].x, Cheat_Menu.saved_positions[pos_num].y);\r\n\t\tSoundManager.playSystemSound(1);\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(2);\r\n\t}\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the save/recall cheat to the menu\r\nCheat_Menu.append_save_recall = function (key1, key2, key3, key4, key5, key6) {\r\n\t\r\n\tCheat_Menu.append_title(\"Current Position: \");\r\n\r\n\tif ($dataMapInfos[$gameMap.mapId()] && $dataMapInfos[$gameMap.mapId()].name) {\r\n\t\tvar current_map = \"\" + $gameMap.mapId() + \": \" + $dataMapInfos[$gameMap.mapId()].name;\r\n\t\tCheat_Menu.append_description(current_map);\r\n\r\n\t\tvar map_pos = \"(\" + $gamePlayer.x + \", \" + $gamePlayer.y + \")\";\r\n\t\tCheat_Menu.append_description(map_pos);\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.append_description(\"NULL\");\r\n\t}\r\n\r\n\tvar cur_key = 1;\r\n\tfor (var i = 0; i < Cheat_Menu.saved_positions.length; i++) {\r\n\t\tCheat_Menu.append_title(\"Position \" + (i+1));\r\n\r\n\t\tvar map_text;\r\n\t\tvar pos_text;\r\n\t\tif (Cheat_Menu.saved_positions[i].m != -1) {\r\n\t\t\tmap_text = \"\" + Cheat_Menu.saved_positions[i].m + \": \";\r\n\t\t\tif($dataMapInfos[Cheat_Menu.saved_positions[i].m].name) {\r\n\t\t\t\tmap_text += $dataMapInfos[Cheat_Menu.saved_positions[i].m].name;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tmap_text += \"NULL\";\r\n\t\t\t}\r\n\t\t\tpos_text = \"(\" + Cheat_Menu.saved_positions[i].x + \", \" + Cheat_Menu.saved_positions[i].y + \")\";\r\n\t\t} \r\n\t\telse {\r\n\t\t\tmap_text = \"NULL\";\r\n\t\t\tpos_text = \"NULL\"\r\n\t\t}\r\n\r\n\t\tCheat_Menu.append_cheat(\"Save:\", map_text, eval(\"key\" + cur_key), Cheat_Menu.save_position.bind(null, i));\r\n\t\tcur_key++;\r\n\r\n\t\tCheat_Menu.append_cheat(\"Recall:\", pos_text, eval(\"key\" + cur_key), Cheat_Menu.recall_position.bind(null, i));\r\n\t\tcur_key++;\r\n\t}\r\n};\r\n\r\n// Left and right scrollers for handling switching between target teleport map\r\nCheat_Menu.scroll_map_teleport_selection = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.teleport_location.m--;\r\n\t\tif (Cheat_Menu.teleport_location.m < 1) {\r\n\t\t\tCheat_Menu.teleport_location.m = $dataMapInfos.length - 1;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.teleport_location.m++;\r\n\t\tif (Cheat_Menu.teleport_location.m >= $dataMapInfos.length) {\r\n\t\t\tCheat_Menu.teleport_location.m = 1;\r\n\t\t}\r\n\t}\r\n\r\n\tSoundManager.playSystemSound(0);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// Left and right scrollers for handling switching between target teleport x coord\r\nCheat_Menu.scroll_x_teleport_selection = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.teleport_location.x--;\r\n\t\tif (Cheat_Menu.teleport_location.x < 0) {\r\n\t\t\tCheat_Menu.teleport_location.x = 255;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.teleport_location.x++;\r\n\t\tif (Cheat_Menu.teleport_location.x > 255) {\r\n\t\t\tCheat_Menu.teleport_location.x = 0;\r\n\t\t}\r\n\t}\r\n\r\n\tSoundManager.playSystemSound(0);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// Left and right scrollers for handling switching between target teleport y coord\r\nCheat_Menu.scroll_y_teleport_selection = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.teleport_location.y--;\r\n\t\tif (Cheat_Menu.teleport_location.y < 0) {\r\n\t\t\tCheat_Menu.teleport_location.y = 255;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.teleport_location.y++;\r\n\t\tif (Cheat_Menu.teleport_location.y > 255) {\r\n\t\t\tCheat_Menu.teleport_location.y = 0;\r\n\t\t}\r\n\t}\r\n\r\n\tSoundManager.playSystemSound(0);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// handler for teleporting to targed map and location\r\nCheat_Menu.teleport_current_location = function(event) {\r\n\tCheat_Menu.teleport(Cheat_Menu.teleport_location.m, Cheat_Menu.teleport_location.x, Cheat_Menu.teleport_location.y);\r\n\tSoundManager.playSystemSound(1);\r\n\tCheat_Menu.update_menu();\r\n};\r\n\r\n// append the teleport cheat to the menu\r\nCheat_Menu.append_teleport = function (key1, key2, key3, key4, key5, key6, key7) {\r\n\tvar current_map = \"\" + Cheat_Menu.teleport_location.m + \": \";\r\n\r\n\tif ($dataMapInfos[Cheat_Menu.teleport_location.m] && $dataMapInfos[Cheat_Menu.teleport_location.m].name) {\r\n\t\tcurrent_map += $dataMapInfos[Cheat_Menu.teleport_location.m].name;\r\n\t}\r\n\telse {\r\n\t\tcurrent_map += \"NULL\";\r\n\t}\r\n\r\n\tCheat_Menu.append_scroll_selector(current_map, key1, key2, Cheat_Menu.scroll_map_teleport_selection);\r\n\r\n\tCheat_Menu.append_scroll_selector(\"X: \" + Cheat_Menu.teleport_location.x, key3, key4, Cheat_Menu.scroll_x_teleport_selection);\r\n\r\n\tCheat_Menu.append_scroll_selector(\"Y: \" + Cheat_Menu.teleport_location.y, key5, key6, Cheat_Menu.scroll_y_teleport_selection);\r\n\r\n\tCheat_Menu.append_cheat(\"Teleport\", \"Activate\", key7, Cheat_Menu.teleport_current_location);\r\n};\r\n\r\n\r\n//////////////////////////////////////////////////////////////////////////////////\r\n// Final Functions for building each Menu and function list for updating the menu\r\n//////////////////////////////////////////////////////////////////////////////////\r\n// Check if already defined (allows game specific extensions to be loaded in any order)\r\nif (typeof Cheat_Menu.menus == \"undefined\") { Cheat_Menu.menus = []; }\r\n\r\n// One menu added for each cheat/page of the Cheat_Menu\r\n//\tappended in reverse order at the front so they will\r\n//\tappear first no matter the plugin load order for any\r\n//\textension plugins\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Teleport\");\r\n\tCheat_Menu.append_teleport(4, 5, 6, 7, 8, 9, 0);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Save and Recall\");\r\n\tCheat_Menu.append_save_recall(4, 5, 6, 7, 8, 9);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Switches\");\r\n\tCheat_Menu.append_switch_selection(4, 5, 6);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Variables\");\r\n\tCheat_Menu.append_amount_selection(4, 5);\r\n\tCheat_Menu.append_variable_selection(6, 7, 8, 9);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Clear States\");\r\n\tCheat_Menu.append_party_state(4);\r\n\tCheat_Menu.append_actor_selection(5, 6);\r\n\tCheat_Menu.append_current_state(7);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Speed\");\r\n\tCheat_Menu.append_move_amount_selection(4, 5);\r\n\tCheat_Menu.append_speed_status(6, 7, 8);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Armors\");\r\n\tCheat_Menu.append_amount_selection(4, 5);\r\n\tCheat_Menu.append_armor_selection(6, 7, 8, 9);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Weapons\");\r\n\tCheat_Menu.append_amount_selection(4, 5);\r\n\tCheat_Menu.append_weapon_selection(6, 7, 8, 9);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Items\");\r\n\tCheat_Menu.append_amount_selection(4, 5);\r\n\tCheat_Menu.append_item_selection(6, 7, 8, 9);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Gold\");\r\n\tCheat_Menu.append_amount_selection(4, 5);\r\n\tCheat_Menu.append_gold_status(6, 7);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Stats\");\r\n\tCheat_Menu.append_actor_selection(4, 5);\r\n\tCheat_Menu.append_amount_selection(6, 7);\r\n\tCheat_Menu.append_stat_selection(8, 9, 0, '-');\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Give Exp\");\r\n\tCheat_Menu.append_actor_selection(4, 5);\r\n\tCheat_Menu.append_amount_selection(6, 7);\r\n\tCheat_Menu.append_exp_cheat(8, 9);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Party TP\");\r\n\r\n\tCheat_Menu.append_tp_cheats(4, 5, 6, 7, 8, 9);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Party MP\");\r\n\r\n\tCheat_Menu.append_mp_cheats(4, 5, 6, 7, 8, 9);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Party HP\");\r\n\r\n\tCheat_Menu.append_hp_cheats(4, 5, 6, 7, 8, 9);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"Enemy HP\");\r\n\r\n\tCheat_Menu.append_enemy_cheats(4, 5, 6, 7);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"No Clip\");\r\n\r\n\tCheat_Menu.append_no_clip_status(4);\r\n});\r\n\r\nCheat_Menu.menus.splice(0, 0, function() {\r\n\tCheat_Menu.append_cheat_title(\"God Mode\");\r\n\tCheat_Menu.append_actor_selection(4, 5);\r\n\r\n\tCheat_Menu.append_godmode_status();\r\n});\r\n\r\n\r\n// update whats being displayed in menu\r\nCheat_Menu.update_menu = function() {\r\n\t// clear menu\r\n\tCheat_Menu.overlay.innerHTML = \"\";\r\n\t// clear key listeners\r\n\tCheat_Menu.key_listeners = {};\r\n\r\n\tCheat_Menu.menus[Cheat_Menu.cheat_selected]();\r\n\r\n\tCheat_Menu.position_menu();\r\n};\r\n\r\n// listener to reposition menu\r\nwindow.addEventListener(\"resize\", Cheat_Menu.position_menu);\r\n\r\n\r\n// prevent clicking from passing through\r\nCheat_Menu.overlay.addEventListener(\"mousedown\", function(event) {\r\n\tevent.stopPropagation();\r\n});\r\n\r\n\r\n\r\n/////////////////////////////////////////////////\r\n// Cheat Menu Key Listener\r\n/////////////////////////////////////////////////\r\n\r\n// Key codes\r\nif (typeof Cheat_Menu.keyCodes == \"undefined\") { Cheat_Menu.keyCodes = {}; }\r\n\r\nCheat_Menu.keyCodes.KEYCODE_0 = {keyCode: 48, key_listener: 0};\r\nCheat_Menu.keyCodes.KEYCODE_1 = {keyCode: 49, key_listener: 1};\r\nCheat_Menu.keyCodes.KEYCODE_2 = {keyCode: 50, key_listener: 2};\r\nCheat_Menu.keyCodes.KEYCODE_3 = {keyCode: 51, key_listener: 3};\r\nCheat_Menu.keyCodes.KEYCODE_4 = {keyCode: 52, key_listener: 4};\r\nCheat_Menu.keyCodes.KEYCODE_5 = {keyCode: 53, key_listener: 5};\r\nCheat_Menu.keyCodes.KEYCODE_6 = {keyCode: 54, key_listener: 6};\r\nCheat_Menu.keyCodes.KEYCODE_7 = {keyCode: 55, key_listener: 7};\r\nCheat_Menu.keyCodes.KEYCODE_8 = {keyCode: 56, key_listener: 8};\r\nCheat_Menu.keyCodes.KEYCODE_9 = {keyCode: 57, key_listener: 9};\r\nCheat_Menu.keyCodes.KEYCODE_MINUS = {keyCode: 189, key_listener: '-'};\r\nCheat_Menu.keyCodes.KEYCODE_EQUAL = {keyCode: 187, key_listener: '='};\r\n\r\nCheat_Menu.keyCodes.KEYCODE_TILDE = {keyCode: 192, key_listener: '`'};\r\n\r\nCheat_Menu.key_listeners = {};\r\n\r\nwindow.addEventListener(\"keydown\", function(event) {\r\n\tif (!event.ctrlKey && !event.altKey && (event.keyCode === 119) && $gameTemp && !$gameTemp.isPlaytest()) {\r\n\t\t// open debug menu\r\n\t\tevent.stopPropagation();\r\n\t\tevent.preventDefault();\r\n\t\trequire('nw.gui').Window.get().showDevTools();\r\n\t}\r\n\telse if (!event.altKey && !event.ctrlKey && !event.shiftKey && (event.keyCode === 120) && $gameTemp && !$gameTemp.isPlaytest()) {\r\n\t\t// trick the game into thinking its a playtest so it will open the switch/variable debug menu\r\n\t\t$gameTemp._isPlaytest = true;\r\n\t\tsetTimeout(function() {\r\n\t\t\t// back to not being playtest\r\n\t\t\t$gameTemp._isPlaytest = false;\r\n\t\t}, 100);\r\n\t}\r\n\telse if (Cheat_Menu.overlay_openable && !event.altKey && !event.ctrlKey && !event.shiftKey) {\r\n\t\t// open and close menu\r\n\t\tif (event.keyCode == Cheat_Menu.keyCodes.KEYCODE_1.keyCode) {\r\n\t\t\tif (!Cheat_Menu.initialized) {\r\n\t\t\t\tfor (var i = 0; i < $gameActors._data.length; i++) {\r\n\t\t\t\t\tif($gameActors._data[i]) {\r\n\t\t\t\t\t\t$gameActors._data[i].god_mode = false;\r\n\t\t\t\t\t\tif ($gameActors._data[i].god_mode_interval) {\r\n\t\t\t\t\t\t\tclearInterval($gameActors._data[i].god_mode_interval);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// reset to inital values\r\n\t\t\t\tfor (var name in Cheat_Menu.initial_values) {\r\n\t\t\t\t\tCheat_Menu[name] = Cheat_Menu.initial_values[name];\r\n\t\t\t\t}\r\n\t\t\t\t// load saved values if they exist\r\n\t\t\t\tif ($gameSystem.Cheat_Menu) {\r\n\t\t\t\t\tfor (var name in $gameSystem.Cheat_Menu) {\r\n\t\t\t\t\t\tCheat_Menu[name] = $gameSystem.Cheat_Menu[name];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if speed is locked then initialize it so effect is active\r\n\t\t\t\tif (Cheat_Menu.speed_unlocked == false) {\r\n\t\t\t\t\tCheat_Menu.initialize_speed_lock();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// only do this once per load or new game\r\n\t\t\t\tCheat_Menu.initialized = true;\r\n\t\t\t}\r\n\r\n\t\t\t// open menu\r\n\t\t\tif (!Cheat_Menu.cheat_menu_open) {\r\n\t\t\t\tCheat_Menu.cheat_menu_open = true;\r\n\t\t\t\tdocument.body.appendChild(Cheat_Menu.overlay_box);\r\n\t\t\t\tdocument.body.appendChild(Cheat_Menu.overlay);\r\n\t\t\t\tCheat_Menu.update_menu();\r\n\t\t\t\tSoundManager.playSystemSound(1);\r\n\t\t\t}\r\n\t\t\t// close menu\r\n\t\t\telse {\r\n\t\t\t\tCheat_Menu.cheat_menu_open = false;\r\n\t\t\t\tCheat_Menu.overlay_box.remove();\r\n\t\t\t\tCheat_Menu.overlay.remove();\r\n\t\t\t\tSoundManager.playSystemSound(2);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// navigate and activate cheats\r\n\t\telse if (Cheat_Menu.cheat_menu_open) {\r\n\t\t\t// move menu position\r\n\t\t\tif (event.keyCode == Cheat_Menu.keyCodes.KEYCODE_TILDE.keyCode) {\r\n\t\t\t\tCheat_Menu.position++;\r\n\t\t\t\tif (Cheat_Menu.position > 4) {\r\n\t\t\t\t\tCheat_Menu.position = 0;\r\n\t\t\t\t}\r\n\t\t\t\tCheat_Menu.update_menu();\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tfor (var keyCode in Cheat_Menu.keyCodes) {\r\n\t\t\t\t\tif (Cheat_Menu.key_listeners[Cheat_Menu.keyCodes[keyCode].key_listener] && event.keyCode == Cheat_Menu.keyCodes[keyCode].keyCode) {\r\n\t\t\t\t\t\tCheat_Menu.key_listeners[Cheat_Menu.keyCodes[keyCode].key_listener](event);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\n\r\n\r\n/////////////////////////////////////////////////\r\n// Load Hook\r\n/////////////////////////////////////////////////\r\n\r\n// close the menu and set for initialization on first open\r\n//\ttimer to provide periodic updates if the menu is open\r\nCheat_Menu.initialize = function() {\r\n\tCheat_Menu.overlay_openable = true;\r\n\tCheat_Menu.initialized = false;\r\n\tCheat_Menu.cheat_menu_open = false;\r\n\tCheat_Menu.speed_initialized = false;\r\n\tCheat_Menu.overlay_box.remove();\r\n\tCheat_Menu.overlay.remove();\r\n\r\n\r\n\t// periodic update\r\n\tclearInterval(Cheat_Menu.menu_update_timer);\r\n\tCheat_Menu.menu_update_timer = setInterval(function() {\r\n\t\tif (Cheat_Menu.cheat_menu_open) {\r\n\t\t\tCheat_Menu.update_menu();\r\n\t\t}\r\n\t}, 1000);\r\n};\r\n\r\n// add hook for loading a game\r\nDataManager.default_loadGame = DataManager.loadGame;\r\nDataManager.loadGame = function(savefileId) {\r\n\tCheat_Menu.initialize();\r\n\r\n\treturn DataManager.default_loadGame(savefileId);\r\n};\r\n\r\n// add hook for new game\r\nDataManager.default_setupNewGame = DataManager.setupNewGame;\r\nDataManager.setupNewGame = function() {\r\n\tCheat_Menu.initialize();\r\n\r\n\tDataManager.default_setupNewGame();\r\n};\r\n\r\n// add hook for saving values (just added into $gameSystem to be saved)\r\nDataManager.default_saveGame = DataManager.saveGame;\r\nDataManager.saveGame = function(savefileId) {\r\n\t// save values that are in intial values\r\n\t$gameSystem.Cheat_Menu = {};\r\n\tfor (var name in Cheat_Menu.initial_values) {\r\n\t\t$gameSystem.Cheat_Menu[name] = Cheat_Menu[name];\r\n\t}\r\n\r\n\treturn DataManager.default_saveGame(savefileId);\r\n};\r\n"
  },
  {
    "path": "Extension_Example/Cheat_Menu_Cursed_Armor/plugins_patch.txt",
    "content": "{\"name\":\"Cheat_Menu_Cursed_Armor\",\"status\":true,\"description\":\"\",\"parameters\":{}}"
  },
  {
    "path": "Extension_Example/Cheat_Menu_Cursed_Armor/www/js/plugins/Cheat_Menu_Cursed_Armor.js",
    "content": "// Extension of the Cheat_Menu plugin for cheats specific to Cursed Armor by wolfzq\r\n//\tGeneral guidlines for creating similar plugins are provided\r\n//\tGame is NSFW so... you've been warned\r\n\r\n// Check if needed objects are already defined \r\n//\tthis is required in all plugins\r\n//\tthis allows the plugin and the original Cheat_Menu \r\n//\tplugin to be loaded in any order\r\nif (typeof Cheat_Menu == \"undefined\") { Cheat_Menu = {}; }\r\nif (typeof Cheat_Menu.initial_values == \"undefined\") { Cheat_Menu.initial_values = {}; }\r\nif (typeof Cheat_Menu.menus == \"undefined\") { Cheat_Menu.menus = []; }\r\nif (typeof Cheat_Menu.keyCodes == \"undefined\") { Cheat_Menu.keyCodes = {}; }\r\n\r\n\r\n//////////////////////////\r\n// Cheats Class \r\n//////////////////////////\r\n\r\n// Here I add new globals in the cheat menu object that are used for cheats\r\n\r\n// In this case I'm adding an index that selects the stats specific to the game\r\nCheat_Menu.wolf_stat_1_selection = 0;\r\n// The array of stats from the game (built later)\r\n// \tthese are then selected from the array with the above variable\r\nCheat_Menu.wolf_stats_1 = [];\r\n\r\n// Again another index for selection for some other stats specific to the game\r\nCheat_Menu.wolf_stat_2_selection = 0;\r\n// The array of stats from the game (built later)\r\n// \tthese are then selected from the array with the above variable\r\nCheat_Menu.wolf_stats_2 = [];\r\n\r\n\r\n/////////////////////////////////////////////////\r\n// Initial values for reseting on new game/load\r\n/////////////////////////////////////////////////\r\n\r\n// Here we can specifiy the initial value for any Cheat_Menu variables defined above\r\n//\tthis is applied on game load and new games\r\n// All values below are the inital values for a new saved game\r\n//\tupon loading a saved game these values will be loaded from the\r\n//\tsave game if possible overwriting the below values\r\n//\tBecause of this all of these variables should be non recursive\r\n\r\n// In this case I want my indexs for my selection to reset to the \r\n//\tfirst item in each list\r\nCheat_Menu.initial_values.wolf_stat_1_selection = 0;\r\nCheat_Menu.initial_values.wolf_stat_2_selection = 0;\r\n\r\n/////////////////////////////////////////////////\r\n// Cheat Functions\r\n/////////////////////////////////////////////////\r\n\r\n// Here I add the functions that will execute the cheats\r\n//\tthese will be called from the menu\r\n\r\n// Main Wolfzq Stats\r\nCheat_Menu.give_wolf_stat_1 = function(amount) {\r\n    $w.addP(Cheat_Menu.wolf_stats_1[Cheat_Menu.wolf_stat_1_selection], amount);\r\n}\r\n\r\n// Other Wolfzq Stats (counts of acts)\r\nCheat_Menu.give_wolf_stat_2 = function(amount) {\r\n    $w.addPC(Cheat_Menu.wolf_stats_2[Cheat_Menu.wolf_stat_2_selection], amount);\r\n}\r\n\r\n// Player Feel Down\r\nCheat_Menu.player_feel_down = function() {\r\n    $we._playerFeel = 0;\r\n}\r\n\r\n// Player Stamina Full\r\nCheat_Menu.player_stamina_full = function() {\r\n    $gameActors._data[1]._hp = $gameActors._data[1].mhp;\r\n}\r\n\r\n// Client Feel Up\r\nCheat_Menu.client_feel_up = function() {\r\n    $we._enemyFeel = $we._enemyMaxFeel - 1;\r\n}\r\n\r\n// Client Stamina Down\r\nCheat_Menu.client_stamina_down = function() {\r\n    $we._enemyHP -= Math.floor($we._enemyMaxHP / 10);\r\n}\r\n\r\n// Activate Sleep Event\r\nCheat_Menu.wolf_sleep_event = function() {\r\n    $gameTemp.reserveCommonEvent(12);\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////\r\n// Various functions to settup each page of the cheat menu\r\n/////////////////////////////////////////////////////////////\r\n\r\n// Now its time to create the functions that build each part of \r\n//\tthe new menus\r\n\r\n// To do this a number of helper functions are available\r\n\r\n////Cheat_Menu.append_scroll_selector(text, key1, key2, scroll_left_handler, scroll_right_handler)\r\n//\t\tinsert row with buttons to scroll left and right for some context\r\n//\t\t\r\n//\t\tappears as:\r\n//\t\t<-[key1] text [key2]->\r\n//\r\n//\t\tscrolling is handled by scroll_left_handler and scroll_right_handler functions\r\n//\r\n//\t\ttext: string \r\n// \t\tkey1,key2: key mapping\r\n//\t\tscroll_handler: single function that handles the left and right scroll arguments should be (direction, event)\r\n//\r\n//\t\tProvided selectors include:\r\n//\r\n////////Cheat_Menu.append_cheat_title(cheat_name)\r\n//\t\t\tMenu title with scroll options to go between menu, should be first\r\n//\t\t\tappend on each menu\r\n//\r\n////////Cheat_Menu.append_amount_selection(key1, key2)\r\n// \t\t\tappend the amount selection to the menu\r\n//\r\n//\r\n////Cheat_Menu.append_cheat(cheat_text, status_text, key, click_handler)\r\n//\t\tAppend a cheat with some handler to activate\r\n//\t\t\r\n//\t\tAppears as:\r\n//\t\tcheat text\tstatus text[key]\r\n//\r\n//\t\tcheat_text: string\r\n//\t\tstatus_text: string \r\n//\t\tkey: key mapping\r\n//\t\tclick_handler: function\r\n//\r\n//\r\n////Cheat_Menu.append_title(title) \r\n//\t\tInsert a title row\r\n//\t\tA row in the menu that is just text\r\n//\t\ttitle: string\r\n//\r\n//\r\n////Cheat_Menu.append_description(text) \r\n//\t\tInsert a desciption row\r\n//\t\tA row in the menu that is just text (smaller text than than title)\r\n//\t\ttext: string\r\n\r\n\r\n\r\n// Here I creat the left and right handlers for scrolling between wolfzq's stats\r\n//\tall these do is move my selection index around for the array that I have for\r\n//\tthe list of stats\r\n// The handlers determine if they are being called by left or right clicks or button\r\n//\tpresses by the checking the direction argument to see if it is \"left\" or \"right\"\r\nCheat_Menu.scroll_wolf_stat_1 = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.wolf_stat_1_selection--;\r\n\t\tif (Cheat_Menu.wolf_stat_1_selection < 0) {\r\n\t\t\tCheat_Menu.wolf_stat_1_selection = Cheat_Menu.wolf_stats_1.length;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.wolf_stat_1_selection++;\r\n\t\tif (Cheat_Menu.wolf_stat_1_selection >= Cheat_Menu.wolf_stats_1.length) {\r\n\t\t\tCheat_Menu.wolf_stat_1_selection = 0;\r\n\t\t}\r\n\t}\r\n\tSoundManager.playSystemSound(0); // neurtral menu/open sound\r\n\tCheat_Menu.update_menu();\t// if any of these functions should refresh the menu call this \r\n}\r\n\r\n// Again creating the handler, but this time for the other set of stats\r\nCheat_Menu.scroll_wolf_stat_2 = function(direction, event) {\r\n\tif (direction == \"left\") {\r\n\t\tCheat_Menu.wolf_stat_2_selection--;\r\n\t\tif (Cheat_Menu.wolf_stat_2_selection < 0) {\r\n\t\t\tCheat_Menu.wolf_stat_2_selection = Cheat_Menu.wolf_stats_2.length;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tCheat_Menu.wolf_stat_2_selection++;\r\n\t\tif (Cheat_Menu.wolf_stat_2_selection >= Cheat_Menu.wolf_stats_2.length) {\r\n\t\t\tCheat_Menu.wolf_stat_2_selection = 0;\r\n\t\t}\r\n\t}\r\n\tSoundManager.playSystemSound(0); // neurtral menu/open sound\r\n\t\r\n\tCheat_Menu.update_menu();\r\n}\r\n\r\n//\tThe handlers for updating the stats\r\n//\t\tthese are called what call the cheat functions in the above section\r\n//\t\tI generally also play a sound as well, but that isn't needed\r\n\r\n// For amounts I now use scroll events, again the direction of the \r\n//\tcalling function is determined by the direction argument\r\nCheat_Menu.apply_current_wolf_stat_1 = function(direction, event) {\r\n\tvar amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];\r\n\tif (direction == \"left\") {\r\n\t\tamount = -amount;\r\n\t\tSoundManager.playSystemSound(2); // negative sound\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1); // positive sound\r\n\t}\r\n    Cheat_Menu.give_wolf_stat_1(amount);\r\n\tCheat_Menu.update_menu();\r\n}\r\n\r\n//\tThe handler for updating the other stats\r\nCheat_Menu.apply_current_wolf_stat_2 = function(direction, event) {\r\n\tvar amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];\r\n\tif (direction == \"left\") {\r\n\t\tamount = -amount;\r\n\t\tSoundManager.playSystemSound(2); // negative sound\r\n\t}\r\n\telse {\r\n\t\tSoundManager.playSystemSound(1); // positive sound\r\n\t}\r\n    Cheat_Menu.give_wolf_stat_2(amount);\r\n\tCheat_Menu.update_menu();\r\n}\r\n\r\n// The functions that append each of the stat menus\r\nCheat_Menu.append_wolf_stat_1_selection = function(key1, key2, key3, key4) {\r\n    Cheat_Menu.append_title(\"Stat\");\r\n\r\n\tvar stat_string = \"\" + $w._paramsName[Cheat_Menu.wolf_stats_1[Cheat_Menu.wolf_stat_1_selection]];\r\n\r\n\t// a scroll selector with the left and right scrolling functions\r\n\tCheat_Menu.append_scroll_selector(stat_string, key1, key2, Cheat_Menu.scroll_wolf_stat_1);\r\n\tvar current_value = \"\" + $w._params[Cheat_Menu.wolf_stats_1[Cheat_Menu.wolf_stat_1_selection]];\r\n\r\n\t// a cheat function\r\n\tCheat_Menu.append_scroll_selector(current_value, key3, key4, Cheat_Menu.apply_current_wolf_stat_1);\r\n}\r\n\r\n// Same as above but for the other stats\r\nCheat_Menu.append_wolf_stat_2_selection = function(key1, key2, key3, key4) {\r\n    Cheat_Menu.append_title(\"Stat\");\r\n\r\n\tvar stat_string = \"\" + $w._paramsCountName[Cheat_Menu.wolf_stats_2[Cheat_Menu.wolf_stat_2_selection]];\r\n\r\n\tCheat_Menu.append_scroll_selector(stat_string, key1, key2, Cheat_Menu.scroll_wolf_stat_2);\r\n\tvar current_value = \"\" + $w._paramsCount[Cheat_Menu.wolf_stats_2[Cheat_Menu.wolf_stat_2_selection]];\r\n\r\n\tCheat_Menu.append_scroll_selector(current_value, key3, key4, Cheat_Menu.apply_current_wolf_stat_2);\r\n}\r\n\r\n// Here I create function to append each cheat for the 3rd menu\r\n//\tthese are for an ingame minigame\r\nCheat_Menu.append_minigame_cheats = function(key1, key2, key3, key4, key5) {\r\n    Cheat_Menu.append_cheat(\"Player Feel Down\", \"Activate\", key1, Cheat_Menu.player_feel_down);\r\n\tCheat_Menu.append_cheat(\"Player Stamina Full\", \"Activate\", key2, Cheat_Menu.player_stamina_full);\r\n\tCheat_Menu.append_cheat(\"Client Feel Up\", \"Activate\", key3, Cheat_Menu.client_feel_up);\r\n\tCheat_Menu.append_cheat(\"Client Stamina Down\", \"Activate\", key4, Cheat_Menu.client_stamina_down);\r\n\tCheat_Menu.append_title(\"Misc Cheats\");\r\n\tCheat_Menu.append_cheat(\"Sleep Event\", \"Activate\", key5, Cheat_Menu.wolf_sleep_event);\r\n}\r\n\r\n//////////////////////////////////////////////////////////////////////////////////\r\n// Final Functions for building each Menu and function list for updating the menu\r\n//////////////////////////////////////////////////////////////////////////////////\r\n\r\n// For the last step we must actually append the menus with the functions that create them\r\n// \tthese are all added the Cheat_Menu.menus list which is responsible for creating cycling\r\n//\tbetween the menus\r\n\r\nCheat_Menu.menus[Cheat_Menu.menus.length] = function() {\r\n\t// all cheat menus should have a title cheat as it \r\n\t//\tprovides the scroll for switching between cheats\r\n    Cheat_Menu.append_cheat_title(\"Cursed Stats 1\"); \r\n\r\n\t// bulding the list of stats if they haven't been built already, this is game specific\r\n\tif (Cheat_Menu.wolf_stats_1.length == 0) {\r\n\t\tfor (var name in $w._params) {\r\n\t\t\tCheat_Menu.wolf_stats_1[Cheat_Menu.wolf_stats_1.length] = name;\r\n\t\t}\r\n\t}\r\n\r\n    Cheat_Menu.append_amount_selection(4, 5);\r\n    Cheat_Menu.append_wolf_stat_1_selection(6, 7, 8, 9);\r\n};\r\n\r\nCheat_Menu.menus[Cheat_Menu.menus.length] = function() {\r\n    Cheat_Menu.append_cheat_title(\"Cursed Stats 2\");\r\n\r\n\t// bulding the list of stats if they haven't been built already, this is game specific\r\n\tif (Cheat_Menu.wolf_stats_2.length == 0) {\r\n\t\tfor (var name in $w._paramsCount) {\r\n\t\t\tCheat_Menu.wolf_stats_2[Cheat_Menu.wolf_stats_2.length] = name;\r\n\t\t}\r\n\t}\r\n\r\n    Cheat_Menu.append_amount_selection(4, 5);\r\n    Cheat_Menu.append_wolf_stat_2_selection(6, 7, 8, 9);\r\n};\r\n\r\nCheat_Menu.menus[Cheat_Menu.menus.length] = function() {\r\n    Cheat_Menu.append_cheat_title(\"Cursed Minigame Cheats\");\r\n    Cheat_Menu.append_minigame_cheats(4, 5, 6, 7, 8);\r\n};\r\n\r\n// Misc\r\n// New KeyCodes can be added with\r\n// Cheat_Menu.keyCodes.NAME = {keyCode: KEYCODE, key_listener: MAPPING};\r\n//\t\tNAME: is the name for the mapping (can be any valid variable name)\r\n//\t\tKEYCODE: is the keyCode (number) of the button press for the keydown event\r\n//\t\tMAPPING: is the char/num/string mapping you pass into the append function\r\n//\t\t\t\t\tthis will also appear as the text on the menu\r\n\r\n// Everything else will be handled by the main Cheat_Menu plugin\r\n"
  },
  {
    "path": "Extension_Example/Encounters/plugins_patch.txt",
    "content": "{\"name\":\"Cheat_Menu_Encounters\",\"status\":true,\"description\":\"\",\"parameters\":{}}"
  },
  {
    "path": "Extension_Example/Encounters/www/js/plugins/Cheat_Menu_Encounters.js",
    "content": "// Extension of the Cheat_Menu plugin for cheats specific to Cursed Armor by wolfzq\n//\tGeneral guidlines for creating similar plugins are provided\n//\tGame is NSFW so... you've been warned\n\n// Check if needed objects are already defined \n//\tthis is required in all plugins\n//\tthis allows the plugin and the original Cheat_Menu \n//\tplugin to be loaded in any order\nif (typeof Cheat_Menu == \"undefined\") { Cheat_Menu = {}; }\nif (typeof Cheat_Menu.initial_values == \"undefined\") { Cheat_Menu.initial_values = {}; }\nif (typeof Cheat_Menu.menus == \"undefined\") { Cheat_Menu.menus = []; }\nif (typeof Cheat_Menu.keyCodes == \"undefined\") { Cheat_Menu.keyCodes = {}; }\n\n\n//////////////////////////\n// Cheats Class \n//////////////////////////\n\n// Here I add new globals in the cheat menu object that are used for cheats\n\n// interval for setting encounter to fixed value\nCheat_Menu.encounterInterval = null;\nCheat_Menu.encounterIntervalValue = 1;\n\n\n\n/////////////////////////////////////////////////\n// Initial values for reseting on new game/load\n/////////////////////////////////////////////////\n\n// Here we can specifiy the initial value for any Cheat_Menu variables defined above\n//\tthis is applied on game load and new games\n// All values below are the inital values for a new saved game\n//\tupon loading a saved game these values will be loaded from the\n//\tsave game if possible overwriting the below values\n//\tBecause of this all of these variables should be non recursive\n\n\n/////////////////////////////////////////////////\n// Cheat Functions\n/////////////////////////////////////////////////\n\n// Here I add the functions that will execute the cheats\n//\tthese will be called from the menu\n\n// freeze encounter value\nCheat_Menu.freezeEncounterValue = function() {\n    Cheat_Menu.encounterIntervalValue = $gamePlayer._encounterCount;\n\tclearInterval(Cheat_Menu.encounterInterval);\n\tCheat_Menu.encounterInterval = setInterval(function(){\n\t\t$gamePlayer._encounterCount = Cheat_Menu.encounterIntervalValue;\n\t},100);\n\tSoundManager.playSystemSound(1);\n\tCheat_Menu.update_menu();\n}\n\n// unfreeze encounter value\nCheat_Menu.unfreezeEncounterValue = function() {\n\tclearInterval(Cheat_Menu.encounterInterval);\n\tCheat_Menu.encounterInterval = null;\n\tSoundManager.playSystemSound(2);\n\tCheat_Menu.update_menu();\n}\n\nCheat_Menu.change_encounter_steps = function(amount) {\n\tCheat_Menu.encounterIntervalValue += amount;\n\t$gamePlayer._encounterCount += amount;\n}\n\n\n/////////////////////////////////////////////////////////////\n// Various functions to settup each page of the cheat menu\n/////////////////////////////////////////////////////////////\n\n// Now its time to create the functions that build each part of \n//\tthe new menus\n\n// To do this a number of helper functions are available\n\n////Cheat_Menu.append_scroll_selector(text, key1, key2, scroll_left_handler, scroll_right_handler)\n//\t\tinsert row with buttons to scroll left and right for some context\n//\t\t\n//\t\tappears as:\n//\t\t<-[key1] text [key2]->\n//\n//\t\tscrolling is handled by scroll_left_handler and scroll_right_handler functions\n//\n//\t\ttext: string \n// \t\tkey1,key2: key mapping\n//\t\tscroll_handler: single function that handles the left and right scroll arguments should be (direction, event)\n//\n//\t\tProvided selectors include:\n//\n////////Cheat_Menu.append_cheat_title(cheat_name)\n//\t\t\tMenu title with scroll options to go between menu, should be first\n//\t\t\tappend on each menu\n//\n////////Cheat_Menu.append_amount_selection(key1, key2)\n// \t\t\tappend the amount selection to the menu\n//\n//\n////Cheat_Menu.append_cheat(cheat_text, status_text, key, click_handler)\n//\t\tAppend a cheat with some handler to activate\n//\t\t\n//\t\tAppears as:\n//\t\tcheat text\tstatus text[key]\n//\n//\t\tcheat_text: string\n//\t\tstatus_text: string \n//\t\tkey: key mapping\n//\t\tclick_handler: function\n//\n//\n////Cheat_Menu.append_title(title) \n//\t\tInsert a title row\n//\t\tA row in the menu that is just text\n//\t\ttitle: string\n//\n//\n////Cheat_Menu.append_description(text) \n//\t\tInsert a desciption row\n//\t\tA row in the menu that is just text (smaller text than than title)\n//\t\ttext: string\n\n\nCheat_Menu.encounterScrollHandler = function(direction, event) {\n\tvar amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];\n\tif (direction == \"left\") {\n\t\tamount = -amount;\n\t\tSoundManager.playSystemSound(2);\n\t}\n\telse {\n\t\tSoundManager.playSystemSound(1);\n\t}\n\tCheat_Menu.change_encounter_steps(amount);\n\tCheat_Menu.update_menu();\n}\n\n\n\n//\tThe handlers for updating the stats\n//\t\tthese are called what call the cheat functions in the above section\n//\t\tI generally also play a sound as well, but that isn't needed\n\n// For amounts I now use scroll events, again the direction of the \n//\tcalling function is determined by the direction argument\n\n\n// The functions that append each of the stat menus\nCheat_Menu.append_encounter_cheats = function(key1, key2, key3, key4, key5) {\n\tCheat_Menu.append_amount_selection(key1, key2);\n\tCheat_Menu.append_scroll_selector($gamePlayer._encounterCount, key3, key4, Cheat_Menu.encounterScrollHandler)\n\tCheat_Menu.append_cheat(\"Freeze\", (Cheat_Menu.encounterInterval == null ? \"<font color='#ff0000'>false</font>\" : \"<font color='#00ff00'>true</font>\"), key5, (Cheat_Menu.encounterInterval == null ? Cheat_Menu.freezeEncounterValue : Cheat_Menu.unfreezeEncounterValue))\n}\n\n\n\n//////////////////////////////////////////////////////////////////////////////////\n// Final Functions for building each Menu and function list for updating the menu\n//////////////////////////////////////////////////////////////////////////////////\n\n// For the last step we must actually append the menus with the functions that create them\n// \tthese are all added the Cheat_Menu.menus list which is responsible for creating cycling\n//\tbetween the menus\n\nCheat_Menu.menus[Cheat_Menu.menus.length] = function() {\n\t// all cheat menus should have a title cheat as it \n\t//\tprovides the scroll for switching between cheats\n    Cheat_Menu.append_cheat_title(\"Encounters\"); \n    Cheat_Menu.append_encounter_cheats(4, 5, 6, 7, 8);\n};\n\n\n\n// Misc\n// New KeyCodes can be added with\n// Cheat_Menu.keyCodes.NAME = {keyCode: KEYCODE, key_listener: MAPPING};\n//\t\tNAME: is the name for the mapping (can be any valid variable name)\n//\t\tKEYCODE: is the keyCode (number) of the button press for the keydown event\n//\t\tMAPPING: is the char/num/string mapping you pass into the append function\n//\t\t\t\t\tthis will also appear as the text on the menu\n\n// Everything else will be handled by the main Cheat_Menu plugin\n"
  },
  {
    "path": "README.md",
    "content": "RPG Maker MV Cheat Menu Plugin\r\n==============================\r\n\r\nI've created a plugin for RPG Maker MV that allows users to access a Cheat Menu in game. The controls are all input via the number keys \\[0\\]\\-\\[9\\] (not the NUMPAD) (other keys may be used as well now) or the mouse.\r\n\r\nOpen the Menu by pressing the \\[1\\] Key.  \r\nMove menu to different positions with \\` (key with tilde ~)  \r\nScroll between cheats with \\[2\\] and \\[3\\] Keys.  \r\nAny \\[#\\] indicates a number key to press to cause an action, if you don't want to click.  \r\n\r\nThe menu can also be interacted with by clicking (everything except opening the menu can be done with the mouse).  \r\nClicking is done with left click and clickable elements will be highlighted red on hover over.\r\n\r\nAvailable Cheats Are\r\n--------------------\r\n\r\n* God Mode for any Actor (infinite hp and mp, skills shouldn't cost anything)\r\n* Set Enemy/Party HP to 0 hp or 1 hp, Party Full Recover (HP, MP, Status)\r\n* Toggle No Clip\r\n* Edit Exp\r\n* Edit Stats\r\n* Edit Gold\r\n* Edit Items, Weapons, Armor\r\n* Change player movement speed\r\n* Clear Status/States Effects\r\n* Edit Variables/Switches\r\n* Save/Recall Location and Teleport\r\n  * Be careful not to skip game events\r\n  * If you teleport off the map lower X,Y and teleport again to fix it.\r\n* Open javascript console/developer tools with F8\r\n  * With this you can edit game Variables and Switches (at your own risk) in the $gameVariables and $gameSwitches, as well as other advanced stuff\r\n* Open Switch/Variable Debug Menu from playtest Mode with F9\r\n  * Better/easier method for editing the Switches and Variables than using the console, slower if you want to edit variables by large amounts\r\n \r\nDownloads\r\n---------\r\n\r\nDownload or Clone from above repository link or click the link below\r\n\r\nDownload: [GitHub](https://github.com/emerladCoder/RPG-Maker-MV-Cheat-Menu-Plugin/archive/master.zip)\r\n\r\nI've tested this to work with Cursed Armor and 魔王イリスの逆襲[RJ176175] (both are NSFW)\r\n\r\n \r\nInstall\r\n-------\r\n\r\n* Unpack Game if needed (if you have a single large Game.exe with no /www folder, etc.).\r\n  * I used to use EnigmaVBUnpacker tool by [Kao](https://lifeinhex.com/) (most new games do not require this anymore)\r\n* Copy and Paste this contents of Cheat_Menu folder into folder with Game.exe\r\n* Patch your www/js/plugins.js  \r\n  * Backup your www/js/plugins.js file\r\n  * Patch\r\n      * Run MVPluginPatcher.exe  \r\n        or\r\n      * Manually Add the following to your plugins.js file, ensure you follow proper JavaScript formating for the $plugins array and include a , at end of the line before where you add this (recommended to add the bottom of plugins.js file)\r\n        * {\"name\":\"Cheat_Menu\",\"status\":true,\"description\":\"\",\"parameters\":{}}\r\n * Delete MVPluginPatcher.exe and plugins_patch.txt\r\n\r\nIf the www/js/plugins.js is read only, remove that in the properties or the patch with fail. \r\n\r\nSome games might have have altered the plugin loading mechanism (for example using a single composite plugin to save space). In this case you should open the GameFolder/www/js/main.js and insert the code as shown below in order to get any extra plugins to load.\r\n\r\n```javascript\r\n//=============================================================================\r\n// main.js\r\n//=============================================================================\r\n\r\nPluginManager.setup($plugins);\r\n\r\n// Insert the code below, change plugin name if loading something besides Cheat_Menu\r\nPluginManager._path= 'js/plugins/'; \r\nPluginManager.loadScript('Cheat_Menu.js');\r\n// End Insert\r\n\r\nwindow.onload = function() {\r\n    SceneManager.run(Scene_Boot);\r\n};\r\n\r\n```\r\n \r\nUninstall\r\n---------\r\n\r\n* Delete www/js/plugins/Cheat_Menu.js and www/js/plugins/Cheat_Menu.css\r\n* Remove plugin entry from www/js/plugins.js\r\n  * Be sure to remove the comma from new last entry if this plugin was last in the list\r\n  * Ideally you can just restore you backup of plugins.js\r\n* Delete MVPluginPatcher.exe and plugins_patch.txt if you haven't already\r\n\r\nOther RPG Maker MV Links\r\n----------------\r\nOriginal ULMF thread for this plugin: [thread](http://www.ulmf.org/bbs/showthread.php?t=28982)\r\n\r\nI might also suggest Libellule's text hook for untranslated games: [thread](http://www.ulmf.org/bbs/showthread.php?t=29359)  \r\nIt has a packaged version of my Cheat Menu, just note it is outdated at the moment so if you install my plugin with his patcher just overwrite with the /www folder downloaded from the most recent version here.\r\n\r\nFroggus has a save editor that works with a bunch of versions of RPG maker games including MV: [thread](http://www.ulmf.org/bbs/showthread.php?t=28936)\r\n"
  },
  {
    "path": "src/MVPluginPatcher/MVPluginPatcher/MVPluginPatcher.vcxproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup Label=\"ProjectConfigurations\">\r\n    <ProjectConfiguration Include=\"Debug|Win32\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|Win32\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>Win32</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Debug|x64\">\r\n      <Configuration>Debug</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n    <ProjectConfiguration Include=\"Release|x64\">\r\n      <Configuration>Release</Configuration>\r\n      <Platform>x64</Platform>\r\n    </ProjectConfiguration>\r\n  </ItemGroup>\r\n  <PropertyGroup Label=\"Globals\">\r\n    <ProjectGuid>{71FC68C2-4B32-4EE9-A722-FB0F08162373}</ProjectGuid>\r\n    <Keyword>Win32Proj</Keyword>\r\n    <RootNamespace>MVPluginPatcher</RootNamespace>\r\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v143</PlatformToolset>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <PlatformToolset>v143</PlatformToolset>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>true</UseDebugLibraries>\r\n    <PlatformToolset>v143</PlatformToolset>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\r\n    <ConfigurationType>Application</ConfigurationType>\r\n    <UseDebugLibraries>false</UseDebugLibraries>\r\n    <PlatformToolset>v143</PlatformToolset>\r\n    <WholeProgramOptimization>true</WholeProgramOptimization>\r\n    <CharacterSet>Unicode</CharacterSet>\r\n  </PropertyGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\r\n  <ImportGroup Label=\"ExtensionSettings\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"Shared\">\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\r\n  </ImportGroup>\r\n  <PropertyGroup Label=\"UserMacros\" />\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <LinkIncremental>true</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <LinkIncremental>true</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <LinkIncremental>false</LinkIncremental>\r\n  </PropertyGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <Optimization>Disabled</Optimization>\r\n      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\r\n    <ClCompile>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <Optimization>Disabled</Optimization>\r\n      <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\r\n    <ClCompile>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\r\n    <ClCompile>\r\n      <WarningLevel>Level3</WarningLevel>\r\n      <PrecompiledHeader>\r\n      </PrecompiledHeader>\r\n      <Optimization>MaxSpeed</Optimization>\r\n      <FunctionLevelLinking>true</FunctionLevelLinking>\r\n      <IntrinsicFunctions>true</IntrinsicFunctions>\r\n      <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n    </ClCompile>\r\n    <Link>\r\n      <SubSystem>Console</SubSystem>\r\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n      <OptimizeReferences>true</OptimizeReferences>\r\n      <GenerateDebugInformation>true</GenerateDebugInformation>\r\n    </Link>\r\n  </ItemDefinitionGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"main.cpp\" />\r\n  </ItemGroup>\r\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\r\n  <ImportGroup Label=\"ExtensionTargets\">\r\n  </ImportGroup>\r\n</Project>"
  },
  {
    "path": "src/MVPluginPatcher/MVPluginPatcher/MVPluginPatcher.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <ItemGroup>\r\n    <Filter Include=\"Source Files\">\r\n      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r\n      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r\n    </Filter>\r\n    <Filter Include=\"Header Files\">\r\n      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r\n      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>\r\n    </Filter>\r\n    <Filter Include=\"Resource Files\">\r\n      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r\n      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r\n    </Filter>\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <ClCompile Include=\"main.cpp\">\r\n      <Filter>Source Files</Filter>\r\n    </ClCompile>\r\n  </ItemGroup>\r\n</Project>"
  },
  {
    "path": "src/MVPluginPatcher/MVPluginPatcher/MVPluginPatcher.vcxproj.user",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n  <PropertyGroup />\r\n</Project>"
  },
  {
    "path": "src/MVPluginPatcher/MVPluginPatcher/main.cpp",
    "content": "#include <iostream>\r\n#include <fstream>\r\n#include <sstream>\r\n#include <string>\r\n\r\n\r\nusing namespace std;\r\n\r\nint main() {\r\n\t// find the plugin.js file\r\n\tstring plugins_path;\r\n\tif (FILE* file = fopen(\"www/js/plugins.js\", \"r\")) {\r\n\t\tfclose(file);\r\n\t\tplugins_path = \"www/js/plugins.js\";\r\n\t}\r\n\telse if (FILE* file = fopen(\"js/plugins.js\", \"r\")) {\r\n\t\tfclose(file);\r\n\t\tplugins_path = \"js/plugins.js\";\r\n\t}\r\n\telse {\r\n\t\tcout << \"Could not find plugins.js\\n\";\r\n\t}\r\n\r\n\t// open the plugin.js file\r\n\tifstream plugins_js;\r\n\tplugins_js.open(plugins_path);\r\n\r\n\t//  check for error opening\r\n\tif (!plugins_js.is_open()) {\r\n\t\tcout << \"Could not open plugins.js\\n\";\r\n\t}\r\n\r\n\t// read in and convert to string\r\n\tstring plugin_js_string((istreambuf_iterator<char>(plugins_js)), istreambuf_iterator<char>());\r\n\tplugins_js.close();\r\n\r\n\t// open the plugins_patch file\r\n\tifstream patch;\r\n\tpatch.open(\"plugins_patch.txt\");\r\n\r\n\t// check for error opening\r\n\tif (!patch.is_open()) {\r\n\t\tcout << \"Could not open patch.txt\\n\";\r\n\t}\r\n\r\n\t// read in and convert to string\r\n\tstring patch_string((istreambuf_iterator<char>(patch)), istreambuf_iterator<char>());\r\n\tpatch.close();\r\n\r\n\t// create stringstream for patch string\r\n\tstringstream patch_string_ss(patch_string);\r\n\r\n\tbool is_empty = false;\r\n\tsize_t insertion_point = plugin_js_string.find_last_of('}');\r\n\r\n\t// Check that there was at least some plugin \r\n\tif (insertion_point == string::npos) {\r\n\t\tinsertion_point = plugin_js_string.find_last_of(']') - 1;\r\n\t\tis_empty = true;\r\n\t}\r\n\telse {\r\n\t\tinsertion_point++;\r\n\t}\r\n\r\n\tstring line;\r\n\t// go through each line and add the plugins\r\n\twhile (getline(patch_string_ss, line)) {\r\n\t\tif (line.size() > 0 && line[0] == '{') {\r\n\t\t\tif (plugin_js_string.find(line) == string::npos) {\r\n\t\t\t\t// handling for empty (no comma on previous line)\r\n\t\t\t\tif (is_empty) {\r\n\t\t\t\t\tline.insert(0, \"\\n\");\r\n\t\t\t\t\tis_empty = false;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tline.insert(0, \",\\n\");\r\n\t\t\t\t}\r\n\t\t\t\tplugin_js_string.insert(insertion_point, line);\r\n\t\t\t\t// move point to after newly inserted\r\n\t\t\t\tinsertion_point += line.length();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// writeback the new plugins\r\n\tofstream plugin_js_write;\r\n\tplugin_js_write.open(plugins_path, ios::binary | ios::trunc);\r\n\r\n\t// close the file\r\n\tplugin_js_write.write(plugin_js_string.c_str(), plugin_js_string.size());\r\n\tplugin_js_write.close();\r\n\r\n}"
  },
  {
    "path": "src/MVPluginPatcher/MVPluginPatcher/plugins_patch.txt",
    "content": "{\"name\":\"Cheat_Menu\",\"status\":true,\"description\":\"\",\"parameters\":{}}\r\n{\"name\":\"OTHER_PLUGIN\",\"status\":true,\"description\":\"\",\"parameters\":{}}"
  },
  {
    "path": "src/MVPluginPatcher/MVPluginPatcher/www/js/plugins.js",
    "content": "// Generated by RPG Maker.\n// Do not edit this file directly.\nvar $plugins =\n[\n{\"name\":\"Cheat_Menu\",\"status\":true,\"description\":\"\",\"parameters\":{}},\n{\"name\":\"OTHER_PLUGIN\",\"status\":true,\"description\":\"\",\"parameters\":{}}\n];\n"
  },
  {
    "path": "src/MVPluginPatcher/MVPluginPatcher/www/js/plugins_empty_example.js",
    "content": "// Generated by RPG Maker.\n// Do not edit this file directly.\nvar $plugins =\n[\n];\n"
  },
  {
    "path": "src/MVPluginPatcher/MVPluginPatcher/www/js/plugins_full_example.js",
    "content": "// Generated by RPG Maker.\n// Do not edit this file directly.\nvar $plugins =\n[\n{\"name\":\"Clipboard_llule\",\"status\":true,\"description\":\"\",\"parameters\":{}},\n{\"name\":\"Speedhax\",\"status\":true,\"description\":\"\",\"parameters\":{}}\n];\n"
  },
  {
    "path": "src/MVPluginPatcher/MVPluginPatcher.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 14\r\nVisualStudioVersion = 14.0.24720.0\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"MVPluginPatcher\", \"MVPluginPatcher\\MVPluginPatcher.vcxproj\", \"{71FC68C2-4B32-4EE9-A722-FB0F08162373}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|x64 = Debug|x64\r\n\t\tDebug|x86 = Debug|x86\r\n\t\tRelease|x64 = Release|x64\r\n\t\tRelease|x86 = Release|x86\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Debug|x64.ActiveCfg = Debug|x64\r\n\t\t{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Debug|x64.Build.0 = Debug|x64\r\n\t\t{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Debug|x86.ActiveCfg = Debug|Win32\r\n\t\t{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Debug|x86.Build.0 = Debug|Win32\r\n\t\t{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Release|x64.ActiveCfg = Release|x64\r\n\t\t{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Release|x64.Build.0 = Release|x64\r\n\t\t{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Release|x86.ActiveCfg = Release|Win32\r\n\t\t{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Release|x86.Build.0 = Release|Win32\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  }
]