Release 0.0.1.8.8.7
This commit is contained in:
1 parent
3c8a17aa78
commit
c7beab414c
16283 files changed
+768761
-2
No files matched your search
@@ -0,0 +1,260 @@
|
||||
FrameworkModule = {
|
||||
name: "Appearance",
|
||||
key: :appearance,
|
||||
menu: :APPEARANCE,
|
||||
depends_on: []
|
||||
}
|
||||
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
#--------------------------------------------------------------------------
|
||||
# Character Editing Menu
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :LONA,
|
||||
type: :scene,
|
||||
key: :edit_appearance,
|
||||
label: "modules/character:commands/appearance",
|
||||
menu1: "menu:window_help/character1",
|
||||
name: "CheatMenuAppearance",
|
||||
dict: :APPEARANCE,
|
||||
order: 70
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Appearance
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :APPEARANCE,
|
||||
type: :edit_list,
|
||||
key: "Hair Color",
|
||||
label: "modules/character:commands/appearance/hair_color",
|
||||
state: "$game_player.actor.record_HairColor",
|
||||
list: [
|
||||
{ key: 0, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/0")}]" },
|
||||
{ key: 1, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/1")}]" },
|
||||
{ key: 2, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/2")}]" },
|
||||
{ key: 3, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/3")}]" },
|
||||
{ key: 4, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/4")}]" },
|
||||
{ key: 5, label: "[#{$framework.txt("modules/character:commands/appearance/hair_color/5")}]" }
|
||||
],
|
||||
action: ->(v) { $game_player.actor.record_HairColor = v; $game_player.refresh_chs },
|
||||
hide: -> { defined?(LonaRecolor) },
|
||||
order: 30
|
||||
)
|
||||
register_command(
|
||||
group: :PRIMARY,
|
||||
type: :edit_num,
|
||||
key: "Dirt",
|
||||
label: "modules/character:commands/appearance/dirt",
|
||||
state: "$game_player.actor.dirt.to_i",
|
||||
enable: -> { $game_player.actor.actStat.get_stat('dirt', 3) != 0 && !$cheat_autoclean },
|
||||
min: 0,
|
||||
max: 255,
|
||||
action: ->(v) { $game_player.actor.dirt = v },
|
||||
order: 45
|
||||
)
|
||||
register_command(
|
||||
group: :TOGGLES,
|
||||
type: :toggle,
|
||||
key: "Disable Dirt",
|
||||
label: "modules/character:toggle/dirt",
|
||||
state: "$game_player.actor.actStat.get_stat('dirt', 3) == 0",
|
||||
help1: "modules/character:command_help/dirt",
|
||||
help2: "menu:command_help/local",
|
||||
global: false,
|
||||
order: 50,
|
||||
action: -> {
|
||||
if $game_player.actor.actStat.get_stat('dirt', 3) == 0
|
||||
$game_player.actor.actStat.set_stat('dirt', 255, 3)
|
||||
else
|
||||
$game_player.actor.actStat.set_stat('dirt', 0, 3)
|
||||
end
|
||||
$game_player.actor.refresh
|
||||
})
|
||||
register_command(
|
||||
group: :APPEARANCE,
|
||||
type: :edit_list,
|
||||
key: "Freckles",
|
||||
label: "modules/character:commands/appearance/freckles",
|
||||
state: "$game_player.actor.stat['Freckle']",
|
||||
list: [
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/off")}]" },
|
||||
{ key: 1, label: "[#{$framework.txt("menu:cheat_toggle/on")}]" }
|
||||
],
|
||||
action: ->(v) { FrameworkUtils.custom_state_edit("Freckle", v) }
|
||||
)
|
||||
register_command(
|
||||
group: :APPEARANCE,
|
||||
type: :edit_num,
|
||||
key: "PubicHairVag",
|
||||
label: "modules/character:commands/appearance/vpubes",
|
||||
state: "$game_player.actor.stat['PubicHairVag']",
|
||||
help1: "modules/character:command_help/pubes1",
|
||||
min: 0,
|
||||
max: 4,
|
||||
action: ->(v) { FrameworkUtils.custom_state_edit("PubicHairVag", v) }
|
||||
)
|
||||
register_command(
|
||||
group: :APPEARANCE,
|
||||
type: :edit_num,
|
||||
key: "PubicHairAnal",
|
||||
label: "modules/character:commands/appearance/apubes",
|
||||
state: "$game_player.actor.stat['PubicHairAnal']",
|
||||
help1: "modules/character:command_help/pubes1",
|
||||
min: 0,
|
||||
max: 4,
|
||||
action: ->(v) { FrameworkUtils.custom_state_edit("PubicHairAnal", v) }
|
||||
)
|
||||
register_command(
|
||||
group: :APPEARANCE,
|
||||
type: :edit_num,
|
||||
key: "PubicHairVagGrowth",
|
||||
label: "modules/character:commands/appearance/vpubegrowth",
|
||||
state: "$game_player.actor.pubicHair_Vag_GrowRate",
|
||||
hide: -> { $game_player.actor.stat['PubicHairVag'] == 0 },
|
||||
help1: "modules/character:command_help/pubegrowth1",
|
||||
help2: "modules/character:command_help/pubegrowth2",
|
||||
min: 1,
|
||||
max: 365,
|
||||
action: ->(v) { $game_player.actor.pubicHair_Vag_GrowRate = v }
|
||||
)
|
||||
register_command(
|
||||
group: :APPEARANCE,
|
||||
type: :edit_num,
|
||||
key: "PubicHairAnalGrowth",
|
||||
label: "modules/character:commands/appearance/apubegrowth",
|
||||
state: "$game_player.actor.pubicHair_Anal_GrowRate",
|
||||
hide: -> { $game_player.actor.stat['PubicHairAnal'] == 0 },
|
||||
help1: "modules/character:command_help/pubegrowth1",
|
||||
help2: "modules/character:command_help/pubegrowth2",
|
||||
min: 1,
|
||||
max: 365,
|
||||
action: ->(v) { $game_player.actor.pubicHair_Anal_GrowRate = v }
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Auto-Care Toggles
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :TOGGLES,
|
||||
type: :toggle,
|
||||
key: "Auto Bandage",
|
||||
label: "modules/character:toggle/autobandage",
|
||||
help1: "modules/character:command_help/autobandage",
|
||||
state: "$cheat_autobandage",
|
||||
gdef: false,
|
||||
order: 60
|
||||
)
|
||||
register_command(
|
||||
group: :TOGGLES,
|
||||
type: :toggle,
|
||||
key: "Auto Clean",
|
||||
label: "modules/character:toggle/autoclean",
|
||||
help1: "modules/character:command_help/autoclean",
|
||||
state: "$cheat_autoclean",
|
||||
gdef: false,
|
||||
order: 70
|
||||
)
|
||||
register_command(
|
||||
group: :TOGGLES,
|
||||
type: :toggle,
|
||||
key: "Auto Cure",
|
||||
label: "modules/character:toggle/autocure",
|
||||
help1: "modules/character:command_help/autocure",
|
||||
state: "$cheat_autocure",
|
||||
gdef: false,
|
||||
order: 80
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Optional companion mod integration
|
||||
#--------------------------------------------------------------------------
|
||||
if defined?(LonaRecolor) && LonaRecolor.respond_to?(:register_appearance_commands)
|
||||
LonaRecolor.register_appearance_commands
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Auto-Care Application
|
||||
#--------------------------------------------------------------------------
|
||||
# Uses a slower trigger (~3 seconds) since wounds etc. aren't as time-sensitive.
|
||||
class CheatFramework
|
||||
alias_method :slow_trigger_MODULE_AUTOSTATE, :slow_trigger
|
||||
def slow_trigger
|
||||
slow_trigger_MODULE_AUTOSTATE
|
||||
FrameworkUtils.apply_auto_states if FrameworkUtils.ingame?
|
||||
end
|
||||
end
|
||||
|
||||
module FrameworkUtils
|
||||
def self.apply_auto_states
|
||||
return unless self.ingame?
|
||||
actor = $game_player.actor
|
||||
return unless actor
|
||||
|
||||
if $cheat_autobandage; autobandage end
|
||||
if $cheat_autoclean; autoclean end
|
||||
if $cheat_autocure; autocure end
|
||||
end
|
||||
|
||||
def self.autobandage
|
||||
list = ["WoundHead", "WoundChest", "WoundCuff", "WoundSArm", "WoundMArm", "WoundCollar", "WoundBelly", "WoundGroin", "WoundSThigh", "WoundMThigh", "VaginalDamaged", "UrethralDamaged", "SphincterDamaged", "EffectBleedVag", "EffectBleedAnal"]
|
||||
mass_remove_state(list)
|
||||
end
|
||||
|
||||
# Clears the cum tank and its derived states together, since the states are
|
||||
# computed from the tank. Bypasses healCums, which only drains one entry per call.
|
||||
def self.autoclean
|
||||
actor = $game_player.actor
|
||||
actor.vag_cums.clear
|
||||
actor.cumsMeters.each_key { |key| actor.cumsMeters[key] = 0 }
|
||||
actor.check_cum_maximum
|
||||
actor.update_cum_state
|
||||
mass_remove_state(["SemenBursting", "EffectScat", "EffectBleedVag", "EffectBleedAnal"])
|
||||
end
|
||||
|
||||
def self.autocure
|
||||
list = ["ParasitedMoonWorm", "ParasitedPotWorm", "AnalSeedBed", "BladderSeedBed", "ParasitedPolypWorm", "ParasitedHookWorm", "StomachSeedBed", "STD_Leukorrhea", "STD_WartAnal", "STD_WartVag", "STD_HerpesAnal", "STD_HerpesVag"]
|
||||
mass_remove_state(list)
|
||||
end
|
||||
|
||||
def self.mass_remove_state(list)
|
||||
actor = $game_player.actor
|
||||
active_states = list.select { |id| actor.state_stack(id) >= 1 }
|
||||
active_states.each do |state|
|
||||
actor.remove_state(state)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# ---------------------------------
|
||||
# Live portrait preview in the Appearance menu
|
||||
# ---------------------------------
|
||||
class Scene_CheatMenuAppearance
|
||||
alias_method :start_Framework_portrait_preview, :start
|
||||
def start
|
||||
start_Framework_portrait_preview
|
||||
$game_portraits.setRprt("Lona")
|
||||
portrait = $game_portraits.getPortrait("Lona")
|
||||
portrait.skip_animation
|
||||
canvas = portrait.instance_variable_get(:@canvas)
|
||||
left_shift = (0.4 * Graphics.width).round
|
||||
portrait.set_position((Graphics.width - canvas[0]) / 2 - left_shift, (Graphics.height - canvas[1]) / 2)
|
||||
end
|
||||
|
||||
alias_method :update_Framework_portrait_preview, :update
|
||||
def update
|
||||
update_Framework_portrait_preview
|
||||
$game_portraits.getPortrait("Lona").update
|
||||
end
|
||||
|
||||
alias_method :terminate_Framework_portrait_preview, :terminate
|
||||
def terminate
|
||||
portrait = $game_portraits.getPortrait("Lona")
|
||||
portrait.hide
|
||||
portrait.skip_animation # same animation-won't-progress-here issue as start
|
||||
terminate_Framework_portrait_preview
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,100 @@
|
||||
FrameworkModule = {
|
||||
name: "Clothing Utils",
|
||||
key: :clothing_utils,
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Menu Commands
|
||||
#--------------------------------------------------------------------------
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
register_command(
|
||||
group: :FIXES,
|
||||
type: :edit_list,
|
||||
key: "Prevent Discard",
|
||||
label: "modules/others:commands/discard",
|
||||
help1: "modules/others:command_help/discard1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_prevent_clothing_discard",
|
||||
# Inline 3-state list instead of reusing Fixes.rb's FIX_TOGGLE_LIST.
|
||||
list: [
|
||||
{ key: -1, label: "[#{$framework.txt("menu:cheat_toggle/disable")}]" },
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/off")}]" },
|
||||
{ key: 1, label: "[#{$framework.txt("menu:cheat_toggle/on")}]" },
|
||||
],
|
||||
gdef: 0,
|
||||
restart: -1,
|
||||
order: 50
|
||||
)
|
||||
register_command(
|
||||
group: :MISC,
|
||||
type: :action,
|
||||
key: "Remove Clothes",
|
||||
label: "modules/others:commands/unequip",
|
||||
hotkey: {key: "F3"},
|
||||
action: -> { FrameworkUtils.unequipall(false) },
|
||||
order: 60
|
||||
)
|
||||
register_command(
|
||||
group: :MISC,
|
||||
type: :action,
|
||||
key: "Force Remove Clothes",
|
||||
label: "modules/others:commands/forceunequip",
|
||||
help1: "modules/others:command_help/forceunequip1",
|
||||
hotkey: {key: "Shift+F3"},
|
||||
action: -> { FrameworkUtils.unequipall(true) },
|
||||
order: 70
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
module FrameworkUtils
|
||||
def self.unequipall(force)
|
||||
if self.ingame?
|
||||
actor = $game_player.actor
|
||||
actor.equip_slots.size.times do |i|
|
||||
item = actor.equips[i]
|
||||
next if item && item.type_tag == "Hair"
|
||||
bondage = item && item.type_tag == "Bondage"
|
||||
actor.change_equip(i, nil) if actor.equip_change_ok?(i) || (force && bondage)
|
||||
SndLib.sound_equip_armor
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Prevent Discard Patch
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_prevent_clothing_discard >= 0
|
||||
if defined?(Game_Actor) && Game_Actor.method_defined?(:remove_equip_on_hit)
|
||||
class Game_Actor
|
||||
alias_method :cf_prevent_discard_remove_equip_on_hit, :remove_equip_on_hit
|
||||
def remove_equip_on_hit(slot_key=self.remove_equip_slot_picker, summon=true, sound_play=true)
|
||||
summon = false if $cheat_prevent_clothing_discard == 1
|
||||
cf_prevent_discard_remove_equip_on_hit(slot_key, summon, sound_play)
|
||||
end
|
||||
end
|
||||
elsif defined?(GIM_CHCG) && GIM_CHCG.method_defined?(:combat_remove_random_equip_exec)
|
||||
module GIM_CHCG
|
||||
alias_method :cf_prevent_discard_combat_remove_random_equip_exec, :combat_remove_random_equip_exec
|
||||
def combat_remove_random_equip_exec(tar_name,eqp_target=combat_hit_get_removable_slots,summon=true)
|
||||
unless $cheat_prevent_clothing_discard == 1
|
||||
return cf_prevent_discard_combat_remove_random_equip_exec(tar_name,eqp_target,summon)
|
||||
end
|
||||
eqp_target = $data_system.equip_type_name[eqp_target] if eqp_target.is_a?(String)
|
||||
$game_player.actor.change_equip(eqp_target, nil)
|
||||
weaponSlots = $data_system.weapon_slots
|
||||
tarType = weaponSlots.include?(eqp_target) ? "Weapon" : "Armor"
|
||||
#$game_party.drop_tgt_item_and_summon(tarType,tar_name,1,summon)
|
||||
if weaponSlots.include?(eqp_target) && summon
|
||||
SndLib.sound_combat_sword_hit_sword(vol=80,effect=65+rand(10))
|
||||
else
|
||||
SndLib.sound_DressTear(vol=80,effect=75+rand(10))
|
||||
end
|
||||
$game_player.actor.update_state_frames
|
||||
$game_player.update
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,229 @@
|
||||
FrameworkModule = {
|
||||
name: "Difficulty",
|
||||
key: :difficulty,
|
||||
menu: :DIFFICULTY
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Menu Commands
|
||||
#--------------------------------------------------------------------------
|
||||
module MenuFramework
|
||||
module MENU
|
||||
register_command(
|
||||
type: :scene,
|
||||
label: "modules/others:commands/difficulty",
|
||||
name: "CheatMenuDifficulty",
|
||||
order: 7
|
||||
)
|
||||
end
|
||||
|
||||
module SUBMENU
|
||||
register_command(
|
||||
type: :edit_num,
|
||||
key: "World Difficulty",
|
||||
label: "modules/others:commands/world",
|
||||
state: "$story_stats['WorldDifficulty'].to_i",
|
||||
min: 0,
|
||||
max: 100,
|
||||
action: ->(v) { $story_stats["WorldDifficulty"] = v },
|
||||
order: 10
|
||||
)
|
||||
# Same underlying cheat as Pregnancy.rb's "Pregnancy Difficulty" - shares its key/state/text so
|
||||
# both screens read and persist the exact same value, just registered again for this screen.
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Pregnancy Difficulty",
|
||||
label: "modules/pregnancy:commands/difficulty",
|
||||
state: "$cheat_pregnancy_difficulty",
|
||||
gdef: -1,
|
||||
help1: "modules/pregnancy:command_help/difficulty",
|
||||
order: 60,
|
||||
list: [
|
||||
{ key: -1, label: "[#{$framework.txt("menu:cheat_toggle/off")}]" },
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/hard")}]" },
|
||||
{ key: 1, label: "[#{$framework.txt("menu:cheat_toggle/hell")}]" },
|
||||
{ key: 2, label: "[#{$framework.txt("menu:cheat_toggle/doom")}]" }
|
||||
]
|
||||
)
|
||||
register_command(
|
||||
type: :action,
|
||||
key: "Disable Doom Mode",
|
||||
label: "modules/others:commands/diff",
|
||||
help1: "modules/others:command_help/diff",
|
||||
hide: -> { $story_stats["Setup_Hardcore"] != 2 },
|
||||
order: 70,
|
||||
action: -> { $story_stats["Setup_Hardcore"] = 0
|
||||
$story_stats["record_giveup_hardcore"] = 0 }
|
||||
)
|
||||
|
||||
# Off/Hard/Hell list, matching Pregnancy Difficulty's naming scheme.
|
||||
DIFFICULTY_TIER_LIST = [
|
||||
{ key: -1, label: "[#{$framework.txt("menu:cheat_toggle/off")}]" },
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/hard")}]" },
|
||||
{ key: 1, label: "[#{$framework.txt("menu:cheat_toggle/hell")}]" },
|
||||
]
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Addiction Effects",
|
||||
label: "modules/others:commands/addictioneffects",
|
||||
help1: "modules/others:command_help/addictioneffects1",
|
||||
state: "$cheat_addiction_effects",
|
||||
list: DIFFICULTY_TIER_LIST,
|
||||
gdef: 0,
|
||||
order: 40
|
||||
)
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Milk Overflow",
|
||||
label: "modules/others:commands/milkoverflow",
|
||||
help1: "modules/others:command_help/milkoverflow1",
|
||||
state: "$cheat_milk_overflow",
|
||||
list: DIFFICULTY_TIER_LIST,
|
||||
gdef: 0,
|
||||
order: 50
|
||||
)
|
||||
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Despawn Fix",
|
||||
label: "modules/others:commands/despawnfix",
|
||||
help1: "modules/others:command_help/despawnfix1",
|
||||
state: "$cheat_item_despawn",
|
||||
list: [
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/disable")}]" },
|
||||
{ key: 1, label: "[x1]" },
|
||||
{ key: 2, label: "[x2]" },
|
||||
{ key: 4, label: "[x4]" },
|
||||
{ key: 5, label: "[x8]" },
|
||||
{ key: -1, label: "[#{$framework.txt("menu:cheat_toggle/infinite")}]" },
|
||||
],
|
||||
# 0 doubles as both "Off" and "not installed" (the patch's own gate is `!= 0`) - defaulting
|
||||
# here instead of x1 means a fresh install doesn't pay for the patch until actually used.
|
||||
gdef: 1,
|
||||
restart: 0,
|
||||
order: 20
|
||||
)
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Increase Drop Rate",
|
||||
label: "modules/others:commands/drops",
|
||||
help1: "modules/others:command_help/dropsfix1",
|
||||
state: "$cheat_item_drops",
|
||||
list: [
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/disable")}]" },
|
||||
{ key: 1, label: "[x1]" },
|
||||
{ key: 2, label: "[x2]" },
|
||||
{ key: 4, label: "[x4]" },
|
||||
],
|
||||
gdef: 1,
|
||||
restart: 0,
|
||||
order: 30
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Addiction Effects
|
||||
#--------------------------------------------------------------------------
|
||||
# Ograsm/Semen/Drug addiction overevents normally only trigger at Hell+ difficulty - Off suppresses
|
||||
# them regardless, Hell forces them regardless, Hard leaves the game's own check alone.
|
||||
module GIM_OVC
|
||||
alias_method :cf_addiction_check_half_over_event, :check_half_over_event
|
||||
def check_half_over_event(parallel = false)
|
||||
cf_addiction_check_half_over_event(parallel)
|
||||
return unless $cheat_addiction_effects == 1 && $story_stats["Setup_Hardcore"] < 1
|
||||
checkOev_OgrasmAddiction(parallel)
|
||||
checkOev_SemenAddiction(parallel)
|
||||
checkOev_DrugAddiction(parallel)
|
||||
end
|
||||
|
||||
alias_method :cf_addiction_off_ograsm, :checkOev_OgrasmAddiction
|
||||
def checkOev_OgrasmAddiction(parallel = false)
|
||||
return if $cheat_addiction_effects == -1
|
||||
cf_addiction_off_ograsm(parallel)
|
||||
end
|
||||
|
||||
alias_method :cf_addiction_off_semen, :checkOev_SemenAddiction
|
||||
def checkOev_SemenAddiction(parallel = false)
|
||||
return if $cheat_addiction_effects == -1
|
||||
cf_addiction_off_semen(parallel)
|
||||
end
|
||||
|
||||
alias_method :cf_addiction_off_drug, :checkOev_DrugAddiction
|
||||
def checkOev_DrugAddiction(parallel = false)
|
||||
return if $cheat_addiction_effects == -1
|
||||
cf_addiction_off_drug(parallel)
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Milk Overflow
|
||||
#--------------------------------------------------------------------------
|
||||
# checkOev_Milk gates itself on Hell+ difficulty internally - Off/Hell temporarily force that gate
|
||||
# below/above for one call instead of duplicating its body; Hard leaves it alone.
|
||||
module GIM_OVC
|
||||
alias_method :cf_milk_overflow_checkOev_Milk, :checkOev_Milk
|
||||
def checkOev_Milk(parallel = false)
|
||||
return if $cheat_milk_overflow == -1
|
||||
return cf_milk_overflow_checkOev_Milk(parallel) unless $cheat_milk_overflow == 1
|
||||
original = $story_stats["Setup_Hardcore"]
|
||||
$story_stats["Setup_Hardcore"] = 1
|
||||
cf_milk_overflow_checkOev_Milk(parallel)
|
||||
$story_stats["Setup_Hardcore"] = original
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Item Decay Control
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_item_despawn != 0
|
||||
class Game_Map
|
||||
alias rq_orig_reserve_summon_event reserve_summon_event
|
||||
def reserve_summon_event(event_name, x=$game_player.x, y=$game_player.y, id=-1, data=nil)
|
||||
if event_name && $data_ItemName[event_name] && event_lib[event_name]
|
||||
event_template = event_lib[event_name][1]
|
||||
if event_template.pages
|
||||
event_template.pages.each do |page|
|
||||
next unless page.move_route && page.move_route.list.is_a?(Array)
|
||||
page.move_route.list.each do |cmd|
|
||||
next unless cmd.is_a?(RPG::MoveCommand) && [45, 42].include?(cmd.code)
|
||||
if $cheat_item_despawn >= 1 && cmd.parameters[0] =~ /@wait_count.*scoutcraft_trait/
|
||||
new_wait = [600 + 60 * $game_player.actor.scoutcraft_trait, 1800].min * $cheat_item_despawn
|
||||
cmd.parameters[0] = "@wait_count = #{new_wait}"
|
||||
elsif $cheat_item_despawn == -1
|
||||
if cmd.parameters[0] == 100
|
||||
cmd.parameters[0] = 255
|
||||
elsif cmd.parameters[0] =~ /\bdelete\b/
|
||||
cmd.code = 0
|
||||
cmd.parameters = []
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@summoned_evs << [event_name, x, y, id, data]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Increase Drop Rate
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_item_drops != 0
|
||||
class Game_NonPlayerCharacter
|
||||
alias orig_min_drop_amt min_drop_amt
|
||||
alias orig_max_drop_amt max_drop_amt
|
||||
|
||||
# Falls back to the normal amount when the multiplier is 0 (Disabled).
|
||||
def min_drop_amt
|
||||
return orig_min_drop_amt unless $cheat_item_drops > 0
|
||||
(orig_min_drop_amt * $cheat_item_drops).to_i
|
||||
end
|
||||
|
||||
def max_drop_amt
|
||||
return orig_max_drop_amt unless $cheat_item_drops > 0
|
||||
(orig_max_drop_amt * $cheat_item_drops).to_i
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,344 @@
|
||||
FrameworkModule = {
|
||||
name: "Game Fixes",
|
||||
key: :game_fixes,
|
||||
menu: :FIXES #Group key.
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Menu Commands
|
||||
#--------------------------------------------------------------------------
|
||||
module MenuFramework
|
||||
module MENU
|
||||
register_command(
|
||||
type: :scene,
|
||||
label: "modules/others:commands/fix",
|
||||
name: "CheatMenuGameFixes",
|
||||
order: 5
|
||||
)
|
||||
end
|
||||
|
||||
module SUBMENU
|
||||
#--------------------------------------------------------------------------
|
||||
# Restart-Capable Fixes
|
||||
#--------------------------------------------------------------------------
|
||||
# Shared Disable / Off / On list for every fix below.
|
||||
FIX_TOGGLE_LIST = [
|
||||
{ key: -1, label: "[#{$framework.txt("menu:cheat_toggle/disable")}]" },
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/off")}]" },
|
||||
{ key: 1, label: "[#{$framework.txt("menu:cheat_toggle/on")}]" },
|
||||
]
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Equip Anything",
|
||||
label: "modules/others:commands/equip",
|
||||
help1: "modules/others:command_help/equip1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_classless_society",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 0,
|
||||
restart: -1,
|
||||
order: 30
|
||||
)
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Stealth Fix",
|
||||
label: "modules/others:commands/stealth",
|
||||
help1: "modules/others:command_help/stealth1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_stealth_confirm_fix",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 1,
|
||||
restart: -1,
|
||||
order: 60
|
||||
)
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Fast Nap",
|
||||
label: "modules/others:commands/fastnap",
|
||||
help1: "modules/others:command_help/fastnap1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_fast_nap",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 0,
|
||||
restart: -1,
|
||||
hide: -> { $framework.roleplay_mod? },
|
||||
order: 40
|
||||
)
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Achievement Fix",
|
||||
label: "modules/others:commands/achievementfix",
|
||||
help1: "modules/others:command_help/achievementfix1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_difficulty_achievement_fix",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 1,
|
||||
restart: -1,
|
||||
order: 70
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Misc
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
type: :toggle,
|
||||
key: "Night Vision",
|
||||
label: "modules/others:commands/nightvision",
|
||||
help1: "modules/others:command_help/nightvision1",
|
||||
state: "$cheat_night_vision",
|
||||
gdef: false,
|
||||
order: 10,
|
||||
action: -> {
|
||||
$cheat_night_vision = !$cheat_night_vision
|
||||
$framework.ini.write_global("Night Vision", $cheat_night_vision)
|
||||
$game_map.shadows.cf_reapply_opacity if FrameworkUtils.ingame? && $game_map && $game_map.shadows
|
||||
}
|
||||
)
|
||||
register_command(
|
||||
type: :toggle,
|
||||
key: "Noclip",
|
||||
label: "modules/others:commands/noclip",
|
||||
help1: "modules/others:command_help/noclip1",
|
||||
state: "$cheat_noclip",
|
||||
gdef: false,
|
||||
order: 20
|
||||
)
|
||||
register_command(
|
||||
type: :toggle,
|
||||
key: "Forage Glow",
|
||||
label: "modules/others:commands/forageglow",
|
||||
help1: "modules/others:command_help/forageglow1",
|
||||
state: "$cheat_forage_glow",
|
||||
gdef: false,
|
||||
order: 25
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Stealth Fix
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_stealth_confirm_fix >= 0
|
||||
class Game_Player
|
||||
alias_method :cf_stealth_confirm_fix_update_nonmoving, :update_nonmoving
|
||||
|
||||
def update_nonmoving(last_moving)
|
||||
return cf_stealth_confirm_fix_update_nonmoving(last_moving) unless $cheat_stealth_confirm_fix == 1
|
||||
return if $game_map.interpreter.running?
|
||||
if last_moving
|
||||
# on_player_walk was removed from Game_Party in B.0.10.8.05; only call it pre-patch.
|
||||
$game_party.on_player_walk if $game_party.respond_to?(:on_player_walk)
|
||||
return if check_touch_event
|
||||
end
|
||||
if inputToTriggerEvent? && movable? && !actor.lonaDeath?
|
||||
@pathfinding = false
|
||||
return if Input.skillKeyPressed?
|
||||
move_normal unless self.actor.stat["IntoShadow"] == 1
|
||||
return if check_action_event(chkItemsPick = true)
|
||||
SndLib.sys_trigger
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Equip Anything
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_classless_society >= 0
|
||||
class Game_BattlerBase
|
||||
alias_method :cf_classless_society_equip_wtype_ok, :equip_wtype_ok?
|
||||
alias_method :cf_classless_society_equip_atype_ok, :equip_atype_ok?
|
||||
alias_method :cf_classless_society_wtype_sealed, :wtype_sealed?
|
||||
alias_method :cf_classless_society_atype_sealed, :atype_sealed?
|
||||
alias_method :cf_classless_society_usable_item_conditions_met, :usable_item_conditions_met?
|
||||
|
||||
def equip_wtype_ok?(wtype_id)
|
||||
return cf_classless_society_equip_wtype_ok(wtype_id) unless $cheat_classless_society == 1
|
||||
# Allow equipping weapons no matter the type.
|
||||
true
|
||||
end
|
||||
def equip_atype_ok?(atype_id)
|
||||
return cf_classless_society_equip_atype_ok(atype_id) unless $cheat_classless_society == 1
|
||||
# Allow equipping armor no matter the type.
|
||||
true
|
||||
end
|
||||
def wtype_sealed?(wtype_id)
|
||||
return cf_classless_society_wtype_sealed(wtype_id) unless $cheat_classless_society == 1
|
||||
# equippable? checks this separately from equip_wtype_ok? - e.g. TrueDeepone's wtype_seal.
|
||||
false
|
||||
end
|
||||
def atype_sealed?(atype_id)
|
||||
return cf_classless_society_atype_sealed(atype_id) unless $cheat_classless_society == 1
|
||||
false
|
||||
end
|
||||
def usable_item_conditions_met?(item)
|
||||
return cf_classless_society_usable_item_conditions_met(item) unless $cheat_classless_society == 1
|
||||
# Allow weapon skills regardless of prerequisites
|
||||
return true if item.is_a?(RPG::Skill) && added_skills.include?(item.id)
|
||||
movable?
|
||||
end
|
||||
end
|
||||
|
||||
class Game_Actor
|
||||
alias_method :cf_classless_society_equip_change_ok, :equip_change_ok?
|
||||
def equip_change_ok?(slot_id)
|
||||
return cf_classless_society_equip_change_ok(slot_id) unless $cheat_classless_society == 1
|
||||
resolved_slot = slot_id.is_a?(String) ? $data_system.equip_type_name[slot_id] : slot_id
|
||||
# Only bondage/cursed items - other fixed/sealed slots stay blocked.
|
||||
return true if equips[resolved_slot] && equips[resolved_slot].type_tag == "Bondage"
|
||||
cf_classless_society_equip_change_ok(slot_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Fast Nap
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_fast_nap >= 0 && !$framework.roleplay_mod?
|
||||
# Ctrl+rest spends sat in 10-point chunks to heal 20-point chunks of stamina/health at once.
|
||||
# Skipped under RolePlay-S: it replaces this same method unaliased, so load order would decide the winner.
|
||||
class Game_Actor
|
||||
alias_method :cf_fast_nap_check_sat_heal_HealthSta, :check_sat_heal_HealthSta
|
||||
|
||||
def check_sat_heal_HealthSta(tmpCost = 10)
|
||||
return cf_fast_nap_check_sat_heal_HealthSta(tmpCost) unless $cheat_fast_nap == 1 && Input.press?(:CTRL)
|
||||
|
||||
staMax = battle_stat.get_stat("sta", 2)
|
||||
hpMax = battle_stat.get_stat("health", 2)
|
||||
staVS = (staMax - self.sta).abs
|
||||
hpVS = $story_stats["Setup_Hardcore"] > 0 ? 0 : (hpMax - self.health).abs
|
||||
return cf_fast_nap_check_sat_heal_HealthSta(tmpCost) if self.sat < tmpCost || (staVS == 0 && hpVS == 0)
|
||||
|
||||
staChunks = ((staMax - self.sta) / 20).to_i
|
||||
hpChunks = ((hpMax - self.health) / 20).to_i
|
||||
satChunks = (self.sat / 10).to_i
|
||||
restoreSta = staChunks > 1
|
||||
restoreHp = hpChunks > 1 && self.sta == staMax
|
||||
return cf_fast_nap_check_sat_heal_HealthSta(tmpCost) unless restoreSta || restoreHp
|
||||
|
||||
fullSta = [staChunks, satChunks].min
|
||||
fullHp = [hpChunks, satChunks].min
|
||||
self.sat -= restoreSta ? tmpCost * fullSta : tmpCost * fullHp
|
||||
|
||||
satScore = tmpCost * 2
|
||||
if staVS != 0 && satScore > 0
|
||||
staInc = [staVS, satScore].min.to_i
|
||||
satScore -= staInc
|
||||
if restoreSta
|
||||
self.sta += staInc * fullSta
|
||||
SndLib.buff_life
|
||||
else
|
||||
self.sta += staInc
|
||||
end
|
||||
end
|
||||
if hpVS != 0 && satScore > 0
|
||||
hpInc = [hpVS, satScore].min.to_i
|
||||
if restoreHp
|
||||
self.health += hpInc * fullHp
|
||||
SndLib.buff_life
|
||||
else
|
||||
self.health += hpInc
|
||||
end
|
||||
end
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Night Vision
|
||||
#--------------------------------------------------------------------------
|
||||
# Shadow#set_opacity is the single choke point for all map darkness - halve
|
||||
# whatever it's asked for while the toggle is on, restore it exactly on off.
|
||||
class Shadow
|
||||
alias_method :cf_night_vision_set_opacity, :set_opacity
|
||||
|
||||
def set_opacity(a, time = nil)
|
||||
@cf_true_opacity = a
|
||||
cf_night_vision_set_opacity($cheat_night_vision ? (a / 2) : a, time)
|
||||
end
|
||||
|
||||
def cf_reapply_opacity
|
||||
true_opacity = @cf_true_opacity || @a
|
||||
cf_night_vision_set_opacity($cheat_night_vision ? (true_opacity / 2) : true_opacity, nil)
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Noclip
|
||||
#--------------------------------------------------------------------------
|
||||
# debug_through? already bypasses both terrain and NPC/event collision (see passable? in
|
||||
# 33_Game_CharacterBase.rb) - normally only true in the RPG Maker editor's own test-play mode.
|
||||
class Game_Player
|
||||
alias_method :cf_noclip_debug_through?, :debug_through?
|
||||
def debug_through?
|
||||
$cheat_noclip || cf_noclip_debug_through?
|
||||
end
|
||||
|
||||
# handle_on_move_overmap is the single per-step choke point for overworld stamina drain, time
|
||||
# passage, and danger/encounter accumulation - skip it entirely while noclipping.
|
||||
alias_method :cf_noclip_handle_on_move_overmap, :handle_on_move_overmap
|
||||
def handle_on_move_overmap(use_ctrl = false)
|
||||
return if $cheat_noclip
|
||||
cf_noclip_handle_on_move_overmap(use_ctrl)
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Forage Glow
|
||||
#--------------------------------------------------------------------------
|
||||
# "Static*"-named events are the overworld forage nodes - tag them once (draw priority + blink),
|
||||
# each starting on a random phase so a cluster doesn't blink in sync.
|
||||
class Game_Event
|
||||
alias_method :cf_forage_glow_refresh, :refresh
|
||||
def refresh
|
||||
cf_forage_glow_refresh
|
||||
return if @cheat_forage_glow_checked
|
||||
@cheat_forage_glow_checked = true
|
||||
return unless $cheat_forage_glow
|
||||
return unless @event && @event.name.start_with?("Static")
|
||||
self.priority_type = 2
|
||||
@cheat_forage_glow_tagged = true
|
||||
@cheat_forage_glow_frame = rand(80)
|
||||
end
|
||||
|
||||
alias_method :cf_forage_glow_update, :update
|
||||
def update
|
||||
cf_forage_glow_update
|
||||
return unless @cheat_forage_glow_tagged
|
||||
frame = (@cheat_forage_glow_frame += 1)
|
||||
lit = (frame % 80) < 20
|
||||
return if lit == @cheat_forage_glow_lit
|
||||
@cheat_forage_glow_lit = lit
|
||||
self.tone = lit ? Tone.new(120, 120, 60, 0) : Tone.new(0, 0, 0, 0)
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Achievement Fix
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_difficulty_achievement_fix >= 0
|
||||
module GIM_ADDON
|
||||
alias_method :cf_achievement_fix_achCheckDate, :achCheckDate
|
||||
|
||||
# Grants Hell and Doom achievement tiers independently for each date.
|
||||
def achCheckDate
|
||||
return cf_achievement_fix_achCheckDate unless $cheat_difficulty_achievement_fix == 1
|
||||
return if $story_stats["Setup_HardcoreAmt"] != [1772,3,1]
|
||||
case $game_date.date[0..2]
|
||||
when [1772,3,2]
|
||||
GabeSDK.getAchievement("HellModDateT1") if $story_stats["Setup_Hardcore"] >= 1
|
||||
GabeSDK.getAchievement("DoomModDateT1") if $story_stats["Setup_Hardcore"] >= 2
|
||||
when [1773,3,1]
|
||||
GabeSDK.getAchievement("HellModDateT2") if $story_stats["Setup_Hardcore"] >= 1
|
||||
GabeSDK.getAchievement("DoomModDateT2") if $story_stats["Setup_Hardcore"] >= 2
|
||||
when [1774,3,1]
|
||||
GabeSDK.getAchievement("HellModDateT3") if $story_stats["Setup_Hardcore"] >= 1
|
||||
when [1776,6,6]
|
||||
GabeSDK.getAchievement("DoomModDateT3") if $story_stats["Setup_Hardcore"] >= 2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,378 @@
|
||||
FrameworkModule = {
|
||||
name: "Inventory Editor",
|
||||
key: :invedit,
|
||||
order: 50,
|
||||
menu: :NONE
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Menu Commands
|
||||
#--------------------------------------------------------------------------
|
||||
MenuFramework::MENU.register_command(
|
||||
type: :scene,
|
||||
key: :items,
|
||||
label: "modules/invedit:commands/items",
|
||||
name: "CheatMenuItems",
|
||||
order: 20
|
||||
)
|
||||
|
||||
MenuFramework::MENU.register_command(
|
||||
type: :scene,
|
||||
key: :weapons,
|
||||
label: "modules/invedit:commands/weapons",
|
||||
name: "CheatMenuItems",
|
||||
order: 21
|
||||
)
|
||||
|
||||
MenuFramework::MENU.register_command(
|
||||
type: :scene,
|
||||
key: :armors,
|
||||
label: "modules/invedit:commands/armors",
|
||||
name: "CheatMenuItems",
|
||||
order: 22
|
||||
)
|
||||
|
||||
MenuFramework::MENU.register_command(
|
||||
type: :scene,
|
||||
key: :status,
|
||||
label: "modules/invedit:commands/status",
|
||||
name: "CheatMenuStatus",
|
||||
order: 30
|
||||
)
|
||||
|
||||
# LonaCraft catalog (separate from the existing complete Items/Weapons/Armors).
|
||||
# Only register if the mod is available; all results come from the runtime DB.
|
||||
if $mod_manager.mods["LonaCraft"] && $mod_manager.mods["LonaCraft"].enabled
|
||||
MenuFramework::MENU.register_command(
|
||||
type: :scene, key: :lc_catalog,
|
||||
label: "modules/invedit:commands/lonacraft",
|
||||
name: "CheatMenuLonaCraftCatalog", dict: :LONACRAFT, order: 25
|
||||
)
|
||||
[
|
||||
[:lc_materials, "modules/invedit:commands/lc_materials", 10],
|
||||
[:lc_furniture, "modules/invedit:commands/lc_furniture", 20],
|
||||
[:lc_weapons, "modules/invedit:commands/lc_weapons", 30],
|
||||
[:lc_tier_weapons, "modules/invedit:commands/lc_tier_weapons", 40],
|
||||
[:lc_tier_armors, "modules/invedit:commands/lc_tier_armors", 50]
|
||||
].each do |catalog_type, text_key, priority|
|
||||
MenuFramework::SUBMENU.register_command(
|
||||
type: :scene, group: :LONACRAFT, key: catalog_type,
|
||||
label: text_key, name: "CheatMenuItems", order: priority
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
MenuFramework::SUBMENU.register_command(
|
||||
type: :action,
|
||||
group: :MISC,
|
||||
key: "Bank Anywhere",
|
||||
label: "modules/invedit:commands/bank",
|
||||
hotkey: {key: "F2"},
|
||||
order: 100,
|
||||
action: -> {
|
||||
SceneManager.goto(Scene_BankStorage)
|
||||
SceneManager.scene.prepare(System_Settings::STORAGE_BANK)
|
||||
})
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Cache Item/weapon/armor/status Lists
|
||||
#--------------------------------------------------------------------------
|
||||
# Pre-filtered once instead of re-scanning the raw data every time.
|
||||
module MenuFramework
|
||||
module InvEditCache
|
||||
extend self
|
||||
|
||||
attr_reader :items, :weapons, :armors, :statuses
|
||||
attr_reader :lc_materials, :lc_furniture, :lc_weapons, :lc_tier_weapons, :lc_tier_armors
|
||||
|
||||
def signature
|
||||
[$data_items, $data_weapons, $data_armors].map do |group|
|
||||
group ? [group.object_id, group.size] : [nil, 0]
|
||||
end
|
||||
end
|
||||
|
||||
# Later mods (notably LonaCraft) wrap load_mod_database and append items
|
||||
# AFTER CheatFramework's database hook has finished. Recheck on menu open.
|
||||
def ensure_fresh
|
||||
build if @items.nil? || @built_signature != signature
|
||||
end
|
||||
|
||||
def build
|
||||
@items = build_group($data_items, "I%03d:")
|
||||
@weapons = build_group($data_weapons, "W%03d:")
|
||||
@armors = build_group($data_armors, "A%03d:")
|
||||
@lc_materials = @items.select do |_label, item|
|
||||
item.item_name.to_s.start_with?("ItemLonaCraft") &&
|
||||
!item.item_name.to_s.start_with?("ItemLonaCraftFurniture")
|
||||
end
|
||||
@lc_furniture = @items.select do |_label, item|
|
||||
item.item_name.to_s.start_with?("ItemLonaCraftFurniture")
|
||||
end
|
||||
@lc_weapons = @weapons.select do |_label, item|
|
||||
item.item_name.to_s.start_with?("ItemLonaCraft")
|
||||
end
|
||||
# LonaCraft crafts quality-tier equipment as _LC2 ... _LC5 variants.
|
||||
@lc_tier_weapons = @weapons.select do |_label, item|
|
||||
item.item_name.to_s =~ /_LC[2-5]\z/
|
||||
end
|
||||
@lc_tier_armors = @armors.select do |_label, item|
|
||||
item.item_name.to_s =~ /_LC[2-5]\z/
|
||||
end
|
||||
@statuses = ($data_StateName || {}).each_pair.reject do |k, v|
|
||||
v.nil? || k.nil? || v.name == "" || v.name == "nil" || v.name == "DataState:nil/name" ||
|
||||
v.description == "" || v.description == "nil" || v.description == "DataState:nil/description"
|
||||
end.to_a
|
||||
@built_signature = signature
|
||||
end
|
||||
|
||||
def build_group(group, fmt)
|
||||
return [] unless group
|
||||
(1...group.size).each_with_object([]) do |i, list|
|
||||
item = group[i]
|
||||
next if item.nil? || item.item_name.nil? || item.item_name == "" || item.description == ""
|
||||
list << [sprintf(fmt, i), item]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class << DataManager
|
||||
alias_method :cf_invedit_load_mod_database, :load_mod_database
|
||||
def load_mod_database
|
||||
cf_invedit_load_mod_database
|
||||
MenuFramework::InvEditCache.build
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Menu Loading Fix
|
||||
#--------------------------------------------------------------------------
|
||||
# Only draws the current page of rows instead of the whole list
|
||||
module MenuFramework
|
||||
module VirtualScrollWindow
|
||||
def contents_height
|
||||
page_row_max * item_height
|
||||
end
|
||||
|
||||
def top_row
|
||||
@virtual_top_row || 0
|
||||
end
|
||||
|
||||
def top_row=(row)
|
||||
row = 0 if row < 0
|
||||
row = row_max - 1 if row > row_max - 1
|
||||
changed = row != top_row
|
||||
@virtual_top_row = row
|
||||
self.oy = 0 # bitmap only ever holds one page - never pan it
|
||||
refresh_visible_rows if changed
|
||||
end
|
||||
|
||||
def draw_all_items
|
||||
first = top_row
|
||||
last = [top_row + page_row_max, item_max].min - 1
|
||||
(first..last).each { |i| draw_item(i) } if last >= first
|
||||
end
|
||||
|
||||
def item_rect(index)
|
||||
rect = Rect.new
|
||||
rect.width = item_width
|
||||
rect.height = item_height
|
||||
rect.x = index % col_max * (item_width + spacing)
|
||||
rect.y = (index / col_max - top_row) * item_height
|
||||
rect
|
||||
end
|
||||
|
||||
def refresh
|
||||
@virtual_top_row = 0
|
||||
self.oy = 0
|
||||
super
|
||||
end
|
||||
|
||||
def refresh_visible_rows
|
||||
contents.clear
|
||||
draw_all_items
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Window_CheatMenuItems
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
class Window_CheatMenuItems < Window_Command
|
||||
include Action_Window_Defaults
|
||||
include MenuFramework::VirtualScrollWindow
|
||||
def initialize
|
||||
super
|
||||
symbol = SceneManager.scene.instance_variable_get(:@menu_symbol)
|
||||
set_type(symbol)
|
||||
end
|
||||
|
||||
def set_type(type)
|
||||
@type = type
|
||||
refresh
|
||||
select(0)
|
||||
end
|
||||
|
||||
def make_command_list
|
||||
MenuFramework::InvEditCache.ensure_fresh
|
||||
cache = case @type
|
||||
when :items then MenuFramework::InvEditCache.items
|
||||
when :weapons then MenuFramework::InvEditCache.weapons
|
||||
when :armors then MenuFramework::InvEditCache.armors
|
||||
when :lc_materials then MenuFramework::InvEditCache.lc_materials
|
||||
when :lc_furniture then MenuFramework::InvEditCache.lc_furniture
|
||||
when :lc_weapons then MenuFramework::InvEditCache.lc_weapons
|
||||
when :lc_tier_weapons then MenuFramework::InvEditCache.lc_tier_weapons
|
||||
when :lc_tier_armors then MenuFramework::InvEditCache.lc_tier_armors
|
||||
else []
|
||||
end
|
||||
cache.each { |text, item| add_command(text, :item, true, item) }
|
||||
end
|
||||
|
||||
def draw_item(index)
|
||||
MenuFramework.force_font(contents) if contents
|
||||
contents.clear_rect(item_rect_for_text(index))
|
||||
rect = item_rect_for_text(index)
|
||||
item = @list[index][:ext]
|
||||
name = item.name
|
||||
change_color(normal_color, $game_party.item_number(item) > 0)
|
||||
change_color(knockout_color) if $game_party.item_number(item) > 0 && item.name == ""
|
||||
draw_text(rect, command_name(index))
|
||||
rect.x += text_size(command_name(index)).width
|
||||
rect.width -= text_size(command_name(index)).width
|
||||
draw_icon(item.icon_index, rect.x, rect.y, $game_party.item_number(item) > 0)
|
||||
rect.x += 24
|
||||
rect.width -= 24
|
||||
draw_text(rect, $game_text[name])
|
||||
text = sprintf("x%s", $game_party.item_number(item))
|
||||
draw_text(rect, text, 2)
|
||||
end
|
||||
|
||||
def load_initial
|
||||
return if @list.empty?
|
||||
text = prep_desc($game_text[@list[0][:ext].description])
|
||||
override_help_window_text(text)
|
||||
end
|
||||
|
||||
def refresh_help_window
|
||||
return if @list.empty?
|
||||
entry = @list[@index]
|
||||
return unless entry && entry[:ext] && entry[:ext]
|
||||
desc_key = entry[:ext].description
|
||||
text = prep_desc($game_text[desc_key])
|
||||
override_help_window_text(text)
|
||||
end
|
||||
|
||||
def prep_desc(desc)
|
||||
return "" if desc.nil?
|
||||
return "" if desc.end_with?("/description")
|
||||
return "" if desc.end_with?("nil/nil")
|
||||
return desc
|
||||
end
|
||||
|
||||
|
||||
def cursor_right(wrap = false)
|
||||
SndLib.play_cursor
|
||||
$game_party.gain_item(current_ext, Input.press?(Input::KEYMAP[:SHIFT]) ? 10 : 1)
|
||||
$game_party.gain_item(current_ext, Input.press?(Input::KEYMAP[:CTRL]) ? 99 : 0)
|
||||
draw_item(index)
|
||||
end
|
||||
|
||||
def cursor_left(wrap = false)
|
||||
SndLib.play_cursor
|
||||
$game_party.lose_item(current_ext, Input.press?(Input::KEYMAP[:SHIFT]) ? 10 : 1)
|
||||
$game_party.lose_item(current_ext, Input.press?(Input::KEYMAP[:CTRL]) ? 99 : 0)
|
||||
draw_item(index)
|
||||
end
|
||||
end # Window_CheatMenuItems
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Window_CheatMenuStatus
|
||||
#--------------------------------------------------------------------------
|
||||
class Window_CheatMenuStatus < Window_Command
|
||||
include Action_Window_Defaults
|
||||
include MenuFramework::VirtualScrollWindow
|
||||
|
||||
def make_command_list
|
||||
$data_StateName.each_pair do |k, v|
|
||||
if v != nil and k != nil
|
||||
add_command("", :drawStat, true, [k, v]) if !(v.name == "" or v.name == "nil" or v.name == "DataState:nil/name" or v.description == "" or v.description == "nil" or v.description == "DataState:nil/description")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def drawStat
|
||||
end
|
||||
|
||||
def draw_item(index)
|
||||
MenuFramework.force_font(contents) if contents
|
||||
contents.clear_rect(item_rect_for_text(index))
|
||||
rect = item_rect_for_text(index)
|
||||
item = @list[index][:ext][1]
|
||||
name = @list[index][:ext][0]
|
||||
stack = $game_player.actor.state_stack(name)
|
||||
change_color(normal_color, stack)
|
||||
draw_icon(item.icon_index, rect.x, rect.y, stack)
|
||||
rect.x += 24
|
||||
rect.width -= 24
|
||||
if item.name.empty?
|
||||
draw_text(rect, name)
|
||||
else
|
||||
draw_text(rect, $game_text[item.name])
|
||||
end
|
||||
text = sprintf("%s/%s", stack, item.max_stacks)
|
||||
draw_text(rect, text, 2)
|
||||
end
|
||||
|
||||
def cursor_right(wrap = false)
|
||||
SndLib.play_cursor
|
||||
$game_player.actor.add_state(current_ext[0])
|
||||
draw_item(index)
|
||||
end
|
||||
|
||||
def cursor_left(wrap = false)
|
||||
SndLib.play_cursor
|
||||
$game_player.actor.remove_one_state(current_ext[0])
|
||||
$game_player.actor.update_state_portrait_stat(current_ext[0])
|
||||
draw_item(index)
|
||||
end
|
||||
|
||||
def refresh_help_window
|
||||
return if @list.empty?
|
||||
entry = @list[@index]
|
||||
return unless entry && entry[:ext] && entry[:ext][1]
|
||||
desc_key = entry[:ext][1].description
|
||||
text = prep_desc($game_text[desc_key])
|
||||
override_help_window_text(text)
|
||||
end
|
||||
|
||||
def prep_desc(desc)
|
||||
return "" if desc.nil?
|
||||
return "" if desc.end_with?("/description")
|
||||
return "" if desc.end_with?("nil/nil")
|
||||
begin
|
||||
text = desc.dup
|
||||
text.sub!(/^\\}\\n\f\\}/, "\\}") # Remove leading \n\f\}
|
||||
text.sub!(/^\\}\\}/, "\\}") # Remove double \}
|
||||
text.sub!(/^\\}\\n/, "\\}") # Remove leading \n
|
||||
text.gsub!("\\n", " ") # Replace \n with space
|
||||
text.strip # Remove leading/trailing spaces
|
||||
rescue => e
|
||||
p "Got #{e.message}"
|
||||
""
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Game_Actor
|
||||
def remove_one_state(state_id)
|
||||
state_id = $data_StateName[state_id].id if state_id.is_a?(String)
|
||||
return prp "erase_state #{state_id} not found", 1 if !state_id
|
||||
@states.delete_at(@states.index(state_id) || @states.length) # Removes only one stacked instance.
|
||||
return if state?(state_id) # Still stacked - stop here to avoid a bugged stack.
|
||||
# @state_turns.delete(state_id)
|
||||
@state_steps.delete(state_id)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,351 @@
|
||||
FrameworkModule = {
|
||||
name: "Levels",
|
||||
key: :levels,
|
||||
menu: :LEVELS,
|
||||
order: 10,
|
||||
depends_on: []
|
||||
}
|
||||
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
#--------------------------------------------------------------------------
|
||||
# Character Editing Menu
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :LONA,
|
||||
type: :scene,
|
||||
key: :edit_level,
|
||||
label: "modules/character:commands/levels",
|
||||
menu1: "menu:window_help/character1",
|
||||
name: "CheatMenuLevels",
|
||||
dict: :LEVELS,
|
||||
order: 40
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Levels
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :LEVELS,
|
||||
type: :edit_num,
|
||||
key: "Max Level",
|
||||
label: "modules/character:commands/levels/max_level",
|
||||
state: "$cheat_variables_max_level",
|
||||
hide: -> { $framework.roleplay_mod? },
|
||||
gdef: 99,
|
||||
min: 50, # Allowed below the 99 default.
|
||||
max: 999,
|
||||
order: 10
|
||||
)
|
||||
register_command(
|
||||
group: :LEVELS,
|
||||
type: :edit_num,
|
||||
key: "Level",
|
||||
label: "modules/character:commands/levels/level",
|
||||
state: "$game_player.actor.level",
|
||||
min: 1,
|
||||
max: -> {$game_player.actor.max_level},
|
||||
help1: "modules/character:command_help/lvl",
|
||||
action: ->(v) { FrameworkUtils.set_character_level(v) },
|
||||
order: 20
|
||||
)
|
||||
register_command(
|
||||
group: :LEVELS, type: :action, key: "Level Up",
|
||||
label: "modules/character:commands/levels/level_up", order: 21,
|
||||
action: -> { FrameworkUtils.set_character_level($game_player.actor.level + 1) }
|
||||
)
|
||||
register_command(
|
||||
group: :LEVELS, type: :action, key: "Level Down",
|
||||
label: "modules/character:commands/levels/level_down", order: 22,
|
||||
action: -> { FrameworkUtils.set_character_level($game_player.actor.level - 1) }
|
||||
)
|
||||
register_command(
|
||||
group: :LEVELS, type: :action, key: "Level Max",
|
||||
label: "modules/character:commands/levels/level_max", order: 23,
|
||||
action: -> { FrameworkUtils.set_character_level($game_player.actor.max_level) }
|
||||
)
|
||||
register_command(
|
||||
group: :LEVELS, type: :action, key: "Level Reset",
|
||||
label: "modules/character:commands/levels/level_reset", order: 24,
|
||||
action: -> { FrameworkUtils.set_character_level(1) }
|
||||
)
|
||||
register_command(
|
||||
group: :LEVELS,
|
||||
type: :edit_list,
|
||||
key: "Exp Rate",
|
||||
label: "modules/character:commands/levels/exp_rate",
|
||||
help1: "modules/character:command_help/exp_rate1",
|
||||
state: "$cheat_exp_rate",
|
||||
list: [
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/disable")}]" },
|
||||
{ key: 1, label: "[x1]" },
|
||||
{ key: 2, label: "[x2]" },
|
||||
{ key: 4, label: "[x4]" },
|
||||
{ key: 8, label: "[x8]" },
|
||||
],
|
||||
gdef: 1,
|
||||
restart: 0,
|
||||
order: 25
|
||||
)
|
||||
register_command(
|
||||
group: :LEVELS,
|
||||
type: :edit_num,
|
||||
key: "Traits Per Level",
|
||||
label: "modules/character:commands/levels/traits_per_level",
|
||||
state: "$cheat_variables_traits_per_level",
|
||||
hide: -> { $framework.roleplay_mod? },
|
||||
gdef: 1,
|
||||
help1: "modules/character:command_help/tpl1",
|
||||
help2: "modules/character:command_help/lvl",
|
||||
min: 1,
|
||||
max: 20,
|
||||
action: ->(v) { $cheat_variables_traits_per_level = v
|
||||
$framework.ini.write_global("Traits Per Level", v)
|
||||
$game_player.actor.trait_point = FrameworkUtils.calc_trait_points(false)
|
||||
},
|
||||
order: 30
|
||||
)
|
||||
register_command(
|
||||
group: :LEVELS,
|
||||
type: :edit_num,
|
||||
key: "Max Traits",
|
||||
label: "modules/character:commands/traits/max_traits",
|
||||
state: "$cheat_variables_max_stat",
|
||||
gdef: 99,
|
||||
min: 99,
|
||||
max: 999,
|
||||
restart: true, # baked into LONA_STAT_DEFAULT at load time below - LonaActorStat.new only ever reads that snapshot
|
||||
order: 40
|
||||
)
|
||||
register_command(
|
||||
group: :LEVELS,
|
||||
type: :edit_num,
|
||||
key: "Trait Points",
|
||||
label: "modules/character:commands/traits/trait_points",
|
||||
state: "$game_player.actor.trait_point",
|
||||
help1: -> {
|
||||
to = FrameworkUtils.calc_trait_points(false)
|
||||
text = "#{$framework.txt("modules/character:command_help/tp1")}: #{to}"
|
||||
},
|
||||
help2: -> {
|
||||
ba,sk,tr,to = FrameworkUtils.calc_trait_points(true)
|
||||
text = "#{ba}(#{$framework.txt("modules/character:command_help/tp2")}) - #{sk}(#{$framework.txt("modules/character:command_help/tp3")}) - #{tr}(#{$framework.txt("modules/character:command_help/tp4")}"
|
||||
},
|
||||
min: 0,
|
||||
max: 9999,
|
||||
action: ->(v) { $game_player.actor.trait_point = v },
|
||||
order: 50
|
||||
)
|
||||
register_command(
|
||||
group: :LEVELS,
|
||||
type: :scene,
|
||||
key: :edit_trait,
|
||||
label: "modules/character:commands/traits",
|
||||
menu1: "menu:window_help/character1",
|
||||
name: "CheatMenuTraits",
|
||||
dict: :TRAITS,
|
||||
order: 60
|
||||
)
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Traits
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :TRAITS,
|
||||
type: :edit_num,
|
||||
key: "Combat",
|
||||
label: "modules/character:commands/traits/combat",
|
||||
state: "$game_player.actor.combat_trait.to_i",
|
||||
min: 0,
|
||||
max: -> {$cheat_variables_max_stat},
|
||||
action: ->(v) { FrameworkUtils.edit_trait("combat", v) },
|
||||
order: 70
|
||||
)
|
||||
register_command(
|
||||
group: :TRAITS,
|
||||
type: :edit_num,
|
||||
key: "Scout",
|
||||
label: "modules/character:commands/traits/scoutcraft",
|
||||
state: "$game_player.actor.scoutcraft_trait.to_i",
|
||||
min: 0,
|
||||
max: -> {$cheat_variables_max_stat},
|
||||
action: ->(v) { FrameworkUtils.edit_trait("scoutcraft", v) },
|
||||
order: 80
|
||||
)
|
||||
register_command(
|
||||
group: :TRAITS,
|
||||
type: :edit_num,
|
||||
key: "Wisdom",
|
||||
label: "modules/character:commands/traits/wisdom",
|
||||
state: "$game_player.actor.wisdom_trait.to_i",
|
||||
min: 0,
|
||||
max: -> {$cheat_variables_max_stat},
|
||||
action: ->(v) { FrameworkUtils.edit_trait("wisdom", v) },
|
||||
order: 90
|
||||
)
|
||||
register_command(
|
||||
group: :TRAITS,
|
||||
type: :edit_num,
|
||||
key: "Survival",
|
||||
label: "modules/character:commands/traits/survival",
|
||||
state: "$game_player.actor.survival_trait.to_i",
|
||||
min: 0,
|
||||
max: -> {$cheat_variables_max_stat},
|
||||
action: ->(v) { FrameworkUtils.edit_trait("survival", v) },
|
||||
order: 100
|
||||
)
|
||||
register_command(
|
||||
group: :TRAITS,
|
||||
type: :edit_num,
|
||||
key: "Constitution",
|
||||
label: "modules/character:commands/traits/constitution",
|
||||
state: "$game_player.actor.constitution_trait.to_i",
|
||||
min: 0,
|
||||
max: -> {$cheat_variables_max_stat},
|
||||
action: ->(v) { FrameworkUtils.edit_trait("constitution", v) },
|
||||
order: 110
|
||||
)
|
||||
register_command(
|
||||
group: :TRAITS,
|
||||
type: :action,
|
||||
key: "Reset Traits",
|
||||
label: "modules/character:commands/traits/reset",
|
||||
action: -> { FrameworkUtils.reset_all_traits },
|
||||
help1: "modules/character:command_help/reset1",
|
||||
help2: "modules/character:command_help/reset2",
|
||||
order: 120
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
module FrameworkUtils
|
||||
def self.set_character_level(requested_level)
|
||||
actor = $game_player && $game_player.actor
|
||||
return unless actor
|
||||
target = [[requested_level.to_i, 1].max, actor.max_level.to_i].min
|
||||
actor.change_level(target, true)
|
||||
actor.trait_point = [calc_trait_points(false), 0].max unless $framework.roleplay_mod?
|
||||
actor.recalculate_stats if actor.respond_to?(:recalculate_stats)
|
||||
end
|
||||
|
||||
def self.update_variables
|
||||
$game_player.actor.recalculate_stats #Attempts to use existing function
|
||||
end
|
||||
|
||||
def self.edit_trait(skill, new_value)
|
||||
actor = $game_player.actor
|
||||
current = actor.send("#{skill}_trait")
|
||||
change = new_value.to_i - current.to_i
|
||||
actor.send("#{skill}_trait=", new_value.to_i)
|
||||
actor.trait_point += -change
|
||||
actor.recalculate_stats
|
||||
end
|
||||
|
||||
def self.calc_trait_skills
|
||||
actor = $game_player.actor
|
||||
traits = System_Settings::TRAIT::LIST.flatten
|
||||
blank = System_Settings::TRAIT::BLANK_ID
|
||||
# Get all valid trait names (no tmp, no blanks)
|
||||
valid_traits = traits.reject { |t| t.nil? || t == blank || t == "tmp" }.uniq
|
||||
# Count how many the actor has
|
||||
match_count = valid_traits.count { |t| actor.stat[t] == 1 }
|
||||
end
|
||||
|
||||
def self.calc_trait_points(math=false)
|
||||
actor = $game_player.actor
|
||||
base = actor.level * $cheat_variables_traits_per_level
|
||||
skills = calc_trait_skills
|
||||
traits = actor.combat_trait + actor.scoutcraft_trait + actor.wisdom_trait +
|
||||
actor.survival_trait + actor.constitution_trait
|
||||
total = base - skills - traits
|
||||
return base.to_i,skills.to_i,traits.to_i,total.to_i if math
|
||||
total
|
||||
end
|
||||
|
||||
def self.reset_all_traits
|
||||
actor = $game_player.actor
|
||||
reset_trait_skills
|
||||
%w[combat scoutcraft wisdom survival constitution].each do |stat|
|
||||
actor.send("#{stat}_trait=", 0)
|
||||
end
|
||||
actor.recalculate_stats
|
||||
actor.trait_point = calc_trait_points
|
||||
end
|
||||
|
||||
def self.reset_trait_skills
|
||||
actor = $game_player.actor
|
||||
traits = System_Settings::TRAIT::LIST.flatten
|
||||
blank = System_Settings::TRAIT::BLANK_ID
|
||||
|
||||
valid_traits = traits.reject { |t| t.nil? || t == blank || t == "tmp" }.uniq
|
||||
valid_traits.each do |t|
|
||||
FrameworkUtils.custom_state_edit(t,-1) if actor.stat[t] != 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Overrides UI to allow trait assignment
|
||||
class Game_Actor < Game_Battler
|
||||
def basic_trait_addable?(tmpVal)
|
||||
tmpVal <= $cheat_variables_max_stat
|
||||
end
|
||||
end
|
||||
|
||||
# Raises the caps LonaActorStat.new reads for max stats and traits.
|
||||
class LonaActorStat < ActorStat
|
||||
def self.override_stat(max_val)
|
||||
[0, 0, max_val, max_val, 0, 0, 0]
|
||||
end
|
||||
|
||||
# Define defaults for both core stats and traits
|
||||
%w[constitution survival wisdom combat scoutcraft
|
||||
constitution_trait survival_trait wisdom_trait combat_trait scoutcraft_trait].each do |stat|
|
||||
LONA_STAT_DEFAULT[stat] = [override_stat($cheat_variables_max_stat), 0]
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# RolePlay-S Compatibility Overrides
|
||||
#--------------------------------------------------------------------------
|
||||
unless $framework.roleplay_mod?
|
||||
class Game_Actor < Game_Battler
|
||||
def max_level
|
||||
return [[$cheat_variables_max_level.to_i, 1].max, 999].min
|
||||
end
|
||||
|
||||
# Sets experience to next level, level 99 is last on the table.
|
||||
def param_base(param_id)
|
||||
level_to_check = [[@level,99].min,0].max
|
||||
self.class.params[param_id, level_to_check]
|
||||
end
|
||||
end
|
||||
|
||||
# Overrides how many traits are earned at level up.
|
||||
|
||||
class Game_Actor < Game_Battler
|
||||
def level_up
|
||||
@level += 1
|
||||
@trait_point +=$cheat_variables_traits_per_level
|
||||
self.class.learnings.each do |learning|
|
||||
learn_skill(learning.skill_id) if learning.level == @level
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Exp Rate
|
||||
#--------------------------------------------------------------------------
|
||||
# gain_exp always multiplies by this before truncating to an int - RolePlay-S's
|
||||
# own gain_exp override still calls through to this same original method.
|
||||
if $cheat_exp_rate != 0
|
||||
class Game_Actor
|
||||
alias_method :cf_exp_rate_final_exp_rate, :final_exp_rate
|
||||
def final_exp_rate
|
||||
return cf_exp_rate_final_exp_rate unless $cheat_exp_rate > 0
|
||||
(cf_exp_rate_final_exp_rate * $cheat_exp_rate).round
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,207 @@
|
||||
FrameworkModule = {
|
||||
name: "Main Stats",
|
||||
key: :main_stats,
|
||||
order: 90,
|
||||
depends_on: []
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Menu Commands
|
||||
#--------------------------------------------------------------------------
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
register_command(
|
||||
group: :TOGGLES,
|
||||
type: :toggle,
|
||||
key: "Infinite Health",
|
||||
label: "modules/mainstatus:toggle/health",
|
||||
state: "$cheat_infinite_health",
|
||||
hotkey: {key: "F4"},
|
||||
gdef: false,
|
||||
order: 10
|
||||
)
|
||||
register_command(
|
||||
group: :TOGGLES,
|
||||
type: :toggle,
|
||||
key: "Infinite Stamina",
|
||||
label: "modules/mainstatus:toggle/stamina",
|
||||
state: "$cheat_infinite_stamina",
|
||||
hotkey: {key: "F4"},
|
||||
gdef: false,
|
||||
order: 20
|
||||
)
|
||||
register_command(
|
||||
group: :TOGGLES,
|
||||
type: :toggle,
|
||||
key: "Infinite Food",
|
||||
label: "modules/mainstatus:toggle/food",
|
||||
state: "$cheat_infinite_food",
|
||||
hotkey: {key: "F4"},
|
||||
gdef: false,
|
||||
order: 30
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Legacy Cheats
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :MISC,
|
||||
type: :action,
|
||||
key: "Heal",
|
||||
label: "modules/mainstatus:misc/heal",
|
||||
enable: -> { !($cheat_infinite_health && $cheat_infinite_stamina && $cheat_infinite_food) },
|
||||
action: -> {
|
||||
FrameworkUtils.health_to_max
|
||||
FrameworkUtils.stamina_to_max
|
||||
FrameworkUtils.food_to_max
|
||||
},
|
||||
order: 10
|
||||
)
|
||||
register_command(
|
||||
group: :MISC,
|
||||
type: :action,
|
||||
key: "Heal Wound",
|
||||
label: "modules/mainstatus:misc/heal_wound",
|
||||
enable: -> { !$cheat_autobandage },
|
||||
action: -> { $game_player.actor.heal_wound },
|
||||
help1: "modules/mainstatus:command_help/heal_wound",
|
||||
order: 20
|
||||
)
|
||||
register_command(
|
||||
group: :MISC,
|
||||
type: :action,
|
||||
key: "Faint",
|
||||
enable: -> { !$cheat_infinite_stamina },
|
||||
label: "modules/mainstatus:misc/faint",
|
||||
action: -> { $game_player.actor.sta = -100 },
|
||||
order: 30
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Money Cheats
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :TOGGLES,
|
||||
type: :toggle,
|
||||
key: "Infinite Money",
|
||||
label: "modules/mainstatus:toggle/money",
|
||||
state: "$cheat_infinite_money",
|
||||
gdef: false,
|
||||
order: 40
|
||||
)
|
||||
register_command(
|
||||
group: :MISC,
|
||||
type: :action,
|
||||
key: "Money Now",
|
||||
label: "modules/mainstatus:misc/money",
|
||||
enable: -> {!$cheat_infinite_money},
|
||||
action: -> { $game_party.set_gold_only(99999) },
|
||||
order: 40
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Lona Vulnerable
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :TOGGLES,
|
||||
type: :toggle,
|
||||
key: "Lona Vulnerable",
|
||||
label: "modules/mainstatus:toggle/vulnerable",
|
||||
help1: "modules/mainstatus:command_help/vulnerable1",
|
||||
state: "FrameworkUtils.lona_vulnerable?",
|
||||
order: 90,
|
||||
action: -> { $story_stats['CF_lona_vulnerable'] = FrameworkUtils.lona_vulnerable? ? 0 : 1 }
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Hotkey Hook
|
||||
#--------------------------------------------------------------------------
|
||||
class CheatFramework
|
||||
alias_method :hotkey_trigger_INFINITESTATS, :hotkey_trigger
|
||||
def hotkey_trigger
|
||||
hotkey_trigger_INFINITESTATS
|
||||
FrameworkUtils.apply_infinite_stats
|
||||
end
|
||||
end
|
||||
|
||||
# Refills Infinite Health before each death check; releases Lona Vulnerable the instant she collapses, so she isn't pinned back to 0 on waking.
|
||||
class Game_Actor
|
||||
alias_method :determine_death_LONA_VULNERABLE, :determine_death
|
||||
def determine_death
|
||||
FrameworkUtils.health_to_max if $cheat_infinite_health && $game_player && self == $game_player.actor
|
||||
was_death = @action_state == :death
|
||||
determine_death_LONA_VULNERABLE
|
||||
$story_stats['CF_lona_vulnerable'] = 0 if !was_death && @action_state == :death && FrameworkUtils.lona_vulnerable?
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Per-Tick Application
|
||||
#--------------------------------------------------------------------------
|
||||
module FrameworkUtils
|
||||
def self.apply_infinite_stats
|
||||
return unless self.ingame?
|
||||
actor = $game_player.actor
|
||||
return unless actor
|
||||
|
||||
if $cheat_infinite_health; health_to_max end
|
||||
apply_stamina_lock if $cheat_infinite_stamina || lona_vulnerable?
|
||||
if $cheat_infinite_food; food_to_max end
|
||||
if $cheat_infinite_money; money_to_max end
|
||||
end
|
||||
|
||||
def self.lona_vulnerable?
|
||||
$story_stats['CF_lona_vulnerable'] == 1
|
||||
end
|
||||
|
||||
# Vulnerable alone only caps from above, so she can still faint for real; combined with
|
||||
# Infinite Stamina, a plain top-up would put her back at full, so this pins her at 0 instead.
|
||||
def self.apply_stamina_lock
|
||||
actor = $game_player.actor
|
||||
# Water's broken (base game's own "ready to birth" check) - let contractions/birth drain sta through, she's meant to faint here.
|
||||
return if actor.preg_level == 5 && $story_stats['dialog_ready_to_birth'] == 0
|
||||
if $cheat_infinite_stamina && lona_vulnerable?
|
||||
actor.sta = 0 if actor.sta != 0
|
||||
elsif $cheat_infinite_stamina
|
||||
stamina_to_max
|
||||
else
|
||||
actor.sta = 0 if actor.sta > 0
|
||||
end
|
||||
end
|
||||
|
||||
def self.health_to_max
|
||||
actor = $game_player.actor
|
||||
max_hp = actor.battle_stat.get_stat("health", ActorStat::MAX_STAT)
|
||||
actor.health = max_hp if actor.health < max_hp
|
||||
end
|
||||
|
||||
def self.stamina_to_max
|
||||
actor = $game_player.actor
|
||||
max_stam = actor.battle_stat.get_stat("sta", ActorStat::MAX_STAT)
|
||||
actor.sta = max_stam if actor.sta < max_stam
|
||||
end
|
||||
|
||||
def self.food_to_max
|
||||
actor = $game_player.actor
|
||||
max_sat = actor.battle_stat.get_stat("sat", ActorStat::MAX_STAT)
|
||||
actor.sat = max_sat if actor.sat < max_sat
|
||||
end
|
||||
|
||||
def self.money_to_max
|
||||
actor = $game_player.actor
|
||||
$game_party.set_gold_only(99999) if $game_party.gold != 99999
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#Used by money cheats
|
||||
class Game_Party
|
||||
def set_gold_only(amount)
|
||||
@gold = amount
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
#==============================================================================
|
||||
# CheatFramework — Male Skin (multiplayer /maleskin)
|
||||
#------------------------------------------------------------------------------
|
||||
# Character > Male Skin with categories of all -char-M-* sheets.
|
||||
#==============================================================================
|
||||
FrameworkModule = {
|
||||
name: "Male Skin",
|
||||
key: :male_skin,
|
||||
menu: :MALESKIN,
|
||||
depends_on: [],
|
||||
order: 72
|
||||
}
|
||||
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
# [sheet, max_index_or_nil] — nil = all parts with a body.
|
||||
MALE_SKIN_CATEGORIES = [
|
||||
{
|
||||
key: :villagers,
|
||||
label: "modules/character:commands/male_skin/cat_villagers",
|
||||
dict: :MALESKIN_VILLAGERS,
|
||||
scene: "CheatMenuMaleSkinVillagers",
|
||||
sheets: %w[-char-M-REGULAR01 -char-M-REGULAR02 -char-M-REGULAR03 -char-M-REGULAR04]
|
||||
},
|
||||
{
|
||||
key: :fat,
|
||||
label: "modules/character:commands/male_skin/cat_fat",
|
||||
dict: :MALESKIN_FAT,
|
||||
scene: "CheatMenuMaleSkinFat",
|
||||
sheets: %w[-char-M-FAT01 -char-M-FAT-ABOM01 -char-M-FAT-FISHKIND01 -char-M-FAT-FROGMAN01]
|
||||
},
|
||||
{
|
||||
key: :teens,
|
||||
label: "modules/character:commands/male_skin/cat_teens",
|
||||
dict: :MALESKIN_TEENS,
|
||||
scene: "CheatMenuMaleSkinTeens",
|
||||
sheets: %w[-char-M-TEEN01 -char-M-TEEN-FISHKIND01 -char-M-TEEN-FROGMAN01]
|
||||
},
|
||||
{
|
||||
key: :undead,
|
||||
label: "modules/character:commands/male_skin/cat_undead",
|
||||
dict: :MALESKIN_UNDEAD,
|
||||
scene: "CheatMenuMaleSkinUndead",
|
||||
sheets: %w[-char-M-REG_UNDEAD01 -char-M-TEEN_UNDEAD01]
|
||||
},
|
||||
{
|
||||
key: :orkind,
|
||||
label: "modules/character:commands/male_skin/cat_orkind",
|
||||
dict: :MALESKIN_ORKIND,
|
||||
scene: "CheatMenuMaleSkinOrkind",
|
||||
sheets: %w[-char-M-ORC01 -char-M-OGRE01]
|
||||
},
|
||||
{
|
||||
key: :goblins,
|
||||
label: "modules/character:commands/male_skin/cat_goblins",
|
||||
dict: :MALESKIN_GOBLINS,
|
||||
scene: "CheatMenuMaleSkinGoblins",
|
||||
sheets: %w[-char-M-GOBLIN01 -char-M-HOBGOBLIN01 -char-M-HOBGOBLIN-RD01]
|
||||
},
|
||||
{
|
||||
key: :amphibians,
|
||||
label: "modules/character:commands/male_skin/cat_amphibians",
|
||||
dict: :MALESKIN_AMPHIBIANS,
|
||||
scene: "CheatMenuMaleSkinAmphibians",
|
||||
sheets: %w[-char-M-FISHKIND01 -char-M-FROGMAN01]
|
||||
},
|
||||
{
|
||||
key: :giants,
|
||||
label: "modules/character:commands/male_skin/cat_giants",
|
||||
dict: :MALESKIN_GIANTS,
|
||||
scene: "CheatMenuMaleSkinGiants",
|
||||
sheets: %w[-char-M-GAINT01 -char-M-GAINT-FISHKIND01]
|
||||
}
|
||||
].freeze
|
||||
|
||||
def self.mp_cf_male_skin_ready?
|
||||
defined?(WebSocket) &&
|
||||
WebSocket.respond_to?(:mp_male_menu_apply_pick) &&
|
||||
WebSocket.respond_to?(:mp_male_skin_disable)
|
||||
rescue
|
||||
false
|
||||
end
|
||||
|
||||
def self.mp_cf_male_skin_label(sheet, idx)
|
||||
base = sheet.to_s.sub(/^-char-M-/, "")
|
||||
text_flag = "modules/character:commands/male_skin/skin_#{base.downcase.gsub(/[^a-z0-9]+/, '_')}"
|
||||
label = $framework.txt(text_flag).to_s
|
||||
label = base if label.empty? || label == "cheatframework:#{text_flag}"
|
||||
"#{label} №#{idx}"
|
||||
end
|
||||
|
||||
def self.mp_cf_male_skin_active_pick?(sheet, idx)
|
||||
return false unless defined?(WebSocket) && WebSocket.respond_to?(:mp_male_menu_current_pick)
|
||||
cur = WebSocket.mp_male_menu_current_pick
|
||||
return false if cur.nil?
|
||||
cur[0].to_s == sheet.to_s && cur[1].to_i == idx.to_i
|
||||
rescue
|
||||
false
|
||||
end
|
||||
|
||||
def self.mp_cf_male_skin_off?
|
||||
return true unless defined?(WebSocket) && WebSocket.respond_to?(:mp_male_skin_active?)
|
||||
!WebSocket.mp_male_skin_active?
|
||||
rescue
|
||||
true
|
||||
end
|
||||
|
||||
def self.mp_cf_male_skin_sheet_indices(sheet)
|
||||
indices = []
|
||||
begin
|
||||
return indices unless defined?($chs_data) && $chs_data && $chs_data[sheet]
|
||||
parts = $chs_data[sheet].parts
|
||||
return indices unless parts
|
||||
parts.each_with_index do |part, i|
|
||||
next if part.nil?
|
||||
if defined?(WebSocket) && WebSocket.respond_to?(:mp_male_pick_has_body?)
|
||||
next unless WebSocket.mp_male_pick_has_body?(sheet, i)
|
||||
end
|
||||
indices << i
|
||||
end
|
||||
rescue
|
||||
end
|
||||
# Fallback: at least offer index 0 if CHS data not ready yet.
|
||||
indices = [0] if indices.empty?
|
||||
indices
|
||||
end
|
||||
|
||||
def self.mp_cf_male_skin_sheet_available?(sheet)
|
||||
return true unless defined?($chs_data) && $chs_data
|
||||
!!$chs_data[sheet.to_s]
|
||||
rescue
|
||||
true
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Character Editing Menu → Male Skin (root)
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :LONA,
|
||||
type: :scene,
|
||||
key: :male_skin,
|
||||
label: "modules/character:commands/male_skin",
|
||||
menu1: "modules/character:window_help/male_skin1",
|
||||
name: "CheatMenuMaleSkin",
|
||||
dict: :MALESKIN,
|
||||
order: 72,
|
||||
hide: -> { !MenuFramework::SUBMENU.mp_cf_male_skin_ready? }
|
||||
)
|
||||
|
||||
register_command(
|
||||
group: :MALESKIN,
|
||||
type: :action,
|
||||
key: "Male Skin Off",
|
||||
label: "modules/character:commands/male_skin/off",
|
||||
color: -> { MenuFramework::SUBMENU.mp_cf_male_skin_off? ? 16 : 0 },
|
||||
action: -> {
|
||||
if defined?(WebSocket) && WebSocket.respond_to?(:mp_male_skin_disable)
|
||||
WebSocket.mp_male_skin_disable
|
||||
end
|
||||
},
|
||||
order: 10
|
||||
)
|
||||
|
||||
register_command(
|
||||
group: :MALESKIN,
|
||||
type: :action,
|
||||
key: "Male Skin Random",
|
||||
label: "modules/character:commands/male_skin/random",
|
||||
help1: "modules/character:command_help/male_skin_random",
|
||||
action: -> {
|
||||
if defined?(WebSocket) && WebSocket.respond_to?(:mp_male_skin_enable)
|
||||
if WebSocket.respond_to?(:mp_male_skin_active?) && WebSocket.mp_male_skin_active?
|
||||
WebSocket.mp_male_apply_villager_skin(true)
|
||||
begin
|
||||
sheet = $story_stats[WebSocket::MP_MALE_CHS_KEY].to_s if $story_stats
|
||||
idx = $story_stats[WebSocket::MP_MALE_CHS_IDX_KEY].to_i if $story_stats
|
||||
label = MenuFramework::SUBMENU.mp_cf_male_skin_label(sheet, idx)
|
||||
WebSocket.mp_male_notify("Мужской скин: #{label}")
|
||||
rescue
|
||||
end
|
||||
WebSocket.send_playersync_full("male_skin_on", true) if WebSocket.respond_to?(:send_playersync_full)
|
||||
else
|
||||
WebSocket.mp_male_skin_enable
|
||||
end
|
||||
end
|
||||
},
|
||||
order: 15
|
||||
)
|
||||
|
||||
MALE_SKIN_CATEGORIES.each_with_index do |cat, ci|
|
||||
register_command(
|
||||
group: :MALESKIN,
|
||||
type: :scene,
|
||||
key: "Male Skin Cat #{cat[:key]}",
|
||||
label: cat[:label],
|
||||
name: cat[:scene],
|
||||
dict: cat[:dict],
|
||||
order: 30 + ci * 10
|
||||
)
|
||||
|
||||
order_base = 10
|
||||
cat[:sheets].each do |sheet|
|
||||
short = sheet.to_s.sub(/^-char-M-/, "")
|
||||
# Register a wide index range; hide empty / missing variants at open time.
|
||||
(0..23).each do |idx|
|
||||
register_command(
|
||||
group: cat[:dict],
|
||||
type: :action,
|
||||
key: "Male Skin #{short} #{idx}",
|
||||
label: -> { MenuFramework::SUBMENU.mp_cf_male_skin_label(sheet, idx) },
|
||||
color: -> { MenuFramework::SUBMENU.mp_cf_male_skin_active_pick?(sheet, idx) ? 16 : 0 },
|
||||
hide: -> {
|
||||
!MenuFramework::SUBMENU.mp_cf_male_skin_sheet_available?(sheet) ||
|
||||
!MenuFramework::SUBMENU.mp_cf_male_skin_sheet_indices(sheet).include?(idx)
|
||||
},
|
||||
action: -> {
|
||||
if defined?(WebSocket) && WebSocket.respond_to?(:mp_male_menu_apply_pick)
|
||||
WebSocket.mp_male_menu_apply_pick(sheet, idx)
|
||||
end
|
||||
},
|
||||
order: order_base
|
||||
)
|
||||
order_base += 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,179 @@
|
||||
FrameworkModule = {
|
||||
name: "Other Mods",
|
||||
key: :othermods,
|
||||
menu: :OTHERMODS,
|
||||
order: 130
|
||||
}
|
||||
|
||||
# Menu commands for optional companion mods: RolePlay-S, Lona Belly & Booba, Filter Visuals.
|
||||
module MenuFramework
|
||||
module MENU
|
||||
# MAIN-menu rows don't support hide:, so the whole registration is gated instead.
|
||||
if $framework.roleplay_mod? || $framework.bellybooba_mod? || $framework.filter_visuals_mod?
|
||||
register_command(
|
||||
type: :scene,
|
||||
label: "modules/mods:commands/othermods",
|
||||
name: "CheatMenuOtherMods",
|
||||
order: 130
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
module SUBMENU
|
||||
#--------------------------------------------------------------------------
|
||||
# RolePlay-S
|
||||
#--------------------------------------------------------------------------
|
||||
if $framework.roleplay_mod?
|
||||
register_command(
|
||||
type: :toggle,
|
||||
key: "Infinite Mana",
|
||||
label: "modules/mods:commands/roleplays/mana",
|
||||
state: "$cheat_infinite_mana",
|
||||
hotkey: {key: "F4"},
|
||||
gdef: false,
|
||||
order: 30
|
||||
)
|
||||
register_command(
|
||||
type: :edit_num,
|
||||
key: "Mana Rage Max",
|
||||
label: "modules/mods:commands/roleplays/mana_rage_max",
|
||||
state: "$game_player.actor.mana_rage_max",
|
||||
min: 40,
|
||||
max: 5000,
|
||||
action: ->(v) { FrameworkUtils.apply_mana_rage_max(v) },
|
||||
order: 40
|
||||
)
|
||||
register_command(
|
||||
type: :edit_num,
|
||||
key: "Mana Rage",
|
||||
label: "modules/mods:commands/roleplays/mana_rage",
|
||||
state: "$game_player.actor.mana_rage",
|
||||
min: -20,
|
||||
max: -> { $game_player.actor.mana_rage_max },
|
||||
action: ->(v) { $game_player.actor.mana_rage = v },
|
||||
order: 50
|
||||
)
|
||||
register_command(
|
||||
type: :toggle,
|
||||
key: "Infinite Saves",
|
||||
label: "modules/mods:commands/roleplays/saves",
|
||||
state: "$cheat_infinite_saves",
|
||||
gdef: false,
|
||||
order: 60
|
||||
)
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Lona Belly & Booba
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
type: :toggle,
|
||||
key: "Booba Cosmetic Mode",
|
||||
label: "modules/mods:commands/othermods/booba_cosmetic",
|
||||
state: "$lona_booba_cosmetic_mode",
|
||||
hide: -> { !$framework.bellybooba_mod? },
|
||||
order: 70,
|
||||
action: -> { BoobaMod.toggle if defined?(BoobaMod) && BoobaMod.respond_to?(:toggle) }
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Filter Visuals
|
||||
#--------------------------------------------------------------------------
|
||||
# whitecum/events need a restart to take effect (patch installed once at boot).
|
||||
# The rest re-check $filter_visuals live on every bitmap load.
|
||||
FILTER_VISUAL_TOGGLES = [
|
||||
{ key: :whitecum, order: 90, restart: true },
|
||||
{ key: :events, order: 100, restart: true },
|
||||
{ key: :melanin, order: 110 },
|
||||
{ key: :pubes, order: 120 },
|
||||
{ key: :dirt, order: 130 },
|
||||
{ key: :wounds, order: 140 },
|
||||
{ key: :bleeding, order: 150 },
|
||||
]
|
||||
|
||||
FILTER_VISUAL_TOGGLES.each do |cfg|
|
||||
register_command(
|
||||
type: :toggle,
|
||||
key: "Filter Visuals #{cfg[:key]}",
|
||||
label: "modules/mods:commands/othermods/filter_#{cfg[:key]}",
|
||||
state: "$filter_visuals[:#{cfg[:key]}]",
|
||||
hide: -> { !$framework.filter_visuals_mod? },
|
||||
restart: cfg[:restart],
|
||||
order: cfg[:order],
|
||||
action: -> {
|
||||
$filter_visuals[cfg[:key]] = !$filter_visuals[cfg[:key]]
|
||||
FilterVisuals.write
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# RolePlay-S: Save System
|
||||
#--------------------------------------------------------------------------
|
||||
if $framework.roleplay_mod?
|
||||
# Overrides the save system to prevent updating save counts.
|
||||
class Menu_System
|
||||
alias cheat_save_command_handler save_command_handler
|
||||
def save_command_handler
|
||||
if $cheat_infinite_saves
|
||||
return SndLib.sys_buzzer if $story_stats["MenuSysSavegameOff"] >= 1
|
||||
return SndLib.sys_buzzer if $story_stats["Setup_Hardcore"] >= 2
|
||||
SceneManager.goto(Scene_Save)
|
||||
else
|
||||
cheat_save_command_handler
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Upon game load, reset the save count if infinite saves is enabled.
|
||||
class Scene_Load < Scene_File
|
||||
alias cheat_on_load_success on_load_success
|
||||
def on_load_success
|
||||
cheat_on_load_success
|
||||
if $cheat_infinite_saves && $story_stats["YouCanSaveButOnlyOnce"] == 0
|
||||
$story_stats["YouCanSaveButOnlyOnce"] = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# RolePlay-S: Per-Tick Effects
|
||||
#--------------------------------------------------------------------------
|
||||
# Hooks the framework's hotkey tick to also apply RolePlayS's live effects.
|
||||
class CheatFramework
|
||||
alias_method :hotkey_trigger_ROLEPLAYS, :hotkey_trigger
|
||||
def hotkey_trigger
|
||||
hotkey_trigger_ROLEPLAYS
|
||||
FrameworkUtils.apply_roleplays_cheats
|
||||
end
|
||||
end
|
||||
|
||||
module FrameworkUtils
|
||||
def self.apply_roleplays_cheats
|
||||
return unless self.ingame?
|
||||
actor = $game_player.actor
|
||||
return unless actor
|
||||
|
||||
if $cheat_infinite_mana; mana_to_max end
|
||||
end
|
||||
|
||||
def self.mana_to_max
|
||||
actor = $game_player.actor
|
||||
max_mp = actor.battle_stat.get_stat("mp", ActorStat::MAX_STAT)
|
||||
actor.mp = max_mp if actor.mp < max_mp
|
||||
end
|
||||
|
||||
def self.apply_mana_rage_max(v)
|
||||
actor = $game_player.actor
|
||||
return unless actor && actor.actStat
|
||||
stat = actor.actStat
|
||||
|
||||
stat.set_stat("mana_rage", v, ActorStat::MAX_TRUE)
|
||||
stat.set_stat("mana_rage", v, ActorStat::MAX_STAT)
|
||||
|
||||
stat.check_current_stat("mana_rage")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,424 @@
|
||||
FrameworkModule = {
|
||||
name: "NPC Fixes",
|
||||
key: :npc_fixes,
|
||||
menu: :NPC
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Menu Commands
|
||||
#--------------------------------------------------------------------------
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
# Shared Disable / Off / On list, matching Fixes.rb's FIX_TOGGLE_LIST.
|
||||
FIX_TOGGLE_LIST = [
|
||||
{ key: -1, label: "[#{$framework.txt("menu:cheat_toggle/disable")}]" },
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/off")}]" },
|
||||
{ key: 1, label: "[#{$framework.txt("menu:cheat_toggle/on")}]" },
|
||||
]
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Friendly Fire",
|
||||
label: "modules/others:commands/friendlyfire",
|
||||
help1: "modules/others:command_help/friendlyfire1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_friendly_fire_fix",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 0,
|
||||
restart: -1,
|
||||
order: 30
|
||||
)
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Endless Contracts",
|
||||
label: "modules/others:commands/endlesscontracts",
|
||||
help1: "modules/others:command_help/endlesscontracts1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_infinite_companion",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 0,
|
||||
restart: -1,
|
||||
order: 40
|
||||
)
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Prevent Death",
|
||||
label: "modules/others:commands/immortal",
|
||||
help1: "modules/others:command_help/immortal1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_companion_immortal",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 0,
|
||||
restart: -1,
|
||||
order: 45
|
||||
)
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Irresistible",
|
||||
label: "modules/others:commands/irresistible",
|
||||
help1: "modules/others:command_help/irresistible1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_irresistible_companions",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 0,
|
||||
restart: -1,
|
||||
order: 46
|
||||
)
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Beast Fix",
|
||||
label: "modules/others:commands/beastfix",
|
||||
help1: "modules/others:command_help/beastfix1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_beast_fix",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 0,
|
||||
restart: true,
|
||||
order: 47
|
||||
)
|
||||
register_command(
|
||||
type: :edit_list,
|
||||
key: "Companion Rape",
|
||||
label: "modules/others:commands/companionrape",
|
||||
help1: "modules/others:command_help/companionrape1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_companion_rape",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 0,
|
||||
restart: -1,
|
||||
order: 48
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Friendly Fire Fix
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_friendly_fire_fix >= 0
|
||||
module Battle_System
|
||||
alias_method :skill_result_check_ignore_tgt_nofriendlyfire, :skill_result_check_ignore_tgt
|
||||
|
||||
def skill_result_check_ignore_tgt(character, skill)
|
||||
return skill_result_check_ignore_tgt_nofriendlyfire(character, skill) unless $cheat_friendly_fire_fix == 1
|
||||
return true if block_friendly_fire(self, character, skill)
|
||||
skill_result_check_ignore_tgt_nofriendlyfire(character, skill)
|
||||
end
|
||||
|
||||
def block_friendly_fire(user, target, skill)
|
||||
attacker = nil
|
||||
targeted = nil
|
||||
|
||||
#Indirect attacks such as magic, arrows
|
||||
if (user.class == Game_PorjectileCharacter || user.class == Game_DestroyableObject)
|
||||
if user.event && user.event.summon_data && user.event.summon_data[:user]
|
||||
source = user.event.summon_data[:user]
|
||||
|
||||
if source && source == $game_player
|
||||
attacker = "Lona"
|
||||
elsif source.respond_to?(:npc) && source.npc && source.npc.master == $game_player
|
||||
attacker = "Ally"
|
||||
elsif source.respond_to?(:npc) && source.npc && source.npc.master &&
|
||||
source.npc.master.respond_to?(:npc) && source.npc.master.npc &&
|
||||
source.npc.master.npc.master == $game_player
|
||||
attacker = "AllySummon"
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
#Direct attacks such as melee
|
||||
if user == $game_player.actor
|
||||
attacker = "Lona"
|
||||
elsif user.respond_to?(:master) && user.master == $game_player
|
||||
attacker = "Ally"
|
||||
elsif user.respond_to?(:master) && user.master && user.master.respond_to?(:npc) &&
|
||||
user.master.npc && user.master.npc.master == $game_player
|
||||
attacker = "AllySummon"
|
||||
end
|
||||
end
|
||||
if target == $game_player
|
||||
targeted = "Lona"
|
||||
elsif target.respond_to?(:actor) && target.actor && target.actor.master == $game_player
|
||||
targeted = "Ally"
|
||||
elsif target.respond_to?(:actor) && target.actor && target.actor.master &&
|
||||
target.actor.master.respond_to?(:npc) && target.actor.master.npc &&
|
||||
target.actor.master.npc.master == $game_player
|
||||
targeted = "AllySummon"
|
||||
end
|
||||
|
||||
#Support magic/skill or target/attacker isn't an ally
|
||||
return false if skill && skill.respond_to?(:is_support) && skill.is_support
|
||||
return false unless attacker && targeted
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Endless Contracts
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_infinite_companion >= 0
|
||||
# Expiry checks only act when these dates aren't nil, so nil stops auto-leaving.
|
||||
class Game_Player
|
||||
alias_method :cf_infinite_companion_record_companion_front_date, :record_companion_front_date
|
||||
alias_method :cf_infinite_companion_record_companion_back_date, :record_companion_back_date
|
||||
alias_method :cf_infinite_companion_record_companion_ext_date, :record_companion_ext_date
|
||||
|
||||
def record_companion_front_date
|
||||
return cf_infinite_companion_record_companion_front_date unless $cheat_infinite_companion == 1
|
||||
nil
|
||||
end
|
||||
def record_companion_back_date
|
||||
return cf_infinite_companion_record_companion_back_date unless $cheat_infinite_companion == 1
|
||||
nil
|
||||
end
|
||||
def record_companion_ext_date
|
||||
return cf_infinite_companion_record_companion_ext_date unless $cheat_infinite_companion == 1
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Companion Incapacitation (shared helper used by both toggles below)
|
||||
#--------------------------------------------------------------------------
|
||||
class Game_NonPlayerCharacter
|
||||
# True while a companion is incapacitated. Restores its receiver_type once healed above 1 HP.
|
||||
def cf_incapacitated_companion_target?(target)
|
||||
victim = target.respond_to?(:actor) ? target.actor : nil
|
||||
return false unless victim.is_a?(Game_NonPlayerCharacter) && victim.instance_variable_get(:@cheat_incapacitated)
|
||||
if victim.stat.get_stat("health") > 1
|
||||
victim.instance_variable_set(:@cheat_incapacitated, false)
|
||||
original = victim.instance_variable_get(:@cheat_original_receiver_type)
|
||||
if original
|
||||
victim.receiver_type = original
|
||||
victim.instance_variable_set(:@cheat_original_receiver_type, nil)
|
||||
end
|
||||
end
|
||||
victim.instance_variable_get(:@cheat_incapacitated)
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Prevent Death
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_companion_immortal >= 0
|
||||
# A companion (@master == $game_player) survives lethal damage at 1 HP with sta forced to 0,
|
||||
# triggering Fatigue/crawl mode instead of death, and can't be killer/assaulter-targeted while down.
|
||||
class Game_NonPlayerCharacter
|
||||
alias_method :cf_companion_immortal_process_death, :process_death
|
||||
def process_death
|
||||
return cf_companion_immortal_process_death unless $cheat_companion_immortal == 1
|
||||
return cf_companion_immortal_process_death unless @master == $game_player
|
||||
@cheat_incapacitated = true
|
||||
@stat.set_stat("health", 1) if @stat.get_stat("health") <= 0
|
||||
@stat.set_stat("sta", 0)
|
||||
@target = nil
|
||||
set_alert_level(0)
|
||||
end
|
||||
|
||||
alias_method :cf_companion_immortal_process_ai_state, :process_ai_state
|
||||
def process_ai_state(target, distance, signal, sensor_type)
|
||||
cf_companion_immortal_process_ai_state(target, distance, signal, sensor_type)
|
||||
return unless $cheat_companion_immortal == 1
|
||||
return unless [:killer, :assaulter].include?(@ai_state)
|
||||
return unless cf_incapacitated_companion_target?(target)
|
||||
@ai_state = fucker?(target, friendly?(target)) ? :fucker : :none
|
||||
set_ai_state_balloon
|
||||
end
|
||||
end
|
||||
|
||||
# Keeps Lona's health from reaching 0 (death) too - her stamina/overfatigue mechanic is untouched.
|
||||
module FrameworkUtils
|
||||
def self.apply_lona_death_lock
|
||||
return unless $cheat_companion_immortal == 1 && ingame?
|
||||
actor = $game_player.actor
|
||||
actor.health = 1 if actor.health <= 0
|
||||
end
|
||||
end
|
||||
|
||||
# Applies the health floor inside determine_death so it holds against hits landing between ticks.
|
||||
class Game_Actor
|
||||
alias_method :cf_prevent_death_determine_death, :determine_death
|
||||
def determine_death
|
||||
FrameworkUtils.apply_lona_death_lock if $game_player && self == $game_player.actor
|
||||
cf_prevent_death_determine_death
|
||||
end
|
||||
end
|
||||
|
||||
class CheatFramework
|
||||
alias_method :hotkey_trigger_prevent_death_lona, :hotkey_trigger
|
||||
def hotkey_trigger
|
||||
hotkey_trigger_prevent_death_lona
|
||||
FrameworkUtils.apply_lona_death_lock
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Irresistible
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_irresistible_companions >= 0
|
||||
# Covers a companion Prevent Death has incapacitated, and Lona herself once her stamina hits 0.
|
||||
class Game_NonPlayerCharacter
|
||||
# Randomizes receiver_type from 3 (always struggles) to 1/2/4 (softer) while incapacitated.
|
||||
alias_method :cf_irresistible_process_death, :process_death
|
||||
def process_death
|
||||
cf_irresistible_process_death
|
||||
return unless $cheat_irresistible_companions == 1 && @master == $game_player && @cheat_incapacitated
|
||||
return unless @receiver_type == 3
|
||||
@cheat_original_receiver_type = @receiver_type
|
||||
@receiver_type = [1, 2, 4].sample
|
||||
end
|
||||
|
||||
# Forces fucker to true for an incapacitated companion or a 0-stamina Lona, bypassing aggro/stat checks.
|
||||
alias_method :cf_irresistible_fucker?, :fucker?
|
||||
def fucker?(target, friendly)
|
||||
if $cheat_irresistible_companions == 1
|
||||
return true if cf_incapacitated_companion_target?(target)
|
||||
return true if target == $game_player && $game_player.actor.sta <= 0
|
||||
end
|
||||
cf_irresistible_fucker?(target, friendly)
|
||||
end
|
||||
|
||||
# Re-derives killer/assaulter against a 0-stamina Lona as fucker-or-none.
|
||||
alias_method :cf_irresistible_process_ai_state, :process_ai_state
|
||||
def process_ai_state(target, distance, signal, sensor_type)
|
||||
cf_irresistible_process_ai_state(target, distance, signal, sensor_type)
|
||||
return unless $cheat_irresistible_companions == 1
|
||||
return unless [:killer, :assaulter].include?(@ai_state)
|
||||
return unless target == $game_player && $game_player.actor.sta <= 0
|
||||
@ai_state = fucker?(target, friendly?(target)) ? :fucker : :none
|
||||
set_ai_state_balloon
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Beast Fix
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_beast_fix >= 0
|
||||
# WildBoar/WildDog/WildHorse ship reachable; CompDoggy/CompHorseCarry ship hard-disabled
|
||||
# (sex==65535, never true) - companions get a higher weak threshold than wild animals.
|
||||
BEAST_FIX_WEAK_THRESHOLD = {
|
||||
"WildBoar" => 40,
|
||||
"WildDog" => 40,
|
||||
"WildHorse" => 80,
|
||||
"CompDoggy" => 150,
|
||||
"CompHorseCarry" => 150,
|
||||
}
|
||||
|
||||
BEAST_FIX_FUCKER_SKILLS = ["NpcFuckerMh", "NpcFuckerSh", "NpcFuckerGrab"]
|
||||
|
||||
# chcg4's "Others" pose entries ship ~80px too high on y; only nudges a value still at the
|
||||
# exact broken default, so an upstream fix becomes a silent no-op instead of double-applying.
|
||||
BEAST_ALIGN_FIX = {
|
||||
"chcg4_EventMouth_Others" => {from: 38, to: 118},
|
||||
"chcg4_EventAnal_Others" => {from: 287, to: 367},
|
||||
"chcg4_EventVag_Others" => {from: 262, to: 342},
|
||||
}
|
||||
|
||||
class << DataManager
|
||||
alias_method :cf_beastfix_load_mod_database, :load_mod_database
|
||||
def load_mod_database
|
||||
cf_beastfix_load_mod_database
|
||||
return unless $cheat_beast_fix == 1
|
||||
BEAST_FIX_WEAK_THRESHOLD.each do |name, weak|
|
||||
npc = $data_npcs[name]
|
||||
npc.fucker_condition = {"weak" => [weak, ">"], "sex" => [0, "="]} if npc
|
||||
end
|
||||
# Gives CompDoggy the grab/sex skills so it attempts the grab like other beasts.
|
||||
doggy = $data_npcs["CompDoggy"]
|
||||
doggy.skills_fucker = BEAST_FIX_FUCKER_SKILLS if doggy
|
||||
parts = $data_lona_portrait && $data_lona_portrait[1]["chcg4"]
|
||||
return unless parts
|
||||
parts.each do |part|
|
||||
fix = BEAST_ALIGN_FIX[part.part_name]
|
||||
part.posY = fix[:to] if fix && part.posY == fix[:from]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# WildHorse/WildDog/CompDoggy's template graphic uses a chartype with no real sex-pose data,
|
||||
# so grab() never reaches :sex - remap each to a working one, reusing existing matching art.
|
||||
class Game_Event
|
||||
alias_method :cf_beastfix_setup_charset_page_settings, :setup_charset_page_settings
|
||||
def setup_charset_page_settings
|
||||
if $cheat_beast_fix == 1 && @event && @page
|
||||
case @event.name
|
||||
when "WildHorse"
|
||||
if @page.graphic.character_name == "-char-Creatures80C01"
|
||||
@page.graphic.character_name = "-char-Creatures76MF01"
|
||||
@page.graphic.character_index = 1
|
||||
@page.graphic.pattern = 0
|
||||
end
|
||||
when "WildDog"
|
||||
if @page.graphic.character_name == "-char-Creatures48C01"
|
||||
@page.graphic.character_name = "-char-CreaturesDOG76M"
|
||||
@page.graphic.character_index = 0
|
||||
@page.graphic.pattern = 2
|
||||
end
|
||||
when "CompDoggy"
|
||||
if @page.graphic.character_name == "-char-Creatures48C01"
|
||||
@page.graphic.character_name = "-char-CreaturesDOG76M"
|
||||
@page.graphic.character_index = 1
|
||||
@page.graphic.pattern = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
cf_beastfix_setup_charset_page_settings
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Companion Rape
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_companion_rape >= 0
|
||||
# Lets a companion :fucker-target its own team instead of being filtered out as friendly -
|
||||
# patches both independent checks. Needs Beast Fix (or similar) for the condition to be reachable.
|
||||
CF_SENSOR_IFF_BYPASS_NAMES = []
|
||||
|
||||
class Game_NonPlayerCharacter
|
||||
# Escape hatch for granting the bypass to something that isn't a recruited companion
|
||||
# (@master == $game_player) yet, e.g. an NPC still under test.
|
||||
def cf_companion_rape_ignore_iff?
|
||||
@master == $game_player || CF_SENSOR_IFF_BYPASS_NAMES.include?(@npc_name)
|
||||
end
|
||||
|
||||
alias_method :cf_companion_rape_process_target, :process_target
|
||||
def process_target(target, distance, signal, sensor_type)
|
||||
return cf_companion_rape_process_target(target, distance, signal, sensor_type) unless $cheat_companion_rape == 1
|
||||
return if @event.chk_skill_eff_reserved
|
||||
return if !target.actor
|
||||
return process_target_lost if target.deleted? || (!$game_map.events.value?(target) && target != $game_player)
|
||||
return process_target_lost if target && target.actor.action_state == :death
|
||||
is_friend = friendly?(target)
|
||||
return if is_friend && !fucker?(target, is_friend)
|
||||
process_ai_state(target, distance, signal, sensor_type)
|
||||
process_alert_level(target, distance, signal, sensor_type) if non_battle? && @ai_state != :none
|
||||
return unless @alert_level == 2
|
||||
@targetLock_HP = 10
|
||||
case @ai_state
|
||||
when :fucker; process_fucker(target, distance, signal, sensor_type)
|
||||
when :killer; process_killer(target, distance, signal, sensor_type)
|
||||
when :assaulter; process_assulter(target, distance, signal, sensor_type)
|
||||
when :flee; process_flee(target, distance, signal, sensor_type)
|
||||
else set_alert_level(0) if @fraction_mode == 1 || @fraction_mode == 4 || @fraction_mode == 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Sensors::Basic_Sensor
|
||||
class << self
|
||||
alias_method :cf_companion_rape_signal_IgnoreCheck, :signal_IgnoreCheck
|
||||
def signal_IgnoreCheck(character, target, track_mode = false)
|
||||
return cf_companion_rape_signal_IgnoreCheck(character, target, track_mode) unless $cheat_companion_rape == 1
|
||||
return true if !target.is_actor?
|
||||
return true if same_char?(target, character)
|
||||
return true if ignore_dead? && target.npc.action_state == :death
|
||||
return true if ignore_obj_chk(character, target)
|
||||
return true if use_iff? && !character.actor.cf_companion_rape_ignore_iff? && character.actor.friendly?(target)
|
||||
return true if friendly_only? && !character.actor.friendly?(target)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,277 @@
|
||||
FrameworkModule = {
|
||||
name: "Pregnancy",
|
||||
key: :pregnancy,
|
||||
menu: :PREGNANCY,
|
||||
depends_on: [],
|
||||
enabled: true
|
||||
}
|
||||
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
#--------------------------------------------------------------------------
|
||||
# Pregnancy Menu
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :LONA,
|
||||
type: :scene,
|
||||
key: :pregnancy,
|
||||
label: "modules/pregnancy:commands/preg",
|
||||
name: "CheatMenuPregnancy",
|
||||
dict: :PREGNANCY,
|
||||
order: 60
|
||||
)
|
||||
register_command(
|
||||
group: :PREGNANCY,
|
||||
type: :edit_list,
|
||||
key: "Pregnancy Difficulty",
|
||||
label: "modules/pregnancy:commands/difficulty",
|
||||
state: "$cheat_pregnancy_difficulty",
|
||||
gdef: -1,
|
||||
help1: "modules/pregnancy:command_help/difficulty",
|
||||
order: 10,
|
||||
list: [
|
||||
{ key: -1, label: "[#{$framework.txt("menu:cheat_toggle/off")}]" },
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/hard")}]" },
|
||||
{ key: 1, label: "[#{$framework.txt("menu:cheat_toggle/hell")}]" },
|
||||
{ key: 2, label: "[#{$framework.txt("menu:cheat_toggle/doom")}]" }
|
||||
]
|
||||
)
|
||||
register_command(
|
||||
group: :PREGNANCY,
|
||||
type: :edit_num,
|
||||
key: "Seedbed",
|
||||
label: "modules/pregnancy:commands/seedbed",
|
||||
state: "$game_player.actor.stat['WombSeedBed']",
|
||||
help1: "modules/pregnancy:command_help/seedbed",
|
||||
min: 0,
|
||||
max: 10,
|
||||
order: 20,
|
||||
action: ->(v) { FrameworkUtils.custom_state_edit("WombSeedBed", v) }
|
||||
)
|
||||
register_command(
|
||||
group: :PREGNANCY,
|
||||
type: :toggle,
|
||||
key: "Protect Pregnancy",
|
||||
label: "modules/pregnancy:commands/protect",
|
||||
state: "$cheat_protect_pregnancy",
|
||||
gdef: false,
|
||||
help1: "modules/pregnancy:command_help/protect",
|
||||
order: 30
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Impregnate Submenu
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :PREGNANCY,
|
||||
type: :scene,
|
||||
key: :impregnate,
|
||||
label: "modules/pregnancy:commands/impreg",
|
||||
name: "CheatMenuImpregnate",
|
||||
dict: :IMPREGNATE,
|
||||
order: 40,
|
||||
menu1: "modules/pregnancy:menu_help/impreg_menu1",
|
||||
menu4: "modules/pregnancy:menu_help/impreg_menu4"
|
||||
)
|
||||
register_command(
|
||||
group: :IMPREGNATE,
|
||||
type: :action,
|
||||
key: "Human",
|
||||
label: "modules/pregnancy:commands/impreg/human",
|
||||
color: -> { $game_player.actor.baby_race == "Human" ? 16 : 0 },
|
||||
action: -> { MenuFramework::Pregnancy.impregnate("Human") },
|
||||
order: 10
|
||||
)
|
||||
register_command(
|
||||
group: :IMPREGNATE,
|
||||
type: :action,
|
||||
key: "Moot",
|
||||
label: "modules/pregnancy:commands/impreg/moot",
|
||||
color: -> { $game_player.actor.baby_race == "Moot" ? 16 : 0 },
|
||||
action: -> { MenuFramework::Pregnancy.impregnate("Moot") },
|
||||
order: 20
|
||||
)
|
||||
register_command(
|
||||
group: :IMPREGNATE,
|
||||
type: :action,
|
||||
key: "Deepone",
|
||||
label: "modules/pregnancy:commands/impreg/deepone",
|
||||
color: -> { $game_player.actor.baby_race == "Deepone" ? 16 : 0 },
|
||||
action: -> { MenuFramework::Pregnancy.impregnate("Deepone") },
|
||||
order: 30
|
||||
)
|
||||
register_command(
|
||||
group: :IMPREGNATE,
|
||||
type: :action,
|
||||
key: "Fishkind",
|
||||
label: "modules/pregnancy:commands/impreg/fishkind",
|
||||
color: -> { $game_player.actor.baby_race == "Fishkind" ? 16 : 0 },
|
||||
action: -> { MenuFramework::Pregnancy.impregnate("Fishkind") },
|
||||
order: 40
|
||||
)
|
||||
register_command(
|
||||
group: :IMPREGNATE,
|
||||
type: :action,
|
||||
key: "Orkind",
|
||||
label: "modules/pregnancy:commands/impreg/orkind",
|
||||
color: -> { $game_player.actor.baby_race == "Orkind" ? 16 : 0 },
|
||||
action: -> { MenuFramework::Pregnancy.impregnate("Orkind") },
|
||||
order: 50
|
||||
)
|
||||
register_command(
|
||||
group: :IMPREGNATE,
|
||||
type: :action,
|
||||
key: "Goblin",
|
||||
label: "modules/pregnancy:commands/impreg/goblin",
|
||||
color: -> { $game_player.actor.baby_race == "Goblin" ? 16 : 0 },
|
||||
action: -> { MenuFramework::Pregnancy.impregnate("Goblin") },
|
||||
order: 60
|
||||
)
|
||||
register_command(
|
||||
group: :IMPREGNATE,
|
||||
type: :action,
|
||||
key: "Abomination",
|
||||
label: "modules/pregnancy:commands/impreg/abomination",
|
||||
color: -> { $game_player.actor.baby_race == "Abomination" ? 16 : 0 },
|
||||
action: -> { MenuFramework::Pregnancy.impregnate("Abomination") },
|
||||
order: 70
|
||||
)
|
||||
register_command(
|
||||
group: :IMPREGNATE,
|
||||
type: :action,
|
||||
key: "Clear",
|
||||
label: "modules/pregnancy:commands/clear",
|
||||
help1: "modules/pregnancy:command_help/clear1",
|
||||
help2: "modules/pregnancy:command_help/clear2",
|
||||
help4: "menu:command_help/execute",
|
||||
color: -> { $game_player.actor.preg_level == 0 ? 8 : 0 },
|
||||
action: -> { $game_player.actor.cleanup_after_birth },
|
||||
enable: -> { !$cheat_protect_pregnancy },
|
||||
order: 80
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Pregnancy Status (hidden unless currently pregnant)
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :PREGNANCY,
|
||||
type: :info,
|
||||
key: "BabyRace",
|
||||
label: "modules/pregnancy:info/babyRace",
|
||||
state: "$game_player.actor.baby_race",
|
||||
hide: -> { $game_player.actor.preg_level == 0 },
|
||||
order: 50
|
||||
)
|
||||
register_command(
|
||||
group: :PREGNANCY,
|
||||
type: :edit_num,
|
||||
key: "PregRemaining",
|
||||
label: "modules/pregnancy:commands/days",
|
||||
state: "$game_player.actor.preg_whenGiveBirth?",
|
||||
help1: "modules/pregnancy:command_help/length1",
|
||||
help2: "modules/pregnancy:command_help/length2",
|
||||
hide: -> { $game_player.actor.preg_level == 0 },
|
||||
min: 0,
|
||||
max: -> { $game_player.actor.preg_cycle.inject(0, :+) },
|
||||
order: 60,
|
||||
action: ->(v) { MenuFramework::Pregnancy.update_pregdays(v) }
|
||||
)
|
||||
register_command(
|
||||
group: :PREGNANCY,
|
||||
type: :edit_num,
|
||||
key: "Baby Health",
|
||||
label: "modules/pregnancy:commands/health",
|
||||
state: "$game_player.actor.baby_health",
|
||||
hide: -> { $game_player.actor.preg_level == 0 },
|
||||
min: 0,
|
||||
max: 5000,
|
||||
order: 70,
|
||||
action: ->(v) { $game_player.actor.baby_health = v }
|
||||
)
|
||||
end
|
||||
|
||||
# Helper functions too complex for an inline action: lambda.
|
||||
module Pregnancy
|
||||
def self.impregnate(baby_race)
|
||||
actor = $game_player.actor
|
||||
actor.cleanup_after_birth
|
||||
actor.force_pregnancy(baby_race)
|
||||
end
|
||||
|
||||
def self.update_pregdays(days)
|
||||
actor = $game_player.actor
|
||||
current = actor.preg_whenGiveBirth?
|
||||
target = days
|
||||
diff = current - target
|
||||
return if diff == 0
|
||||
|
||||
# Shifts the conception date rather than the pregnancy length itself -
|
||||
# length comes from an array fixed at conception; use difficulty to change that.
|
||||
preg = Game_Date.new(*actor.preg_date)
|
||||
if diff > 0
|
||||
preg.decDays(diff)
|
||||
elsif diff < 0
|
||||
preg.addDays(-diff)
|
||||
end
|
||||
|
||||
actor.preg_date = preg.date
|
||||
actor.update_reproduction
|
||||
actor.belly_size_control
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Checked every tick via slow_trigger below.
|
||||
module FrameworkUtils
|
||||
def self.protect_pregnancy
|
||||
return unless self.ingame?
|
||||
return if $game_player.actor.preg_level == 0
|
||||
|
||||
$game_player.actor.baby_health += 999 if $cheat_protect_pregnancy
|
||||
end
|
||||
end
|
||||
|
||||
class CheatFramework
|
||||
alias_method :slow_trigger_ProtectPreg, :slow_trigger
|
||||
def slow_trigger
|
||||
slow_trigger_ProtectPreg
|
||||
FrameworkUtils.protect_pregnancy
|
||||
end
|
||||
end
|
||||
|
||||
# Reopens Game_Actor directly (rather than aliasing) since it only needs
|
||||
# access to the actor's own state, not to replace existing behavior.
|
||||
class Game_Actor
|
||||
# Mirrors set_preg(race, day=0) in Reproduction.rb.
|
||||
def force_pregnancy(baby_race, day = 0)
|
||||
return if empregnanted?
|
||||
$story_stats["dialog_preg_exped"] = 1
|
||||
@preg_date = $game_date.date
|
||||
@preg_race = baby_race
|
||||
@baby_race = baby_race
|
||||
set_baby_health
|
||||
add_state("WombSeedBed") if System_Settings::RACE_PREG_GEN_SEEDBED_LEVEL[@preg_race]
|
||||
@preg_day = day
|
||||
@preg_cycle = create_preg_cycle
|
||||
set_preg_schedule
|
||||
update_preg_level
|
||||
end
|
||||
end
|
||||
|
||||
# Overwrites create_preg_cycle in Reproduction.rb.
|
||||
module Reproduction
|
||||
def create_preg_cycle
|
||||
seedbed_level = self.stat["WombSeedBed"]
|
||||
seedbed_level_deduction=System_Settings::RACE_SEX_SETTING[@baby_race][1][seedbed_level]
|
||||
# Uses $cheat_pregnancy_difficulty in place of the story hardcore setting when set.
|
||||
difficulty = $cheat_pregnancy_difficulty >= 0 ? $cheat_pregnancy_difficulty : $story_stats["Setup_Hardcore"]
|
||||
cycle_template = System_Settings::RACE_SEX_SETTING[@baby_race][0][difficulty]
|
||||
preg_cycle=Array.new
|
||||
for i in 0...cycle_template.length-1
|
||||
daysNeeded = [cycle_template[i].to_a.sample-seedbed_level_deduction, 1].max
|
||||
preg_cycle.push(daysNeeded)
|
||||
end
|
||||
preg_cycle.push(cycle_template.last.to_a.sample)
|
||||
preg_cycle
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,102 @@
|
||||
FrameworkModule = {
|
||||
name: "Primary Stats",
|
||||
key: :primary,
|
||||
menu: :PRIMARY,
|
||||
order: 90,
|
||||
depends_on: []
|
||||
}
|
||||
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
#--------------------------------------------------------------------------
|
||||
# Character Editing Menu
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :LONA,
|
||||
type: :scene,
|
||||
key: :edit_primary,
|
||||
label: "modules/character:commands/primary",
|
||||
menu1: "menu:window_help/character1",
|
||||
name: "CheatMenuPrimary",
|
||||
dict: :PRIMARY,
|
||||
order: 10
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Primary Stats
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :PRIMARY,
|
||||
type: :edit_num,
|
||||
key: "Health",
|
||||
label: "modules/character:commands/primary/health",
|
||||
state: "$game_player.actor.health.to_i",
|
||||
enable: -> {!$cheat_infinite_health},
|
||||
min: -100,
|
||||
max: 999,
|
||||
action: ->(v) { $game_player.actor.health = v },
|
||||
order: 10
|
||||
)
|
||||
register_command(
|
||||
group: :PRIMARY,
|
||||
type: :edit_num,
|
||||
key: "Stamina",
|
||||
label: "modules/character:commands/primary/stamina",
|
||||
enable: -> {!$cheat_infinite_stamina},
|
||||
state: "$game_player.actor.sta.to_i",
|
||||
min: -100,
|
||||
max: 200,
|
||||
action: ->(v) { $game_player.actor.sta = v },
|
||||
order: 20
|
||||
)
|
||||
register_command(
|
||||
group: :PRIMARY,
|
||||
type: :edit_num,
|
||||
key: "Food",
|
||||
label: "modules/character:commands/primary/food",
|
||||
enable: -> {!$cheat_infinite_food},
|
||||
state: "$game_player.actor.sat",
|
||||
min: 0,
|
||||
max: 200,
|
||||
action: ->(v) { $game_player.actor.sat = v },
|
||||
order: 30
|
||||
)
|
||||
register_command(
|
||||
group: :PRIMARY,
|
||||
type: :edit_num,
|
||||
key: "Mood",
|
||||
label: "modules/character:commands/primary/mood",
|
||||
state: "$game_player.actor.mood",
|
||||
min: -100,
|
||||
max: 100,
|
||||
action: ->(v) { $game_player.actor.mood = v },
|
||||
order: 40
|
||||
)
|
||||
register_command(
|
||||
group: :PRIMARY,
|
||||
type: :edit_num,
|
||||
key: "Arousal",
|
||||
label: "modules/character:commands/primary/arousal",
|
||||
state: "$game_player.actor.arousal",
|
||||
min: 0,
|
||||
max: 5000,
|
||||
action: ->(v) { $game_player.actor.arousal = v },
|
||||
order: 50
|
||||
)
|
||||
register_command(
|
||||
group: :PRIMARY,
|
||||
type: :edit_num,
|
||||
key: "Morality",
|
||||
label: "modules/character:commands/primary/morality",
|
||||
state: "$game_player.actor.morality",
|
||||
help1: "modules/character:command_help/moral",
|
||||
min: -> {$game_player.actor.morality_plus - 200},
|
||||
max: -> {100 + $game_player.actor.morality_plus - 200},
|
||||
action: ->(v) {
|
||||
$game_player.actor.morality_lona = v - $game_player.actor.morality_plus + 200
|
||||
$game_player.actor.recalculate_stats
|
||||
},
|
||||
order: 60
|
||||
)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,446 @@
|
||||
FrameworkModule = {
|
||||
name: "Race Changer",
|
||||
key: :edit_race,
|
||||
menu: :RACE
|
||||
}
|
||||
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
#--------------------------------------------------------------------------
|
||||
# Character Editing Menu
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :LONA,
|
||||
type: :scene,
|
||||
key: :edit_race,
|
||||
label: "modules/character:commands/race",
|
||||
menu1: "modules/character:window_help/race1",
|
||||
name: "CheatMenuRace",
|
||||
dict: :RACE,
|
||||
order: 50
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Race Commands
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
type: :action,
|
||||
key: "Human",
|
||||
label: "modules/character:commands/race/human",
|
||||
color: -> { $game_player.actor.stat["RaceRecord"] == "Human" ? 16 : 0 },
|
||||
action: -> { $game_player.actor.reBirthSetRace("Human") },
|
||||
order: 10
|
||||
)
|
||||
register_command(
|
||||
type: :action,
|
||||
key: "Moot",
|
||||
label: "modules/character:commands/race/moot",
|
||||
color: -> { $game_player.actor.stat["RaceRecord"] == "Moot" ? 16 : 0 },
|
||||
action: -> { $game_player.actor.reBirthSetRace("Moot") },
|
||||
order: 20
|
||||
)
|
||||
register_command(
|
||||
type: :action,
|
||||
key: "Deepone",
|
||||
label: "modules/character:commands/race/deepone",
|
||||
color: -> { $game_player.actor.stat["RaceRecord"] == "PreDeepone" ? 16 : 0 },
|
||||
action: -> { $game_player.actor.reBirthSetRace("Deepone") },
|
||||
order: 30
|
||||
)
|
||||
register_command(
|
||||
type: :action,
|
||||
key: "True Deepone",
|
||||
label: "modules/character:commands/race/truedeepone",
|
||||
color: -> { $game_player.actor.stat["RaceRecord"] == "TrueDeepone" ? 16 : 0 },
|
||||
action: -> { $game_player.actor.reBirthSetRace("TrueDeepone") },
|
||||
order: 40
|
||||
)
|
||||
register_command(
|
||||
type: :action,
|
||||
key: "Human Abomination",
|
||||
label: "modules/character:commands/race/abom_human",
|
||||
color: -> { ($game_player.actor.stat["RaceRecord"] == "Abomination" && $game_player.actor.stat["Race"] == "Human") ? 16 : 0 },
|
||||
action: -> { $game_player.actor.reBirthSetRace("HumanAbomination") ; $game_party.lose_item("ItemBluePotion",3) },
|
||||
order: 50
|
||||
)
|
||||
register_command(
|
||||
type: :action,
|
||||
key: "Moot Abomination",
|
||||
label: "modules/character:commands/race/abom_moot",
|
||||
color: -> { ($game_player.actor.stat["RaceRecord"] == "Abomination" && $game_player.actor.stat["Race"] == "Moot") ? 16 : 0 },
|
||||
action: -> { $game_player.actor.reBirthSetRace("MootAbomination") ; $game_party.lose_item("ItemBluePotion",3) },
|
||||
order: 60
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Race Cheats
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :LONA,
|
||||
type: :scene,
|
||||
key: "Race Cheats",
|
||||
label: "modules/character:commands/racecheats",
|
||||
name: "CheatMenuRaceCheats",
|
||||
dict: :RACECHEATS,
|
||||
order: 55
|
||||
)
|
||||
# Shared Disable / Off / On list, matching Fixes.rb's FIX_TOGGLE_LIST.
|
||||
FIX_TOGGLE_LIST = [
|
||||
{ key: -1, label: "[#{$framework.txt("menu:cheat_toggle/disable")}]" },
|
||||
{ key: 0, label: "[#{$framework.txt("menu:cheat_toggle/off")}]" },
|
||||
{ key: 1, label: "[#{$framework.txt("menu:cheat_toggle/on")}]" },
|
||||
]
|
||||
|
||||
# --- Deepone ---
|
||||
register_command(
|
||||
group: :RACECHEATS,
|
||||
type: :info,
|
||||
key: "Deepone Divider",
|
||||
label: -> { "---#{$framework.txt("modules/character:commands/race/truedeepone")}---" },
|
||||
order: 10
|
||||
)
|
||||
register_command(
|
||||
group: :RACECHEATS,
|
||||
type: :toggle,
|
||||
key: "Sea Witch Awaken",
|
||||
label: "modules/character:commands/race/skills/deepone",
|
||||
state: "$game_player.actor.skill_learn?($data_skills[65])",
|
||||
color: -> { ["TrueDeepone", "PreDeepone"].include?($game_player.actor.stat["RaceRecord"]) ? 0 : 8 },
|
||||
action: -> { FrameworkUtils.skill_toggle(65) }, # BasicDeepOne
|
||||
order: 40
|
||||
)
|
||||
register_command(
|
||||
group: :RACECHEATS,
|
||||
type: :edit_list,
|
||||
key: "Deepone Can Communicate",
|
||||
label: "modules/character:commands/deeponecommunicate",
|
||||
help1: "modules/character:command_help/deeponecommunicate1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_deepone_weak_fix",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 0,
|
||||
restart: -1,
|
||||
order: 20
|
||||
)
|
||||
register_command(
|
||||
group: :RACECHEATS,
|
||||
type: :edit_list,
|
||||
key: "Siren Summon Max",
|
||||
label: "modules/character:commands/siren",
|
||||
help1: "modules/character:command_help/siren1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_max_sirens",
|
||||
list: [
|
||||
{ key: -1, label: "[#{$framework.txt("menu:cheat_toggle/off")}]" },
|
||||
{ key: 2, label: "[2]" },
|
||||
{ key: 4, label: "[4]" },
|
||||
{ key: 6, label: "[6]" },
|
||||
{ key: 8, label: "[8]" },
|
||||
{ key: 10, label: "[10]" },
|
||||
{ key: 12, label: "[12]" },
|
||||
],
|
||||
gdef: 2,
|
||||
restart: -1,
|
||||
order: 30
|
||||
)
|
||||
|
||||
# --- Abomination ---
|
||||
register_command(
|
||||
group: :RACECHEATS,
|
||||
type: :info,
|
||||
key: "Abomination Divider",
|
||||
label: -> { "---#{$framework.txt("modules/pregnancy:commands/impreg/abomination")}---" },
|
||||
order: 50
|
||||
)
|
||||
register_command(
|
||||
group: :RACECHEATS,
|
||||
type: :toggle,
|
||||
key: "Abom Desecrate Skill",
|
||||
label: "modules/character:commands/race/skills/abomeat",
|
||||
state: "$game_player.actor.skill_learn?($data_skills[67])",
|
||||
color: -> { $game_player.actor.stat["RaceRecord"] == "Abomination" ? 0 : 8 },
|
||||
action: -> { FrameworkUtils.skill_toggle(67) }, # BasicAbomEatDed
|
||||
order: 70
|
||||
)
|
||||
register_command(
|
||||
group: :RACECHEATS,
|
||||
type: :toggle,
|
||||
key: "Abom Tendril Whip",
|
||||
label: "modules/character:commands/race/skills/abomgrab",
|
||||
state: "$game_player.actor.skill_learn?($data_skills[66])",
|
||||
color: -> { $game_player.actor.stat["RaceRecord"] == "Abomination" ? 0 : 8 },
|
||||
action: -> { FrameworkUtils.skill_toggle(66) }, # BasicAbomGrab
|
||||
order: 80
|
||||
)
|
||||
register_command(
|
||||
group: :RACECHEATS,
|
||||
type: :edit_list,
|
||||
key: "Abomination Skill Fix",
|
||||
label: "modules/character:commands/abomskillfix",
|
||||
help1: "modules/character:command_help/abomskillfix1",
|
||||
help2: "menu:command_help/fixcommand2",
|
||||
state: "$cheat_abomination_skill_fix",
|
||||
list: FIX_TOGGLE_LIST,
|
||||
gdef: 0,
|
||||
restart: -1,
|
||||
order: 60
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
module FrameworkUtils
|
||||
def self.skill_toggle(skillid)
|
||||
actor = $game_player.actor
|
||||
if actor.skill_learn?($data_skills[skillid])
|
||||
actor.forget_skill(skillid)
|
||||
else
|
||||
actor.learn_skill(skillid)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Deepone Can Communicate
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_deepone_weak_fix >= 0
|
||||
# Lets True Deepone trigger NPC events normally instead of being hard-blocked.
|
||||
class Game_Player
|
||||
alias_method :cf_deepone_weak_fix_cannotTriggerBecauseTrueDeepone, :cannotTriggerBecauseTrueDeepone
|
||||
|
||||
def cannotTriggerBecauseTrueDeepone(tmpEvent)
|
||||
return cf_deepone_weak_fix_cannotTriggerBecauseTrueDeepone(tmpEvent) unless $cheat_deepone_weak_fix == 1
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
# Strips the game's own True Deepone race-gate block out of these HCGframes files at load time.
|
||||
module DeeponeWeakFixPatch
|
||||
extend self
|
||||
GUARD = 'if $game_player.actor.stat["RaceRecord"] == "TrueDeepone"'
|
||||
BLOCK_OPENER = /\A(if|unless|case|while|until|def|class|module|begin)\b/
|
||||
|
||||
TARGET_PATHS = %w[
|
||||
Data/HCGframes/encounter/BanditMobs.rb
|
||||
Data/HCGframes/encounter/CommonMobs.rb
|
||||
Data/HCGframes/encounter/FishPPL.rb
|
||||
Data/HCGframes/encounter/GangDebtCollet.rb
|
||||
Data/HCGframes/encounter/NobleGuards.rb
|
||||
Data/HCGframes/encounter/NoerGuards.rb
|
||||
Data/HCGframes/encounter/NoerHomeless.rb
|
||||
Data/HCGframes/encounter/NoerMissionary.rb
|
||||
Data/HCGframes/encounter/RoadHalp.rb
|
||||
Data/HCGframes/event/OvermapDoomArmory.rb
|
||||
Data/HCGframes/event/OvermapDoomFortress.rb
|
||||
Data/HCGframes/event/OvermapNoerGateEast.rb
|
||||
Data/HCGframes/event/OvermapNoerGateNoble.rb
|
||||
Data/HCGframes/event/OvermapNoerGateNorth.rb
|
||||
Data/HCGframes/event/OvermapPirateBane.rb
|
||||
Data/HCGframes/event/FishkindCaveCompExtUQConvoy.rb
|
||||
Data/HCGframes/event/OrkindCaveCompExtUQConvoy.rb
|
||||
]
|
||||
NOER_OUTA_NEEDA_HELP = "Data/HCGframes/encounter/NoerOutaNeedaHelp.rb"
|
||||
|
||||
# Tracks block depth since some files nest a case/end inside the guard.
|
||||
def strip_race_gate(text)
|
||||
lines = text.lines.to_a
|
||||
guard_i = lines.index { |l| l.strip == GUARD }
|
||||
return text unless guard_i
|
||||
depth = 1
|
||||
((guard_i + 1)...lines.length).each do |i|
|
||||
stripped = lines[i].strip
|
||||
depth += 1 if stripped =~ BLOCK_OPENER
|
||||
depth -= 1 if stripped == "end"
|
||||
next unless depth == 0
|
||||
return (lines[0...guard_i] + lines[(i + 1)..-1]).join
|
||||
end
|
||||
text
|
||||
end
|
||||
end
|
||||
|
||||
alias cf_deepone_weak_fix_load_script load_script
|
||||
def load_script(path)
|
||||
return cf_deepone_weak_fix_load_script(path) unless $cheat_deepone_weak_fix == 1
|
||||
unless DeeponeWeakFixPatch::TARGET_PATHS.include?(path) || path == DeeponeWeakFixPatch::NOER_OUTA_NEEDA_HELP
|
||||
return cf_deepone_weak_fix_load_script(path)
|
||||
end
|
||||
text = File.open(path, 'rb', &:read)
|
||||
text = path == DeeponeWeakFixPatch::NOER_OUTA_NEEDA_HELP ? text.gsub(/[ \t]*&&\s*!tmpTrueDeepone/, "") : DeeponeWeakFixPatch.strip_race_gate(text)
|
||||
self.instance_eval(text, path)
|
||||
rescue => ex
|
||||
msgbox ex.message + "\n" + ex.backtrace.join("\n")
|
||||
end
|
||||
|
||||
# TrueDeepone.json's +1000 "weak" penalty is a state effect load_script doesn't
|
||||
# touch - tag the ItemEffect instance so #adjust can zero it out live.
|
||||
class << DataManager
|
||||
alias_method :cf_deepone_weak_fix_load_mod_database, :load_mod_database
|
||||
def load_mod_database
|
||||
cf_deepone_weak_fix_load_mod_database
|
||||
state = $data_StateName["TrueDeepone"] # same lookup Game_Actor#add_state uses
|
||||
lona_effect = state && state.instance_variable_get(:@lona_effect)
|
||||
weak_effect = lona_effect && lona_effect.find { |e| e.attr == "weak" }
|
||||
weak_effect.instance_variable_set(:@cf_deepone_weak_marker, true) if weak_effect
|
||||
end
|
||||
end
|
||||
|
||||
module ItemConfigs
|
||||
class ItemEffect
|
||||
alias_method :cf_deepone_weak_fix_adjust, :adjust
|
||||
def adjust
|
||||
return 0 if @cf_deepone_weak_marker && $cheat_deepone_weak_fix == 1
|
||||
cf_deepone_weak_fix_adjust
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Abomination Skill Fix
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_abomination_skill_fix >= 0
|
||||
class Game_Actor
|
||||
alias_method :cf_abomination_skill_fix_check_Abom_heal_HealthSta, :check_Abom_heal_HealthSta
|
||||
|
||||
# Restores sat, stamina, and health, and heals wounds.
|
||||
def check_Abom_heal_HealthSta(tmpCost = 10)
|
||||
return cf_abomination_skill_fix_check_Abom_heal_HealthSta(tmpCost) unless $cheat_abomination_skill_fix == 1
|
||||
self.heal_wound
|
||||
tmpSTA = self.sta
|
||||
tmpStaMax = self.battle_stat.get_stat("sta", 2)
|
||||
tmpStaVS = ((tmpSTA - tmpStaMax).abs).to_i
|
||||
tmpHp = self.health
|
||||
tmpHpMax = self.battle_stat.get_stat("health", 2)
|
||||
tmpHpVS = ((tmpHp - tmpHpMax).abs).to_i
|
||||
tmpSat = self.sat
|
||||
tmpSatMax = self.battle_stat.get_stat("sat", 2)
|
||||
tmpSatVS = ((tmpSat - tmpSatMax).abs).to_i
|
||||
|
||||
if $story_stats["Setup_Hardcore"] >= 1
|
||||
satScore = (tmpCost * 0.5).round
|
||||
else
|
||||
satScore = (tmpCost * 0.8).round
|
||||
end
|
||||
|
||||
if tmpSatVS != 0 && satScore > 0
|
||||
tmpSatInc = ([tmpSatVS, satScore].min).to_i
|
||||
satScore -= tmpSatInc
|
||||
self.sat += tmpSatInc
|
||||
end
|
||||
if tmpStaVS != 0 && satScore > 0
|
||||
tmpStaInc = ([tmpStaVS, satScore].min).to_i
|
||||
satScore -= tmpStaInc
|
||||
self.sta += tmpStaInc
|
||||
end
|
||||
if tmpHpVS != 0 && satScore > 0
|
||||
tmpHpInc = ([tmpHpVS, satScore].min).to_i
|
||||
satScore -= tmpHpInc
|
||||
self.health += tmpHpInc
|
||||
end
|
||||
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
class Game_Event
|
||||
def abomEatDed
|
||||
user = @summon_data[:user]
|
||||
chkedNPC = $game_map.events_xy(user.x, user.y).select { |event|
|
||||
next if event == user
|
||||
next if event.deleted?
|
||||
next if !event.npc?
|
||||
next if event.actor.is_object
|
||||
next if event.actor.race == "Undead"
|
||||
next if !event.actor.dedAnimPlayed
|
||||
event
|
||||
}
|
||||
user.actor.add_state(160)
|
||||
if chkedNPC.empty?
|
||||
$game_map.popup(0, "QuickMsg:Lona/CannotWorks#{rand(2)}", 0, 0)
|
||||
SndLib.sys_buzzer
|
||||
return delete
|
||||
else
|
||||
@zoom_x = 1
|
||||
@zoom_y = 1
|
||||
end
|
||||
abomGrabSkillHoldEFX
|
||||
if !chkedNPC.empty?
|
||||
if user.actor.last_holding_count >= @summon_data[:skill].launch_max
|
||||
user.actor.remove_state_stack(49) #Sickly
|
||||
user.actor.remove_state_stack(30) #FeelsSick
|
||||
tmpTarHP = chkedNPC[0].actor.battle_stat.get_stat("health", 3) / 4
|
||||
tmpTarSAT = chkedNPC[0].actor.battle_stat.get_stat("sat", 3) / 5
|
||||
tmpTarSTA = chkedNPC[0].actor.battle_stat.get_stat("sta", 3) / 6
|
||||
bounsPointsToLona = tmpTarHP + tmpTarSTA + tmpTarSAT
|
||||
user.actor.check_Abom_heal_HealthSta(bounsPointsToLona)
|
||||
tmpHowManyBall = bounsPointsToLona / 50
|
||||
summonTimes = [tmpHowManyBall, 6].min
|
||||
summonTimes.times {
|
||||
EvLib.sum(["WasteJumpBloodToPlayer", "WasteJumpBloodToPlayer2"].sample, user.x, user.y)
|
||||
}
|
||||
else
|
||||
tmpTarHP = chkedNPC[0].actor.battle_stat.get_stat("health", 3)
|
||||
tmpTarSAT = chkedNPC[0].actor.battle_stat.get_stat("sat", 3)
|
||||
tmpTarSTA = chkedNPC[0].actor.battle_stat.get_stat("sta", 3)
|
||||
tmpTarATK = chkedNPC[0].actor.battle_stat.get_stat("def", 3)
|
||||
tmpTarDEF = chkedNPC[0].actor.battle_stat.get_stat("atk", 3)
|
||||
tmpTarSUR = chkedNPC[0].actor.battle_stat.get_stat("survival", 3)
|
||||
tmpData = {
|
||||
:user => user,
|
||||
:HP => tmpTarHP,
|
||||
:SAT => tmpTarSAT,
|
||||
:STA => tmpTarSTA,
|
||||
:ATK => tmpTarATK,
|
||||
:DEF => tmpTarDEF,
|
||||
:SUR => tmpTarSUR,
|
||||
}
|
||||
EvLib.sum("ProjAbomSumTentacle", user.x, user.y, tmpData)
|
||||
tmpBakDir = user.direction
|
||||
user.combat_jump_reverse
|
||||
user.direction = tmpBakDir
|
||||
end
|
||||
EvLib.sum("EffectOverKillReverse", chkedNPC[0].x, chkedNPC[0].y)
|
||||
chkedNPC[0].effects = ["ZoomOutDelete", 0, false, nil, nil, [true, false].sample]
|
||||
if $game_player.actor.stat["BloodLust"] == 1 || $game_player.actor.stat["Cannibal"] == 1
|
||||
$game_player.actor.mood += 50
|
||||
else
|
||||
$game_player.actor.mood -= 10
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Deepone Summon Max
|
||||
#--------------------------------------------------------------------------
|
||||
if $cheat_max_sirens >= 0
|
||||
# Rewrites the summon-limit check baked into this event's own script commands.
|
||||
class Game_Event
|
||||
alias_method :cf_max_sirens_refresh, :refresh
|
||||
def refresh
|
||||
cf_max_sirens_refresh
|
||||
|
||||
return if @cheat_max_sirens_checked
|
||||
@cheat_max_sirens_checked = true
|
||||
|
||||
return unless @summon_data
|
||||
event = @event
|
||||
return unless event
|
||||
return unless event.name == "SummonDeeponeProjectile"
|
||||
# Toggled to Disabled after this already installed this session - -1 would otherwise get
|
||||
# interpolated straight into the rewritten command below and delete sirens on sight.
|
||||
return if $cheat_max_sirens == -1
|
||||
event.pages.each do |page|
|
||||
next unless page.list
|
||||
page.list.each do |cmd|
|
||||
next unless cmd.code == 355 || cmd.code == 655
|
||||
if cmd.parameters[0].include?("tmpQGcount >= 2")
|
||||
cmd.parameters[0] =
|
||||
"return self.delete if tmpQGcount >= #{$cheat_max_sirens}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,71 @@
|
||||
FrameworkModule = {
|
||||
name: "Revive Menu",
|
||||
key: :revive_menu,
|
||||
menu: :REVIVE
|
||||
}
|
||||
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
#--------------------------------------------------------------------------
|
||||
# Menu Commands
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :NPC,
|
||||
type: :scene,
|
||||
key: :revive_menu,
|
||||
label: "modules/revive:commands/revive",
|
||||
name: "CheatMenuReviveNPC",
|
||||
dict: :REVIVE,
|
||||
menu3: "modules/revive:command/revive/menu3",
|
||||
menu4: "modules/revive:command/revive/menu4",
|
||||
order: 80
|
||||
)
|
||||
|
||||
|
||||
# List of NPC Variables
|
||||
REVIVE_LIST = [
|
||||
"UniqueCharUniqueCecily",
|
||||
"UniqueCharUniqueGrayRat",
|
||||
"UniqueCharUniqueCocona",
|
||||
"UniqueCharUniqueLisa",
|
||||
"UniqueCharUniqueElise",
|
||||
"UniqueCharUniqueMaani",
|
||||
"UniqueCharUniqueDavidBorn",
|
||||
"UniqueCharUniquePigBobo",
|
||||
"UniqueCharUniqueAdam",
|
||||
"UniqueCharUniqueMilo",
|
||||
"UniqueCharUniqueSeaWitch",
|
||||
"UniqueCharUniqueTeller",
|
||||
"UniqueCharUniqueHappyMerchant",
|
||||
"UniqueCharUniqueTavernWaifu",
|
||||
"UniqueCharUniqueFerrum",
|
||||
"UniqueCharUniqueCaptainEdward",
|
||||
"UniqueCharUniqueFatdalf",
|
||||
"UniqueCharNoerSnowflake",
|
||||
|
||||
#"UniqueChar_NorthFL_SGT",
|
||||
#"UniqueChar_NFL_MerCamp_Leader",
|
||||
#"UniqueCharNoerRelayOut_PoorBoy",
|
||||
#"UniqueChar_FishTownT_Shaman"
|
||||
#"UniqueCharUniqueKillerRabbit"
|
||||
#"UniqueCharUniqueOgreWarBoss"
|
||||
#"UniqueCharUniqueGangBoss"
|
||||
#"UniqueCharSMCloudVillage_Boss"
|
||||
#"UniqueCharSMCloudVillage_BossAtk"
|
||||
#"UniqueChar_OrcSlaveMaster"
|
||||
]
|
||||
REVIVE_LIST.each do |char_key|
|
||||
register_command(
|
||||
group: :REVIVE,
|
||||
type: :action,
|
||||
key: char_key,
|
||||
color: -> { $story_stats[char_key] != -1 ? 8 : 0 },
|
||||
label: "modules/revive:NPC/#{char_key}",
|
||||
action: -> {
|
||||
$story_stats[char_key] = 0
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
FrameworkModule = {
|
||||
name: "Sexual Stats",
|
||||
key: :sexual,
|
||||
menu: :SEXUAL,
|
||||
depends_on: []
|
||||
}
|
||||
module MenuFramework
|
||||
module SUBMENU
|
||||
#--------------------------------------------------------------------------
|
||||
# Character Editing Menu
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :LONA,
|
||||
type: :scene,
|
||||
key: :sexual,
|
||||
label: "modules/character:commands/sexual",
|
||||
menu1: "menu:window_help/character1",
|
||||
name: "CheatMenuSexual",
|
||||
dict: :SEXUAL,
|
||||
)
|
||||
#--------------------------------------------------------------------------
|
||||
# Damage
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :SEXUAL,
|
||||
type: :edit_num,
|
||||
key: "Vag Damage",
|
||||
label: "modules/character:commands/sexual/dedit/v",
|
||||
state: "$game_player.actor.vag_damage",
|
||||
enable: -> { $game_player.actor.actStat.get_stat('vag_damage', 3) != 0 },
|
||||
min: 0,
|
||||
max: 5000,
|
||||
action: ->(v) { $game_player.actor.vag_damage = v }
|
||||
)
|
||||
register_command(
|
||||
group: :SEXUAL,
|
||||
type: :edit_num,
|
||||
key: "Urethra Damage",
|
||||
label: "modules/character:commands/sexual/dedit/u",
|
||||
state: "$game_player.actor.urinary_damage",
|
||||
enable: -> { $game_player.actor.actStat.get_stat('urinary_damage', 3) != 0 },
|
||||
min: 0,
|
||||
max: 5000,
|
||||
action: ->(v) { $game_player.actor.urinary_damage = v }
|
||||
)
|
||||
register_command(
|
||||
group: :SEXUAL,
|
||||
type: :edit_num,
|
||||
key: "Anal Damage",
|
||||
label: "modules/character:commands/sexual/dedit/a",
|
||||
state: "$game_player.actor.anal_damage",
|
||||
enable: -> { $game_player.actor.actStat.get_stat('anal_damage', 3) != 0 },
|
||||
min: 0,
|
||||
max: 5000,
|
||||
action: ->(v) { $game_player.actor.anal_damage = v }
|
||||
)
|
||||
#--------------------------------------------------------------------------
|
||||
# Damage Toggles
|
||||
#--------------------------------------------------------------------------
|
||||
register_command(
|
||||
group: :SEXUAL,
|
||||
type: :toggle,
|
||||
key: "Toggle Vag Damage",
|
||||
label: "modules/character:commands/sexual/dtoggle/v",
|
||||
help1: "menu:command_help/local",
|
||||
state: "$game_player.actor.actStat.get_stat('vag_damage', 3) == 0",
|
||||
global: false,
|
||||
action: -> {
|
||||
if $game_player.actor.actStat.get_stat('vag_damage', 3) == 0
|
||||
$game_player.actor.actStat.set_stat('vag_damage', 10000, 3)
|
||||
else
|
||||
$game_player.actor.actStat.set_stat('vag_damage', 0, 3)
|
||||
end
|
||||
$game_player.actor.refresh
|
||||
})
|
||||
register_command(
|
||||
group: :SEXUAL,
|
||||
type: :toggle,
|
||||
key: "Toggle Urethra Damage",
|
||||
label: "modules/character:commands/sexual/dtoggle/u",
|
||||
help1: "menu:command_help/local",
|
||||
state: "$game_player.actor.actStat.get_stat('urinary_damage', 3) == 0",
|
||||
global: false,
|
||||
action: -> {
|
||||
if $game_player.actor.actStat.get_stat('urinary_damage', 3) == 0
|
||||
$game_player.actor.actStat.set_stat('urinary_damage', 10000, 3)
|
||||
else
|
||||
$game_player.actor.actStat.set_stat('urinary_damage', 0, 3)
|
||||
end
|
||||
$game_player.actor.refresh
|
||||
})
|
||||
register_command(
|
||||
group: :SEXUAL,
|
||||
type: :toggle,
|
||||
key: "Toggle Anal Damage",
|
||||
label: "modules/character:commands/sexual/dtoggle/a",
|
||||
help1: "menu:command_help/local",
|
||||
state: "$game_player.actor.actStat.get_stat('anal_damage', 3) == 0",
|
||||
global: false,
|
||||
action: -> {
|
||||
if $game_player.actor.actStat.get_stat('anal_damage', 3) == 0
|
||||
$game_player.actor.actStat.set_stat('anal_damage', 10000, 3)
|
||||
else
|
||||
$game_player.actor.actStat.set_stat('anal_damage', 0, 3)
|
||||
end
|
||||
$game_player.actor.refresh
|
||||
})
|
||||
|
||||
register_command(
|
||||
group: :SEXUAL,
|
||||
type: :action,
|
||||
key: "Reset Sex Record",
|
||||
label: "modules/character:commands/sexual/reset",
|
||||
help1: "modules/character:command_help/sexual/reset",
|
||||
action: -> { FrameworkUtils.clear_sex_record }
|
||||
)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
module FrameworkUtils
|
||||
def self.clear_sex_record
|
||||
$story_stats["dialog_vag_virgin"] = 1
|
||||
$story_stats["dialog_anal_virgin"] = 1
|
||||
|
||||
$story_stats["sex_record_first_mouth"] = Array.new
|
||||
$story_stats["sex_record_first_vag"] = Array.new
|
||||
$story_stats["sex_record_first_anal"] = Array.new
|
||||
$story_stats["sex_record_last_mouth"] = Array.new
|
||||
$story_stats["sex_record_last_vag"] = Array.new
|
||||
$story_stats["sex_record_last_anal"] = Array.new
|
||||
$story_stats["sex_record_partner_count"]= Hash.new(0)
|
||||
$story_stats["sex_record_race_count"] = Hash.new(0)
|
||||
|
||||
$story_stats["record_giveup_PeePoo"] = 0
|
||||
$story_stats["record_Rebirth"] = 0
|
||||
$story_stats["sex_record_cunnilingus_given_count"] = 0
|
||||
$story_stats["sex_record_whore_job"] = 0
|
||||
$story_stats["sex_record_kissed"] = 0
|
||||
$story_stats["sex_record_privates_seen"] = 0
|
||||
$story_stats["sex_record_groped"] = 0
|
||||
$story_stats["sex_record_semen_swallowed"] = 0
|
||||
$story_stats["sex_record_frottage"] = 0
|
||||
$story_stats["sex_record_biggest_gangbang"] = 0
|
||||
$story_stats["sex_record_seen_peeing"] = 0
|
||||
$story_stats["sex_record_peed"] = 0
|
||||
$story_stats["sex_record_shat"] = 0
|
||||
$story_stats["sex_record_cumshotted"] = 0
|
||||
$story_stats["sex_record_seen_shat"] = 0
|
||||
$story_stats["sex_record_torture"] = 0
|
||||
$story_stats["sex_record_eating_fecal"] = 0
|
||||
$story_stats["sex_record_cunnilingus_taken"] = 0
|
||||
$story_stats["sex_record_coma_sex"] = 0
|
||||
$story_stats["sex_record_mindbreak"] = 0
|
||||
$story_stats["sex_record_defecate_incontinent"] = 0
|
||||
$story_stats["sex_record_urinary_incontinence"] = 0
|
||||
$story_stats["sex_record_anal_dilatation"] = 0
|
||||
$story_stats["sex_record_vag_dilatation"] = 0
|
||||
$story_stats["sex_record_urinary_dilatation"] = 0
|
||||
$story_stats["sex_record_BreastFeeding"] = 0
|
||||
$story_stats["sex_record_MilkSplash"] = 0
|
||||
$story_stats["sex_record_MilkSplash_incontinence"] = 0
|
||||
$story_stats["sex_record_pregnancy"] = 0
|
||||
$story_stats["sex_record_orgasm"] = 0
|
||||
$story_stats["sex_record_orgasm_Mouth"] = 0
|
||||
$story_stats["sex_record_orgasm_Torture"] = 0
|
||||
$story_stats["sex_record_orgasm_Vag"] = 0
|
||||
$story_stats["sex_record_orgasm_Milking"] = 0
|
||||
$story_stats["sex_record_orgasm_Pee"] = 0
|
||||
$story_stats["sex_record_orgasm_Poo"] = 0
|
||||
$story_stats["sex_record_orgasm_Birth"] = 0
|
||||
$story_stats["sex_record_orgasm_Anal"] = 0
|
||||
$story_stats["sex_record_orgasm_Semen"] = 0
|
||||
$story_stats["sex_record_orgasm_Breast"] = 0
|
||||
$story_stats["sex_record_orgasm_Shame"] = 0
|
||||
$story_stats["sex_record_enemaed"] = 0
|
||||
$story_stats["sex_record_analbeads"] = 0
|
||||
$story_stats["sex_record_pussy_wash"] = 0
|
||||
$story_stats["sex_record_anal_wash"] = 0
|
||||
$story_stats["sex_record_golden_shower"] = 0
|
||||
$story_stats["sex_record_piss_drink"] = 0
|
||||
|
||||
$story_stats["record_CoconaVag"] = 0
|
||||
$story_stats["record_CoconaOgrasm"] = 0
|
||||
$story_stats["record_CoconaPeeWith"] = 0
|
||||
|
||||
$story_stats["sex_record_groin_harassment"] = 0
|
||||
$story_stats["sex_record_butt_harassment"] = 0
|
||||
$story_stats["sex_record_boob_harassment"] = 0
|
||||
|
||||
$story_stats["sex_record_handjob_count"] = 0
|
||||
$story_stats["sex_record_anal_count"] = 0
|
||||
$story_stats["sex_record_vaginal_count"] = 0
|
||||
$story_stats["sex_record_mouth_count"] = 0
|
||||
$story_stats["sex_record_cumin_vaginal"] = 0
|
||||
$story_stats["sex_record_cumin_anal"] = 0
|
||||
$story_stats["sex_record_cumin_mouth"] = 0
|
||||
$story_stats["sex_record_masturbation_count"] = 0
|
||||
$story_stats["sex_record_FloorClearnPee"] = 0
|
||||
$story_stats["sex_record_FloorClearnScat"] = 0
|
||||
$story_stats["sex_record_FloorClearnCums"] = 0
|
||||
|
||||
$story_stats["sex_record_miscarriage"] = 0
|
||||
$story_stats["sex_record_baby_birth"] = 0
|
||||
|
||||
$story_stats["sex_record_birth_Abomination"] = 0
|
||||
$story_stats["sex_record_birth_Goblin"] = 0
|
||||
$story_stats["sex_record_birth_Human"] = 0
|
||||
$story_stats["sex_record_birth_Deepone"] = 0
|
||||
$story_stats["sex_record_birth_Moot"] = 0
|
||||
$story_stats["sex_record_birth_Orkind"] = 0
|
||||
$story_stats["sex_record_birth_Fishkind"] = 0
|
||||
|
||||
$story_stats["sex_record_birth_PotWorm"] = 0
|
||||
$story_stats["sex_record_birth_MoonWorm"] = 0
|
||||
$story_stats["sex_record_birth_PolypWorm"] = 0
|
||||
$story_stats["sex_record_birth_HookWorm"] = 0
|
||||
$story_stats["sex_record_birth_BabyLost"] = 0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,320 @@
|
||||
FrameworkModule = {
|
||||
name: "Summons",
|
||||
key: :summons,
|
||||
menu: :NONE,
|
||||
depends_on: []
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Menu Commands
|
||||
#--------------------------------------------------------------------------
|
||||
MenuFramework::MENU.register_command(
|
||||
type: :scene,
|
||||
key: :summon,
|
||||
label: "modules/invedit:commands/summon",
|
||||
name: "CheatMenuSummon",
|
||||
dict: :SUMMON,
|
||||
order: 3
|
||||
)
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Arena Summons - labeled with system names, not translated.
|
||||
#--------------------------------------------------------------------------
|
||||
MenuFramework::SUBMENU.register_command(
|
||||
group: :SUMMON,
|
||||
type: :scene,
|
||||
key: :arena,
|
||||
label: -> { "Arena" },
|
||||
name: "CheatMenuSummon_Arena",
|
||||
dict: :SUMMON_ARENA,
|
||||
order: 200
|
||||
)
|
||||
|
||||
# Arena fights read story points (cannon/bios/pillar) that only exist on the real arena map.
|
||||
# stub_arena_storypoints (below) fakes them so these are summonable from anywhere.
|
||||
ARENA_STORYPOINTS = %w[CannonCur DualBios CenterPillar]
|
||||
ARENA_SUMMONS = %w[
|
||||
ArenaEastColossus ArenaDeepTerror ArenaSexBeast ArenaFemdom ArenaFailedAdv
|
||||
ArenaHoboDudes1 ArenaHoboDudes2 ArenaHoboDudes3
|
||||
ArenaOrkindBro1 ArenaOrkindBro2 ArenaOrkindBro3
|
||||
ArenaCecilyRBQ ArenaWildApeM1 ArenaWildDog1 ArenaWildDog2 ArenaWildDog3
|
||||
ArenaSwine1 ArenaTeamRBQ1 ArenaTeamRBQ2
|
||||
]
|
||||
|
||||
ARENA_SUMMONS.sort.each_with_index do |event_key, j|
|
||||
MenuFramework::SUBMENU.register_command(
|
||||
group: :SUMMON_ARENA,
|
||||
type: :action,
|
||||
key: event_key,
|
||||
label: -> { event_key },
|
||||
order: (j + 1) * 10,
|
||||
action: -> { FrameworkUtils.summon_and_close(event_key) }
|
||||
)
|
||||
end
|
||||
|
||||
# NPC key -> [base template to spawn, graphic name, graphic index]. These have no event-lib
|
||||
# template of their own, so a safe base template is spawned and reskinned into them instead.
|
||||
REKSIN_SUMMONS = {
|
||||
"MobHumanRaperM" => ["NeutralHumanCommonM", "-char-M-REGULAR02", 4],
|
||||
"NeutralHumanPrisonerRaperM" => ["NeutralHumanCommonM", "-char-M-REGULAR04", 4],
|
||||
"NeutralHumanPrisonMinerRaperM" => ["NeutralHumanCommonM", "-char-M-REGULAR01", 5]
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Companion Disband Dialogue Patch
|
||||
#--------------------------------------------------------------------------
|
||||
# Elise/Lisa's talk-scripts don't offer a Disband option like Cecily/GrayRat do. Patches in a
|
||||
# menu entry and its case branch at load time instead of replacing the files.
|
||||
module FrameworkUtils
|
||||
DISBANDABLE_COMPANION_SCRIPTS = ["Data/HCGframes/event/CompElise.rb", "Data/HCGframes/event/CompLisa.rb"]
|
||||
|
||||
DISBAND_MENU_ANCHOR = /(tmpQuestList << \[\$game_text\["commonComp:Companion\/Wait"\][^\r\n]*\r?\n)/
|
||||
DISBAND_MENU_ENTRY = "\ttmpQuestList << [$game_text[\"commonComp:Companion/Disband\"]\t\t\t,\"Disband\"] if get_character(0).instance_variable_get(:@cheat_summoned)\r\n"
|
||||
|
||||
DISBAND_CASE_ANCHOR = /(get_character\(0\)\.follower\[1\]\s*=0\r?\n)(\s*end)/
|
||||
DISBAND_CASE_BLOCK = "\twhen \"Disband\"\r\n" \
|
||||
"\t\tcall_msg(\"common:Lona/Decide_optB\")\r\n" \
|
||||
"\t\tcam_center(0)\r\n" \
|
||||
"\t\tif $game_temp.choice == 1\r\n" \
|
||||
"\t\t\tportrait_hide\r\n" \
|
||||
"\t\t\tchcg_background_color(0,0,0,0,7)\r\n" \
|
||||
"\t\t\t\tportrait_off\r\n" \
|
||||
"\t\t\t\tget_character(0).set_this_companion_disband\r\n" \
|
||||
"\t\t\tchcg_background_color(0,0,0,255,-7)\r\n" \
|
||||
"\t\t\treturn portrait_hide\r\n" \
|
||||
"\t\tend\r\n"
|
||||
|
||||
# Falls back to the untouched script if either anchor line has since changed upstream.
|
||||
def self.patch_companion_disband(script)
|
||||
return script unless script =~ DISBAND_MENU_ANCHOR && script =~ DISBAND_CASE_ANCHOR
|
||||
script = script.sub(DISBAND_MENU_ANCHOR) { "#{$1}#{DISBAND_MENU_ENTRY}" }
|
||||
script.sub(DISBAND_CASE_ANCHOR) { "#{$1}#{DISBAND_CASE_BLOCK}#{$2}" }
|
||||
end
|
||||
end
|
||||
|
||||
class Object
|
||||
alias_method :load_script_cheat_summon_dialogue, :load_script
|
||||
def load_script(path)
|
||||
return load_script_cheat_summon_dialogue(path) unless FrameworkUtils::DISBANDABLE_COMPANION_SCRIPTS.include?(path)
|
||||
use_alternative = FileGetter::COMPRESSED && File.file?(path)
|
||||
real_path = $mod_load_script.fetch(path, path)
|
||||
script = use_alternative ? File.read(real_path) : File.open(real_path, 'rb', &:read)
|
||||
self.instance_eval(FrameworkUtils.patch_companion_disband(script), path)
|
||||
rescue => ex
|
||||
msgbox ex.message + "\n" + ex.backtrace.join("\n")
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Summon Placement
|
||||
#--------------------------------------------------------------------------
|
||||
module FrameworkUtils
|
||||
# Walks from the player until blocked, so summons land in front of them instead of on top.
|
||||
def self.summon_target_tile(max_distance = 8)
|
||||
actor = $game_player
|
||||
x, y = actor.x, actor.y
|
||||
d = actor.direction
|
||||
max_distance.times do
|
||||
break unless actor.passable?(x, y, d)
|
||||
x = $game_map.round_x_with_direction(x, d)
|
||||
y = $game_map.round_y_with_direction(y, d)
|
||||
end
|
||||
[x, y]
|
||||
end
|
||||
|
||||
# Drops straight back to the map on success.
|
||||
def self.summon_and_close(npc_key)
|
||||
SndLib.sound_TeslaHit # plays immediately, before the summon itself finishes
|
||||
tx, ty = summon_target_tile
|
||||
stub = stub_arena_storypoints if ARENA_SUMMONS.include?(npc_key)
|
||||
base_key, graphic_name, graphic_index = REKSIN_SUMMONS[npc_key]
|
||||
event = $game_map.summon_event(base_key || npc_key, tx, ty)
|
||||
stub.delete if stub
|
||||
if event
|
||||
if base_key
|
||||
event.set_npc(npc_key)
|
||||
event.set_graphic(graphic_name, graphic_index)
|
||||
end
|
||||
event.instance_variable_set(:@cheat_summoned, true)
|
||||
event.give_light("cyanTesla")
|
||||
@glowing_npcs << { event: event, revert_at: Graphics.frame_count + GLOW_DURATION }
|
||||
end
|
||||
exit_cheat_menu
|
||||
rescue => e
|
||||
p "Summon error #{npc_key}: #{e.message}"
|
||||
end
|
||||
|
||||
# Pre-seeds record_companion_name_front/_back so both companions' cross-checks pass before either exists.
|
||||
def self.summon_cecily_and_grayrat
|
||||
$game_player.record_companion_name_front = "UniqueGrayRat"
|
||||
$game_player.record_companion_name_back = "UniqueCecily"
|
||||
SndLib.sound_TeslaHit
|
||||
tx, ty = summon_target_tile
|
||||
["UniqueGrayRat", "UniqueCecily"].each do |npc_key|
|
||||
event = $game_map.summon_event(npc_key, tx, ty)
|
||||
next unless event
|
||||
event.instance_variable_set(:@cheat_summoned, true)
|
||||
event.give_light("cyanTesla")
|
||||
@glowing_npcs << { event: event, revert_at: Graphics.frame_count + GLOW_DURATION }
|
||||
end
|
||||
exit_cheat_menu
|
||||
rescue => e
|
||||
p "Summon error UniqueCecily+GrayRat: #{e.message}"
|
||||
end
|
||||
|
||||
# Spawns a throwaway event and points the arena story points at it (deleted right after), instead
|
||||
# of touching real story points. ARENA_MAP_VERDICT caches real-vs-fake once per map.
|
||||
ARENA_MAP_VERDICT = {}
|
||||
|
||||
def self.stub_arena_storypoints
|
||||
map_id = $game_map.map_id
|
||||
points = $game_map.list_storypoints
|
||||
verdict = ARENA_MAP_VERDICT[map_id] ||= (ARENA_STORYPOINTS.all? { |name| points.key?(name) } ? :real : :fake)
|
||||
return nil if verdict == :real
|
||||
|
||||
stub = $game_map.summon_event("NeutralHumanCommonM", $game_player.x, $game_player.y)
|
||||
return nil unless stub
|
||||
stub.instance_variable_set(:@summon_data, {PlayerMatch: true})
|
||||
ARENA_STORYPOINTS.each { |name| points[name] = [0, 0, stub.id] }
|
||||
stub
|
||||
end
|
||||
|
||||
# Pops the scene stack back to Scene_Map when possible, instead of rebuilding it from scratch.
|
||||
def self.exit_cheat_menu
|
||||
10.times do
|
||||
return if SceneManager.scene_is?(Scene_Map)
|
||||
break if SceneManager.scene.nil?
|
||||
SceneManager.return
|
||||
end
|
||||
return if SceneManager.scene_is?(Scene_Map)
|
||||
SceneManager.clear
|
||||
SceneManager.goto(Scene_Map)
|
||||
end
|
||||
|
||||
GLOW_DURATION = 30 # frames, ~0.5s
|
||||
@glowing_npcs = []
|
||||
|
||||
def self.update_charge_effects
|
||||
return if @glowing_npcs.empty?
|
||||
now = Graphics.frame_count
|
||||
due, active = @glowing_npcs.partition { |e| now >= e[:revert_at] }
|
||||
due.each { |e| e[:event].drop_light }
|
||||
@glowing_npcs = active
|
||||
end
|
||||
end
|
||||
|
||||
class CheatFramework
|
||||
alias_method :hotkey_trigger_summon_charge, :hotkey_trigger
|
||||
def hotkey_trigger
|
||||
hotkey_trigger_summon_charge
|
||||
FrameworkUtils.update_charge_effects
|
||||
end
|
||||
end
|
||||
|
||||
# Skips the kill-tally hook for a cheat-summoned NPC, read via @summon_data[:user].
|
||||
class Game_Event
|
||||
alias_method :trace_over_kill_cheat_summon, :traceOverKill
|
||||
def traceOverKill(user, temp_killer, mora=nil, tarState=nil)
|
||||
victim = @summon_data && @summon_data[:user]
|
||||
return if victim && victim.instance_variable_get(:@cheat_summoned)
|
||||
trace_over_kill_cheat_summon(user, temp_killer, mora, tarState)
|
||||
end
|
||||
end
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Dynamic Summon Menu
|
||||
#--------------------------------------------------------------------------
|
||||
module MenuFramework
|
||||
module Summons
|
||||
extend self
|
||||
|
||||
# NPC key -> real event-lib template, for cases where they differ (e.g. followers).
|
||||
MANUAL_SUMMONS = {
|
||||
"UniqueElise" => "CompExtUniqueElise",
|
||||
"UniqueLisa" => "CompExtUniqueLisa",
|
||||
# Alpha-design ogre boss cut from the game, distinct from UniqueOgreWarBoss. Placed in Orc for now.
|
||||
"OgreGayBoss" => "OgreGayBoss"
|
||||
}
|
||||
|
||||
# Abom* traps and GoblinSlave* crash when summoned standalone (no fight target / no master NPC).
|
||||
# UniqueCecily/UniqueGrayRat/HumanBaby are handled elsewhere (combined entry / dropped with Baby).
|
||||
EXCLUDED_SUMMONS = %w[
|
||||
AbomManagerTrap AbomSpiderTrap AbomCreatureGroundSpore
|
||||
AbomCreatureTentacleHide AbomCreatureSpiderHideTrap AbomCreatureCocoon
|
||||
GoblinSlaveWarrior GoblinSlaveSpear GoblinSlaveClub GoblinSlaveBow
|
||||
UniqueCecily UniqueGrayRat HumanBaby
|
||||
]
|
||||
|
||||
# Folders left out of the menu entirely.
|
||||
SKIPPED_FOLDERS = %w[Baby]
|
||||
|
||||
def build_dynamic_summons
|
||||
summonable_keys = []
|
||||
|
||||
$data_npcs.each do |npc|
|
||||
next unless npc
|
||||
summonable_keys << npc[0]
|
||||
end
|
||||
|
||||
entries = []
|
||||
$data_EventLib.each_key do |key|
|
||||
next if EXCLUDED_SUMMONS.include?(key)
|
||||
entries << [key, key] if summonable_keys.include?(key)
|
||||
end
|
||||
MANUAL_SUMMONS.each { |npc_key, event_key| entries << [npc_key, event_key] }
|
||||
REKSIN_SUMMONS.each_key { |npc_key| entries << [npc_key, npc_key] }
|
||||
entries << ["UniqueCecily+GrayRat", :cecily_and_grayrat]
|
||||
|
||||
folder_map = Hash.new { |h, k| h[k] = [] }
|
||||
|
||||
entries.each do |label, event_key|
|
||||
camel = label.split(/(?=[A-Z])/).reject(&:empty?)
|
||||
next if camel.empty?
|
||||
|
||||
# Rename some folders for better grouping
|
||||
folder = {"Swine"=>"Wild","Player"=>"Baby","Deepone"=>"Fishkind","Gang"=>"Human","Ogre"=>"Orc"}.fetch(camel.first, camel.first)
|
||||
|
||||
folder_map[folder] << [label, event_key]
|
||||
end
|
||||
|
||||
SKIPPED_FOLDERS.each { |folder| folder_map.delete(folder) }
|
||||
|
||||
folder_map.keys.sort.each_with_index do |folder, i|
|
||||
dict = :"SUMMON_#{folder.upcase}"
|
||||
|
||||
MenuFramework::SUBMENU.register_command(
|
||||
group: :SUMMON,
|
||||
type: :scene,
|
||||
key: folder,
|
||||
label: -> {folder},
|
||||
name: "CheatMenuSummon_#{folder}",
|
||||
dict: dict,
|
||||
order: (i + 1) * 10
|
||||
)
|
||||
|
||||
# The :cecily_and_grayrat sentinel routes to summon_cecily_and_grayrat instead of a normal
|
||||
# summon, since Cecily and GrayRat each require the other already set as a companion.
|
||||
folder_map[folder].sort_by { |label, _| label }.each_with_index do |(label, event_key), j|
|
||||
MenuFramework::SUBMENU.register_command(
|
||||
group: dict,
|
||||
type: :action,
|
||||
key: label,
|
||||
label: -> {label},
|
||||
order: (j + 1) * 10,
|
||||
action: -> {
|
||||
event_key == :cecily_and_grayrat ? FrameworkUtils.summon_cecily_and_grayrat : FrameworkUtils.summon_and_close(event_key)
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class << DataManager
|
||||
alias_method :cf_summon_load_db, :load_database
|
||||
def load_database
|
||||
cf_summon_load_db
|
||||
MenuFramework::Summons.build_dynamic_summons
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,217 @@
|
||||
#===============================================================================
|
||||
# Teleport Module for Cheat Framework (с change_map_leave_tag_map)
|
||||
#===============================================================================
|
||||
|
||||
FrameworkModule = {
|
||||
name: "Teleportation",
|
||||
key: :teleport,
|
||||
menu: :TELEPORT,
|
||||
order: 25,
|
||||
depends_on: []
|
||||
}
|
||||
|
||||
|
||||
|
||||
MenuFramework::MENU.register_command(
|
||||
type: :scene,
|
||||
key: :teleport_menu,
|
||||
label: "modules/teleport:commands/title",
|
||||
name: "CheatMenuTeleport",
|
||||
dict: :TELEPORT,
|
||||
order: 25
|
||||
)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# категории и локации (без изменений)
|
||||
#-------------------------------------------------------------------------------
|
||||
module CFTeleport
|
||||
OVERMAP_ID = 2
|
||||
CATEGORIES = {
|
||||
settlements: {
|
||||
key: :settlements,
|
||||
label: "modules/teleport:category/settlements",
|
||||
locations: [
|
||||
{ key: :noertown, x: 35, y: 99 },
|
||||
{ key: :doom_stronghold, x: 49, y: 37 },
|
||||
{ key: :aris_village, x: 71, y: 94 },
|
||||
{ key: :pirates_bane, x: 93, y: 85 },
|
||||
{ key: :south_gate_camp, x: 122, y: 54 },
|
||||
{ key: :coastal_fortress, x: 90, y: 24 },
|
||||
{ key: :nine_inch_tribe, x: 65, y: 48 },
|
||||
{ key: :fishtopia_market, x: 117, y: 129 },
|
||||
{ key: :bridge_fort, x: 101, y: 38 }
|
||||
]
|
||||
},
|
||||
noertown_locations: {
|
||||
key: :noertown_locations,
|
||||
label: "modules/teleport:category/noertown_locations",
|
||||
locations: [
|
||||
{ key: :tavern, x: 33, y: 100 },
|
||||
{ key: :coliseum, x: 35, y: 99 },
|
||||
{ key: :east_trade, x: 33, y: 98 },
|
||||
{ key: :sewer, x: 32, y: 96 },
|
||||
{ key: :back_alleys, x: 31, y: 98 },
|
||||
{ key: :bubba_smith, x: 29, y: 99 },
|
||||
{ key: :toy_house, x: 27, y: 98 },
|
||||
{ key: :warehouse_13, x: 25, y: 101 },
|
||||
{ key: :prison, x: 26, y: 95 },
|
||||
{ key: :cemetery, x: 23, y: 95 },
|
||||
{ key: :parade_ground, x: 39, y: 99 },
|
||||
{ key: :elis_clinic, x: 37, y: 98 },
|
||||
{ key: :bank, x: 37, y: 100 },
|
||||
{ key: :market, x: 35, y: 101 },
|
||||
{ key: :port, x: 35, y: 103 },
|
||||
{ key: :gold_ingot, x: 36, y: 95 },
|
||||
{ key: :east_gate, x: 41, y: 99 }
|
||||
]
|
||||
},
|
||||
outposts: {
|
||||
key: :outposts,
|
||||
label: "modules/teleport:category/outposts",
|
||||
locations: [
|
||||
{ key: :east_noertown_outpost, x: 60, y: 95 },
|
||||
{ key: :east_doom_outpost, x: 72, y: 34 },
|
||||
{ key: :north_pirates_outpost, x: 91, y: 69 }
|
||||
]
|
||||
},
|
||||
camps: {
|
||||
key: :camps,
|
||||
label: "modules/teleport:category/camps",
|
||||
locations: [
|
||||
{ key: :refugee_monastery, x: 35, y: 79 },
|
||||
{ key: :refugee_doom, x: 60, y: 41 },
|
||||
{ key: :mercenary_camp, x: 97, y: 29 },
|
||||
{ key: :swamp_camp, x: 108, y: 90 },
|
||||
{ key: :fishfolk_camp, x: 72, y: 84 }
|
||||
]
|
||||
},
|
||||
monster_lairs: {
|
||||
key: :monster_lairs,
|
||||
label: "modules/teleport:category/monster_lairs",
|
||||
locations: [
|
||||
{ key: :orkind_cave1, x: 28, y: 93 },
|
||||
{ key: :orkind_cave2, x: 33, y: 82 },
|
||||
{ key: :orkind_cave3, x: 51, y: 82 },
|
||||
{ key: :orkind_cave4, x: 99, y: 70 },
|
||||
{ key: :orkind_forest, x: 99, y: 76 },
|
||||
{ key: :orkind_hut, x: 53, y: 60 },
|
||||
{ key: :lost_caravan, x: 50, y: 89 },
|
||||
{ key: :fishfolk_cave1, x: 74, y: 82 },
|
||||
{ key: :fishfolk_cave1b2, x: 76, y: 85 },
|
||||
{ key: :fishfolk_cave2, x: 117, y: 80 },
|
||||
{ key: :fishfolk_cave3, x: 124, y: 129 },
|
||||
{ key: :abomination_lair1, x: 79, y: 40 },
|
||||
{ key: :abomination_lair2, x: 95, y: 56 },
|
||||
{ key: :abomination_lair3, x: 123, y: 42 },
|
||||
{ key: :bat_cave, x: 102, y: 42 }
|
||||
]
|
||||
},
|
||||
points_of_interest: {
|
||||
key: :points_of_interest,
|
||||
label: "modules/teleport:category/points_of_interest",
|
||||
locations: [
|
||||
{ key: :saints_monastery, x: 33, y: 78 },
|
||||
{ key: :mountain_monastery, x: 55, y: 67 },
|
||||
{ key: :cloud_village, x: 49, y: 72 },
|
||||
{ key: :bandit_shelter, x: 26, y: 69 },
|
||||
{ key: :noertown_mine, x: 53, y: 94 },
|
||||
{ key: :berserk_tomb, x: 69, y: 74 },
|
||||
{ key: :abandoned_copper_mine, x: 48, y: 67 },
|
||||
{ key: :woodson_manor, x: 51, y: 50 },
|
||||
{ key: :doom_armory, x: 54, y: 40 },
|
||||
{ key: :south_granary, x: 91, y: 30 },
|
||||
{ key: :perranwey_village, x: 101, y: 28 },
|
||||
{ key: :fallen_fortress, x: 101, y: 38 },
|
||||
{ key: :looted_caravan, x: 122, y: 74 },
|
||||
{ key: :abandoned_copper_town, x: 109, y: 69 },
|
||||
{ key: :mass_grave, x: 98, y: 85 },
|
||||
{ key: :good_island, x: 70, y: 137 },
|
||||
{ key: :waterway, x: 127, y: 124 },
|
||||
{ key: :remains_shore, x: 113, y: 127 },
|
||||
{ key: :thorn_temple, x: 117, y: 126 },
|
||||
{ key: :krusty_krab_pot, x: 120, y: 127 }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@pending = nil
|
||||
@transfer_started = false
|
||||
|
||||
def self.request(x, y)
|
||||
return false unless FrameworkUtils.ingame? && FrameworkUtils.cheats_allowed?
|
||||
@pending = [x.to_i, y.to_i]
|
||||
@transfer_started = false
|
||||
# Exit the entire CheatFramework scene stack. One SceneManager.return only
|
||||
# closes the location list and does not run Scene_Map#update yet.
|
||||
SceneManager.goto(Scene_Map)
|
||||
true
|
||||
end
|
||||
|
||||
def self.update
|
||||
return unless @pending
|
||||
# Do not finish a queued teleport if OWNER privileges disappeared.
|
||||
unless FrameworkUtils.cheats_allowed?
|
||||
@pending = nil
|
||||
@transfer_started = false
|
||||
return
|
||||
end
|
||||
|
||||
x, y = @pending
|
||||
if $game_map.map_id.to_i == OVERMAP_ID
|
||||
@pending = nil
|
||||
@transfer_started = false
|
||||
$game_player.moveto(x, y)
|
||||
elsif !@transfer_started
|
||||
@transfer_started = true
|
||||
# A direct transfer avoids triggering story events at the exit or
|
||||
# running change_map_leave_tag_map (which clears all carried gold).
|
||||
$game_player.reserve_transfer(OVERMAP_ID, x, y, $game_player.direction)
|
||||
end
|
||||
rescue => e
|
||||
@pending = nil
|
||||
@transfer_started = false
|
||||
p("[CheatFramework Teleport] " + e.to_s)
|
||||
end
|
||||
end
|
||||
|
||||
# Teleport appears *inside* the CheatFramework main menu, not in LonaRPG's / overlay.
|
||||
CFTeleport::CATEGORIES.each do |cat_sym, cat_data|
|
||||
MenuFramework::SUBMENU.register_command(
|
||||
group: :TELEPORT,
|
||||
type: :scene,
|
||||
key: cat_data[:key],
|
||||
label: cat_data[:label],
|
||||
name: "CheatMenuTeleport_#{cat_data[:key].to_s.capitalize}",
|
||||
dict: cat_data[:key].to_s.upcase.to_sym,
|
||||
order: 0
|
||||
)
|
||||
|
||||
cat_data[:locations].each do |loc|
|
||||
MenuFramework::SUBMENU.register_command(
|
||||
group: cat_data[:key].to_s.upcase.to_sym,
|
||||
type: :action,
|
||||
key: loc[:key],
|
||||
label: "modules/teleport:location/#{loc[:key]}",
|
||||
help1: "modules/teleport:help/#{loc[:key]}",
|
||||
help4: "menu:command_help/execute",
|
||||
action: -> {
|
||||
if CFTeleport.request(loc[:x], loc[:y])
|
||||
SndLib.sys_ok if defined?(SndLib)
|
||||
else
|
||||
SndLib.sys_buzzer if defined?(SndLib)
|
||||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
# Process queued transfer once the cheat menu has closed.
|
||||
class Scene_Map
|
||||
unless method_defined?(:cf_teleport_base_update)
|
||||
alias_method :cf_teleport_base_update, :update
|
||||
def update
|
||||
cf_teleport_base_update
|
||||
CFTeleport.update
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,49 @@
|
||||
FrameworkModule = {
|
||||
name: "Unlock Gallery",
|
||||
key: :unlock_gallery,
|
||||
menu: :TOGGLES,
|
||||
order: 90
|
||||
}
|
||||
|
||||
MenuFramework::SUBMENU.register_command(
|
||||
type: :toggle,
|
||||
key: "Unlock Gallery",
|
||||
label: "modules/others:commands/gallery",
|
||||
state: "$cheat_unlock_gallery",
|
||||
gdef: false,
|
||||
order: 90
|
||||
)
|
||||
|
||||
# Bypasses the gallery achievement check by rewriting the recollection room's
|
||||
# own event conditions, so it keeps working even if new events are added.
|
||||
class Game_Map
|
||||
alias setup_event_hack_UnlockGallery setup_event_hack
|
||||
def setup_event_hack
|
||||
setup_event_hack_UnlockGallery
|
||||
return unless $cheat_unlock_gallery
|
||||
|
||||
if @name == "NoerRecRoom" #Map075
|
||||
override_matching(/^if DataManager.get_rec_constant/,"if true")
|
||||
override_matching(/^if DataManager.get_constant/,"if true")
|
||||
end
|
||||
end
|
||||
|
||||
# Replaces matching script-command conditions across every event on the map.
|
||||
def override_matching(condition_str, replacement_str, page_index = 0)
|
||||
@map.events.each_value do |event|
|
||||
next unless event && event.pages
|
||||
page = event.pages[page_index]
|
||||
next unless page && page.list.is_a?(Array)
|
||||
|
||||
page.list.each_with_index do |command, idx|
|
||||
next unless command && [355, 655].include?(command.code)
|
||||
next unless command.parameters.any? do |p|
|
||||
p.is_a?(String) && (
|
||||
condition_str.is_a?(Regexp) ? (p =~ condition_str) : p.include?(condition_str)
|
||||
)
|
||||
end
|
||||
page.list[idx] = RPG::EventCommand.new(355, 0, [replacement_str])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user