Repository: emerladCoder/RPG-Maker-MV-Cheat-Menu-Plugin
Branch: master
Commit: 3e789f4d5584
Files: 19
Total size: 94.0 KB
Directory structure:
gitextract_iuilpbhz/
├── .gitignore
├── Cheat_Menu/
│ ├── patchPlugins.sh
│ ├── plugins_patch.txt
│ └── www/
│ └── js/
│ └── plugins/
│ ├── Cheat_Menu.css
│ └── Cheat_Menu.js
├── Extension_Example/
│ ├── Cheat_Menu_Cursed_Armor/
│ │ ├── plugins_patch.txt
│ │ └── www/
│ │ └── js/
│ │ └── plugins/
│ │ └── Cheat_Menu_Cursed_Armor.js
│ └── Encounters/
│ ├── plugins_patch.txt
│ └── www/
│ └── js/
│ └── plugins/
│ └── Cheat_Menu_Encounters.js
├── README.md
└── src/
└── MVPluginPatcher/
├── MVPluginPatcher/
│ ├── MVPluginPatcher.vcxproj
│ ├── MVPluginPatcher.vcxproj.filters
│ ├── MVPluginPatcher.vcxproj.user
│ ├── main.cpp
│ ├── plugins_patch.txt
│ └── www/
│ └── js/
│ ├── plugins.js
│ ├── plugins_empty_example.js
│ └── plugins_full_example.js
└── MVPluginPatcher.sln
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
src/MVPluginPatcher/.vs
src/MVPluginPatcher/Debug
src/MVPluginPatcher/Release
src/MVPluginPatcher/x64
src/MVPluginPatcher/MVPluginPatcher/Debug
src/MVPluginPatcher/MVPluginPatcher/Release
src/MVPluginPatcher/MVPluginPatcher/x64
*.sdf
================================================
FILE: Cheat_Menu/patchPlugins.sh
================================================
#!/bin/sh
[ "$(id -u)" = 0 ] && echo "Please run without root perms" && exit
echo "Searching for and patching RPGM Plugins.js"
PATTERN='/];/i ,{"name":"Cheat_Menu","status":true,"description":"","parameters":{}}'
if [ -f "www/js/plugins.js" ]; then
cp -v www/js/plugins.js www/js/plugins.js~ 2>/dev/null &&
sed -i "$PATTERN" www/js/plugins.js
elif [ -f "js/plugins.js" ]; then
cp -v js/plugins.js js/plugins.js~ 2>/dev/null &&
sed -i "$PATTERN" js/plugins.js
else
echo "No RPGM installation found."
fi
================================================
FILE: Cheat_Menu/plugins_patch.txt
================================================
{"name":"Cheat_Menu","status":true,"description":"","parameters":{}}
================================================
FILE: Cheat_Menu/www/js/plugins/Cheat_Menu.css
================================================
#cheat_menu{
position: absolute;
width: 280px;
height: 100px;
z-index: 1000;
background-color: #000000;
color: #ffffff;
opacity: 0.75;
text-align: center;
padding: 10px;
}
#cheat_menu_text{
position: absolute;
width: 300px;
z-index: 1001;
background-color: transparent;
color: #ffffff;
opacity: 1;
text-align: center;
padding: 10px;
border-spacing: 0;
}
.scroll_selector_row {
width: 100%;
text-align: center;
}
.scroll_selector_buttons:hover {
color: #ff0000;
text-shadow: 0 0 5px #ff0000;
}
.cheat_menu_buttons:hover {
color: #ff0000;
text-shadow: 0 0 5px #ff0000;
}
.cheat_menu_cell {
border-bottom: 1px solid #6f6f6f;
max-width: 100px;
width: 100px;
font-weight: normal;
font-size: 15px;
padding-top: 5px;
padding-bottom: 5px;
}
.cheat_menu_cell_title {
max-width: 100px;
width: 100px;
font-weight: bold;
font-size: 20px;
padding-top: 8px;
padding-bottom: 5px;
}
================================================
FILE: Cheat_Menu/www/js/plugins/Cheat_Menu.js
================================================
/////////////////////////////////////////////////
// Cheat Menu Plugin Class
/////////////////////////////////////////////////
// Check if already defined (allows game specific extensions to be loaded in any order)
if (typeof Cheat_Menu == "undefined") { Cheat_Menu = {}; }
Cheat_Menu.initialized = false;
Cheat_Menu.cheat_menu_open = false;
Cheat_Menu.overlay_openable = false;
Cheat_Menu.position = 1;
Cheat_Menu.menu_update_timer = null;
Cheat_Menu.cheat_selected = 0;
Cheat_Menu.cheat_selected_actor = 1;
Cheat_Menu.amounts = [1, 10, 100, 1000, 10000, 100000, 1000000];
Cheat_Menu.amount_index = 0;
Cheat_Menu.stat_selection = 0;
Cheat_Menu.item_selection = 1;
Cheat_Menu.weapon_selection = 1;
Cheat_Menu.armor_selection = 1;
Cheat_Menu.move_amounts = [0.5, 1, 1.5, 2];
Cheat_Menu.move_amount_index = 1;
Cheat_Menu.variable_selection = 1;
Cheat_Menu.switch_selection = 1;
Cheat_Menu.saved_positions = [{m: -1, x: -1, y: -1}, {m: -1, x: -1, y: -1}, {m: -1, x: -1, y: -1}];
Cheat_Menu.teleport_location = {m: 1, x: 0, y: 0};
Cheat_Menu.speed = null;
Cheat_Menu.speed_unlocked = true;
Cheat_Menu.speed_initialized = false;
/////////////////////////////////////////////////
// Initial values for reseting on new game/load
/////////////////////////////////////////////////
// Check if already defined (allows game specific extensions to be loaded in any order)
if (typeof Cheat_Menu.initial_values == "undefined") { Cheat_Menu.initial_values = {}; }
// All values below are the inital values for a new saved game
// upon loading a saved game these values will be loaded from the
// save game if possible overwriting the below values
// Because of this all of these variables should be non recursive
Cheat_Menu.initial_values.position = 1;
Cheat_Menu.initial_values.cheat_selected = 0;
Cheat_Menu.initial_values.cheat_selected_actor = 1;
Cheat_Menu.initial_values.amount_index = 0;
Cheat_Menu.initial_values.stat_selection = 0;
Cheat_Menu.initial_values.item_selection = 1;
Cheat_Menu.initial_values.weapon_selection = 1;
Cheat_Menu.initial_values.armor_selection = 1;
Cheat_Menu.initial_values.move_amount_index = 1;
Cheat_Menu.initial_values.variable_selection = 1;
Cheat_Menu.initial_values.switch_selection = 1;
Cheat_Menu.initial_values.saved_positions = [{m: -1, x: -1, y: -1}, {m: -1, x: -1, y: -1}, {m: -1, x: -1, y: -1}];
Cheat_Menu.initial_values.teleport_location = {m: 1, x: 0, y: 0};
Cheat_Menu.initial_values.speed = null;
Cheat_Menu.initial_values.speed_unlocked = true;
/////////////////////////////////////////////////
// Cheat Functions
/////////////////////////////////////////////////
// enable god mode for an actor
Cheat_Menu.god_mode = function(actor) {
if (actor instanceof Game_Actor && !(actor.god_mode)) {
actor.god_mode = true;
actor.gainHP_bkup = actor.gainHp;
actor.gainHp = function(value) {
value = this.mhp;
this.gainHP_bkup(value);
};
actor.setHp_bkup = actor.setHp;
actor.setHp = function(hp) {
hp = this.mhp;
this.setHp_bkup(hp);
};
actor.gainMp_bkup = actor.gainMp;
actor.gainMp = function (value) {
value = this.mmp;
this.gainMp_bkup(value);
};
actor.setMp_bkup = actor.setMp;
actor.setMp = function(mp) {
mp = this.mmp;
this.setMp_bkup(mp);
};
actor.gainTp_bkup = actor.gainTp;
actor.gainTp = function (value) {
value = this.maxTp();
this.gainTp_bkup(value);
};
actor.setTp_bkup = actor.setTp;
actor.setTp = function(tp) {
tp = this.maxTp();
this.setTp_bkup(tp);
};
actor.paySkillCost_bkup = actor.paySkillCost;
actor.paySkillCost = function (skill) {
// do nothing
};
actor.god_mode_interval = setInterval(function() {
actor.gainHp(actor.mhp);
actor.gainMp(actor.mmp);
actor.gainTp(actor.maxTp());
}, 100);
}
};
// disable god mode for an actor
Cheat_Menu.god_mode_off = function(actor) {
if (actor instanceof Game_Actor && actor.god_mode) {
actor.god_mode = false;
actor.gainHp = actor.gainHP_bkup;
actor.setHp = actor.setHp_bkup;
actor.gainMp = actor.gainMp_bkup;
actor.setMp = actor.setMp_bkup;
actor.gainTp = actor.gainTp_bkup;
actor.setTp = actor.setTp_bkup;
actor.paySkillCost = actor.paySkillCost_bkup;
clearInterval(actor.god_mode_interval);
}
};
// set all party hp
Cheat_Menu.set_party_hp = function(hp, alive) {
var members = $gameParty.allMembers();
for (var i = 0; i < members.length; i++) {
if ((alive && members[i]._hp != 0) || !alive) {
members[i].setHp(hp);
}
}
};
// set all party mp
Cheat_Menu.set_party_mp = function(mp, alive) {
var members = $gameParty.allMembers();
for (var i = 0; i < members.length; i++) {
if ((alive && members[i]._hp != 0) || !alive) {
members[i].setMp(mp);
}
}
};
// set all party tp
Cheat_Menu.set_party_tp = function(tp, alive) {
var members = $gameParty.allMembers();
for (var i = 0; i < members.length; i++) {
if ((alive && members[i]._hp != 0) || !alive) {
members[i].setTp(tp);
}
}
};
// party full recover hp
Cheat_Menu.recover_party_hp = function(alive) {
var members = $gameParty.allMembers();
for (var i = 0; i < members.length; i++) {
if ((alive && members[i]._hp != 0) || !alive) {
members[i].setHp(members[i].mhp);
}
}
};
// party full recover mp
Cheat_Menu.recover_party_mp = function(alive) {
var members = $gameParty.allMembers();
for (var i = 0; i < members.length; i++) {
if ((alive && members[i]._hp != 0) || !alive) {
members[i].setMp(members[i].mmp);
}
}
};
// party max tp
Cheat_Menu.recover_party_tp = function(alive) {
var members = $gameParty.allMembers();
for (var i = 0; i < members.length; i++) {
if ((alive && members[i]._hp != 0) || !alive) {
members[i].setTp(members[i].maxTp());
}
}
};
// set all enemies hp
Cheat_Menu.set_enemy_hp = function(hp, alive) {
var members = $gameTroop.members();
for (var i = 0; i < members.length; i++) {
if (members[i]) {
if ((alive && members[i]._hp != 0) || !alive) {
members[i].setHp(hp);
}
}
}
};
// increase exp
Cheat_Menu.give_exp = function(actor, amount) {
if (actor instanceof Game_Actor) {
actor.gainExp(amount);
}
};
// increase stat bonus
Cheat_Menu.give_stat = function(actor, stat_index, amount) {
if (actor instanceof Game_Actor) {
if (actor._paramPlus[stat_index] != undefined) {
actor.addParam(stat_index, amount);
}
}
};
// increase gold
Cheat_Menu.give_gold = function(amount) {
$gameParty.gainGold(amount);
};
// increase item count for party of item, by id
Cheat_Menu.give_item = function(item_id, amount) {
if ($dataItems[item_id] != undefined) {
$gameParty.gainItem($dataItems[item_id], amount);
}
};
// increase weapon count for party of item, by id
Cheat_Menu.give_weapon = function(weapon_id, amount) {
if ($dataWeapons[weapon_id] != undefined) {
$gameParty.gainItem($dataWeapons[weapon_id], amount);
}
};
// increase armor count for party of item, by id
Cheat_Menu.give_armor = function(armor_id, amount) {
if ($dataArmors[armor_id] != undefined) {
$gameParty.gainItem($dataArmors[armor_id], amount);
}
};
// initialize speed hook for locking
Cheat_Menu.initialize_speed_lock = function() {
if (!Cheat_Menu.speed_initialized) {
Cheat_Menu.speed = $gamePlayer._moveSpeed;
Object.defineProperty($gamePlayer, "_moveSpeed", {
get: function() {return Cheat_Menu.speed;},
set: function(newVal) {if(Cheat_Menu.speed_unlocked) {Cheat_Menu.speed = newVal;}}
});
Cheat_Menu.speed_initialized = true;
}
};
// change player movement speed
Cheat_Menu.change_player_speed = function(amount) {
Cheat_Menu.initialize_speed_lock();
Cheat_Menu.speed += amount;
};
// toggle locking of player speed
Cheat_Menu.toggle_lock_player_speed = function(amount) {
Cheat_Menu.initialize_speed_lock();
Cheat_Menu.speed_unlocked = !Cheat_Menu.speed_unlocked;
};
// clear active states on an actor
Cheat_Menu.clear_actor_states = function(actor) {
if (actor instanceof Game_Actor) {
if (actor._states != undefined && actor._states.length > 0) {
actor.clearStates();
}
}
};
// clear active states on party
Cheat_Menu.clear_party_states = function() {
var members = $gameParty.allMembers();
for (var i = 0; i < members.length; i++) {
Cheat_Menu.clear_actor_states(members[i]);
}
};
// change game variable value, by id
Cheat_Menu.set_variable = function(variable_id, value) {
if ($dataSystem.variables[variable_id] != undefined) {
var new_value = $gameVariables.value(variable_id) + value;
$gameVariables.setValue(variable_id, new_value);
}
};
// toggle game switch value, by id
Cheat_Menu.toggle_switch = function(switch_id) {
if ($dataSystem.switches[switch_id] != undefined) {
$gameSwitches.setValue(switch_id, !$gameSwitches.value(switch_id));
}
};
// Change location by map id, and x, y position
Cheat_Menu.teleport = function(map_id, x_pos, y_pos) {
$gamePlayer.reserveTransfer(map_id, x_pos, y_pos, $gamePlayer.direction(), 0);
$gamePlayer.setPosition(x_pos, y_pos);
};
/////////////////////////////////////////////////
// Cheat Menu overlay
/////////////////////////////////////////////////
// HTML elements and some CSS for positioning
// other css in in CSS file attached
Cheat_Menu.overlay_box = document.createElement('div');
Cheat_Menu.overlay_box.id = "cheat_menu";
Cheat_Menu.overlay_box.style.left = "5px";
Cheat_Menu.overlay_box.style.top = "5px";
Cheat_Menu.overlay_box.style.right = "";
Cheat_Menu.overlay_box.style.bottom = "";
Cheat_Menu.overlay = document.createElement('table');
Cheat_Menu.overlay.id = "cheat_menu_text";
Cheat_Menu.overlay.style.left = "5px";
Cheat_Menu.overlay.style.top = "5px";
Cheat_Menu.overlay.style.right = "";
Cheat_Menu.overlay.style.bottom = "";
// Attach other css for styling
Cheat_Menu.style_css = document.createElement("link");
Cheat_Menu.style_css.type = "text/css";
Cheat_Menu.style_css.rel = "stylesheet";
Cheat_Menu.style_css.href = "js/plugins/Cheat_Menu.css";
document.head.appendChild(Cheat_Menu.style_css);
// keep menu in correct location
Cheat_Menu.position_menu = function(event) {
//middle of screen
if (Cheat_Menu.position == 0) {
Cheat_Menu.overlay_box.style.left = "" + (window.innerWidth / 2) + "px";
Cheat_Menu.overlay_box.style.top = "" + (window.innerHeight / 2) + "px";
Cheat_Menu.overlay_box.style.right = "";
Cheat_Menu.overlay_box.style.bottom = "";
Cheat_Menu.overlay_box.style.marginLeft = "-110px";
Cheat_Menu.overlay_box.style.marginTop = "-50px";
Cheat_Menu.overlay.style.left = "" + (window.innerWidth / 2) + "px";
Cheat_Menu.overlay.style.top = "" + (window.innerHeight / 2) + "px";
Cheat_Menu.overlay.style.right = "";
Cheat_Menu.overlay.style.bottom = "";
Cheat_Menu.overlay.style.marginLeft = "-110px";
Cheat_Menu.overlay.style.marginTop = "-50px";
}
// top left corner
else if (Cheat_Menu.position == 1) {
Cheat_Menu.overlay_box.style.left = "5px";
Cheat_Menu.overlay_box.style.top = "5px";
Cheat_Menu.overlay_box.style.right = "";
Cheat_Menu.overlay_box.style.bottom = "";
Cheat_Menu.overlay_box.style.marginLeft = "";
Cheat_Menu.overlay_box.style.marginTop = "";
Cheat_Menu.overlay.style.left = "5px";
Cheat_Menu.overlay.style.top = "5px";
Cheat_Menu.overlay.style.right = "";
Cheat_Menu.overlay.style.bottom = "";
Cheat_Menu.overlay.style.marginLeft = "";
Cheat_Menu.overlay.style.marginTop = "";
}
// top right corner
else if (Cheat_Menu.position == 2) {
Cheat_Menu.overlay_box.style.left = "";
Cheat_Menu.overlay_box.style.top = "5px";
Cheat_Menu.overlay_box.style.right = "5px";
Cheat_Menu.overlay_box.style.bottom = "";
Cheat_Menu.overlay_box.style.marginLeft = "";
Cheat_Menu.overlay_box.style.marginTop = "";
Cheat_Menu.overlay.style.left = "";
Cheat_Menu.overlay.style.top = "5px";
Cheat_Menu.overlay.style.right = "-15px";
Cheat_Menu.overlay.style.bottom = "";
Cheat_Menu.overlay.style.marginLeft = "";
Cheat_Menu.overlay.style.marginTop = "";
}
// bottom right corner
else if (Cheat_Menu.position == 3) {
Cheat_Menu.overlay_box.style.left = "";
Cheat_Menu.overlay_box.style.top = "";
Cheat_Menu.overlay_box.style.right = "5px";
Cheat_Menu.overlay_box.style.bottom = "5px";
Cheat_Menu.overlay_box.style.marginLeft = "";
Cheat_Menu.overlay_box.style.marginTop = "";
Cheat_Menu.overlay.style.left = "";
Cheat_Menu.overlay.style.top = "";
Cheat_Menu.overlay.style.right = "-15px";
Cheat_Menu.overlay.style.bottom = "5px";
Cheat_Menu.overlay.style.marginLeft = "";
Cheat_Menu.overlay.style.marginTop = "";
}
// bottom left corner
else if (Cheat_Menu.position == 4) {
Cheat_Menu.overlay_box.style.left = "5px";
Cheat_Menu.overlay_box.style.top = "";
Cheat_Menu.overlay_box.style.right = "";
Cheat_Menu.overlay_box.style.bottom = "5px";
Cheat_Menu.overlay_box.style.marginLeft = "";
Cheat_Menu.overlay_box.style.marginTop = "";
Cheat_Menu.overlay.style.left = "5px";
Cheat_Menu.overlay.style.top = "";
Cheat_Menu.overlay.style.right = "";
Cheat_Menu.overlay.style.bottom = "5px";
Cheat_Menu.overlay.style.marginLeft = "";
Cheat_Menu.overlay.style.marginTop = "";
}
// adjust background box size to match contents
var height = 20;
for (var i = 0; i < Cheat_Menu.overlay.children.length; i++) {
height += Cheat_Menu.overlay.children[i].scrollHeight;
}
Cheat_Menu.overlay_box.style.height = "" + height + "px";
};
/////////////////////////////////////////////////
// Menu item types
/////////////////////////////////////////////////
// insert row with buttons to scroll left and right for some context
// appears as:
// <-[key1] text [key2]->
// scrolling is handled by scroll_left_handler and scroll_right_handler functions
// text: string
// key1,key2: key mapping
// scroll_handler: single function that handles the left and right scroll arguments should be (direction, event)
Cheat_Menu.append_scroll_selector = function(text, key1, key2, scroll_handler) {
var scroll_selector = Cheat_Menu.overlay.insertRow();
scroll_selector.className = "scroll_selector_row";
var scroll_left_button = scroll_selector.insertCell();
scroll_left_button.className = "scroll_selector_buttons cheat_menu_cell";
var scroll_text = scroll_selector.insertCell();
scroll_text.className = "cheat_menu_cell";
var scroll_right_button = scroll_selector.insertCell();
scroll_right_button.className = "scroll_selector_buttons cheat_menu_cell";
scroll_left_button.innerHTML = "←[" + key1 + "]";
scroll_text.innerHTML = text;
scroll_right_button.innerHTML = "[" + key2 + "]→";
scroll_left_button.addEventListener('mousedown', scroll_handler.bind(null, "left"));
scroll_right_button.addEventListener('mousedown', scroll_handler.bind(null, "right"));
Cheat_Menu.key_listeners[key1] = scroll_handler.bind(null, "left");
Cheat_Menu.key_listeners[key2] = scroll_handler.bind(null, "right");
};
// Insert a title row
// A row in the menu that is just text
// title: string
Cheat_Menu.append_title = function(title) {
var title_row = Cheat_Menu.overlay.insertRow();
var temp = title_row.insertCell()
temp.className = "cheat_menu_cell_title";
var title_text = title_row.insertCell();
title_text.className = "cheat_menu_cell_title";
temp = title_row.insertCell()
temp.className = "cheat_menu_cell_title";
title_text.innerHTML = title;
};
// Insert a desciption row
// A row in the menu that is just text (smaller than title)
// text: string
Cheat_Menu.append_description = function(text) {
var title_row = Cheat_Menu.overlay.insertRow();
var temp = title_row.insertCell()
temp.className = "cheat_menu_cell";
var title_text = title_row.insertCell();
title_text.className = "cheat_menu_cell";
temp = title_row.insertCell()
temp.className = "cheat_menu_cell";
title_text.innerHTML = text;
};
// Append a cheat with some handler to activate
// Appears as:
// cheat text status text[key]
// cheat_text: string
// status_text: string
// key: key mapping
// click_handler: function
Cheat_Menu.append_cheat = function(cheat_text, status_text, key, click_handler) {
var cheat_row = Cheat_Menu.overlay.insertRow();
var cheat_title = cheat_row.insertCell();
cheat_title.className = "cheat_menu_cell"
var temp = cheat_row.insertCell()
temp.className = "cheat_menu_cell";
var cheat = cheat_row.insertCell();
cheat.className = "cheat_menu_buttons cheat_menu_cell";
cheat_title.innerHTML = cheat_text;
cheat.innerHTML = status_text + "[" + key + "]";
cheat.addEventListener('mousedown', click_handler);
Cheat_Menu.key_listeners[key] = click_handler;
};
/////////////////////////////////////////////////////////////
// Various functions to settup each page of the cheat menu
/////////////////////////////////////////////////////////////
// Left and right scrollers for handling switching between menus
Cheat_Menu.scroll_cheat = function(direction, event) {
if (direction == "left") {
Cheat_Menu.cheat_selected--;
if (Cheat_Menu.cheat_selected < 0) {
Cheat_Menu.cheat_selected = Cheat_Menu.menus.length - 1;
}
}
else {
Cheat_Menu.cheat_selected++;
if (Cheat_Menu.cheat_selected > Cheat_Menu.menus.length - 1) {
Cheat_Menu.cheat_selected = 0;
}
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// Menu title with scroll options to go between menu, should be first
// append on each menu
Cheat_Menu.append_cheat_title = function(cheat_name) {
Cheat_Menu.append_title("Cheat");
Cheat_Menu.append_scroll_selector(cheat_name, 2, 3, Cheat_Menu.scroll_cheat);
};
// Left and right scrollers for handling switching selected actors
Cheat_Menu.scroll_actor = function(direction, event) {
if (direction == "left") {
Cheat_Menu.cheat_selected_actor--;
if (Cheat_Menu.cheat_selected_actor < 0) {
Cheat_Menu.cheat_selected_actor = $gameActors._data.length - 1;
}
}
else {
Cheat_Menu.cheat_selected_actor++;
if (Cheat_Menu.cheat_selected_actor >= $gameActors._data.length) {
Cheat_Menu.cheat_selected_actor = 0;
}
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// Append actor selection to the menu
Cheat_Menu.append_actor_selection = function(key1, key2) {
Cheat_Menu.append_title("Actor");
var actor_name;
if ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor]._name) {
actor_name = "<font color='#0088ff'>" + $gameActors._data[Cheat_Menu.cheat_selected_actor]._name + "</font>";
}
else {
actor_name = "<font color='#ff0000'>NULL</font>";
}
Cheat_Menu.append_scroll_selector(actor_name, key1, key2, Cheat_Menu.scroll_actor);
};
// Hanler for the god_mode cheat
Cheat_Menu.god_mode_toggle = function(event) {
if ($gameActors._data[Cheat_Menu.cheat_selected_actor]) {
if (!($gameActors._data[Cheat_Menu.cheat_selected_actor].god_mode)) {
Cheat_Menu.god_mode($gameActors._data[Cheat_Menu.cheat_selected_actor]);
SoundManager.playSystemSound(1);
}
else {
Cheat_Menu.god_mode_off($gameActors._data[Cheat_Menu.cheat_selected_actor]);
SoundManager.playSystemSound(2);
}
Cheat_Menu.update_menu();
}
};
// Append the god_mode cheat to the menu
Cheat_Menu.append_godmode_status = function() {
var status_text;
if ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor].god_mode) {
status_text = "<font color='#00ff00'>on</font>";
}
else {
status_text = "<font color='#ff0000'>off</font>";
}
Cheat_Menu.append_cheat("Status:", status_text, 6, Cheat_Menu.god_mode_toggle);
};
// handler for the enemy hp to 0 cheat alive only
Cheat_Menu.enemy_hp_cheat_1 = function() {
Cheat_Menu.set_enemy_hp(0, true);
SoundManager.playSystemSound(1);
};
// handler for the enemy hp to 1 cheat alive only
Cheat_Menu.enemy_hp_cheat_2 = function() {
Cheat_Menu.set_enemy_hp(1, true);
SoundManager.playSystemSound(1);
};
// handler for the enemy hp to 0 cheat all
Cheat_Menu.enemy_hp_cheat_3 = function() {
Cheat_Menu.set_enemy_hp(0, false);
SoundManager.playSystemSound(1);
};
// handler for the enemy hp to 1 cheat all
Cheat_Menu.enemy_hp_cheat_4 = function() {
Cheat_Menu.set_enemy_hp(1, false);
SoundManager.playSystemSound(1);
};
// Append the enemy hp cheats to the menu
Cheat_Menu.append_enemy_cheats = function(key1, key2, key3, key4) {
Cheat_Menu.append_title("Alive");
Cheat_Menu.append_cheat("Enemy HP to 0", "Activate", key1, Cheat_Menu.enemy_hp_cheat_1);
Cheat_Menu.append_cheat("Enemy HP to 1", "Activate", key2, Cheat_Menu.enemy_hp_cheat_2);
Cheat_Menu.append_title("All");
Cheat_Menu.append_cheat("Enemy HP to 0", "Activate", key3, Cheat_Menu.enemy_hp_cheat_3);
Cheat_Menu.append_cheat("Enemy HP to 1", "Activate", key4, Cheat_Menu.enemy_hp_cheat_4);
};
// handler for the party hp cheat to 0 alive only
Cheat_Menu.party_hp_cheat_1 = function() {
Cheat_Menu.set_party_hp(0, true);
SoundManager.playSystemSound(1);
};
// handler for the party hp cheat to 1 alive only
Cheat_Menu.party_hp_cheat_2 = function() {
Cheat_Menu.set_party_hp(1, true);
SoundManager.playSystemSound(1);
};
// handler for the party hp cheat to full alive only
Cheat_Menu.party_hp_cheat_3 = function() {
Cheat_Menu.recover_party_hp(true);
SoundManager.playSystemSound(1);
};
// handler for the party hp cheat to 0 all
Cheat_Menu.party_hp_cheat_4 = function() {
Cheat_Menu.set_party_hp(0, false);
SoundManager.playSystemSound(1);
};
// handler for the party hp cheat to 1 all
Cheat_Menu.party_hp_cheat_5 = function() {
Cheat_Menu.set_party_hp(1, false);
SoundManager.playSystemSound(1);
};
// handler for the party hp cheat full all
Cheat_Menu.party_hp_cheat_6 = function() {
Cheat_Menu.recover_party_hp(false);
SoundManager.playSystemSound(1);
};
// append the party hp cheats
Cheat_Menu.append_hp_cheats = function(key1, key2, key3, key4, key5, key6) {
Cheat_Menu.append_title("Alive");
Cheat_Menu.append_cheat("Party HP to 0", "Activate", key1, Cheat_Menu.party_hp_cheat_1);
Cheat_Menu.append_cheat("Party HP to 1", "Activate", key2, Cheat_Menu.party_hp_cheat_2);
Cheat_Menu.append_cheat("Party Full HP", "Activate", key3, Cheat_Menu.party_hp_cheat_3);
Cheat_Menu.append_title("All");
Cheat_Menu.append_cheat("Party HP to 0", "Activate", key4, Cheat_Menu.party_hp_cheat_4);
Cheat_Menu.append_cheat("Party HP to 1", "Activate", key5, Cheat_Menu.party_hp_cheat_5);
Cheat_Menu.append_cheat("Party Full HP", "Activate", key6, Cheat_Menu.party_hp_cheat_6);
};
// handler for the party mp cheat to 0 alive only
Cheat_Menu.party_mp_cheat_1 = function() {
Cheat_Menu.set_party_mp(0, true);
SoundManager.playSystemSound(1);
};
// handler for the party mp cheat to 1 alive only
Cheat_Menu.party_mp_cheat_2 = function() {
Cheat_Menu.set_party_mp(1, true);
SoundManager.playSystemSound(1);
};
// handler for the party mp cheat to full alive only
Cheat_Menu.party_mp_cheat_3 = function() {
Cheat_Menu.recover_party_mp(true);
SoundManager.playSystemSound(1);
};
// handler for the party mp cheat to 0 all
Cheat_Menu.party_mp_cheat_4 = function() {
Cheat_Menu.set_party_mp(0, false);
SoundManager.playSystemSound(1);
};
// handler for the party mp cheat to 1 all
Cheat_Menu.party_mp_cheat_5 = function() {
Cheat_Menu.set_party_mp(1, false);
SoundManager.playSystemSound(1);
};
// handler for the party mp cheat full all
Cheat_Menu.party_mp_cheat_6 = function() {
Cheat_Menu.recover_party_mp(false);
SoundManager.playSystemSound(1);
};
// append the party mp cheats
Cheat_Menu.append_mp_cheats = function(key1, key2, key3, key4, key5, key6) {
Cheat_Menu.append_title("Alive");
Cheat_Menu.append_cheat("Party MP to 0", "Activate", key1, Cheat_Menu.party_mp_cheat_1);
Cheat_Menu.append_cheat("Party MP to 1", "Activate", key2, Cheat_Menu.party_mp_cheat_2);
Cheat_Menu.append_cheat("Party Full MP", "Activate", key3, Cheat_Menu.party_mp_cheat_3);
Cheat_Menu.append_title("All");
Cheat_Menu.append_cheat("Party MP to 0", "Activate", key4, Cheat_Menu.party_mp_cheat_4);
Cheat_Menu.append_cheat("Party MP to 1", "Activate", key5, Cheat_Menu.party_mp_cheat_5);
Cheat_Menu.append_cheat("Party Full MP", "Activate", key6, Cheat_Menu.party_mp_cheat_6);
};
// handler for the party tp cheat to 0 alive only
Cheat_Menu.party_tp_cheat_1 = function() {
Cheat_Menu.set_party_tp(0, true);
SoundManager.playSystemSound(1);
};
// handler for the party tp cheat to 1 alive only
Cheat_Menu.party_tp_cheat_2 = function() {
Cheat_Menu.set_party_tp(1, true);
SoundManager.playSystemSound(1);
};
// handler for the party tp cheat to full alive only
Cheat_Menu.party_tp_cheat_3 = function() {
Cheat_Menu.recover_party_tp(true);
SoundManager.playSystemSound(1);
};
// handler for the party tp cheat to 0 all
Cheat_Menu.party_tp_cheat_4 = function() {
Cheat_Menu.set_party_tp(0, false);
SoundManager.playSystemSound(1);
};
// handler for the party tp cheat to 1 all
Cheat_Menu.party_tp_cheat_5 = function() {
Cheat_Menu.set_party_tp(1, false);
SoundManager.playSystemSound(1);
};
// handler for the party tp cheat full all
Cheat_Menu.party_tp_cheat_6 = function() {
Cheat_Menu.recover_party_tp(false);
SoundManager.playSystemSound(1);
};
// append the party tp cheats
Cheat_Menu.append_tp_cheats = function(key1, key2, key3, key4, key5, key6) {
Cheat_Menu.append_title("Alive");
Cheat_Menu.append_cheat("Party TP to 0", "Activate", key1, Cheat_Menu.party_tp_cheat_1);
Cheat_Menu.append_cheat("Party TP to 1", "Activate", key2, Cheat_Menu.party_tp_cheat_2);
Cheat_Menu.append_cheat("Party Full TP", "Activate", key3, Cheat_Menu.party_tp_cheat_3);
Cheat_Menu.append_title("All");
Cheat_Menu.append_cheat("Party TP to 0", "Activate", key4, Cheat_Menu.party_tp_cheat_4);
Cheat_Menu.append_cheat("Party TP to 1", "Activate", key5, Cheat_Menu.party_tp_cheat_5);
Cheat_Menu.append_cheat("Party Full TP", "Activate", key6, Cheat_Menu.party_tp_cheat_6);
};
// handler for the toggle no clip cheat
Cheat_Menu.toggle_no_clip_status = function(event) {
$gamePlayer._through = !($gamePlayer._through);
Cheat_Menu.update_menu();
if ($gamePlayer._through) {
SoundManager.playSystemSound(1);
}
else {
SoundManager.playSystemSound(2);
}
};
// appen the no clip cheat
Cheat_Menu.append_no_clip_status = function(key1) {
var status_text;
if ($gamePlayer._through) {
status_text = "<font color='#00ff00'>on</font>";
}
else {
status_text = "<font color='#ff0000'>off</font>";
}
Cheat_Menu.append_cheat("Status:", status_text, key1, Cheat_Menu.toggle_no_clip_status);
};
// Left and right scrollers for handling switching amount to modify numerical cheats
Cheat_Menu.scroll_amount = function(direction, event) {
if (direction == "left") {
Cheat_Menu.amount_index--;
if (Cheat_Menu.amount_index < 0) {
Cheat_Menu.amount_index = 0;
}
SoundManager.playSystemSound(2);
}
else {
Cheat_Menu.amount_index++;
if (Cheat_Menu.amount_index >= Cheat_Menu.amounts.length) {
Cheat_Menu.amount_index = Cheat_Menu.amounts.length - 1;
}
SoundManager.playSystemSound(1);
}
Cheat_Menu.update_menu();
};
// append the amount selection to the menu
Cheat_Menu.append_amount_selection = function(key1, key2) {
Cheat_Menu.append_title("Amount");
var current_amount = "<font color='#0088ff'>" + Cheat_Menu.amounts[Cheat_Menu.amount_index] + "</font>";
Cheat_Menu.append_scroll_selector(current_amount, key1, key2, Cheat_Menu.scroll_amount);
};
// Left and right scrollers for handling switching amount to modify for the movement cheat
Cheat_Menu.scroll_move_amount = function(direction, event) {
if (direction == "left") {
Cheat_Menu.move_amount_index--;
if (Cheat_Menu.move_amount_index < 0) {
Cheat_Menu.move_amount_index = 0;
}
SoundManager.playSystemSound(2);
}
else {
Cheat_Menu.move_amount_index++;
if (Cheat_Menu.move_amount_index >= Cheat_Menu.move_amounts.length) {
Cheat_Menu.move_amount_index = Cheat_Menu.move_amounts.length - 1;
}
SoundManager.playSystemSound(1);
}
Cheat_Menu.update_menu();
};
// append the movement speed amount to the menu
Cheat_Menu.append_move_amount_selection = function(key1, key2) {
Cheat_Menu.append_title("Amount");
var current_amount = "<font color='#0088ff'>" + Cheat_Menu.move_amounts[Cheat_Menu.move_amount_index] + "</font>";
Cheat_Menu.append_scroll_selector(current_amount, key1, key2, Cheat_Menu.scroll_move_amount);
};
// handlers for the exp cheat
Cheat_Menu.apply_current_exp = function(direction, event) {
var amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2);
}
else {
SoundManager.playSystemSound(1);
}
Cheat_Menu.give_exp($gameActors._data[Cheat_Menu.cheat_selected_actor], amount);
Cheat_Menu.update_menu();
};
// append the exp cheat to the menu
Cheat_Menu.append_exp_cheat = function(key1, key2) {
var current_exp = "NULL";
if ($gameActors._data[Cheat_Menu.cheat_selected_actor]) {
current_exp = $gameActors._data[Cheat_Menu.cheat_selected_actor].currentExp();
}
Cheat_Menu.append_title("EXP");
Cheat_Menu.append_scroll_selector(current_exp, key1, key2, Cheat_Menu.apply_current_exp);
};
// Left and right scrollers for handling switching between stats for the selected character
Cheat_Menu.scroll_stat = function(direction, event) {
if ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus) {
if (direction == "left") {
Cheat_Menu.stat_selection--;
if (Cheat_Menu.stat_selection < 0) {
Cheat_Menu.stat_selection = $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus.length - 1;
}
}
else {
Cheat_Menu.stat_selection++;
if (Cheat_Menu.stat_selection >= $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus.length) {
Cheat_Menu.stat_selection = 0;
}
}
}
else {
Cheat_Menu.stat_selection = 0;
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// handlers for the stat cheat
Cheat_Menu.apply_current_stat = function(direction, event) {
var amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2);
}
else {
SoundManager.playSystemSound(1);
}
Cheat_Menu.give_stat($gameActors._data[Cheat_Menu.cheat_selected_actor], Cheat_Menu.stat_selection , amount);
Cheat_Menu.update_menu();
};
// append the stat selection to the menu
Cheat_Menu.append_stat_selection = function(key1, key2, key3, key4) {
Cheat_Menu.append_title("Stat");
var stat_string = "";
var stat_string = "";
if ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus) {
if (Cheat_Menu.stat_selection >= $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus.length) {
Cheat_Menu.stat_selection = 0;
}
stat_string += $dataSystem.terms.params[Cheat_Menu.stat_selection];
}
Cheat_Menu.append_scroll_selector(stat_string, key1, key2, Cheat_Menu.scroll_stat);
var current_value = "NULL";
if ($gameActors._data[Cheat_Menu.cheat_selected_actor] && $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus) {
current_value = $gameActors._data[Cheat_Menu.cheat_selected_actor]._paramPlus[Cheat_Menu.stat_selection];
}
Cheat_Menu.append_scroll_selector(current_value, key3, key4, Cheat_Menu.apply_current_stat);
};
// handlers for the gold cheat
Cheat_Menu.apply_current_gold = function(direction, event) {
var amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2);
}
else {
SoundManager.playSystemSound(1);
}
Cheat_Menu.give_gold(amount);
Cheat_Menu.update_menu();
};
// append the gold cheat to the menu
Cheat_Menu.append_gold_status = function(key1, key2) {
Cheat_Menu.append_title("Gold");
Cheat_Menu.append_scroll_selector($gameParty._gold, key1, key2, Cheat_Menu.apply_current_gold);
};
// handler for the movement speed cheat
Cheat_Menu.apply_speed_change = function(direction, event) {
var amount = Cheat_Menu.move_amounts[Cheat_Menu.move_amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2);
}
else {
SoundManager.playSystemSound(1);
}
Cheat_Menu.change_player_speed(amount);
Cheat_Menu.update_menu();
};
Cheat_Menu.apply_speed_lock_toggle = function() {
Cheat_Menu.toggle_lock_player_speed();
if (Cheat_Menu.speed_unlocked) {
SoundManager.playSystemSound(2);
}
else {
SoundManager.playSystemSound(1);
}
Cheat_Menu.update_menu();
};
// append the movement speed to the menu
Cheat_Menu.append_speed_status = function(key1, key2, key3) {
Cheat_Menu.append_title("Current Speed");
Cheat_Menu.append_scroll_selector($gamePlayer._moveSpeed, key1, key2, Cheat_Menu.apply_speed_change);
var status_text;
if (!Cheat_Menu.speed_unlocked) {
status_text = "<font color='#00ff00'>false</font>";
}
else {
status_text = "<font color='#ff0000'>true</font>";
}
Cheat_Menu.append_cheat("Speed Unlocked", status_text, key3, Cheat_Menu.apply_speed_lock_toggle);
};
// Left and right scrollers for handling switching between items selected
Cheat_Menu.scroll_item = function(direction, event) {
if (direction == "left") {
Cheat_Menu.item_selection--;
if (Cheat_Menu.item_selection < 0) {
Cheat_Menu.item_selection = $dataItems.length - 1;
}
}
else {
Cheat_Menu.item_selection++;
if (Cheat_Menu.item_selection >= $dataItems.length) {
Cheat_Menu.item_selection = 0;
}
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// handlers for the item cheat
Cheat_Menu.apply_current_item = function(direction, event) {
var amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2);
}
else {
SoundManager.playSystemSound(1);
}
Cheat_Menu.give_item(Cheat_Menu.item_selection, amount);
Cheat_Menu.update_menu();
};
// append the item cheat to the menu
Cheat_Menu.append_item_selection = function(key1, key2, key3, key4) {
Cheat_Menu.append_title("Item");
var current_item = "";
if ($dataItems[Cheat_Menu.item_selection] && $dataItems[Cheat_Menu.item_selection].name && $dataItems[Cheat_Menu.item_selection].name.length > 0) {
current_item = $dataItems[Cheat_Menu.item_selection].name;
}
else {
current_item = "NULL";
}
Cheat_Menu.append_scroll_selector(current_item, key1, key2, Cheat_Menu.scroll_item);
var current_item_amount = 0;
if ($gameParty._items[Cheat_Menu.item_selection] != undefined) {
current_item_amount = $gameParty._items[Cheat_Menu.item_selection];
}
Cheat_Menu.append_scroll_selector(current_item_amount, key3, key4, Cheat_Menu.apply_current_item);
};
// Left and right scrollers for handling switching between weapon selected
Cheat_Menu.scroll_weapon = function(direction, event) {
if (direction == "left") {
Cheat_Menu.weapon_selection--;
if (Cheat_Menu.weapon_selection < 0) {
Cheat_Menu.weapon_selection = $dataWeapons.length - 1;
}
}
else {
Cheat_Menu.weapon_selection++;
if (Cheat_Menu.weapon_selection >= $dataWeapons.length) {
Cheat_Menu.weapon_selection = 0;
}
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// handlers for the weapon cheat
Cheat_Menu.apply_current_weapon = function(direction, event) {
var amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2);
}
else {
SoundManager.playSystemSound(1);
}
Cheat_Menu.give_weapon(Cheat_Menu.weapon_selection, amount);
Cheat_Menu.update_menu();
};
// append the weapon cheat to the menu
Cheat_Menu.append_weapon_selection = function(key1, key2, key3, key4) {
Cheat_Menu.append_title("Weapon");
var current_weapon = "";
if ($dataWeapons[Cheat_Menu.weapon_selection] && $dataWeapons[Cheat_Menu.weapon_selection].name && $dataWeapons[Cheat_Menu.weapon_selection].name.length > 0) {
current_weapon = $dataWeapons[Cheat_Menu.weapon_selection].name;
}
else {
current_weapon = "NULL";
}
Cheat_Menu.append_scroll_selector(current_weapon, key1, key2, Cheat_Menu.scroll_weapon);
var current_weapon_amount = 0;
if ($gameParty._weapons[Cheat_Menu.weapon_selection] != undefined) {
current_weapon_amount = $gameParty._weapons[Cheat_Menu.weapon_selection];
}
Cheat_Menu.append_scroll_selector(current_weapon_amount, key3, key4, Cheat_Menu.apply_current_weapon);
};
// Left and right scrollers for handling switching between armor selected
Cheat_Menu.scroll_armor = function(direction, event) {
if (direction == "left") {
Cheat_Menu.armor_selection--;
if (Cheat_Menu.armor_selection < 0) {
Cheat_Menu.armor_selection = $dataArmors.length - 1;
}
}
else {
Cheat_Menu.armor_selection++;
if (Cheat_Menu.armor_selection >= $dataArmors.length) {
Cheat_Menu.armor_selection = 0;
}
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// handler for the armor cheat
Cheat_Menu.apply_current_armor = function(direction, event) {
var amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2);
}
else {
SoundManager.playSystemSound(1);
}
Cheat_Menu.give_armor(Cheat_Menu.armor_selection, amount);
Cheat_Menu.update_menu();
};
// append the armor cheat to the menu
Cheat_Menu.append_armor_selection = function(key1, key2, key3, key4) {
Cheat_Menu.append_title("Armor");
var current_armor = "";
if ($dataArmors[Cheat_Menu.armor_selection] && $dataArmors[Cheat_Menu.armor_selection].name && $dataArmors[Cheat_Menu.armor_selection].name.length > 0) {
current_armor = $dataArmors[Cheat_Menu.armor_selection].name;
}
else {
current_armor = "NULL";
}
Cheat_Menu.append_scroll_selector(current_armor, key1, key2, Cheat_Menu.scroll_armor);
var current_armor_amount = 0;
if ($gameParty._armors[Cheat_Menu.armor_selection] != undefined) {
current_armor_amount = $gameParty._armors[Cheat_Menu.armor_selection];
}
Cheat_Menu.append_scroll_selector(current_armor_amount, key3, key4, Cheat_Menu.apply_current_armor);
};
// handler for the clear actor state cheat
Cheat_Menu.clear_current_actor_states = function() {
Cheat_Menu.clear_actor_states($gameActors._data[Cheat_Menu.cheat_selected_actor]);
SoundManager.playSystemSound(1);
Cheat_Menu.update_menu();
};
// handler for the party state clear cheat
Cheat_Menu.party_clear_states_cheat = function() {
Cheat_Menu.clear_party_states();
SoundManager.playSystemSound(1);
};
// append the party hp cheats
Cheat_Menu.append_party_state = function(key1) {
Cheat_Menu.append_cheat("Clear Party States", "Activate", key1, Cheat_Menu.party_clear_states_cheat);
};
// append the clear actor state cheat to the menu
Cheat_Menu.append_current_state = function(key1) {
Cheat_Menu.append_title("Current State");
var number_states = 0;
if ($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) {
number_states = $gameActors._data[Cheat_Menu.cheat_selected_actor]._states.length;
}
else {
number_states = null;
}
Cheat_Menu.append_cheat("Number Effects:", number_states, key1, Cheat_Menu.clear_current_actor_states);
};
// Left and right scrollers for handling switching between selected variable
Cheat_Menu.scroll_variable = function(direction, event) {
if (direction == "left") {
Cheat_Menu.variable_selection--;
if (Cheat_Menu.variable_selection < 0) {
Cheat_Menu.variable_selection = $dataSystem.variables.length - 1;
}
}
else {
Cheat_Menu.variable_selection++;
if (Cheat_Menu.variable_selection >= $dataSystem.variables.length) {
Cheat_Menu.variable_selection = 0;
}
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// handlers for the setting the current variable
Cheat_Menu.apply_current_variable = function(direction, event) {
var amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2);
}
else {
SoundManager.playSystemSound(1);
}
Cheat_Menu.set_variable(Cheat_Menu.variable_selection, amount);
Cheat_Menu.update_menu();
};
// append the variable cheat to the menu
Cheat_Menu.append_variable_selection = function(key1, key2, key3, key4) {
Cheat_Menu.append_title("Variable");
var current_variable = "";
if ($dataSystem.variables[Cheat_Menu.variable_selection] && $dataSystem.variables[Cheat_Menu.variable_selection].length > 0) {
current_variable = $dataSystem.variables[Cheat_Menu.variable_selection];
}
else {
current_variable = "NULL";
}
Cheat_Menu.append_scroll_selector(current_variable, key1, key2, Cheat_Menu.scroll_variable);
var current_variable_value = 'NULL';
if ($gameVariables.value(Cheat_Menu.variable_selection) != undefined) {
current_variable_value = $gameVariables.value(Cheat_Menu.variable_selection);
}
Cheat_Menu.append_scroll_selector(current_variable_value, key3, key4, Cheat_Menu.apply_current_variable);
};
// Left and right scrollers for handling switching between selected switch
Cheat_Menu.scroll_switch = function(direction, event) {
if (direction == "left") {
Cheat_Menu.switch_selection--;
if (Cheat_Menu.switch_selection < 0) {
Cheat_Menu.switch_selection = $dataSystem.switches.length - 1;
}
}
else {
Cheat_Menu.switch_selection++;
if (Cheat_Menu.switch_selection >= $dataSystem.switches.length) {
Cheat_Menu.switch_selection = 0;
}
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// handler for the toggling the current switch
Cheat_Menu.toggle_current_switch = function(event) {
Cheat_Menu.toggle_switch(Cheat_Menu.switch_selection);
if ($gameSwitches.value(Cheat_Menu.switch_selection)) {
SoundManager.playSystemSound(1);
}
else {
SoundManager.playSystemSound(2);
}
Cheat_Menu.update_menu();
};
// append the switch cheat to the menu
Cheat_Menu.append_switch_selection = function(key1, key2, key3) {
Cheat_Menu.append_title("Switch");
var current_switch = "";
if ($dataSystem.switches[Cheat_Menu.switch_selection] && $dataSystem.switches[Cheat_Menu.switch_selection].length > 0) {
current_switch = $dataSystem.switches[Cheat_Menu.switch_selection];
}
else {
current_switch = "NULL";
}
Cheat_Menu.append_scroll_selector(current_switch, key1, key2, Cheat_Menu.scroll_switch);
var current_switch_value = 'NULL';
if ($gameSwitches.value(Cheat_Menu.switch_selection) != undefined) {
current_switch_value = $gameSwitches.value(Cheat_Menu.switch_selection);
}
Cheat_Menu.append_cheat("Status:", current_switch_value, key3, Cheat_Menu.toggle_current_switch);
};
// handler for saving positions
Cheat_Menu.save_position = function(pos_num, event) {
Cheat_Menu.saved_positions[pos_num].m = $gameMap.mapId();
Cheat_Menu.saved_positions[pos_num].x = $gamePlayer.x;
Cheat_Menu.saved_positions[pos_num].y = $gamePlayer.y;
SoundManager.playSystemSound(1);
Cheat_Menu.update_menu();
};
// handler for loading/recalling positions
Cheat_Menu.recall_position = function(pos_num, event) {
if (Cheat_Menu.saved_positions[pos_num].m != -1) {
Cheat_Menu.teleport(Cheat_Menu.saved_positions[pos_num].m, Cheat_Menu.saved_positions[pos_num].x, Cheat_Menu.saved_positions[pos_num].y);
SoundManager.playSystemSound(1);
}
else {
SoundManager.playSystemSound(2);
}
Cheat_Menu.update_menu();
};
// append the save/recall cheat to the menu
Cheat_Menu.append_save_recall = function (key1, key2, key3, key4, key5, key6) {
Cheat_Menu.append_title("Current Position: ");
if ($dataMapInfos[$gameMap.mapId()] && $dataMapInfos[$gameMap.mapId()].name) {
var current_map = "" + $gameMap.mapId() + ": " + $dataMapInfos[$gameMap.mapId()].name;
Cheat_Menu.append_description(current_map);
var map_pos = "(" + $gamePlayer.x + ", " + $gamePlayer.y + ")";
Cheat_Menu.append_description(map_pos);
}
else {
Cheat_Menu.append_description("NULL");
}
var cur_key = 1;
for (var i = 0; i < Cheat_Menu.saved_positions.length; i++) {
Cheat_Menu.append_title("Position " + (i+1));
var map_text;
var pos_text;
if (Cheat_Menu.saved_positions[i].m != -1) {
map_text = "" + Cheat_Menu.saved_positions[i].m + ": ";
if($dataMapInfos[Cheat_Menu.saved_positions[i].m].name) {
map_text += $dataMapInfos[Cheat_Menu.saved_positions[i].m].name;
}
else {
map_text += "NULL";
}
pos_text = "(" + Cheat_Menu.saved_positions[i].x + ", " + Cheat_Menu.saved_positions[i].y + ")";
}
else {
map_text = "NULL";
pos_text = "NULL"
}
Cheat_Menu.append_cheat("Save:", map_text, eval("key" + cur_key), Cheat_Menu.save_position.bind(null, i));
cur_key++;
Cheat_Menu.append_cheat("Recall:", pos_text, eval("key" + cur_key), Cheat_Menu.recall_position.bind(null, i));
cur_key++;
}
};
// Left and right scrollers for handling switching between target teleport map
Cheat_Menu.scroll_map_teleport_selection = function(direction, event) {
if (direction == "left") {
Cheat_Menu.teleport_location.m--;
if (Cheat_Menu.teleport_location.m < 1) {
Cheat_Menu.teleport_location.m = $dataMapInfos.length - 1;
}
}
else {
Cheat_Menu.teleport_location.m++;
if (Cheat_Menu.teleport_location.m >= $dataMapInfos.length) {
Cheat_Menu.teleport_location.m = 1;
}
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// Left and right scrollers for handling switching between target teleport x coord
Cheat_Menu.scroll_x_teleport_selection = function(direction, event) {
if (direction == "left") {
Cheat_Menu.teleport_location.x--;
if (Cheat_Menu.teleport_location.x < 0) {
Cheat_Menu.teleport_location.x = 255;
}
}
else {
Cheat_Menu.teleport_location.x++;
if (Cheat_Menu.teleport_location.x > 255) {
Cheat_Menu.teleport_location.x = 0;
}
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// Left and right scrollers for handling switching between target teleport y coord
Cheat_Menu.scroll_y_teleport_selection = function(direction, event) {
if (direction == "left") {
Cheat_Menu.teleport_location.y--;
if (Cheat_Menu.teleport_location.y < 0) {
Cheat_Menu.teleport_location.y = 255;
}
}
else {
Cheat_Menu.teleport_location.y++;
if (Cheat_Menu.teleport_location.y > 255) {
Cheat_Menu.teleport_location.y = 0;
}
}
SoundManager.playSystemSound(0);
Cheat_Menu.update_menu();
};
// handler for teleporting to targed map and location
Cheat_Menu.teleport_current_location = function(event) {
Cheat_Menu.teleport(Cheat_Menu.teleport_location.m, Cheat_Menu.teleport_location.x, Cheat_Menu.teleport_location.y);
SoundManager.playSystemSound(1);
Cheat_Menu.update_menu();
};
// append the teleport cheat to the menu
Cheat_Menu.append_teleport = function (key1, key2, key3, key4, key5, key6, key7) {
var current_map = "" + Cheat_Menu.teleport_location.m + ": ";
if ($dataMapInfos[Cheat_Menu.teleport_location.m] && $dataMapInfos[Cheat_Menu.teleport_location.m].name) {
current_map += $dataMapInfos[Cheat_Menu.teleport_location.m].name;
}
else {
current_map += "NULL";
}
Cheat_Menu.append_scroll_selector(current_map, key1, key2, Cheat_Menu.scroll_map_teleport_selection);
Cheat_Menu.append_scroll_selector("X: " + Cheat_Menu.teleport_location.x, key3, key4, Cheat_Menu.scroll_x_teleport_selection);
Cheat_Menu.append_scroll_selector("Y: " + Cheat_Menu.teleport_location.y, key5, key6, Cheat_Menu.scroll_y_teleport_selection);
Cheat_Menu.append_cheat("Teleport", "Activate", key7, Cheat_Menu.teleport_current_location);
};
//////////////////////////////////////////////////////////////////////////////////
// Final Functions for building each Menu and function list for updating the menu
//////////////////////////////////////////////////////////////////////////////////
// Check if already defined (allows game specific extensions to be loaded in any order)
if (typeof Cheat_Menu.menus == "undefined") { Cheat_Menu.menus = []; }
// One menu added for each cheat/page of the Cheat_Menu
// appended in reverse order at the front so they will
// appear first no matter the plugin load order for any
// extension plugins
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Teleport");
Cheat_Menu.append_teleport(4, 5, 6, 7, 8, 9, 0);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Save and Recall");
Cheat_Menu.append_save_recall(4, 5, 6, 7, 8, 9);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Switches");
Cheat_Menu.append_switch_selection(4, 5, 6);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Variables");
Cheat_Menu.append_amount_selection(4, 5);
Cheat_Menu.append_variable_selection(6, 7, 8, 9);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Clear States");
Cheat_Menu.append_party_state(4);
Cheat_Menu.append_actor_selection(5, 6);
Cheat_Menu.append_current_state(7);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Speed");
Cheat_Menu.append_move_amount_selection(4, 5);
Cheat_Menu.append_speed_status(6, 7, 8);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Armors");
Cheat_Menu.append_amount_selection(4, 5);
Cheat_Menu.append_armor_selection(6, 7, 8, 9);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Weapons");
Cheat_Menu.append_amount_selection(4, 5);
Cheat_Menu.append_weapon_selection(6, 7, 8, 9);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Items");
Cheat_Menu.append_amount_selection(4, 5);
Cheat_Menu.append_item_selection(6, 7, 8, 9);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Gold");
Cheat_Menu.append_amount_selection(4, 5);
Cheat_Menu.append_gold_status(6, 7);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Stats");
Cheat_Menu.append_actor_selection(4, 5);
Cheat_Menu.append_amount_selection(6, 7);
Cheat_Menu.append_stat_selection(8, 9, 0, '-');
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Give Exp");
Cheat_Menu.append_actor_selection(4, 5);
Cheat_Menu.append_amount_selection(6, 7);
Cheat_Menu.append_exp_cheat(8, 9);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Party TP");
Cheat_Menu.append_tp_cheats(4, 5, 6, 7, 8, 9);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Party MP");
Cheat_Menu.append_mp_cheats(4, 5, 6, 7, 8, 9);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Party HP");
Cheat_Menu.append_hp_cheats(4, 5, 6, 7, 8, 9);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("Enemy HP");
Cheat_Menu.append_enemy_cheats(4, 5, 6, 7);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("No Clip");
Cheat_Menu.append_no_clip_status(4);
});
Cheat_Menu.menus.splice(0, 0, function() {
Cheat_Menu.append_cheat_title("God Mode");
Cheat_Menu.append_actor_selection(4, 5);
Cheat_Menu.append_godmode_status();
});
// update whats being displayed in menu
Cheat_Menu.update_menu = function() {
// clear menu
Cheat_Menu.overlay.innerHTML = "";
// clear key listeners
Cheat_Menu.key_listeners = {};
Cheat_Menu.menus[Cheat_Menu.cheat_selected]();
Cheat_Menu.position_menu();
};
// listener to reposition menu
window.addEventListener("resize", Cheat_Menu.position_menu);
// prevent clicking from passing through
Cheat_Menu.overlay.addEventListener("mousedown", function(event) {
event.stopPropagation();
});
/////////////////////////////////////////////////
// Cheat Menu Key Listener
/////////////////////////////////////////////////
// Key codes
if (typeof Cheat_Menu.keyCodes == "undefined") { Cheat_Menu.keyCodes = {}; }
Cheat_Menu.keyCodes.KEYCODE_0 = {keyCode: 48, key_listener: 0};
Cheat_Menu.keyCodes.KEYCODE_1 = {keyCode: 49, key_listener: 1};
Cheat_Menu.keyCodes.KEYCODE_2 = {keyCode: 50, key_listener: 2};
Cheat_Menu.keyCodes.KEYCODE_3 = {keyCode: 51, key_listener: 3};
Cheat_Menu.keyCodes.KEYCODE_4 = {keyCode: 52, key_listener: 4};
Cheat_Menu.keyCodes.KEYCODE_5 = {keyCode: 53, key_listener: 5};
Cheat_Menu.keyCodes.KEYCODE_6 = {keyCode: 54, key_listener: 6};
Cheat_Menu.keyCodes.KEYCODE_7 = {keyCode: 55, key_listener: 7};
Cheat_Menu.keyCodes.KEYCODE_8 = {keyCode: 56, key_listener: 8};
Cheat_Menu.keyCodes.KEYCODE_9 = {keyCode: 57, key_listener: 9};
Cheat_Menu.keyCodes.KEYCODE_MINUS = {keyCode: 189, key_listener: '-'};
Cheat_Menu.keyCodes.KEYCODE_EQUAL = {keyCode: 187, key_listener: '='};
Cheat_Menu.keyCodes.KEYCODE_TILDE = {keyCode: 192, key_listener: '`'};
Cheat_Menu.key_listeners = {};
window.addEventListener("keydown", function(event) {
if (!event.ctrlKey && !event.altKey && (event.keyCode === 119) && $gameTemp && !$gameTemp.isPlaytest()) {
// open debug menu
event.stopPropagation();
event.preventDefault();
require('nw.gui').Window.get().showDevTools();
}
else if (!event.altKey && !event.ctrlKey && !event.shiftKey && (event.keyCode === 120) && $gameTemp && !$gameTemp.isPlaytest()) {
// trick the game into thinking its a playtest so it will open the switch/variable debug menu
$gameTemp._isPlaytest = true;
setTimeout(function() {
// back to not being playtest
$gameTemp._isPlaytest = false;
}, 100);
}
else if (Cheat_Menu.overlay_openable && !event.altKey && !event.ctrlKey && !event.shiftKey) {
// open and close menu
if (event.keyCode == Cheat_Menu.keyCodes.KEYCODE_1.keyCode) {
if (!Cheat_Menu.initialized) {
for (var i = 0; i < $gameActors._data.length; i++) {
if($gameActors._data[i]) {
$gameActors._data[i].god_mode = false;
if ($gameActors._data[i].god_mode_interval) {
clearInterval($gameActors._data[i].god_mode_interval);
}
}
}
// reset to inital values
for (var name in Cheat_Menu.initial_values) {
Cheat_Menu[name] = Cheat_Menu.initial_values[name];
}
// load saved values if they exist
if ($gameSystem.Cheat_Menu) {
for (var name in $gameSystem.Cheat_Menu) {
Cheat_Menu[name] = $gameSystem.Cheat_Menu[name];
}
}
// if speed is locked then initialize it so effect is active
if (Cheat_Menu.speed_unlocked == false) {
Cheat_Menu.initialize_speed_lock();
}
// only do this once per load or new game
Cheat_Menu.initialized = true;
}
// open menu
if (!Cheat_Menu.cheat_menu_open) {
Cheat_Menu.cheat_menu_open = true;
document.body.appendChild(Cheat_Menu.overlay_box);
document.body.appendChild(Cheat_Menu.overlay);
Cheat_Menu.update_menu();
SoundManager.playSystemSound(1);
}
// close menu
else {
Cheat_Menu.cheat_menu_open = false;
Cheat_Menu.overlay_box.remove();
Cheat_Menu.overlay.remove();
SoundManager.playSystemSound(2);
}
}
// navigate and activate cheats
else if (Cheat_Menu.cheat_menu_open) {
// move menu position
if (event.keyCode == Cheat_Menu.keyCodes.KEYCODE_TILDE.keyCode) {
Cheat_Menu.position++;
if (Cheat_Menu.position > 4) {
Cheat_Menu.position = 0;
}
Cheat_Menu.update_menu();
}
else {
for (var keyCode in Cheat_Menu.keyCodes) {
if (Cheat_Menu.key_listeners[Cheat_Menu.keyCodes[keyCode].key_listener] && event.keyCode == Cheat_Menu.keyCodes[keyCode].keyCode) {
Cheat_Menu.key_listeners[Cheat_Menu.keyCodes[keyCode].key_listener](event);
}
}
}
}
}
});
/////////////////////////////////////////////////
// Load Hook
/////////////////////////////////////////////////
// close the menu and set for initialization on first open
// timer to provide periodic updates if the menu is open
Cheat_Menu.initialize = function() {
Cheat_Menu.overlay_openable = true;
Cheat_Menu.initialized = false;
Cheat_Menu.cheat_menu_open = false;
Cheat_Menu.speed_initialized = false;
Cheat_Menu.overlay_box.remove();
Cheat_Menu.overlay.remove();
// periodic update
clearInterval(Cheat_Menu.menu_update_timer);
Cheat_Menu.menu_update_timer = setInterval(function() {
if (Cheat_Menu.cheat_menu_open) {
Cheat_Menu.update_menu();
}
}, 1000);
};
// add hook for loading a game
DataManager.default_loadGame = DataManager.loadGame;
DataManager.loadGame = function(savefileId) {
Cheat_Menu.initialize();
return DataManager.default_loadGame(savefileId);
};
// add hook for new game
DataManager.default_setupNewGame = DataManager.setupNewGame;
DataManager.setupNewGame = function() {
Cheat_Menu.initialize();
DataManager.default_setupNewGame();
};
// add hook for saving values (just added into $gameSystem to be saved)
DataManager.default_saveGame = DataManager.saveGame;
DataManager.saveGame = function(savefileId) {
// save values that are in intial values
$gameSystem.Cheat_Menu = {};
for (var name in Cheat_Menu.initial_values) {
$gameSystem.Cheat_Menu[name] = Cheat_Menu[name];
}
return DataManager.default_saveGame(savefileId);
};
================================================
FILE: Extension_Example/Cheat_Menu_Cursed_Armor/plugins_patch.txt
================================================
{"name":"Cheat_Menu_Cursed_Armor","status":true,"description":"","parameters":{}}
================================================
FILE: Extension_Example/Cheat_Menu_Cursed_Armor/www/js/plugins/Cheat_Menu_Cursed_Armor.js
================================================
// Extension of the Cheat_Menu plugin for cheats specific to Cursed Armor by wolfzq
// General guidlines for creating similar plugins are provided
// Game is NSFW so... you've been warned
// Check if needed objects are already defined
// this is required in all plugins
// this allows the plugin and the original Cheat_Menu
// plugin to be loaded in any order
if (typeof Cheat_Menu == "undefined") { Cheat_Menu = {}; }
if (typeof Cheat_Menu.initial_values == "undefined") { Cheat_Menu.initial_values = {}; }
if (typeof Cheat_Menu.menus == "undefined") { Cheat_Menu.menus = []; }
if (typeof Cheat_Menu.keyCodes == "undefined") { Cheat_Menu.keyCodes = {}; }
//////////////////////////
// Cheats Class
//////////////////////////
// Here I add new globals in the cheat menu object that are used for cheats
// In this case I'm adding an index that selects the stats specific to the game
Cheat_Menu.wolf_stat_1_selection = 0;
// The array of stats from the game (built later)
// these are then selected from the array with the above variable
Cheat_Menu.wolf_stats_1 = [];
// Again another index for selection for some other stats specific to the game
Cheat_Menu.wolf_stat_2_selection = 0;
// The array of stats from the game (built later)
// these are then selected from the array with the above variable
Cheat_Menu.wolf_stats_2 = [];
/////////////////////////////////////////////////
// Initial values for reseting on new game/load
/////////////////////////////////////////////////
// Here we can specifiy the initial value for any Cheat_Menu variables defined above
// this is applied on game load and new games
// All values below are the inital values for a new saved game
// upon loading a saved game these values will be loaded from the
// save game if possible overwriting the below values
// Because of this all of these variables should be non recursive
// In this case I want my indexs for my selection to reset to the
// first item in each list
Cheat_Menu.initial_values.wolf_stat_1_selection = 0;
Cheat_Menu.initial_values.wolf_stat_2_selection = 0;
/////////////////////////////////////////////////
// Cheat Functions
/////////////////////////////////////////////////
// Here I add the functions that will execute the cheats
// these will be called from the menu
// Main Wolfzq Stats
Cheat_Menu.give_wolf_stat_1 = function(amount) {
$w.addP(Cheat_Menu.wolf_stats_1[Cheat_Menu.wolf_stat_1_selection], amount);
}
// Other Wolfzq Stats (counts of acts)
Cheat_Menu.give_wolf_stat_2 = function(amount) {
$w.addPC(Cheat_Menu.wolf_stats_2[Cheat_Menu.wolf_stat_2_selection], amount);
}
// Player Feel Down
Cheat_Menu.player_feel_down = function() {
$we._playerFeel = 0;
}
// Player Stamina Full
Cheat_Menu.player_stamina_full = function() {
$gameActors._data[1]._hp = $gameActors._data[1].mhp;
}
// Client Feel Up
Cheat_Menu.client_feel_up = function() {
$we._enemyFeel = $we._enemyMaxFeel - 1;
}
// Client Stamina Down
Cheat_Menu.client_stamina_down = function() {
$we._enemyHP -= Math.floor($we._enemyMaxHP / 10);
}
// Activate Sleep Event
Cheat_Menu.wolf_sleep_event = function() {
$gameTemp.reserveCommonEvent(12);
}
/////////////////////////////////////////////////////////////
// Various functions to settup each page of the cheat menu
/////////////////////////////////////////////////////////////
// Now its time to create the functions that build each part of
// the new menus
// To do this a number of helper functions are available
////Cheat_Menu.append_scroll_selector(text, key1, key2, scroll_left_handler, scroll_right_handler)
// insert row with buttons to scroll left and right for some context
//
// appears as:
// <-[key1] text [key2]->
//
// scrolling is handled by scroll_left_handler and scroll_right_handler functions
//
// text: string
// key1,key2: key mapping
// scroll_handler: single function that handles the left and right scroll arguments should be (direction, event)
//
// Provided selectors include:
//
////////Cheat_Menu.append_cheat_title(cheat_name)
// Menu title with scroll options to go between menu, should be first
// append on each menu
//
////////Cheat_Menu.append_amount_selection(key1, key2)
// append the amount selection to the menu
//
//
////Cheat_Menu.append_cheat(cheat_text, status_text, key, click_handler)
// Append a cheat with some handler to activate
//
// Appears as:
// cheat text status text[key]
//
// cheat_text: string
// status_text: string
// key: key mapping
// click_handler: function
//
//
////Cheat_Menu.append_title(title)
// Insert a title row
// A row in the menu that is just text
// title: string
//
//
////Cheat_Menu.append_description(text)
// Insert a desciption row
// A row in the menu that is just text (smaller text than than title)
// text: string
// Here I creat the left and right handlers for scrolling between wolfzq's stats
// all these do is move my selection index around for the array that I have for
// the list of stats
// The handlers determine if they are being called by left or right clicks or button
// presses by the checking the direction argument to see if it is "left" or "right"
Cheat_Menu.scroll_wolf_stat_1 = function(direction, event) {
if (direction == "left") {
Cheat_Menu.wolf_stat_1_selection--;
if (Cheat_Menu.wolf_stat_1_selection < 0) {
Cheat_Menu.wolf_stat_1_selection = Cheat_Menu.wolf_stats_1.length;
}
}
else {
Cheat_Menu.wolf_stat_1_selection++;
if (Cheat_Menu.wolf_stat_1_selection >= Cheat_Menu.wolf_stats_1.length) {
Cheat_Menu.wolf_stat_1_selection = 0;
}
}
SoundManager.playSystemSound(0); // neurtral menu/open sound
Cheat_Menu.update_menu(); // if any of these functions should refresh the menu call this
}
// Again creating the handler, but this time for the other set of stats
Cheat_Menu.scroll_wolf_stat_2 = function(direction, event) {
if (direction == "left") {
Cheat_Menu.wolf_stat_2_selection--;
if (Cheat_Menu.wolf_stat_2_selection < 0) {
Cheat_Menu.wolf_stat_2_selection = Cheat_Menu.wolf_stats_2.length;
}
}
else {
Cheat_Menu.wolf_stat_2_selection++;
if (Cheat_Menu.wolf_stat_2_selection >= Cheat_Menu.wolf_stats_2.length) {
Cheat_Menu.wolf_stat_2_selection = 0;
}
}
SoundManager.playSystemSound(0); // neurtral menu/open sound
Cheat_Menu.update_menu();
}
// The handlers for updating the stats
// these are called what call the cheat functions in the above section
// I generally also play a sound as well, but that isn't needed
// For amounts I now use scroll events, again the direction of the
// calling function is determined by the direction argument
Cheat_Menu.apply_current_wolf_stat_1 = function(direction, event) {
var amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2); // negative sound
}
else {
SoundManager.playSystemSound(1); // positive sound
}
Cheat_Menu.give_wolf_stat_1(amount);
Cheat_Menu.update_menu();
}
// The handler for updating the other stats
Cheat_Menu.apply_current_wolf_stat_2 = function(direction, event) {
var amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2); // negative sound
}
else {
SoundManager.playSystemSound(1); // positive sound
}
Cheat_Menu.give_wolf_stat_2(amount);
Cheat_Menu.update_menu();
}
// The functions that append each of the stat menus
Cheat_Menu.append_wolf_stat_1_selection = function(key1, key2, key3, key4) {
Cheat_Menu.append_title("Stat");
var stat_string = "" + $w._paramsName[Cheat_Menu.wolf_stats_1[Cheat_Menu.wolf_stat_1_selection]];
// a scroll selector with the left and right scrolling functions
Cheat_Menu.append_scroll_selector(stat_string, key1, key2, Cheat_Menu.scroll_wolf_stat_1);
var current_value = "" + $w._params[Cheat_Menu.wolf_stats_1[Cheat_Menu.wolf_stat_1_selection]];
// a cheat function
Cheat_Menu.append_scroll_selector(current_value, key3, key4, Cheat_Menu.apply_current_wolf_stat_1);
}
// Same as above but for the other stats
Cheat_Menu.append_wolf_stat_2_selection = function(key1, key2, key3, key4) {
Cheat_Menu.append_title("Stat");
var stat_string = "" + $w._paramsCountName[Cheat_Menu.wolf_stats_2[Cheat_Menu.wolf_stat_2_selection]];
Cheat_Menu.append_scroll_selector(stat_string, key1, key2, Cheat_Menu.scroll_wolf_stat_2);
var current_value = "" + $w._paramsCount[Cheat_Menu.wolf_stats_2[Cheat_Menu.wolf_stat_2_selection]];
Cheat_Menu.append_scroll_selector(current_value, key3, key4, Cheat_Menu.apply_current_wolf_stat_2);
}
// Here I create function to append each cheat for the 3rd menu
// these are for an ingame minigame
Cheat_Menu.append_minigame_cheats = function(key1, key2, key3, key4, key5) {
Cheat_Menu.append_cheat("Player Feel Down", "Activate", key1, Cheat_Menu.player_feel_down);
Cheat_Menu.append_cheat("Player Stamina Full", "Activate", key2, Cheat_Menu.player_stamina_full);
Cheat_Menu.append_cheat("Client Feel Up", "Activate", key3, Cheat_Menu.client_feel_up);
Cheat_Menu.append_cheat("Client Stamina Down", "Activate", key4, Cheat_Menu.client_stamina_down);
Cheat_Menu.append_title("Misc Cheats");
Cheat_Menu.append_cheat("Sleep Event", "Activate", key5, Cheat_Menu.wolf_sleep_event);
}
//////////////////////////////////////////////////////////////////////////////////
// Final Functions for building each Menu and function list for updating the menu
//////////////////////////////////////////////////////////////////////////////////
// For the last step we must actually append the menus with the functions that create them
// these are all added the Cheat_Menu.menus list which is responsible for creating cycling
// between the menus
Cheat_Menu.menus[Cheat_Menu.menus.length] = function() {
// all cheat menus should have a title cheat as it
// provides the scroll for switching between cheats
Cheat_Menu.append_cheat_title("Cursed Stats 1");
// bulding the list of stats if they haven't been built already, this is game specific
if (Cheat_Menu.wolf_stats_1.length == 0) {
for (var name in $w._params) {
Cheat_Menu.wolf_stats_1[Cheat_Menu.wolf_stats_1.length] = name;
}
}
Cheat_Menu.append_amount_selection(4, 5);
Cheat_Menu.append_wolf_stat_1_selection(6, 7, 8, 9);
};
Cheat_Menu.menus[Cheat_Menu.menus.length] = function() {
Cheat_Menu.append_cheat_title("Cursed Stats 2");
// bulding the list of stats if they haven't been built already, this is game specific
if (Cheat_Menu.wolf_stats_2.length == 0) {
for (var name in $w._paramsCount) {
Cheat_Menu.wolf_stats_2[Cheat_Menu.wolf_stats_2.length] = name;
}
}
Cheat_Menu.append_amount_selection(4, 5);
Cheat_Menu.append_wolf_stat_2_selection(6, 7, 8, 9);
};
Cheat_Menu.menus[Cheat_Menu.menus.length] = function() {
Cheat_Menu.append_cheat_title("Cursed Minigame Cheats");
Cheat_Menu.append_minigame_cheats(4, 5, 6, 7, 8);
};
// Misc
// New KeyCodes can be added with
// Cheat_Menu.keyCodes.NAME = {keyCode: KEYCODE, key_listener: MAPPING};
// NAME: is the name for the mapping (can be any valid variable name)
// KEYCODE: is the keyCode (number) of the button press for the keydown event
// MAPPING: is the char/num/string mapping you pass into the append function
// this will also appear as the text on the menu
// Everything else will be handled by the main Cheat_Menu plugin
================================================
FILE: Extension_Example/Encounters/plugins_patch.txt
================================================
{"name":"Cheat_Menu_Encounters","status":true,"description":"","parameters":{}}
================================================
FILE: Extension_Example/Encounters/www/js/plugins/Cheat_Menu_Encounters.js
================================================
// Extension of the Cheat_Menu plugin for cheats specific to Cursed Armor by wolfzq
// General guidlines for creating similar plugins are provided
// Game is NSFW so... you've been warned
// Check if needed objects are already defined
// this is required in all plugins
// this allows the plugin and the original Cheat_Menu
// plugin to be loaded in any order
if (typeof Cheat_Menu == "undefined") { Cheat_Menu = {}; }
if (typeof Cheat_Menu.initial_values == "undefined") { Cheat_Menu.initial_values = {}; }
if (typeof Cheat_Menu.menus == "undefined") { Cheat_Menu.menus = []; }
if (typeof Cheat_Menu.keyCodes == "undefined") { Cheat_Menu.keyCodes = {}; }
//////////////////////////
// Cheats Class
//////////////////////////
// Here I add new globals in the cheat menu object that are used for cheats
// interval for setting encounter to fixed value
Cheat_Menu.encounterInterval = null;
Cheat_Menu.encounterIntervalValue = 1;
/////////////////////////////////////////////////
// Initial values for reseting on new game/load
/////////////////////////////////////////////////
// Here we can specifiy the initial value for any Cheat_Menu variables defined above
// this is applied on game load and new games
// All values below are the inital values for a new saved game
// upon loading a saved game these values will be loaded from the
// save game if possible overwriting the below values
// Because of this all of these variables should be non recursive
/////////////////////////////////////////////////
// Cheat Functions
/////////////////////////////////////////////////
// Here I add the functions that will execute the cheats
// these will be called from the menu
// freeze encounter value
Cheat_Menu.freezeEncounterValue = function() {
Cheat_Menu.encounterIntervalValue = $gamePlayer._encounterCount;
clearInterval(Cheat_Menu.encounterInterval);
Cheat_Menu.encounterInterval = setInterval(function(){
$gamePlayer._encounterCount = Cheat_Menu.encounterIntervalValue;
},100);
SoundManager.playSystemSound(1);
Cheat_Menu.update_menu();
}
// unfreeze encounter value
Cheat_Menu.unfreezeEncounterValue = function() {
clearInterval(Cheat_Menu.encounterInterval);
Cheat_Menu.encounterInterval = null;
SoundManager.playSystemSound(2);
Cheat_Menu.update_menu();
}
Cheat_Menu.change_encounter_steps = function(amount) {
Cheat_Menu.encounterIntervalValue += amount;
$gamePlayer._encounterCount += amount;
}
/////////////////////////////////////////////////////////////
// Various functions to settup each page of the cheat menu
/////////////////////////////////////////////////////////////
// Now its time to create the functions that build each part of
// the new menus
// To do this a number of helper functions are available
////Cheat_Menu.append_scroll_selector(text, key1, key2, scroll_left_handler, scroll_right_handler)
// insert row with buttons to scroll left and right for some context
//
// appears as:
// <-[key1] text [key2]->
//
// scrolling is handled by scroll_left_handler and scroll_right_handler functions
//
// text: string
// key1,key2: key mapping
// scroll_handler: single function that handles the left and right scroll arguments should be (direction, event)
//
// Provided selectors include:
//
////////Cheat_Menu.append_cheat_title(cheat_name)
// Menu title with scroll options to go between menu, should be first
// append on each menu
//
////////Cheat_Menu.append_amount_selection(key1, key2)
// append the amount selection to the menu
//
//
////Cheat_Menu.append_cheat(cheat_text, status_text, key, click_handler)
// Append a cheat with some handler to activate
//
// Appears as:
// cheat text status text[key]
//
// cheat_text: string
// status_text: string
// key: key mapping
// click_handler: function
//
//
////Cheat_Menu.append_title(title)
// Insert a title row
// A row in the menu that is just text
// title: string
//
//
////Cheat_Menu.append_description(text)
// Insert a desciption row
// A row in the menu that is just text (smaller text than than title)
// text: string
Cheat_Menu.encounterScrollHandler = function(direction, event) {
var amount = Cheat_Menu.amounts[Cheat_Menu.amount_index];
if (direction == "left") {
amount = -amount;
SoundManager.playSystemSound(2);
}
else {
SoundManager.playSystemSound(1);
}
Cheat_Menu.change_encounter_steps(amount);
Cheat_Menu.update_menu();
}
// The handlers for updating the stats
// these are called what call the cheat functions in the above section
// I generally also play a sound as well, but that isn't needed
// For amounts I now use scroll events, again the direction of the
// calling function is determined by the direction argument
// The functions that append each of the stat menus
Cheat_Menu.append_encounter_cheats = function(key1, key2, key3, key4, key5) {
Cheat_Menu.append_amount_selection(key1, key2);
Cheat_Menu.append_scroll_selector($gamePlayer._encounterCount, key3, key4, Cheat_Menu.encounterScrollHandler)
Cheat_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))
}
//////////////////////////////////////////////////////////////////////////////////
// Final Functions for building each Menu and function list for updating the menu
//////////////////////////////////////////////////////////////////////////////////
// For the last step we must actually append the menus with the functions that create them
// these are all added the Cheat_Menu.menus list which is responsible for creating cycling
// between the menus
Cheat_Menu.menus[Cheat_Menu.menus.length] = function() {
// all cheat menus should have a title cheat as it
// provides the scroll for switching between cheats
Cheat_Menu.append_cheat_title("Encounters");
Cheat_Menu.append_encounter_cheats(4, 5, 6, 7, 8);
};
// Misc
// New KeyCodes can be added with
// Cheat_Menu.keyCodes.NAME = {keyCode: KEYCODE, key_listener: MAPPING};
// NAME: is the name for the mapping (can be any valid variable name)
// KEYCODE: is the keyCode (number) of the button press for the keydown event
// MAPPING: is the char/num/string mapping you pass into the append function
// this will also appear as the text on the menu
// Everything else will be handled by the main Cheat_Menu plugin
================================================
FILE: README.md
================================================
RPG Maker MV Cheat Menu Plugin
==============================
I'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.
Open the Menu by pressing the \[1\] Key.
Move menu to different positions with \` (key with tilde ~)
Scroll between cheats with \[2\] and \[3\] Keys.
Any \[#\] indicates a number key to press to cause an action, if you don't want to click.
The menu can also be interacted with by clicking (everything except opening the menu can be done with the mouse).
Clicking is done with left click and clickable elements will be highlighted red on hover over.
Available Cheats Are
--------------------
* God Mode for any Actor (infinite hp and mp, skills shouldn't cost anything)
* Set Enemy/Party HP to 0 hp or 1 hp, Party Full Recover (HP, MP, Status)
* Toggle No Clip
* Edit Exp
* Edit Stats
* Edit Gold
* Edit Items, Weapons, Armor
* Change player movement speed
* Clear Status/States Effects
* Edit Variables/Switches
* Save/Recall Location and Teleport
* Be careful not to skip game events
* If you teleport off the map lower X,Y and teleport again to fix it.
* Open javascript console/developer tools with F8
* With this you can edit game Variables and Switches (at your own risk) in the $gameVariables and $gameSwitches, as well as other advanced stuff
* Open Switch/Variable Debug Menu from playtest Mode with F9
* Better/easier method for editing the Switches and Variables than using the console, slower if you want to edit variables by large amounts
Downloads
---------
Download or Clone from above repository link or click the link below
Download: [GitHub](https://github.com/emerladCoder/RPG-Maker-MV-Cheat-Menu-Plugin/archive/master.zip)
I've tested this to work with Cursed Armor and 魔王イリスの逆襲[RJ176175] (both are NSFW)
Install
-------
* Unpack Game if needed (if you have a single large Game.exe with no /www folder, etc.).
* I used to use EnigmaVBUnpacker tool by [Kao](https://lifeinhex.com/) (most new games do not require this anymore)
* Copy and Paste this contents of Cheat_Menu folder into folder with Game.exe
* Patch your www/js/plugins.js
* Backup your www/js/plugins.js file
* Patch
* Run MVPluginPatcher.exe
or
* 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)
* {"name":"Cheat_Menu","status":true,"description":"","parameters":{}}
* Delete MVPluginPatcher.exe and plugins_patch.txt
If the www/js/plugins.js is read only, remove that in the properties or the patch with fail.
Some 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.
```javascript
//=============================================================================
// main.js
//=============================================================================
PluginManager.setup($plugins);
// Insert the code below, change plugin name if loading something besides Cheat_Menu
PluginManager._path= 'js/plugins/';
PluginManager.loadScript('Cheat_Menu.js');
// End Insert
window.onload = function() {
SceneManager.run(Scene_Boot);
};
```
Uninstall
---------
* Delete www/js/plugins/Cheat_Menu.js and www/js/plugins/Cheat_Menu.css
* Remove plugin entry from www/js/plugins.js
* Be sure to remove the comma from new last entry if this plugin was last in the list
* Ideally you can just restore you backup of plugins.js
* Delete MVPluginPatcher.exe and plugins_patch.txt if you haven't already
Other RPG Maker MV Links
----------------
Original ULMF thread for this plugin: [thread](http://www.ulmf.org/bbs/showthread.php?t=28982)
I might also suggest Libellule's text hook for untranslated games: [thread](http://www.ulmf.org/bbs/showthread.php?t=29359)
It 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.
Froggus 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)
================================================
FILE: src/MVPluginPatcher/MVPluginPatcher/MVPluginPatcher.vcxproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{71FC68C2-4B32-4EE9-A722-FB0F08162373}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>MVPluginPatcher</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
================================================
FILE: src/MVPluginPatcher/MVPluginPatcher/MVPluginPatcher.vcxproj.filters
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
================================================
FILE: src/MVPluginPatcher/MVPluginPatcher/MVPluginPatcher.vcxproj.user
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
================================================
FILE: src/MVPluginPatcher/MVPluginPatcher/main.cpp
================================================
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
using namespace std;
int main() {
// find the plugin.js file
string plugins_path;
if (FILE* file = fopen("www/js/plugins.js", "r")) {
fclose(file);
plugins_path = "www/js/plugins.js";
}
else if (FILE* file = fopen("js/plugins.js", "r")) {
fclose(file);
plugins_path = "js/plugins.js";
}
else {
cout << "Could not find plugins.js\n";
}
// open the plugin.js file
ifstream plugins_js;
plugins_js.open(plugins_path);
// check for error opening
if (!plugins_js.is_open()) {
cout << "Could not open plugins.js\n";
}
// read in and convert to string
string plugin_js_string((istreambuf_iterator<char>(plugins_js)), istreambuf_iterator<char>());
plugins_js.close();
// open the plugins_patch file
ifstream patch;
patch.open("plugins_patch.txt");
// check for error opening
if (!patch.is_open()) {
cout << "Could not open patch.txt\n";
}
// read in and convert to string
string patch_string((istreambuf_iterator<char>(patch)), istreambuf_iterator<char>());
patch.close();
// create stringstream for patch string
stringstream patch_string_ss(patch_string);
bool is_empty = false;
size_t insertion_point = plugin_js_string.find_last_of('}');
// Check that there was at least some plugin
if (insertion_point == string::npos) {
insertion_point = plugin_js_string.find_last_of(']') - 1;
is_empty = true;
}
else {
insertion_point++;
}
string line;
// go through each line and add the plugins
while (getline(patch_string_ss, line)) {
if (line.size() > 0 && line[0] == '{') {
if (plugin_js_string.find(line) == string::npos) {
// handling for empty (no comma on previous line)
if (is_empty) {
line.insert(0, "\n");
is_empty = false;
}
else {
line.insert(0, ",\n");
}
plugin_js_string.insert(insertion_point, line);
// move point to after newly inserted
insertion_point += line.length();
}
}
}
// writeback the new plugins
ofstream plugin_js_write;
plugin_js_write.open(plugins_path, ios::binary | ios::trunc);
// close the file
plugin_js_write.write(plugin_js_string.c_str(), plugin_js_string.size());
plugin_js_write.close();
}
================================================
FILE: src/MVPluginPatcher/MVPluginPatcher/plugins_patch.txt
================================================
{"name":"Cheat_Menu","status":true,"description":"","parameters":{}}
{"name":"OTHER_PLUGIN","status":true,"description":"","parameters":{}}
================================================
FILE: src/MVPluginPatcher/MVPluginPatcher/www/js/plugins.js
================================================
// Generated by RPG Maker.
// Do not edit this file directly.
var $plugins =
[
{"name":"Cheat_Menu","status":true,"description":"","parameters":{}},
{"name":"OTHER_PLUGIN","status":true,"description":"","parameters":{}}
];
================================================
FILE: src/MVPluginPatcher/MVPluginPatcher/www/js/plugins_empty_example.js
================================================
// Generated by RPG Maker.
// Do not edit this file directly.
var $plugins =
[
];
================================================
FILE: src/MVPluginPatcher/MVPluginPatcher/www/js/plugins_full_example.js
================================================
// Generated by RPG Maker.
// Do not edit this file directly.
var $plugins =
[
{"name":"Clipboard_llule","status":true,"description":"","parameters":{}},
{"name":"Speedhax","status":true,"description":"","parameters":{}}
];
================================================
FILE: src/MVPluginPatcher/MVPluginPatcher.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MVPluginPatcher", "MVPluginPatcher\MVPluginPatcher.vcxproj", "{71FC68C2-4B32-4EE9-A722-FB0F08162373}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Debug|x64.ActiveCfg = Debug|x64
{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Debug|x64.Build.0 = Debug|x64
{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Debug|x86.ActiveCfg = Debug|Win32
{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Debug|x86.Build.0 = Debug|Win32
{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Release|x64.ActiveCfg = Release|x64
{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Release|x64.Build.0 = Release|x64
{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Release|x86.ActiveCfg = Release|Win32
{71FC68C2-4B32-4EE9-A722-FB0F08162373}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
gitextract_iuilpbhz/
├── .gitignore
├── Cheat_Menu/
│ ├── patchPlugins.sh
│ ├── plugins_patch.txt
│ └── www/
│ └── js/
│ └── plugins/
│ ├── Cheat_Menu.css
│ └── Cheat_Menu.js
├── Extension_Example/
│ ├── Cheat_Menu_Cursed_Armor/
│ │ ├── plugins_patch.txt
│ │ └── www/
│ │ └── js/
│ │ └── plugins/
│ │ └── Cheat_Menu_Cursed_Armor.js
│ └── Encounters/
│ ├── plugins_patch.txt
│ └── www/
│ └── js/
│ └── plugins/
│ └── Cheat_Menu_Encounters.js
├── README.md
└── src/
└── MVPluginPatcher/
├── MVPluginPatcher/
│ ├── MVPluginPatcher.vcxproj
│ ├── MVPluginPatcher.vcxproj.filters
│ ├── MVPluginPatcher.vcxproj.user
│ ├── main.cpp
│ ├── plugins_patch.txt
│ └── www/
│ └── js/
│ ├── plugins.js
│ ├── plugins_empty_example.js
│ └── plugins_full_example.js
└── MVPluginPatcher.sln
SYMBOL INDEX (1 symbols across 1 files)
FILE: src/MVPluginPatcher/MVPluginPatcher/main.cpp
function main (line 9) | int main() {
Condensed preview — 19 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (106K chars).
[
{
"path": ".gitignore",
"chars": 240,
"preview": "src/MVPluginPatcher/.vs\r\nsrc/MVPluginPatcher/Debug\r\nsrc/MVPluginPatcher/Release\r\nsrc/MVPluginPatcher/x64\r\nsrc/MVPluginPa"
},
{
"path": "Cheat_Menu/patchPlugins.sh",
"chars": 513,
"preview": "#!/bin/sh\n\n[ \"$(id -u)\" = 0 ] && echo \"Please run without root perms\" && exit\n\necho \"Searching for and patching RPGM Plu"
},
{
"path": "Cheat_Menu/plugins_patch.txt",
"chars": 68,
"preview": "{\"name\":\"Cheat_Menu\",\"status\":true,\"description\":\"\",\"parameters\":{}}"
},
{
"path": "Cheat_Menu/www/js/plugins/Cheat_Menu.css",
"chars": 970,
"preview": "#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\tcolo"
},
{
"path": "Cheat_Menu/www/js/plugins/Cheat_Menu.js",
"chars": 58647,
"preview": "\r\n\r\n/////////////////////////////////////////////////\r\n// Cheat Menu Plugin Class\r\n/////////////////////////////////////"
},
{
"path": "Extension_Example/Cheat_Menu_Cursed_Armor/plugins_patch.txt",
"chars": 81,
"preview": "{\"name\":\"Cheat_Menu_Cursed_Armor\",\"status\":true,\"description\":\"\",\"parameters\":{}}"
},
{
"path": "Extension_Example/Cheat_Menu_Cursed_Armor/www/js/plugins/Cheat_Menu_Cursed_Armor.js",
"chars": 11750,
"preview": "// Extension of the Cheat_Menu plugin for cheats specific to Cursed Armor by wolfzq\r\n//\tGeneral guidlines for creating s"
},
{
"path": "Extension_Example/Encounters/plugins_patch.txt",
"chars": 79,
"preview": "{\"name\":\"Cheat_Menu_Encounters\",\"status\":true,\"description\":\"\",\"parameters\":{}}"
},
{
"path": "Extension_Example/Encounters/www/js/plugins/Cheat_Menu_Encounters.js",
"chars": 6480,
"preview": "// Extension of the Cheat_Menu plugin for cheats specific to Cursed Armor by wolfzq\n//\tGeneral guidlines for creating si"
},
{
"path": "README.md",
"chars": 4649,
"preview": "RPG Maker MV Cheat Menu Plugin\r\n==============================\r\n\r\nI've created a plugin for RPG Maker MV that allows use"
},
{
"path": "src/MVPluginPatcher/MVPluginPatcher/MVPluginPatcher.vcxproj",
"chars": 7306,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.micro"
},
{
"path": "src/MVPluginPatcher/MVPluginPatcher/MVPluginPatcher.vcxproj.filters",
"chars": 954,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "src/MVPluginPatcher/MVPluginPatcher/MVPluginPatcher.vcxproj.user",
"chars": 163,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbu"
},
{
"path": "src/MVPluginPatcher/MVPluginPatcher/main.cpp",
"chars": 2320,
"preview": "#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() {"
},
{
"path": "src/MVPluginPatcher/MVPluginPatcher/plugins_patch.txt",
"chars": 140,
"preview": "{\"name\":\"Cheat_Menu\",\"status\":true,\"description\":\"\",\"parameters\":{}}\r\n{\"name\":\"OTHER_PLUGIN\",\"status\":true,\"description\""
},
{
"path": "src/MVPluginPatcher/MVPluginPatcher/www/js/plugins.js",
"chars": 223,
"preview": "// Generated by RPG Maker.\n// Do not edit this file directly.\nvar $plugins =\n[\n{\"name\":\"Cheat_Menu\",\"status\":true,\"descr"
},
{
"path": "src/MVPluginPatcher/MVPluginPatcher/www/js/plugins_empty_example.js",
"chars": 82,
"preview": "// 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",
"chars": 224,
"preview": "// Generated by RPG Maker.\n// Do not edit this file directly.\nvar $plugins =\n[\n{\"name\":\"Clipboard_llule\",\"status\":true,\""
},
{
"path": "src/MVPluginPatcher/MVPluginPatcher.sln",
"chars": 1325,
"preview": "\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 14\r\nVisualStudioVersion = 14.0.24720.0\r\n"
}
]
About this extraction
This page contains the full source code of the emerladCoder/RPG-Maker-MV-Cheat-Menu-Plugin GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 19 files (94.0 KB), approximately 25.3k tokens, and a symbol index with 1 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.