Release 0.0.1.8.8.7

This commit is contained in:
WorldBosse committed 2026-10-29 21:59:06 +04:00
1 parent 3c8a17aa78
commit c7beab414c
16283 files changed
+768761 -2

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
# encoding: UTF-8
# LSEC1 diagnostics disabled. Compatibility shim for old instrumented installations.
module MPClientDebug
class << self
def log(*args); false; end
def exception(*args); false; end
def preview(data, limit = 180); data.to_s.byteslice(0, limit.to_i).to_s; end
def payload_summary(data); data.to_s.byteslice(0, 180).to_s; end
def caller_summary(*args); ''; end
end
end
+53
View File
@@ -0,0 +1,53 @@
# encoding: UTF-8
#==============================================================================
# ModScripts compatibility bootstrap.
# Uses the canonical Ruby 3 / mkxp-z compat layer from Data/Scripts.
#==============================================================================
module ModRubyCompatBootstrap
def self.candidates
list = []
begin
cwd = Dir.pwd.to_s
unless cwd.nil? || cwd.empty?
list << File.expand_path('Data/Scripts/000_Ruby310_Compat.rb', cwd)
list << File.expand_path('000_Ruby310_Compat.rb', cwd)
end
rescue StandardError
end
begin
script_dir = File.dirname(__FILE__)
unless script_dir.nil? || script_dir.empty?
root = File.expand_path('..', script_dir)
list << File.expand_path('Data/Scripts/000_Ruby310_Compat.rb', root)
end
rescue StandardError
end
seen = {}
list.compact.map { |entry| entry.to_s }.reject(&:empty?).select { |entry| seen[entry] ? false : (seen[entry] = true) }
end
def self.load_core!
return true if defined?(Ruby310Compat)
candidates.each do |path|
next unless File.file?(path)
load path
return true if defined?(Ruby310Compat)
end
false
rescue StandardError
false
end
end
ModRubyCompatBootstrap.load_core!
unless defined?(Ruby310Compat)
raise LoadError, 'Ruby310Compat core is unavailable (expected Data/Scripts/000_Ruby310_Compat.rb)'
end
Ruby310Compat.json_ready? rescue nil
File diff suppressed because it is too large. Load diff
+35
View File
@@ -0,0 +1,35 @@
# encoding: UTF-8
# Removes the vanilla level 99 cap by overriding Game_Actor#max_level.
# Keep it finite for compatibility with old UI/stat scripts.
if defined?(Game_Actor)
class Game_Actor
MP_LEVEL_CAP = 999 unless const_defined?(:MP_LEVEL_CAP)
if method_defined?(:max_level) && !method_defined?(:mp_level_cap_orig_max_level)
alias mp_level_cap_orig_max_level max_level
end
def max_level
base = 99
begin
base = mp_level_cap_orig_max_level.to_i
rescue
base = 99
end
cap = 999
begin
cap = MP_LEVEL_CAP.to_i
rescue
cap = 999
end
base = 1 if base <= 0
cap = 999 if cap <= 99
[base, cap].max
rescue
999
end
end
end
+187
View File
@@ -0,0 +1,187 @@
# encoding: UTF-8
# Replace player speaker label ("Lona"/"\\u041b\\u043e\\u043d\\u0430") with nickname in dialogs.
module MPDialogNickname
STATIC_LABELS = ["Lona", "\u041b\u043e\u043d\u0430"]
def self.sanitize(text)
text.to_s.gsub(/\uFEFF/, "").gsub(/\0/, "").gsub(/[\r\n\t]/, " ").strip
end
def self.player_nickname
nick = ""
if defined?(WebSocket) && WebSocket.respond_to?(:local_nickname)
begin
nick = WebSocket.local_nickname.to_s
rescue StandardError
nick = ""
end
end
if nick.strip.empty? && defined?(NicknameInput) && NicknameInput.respond_to?(:nickname)
begin
nick = NicknameInput.nickname.to_s
rescue StandardError
nick = ""
end
end
if nick.strip.empty? && defined?($game_player) && $game_player && $game_player.respond_to?(:actor)
begin
nick = $game_player.actor.name.to_s
rescue StandardError
nick = ""
end
end
sanitize(nick)
end
def self.player_labels
labels = STATIC_LABELS.dup
begin
if defined?($game_text) && $game_text
labels << $game_text["menu:main_stats/name"].to_s
end
rescue StandardError
end
begin
if defined?($game_player) && $game_player && $game_player.respond_to?(:actor)
labels << $game_player.actor.name.to_s
end
rescue StandardError
end
labels.map { |x| sanitize(x) }.reject { |x| x.empty? }.uniq
end
def self.player_label?(text)
target = sanitize(text)
return false if target.empty?
player_labels.any? { |label| target.casecmp(label).zero? }
end
def self.replace_label(text)
original = text.to_s
return original if original.empty?
return original unless player_label?(original)
nick = player_nickname
nick.empty? ? original : nick
rescue StandardError
text.to_s
end
# Some text files use "Name: line" converted to "Name\\nline".
def self.replace_leading_name_line(text)
out = text.to_s
return out if out.empty?
nick = player_nickname
return out if nick.empty?
player_labels.each do |label|
next if label.empty?
esc = Regexp.escape(label)
out = out.gsub(/\A[ \t]*#{esc}[ \t]*\n/u, "#{nick}\n")
out = out.gsub(/\f[ \t]*#{esc}[ \t]*\n/u, "\f#{nick}\n")
end
out
rescue StandardError
text.to_s
end
# Replace the first token on each line/page if it is player label,
# preserving leading escape formatting tags.
def self.replace_line_start_label_token(text)
out = text.to_s
return out if out.empty?
nick = player_nickname
return out if nick.empty?
out.gsub(/(^|[\n\f])((?:\e[A-Za-z]+(?:\[[^\]]*\])?)*)[ \t]*([^\s::]+)(?=(?:[ \t]|[::]|$))/u) do
line_sep = Regexp.last_match(1)
prefix = Regexp.last_match(2)
token = Regexp.last_match(3)
player_label?(token) ? "#{line_sep}#{prefix}#{nick}" : Regexp.last_match(0)
end
rescue StandardError
text.to_s
end
end
if defined?(Window_NameMessage)
class Window_NameMessage < Window_Base
unless method_defined?(:mp_dialog_nick_start_without_patch)
alias mp_dialog_nick_start_without_patch start
end
def start(text, x_position)
mp_dialog_nick_start_without_patch(MPDialogNickname.replace_label(text), x_position)
end
end
end
if defined?(Window_Message)
class Window_Message < Window_Base
if method_defined?(:namewindow) && !method_defined?(:mp_dialog_nick_namewindow_without_patch)
alias mp_dialog_nick_namewindow_without_patch namewindow
def namewindow(text, position)
mp_dialog_nick_namewindow_without_patch(MPDialogNickname.replace_label(text), position)
end
end
if method_defined?(:draw_board_title) && !method_defined?(:mp_dialog_nick_draw_board_title_without_patch)
alias mp_dialog_nick_draw_board_title_without_patch draw_board_title
def draw_board_title(title_text, pos)
mp_dialog_nick_draw_board_title_without_patch(MPDialogNickname.replace_label(title_text), pos)
end
end
if method_defined?(:convert_escape_characters) && !method_defined?(:mp_dialog_nick_convert_escape_without_patch)
alias mp_dialog_nick_convert_escape_without_patch convert_escape_characters
def convert_escape_characters(text)
converted = mp_dialog_nick_convert_escape_without_patch(text)
converted = MPDialogNickname.replace_leading_name_line(converted)
MPDialogNickname.replace_line_start_label_token(converted)
end
end
end
end
if defined?(Window_Base)
class Window_Base < Window
if method_defined?(:actor_name) && !method_defined?(:mp_dialog_nick_actor_name_without_patch)
alias mp_dialog_nick_actor_name_without_patch actor_name
def actor_name(n)
name = mp_dialog_nick_actor_name_without_patch(n)
begin
actor = (n >= 1 ? $game_actors[n] : nil)
if defined?($game_player) && $game_player && actor && actor == $game_player.actor
nick = MPDialogNickname.player_nickname
return nick unless nick.empty?
end
rescue StandardError
end
MPDialogNickname.replace_label(name)
end
end
if method_defined?(:party_member_name) && !method_defined?(:mp_dialog_nick_party_member_name_without_patch)
alias mp_dialog_nick_party_member_name_without_patch party_member_name
def party_member_name(n)
name = mp_dialog_nick_party_member_name_without_patch(n)
begin
actor = (n >= 1 ? $game_party.members[n - 1] : nil)
if defined?($game_player) && $game_player && actor && actor == $game_player.actor
nick = MPDialogNickname.player_nickname
return nick unless nick.empty?
end
rescue StandardError
end
MPDialogNickname.replace_label(name)
end
end
end
end
@@ -0,0 +1,97 @@
# encoding: UTF-8
#==============================================================================
# Dialog_Control_System NIL guard
#------------------------------------------------------------------------------
# Fixes a crash in Dialog_Control_System#process_escape_character when a dialog
# escape command tries to use a map/event/portrait object that is already nil.
# The most common case in this mod pack is a portrait/camera escape from
# NoerHome text being processed while its target event is missing after a map
# transition/load race.
#==============================================================================
module MPDialogControlNilGuard
LOG_FILE = "dialog_escape_nil_guard.log"
def self.safe_dialog_nil_error?(error)
return false unless error.is_a?(NoMethodError)
msg = error.message.to_s
return false unless msg.include?("for nil:NilClass")
return false unless msg.include?("`id'") || msg.include?("`stat'")
bt = error.backtrace || []
bt.any? do |line|
s = line.to_s
s.include?("121_Dialog_Control_System.rb") ||
s.include?("09_Lona_Portrait.rb") ||
s.include?("Modules/Mood.rb")
end
rescue
false
end
def self.log_skip(error, owner, args)
File.open(LOG_FILE, "ab") do |f|
f.write("=== #{Time.now} ===\r\n")
f.write("#{error.class}: #{error.message}\r\n")
begin
f.write("window=#{owner.class}\r\n")
rescue
end
begin
f.write("escape_code=#{args[0].inspect}\r\n")
rescue
end
begin
f.write("map_id=#{$game_map.map_id}\r\n") if defined?($game_map) && $game_map
rescue
end
begin
f.write("player_xy=#{$game_player.x},#{$game_player.y}\r\n") if defined?($game_player) && $game_player
rescue
end
begin
(error.backtrace || []).first(12).each { |line| f.write("#{line}\r\n") }
rescue
end
f.write("\r\n")
end
rescue
end
end
if defined?(Window_Message)
class Window_Message < Window_Base
if method_defined?(:process_escape_character) && !method_defined?(:mp_dialog_nil_guard_process_escape_character__orig)
alias mp_dialog_nil_guard_process_escape_character__orig process_escape_character
def process_escape_character(*args)
mp_dialog_nil_guard_process_escape_character__orig(*args)
rescue NoMethodError => e
if defined?(MPDialogControlNilGuard) && MPDialogControlNilGuard.safe_dialog_nil_error?(e)
MPDialogControlNilGuard.log_skip(e, self, args)
return nil
end
raise
end
end
end
end
if defined?(Window_Base)
class Window_Base < Window
if method_defined?(:process_escape_character) && !method_defined?(:mp_dialog_nil_guard_base_process_escape_character__orig)
alias mp_dialog_nil_guard_base_process_escape_character__orig process_escape_character
def process_escape_character(*args)
mp_dialog_nil_guard_base_process_escape_character__orig(*args)
rescue NoMethodError => e
if defined?(MPDialogControlNilGuard) && MPDialogControlNilGuard.safe_dialog_nil_error?(e)
MPDialogControlNilGuard.log_skip(e, self, args)
return nil
end
raise
end
end
end
end
+102
View File
@@ -0,0 +1,102 @@
# encoding: UTF-8
return unless defined?(MPStateInfra)
if defined?(WebSocket)
module WebSocket
class << self
if method_defined?(:mp_rt_sync) && !method_defined?(:mp_state_guard_mp_rt_sync_without_guard)
alias mp_state_guard_mp_rt_sync_without_guard mp_rt_sync
def mp_rt_sync(reason="event", hard=false, sync_map=false, sync_pos=false)
MPStateInfra.note_local_change(reason) if defined?(MPStateInfra)
return false if defined?(MPStateInfra) && !MPStateInfra.live_sync_allowed?(reason)
mp_state_guard_mp_rt_sync_without_guard(reason, hard, sync_map, sync_pos)
rescue
false
end
end
if method_defined?(:mp_rt_send_live_state_immediate) && !method_defined?(:mp_state_guard_rt_send_live_without_guard)
alias mp_state_guard_rt_send_live_without_guard mp_rt_send_live_state_immediate
def mp_rt_send_live_state_immediate
return false if defined?(MPStateInfra) && !MPStateInfra.live_sync_allowed?("rt_immediate")
mp_state_guard_rt_send_live_without_guard
rescue
false
end
end
if method_defined?(:mp_rt_send_current_pos) && !method_defined?(:mp_state_guard_rt_send_pos_without_guard)
alias mp_state_guard_rt_send_pos_without_guard mp_rt_send_current_pos
def mp_rt_send_current_pos
return false if defined?(MPStateInfra) && MPStateInfra.suppress_sync?
mp_state_guard_rt_send_pos_without_guard
rescue
false
end
end
if method_defined?(:live_sync_flush_final) && !method_defined?(:mp_state_guard_flush_final_without_guard)
alias mp_state_guard_flush_final_without_guard live_sync_flush_final
def live_sync_flush_final(reason=nil)
return false if defined?(MPStateInfra) && MPStateInfra.suppress_sync?
mp_state_guard_flush_final_without_guard(reason)
rescue
false
end
end
end
end
end
if defined?(Scene_OnlineAutoLoad)
class Scene_OnlineAutoLoad
unless method_defined?(:mp_state_guard_load_first_slot_without_restore)
alias mp_state_guard_load_first_slot_without_restore load_first_slot
end
def load_first_slot
return true if mp_state_guard_load_first_slot_without_restore
return false unless defined?(WebSocket) && WebSocket.respond_to?(:bootstrap_peek_state)
return false unless defined?(DataManager) && DataManager.respond_to?(:setup_new_game)
state = WebSocket.bootstrap_peek_state rescue nil
return false unless defined?(MPStateInfra) && MPStateInfra.bootstrap_valid_for_blank_restore?(state)
MPStateInfra.log_line("blank_restore", "creating local base save for server bootstrap")
MPStateInfra.with_sync_suppressed("blank_restore_base") do
DataManager.setup_new_game
end
true
rescue => e
MPStateInfra.log_line("blank_restore_failed", "#{e.class}: #{e.message}") rescue nil
false
end
end
end
if defined?(DataManager)
module DataManager
class << self
unless method_defined?(:mp_state_guard_setup_new_game_without_identity)
alias mp_state_guard_setup_new_game_without_identity setup_new_game
end
def setup_new_game(*args, &block)
result = mp_state_guard_setup_new_game_without_identity(*args, &block)
MPStateInfra.ensure_character_uuid if defined?(MPStateInfra)
result
end
if method_defined?(:save_game) && !method_defined?(:mp_state_guard_save_game_without_audit)
alias mp_state_guard_save_game_without_audit save_game
def save_game(index)
MPStateInfra.ensure_character_uuid if defined?(MPStateInfra)
mp_state_guard_save_game_without_audit(index)
end
end
end
end
end
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+337
View File
@@ -0,0 +1,337 @@
# encoding: UTF-8
# CheatFramework can grant $cheat_variables_traits_per_level (up to 20) on
# level_up. Multiplayer always grants +1, then one-shot respecs inflated
# characters so spent traits + gift skills + free points == level - 1.
module MPTraitPointFix
FLAG = "MPTraitBudgetFixV1"
STATS_FLAG = "mp_trait_budget_fix_v1"
BASIC_TRAITS = %w[combat scoutcraft wisdom survival constitution]
POINTS_PER_LEVEL = 1
CHEAT_INI = File.join("ModScripts", "_Mods", "CheatFramework", "config", "globals.ini")
module LevelUpClamp
def level_up
MPTraitPointFix.force_cheat_traits_per_level
before = 0
begin
before = trait_point.to_i
rescue
before = instance_variable_get(:@trait_point).to_i
end
result = super
begin
self.trait_point = before + MPTraitPointFix::POINTS_PER_LEVEL
rescue
instance_variable_set(:@trait_point, before + MPTraitPointFix::POINTS_PER_LEVEL)
end
result
end
end
def self.force_cheat_traits_per_level
$cheat_variables_traits_per_level = POINTS_PER_LEVEL
rescue
end
def self.patch_cheat_ini
return unless File.exist?(CHEAT_INI)
text = File.read(CHEAT_INI)
updated = text.gsub(/^(Traits Per Level\s*=\s*)\d+/i, "\\1#{POINTS_PER_LEVEL}")
File.open(CHEAT_INI, "w") { |io| io.write(updated) } if updated != text
rescue
end
def self.persist_story_key
return unless defined?(MPStateInfra) && MPStateInfra.const_defined?(:PERSISTENT_STORY_KEYS)
keys = MPStateInfra::PERSISTENT_STORY_KEYS
return unless keys.is_a?(Array)
keys << FLAG unless keys.include?(FLAG)
rescue
end
def self.story
return MPStateInfra.ensure_story if defined?(MPStateInfra) && MPStateInfra.respond_to?(:ensure_story)
$story_stats if defined?($story_stats)
rescue
$story_stats if defined?($story_stats)
end
def self.flag_set?
s = story
s && s.respond_to?(:[]) && s[FLAG].to_i > 0
rescue
false
end
def self.mark_applied
s = story
s[FLAG] = 1 if s && s.respond_to?(:[]=)
rescue
end
def self.player_actor
return $game_player.actor if $game_player && $game_player.respond_to?(:actor)
nil
rescue
nil
end
def self.gift_trait_names
return [] unless defined?(System_Settings::TRAIT::LIST)
blank = System_Settings::TRAIT::BLANK_ID
System_Settings::TRAIT::LIST.flatten.reject { |t| t.nil? || t == blank || t == "tmp" || t == "" }.uniq
rescue
[]
end
def self.stat_value(actor, name)
return 0 if actor.nil? || name.nil?
begin
return actor.stat[name].to_i if actor.respond_to?(:stat) && actor.stat
rescue
end
0
end
def self.basic_spent(actor)
BASIC_TRAITS.inject(0) do |sum, name|
value = 0
begin
value = actor.send("#{name}_trait").to_i if actor.respond_to?("#{name}_trait")
rescue
value = 0
end
sum + value
end
rescue
0
end
def self.gift_spent(actor)
gift_trait_names.inject(0) { |sum, name| sum + [stat_value(actor, name), 0].max }
rescue
0
end
def self.free_points(actor)
return actor.trait_point.to_i if actor.respond_to?(:trait_point)
actor.instance_variable_get(:@trait_point).to_i
rescue
0
end
def self.allowed_budget(actor)
level = 1
begin
level = actor.level.to_i if actor.respond_to?(:level)
rescue
level = 1
end
[level - 1, 0].max
end
def self.current_budget(actor)
basic_spent(actor) + gift_spent(actor) + free_points(actor)
end
def self.reset_gift_traits(actor)
gift_trait_names.each do |name|
20.times do
break if stat_value(actor, name) == 0
if actor.respond_to?(:remove_state_stack)
actor.remove_state_stack(name)
elsif actor.respond_to?(:remove_state)
actor.remove_state(name)
else
break
end
end
end
rescue
end
def self.reset_basic_traits(actor)
BASIC_TRAITS.each do |name|
setter = "#{name}_trait="
actor.send(setter, 0) if actor.respond_to?(setter)
end
rescue
end
def self.respec!(actor)
reset_gift_traits(actor)
reset_basic_traits(actor)
budget = allowed_budget(actor)
begin
if actor.respond_to?(:trait_point=)
actor.trait_point = budget
else
actor.instance_variable_set(:@trait_point, budget)
end
rescue
end
actor.recalculate_stats if actor.respond_to?(:recalculate_stats)
begin
actor.instance_variable_set(:@stat_changed, true)
actor.skill_changed = true if actor.respond_to?(:skill_changed=)
rescue
end
true
rescue
false
end
def self.restore_flag_from_state(state)
return if flag_set?
return unless state.is_a?(Hash)
stats = state["stats_json"]
if !stats.is_a?(Hash) && defined?(WebSocket) && WebSocket.respond_to?(:bootstrap_decode_json_blob)
stats = WebSocket.bootstrap_decode_json_blob(state["stats_blob"])
end
mark_applied if stats.is_a?(Hash) && stats[STATS_FLAG].to_i > 0
player = state["player_json"]
if !player.is_a?(Hash) && defined?(WebSocket) && WebSocket.respond_to?(:bootstrap_decode_json_blob)
player = WebSocket.bootstrap_decode_json_blob(state["player_blob"])
end
flags = player.is_a?(Hash) ? player["story_flags"] : nil
mark_applied if flags.is_a?(Hash) && flags[FLAG].to_i > 0
rescue
end
def self.sync_now
return false unless defined?(WebSocket)
return false if WebSocket.respond_to?(:bootstrap_sync_unlocked?) && !WebSocket.bootstrap_sync_unlocked?
return false unless WebSocket.respond_to?(:live_sync_send_now)
WebSocket.live_sync_send_now("cloud_bootstrap_trait_budget_fix", true, false)
rescue
false
end
def self.bootstrap_ready?
return false unless defined?(WebSocket)
begin
return true if WebSocket.instance_variable_get(:@bootstrap_applied)
rescue
end
begin
return true if WebSocket.respond_to?(:bootstrap_sync_unlocked?) && WebSocket.bootstrap_sync_unlocked?
rescue
end
false
rescue
false
end
def self.flush_pending_sync
return false unless @pending_sync
return false unless sync_now
@pending_sync = false
true
rescue
false
end
def self.apply_if_needed(from_bootstrap = false)
force_cheat_traits_per_level
return false unless from_bootstrap || bootstrap_ready?
actor = player_actor
return false if actor.nil?
allowed = allowed_budget(actor)
current = current_budget(actor)
if current != allowed
respec!(actor)
mark_applied
@pending_sync = true
flush_pending_sync
return true
end
mark_applied unless flag_set?
flush_pending_sync
false
rescue => e
begin
MPStateInfra.log_line("trait_budget_fix_error", "#{e.class}: #{e.message}") if defined?(MPStateInfra)
rescue
end
false
end
end
MPTraitPointFix.patch_cheat_ini
MPTraitPointFix.persist_story_key
MPTraitPointFix.force_cheat_traits_per_level
if defined?(Game_Actor)
class Game_Actor
prepend MPTraitPointFix::LevelUpClamp
end
end
if defined?(WebSocket)
module WebSocket
class << self
if method_defined?(:_live_sync_collect_stats) && !method_defined?(:mp_trait_budget_collect_stats_without_flag)
alias mp_trait_budget_collect_stats_without_flag _live_sync_collect_stats
def _live_sync_collect_stats(actor)
out = mp_trait_budget_collect_stats_without_flag(actor)
begin
out[MPTraitPointFix::STATS_FLAG] = 1 if out.is_a?(Hash) && MPTraitPointFix.flag_set?
rescue
end
out
end
end
if method_defined?(:_bootstrap_apply_player_story_flags) && !method_defined?(:mp_trait_budget_story_flags_without_fix)
alias mp_trait_budget_story_flags_without_fix _bootstrap_apply_player_story_flags
def _bootstrap_apply_player_story_flags(player_json)
result = mp_trait_budget_story_flags_without_fix(player_json)
begin
flags = player_json.is_a?(Hash) ? player_json["story_flags"] : nil
MPTraitPointFix.mark_applied if flags.is_a?(Hash) && flags[MPTraitPointFix::FLAG].to_i > 0
rescue
end
result
end
end
if method_defined?(:_bootstrap_apply_stats_json) && !method_defined?(:mp_trait_budget_stats_json_without_fix)
alias mp_trait_budget_stats_json_without_fix _bootstrap_apply_stats_json
def _bootstrap_apply_stats_json(actor, stats_json)
begin
MPTraitPointFix.mark_applied if stats_json.is_a?(Hash) && stats_json[MPTraitPointFix::STATS_FLAG].to_i > 0
rescue
end
mp_trait_budget_stats_json_without_fix(actor, stats_json)
end
end
if method_defined?(:apply_bootstrap_state) && !method_defined?(:mp_trait_budget_apply_bootstrap_without_fix)
alias mp_trait_budget_apply_bootstrap_without_fix apply_bootstrap_state
def apply_bootstrap_state(state)
result = mp_trait_budget_apply_bootstrap_without_fix(state)
begin
MPTraitPointFix.restore_flag_from_state(state)
MPTraitPointFix.apply_if_needed(true)
rescue
end
result
end
end
if method_defined?(:update) && !method_defined?(:mp_trait_budget_update_without_fix)
alias mp_trait_budget_update_without_fix update
def update(*args, &block)
result = mp_trait_budget_update_without_fix(*args, &block)
begin
MPTraitPointFix.apply_if_needed(false)
rescue
end
result
end
end
end
end
end
+836
View File
@@ -0,0 +1,836 @@
# encoding: UTF-8
#==============================================================================
# ** Map_Hud
#==============================================================================
class Map_Hud
SUNRISE_SUNSET = {
1 => { sunrise: 375, sunset: 1070 },
2 => { sunrise: 370, sunset: 1085 },
3 => { sunrise: 360, sunset: 1095 },
4 => { sunrise: 345, sunset: 1100 },
5 => { sunrise: 335, sunset: 1105 },
6 => { sunrise: 330, sunset: 1115 },
7 => { sunrise: 335, sunset: 1120 },
8 => { sunrise: 345, sunset: 1110 },
9 => { sunrise: 350, sunset: 1090 },
10 => { sunrise: 355, sunset: 1070 },
11 => { sunrise: 360, sunset: 1055 },
12 => { sunrise: 370, sunset: 1060 }
}
def initialize
@actor = $game_player.actor
@player = $game_player
@viewport = Viewport.new
@viewport.z = System_Settings::MAP_HUD_Z
setting = [
["Layout", 18, 13],
["Lona_Face", 18, 13],
["MOOD_Meter", 40, 14],
["MOOD_Meter", 40, 14],
["LV_Meter", 19, 35],
["health_Number", 37, 40],
["health_Number", 37, 54],
["health_Number", 37, 68],
#["Sight_Icon", 20, 86],
#["Small_Number", 36, 88],
["Combat_Icon", 20, 99],
#["Small_Number", 36, 101],
["Carrying_Layout", 20, 340],
["Small_Number", 36, 342],
["Resource_Layout", 20, 327],
["Small_Number", 36, 328],
["Drug_Layout", 607, 276],
["Small_Number", 590, 277],
["Semen_Layout", 607, 289],
["Small_Number", 590, 290],
["Defecation_Layout", 607, 302],
["Small_Number", 590, 303],
["Lactation_Layout", 607, 315],
["Small_Number", 590, 316],
["Micturition_Layout", 607, 328],
["Small_Number", 590, 329],
["Arousal_layout", 607, 341],
["Small_Number", 590, 342],
#mod
["Wound_Stats", 607, 13],
["wound_head", 607, 13],
["wound_chest", 607, 13],
["wound_Cuff", 607, 13],
["wound_sarm", 607, 13],
["wound_marm", 607, 13],
["wound_Collar", 607, 13],
["wound_belly", 607, 13],
["wound_groin", 607, 13],
["wound_mthigh", 607, 13],
["wound_sthigh", 607, 13],
#mod
["hotkey_asdf", 120, 333],
["hotkey_qwer", 416, 333],
["battle_sex_ux", 120, 333],
["X_Layout", 88, 340],
["Small_Number", 104, 342],
["Y_Layout", 138, 340],
["Small_Number", 154, 342],
["Time_Layout", 188, 340],
["Small_Number", 204, 342],
#["Encounter_Layout", 450, 340],
#["Small_Number", 433, 342],
#["WildDangerous_Layout",500, 340],
#["Small_Number", 483, 342],
["WorldDifficulty_Layout",550, 340],
["Small_Number", 533, 342]
#["Mail_Layout", 610, 7] mod, useless and removed
]
@list = [ :layout,
:face,
:mood_meter,
:mood_meter_back,
:exp_meter,
:health_number,
:sta_number,
:sat_number,
#:sight_icon,
#:scoutcraft_number, #非戰鬥狀態不顯示
:combat_icon, #若有事野 則1 若為戰鬥 則2 以上皆非 則不顯示(0)
#:move_speed_number, #非戰鬥狀態不顯示
:carrying_layout,
:weight_number,
:resource_layout,
:resource_number,
:drug_layout,
:drug_number,
:semen_layout,
:semen_number,
:defecation_layout,
:defecation_number,
:lactation_layout,
:lactation_number,
:micturition_layout,
:micturition_number,
:arousal_layout,
:arousal_number,
#mod
:wound_layout,
:wound_head,
:wound_chest,
:wound_Cuff,
:wound_sarm,
:wound_marm,
:wound_Collar,
:wound_belly,
:wound_groin,
:wound_mthigh,
:wound_sthigh,
#mod
:hotkey_asdf,
:hotkey_qwer,
:battle_sex_ux,
:x_layout,
:x_number,
:y_layout,
:y_number,
:time_layout,
:time_number,
#:encounter_layout,
#:encounter_number,
#:dangerous_layout,
#:dangerous_number,
:difficulty_layout,
:difficulty_number
#:mail_layout mod, useless and removed
].collect{
|i|
instance_variable_set("@#{i}", Sprite.new(@viewport))
}
@list.each_with_index do |sprite, index|
sprite.bitmap = Bitmap.new("#{System_Settings::MAP_HUD_FOLDER}#{setting[index][0]}")
sprite.x = setting[index][1]
sprite.y = setting[index][2]
end
#mod, wounds initialize
@wound_layout.src_rect = Rect.new(0, 0, 15, 26)
@wound_layout.z = @wound_layout.z-1
@wound_Cuff.z = @wound_Cuff.z+1
@wound_Collar.z = @wound_Collar.z+1
@total_wounds=refresh_wound_total
@wound_head.src_rect = Rect.new(0, [26*(@actor.stat["WoundHead"]-1),52].min, 15, 26)
@wound_chest.src_rect = Rect.new(0, 26*(@actor.stat["WoundChest"]-1), 15, 26)
@wound_Cuff.src_rect = Rect.new(0, 0, 15, 26)
@wound_sarm.src_rect = Rect.new(0, 26*(@actor.stat["WoundSArm"]-1), 15, 26)
@wound_marm.src_rect = Rect.new(0, [26*(@actor.stat["WoundMArm"]-1),52].min, 15, 26)
@wound_Collar.src_rect = Rect.new(0, 0, 15, 26)
@wound_belly.src_rect = Rect.new(0, 26*(@actor.stat["WoundBelly"]-1), 15, 26)
@wound_groin.src_rect = Rect.new(0, 26*(@actor.stat["WoundGroin"]-1), 15, 26)
@wound_mthigh.src_rect = Rect.new(0, 26*(@actor.stat["WoundMThigh"]-1), 15, 26)
@wound_sthigh.src_rect = Rect.new(0, 26*(@actor.stat["WoundSThigh"]-1), 15, 26)
@actor.stat["WoundCuff"] >=1 ? @wound_Cuff.opacity = 255 : @wound_Cuff.opacity = 0
@actor.stat["WoundCollar"] >=1 ? @wound_Collar.opacity = 255 : @wound_Collar.opacity = 0
#rect for face
@face.src_rect.width = @face.bitmap.width/8
@mood_meter.src_rect.width = @mood_meter.bitmap.width/8
@mood_meter.z = 1
@mood_meter_back.src_rect.width = @mood_meter.src_rect.width
# rects for health/sta/sat numbers
@number_bmp = Bitmap.new("#{System_Settings::MAP_HUD_FOLDER}health_Number")
w = @number_bmp.width/10
@number_rect = {}
(0..9).each {|num|
@number_rect[num] = Rect.new(w * num, 0, w, @number_bmp.height / 2)}
# rects for small numbers
@small_number_bmp = Bitmap.new("#{System_Settings::MAP_HUD_FOLDER}Small_Number")
w = @small_number_bmp.width/10
@small_number_rect = {}
(0..9).each {|num|
@small_number_rect[num] = Rect.new(w * num, 0, w, @small_number_bmp.height / 2)}
@dmg_timer = 0
@roster_need_display = false
@roster_rev = 0
@roster_fade_delay = 0
@keyS1sym = InputUtils.getKeyAndTranslate(:S1)
@keyS2sym = InputUtils.getKeyAndTranslate(:S2)
@keyS3sym = InputUtils.getKeyAndTranslate(:S3)
@keyS4sym = InputUtils.getKeyAndTranslate(:S4)
@keyS5sym = InputUtils.getKeyAndTranslate(:S5)
@keyS6sym = InputUtils.getKeyAndTranslate(:S6)
@keyS7sym = InputUtils.getKeyAndTranslate(:S7)
@keyS8sym = InputUtils.getKeyAndTranslate(:S8)
@icon_no_item = 717
@iconDrawRoster = []
refresh
end
def refresh
return unless @viewport.visible
refresh_face
refresh_mood_meter
refresh_exp_meter
refresh_numbers
update_damage_effect
refresh_combat_icon
refresh_wound_layout #mod, refresh def
#refresh_sight_icon
end
def refresh_wound_total
total_wounds = 0
@actor.wound_state_list.each{|state|
total_wounds += @actor.stat[state]
}
total_wounds
end
def refresh_wound_layout
total_wounds = 0
total_wounds += refresh_wound_total
@wound_layout.opacity = 0 if total_wounds == 0
return if @total_wounds == total_wounds
@wound_head.src_rect.y = [26*(@actor.stat["WoundHead"]-1),52].min if @wound_head.src_rect.y!=[26*(@actor.stat["WoundHead"]-1),52].min
@wound_chest.src_rect.y = 26*(@actor.stat["WoundChest"]-1) if @wound_chest.src_rect.y!=26*(@actor.stat["WoundChest"]-1)
@actor.stat["WoundCuff"] >=1 ? @wound_Cuff.opacity = 255 : @wound_Cuff.opacity = 0
@wound_sarm.src_rect.y = 26*(@actor.stat["WoundSArm"]-1) if @wound_sarm.src_rect.y!=26*(@actor.stat["WoundSArm"]-1)
@wound_marm.src_rect.y = [26*(@actor.stat["WoundMArm"]-1),52].min if @wound_marm.src_rect.y!=[26*(@actor.stat["WoundMArm"]-1),52].min
@actor.stat["WoundCollar"] >=1 ? @wound_Collar.opacity = 255 : @wound_Collar.opacity = 0
@wound_belly.src_rect.y = 26*(@actor.stat["WoundBelly"]-1) if @wound_belly.src_rect.y!=26*(@actor.stat["WoundBelly"]-1)
@wound_groin.src_rect.y = 26*(@actor.stat["WoundGroin"]-1) if @wound_groin.src_rect.y!=26*(@actor.stat["WoundGroin"]-1)
@wound_mthigh.src_rect.y = 26*(@actor.stat["WoundMThigh"]-1) if @wound_mthigh.src_rect.y!=26*(@actor.stat["WoundMThigh"]-1)
@wound_sthigh.src_rect.y = 26*(@actor.stat["WoundSThigh"]-1) if @wound_sthigh.src_rect.y!=26*(@actor.stat["WoundSThigh"]-1)
@wound_layout.opacity = 255 if total_wounds > 0
@total_wounds = total_wounds
end
def refresh_numbers
return if @time_number.nil? || @time_number.bitmap.nil? || @time_number.bitmap.disposed?
refresh_health
refresh_sta
refresh_sat
refresh_semen_number
refresh_drug_number
refresh_weight_number
refresh_resource_number
refresh_arousal_number
#refresh_move_speed_number
#refresh_scoutcraft_number
refresh_micturition_number
refresh_lactation_number
refresh_defecation_number
refresh_overmap_x_number
refresh_overmap_y_number
refresh_overmap_time_number
#refresh_overmap_encounter_number
#refresh_overmap_dangerous_number
refresh_overmap_difficulty_number
refresh_hotkey
@actor.skill_changed=false
refresh_battle_sex_ux
refresh_overmap_ui
#refresh_unread_mail mod
end
def refresh_battle_sex_ux
@battle_sex_ux.opacity = (@player.actor.action_state == :sex && @actor.sta >=0) ? 255 : 0
end
def refresh_combat_icon
if $game_map.isOverMap
temp_threat = $game_map.overmap_threatended?
else
temp_threat = $game_map.threat
end
@combat_icon.opacity = temp_threat ? 255 : 0
end
def refresh_face # width = 144 w=18
index = @dmg_timer>0 ? 0 : [(@actor.mood+100).to_i / 25, 3].min
w = @face.bitmap.width/8
tar_x = w * (7 - index)
return if @face.src_rect.x == tar_x
@face.src_rect = Rect.new(w * (3 - index), 0, w, @face.height)
end
def refresh_mood_meter
index = [(@actor.mood).to_i/25, 3].min
w = 3
tar_x = w * (3 - index)
tar_h = ((@actor.mood%25) / 25.0 * @mood_meter.bitmap.height).ceil
tar_h = @mood_meter.bitmap.height if @actor.mood == 100
tar_h = 1 if tar_h == 0 && @actor.mood != 0
return if @mood_meter.src_rect.x == tar_x && @mood_meter.src_rect.height == tar_h
@mood_meter.src_rect = Rect.new(w*(3-index), @mood_meter.bitmap.height-tar_h, w, tar_h)
@mood_meter.y = 37 - @mood_meter.src_rect.height
@mood_meter_back.src_rect.x = @mood_meter.src_rect.x + w * 5
end
def refresh_exp_meter
if @actor.max_level?
@exp_meter.src_rect.width
return
end
exp_now = @actor.exp - @actor.exp_for_level(@actor.level)
exp_need = @actor.exp_for_level(@actor.level + 1) - @actor.exp_for_level(@actor.level)
@exp_meter.src_rect.width = @exp_meter.bitmap.width * exp_now.to_f / exp_need
end
def refresh_health
return if @prev_health == @actor.health
draw_number(@health_number.bitmap, @number_bmp, @actor.health,
@number_rect, @actor.health <= 0)
@prev_health = @actor.health
end
def refresh_sta
return if @prev_sta == @actor.sta
draw_number(@sta_number.bitmap, @number_bmp, @actor.sta,
@number_rect, @actor.sta <= 0)
@prev_sta = @actor.sta
end
def refresh_sat
return if @prev_sat == @actor.sat
draw_number(@sat_number.bitmap, @number_bmp, @actor.sat,
@number_rect, @actor.attr_dimensions["sat"][2] <= 0.25)
@prev_sat = @actor.sat
end
def refresh_move_speed_number
return if @prev_movespeed == @actor.move_speed && @prev_threat == $game_map.threat
draw_number(@move_speed_number.bitmap, @small_number_bmp, 100*@actor.move_speed, @small_number_rect, @actor.move_speed <3)
@move_speed_number.opacity = $game_map.threat ? 255 : 0
@prev_threat = $game_map.threat
@prev_movespeed = @actor.move_speed
end
def refresh_resource_number
return if @prev_resource == $game_party.gold
draw_number(@resource_number.bitmap, @small_number_bmp, $game_party.gold, @small_number_rect)
$game_party.gold <=0 ? opacity = 0 : opacity = 255
@resource_layout.opacity = opacity
@resource_number.opacity = opacity
@prev_resource = $game_party.gold
end
def refresh_weight_number
return if @prev_weight == @actor.hud_weight_count
draw_number(@weight_number.bitmap, @small_number_bmp, @actor.hud_weight_count, @small_number_rect, @actor.weight_carried > (2*@actor.attr_dimensions["sta"][2]))
@prev_weight = @actor.hud_weight_count
end
def refresh_lactation_number
return if @prev_lactation == @actor.lactation_level
draw_number(@lactation_number.bitmap, @small_number_bmp, 100 - (@actor.lactation_level/10), @small_number_rect, @actor.lactation_level >= 900)
@actor.lactation_level <=0 ? opacity = 0 : opacity = 255
@lactation_number.opacity =opacity
@lactation_layout.opacity =opacity
@prev_lactation = @actor.lactation_level
end
def refresh_drug_number
return if @prev_drug == (@actor.will - @actor.drug_addiction_level)
draw_number(@drug_number.bitmap, @small_number_bmp,(@actor.will/10) - (@actor.drug_addiction_level/10), @small_number_rect, @actor.drug_addiction_level >= @actor.will)
@actor.stat["DrugAddiction"] !=0 ? opacity = 255 : opacity = 0
@drug_number.opacity =opacity
@drug_layout.opacity =opacity
@prev_drug = (@actor.will - @actor.drug_addiction_level)
end
def refresh_semen_number
return if @prev_semen == (@actor.will - @actor.semen_addiction_level)
draw_number(@semen_number.bitmap, @small_number_bmp,(@actor.will/10) - (@actor.semen_addiction_level/10), @small_number_rect, @actor.semen_addiction_level >= @actor.will)
@actor.stat["SemenAddiction"] !=0 ? opacity = 255 : opacity = 0
@semen_number.opacity =opacity
@semen_layout.opacity =opacity
@prev_semen = (@actor.will - @actor.semen_addiction_level)
end
def refresh_micturition_number
return if @prev_micturition == (@actor.will - @actor.urinary_level)
draw_number(@micturition_number.bitmap, @small_number_bmp,(@actor.will/10) - (@actor.urinary_level/10), @small_number_rect, @actor.urinary_level >= @actor.will)
@actor.stat["UrethralDamaged"] == 0 ? opacity = 0 : opacity = 255
@micturition_number.opacity =opacity
@micturition_layout.opacity =opacity
@prev_micturition = (@actor.will - @actor.urinary_level)
end
def refresh_defecation_number
return if @prev_defecation == (@actor.will - @actor.defecate_level)
draw_number(@defecation_number.bitmap, @small_number_bmp,(@actor.will/10) - (@actor.defecate_level/10), @small_number_rect, @actor.defecate_level >= @actor.will)
@actor.stat["SphincterDamaged"] == 0 ? opacity = 0 : opacity = 255
@defecation_number.opacity =opacity
@defecation_layout.opacity =opacity
@prev_defecation = (@actor.will - @actor.defecate_level)
end
def refresh_arousal_number
return if @prev_arousal == (@actor.will - @actor.arousal)
draw_number(@arousal_number.bitmap, @small_number_bmp,(@actor.will/10) - (@actor.arousal/10), @small_number_rect, @actor.arousal >= @actor.will)
@prev_arousal = (@actor.will - @actor.arousal)
end
#def refresh_unread_mail
#
#
#
# return @mail_layout.opacity = 0 if $game_system.unread_mails_count ==0
# #return @mail_layout.opacity = 0 if $game_system.unread_mails_count ==0
# #
# #
# #if @mail_layout.opacity >= 255
# # @mail_count = false
# #elsif @mail_layout.opacity <= 120
# # @mail_count = true
# #end
# #
# #if @mail_count == true
# # @mail_layout.opacity += 5
# #elsif @mail_count == false
# # @mail_layout.opacity -= 5
# #end
#
#end
#############################################################################################################################################################
#############################################################################################################################################################
#############################################################################################################################################################
################################################################### OVERMAP ########################################################################
#############################################################################################################################################################
#############################################################################################################################################################
#############################################################################################################################################################
#############################################################################################################################################################
def refresh_overmap_ui
isOverMap = $game_map.isOverMap
@overmap_ui_opacity = isOverMap ? 255 : 0
@hotkey_asdf.visible = !isOverMap
@hotkey_qwer.visible = !isOverMap
return if @overmap_ui_opacity == @prev_overmap_ui_opacity
@x_layout.opacity =@overmap_ui_opacity
@x_number.opacity =@overmap_ui_opacity
@y_layout.opacity =@overmap_ui_opacity
@y_number.opacity =@overmap_ui_opacity
@time_layout.opacity =@overmap_ui_opacity
@time_number.opacity =@overmap_ui_opacity
#@encounter_layout.opacity =@overmap_ui_opacity
#@encounter_number.opacity =@overmap_ui_opacity
#@dangerous_layout.opacity =@overmap_ui_opacity
#@dangerous_number.opacity =@overmap_ui_opacity
@difficulty_layout.opacity =@overmap_ui_opacity
@difficulty_number.opacity =@overmap_ui_opacity
@prev_overmap_ui_opacity = @overmap_ui_opacity
end
def refresh_overmap_x_number
return if !$game_map.isOverMap
return if @prev_overmap_x == @player.x
draw_number(@x_number.bitmap, @small_number_bmp, @player.x,@small_number_rect)
@prev_overmap_x = @player.x
end
def refresh_overmap_y_number
return if !$game_map.isOverMap
return if @prev_overmap_y == @player.y
draw_number(@y_number.bitmap, @small_number_bmp, @player.y, @small_number_rect)
@prev_overmap_y = @player.y
end
def refresh_overmap_time_number
return if !$game_map.isOverMap
return if $story_stats.nil? || $game_date.nil?
if $game_map.napping == true || $game_pause == true
@time_number.visible = false
@time_layout.visible = false
return
end
@time_number.visible = true
@time_layout.visible = true
steps = $story_stats["OverMapEvent_DateCount"].to_f
steps = steps % 100.0
is_day = $game_date.day?
month = $game_date.month.to_i
month = 1 if month < 1 || month > 12
sun_data = SUNRISE_SUNSET[month] || SUNRISE_SUNSET[1]
sunrise_minutes = sun_data[:sunrise]
sunset_minutes = sun_data[:sunset]
day_length_minutes = sunset_minutes - sunrise_minutes
night_length_minutes = 1440 - day_length_minutes
if is_day
total_minutes = (steps / 100.0 * day_length_minutes).to_i
hours = (sunrise_minutes + total_minutes) / 60
minutes = (sunrise_minutes + total_minutes) % 60
hours = hours % 24
else
total_minutes = (steps / 100.0 * night_length_minutes).to_i
hours = (sunset_minutes + total_minutes) / 60
minutes = (sunset_minutes + total_minutes) % 60
if hours >= 24
hours = hours - 24
end
end
time_string = sprintf("%02d:%02d", hours, minutes)
draw_time_with_digits(@time_number.bitmap, time_string, @small_number_rect, steps >= 90.0)
end
def refresh_overmap_encounter_number
return if !$game_map.isOverMap
return if @prev_encounter == $story_stats["StepOvermapDangerous"]
draw_number(@encounter_number.bitmap, @small_number_bmp, $story_stats["StepOvermapDangerous"]/10,@small_number_rect, $story_stats["StepOvermapDangerous"]/10 >= 90)
@prev_encounter = $story_stats["StepOvermapDangerous"]
end
def refresh_overmap_dangerous_number
return if !$game_map.isOverMap
return if @prev_dangerous == $story_stats["WildDangerous"]
draw_number(@dangerous_number.bitmap, @small_number_bmp, $story_stats["WildDangerous"],@small_number_rect,$story_stats["WildDangerous"] >= 90)
@prev_dangerous = $story_stats["WildDangerous"]
end
def refresh_overmap_difficulty_number
return if !$game_map.isOverMap
return if @prev_difficulty == $story_stats["WorldDifficulty"]
draw_number(@difficulty_number.bitmap, @small_number_bmp, $story_stats["WorldDifficulty"],@small_number_rect,$story_stats["WorldDifficulty"] >= 90)
@prev_difficulty = $story_stats["WorldDifficulty"]
end
#############################################################################################################################################################
#############################################################################################################################################################
def draw_number(tar_bmp, src_bmp, number, rects, crisis = false)
tar_bmp.clear
w = rects[0].width
hud_split_digits(number).each_with_index do |char, index|
rect = rects[char].dup
rect.y += rect.height if crisis
tar_bmp.blt(index*w, 0, src_bmp, rect)
end
end
def draw_time_with_digits(tar_bmp, time_string, rects, crisis = false)
tar_bmp.clear
chars = time_string.split('')
char_width = rects[0].width
char_height = rects[0].height
x = 0
chars.each_with_index do |char, i|
if char == ':'
dot_x = (x + char_width / 2 - 1).to_i
dot_y = (char_height / 3).to_i
draw_clock_colon_dot(tar_bmp, dot_x, dot_y)
draw_clock_colon_dot(tar_bmp, dot_x, dot_y + (char_height / 3).to_i)
x += char_width
else
next unless char >= '0' && char <= '9'
num = char.ord - 48
rect = rects[num].dup
rect.y += rect.height if crisis
tar_bmp.blt(x, 0, @small_number_bmp, rect)
x += char_width
end
end
rescue => e
p "Error in draw_time_with_digits: #{e}"
end
# MKXP-Z / Ruby 3.10 safe digit split without external monkey-patches
def hud_split_digits(number)
value = number.to_i
value = value.abs
return [0] if value == 0
value.digits.reverse
rescue
[0]
end
# Colon dots with black outline, visually matching outlined digit font.
def draw_clock_colon_dot(bitmap, x, y)
bitmap.fill_rect(x - 1, y - 1, 4, 4, Color.new(0, 0, 0, 255))
bitmap.fill_rect(x, y, 2, 2, Color.new(255, 255, 255, 255))
rescue
end
def perform_damage_effect
@dmg_timer = 20
$game_map.interpreter.flash_screen(Color.new(125,0,20,25),5,false)
$game_map.interpreter.screen.start_shake(2,3,5)
end
def update_damage_effect
return if @dmg_timer.zero?
d = (5 * @dmg_timer / 20.0).ceil
@face.x = 18 + ((Graphics.frame_count%8>3) ? d : -d)
@dmg_timer -= 1
@face.x = 18 if @dmg_timer.zero?
end
def hide
@viewport.visible = false
#@list.each{|spr|spr.visible=false}
end
def show
return if @viewport.visible
refresh
@viewport.visible = true
end
def hud_opa(tmpOpa=255)
@viewport.opacity = tmpOpa
end
def dispose
@list.each do |spr|
spr.bitmap.dispose
spr.dispose
end
@number_bmp.dispose
@small_number_bmp.dispose
@viewport.dispose
end
def refresh_hotkey
return if @player.actor.action_state==:sex
begin
hotkey_sig = [
(@player.npc_control_mode? ? 1 : 0),
@player.slot_skill_normal,
@player.slot_skill_heavy,
@player.slot_skill_control,
@player.slot_hotkey_0,
@player.slot_hotkey_1,
@player.slot_hotkey_2,
@player.slot_hotkey_3,
@player.slot_hotkey_4
]
rescue
hotkey_sig = nil
end
changed_by_signature = (!hotkey_sig.nil? && @mp_hotkey_sig_last != hotkey_sig)
@mp_hotkey_sig_last = hotkey_sig unless hotkey_sig.nil?
return unless @actor.skill_changed || changed_by_signature
@cachedBitmapASDF = Cache.load_bitmap("Graphics/System/Huds/","hotkey_asdf.png")
@cachedBitmapQWER = Cache.load_bitmap("Graphics/System/Huds/","hotkey_qwer.png")
if @player.npc_control_mode?
tmpSkillList = @actor.master.actor.player_control_mode_skills
draw_master_hotkey_icon(@cachedBitmapASDF,@hotkey_asdf,$data_arpgskills[tmpSkillList[0]],0,@keyS1sym)
draw_master_hotkey_icon(@cachedBitmapASDF,@hotkey_asdf,$data_arpgskills[tmpSkillList[1]],1,@keyS2sym)
draw_master_hotkey_icon(@cachedBitmapASDF,@hotkey_asdf,$data_arpgskills[tmpSkillList[2]],2,@keyS3sym)
draw_master_hotkey_icon(@cachedBitmapASDF,@hotkey_asdf,$data_arpgskills[tmpSkillList[3]],3,@keyS4sym)
draw_master_hotkey_icon(@cachedBitmapQWER,@hotkey_qwer,$data_arpgskills[tmpSkillList[4]],0,@keyS5sym)
draw_master_hotkey_icon(@cachedBitmapQWER,@hotkey_qwer,$data_arpgskills[tmpSkillList[5]],1,@keyS6sym)
draw_master_hotkey_icon(@cachedBitmapQWER,@hotkey_qwer,$data_arpgskills[tmpSkillList[6]],2,@keyS7sym)
draw_master_hotkey_icon(@cachedBitmapQWER,@hotkey_qwer,$data_arpgskills[tmpSkillList[7]],3,@keyS8sym)
else
check_skill_roster
draw_player_hotkey_icon(@cachedBitmapASDF,@hotkey_asdf,real_skill_id(@player.slot_skill_normal) ,0,@keyS1sym)
draw_player_hotkey_icon(@cachedBitmapASDF,@hotkey_asdf,real_skill_id(@player.slot_skill_heavy) ,1,@keyS2sym)
draw_player_hotkey_icon(@cachedBitmapASDF,@hotkey_asdf,real_skill_id(@player.slot_skill_control),2,@keyS3sym)
draw_player_hotkey_icon(@cachedBitmapASDF,@hotkey_asdf,real_skill_id(@player.slot_hotkey_0) ,3,@keyS4sym)
draw_player_hotkey_icon(@cachedBitmapQWER,@hotkey_qwer,real_skill_id(@player.slot_hotkey_1),0,@keyS5sym)
draw_player_hotkey_icon(@cachedBitmapQWER,@hotkey_qwer,real_skill_id(@player.slot_hotkey_2),1,@keyS6sym)
draw_player_hotkey_icon(@cachedBitmapQWER,@hotkey_qwer,real_skill_id(@player.slot_hotkey_3),2,@keyS7sym)
draw_player_hotkey_icon(@cachedBitmapQWER,@hotkey_qwer,real_skill_id(@player.slot_hotkey_4),3,@keyS8sym)
end
end
def real_skill_id(skill_id)
sid = nil
begin
sid = skill_id.to_i
rescue
sid = skill_id
end
return skill_id if ![101,102,103].include?(sid)
begin
return sid if defined?(MPChatAction) && MPChatAction.respond_to?(:chat_slot?) && MPChatAction.chat_slot?(sid)
rescue
end
begin
return sid if defined?(MPVoiceAction) && MPVoiceAction.respond_to?(:voice_slot?) && MPVoiceAction.voice_slot?(sid)
rescue
end
begin
if defined?($data_skills) && $data_skills && $data_skills[sid]
raw_name = $data_skills[sid].item_name.to_s rescue ""
return sid if raw_name == "mp_chat_skill" || raw_name == "mp_voice_skill"
end
rescue
end
skill = @actor.get_system_skill($data_skills[sid])
return skill.nil? ? -1 : skill.id
end
def draw_master_hotkey_icon(original_bitmap,hotkey_sprite,skill_id,sort_index,sym)
icon_index = -1
icon_index = skill_id.icon_index if skill_id.is_a?(SkillData) && skill_id.icon_index
icon_index = 687 if skill_id.is_a?(SkillData) && !skill_id.icon_index
if icon_index.is_a?(String)
return if skill_id.nil?
draw_hotkey_icon_from_string(original_bitmap,hotkey_sprite,icon_index,sort_index,sym)
else
draw_hotkey_icon_from_skill(original_bitmap,hotkey_sprite,icon_index,sort_index,sym)
end
end
def draw_player_hotkey_icon(original_bitmap,hotkey_sprite,skill_id,sort_index,sym)
icon_index = draw_hotkey_icon_get_icon_index(original_bitmap,hotkey_sprite,skill_id,sort_index,sym)
if icon_index.is_a?(String)
return if skill_id.nil?
draw_hotkey_icon_from_string(original_bitmap,hotkey_sprite,icon_index,sort_index,sym)
else
draw_hotkey_icon_from_skill(original_bitmap,hotkey_sprite,icon_index,sort_index,sym)
end
end
def draw_hotkey_icon_get_icon_index(original_bitmap,hotkey_sprite,skill_id,sort_index,sym)
case skill_id
when nil ; icon_index = -1
when 61 ; icon_index = get_ext_skill_icon(extSkillID=0,skill_id=61) #ext1
when 62 ; icon_index = get_ext_skill_icon(extSkillID=1,skill_id=62) #ext2
when 63 ; icon_index = get_ext_skill_icon(extSkillID=2,skill_id=63) #ext3
when 64 ; icon_index = get_ext_skill_icon(extSkillID=3,skill_id=64) #ext4
when 69 ; icon_index = get_ext_skill_icon(extSkillID=4,skill_id=69) #ext5
else
skill_obj = nil
begin
skill_obj = $data_skills[skill_id] if defined?($data_skills) && $data_skills
rescue
skill_obj = nil
end
begin
if !skill_obj.nil? && skill_obj.respond_to?(:icon_index) && skill_obj.icon_index.is_a?(String)
path_icon = skill_obj.icon_index.to_s
return path_icon if path_icon != ""
end
rescue
end
if skill_id == -1 || !@actor.can_set_skill?(skill_obj)
icon_index = @icon_no_item #XX icon
else
icon_index = skill_obj.icon_index
end
end
icon_index
end
def get_ext_skill_icon(extSkillID=0,skill_id)
if @player.actor.ext_items[extSkillID].nil?
icon_index = @icon_no_item
elsif !$game_party.has_item?(@player.actor.ext_items[extSkillID], include_equip = false)
icon_index = $data_ItemName[@player.actor.ext_items[extSkillID]].icon_index
@display_X_icon = true
else
icon_index = $data_ItemName[@player.actor.ext_items[extSkillID]].icon_index
end
icon_index #= @iconDrawRoster[0]
end
def draw_hotkey_icon_from_string(original_bitmap,hotkey_sprite,icon_index,sort_index,sym)
@cachedBitmapICON = Cache.normal_bitmap(icon_index)
icon_src_rect = Rect.new(0, 0, 24, 24)
board_src_rect= Rect.new(sort_index * 27, 0, 24, 32)
hotkey_sprite.bitmap.fill_rect(board_src_rect,Color.new(255,255,255,0))
hotkey_sprite.bitmap.blt(sort_index * 27 , 0 ,@cachedBitmapICON , icon_src_rect)
hotkey_sprite.bitmap.blt(sort_index * 27 , 0 , original_bitmap, board_src_rect) # CAUTION
if @roster_need_display
skillRosterIcon = 641 + @player.slot_RosterCurrent
skillRosterIcon_src_rect = Rect.new(0, 0, 24, 24)
hotkey_sprite.bitmap.blt(sort_index * 27 , 0 ,@cachedBitmapICON , skillRosterIcon_src_rect)
end
if @display_X_icon
iconX_src = Rect.new(@icon_no_item % 16 * 24, @icon_no_item / 16 * 24, 24, 24)
hotkey_sprite.bitmap.blt(sort_index * 27 , 0 ,@cachedBitmapICON , iconX_src)
@display_X_icon = false
end
hotkey_sprite.bitmap.font.size = 14
hotkey_sprite.bitmap.font.color.set(255,255,255,180)
hotkey_sprite.bitmap.draw_text(sort_index * 27, 8,24,30,sym,1)
end
def draw_hotkey_icon_from_skill(original_bitmap,hotkey_sprite,icon_index,sort_index,sym)
@cachedBitmapICON = Cache.system("Iconset")
icon_src_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
board_src_rect= Rect.new(sort_index * 27, 0, 24, 32)
hotkey_sprite.bitmap.fill_rect(board_src_rect,Color.new(255,255,255,0))
hotkey_sprite.bitmap.blt(sort_index * 27 , 0 ,@cachedBitmapICON , icon_src_rect) if icon_index !=-1
hotkey_sprite.bitmap.blt(sort_index * 27 , 0 , original_bitmap, board_src_rect)
if @roster_need_display
skillRosterIcon = 641 + @player.slot_RosterCurrent
skillRosterIcon_src_rect = Rect.new(skillRosterIcon % 16 * 24, skillRosterIcon / 16 * 24, 24, 24)
hotkey_sprite.bitmap.blt(sort_index * 27 , 0 ,@cachedBitmapICON , skillRosterIcon_src_rect)
end
if @display_X_icon
iconX_src = Rect.new(@icon_no_item % 16 * 24, @icon_no_item / 16 * 24, 24, 24)
hotkey_sprite.bitmap.blt(sort_index * 27 , 0 ,@cachedBitmapICON , iconX_src)
@display_X_icon = false
end
return if icon_index == -1
hotkey_sprite.bitmap.font.size = 14
hotkey_sprite.bitmap.font.color.set(255,255,255,180)
hotkey_sprite.bitmap.draw_text(sort_index * 27, 8,24,30,sym,1)
end
def check_skill_roster
if @player.slot_RosterCurrent != @roster_rev
@roster_rev = @player.slot_RosterCurrent
@roster_need_display = true
@roster_fade_delay = 2
elsif @roster_fade_delay > 0
@roster_fade_delay -= 1
elsif @roster_need_display
@roster_need_display = false
end
end
end
File diff suppressed because it is too large. Load diff
+97
View File
@@ -0,0 +1,97 @@
# encoding: utf-8
return unless defined?(NicknameInput)
return unless defined?(Scene_MapTitle)
class Scene_MapTitle < Scene_Map
unless method_defined?(:nicknameinput_post120_start)
alias nicknameinput_post120_start start
end
unless method_defined?(:nicknameinput_post120_update)
alias nicknameinput_post120_update update
end
unless method_defined?(:nicknameinput_post120_terminate)
alias nicknameinput_post120_terminate terminate
end
def start
NicknameInput.reload
NicknameInput.reload_password if NicknameInput.respond_to?(:reload_password)
nicknameinput_post120_start
@nickname_input_active = !!(@nickname_window && !@nickname_window.disposed?)
@password_input_active = !!(@password_window && !@password_window.disposed?)
start_required_title_input unless title_identity_input_active?
end
def start_nickname_input
return if @nickname_input_active
@nickname_input_active = true
@nickname_window.dispose if @nickname_window
@nickname_window = Window_NicknameInput.new
@nickname_window.set_handler(:ok, method(:on_nickname_ok))
@nickname_window.set_handler(:cancel, method(:on_nickname_cancel))
hide_title_menu_for_nickname
rescue => e
prp "NicknameInput hook init failed: #{e}", 1 if defined?(prp)
@nickname_input_active = false
end
def hide_title_menu_for_nickname
return unless @menu
@menu.visible = false if @menu.respond_to?(:visible=)
@menu.opacity = 0 if @menu.respond_to?(:opacity=)
begin
au = @menu.instance_variable_get(:@arrow_up)
ad = @menu.instance_variable_get(:@arrow_down)
au.visible = false if au
ad.visible = false if ad
rescue
end
end
def show_title_menu_after_nickname
return unless @menu
@menu.visible = true if @menu.respond_to?(:visible=)
@menu.opacity = 255 if @menu.respond_to?(:opacity=)
end
def on_nickname_ok(_nick)
@nickname_input_active = false
@nickname_window.dispose if @nickname_window
@nickname_window = nil
if NicknameInput.respond_to?(:password_file_exists?) && !NicknameInput.password_file_exists?
start_password_input
else
show_title_menu_after_nickname
end
end
def on_nickname_cancel
if NicknameInput.nickname_file_exists?
@nickname_input_active = false
@nickname_window.dispose if @nickname_window
@nickname_window = nil
show_title_menu_after_nickname
else
@nickname_window.activate if @nickname_window
end
end
def update
if title_identity_input_active?
super
return
end
nicknameinput_post120_update
end
def terminate
@nickname_window.dispose if @nickname_window
@nickname_window = nil
@password_window.dispose if @password_window
@password_window = nil
nicknameinput_post120_terminate
end
end
+285
View File
@@ -0,0 +1,285 @@
# encoding: UTF-8
module StartMessagePrompt
FILE_PATH = "ModScripts/start_message.json"
LINES = [
"Привет игрок!",
"Если ты жертвовал деньги в разделе донат на сайте то:",
"Пожалуйста напиши мне в ВК свой ник и чек оплаты.",
"Я очень много старался чтобы тебя по скорее отблагодарить.",
"За каждый перечисленый рубль ты получишь 1 день VIP",
"С этого момента если кто-то пожертвует то 1 день VIP будет равен 10 рублям!",
"Бро я очень тебе благодарен за каждую копейку!",
"Мне это очень важно!!!",
"И ОГРОМНОЕ спасибо тебе что ты в меня поверил и помог!",
"МНЕ ЭТО ОЧЕНЬ ВАЖНО"
]
module_function
def ensure_file
return if File.exist?(FILE_PATH)
File.open(FILE_PATH, "wb") do |f|
f.write("{\n \"start_message\": 0\n}\n")
end
rescue
end
def state
ensure_file
txt = Ruby310Compat.read_text_file(FILE_PATH).to_s
m = txt.match(/"start_message"\s*:\s*(-?\d+)/)
return m[1].to_i if m
0
rescue
0
end
def completed?
state == 1
rescue
false
end
def mark_completed
File.open(FILE_PATH, "wb") do |f|
f.write("{\n \"start_message\": 1\n}\n")
end
true
rescue
false
end
def font_name
return NicknameInput.ui_font_name if defined?(NicknameInput) && NicknameInput.respond_to?(:ui_font_name)
Font.default_name rescue "VL Gothic"
end
def prompt_width
[[Graphics.width - 80, 760].min, 360].max
rescue
760
end
def prompt_height
line_h = 22
36 + (LINES.size * line_h) + 48
rescue
260
end
def confirm_pressed?
if defined?(NicknameInput) && NicknameInput.respond_to?(:confirm_pressed?)
return NicknameInput.confirm_pressed?
end
Input.trigger?(:C)
rescue
false
end
def cancel_pressed?
if defined?(NicknameInput) && NicknameInput.respond_to?(:cancel_pressed?)
return NicknameInput.cancel_pressed?
end
Input.trigger?(:B)
rescue
false
end
end
class Window_StartMessagePrompt < Window_Base
def initialize
width = StartMessagePrompt.prompt_width
height = StartMessagePrompt.prompt_height
x = [(Graphics.width - width) / 2, 0].max
y = [(Graphics.height - height) / 2, 0].max
super(x, y, width, height)
self.z = 9999 if respond_to?(:z=)
self.openness = 255 if respond_to?(:openness=)
@ok_handler = nil
@cancel_handler = nil
@last_input_frame = -1
refresh
activate if respond_to?(:activate)
end
def set_handler(sym, method_obj)
@ok_handler = method_obj if sym == :ok
@cancel_handler = method_obj if sym == :cancel
end
def update
super
return unless active
current_frame = Graphics.frame_count rescue nil
if !current_frame.nil?
return if @last_input_frame == current_frame
@last_input_frame = current_frame
end
handle_keys
end
def handle_keys
if StartMessagePrompt.confirm_pressed?
SndLib.sys_ok if defined?(SndLib)
call_ok
elsif StartMessagePrompt.cancel_pressed?
SndLib.sys_buzzer if defined?(SndLib)
call_cancel
end
end
def call_ok
deactivate if respond_to?(:deactivate)
@ok_handler.call if @ok_handler
end
def call_cancel
deactivate if respond_to?(:deactivate)
if @cancel_handler
@cancel_handler.call
else
activate if respond_to?(:activate)
end
end
def refresh
contents.clear
contents.font.name = StartMessagePrompt.font_name
contents.font.size = 16
contents.font.bold = false
contents.font.outline = false if contents.font.respond_to?(:outline=)
contents.font.shadow = false if contents.font.respond_to?(:shadow=)
y = 0
change_color(normal_color)
StartMessagePrompt::LINES.each do |line|
draw_text(0, y, contents_width, 22, line.to_s, 1)
y += 22
end
y += 8
change_color(system_color)
draw_text(0, y, contents_width, 22, "Enter/Z — принять", 1)
change_color(normal_color)
end
end
return unless defined?(Scene_MapTitle)
class Scene_MapTitle < Scene_Map
unless method_defined?(:startmessageprompt_old_title_identity_input_active?)
alias startmessageprompt_old_title_identity_input_active? title_identity_input_active?
end
unless method_defined?(:startmessageprompt_old_start_required_title_input)
alias startmessageprompt_old_start_required_title_input start_required_title_input
end
unless method_defined?(:startmessageprompt_old_update)
alias startmessageprompt_old_update update
end
unless method_defined?(:startmessageprompt_old_terminate)
alias startmessageprompt_old_terminate terminate
end
def start_message_prompt_active?
!!@start_message_prompt_active
rescue
false
end
def title_identity_input_active?
return true if start_message_prompt_active?
startmessageprompt_old_title_identity_input_active?
rescue
false
end
def start_start_message_prompt
return if @start_message_prompt_active
StartMessagePrompt.ensure_file
if @start_message_prompt_window && !@start_message_prompt_window.disposed?
@start_message_prompt_window.dispose
end
@start_message_prompt_window = Window_StartMessagePrompt.new
@start_message_prompt_window.set_handler(:ok, method(:on_start_message_prompt_ok))
@start_message_prompt_window.set_handler(:cancel, method(:on_start_message_prompt_cancel))
@start_message_prompt_active = true
hide_title_menu_for_nickname if respond_to?(:hide_title_menu_for_nickname)
rescue => e
prp "StartMessagePrompt init failed: #{e}", 1 if defined?(prp)
@start_message_prompt_active = false
end
def finish_start_message_prompt
@start_message_prompt_active = false
if @start_message_prompt_window && !@start_message_prompt_window.disposed?
@start_message_prompt_window.dispose
end
@start_message_prompt_window = nil
rescue
@start_message_prompt_active = false
@start_message_prompt_window = nil
end
def on_start_message_prompt_ok
Sound.play_ok rescue nil
StartMessagePrompt.mark_completed
finish_start_message_prompt
start_required_title_input
end
def on_start_message_prompt_cancel
if @start_message_prompt_window && !@start_message_prompt_window.disposed?
@start_message_prompt_window.activate if @start_message_prompt_window.respond_to?(:activate)
end
rescue
end
def start_required_title_input
return if title_identity_input_active?
if !StartMessagePrompt.completed?
start_start_message_prompt
elsif !NicknameInput.nickname_file_exists?
start_nickname_input
elsif !NicknameInput.password_file_exists?
start_password_input
else
show_title_menu_after_nickname
end
end
def update
if @start_message_prompt_active
super
if @start_message_prompt_window && !@start_message_prompt_window.disposed?
@start_message_prompt_window.update
end
return
end
startmessageprompt_old_update
end
def terminate
if @start_message_prompt_window && !@start_message_prompt_window.disposed?
@start_message_prompt_window.dispose
end
@start_message_prompt_window = nil
@start_message_prompt_active = false
startmessageprompt_old_terminate
end
end
StartMessagePrompt.ensure_file
+360
View File
@@ -0,0 +1,360 @@
# encoding: UTF-8
module StartupPortraitFix
START_DELAY_FRAMES = 2
OVERMAP_FAST_DELAY_FRAMES = 8
STEP_DELAY_FRAMES = 1
RETRY_DELAY_FRAMES = 2
MAX_ATTEMPTS = 16
WORKER_POLL_SEC = 0.03
WORKER_TIMEOUT_SEC = 4.0
HAIR_PROBE_BITMAP = "Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_BasicHair.png"
module_function
def hair_palette_ready?
return true unless defined?(BitmapChanger)
return false unless $game_player
actor = nil
begin
actor = $game_player.actor
rescue
actor = nil
end
return false if actor.nil?
hair_color = 0
begin
hair_color = actor.record_HairColor.to_i
rescue
hair_color = 0
end
return true if hair_color <= 0
begin
cache_name = BitmapChanger.find_cache_name(HAIR_PROBE_BITMAP)
return !cache_name.nil? && !cache_name.empty?
rescue
return false
end
end
def player_visuals_ready?
return false unless $game_player
return false unless hair_palette_ready?
actor, portrait = fetch_player_actor_portrait
return false if actor.nil? || portrait.nil?
return true if player_chs_cached?
begin
return !$game_player.instance_variable_get(:@last_chs_visual_signature).nil?
rescue
return true
end
end
def player_chs_cached?
return false unless defined?(Cache) && $game_player
store = Cache.instance_variable_get(:@chs_chars) rescue nil
return false unless store.is_a?(Hash)
key = $game_player.chs_name rescue nil
return false if key.nil? || key.to_s.empty?
!store[key].nil?
rescue
false
end
def warmup_steps
steps = [:prepare]
steps << :chs unless player_chs_cached?
steps << :pose
steps << :force
steps
rescue
[:prepare, :pose, :force]
end
def fetch_player_actor_portrait
actor = nil
portrait = nil
begin
actor = $game_player.actor
portrait = actor.portrait if actor
rescue
actor = nil
portrait = nil
end
[actor, portrait]
rescue
[nil, nil]
end
def prepare_portrait_context(actor, portrait)
begin
actor.refresh_part_key_blacklist if actor.respond_to?(:refresh_part_key_blacklist)
rescue
end
begin
if portrait.respond_to?(:part_key_blacklist=) && actor.respond_to?(:part_key_blacklist)
portrait.part_key_blacklist = actor.part_key_blacklist
end
rescue
end
true
rescue
false
end
def refresh_player_chs_visual
begin
if $game_player.respond_to?(:force_refresh_chs_visual)
$game_player.force_refresh_chs_visual
elsif $game_player.respond_to?(:refresh_chs)
$game_player.refresh_chs
end
return true
rescue
return false
end
end
def update_portrait_pose(portrait)
begin
portrait.updatePose if portrait.respond_to?(:updatePose)
return true
rescue
return false
end
end
def force_portrait_refresh(portrait)
begin
portrait.force_update if portrait.respond_to?(:force_update)
return true
rescue
return false
end
end
def warmup_step(step)
return :retry unless $game_player
return :wait unless hair_palette_ready?
actor, portrait = fetch_player_actor_portrait
return :retry if actor.nil? || portrait.nil?
ok =
case step
when :prepare
prepare_portrait_context(actor, portrait)
when :chs
# This is the heavy part. Keep it isolated to one frame.
refresh_player_chs_visual
when :pose
update_portrait_pose(portrait)
when :force
force_portrait_refresh(portrait)
else
true
end
ok ? :ok : :retry
rescue => e
p "StartupPortraitFix step #{step} failed: #{e.class}: #{e}"
:retry
end
def start_worker(token)
@worker_token = token
@worker_ready_token = nil
@worker_failed_token = nil
begin
if @worker_thread && @worker_thread.alive?
return true if @worker_thread[:token] == token
end
rescue
end
@worker_thread = Thread.new do
Thread.current[:token] = token rescue nil
deadline = (Time.now.to_f rescue 0.0) + WORKER_TIMEOUT_SEC
loop do
current_token = @worker_token rescue nil
break if current_token != token
begin
actor, portrait = fetch_player_actor_portrait
if hair_palette_ready? && !actor.nil? && !portrait.nil?
@worker_ready_token = token
break
end
rescue
end
now = Time.now.to_f rescue 0.0
if now >= deadline
@worker_failed_token = token
break
end
sleep(WORKER_POLL_SEC)
end
end
true
rescue
false
end
def worker_ready?(token)
(@worker_ready_token == token)
rescue
false
end
def worker_failed?(token)
(@worker_failed_token == token)
rescue
false
end
def stop_worker(token = nil)
current = @worker_token rescue nil
return if !token.nil? && current != token
@worker_token = nil
@worker_ready_token = nil if token.nil? || @worker_ready_token == token
@worker_failed_token = nil if token.nil? || @worker_failed_token == token
@worker_thread = nil
rescue
@worker_token = nil
@worker_ready_token = nil
@worker_failed_token = nil
@worker_thread = nil
end
end
class Scene_Map < Scene_Base
unless method_defined?(:startup_portrait_fix_start)
alias startup_portrait_fix_start start
end
unless method_defined?(:startup_portrait_fix_update)
alias startup_portrait_fix_update update
end
def start(*args, &block)
startup_portrait_fix_start(*args, &block)
return if startup_portrait_fix_skip?
# OverMap used to take a separate "fast" path here.
# That path skipped hair_palette_ready? and could rebuild CHS once with
# default hair after Cache.clear_chs_material on map change. Result:
# normal maps recolored correctly, while OverMap could stay default until
# some later forced refresh.
#
# Use the normal warmup path for OverMap too, so we only rebuild after the
# palette backend is actually ready.
@startup_portrait_fix_mode = :normal
@startup_portrait_fix_frames = StartupPortraitFix::START_DELAY_FRAMES
@startup_portrait_fix_worker_token = "#{object_id}:#{Graphics.frame_count rescue 0}:#{Time.now.to_f rescue 0.0}"
@startup_portrait_fix_waiting_worker = true
@startup_portrait_fix_step_index = 0
@startup_portrait_fix_attempts = 0
StartupPortraitFix.start_worker(@startup_portrait_fix_worker_token)
end
def update(*args, &block)
startup_portrait_fix_update(*args, &block)
update_startup_portrait_fix
end
def update_startup_portrait_fix
return if startup_portrait_fix_skip?
return if @startup_portrait_fix_frames.nil?
if @startup_portrait_fix_frames > 0
@startup_portrait_fix_frames -= 1
return
end
if @startup_portrait_fix_waiting_worker
if StartupPortraitFix.worker_ready?(@startup_portrait_fix_worker_token)
@startup_portrait_fix_waiting_worker = false
@startup_portrait_fix_frames = StartupPortraitFix::STEP_DELAY_FRAMES
elsif StartupPortraitFix.worker_failed?(@startup_portrait_fix_worker_token)
reset_startup_portrait_fix
else
@startup_portrait_fix_frames = StartupPortraitFix::RETRY_DELAY_FRAMES
end
return
end
@startup_portrait_fix_step_index ||= 0
@startup_portrait_fix_attempts ||= 0
steps = StartupPortraitFix.warmup_steps
if @startup_portrait_fix_step_index >= steps.size
@startup_portrait_fix_attempts += 1
if StartupPortraitFix.player_visuals_ready? || @startup_portrait_fix_attempts >= StartupPortraitFix::MAX_ATTEMPTS
reset_startup_portrait_fix
else
@startup_portrait_fix_step_index = 0
@startup_portrait_fix_frames = StartupPortraitFix::RETRY_DELAY_FRAMES
end
return
end
step = steps[@startup_portrait_fix_step_index]
result = StartupPortraitFix.warmup_step(step)
case result
when :ok
@startup_portrait_fix_step_index += 1
@startup_portrait_fix_frames = StartupPortraitFix::STEP_DELAY_FRAMES
when :wait
@startup_portrait_fix_frames = StartupPortraitFix::RETRY_DELAY_FRAMES
else
@startup_portrait_fix_attempts += 1
if @startup_portrait_fix_attempts >= StartupPortraitFix::MAX_ATTEMPTS
reset_startup_portrait_fix
else
@startup_portrait_fix_step_index = 0
@startup_portrait_fix_frames = StartupPortraitFix::RETRY_DELAY_FRAMES
end
end
end
def startup_portrait_fix_skip?
defined?(Scene_MapTitle) && is_a?(Scene_MapTitle)
end
def startup_portrait_fix_overmap_fast_path?
# Legacy hook kept only for compatibility; fast path disabled because it
# could lock OverMap into default hair colors.
false
end
def reset_startup_portrait_fix
begin
StartupPortraitFix.stop_worker(@startup_portrait_fix_worker_token)
rescue
end
@startup_portrait_fix_frames = nil
@startup_portrait_fix_worker_token = nil
@startup_portrait_fix_waiting_worker = nil
@startup_portrait_fix_step_index = nil
@startup_portrait_fix_attempts = nil
@startup_portrait_fix_mode = nil
end
end
+17
View File
@@ -0,0 +1,17 @@
# encoding: UTF-8
#
# Safe rollback for the earlier OverMap/CHS experiment.
#
# Why this file exists:
# - the previous version overrode Game_Player#refresh_chs and cached a custom
# visual signature in @last_chs_visual_signature;
# - if CHS got rebuilt once before the hair palette was correctly applied,
# that signature could mark the wrong visual as "already up to date";
# - after that, hair color stopped rebuilding both in normal maps and on OverMap.
#
# This rollback intentionally does NOT hook refresh_chs at all.
# It leaves the original engine behavior untouched.
#
module OvermapChsStability
CHS_CACHE_LIMIT = 320
end
+22
View File
@@ -0,0 +1,22 @@
# encoding: UTF-8
# Global fallback for hardcoded legacy fonts that are missing in mkxp-z.
# This keeps existing UI logic intact and only swaps the font right before draw.
class Bitmap
unless method_defined?(:mp_safe_font_fallback__orig_draw_text)
alias mp_safe_font_fallback__orig_draw_text draw_text
def draw_text(*args)
begin
if self.font
current_name = self.font.name.to_s
if current_name == "Digital Pixel" && !(defined?(MPSafeFont) && MPSafeFont.respond_to?(:rus2_active?) && MPSafeFont.rus2_active?)
self.font.name = (defined?(MPSafeFont) ? MPSafeFont.name : "VL Gothic")
end
end
rescue
end
mp_safe_font_fallback__orig_draw_text(*args)
end
end
end
File diff suppressed because it is too large. Load diff
+238
View File
@@ -0,0 +1,238 @@
module MPGameLoadProgress
module_function
BOX_WIDTH = 420
BOX_HEIGHT = 84
BAR_WIDTH = 360
BAR_HEIGHT = 18
def active?
!!@active
end
def font_name
if defined?(FONT_MOD)
[:FILE_TITLE, :TITLE_MENU, :STAT_INFO, :NPCSTAT].each do |const_name|
next unless FONT_MOD.const_defined?(const_name)
value = FONT_MOD.const_get(const_name)
value = value[0] if value.is_a?(Array)
value = value.to_s
return value unless value.empty?
end
end
value = Font.default_name rescue "VL Gothic"
value = value[0] if value.is_a?(Array)
value.to_s.empty? ? "VL Gothic" : value.to_s
rescue
"VL Gothic"
end
def begin_load(label = "Загрузка игры...")
dispose
@sprite = Sprite.new
@sprite.z = 99_999
@sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
@active = true
@progress = 0.0
@label = label.to_s
render
pump
rescue
dispose
end
def update(progress, label = nil)
return unless active?
@progress = [[progress.to_f, 0.0].max, 1.0].min
@label = label.to_s if label
render
pump
rescue
end
def finish(label = nil)
return unless active?
update(1.0, label || @label || "Готово")
2.times { pump }
dispose
rescue
dispose
end
def fail(label = "Ошибка загрузки")
finish(label)
end
def dispose
@active = false
if @sprite
if @sprite.bitmap && !@sprite.bitmap.disposed?
@sprite.bitmap.dispose
end
@sprite.dispose unless @sprite.disposed?
@sprite = nil
end
rescue
@sprite = nil
end
def pump
Graphics.update
rescue
end
def render
return unless @sprite && @sprite.bitmap && !@sprite.bitmap.disposed?
bmp = @sprite.bitmap
bmp.clear
bmp.fill_rect(0, 0, Graphics.width, Graphics.height, Color.new(0, 0, 0, 120))
box_x = (Graphics.width - BOX_WIDTH) / 2
box_y = (Graphics.height - BOX_HEIGHT) / 2
bmp.fill_rect(box_x, box_y, BOX_WIDTH, BOX_HEIGHT, Color.new(0, 0, 0, 190))
bmp.fill_rect(box_x, box_y, BOX_WIDTH, 2, Color.new(255, 255, 255, 220))
bmp.fill_rect(box_x, box_y + BOX_HEIGHT - 2, BOX_WIDTH, 2, Color.new(255, 255, 255, 220))
bmp.fill_rect(box_x, box_y, 2, BOX_HEIGHT, Color.new(255, 255, 255, 220))
bmp.fill_rect(box_x + BOX_WIDTH - 2, box_y, 2, BOX_HEIGHT, Color.new(255, 255, 255, 220))
bmp.font.name = font_name
bmp.font.size = 22
bmp.font.bold = true
bmp.font.outline = false
bmp.font.shadow = false if bmp.font.respond_to?(:shadow=)
bmp.font.color = Color.new(255, 255, 255, 255)
bmp.draw_text(box_x + 16, box_y + 8, BOX_WIDTH - 32, 24, (@label || "Загрузка..."), 1)
bar_x = box_x + (BOX_WIDTH - BAR_WIDTH) / 2
bar_y = box_y + 42
bmp.fill_rect(bar_x, bar_y, BAR_WIDTH, BAR_HEIGHT, Color.new(35, 35, 35, 255))
bmp.fill_rect(bar_x + 1, bar_y + 1, BAR_WIDTH - 2, BAR_HEIGHT - 2, Color.new(10, 10, 10, 255))
inner_width = ((BAR_WIDTH - 4) * @progress).to_i
if inner_width > 0
bmp.fill_rect(bar_x + 2, bar_y + 2, inner_width, BAR_HEIGHT - 4, Color.new(74, 202, 94, 255))
end
bmp.font.size = 18
bmp.font.bold = false
percent_text = "#{(@progress * 100).round}%"
bmp.draw_text(box_x + 16, box_y + 58, BOX_WIDTH - 32, 20, percent_text, 1)
rescue
end
end
module DataManager
class << self
unless method_defined?(:mp_load_progress_old_load_game)
alias mp_load_progress_old_load_game load_game
end
def load_game(index)
MPGameLoadProgress.begin_load("Загрузка сохранения...")
MPGameLoadProgress.update(0.05, "Подготовка загрузки...")
ok = mp_load_progress_old_load_game(index)
ok ? MPGameLoadProgress.finish("Загрузка завершена") : MPGameLoadProgress.fail("Не удалось загрузить сохранение")
ok
rescue
MPGameLoadProgress.fail("Ошибка загрузки")
raise
end
unless method_defined?(:mp_load_progress_old_doom_mode_load)
alias mp_load_progress_old_doom_mode_load doomModeLoad
end
def doomModeLoad
MPGameLoadProgress.begin_load("Загрузка Doom-сохранения...")
MPGameLoadProgress.update(0.05, "Подготовка загрузки...")
ok = mp_load_progress_old_doom_mode_load
ok ? MPGameLoadProgress.finish("Загрузка завершена") : MPGameLoadProgress.fail("Не удалось загрузить сохранение")
ok
rescue
MPGameLoadProgress.fail("Ошибка загрузки")
raise
end
unless method_defined?(:mp_load_progress_old_custom_mode_load)
alias mp_load_progress_old_custom_mode_load customModeLoad
end
def customModeLoad(tmpName)
MPGameLoadProgress.begin_load("Загрузка сохранения...")
MPGameLoadProgress.update(0.05, "Подготовка загрузки...")
ok = mp_load_progress_old_custom_mode_load(tmpName)
ok ? MPGameLoadProgress.finish("Загрузка завершена") : MPGameLoadProgress.fail("Не удалось загрузить сохранение")
ok
rescue
MPGameLoadProgress.fail("Ошибка загрузки")
raise
end
unless method_defined?(:mp_load_progress_old_load_game_without_rescue)
alias mp_load_progress_old_load_game_without_rescue load_game_without_rescue
end
def load_game_without_rescue(index)
return false unless FileTest.exist?(make_filename(index))
MPGameLoadProgress.update(0.15, "Очистка старых данных...")
DataManager.create_game_objects
MPGameLoadProgress.update(0.35, "Чтение заголовка...")
File.open(make_filename(index), "rb") do |file|
header = DataManager.load_header(index)
header = Hash.new("ERR") if !header
return false if header[:doom_mode] && header[:doom_mode] != "ERR"
Marshal.load(file)
MPGameLoadProgress.update(0.6, "Чтение сохранения...")
contents = Marshal.load(file)
MPGameLoadProgress.update(0.82, "Применение данных...")
extract_save_contents(contents)
@last_savefile_index = index
$hudForceHide = false
$balloonForceHide = false
end
MPGameLoadProgress.update(0.95, "Завершение загрузки...")
true
end
unless method_defined?(:mp_load_progress_old_load_doom_without_rescue)
alias mp_load_progress_old_load_doom_without_rescue load_doom_without_rescue
end
def load_doom_without_rescue
MPGameLoadProgress.update(0.18, "Подготовка данных...")
File.open(make_filenameDoom, "rb") do |file|
MPGameLoadProgress.update(0.55, "Чтение сохранения...")
Marshal.load(file)
contents = Marshal.load(file)
MPGameLoadProgress.update(0.82, "Применение данных...")
extract_save_contents(contents)
$hudForceHide = false
$balloonForceHide = false
end
MPGameLoadProgress.update(0.95, "Завершение загрузки...")
true
end
unless method_defined?(:mp_load_progress_old_load_custom_without_rescue)
alias mp_load_progress_old_load_custom_without_rescue load_custom_without_rescue
end
def load_custom_without_rescue(tmpName)
MPGameLoadProgress.update(0.18, "Подготовка данных...")
tmpTar = sprintf(userDataPath + "#{tmpName}.rvdata2")
File.open(tmpTar, "rb") do |file|
MPGameLoadProgress.update(0.55, "Чтение сохранения...")
Marshal.load(file)
contents = Marshal.load(file)
MPGameLoadProgress.update(0.82, "Применение данных...")
extract_save_contents(contents)
$hudForceHide = false
$balloonForceHide = false
end
MPGameLoadProgress.update(0.95, "Завершение загрузки...")
true
end
end
end
+97
View File
@@ -0,0 +1,97 @@
# encoding: UTF-8
#
# Minimal safe hair-color reapply after loading a save.
#
# Notes:
# - do not override Game_Player#refresh_chs
# - do not touch runtime visual signatures
# - do not clear caches every Scene_Map start
# - only re-run the normal game path: apply_color_palette after load
#
module HairColorLoadFix
DELAY_FRAMES = 2
module_function
def schedule(frames = DELAY_FRAMES)
@pending = true
@frames = frames.to_i
@frames = 0 if @frames < 0
rescue
@pending = true
@frames = DELAY_FRAMES
end
def pending?
!!@pending
rescue
false
end
def ready?
return false unless $game_player
actor = ($game_player.actor rescue nil)
return false if actor.nil?
return false unless $game_player.respond_to?(:apply_color_palette)
true
rescue
false
end
def tick
return false unless @pending
return false unless ready?
@frames ||= 0
if @frames > 0
@frames -= 1
return false
end
begin
$game_player.apply_color_palette
@pending = false
return true
rescue
return false
end
end
end
class Scene_Load < Scene_File
unless method_defined?(:hair_color_load_fix_safe_on_load_success)
alias hair_color_load_fix_safe_on_load_success on_load_success
end
def on_load_success(*args, &block)
result = hair_color_load_fix_safe_on_load_success(*args, &block)
HairColorLoadFix.schedule
result
end
end
if defined?(Scene_CustomModeLoad)
class Scene_CustomModeLoad
unless method_defined?(:hair_color_load_fix_safe_custom_on_load_success)
alias hair_color_load_fix_safe_custom_on_load_success on_load_success
end
def on_load_success(*args, &block)
result = hair_color_load_fix_safe_custom_on_load_success(*args, &block)
HairColorLoadFix.schedule
result
end
end
end
class Scene_Map < Scene_Base
unless method_defined?(:hair_color_load_fix_safe_update)
alias hair_color_load_fix_safe_update update
end
def update(*args, &block)
result = hair_color_load_fix_safe_update(*args, &block)
HairColorLoadFix.tick
result
end
end
+154
View File
@@ -0,0 +1,154 @@
# encoding: UTF-8
module MPItemDescriptionEffects
SHOW_EMPTY_LINE = true
MAX_PARTS = 3
STAT_LABELS = {
"health" => "здоровью",
"sta" => "выносливости",
"sat" => "сытости",
"mood" => "настроению",
"atk" => "силе",
"atk_plus" => "силе",
"def" => "защите",
"def_plus" => "защите",
"wisdom" => "мудрости",
"wisdom_plus" => "мудрости",
"survival" => "выживанию",
"survival_plus" => "выживанию",
"morality" => "морали",
"morality_plus" => "морали",
"weak" => "слабости",
"sexy" => "сексуальности",
"move_speed" => "скорости",
"arousal" => "возбуждению"
}
PARAM_LABELS = [
"макс. здоровью",
"макс. магии",
"силе",
"защите",
"маг. силе",
"маг. защите",
"ловкости",
"удаче"
]
def self.line(item)
parts = parts_for(item)
return SHOW_EMPTY_LINE ? "Даёт: без бонусов." : "" if parts.empty?
parts = parts[0, MAX_PARTS]
"Даёт: #{parts.join(', ')}"
rescue
SHOW_EMPTY_LINE ? "Даёт: без бонусов." : ""
end
def self.parts_for(item)
return [] if item.nil?
load_effects(item)
parts = []
effects = []
effects.concat(item.use_item_effect) if item.respond_to?(:use_item_effect) && item.use_item_effect
effects.concat(item.lona_effect) if item.respond_to?(:lona_effect) && item.lona_effect
effects.compact.each do |effect|
text = format_effect(effect)
parts << text unless text.nil? || text.empty?
end
if item.respond_to?(:params) && item.params
item.params.each_with_index do |value, index|
value = value.to_i
next if value == 0
name = PARAM_LABELS[index]
next if name.nil?
parts << "#{sign(value)}#{value.abs} к #{name}"
end
end
parts.uniq
end
def self.load_effects(item)
begin
item.lona_effect if item.respond_to?(:lona_effect)
rescue
end
end
def self.format_effect(effect)
return nil if effect.respond_to?(:stats_key) && effect.stats_key
attr = effect.respond_to?(:attr) ? effect.attr.to_s : ""
return nil if attr.empty?
label = STAT_LABELS[attr]
return nil if label.nil?
value = effect.respond_to?(:adjust) ? effect.adjust.to_f : 0.0
return nil if value == 0.0
label = typed_label(label, effect.respond_to?(:attr_type) ? effect.attr_type : nil)
op = effect.respond_to?(:type) ? effect.type.to_s : "+"
case op
when "+"
"+#{number(value)} к #{label}"
when "-"
"-#{number(value)} к #{label}"
when "*"
percent = ((value - 1.0) * 100.0).round
return nil if percent == 0
"#{sign(percent)}#{percent.abs}% к #{label}"
when "/"
return nil if value == 0.0
percent = ((1.0 / value - 1.0) * 100.0).round
return nil if percent == 0
"#{sign(percent)}#{percent.abs}% к #{label}"
else
nil
end
end
def self.typed_label(label, attr_type)
return label unless defined?(ActorStat)
case attr_type
when ActorStat::MAX_STAT, ActorStat::MAX_TRUE, ActorStat::BUFF_TMAX
"макс. #{label}"
when ActorStat::MIN_STAT, ActorStat::MIN_TRUE, ActorStat::BUFF_TMIN
"мин. #{label}"
else
label
end
end
def self.number(value)
value = value.to_f.round(2)
return value.to_i.to_s if value == value.to_i
("%.2f" % value).sub(/0+$/, "").sub(/\.$/, "")
end
def self.sign(value)
value.to_f >= 0 ? "+" : "-"
end
end
class Menu_Items < Menu_ContentBase
def refresh_info
@item_info.bitmap.clear
item = @container[@real_index]
return if item.nil?
@item_info.bitmap.font.size = 16
@item_info.bitmap.font.outline = false
desc = $game_text[item.description].to_s
desc = desc.gsub(/(?:\\n|\r|\n)+\z/, "")
bonus = MPItemDescriptionEffects.line(item)
desc = desc.empty? ? "\\C[6]#{bonus}\\C[0]" : "#{desc}\n\\C[6]#{bonus}\\C[0]" unless bonus.empty?
draw_text_on_canvas(@item_info, 7, 6, desc)
end
end
+867
View File
@@ -0,0 +1,867 @@
# encoding: UTF-8
#==============================================================================
# 129_AnimatedTitleBackground.rb — 2.2.0 POOL-SPAWN-MASK
# Для кастомного TitleMenu из ModScripts/120_Scene_MapTitle.rb
#------------------------------------------------------------------------------
# Установка:
# положить этот файл в: ModScripts/129_AnimatedTitleBackground.rb
#
# Никаких дополнительных картинок не нужно.
# Скрипт НЕ заменяет меню и НЕ создаёт новый Scene_Title/Scene_MapTitle.
# Он использует уже существующий @sprite1, который у тебя загружает:
# Graphics/Online/titleOptBg
#
# Эффекты:
# - очень плавное дыхание/дрейф камеры;
# - холодное свечение воды;
# - расходящиеся ряби на воде;
# - мягкое красное свечение корней;
# - световые лучи в глубине пещеры;
# - голубые пылинки над водой и красные искры у корней;
# - редкое естественное мерцание света;
# - небольшой импульс света при смене пункта меню.
#
# Сам TitleMenu, nickname, online-кнопка, foreground, Title.png и т. д.
# не меняются.
#==============================================================================
module OnlineTitleBackgroundFX
# ---------------------------------------------------------------------------
# НАСТРОЙКИ
# ---------------------------------------------------------------------------
ENABLE_CAMERA = true
ENABLE_POOL_GLOW = true
ENABLE_RIPPLES = true
ENABLE_ROOT_GLOW = true
ENABLE_LIGHT_RAYS = true
ENABLE_PARTICLES = true
ENABLE_AMBIENT_MIST = true
ENABLE_MENU_PULSE = true
# Координаты рассчитаны под присланный titleOptBg.png (1920x1080).
# Это доли изображения: 0.5 = центр.
POOL_X = 0.500
POOL_Y = 0.645
CAVE_LIGHT_X = 0.500
CAVE_LIGHT_Y = 0.285
ROOT_LEFT_X = 0.385
ROOT_LEFT_Y = 0.420
ROOT_RIGHT_X = 0.615
ROOT_RIGHT_Y = 0.420
# Чем больше, тем заметнее эффект движения камеры.
# Фон всегда рисуется в режиме cover с небольшим запасом. Запас не даёт
# камере открыть пустую полосу ни слева, ни справа на нестандартном экране.
SAFE_OVERSCAN = 0.018
CAMERA_EXTRA_ZOOM = 0.004
CAMERA_BREATH = 0.0018
CAMERA_MOVE_X = 1.6
CAMERA_MOVE_Y = 1.0
INTRO_FRAMES = 45.0
CYAN_PARTICLES = 22
RED_PARTICLES = 30
# ---------------------------------------------------------------------------
# Вспомогательные функции
# ---------------------------------------------------------------------------
def self.safe_dispose(obj)
return if obj.nil?
begin
obj.dispose unless obj.disposed?
rescue
begin
obj.dispose
rescue
end
end
end
def self.clamp(value, min_value, max_value)
value = min_value if value < min_value
value = max_value if value > max_value
value
end
# ---------------------------------------------------------------------------
# Контроллер эффектов конкретного TitleMenu
# ---------------------------------------------------------------------------
class Controller
Particle = Struct.new(
:sprite, :vx, :vy, :phase, :kind, :base_opacity, :age, :lifetime
)
def initialize(menu)
@menu = menu
@frame = 0
@disposed = false
@sprites = []
@bitmaps = []
@ripples = []
@particles = []
@selection_pulse = 0.0
@last_index = read_menu_index
@layout_width = nil
@layout_height = nil
@background = fetch_ivar(menu, :@sprite1)
@title_layer = fetch_ivar(menu, :@sprite2)
return unless valid_sprite?(@background)
@original_background_bitmap = @background.bitmap
install_clean_background
remember_background_transform
refresh_cover_layout(true)
create_effects
create_character_layer
rescue => e
debug_log("init", e)
end
def active?
valid_sprite?(@background)
end
def update
return if @disposed
return unless active?
@frame += 1
t = @frame.to_f
refresh_cover_layout
detect_menu_selection
update_camera(t) if ENABLE_CAMERA
update_pool_glow(t) if ENABLE_POOL_GLOW
update_ripples(t) if ENABLE_RIPPLES
update_root_glow(t) if ENABLE_ROOT_GLOW
update_light_rays(t) if ENABLE_LIGHT_RAYS
update_particles(t) if ENABLE_PARTICLES
update_ambient_mist(t) if ENABLE_AMBIENT_MIST
update_character_layer(t)
@selection_pulse *= 0.90
@selection_pulse = 0.0 if @selection_pulse < 0.002
rescue => e
debug_log("update", e)
end
def dispose
return if @disposed
@disposed = true
restore_background_transform
@background.bitmap = @original_background_bitmap if valid_sprite?(@background)
@particles.each do |p|
OnlineTitleBackgroundFX.safe_dispose(p.sprite)
end
@particles.clear
@ripples.each do |s|
OnlineTitleBackgroundFX.safe_dispose(s)
end
@ripples.clear
@sprites.each do |s|
OnlineTitleBackgroundFX.safe_dispose(s)
end
@sprites.clear
@bitmaps.each do |b|
OnlineTitleBackgroundFX.safe_dispose(b)
end
@bitmaps.clear
rescue => e
debug_log("dispose", e)
end
# -------------------------------------------------------------------------
# Получение существующего фона меню
# -------------------------------------------------------------------------
def fetch_ivar(obj, name)
obj.instance_variable_get(name)
rescue
nil
end
def valid_sprite?(sprite)
return false if sprite.nil?
return false if sprite.bitmap.nil?
begin
return false if sprite.disposed?
return false if sprite.bitmap.disposed?
rescue
end
true
end
def read_menu_index
@menu.instance_variable_get(:@index).to_i
rescue
0
end
def detect_menu_selection
return unless ENABLE_MENU_PULSE
index = read_menu_index
if !@last_index.nil? && index != @last_index
@selection_pulse = 1.0
end
@last_index = index
end
def install_clean_background
@background.bitmap = Cache.load_bitmap("Graphics/Online/", "titleOptBg_clean")
@clean_background_loaded = true
rescue => e
@clean_background_loaded = false
debug_log("clean background", e)
@background.bitmap = @original_background_bitmap
end
# -------------------------------------------------------------------------
# Базовый transform уже созданного @sprite1
# -------------------------------------------------------------------------
def remember_background_transform
@original_x = @background.x.to_f
@original_y = @background.y.to_f
@original_zoom_x = @background.zoom_x.to_f
@original_zoom_y = @background.zoom_y.to_f
@original_tone = Tone.new(
@background.tone.red,
@background.tone.green,
@background.tone.blue,
@background.tone.gray
)
end
def restore_background_transform
return unless valid_sprite?(@background)
@background.x = @original_x
@background.y = @original_y
@background.zoom_x = @original_zoom_x
@background.zoom_y = @original_zoom_y
@background.tone.set(
@original_tone.red,
@original_tone.green,
@original_tone.blue,
@original_tone.gray
) if @original_tone
rescue
end
# Uniform cover вместо независимого растягивания X/Y. Картинка сохраняет
# пропорции, центр остаётся неподвижным, а края всегда уходят за экран.
def refresh_cover_layout(force = false)
width = Graphics.width
height = Graphics.height
return if !force && width == @layout_width && height == @layout_height
bmp = @background.bitmap
@layout_width = width
@layout_height = height
cover_x = width.to_f / bmp.width.to_f
cover_y = height.to_f / bmp.height.to_f
@base_scale = [cover_x, cover_y].max * (1.0 + SAFE_OVERSCAN)
@background.zoom_x = @base_scale
@background.zoom_y = @base_scale
@background.x = (width - bmp.width * @base_scale) * 0.5
@background.y = (height - bmp.height * @base_scale) * 0.5
# При реальном изменении разрешения старые координаты частиц уже невалидны.
if !force && @particles
@particles.each { |p| reset_particle(p, true) }
end
end
def update_camera(t)
breath = Math.sin(t / 105.0) * CAMERA_BREATH
zoom = @base_scale * (1.0 + CAMERA_EXTRA_ZOOM + breath)
bmp = @background.bitmap
drift_x = Math.sin(t / 145.0) * CAMERA_MOVE_X * @base_scale
drift_y = Math.cos(t / 188.0) * CAMERA_MOVE_Y * @base_scale
@background.zoom_x = zoom
@background.zoom_y = zoom
@background.x = (Graphics.width - bmp.width * zoom) * 0.5 + drift_x
@background.y = (Graphics.height - bmp.height * zoom) * 0.5 + drift_y
# Едва заметное изменение температуры кадра.
cold = Math.sin(t / 170.0)
red = Math.sin(t / 230.0 + 0.8)
@background.tone.set(
@original_tone.red + red * 1.0,
@original_tone.green + cold * 0.4,
@original_tone.blue + cold * 1.5,
@original_tone.gray
)
end
# Перевод координаты из titleOptBg в экран с учётом текущего zoom/offset.
def image_point(rx, ry)
bmp = @background.bitmap
x = @background.x + bmp.width * rx * @background.zoom_x
y = @background.y + bmp.height * ry * @background.zoom_y
[x, y]
end
def effect_z
# Тот же Z, что у @sprite1: эффект создаётся позже него, поэтому оказывается
# поверх фона, но остаётся ниже @sprite2/foreground изменённого меню.
@background.z + 1
rescue
0
end
# -------------------------------------------------------------------------
# Создание эффектов
# -------------------------------------------------------------------------
def create_effects
create_pool_effects if ENABLE_POOL_GLOW || ENABLE_RIPPLES
create_root_effects if ENABLE_ROOT_GLOW
create_light_ray_effects if ENABLE_LIGHT_RAYS
create_particle_effects if ENABLE_PARTICLES
create_ambient_mist if ENABLE_AMBIENT_MIST
end
def create_character_layer
return unless @clean_background_loaded
bitmap = Cache.load_bitmap("Graphics/Online/", "titleOptBg_devocka")
@character = new_sprite(bitmap)
@character.z = effect_z + 1
@character.opacity = 0
rescue => e
@character = nil
debug_log("character layer", e)
end
def create_pool_effects
if ENABLE_POOL_GLOW
@pool_glow_bitmap = radial_bitmap(112, Color.new(70, 225, 255, 255), 2.0)
keep_bitmap(@pool_glow_bitmap)
@pool_glow = new_sprite(@pool_glow_bitmap)
center_origin(@pool_glow)
@pool_glow.blend_type = 1
@pool_glow.opacity = 0
@pool_core_bitmap = radial_bitmap(72, Color.new(130, 245, 255, 255), 1.7)
keep_bitmap(@pool_core_bitmap)
@pool_core = new_sprite(@pool_core_bitmap)
center_origin(@pool_core)
@pool_core.blend_type = 1
@pool_core.opacity = 0
end
if ENABLE_RIPPLES
@ripple_bitmap = ring_bitmap(96, Color.new(120, 235, 255, 255))
keep_bitmap(@ripple_bitmap)
4.times do |i|
s = Sprite.new(@background.viewport)
s.bitmap = @ripple_bitmap
center_origin(s)
s.z = effect_z
s.blend_type = 1
s.opacity = 0
s.instance_variable_set(:@fx_offset, i / 4.0)
@ripples << s
end
end
end
def create_root_effects
@red_glow_bitmap = radial_bitmap(96, Color.new(225, 38, 34, 255), 2.15)
keep_bitmap(@red_glow_bitmap)
@root_left = new_sprite(@red_glow_bitmap)
center_origin(@root_left)
@root_left.blend_type = 1
@root_right = new_sprite(@red_glow_bitmap)
center_origin(@root_right)
@root_right.blend_type = 1
end
def create_light_ray_effects
@ray_bitmap = vertical_ray_bitmap(24, 160, Color.new(105, 175, 195, 255))
keep_bitmap(@ray_bitmap)
@ray_left = new_sprite(@ray_bitmap)
@ray_left.ox = @ray_bitmap.width / 2
@ray_left.oy = 0
@ray_left.blend_type = 1
@ray_left.angle = -7
@ray_right = new_sprite(@ray_bitmap)
@ray_right.ox = @ray_bitmap.width / 2
@ray_right.oy = 0
@ray_right.blend_type = 1
@ray_right.angle = 7
end
def create_particle_effects
@cyan_particle_bitmap = soft_dot_bitmap(Color.new(120, 240, 255, 255))
@red_particle_bitmap = soft_dot_bitmap(Color.new(255, 90, 72, 255))
keep_bitmap(@cyan_particle_bitmap)
keep_bitmap(@red_particle_bitmap)
CYAN_PARTICLES.times { create_particle(:cyan) }
RED_PARTICLES.times { create_particle(:red) }
end
def create_particle(kind)
s = Sprite.new(@background.viewport)
s.bitmap = (kind == :cyan ? @cyan_particle_bitmap : @red_particle_bitmap)
center_origin(s)
s.z = effect_z
s.blend_type = 1
s.opacity = 0
p = Particle.new(s, 0.0, 0.0, rand * Math::PI * 2.0, kind, 0, 0, 1)
reset_particle(p, true)
@particles << p
end
# Два очень слабых слоя тумана над водой. Они двигаются в противофазе,
# поэтому фон выглядит живым, но меню остаётся читаемым.
def create_ambient_mist
@mist_bitmap = radial_bitmap(128, Color.new(92, 205, 220, 255), 2.6)
keep_bitmap(@mist_bitmap)
@mist_left = new_sprite(@mist_bitmap)
@mist_right = new_sprite(@mist_bitmap)
[@mist_left, @mist_right].each do |s|
center_origin(s)
s.blend_type = 1
s.opacity = 0
end
end
# -------------------------------------------------------------------------
# Обновление света воды
# -------------------------------------------------------------------------
def update_pool_glow(t)
return unless @pool_glow && @pool_core
x, y = image_point(POOL_X, POOL_Y)
pulse = Math.sin(t / 24.0)
slow = Math.sin(t / 83.0 + 0.7)
flicker = light_flicker(t)
menu_boost = @selection_pulse * 20.0
scale = screen_scale
@pool_glow.x = x
@pool_glow.y = y
@pool_glow.zoom_x = scale * (2.95 + pulse * 0.11)
@pool_glow.zoom_y = scale * (0.82 + pulse * 0.035)
@pool_glow.opacity = (OnlineTitleBackgroundFX.clamp(
34 + pulse * 8 + slow * 4 + flicker + menu_boost,
16, 78
) * intro_factor).to_i
@pool_core.x = x
@pool_core.y = y + 3
@pool_core.zoom_x = scale * (2.05 + slow * 0.08)
@pool_core.zoom_y = scale * (0.52 + pulse * 0.025)
@pool_core.opacity = (OnlineTitleBackgroundFX.clamp(
18 + pulse * 6 + menu_boost * 0.35,
8, 46
) * intro_factor).to_i
end
def light_flicker(t)
# Несколько синусов дают менее механическое мерцание без rand каждый кадр.
Math.sin(t / 13.0) * 1.7 +
Math.sin(t / 31.0 + 1.2) * 2.2 +
Math.sin(t / 71.0 + 0.4) * 1.5
end
# -------------------------------------------------------------------------
# Рябь воды
# -------------------------------------------------------------------------
def update_ripples(t)
x, y = image_point(POOL_X, POOL_Y + 0.006)
scale = screen_scale
@ripples.each do |s|
offset = s.instance_variable_get(:@fx_offset).to_f
phase = ((t / 165.0) + offset) % 1.0
# В начале кольцо маленькое и яркое, затем расширяется и растворяется.
expansion = 0.70 + phase * 1.70
s.x = x
s.y = y
s.zoom_x = scale * expansion * 2.00
s.zoom_y = scale * expansion * 0.47
s.opacity = ((((1.0 - phase) ** 1.8) * 33) * intro_factor).to_i
end
end
# -------------------------------------------------------------------------
# Красный свет корней
# -------------------------------------------------------------------------
def update_root_glow(t)
return unless @root_left && @root_right
lx, ly = image_point(ROOT_LEFT_X, ROOT_LEFT_Y)
rx, ry = image_point(ROOT_RIGHT_X, ROOT_RIGHT_Y)
scale = screen_scale
pulse_l = Math.sin(t / 72.0 + 0.4)
pulse_r = Math.sin(t / 81.0 + 2.0)
@root_left.x = lx
@root_left.y = ly
@root_left.zoom_x = scale * (2.5 + pulse_l * 0.10)
@root_left.zoom_y = scale * (2.15 + pulse_l * 0.07)
@root_left.opacity = ((13 + pulse_l * 5) * intro_factor).to_i
@root_right.x = rx
@root_right.y = ry
@root_right.zoom_x = scale * (2.4 + pulse_r * 0.10)
@root_right.zoom_y = scale * (2.05 + pulse_r * 0.07)
@root_right.opacity = ((12 + pulse_r * 5) * intro_factor).to_i
end
# -------------------------------------------------------------------------
# Лучи света из глубины
# -------------------------------------------------------------------------
def update_light_rays(t)
return unless @ray_left && @ray_right
x, y = image_point(CAVE_LIGHT_X, CAVE_LIGHT_Y)
scale = screen_scale
sway = Math.sin(t / 150.0)
pulse = Math.sin(t / 65.0 + 0.8)
@ray_left.x = x - 22 * scale + sway * 3
@ray_left.y = y - 8 * scale
@ray_left.zoom_x = scale * 1.55
@ray_left.zoom_y = scale * 1.55
@ray_left.angle = -7 + sway * 1.4
@ray_left.opacity = ((8 + pulse * 3) * intro_factor).to_i
@ray_right.x = x + 18 * scale - sway * 2
@ray_right.y = y - 6 * scale
@ray_right.zoom_x = scale * 1.45
@ray_right.zoom_y = scale * 1.50
@ray_right.angle = 7 - sway * 1.2
@ray_right.opacity = ((7 + pulse * 3) * intro_factor).to_i
end
# -------------------------------------------------------------------------
# Частицы
# -------------------------------------------------------------------------
def update_particles(t)
@particles.each do |p|
s = p.sprite
next unless s
p.age += 1
sway = Math.sin(t / 34.0 + p.phase) * (p.kind == :cyan ? 0.055 : 0.080)
s.x += p.vx + sway
s.y += p.vy
twinkle = Math.sin(t / 18.0 + p.phase)
opacity = p.base_opacity + twinkle * (p.kind == :cyan ? 28 : 22)
if p.kind == :red
life = OnlineTitleBackgroundFX.clamp(
1.0 - p.age.to_f / p.lifetime.to_f, 0.0, 1.0
)
# Искра сначала мягко появляется, затем всё быстрее растворяется.
appear = OnlineTitleBackgroundFX.clamp(p.age.to_f / 22.0, 0.0, 1.0)
opacity *= appear * (life ** 1.45)
end
minimum = (p.kind == :red ? 0 : 5)
s.opacity = (OnlineTitleBackgroundFX.clamp(opacity, minimum, 176) * intro_factor).to_i
if particle_outside?(p) || p.age >= p.lifetime
reset_particle(p, false)
end
end
end
def particle_outside?(p)
s = p.sprite
if p.kind == :cyan
s.y < Graphics.height * 0.43 ||
s.x < Graphics.width * 0.30 ||
s.x > Graphics.width * 0.70
else
s.y < Graphics.height * 0.12 ||
s.x < Graphics.width * 0.16 ||
s.x > Graphics.width * 0.84
end
end
def reset_particle(p, initial)
s = p.sprite
scale = screen_scale
if p.kind == :cyan
cx, cy = image_point(POOL_X, POOL_Y)
# Точка рождения выбирается внутри эллипса самой воды, а не внутри
# прежнего прямоугольника, который захватывал красную землю по бокам.
# sqrt(rand) даёт равномерное распределение по площади эллипса.
angle = rand * Math::PI * 2.0
radius = Math.sqrt(rand) * 0.82
pool_rx = @background.bitmap.width * @background.zoom_x * 0.066
pool_ry = @background.bitmap.height * @background.zoom_y * 0.030
s.x = cx + Math.cos(angle) * pool_rx * radius
s.y = cy + Math.sin(angle) * pool_ry * radius
p.vx = (rand - 0.5) * 0.16
p.vy = -(0.085 + rand * 0.140)
p.base_opacity = 72 + rand(68)
p.lifetime = 420 + rand(260)
z = 0.82 + rand * 0.90
else
# Красные искры рождаются в нижней части кадра по обе стороны лужи,
# поднимаются вверх и исчезают по собственному времени жизни.
side = rand(2) == 0 ? -1.0 : 1.0
cx, cy = image_point(0.5 + side * (0.12 + rand * 0.18), 0.76 + rand * 0.17)
s.x = cx
s.y = cy
p.vx = -side * (0.010 + rand * 0.040) + (rand - 0.5) * 0.070
p.vy = -(0.120 + rand * 0.180)
p.base_opacity = 68 + rand(76)
p.lifetime = 260 + rand(260)
z = 0.70 + rand * 1.00
end
s.zoom_x = scale * z
s.zoom_y = scale * z
p.phase = rand * Math::PI * 2.0
p.age = initial ? rand(p.lifetime) : 0
s.y += p.vy * p.age if initial && p.kind == :red
end
def update_ambient_mist(t)
return unless @mist_left && @mist_right
x, y = image_point(POOL_X, POOL_Y - 0.006)
scale = screen_scale
sway = Math.sin(t / 190.0)
pulse = Math.sin(t / 115.0 + 0.7)
@mist_left.x = x - (78 - sway * 18) * scale
@mist_left.y = y - 8 * scale
@mist_left.zoom_x = scale * 2.20
@mist_left.zoom_y = scale * 0.34
@mist_left.opacity = ((5.5 + pulse * 1.8) * intro_factor).to_i
@mist_right.x = x + (74 - sway * 16) * scale
@mist_right.y = y + 2 * scale
@mist_right.zoom_x = scale * 2.05
@mist_right.zoom_y = scale * 0.30
@mist_right.opacity = ((4.5 - pulse * 1.5) * intro_factor).to_i
end
def update_character_layer(t)
return unless @character && valid_sprite?(@character)
# Персонаж следует за фоном, но движется чуть меньше: получается мягкий
# параллакс. Водные эффекты имеют меньший Z и всегда остаются за телом.
@character.zoom_x = @background.zoom_x
@character.zoom_y = @background.zoom_y
center_x = (Graphics.width - @character.bitmap.width * @character.zoom_x) * 0.5
center_y = (Graphics.height - @character.bitmap.height * @character.zoom_y) * 0.5
drift_x = @background.x - center_x
drift_y = @background.y - center_y
@character.x = center_x + drift_x * 0.82
@character.y = center_y + drift_y * 0.82 + Math.sin(t / 92.0) * 0.45 * screen_scale
@character.opacity = (255 * intro_factor).to_i
end
def intro_factor
value = OnlineTitleBackgroundFX.clamp(@frame.to_f / INTRO_FRAMES, 0.0, 1.0)
value * value * (3.0 - 2.0 * value)
end
# -------------------------------------------------------------------------
# Bitmap helpers
# -------------------------------------------------------------------------
def new_sprite(bitmap)
s = Sprite.new(@background.viewport)
s.bitmap = bitmap
s.z = effect_z
s.opacity = 0
@sprites << s
s
end
def keep_bitmap(bitmap)
@bitmaps << bitmap
bitmap
end
def center_origin(sprite)
return unless sprite && sprite.bitmap
sprite.ox = sprite.bitmap.width / 2
sprite.oy = sprite.bitmap.height / 2
end
def screen_scale
@background.zoom_x.to_f
end
def radial_bitmap(size, color, power)
bmp = Bitmap.new(size, size)
c = (size - 1) / 2.0
r = size / 2.0
y = 0
while y < size
x = 0
while x < size
dx = (x - c) / r
dy = (y - c) / r
d = Math.sqrt(dx * dx + dy * dy)
if d < 1.0
strength = (1.0 - d) ** power
a = (color.alpha * strength).to_i
if a > 0
bmp.set_pixel(x, y, Color.new(color.red, color.green, color.blue, a))
end
end
x += 1
end
y += 1
end
bmp
end
def ring_bitmap(size, color)
bmp = Bitmap.new(size, size)
c = (size - 1) / 2.0
r = size / 2.0
y = 0
while y < size
x = 0
while x < size
dx = (x - c) / r
dy = (y - c) / r
d = Math.sqrt(dx * dx + dy * dy)
delta = (d - 0.72).abs
if delta < 0.045
strength = 1.0 - delta / 0.045
a = (color.alpha * strength).to_i
bmp.set_pixel(x, y, Color.new(color.red, color.green, color.blue, a))
end
x += 1
end
y += 1
end
bmp
end
def soft_dot_bitmap(color)
size = 9
bmp = Bitmap.new(size, size)
center = 4
y = 0
while y < size
x = 0
while x < size
dx = x - center
dy = y - center
d = Math.sqrt(dx * dx + dy * dy)
if d <= 4.4
strength = [1.0 - d / 4.6, 0.0].max
# Чёткое яркое ядро и мягкий внешний ореол хорошо читаются как на
# 720p, так и на 1080p, но не превращаются в крупные световые шары.
power = d <= 1.25 ? 1.0 : strength ** 1.55
a = (color.alpha * power).to_i
bmp.set_pixel(x, y, Color.new(color.red, color.green, color.blue, a)) if a > 0
end
x += 1
end
y += 1
end
bmp
end
def vertical_ray_bitmap(width, height, color)
bmp = Bitmap.new(width, height)
y = 0
while y < height
fy = y.to_f / (height - 1)
# Слабый сверху, ярче в середине, затем снова исчезает.
vertical = Math.sin(fy * Math::PI) ** 1.25
x = 0
while x < width
fx = (x - (width - 1) / 2.0).abs / (width / 2.0)
horizontal = [1.0 - fx, 0.0].max ** 1.7
a = (color.alpha * vertical * horizontal * 0.34).to_i
bmp.set_pixel(x, y, Color.new(color.red, color.green, color.blue, a)) if a > 0
x += 1
end
y += 1
end
bmp
end
def debug_log(where, error)
@logged_errors ||= {}
return if @logged_errors[where]
@logged_errors[where] = true
begin
p "[TITLE-FX ERROR/#{where}] #{error.class}: #{error.message}"
rescue
end
end
end
# ---------------------------------------------------------------------------
# Патч именно ТВОЕГО изменённого TitleMenu.
# Никакого Scene_MapTitle alias здесь нет.
# ---------------------------------------------------------------------------
def self.install!
return unless defined?(TitleMenu)
return if TitleMenu.method_defined?(:online_title_bg_fx_original_initialize)
TitleMenu.class_eval do
alias online_title_bg_fx_original_initialize initialize
alias online_title_bg_fx_original_update update
alias online_title_bg_fx_original_dispose dispose
def initialize(*args, &block)
online_title_bg_fx_original_initialize(*args, &block)
begin
@online_title_bg_fx = OnlineTitleBackgroundFX::Controller.new(self)
rescue => e
p "[OnlineTitleBackgroundFX/init hook] #{e.message}" if $TEST
@online_title_bg_fx = nil
end
end
def update(*args, &block)
online_title_bg_fx_original_update(*args, &block)
begin
@online_title_bg_fx.update if @online_title_bg_fx
rescue => e
p "[OnlineTitleBackgroundFX/update hook] #{e.message}" if $TEST
end
end
def dispose(*args, &block)
begin
@online_title_bg_fx.dispose if @online_title_bg_fx
rescue => e
p "[OnlineTitleBackgroundFX/dispose hook] #{e.message}" if $TEST
ensure
@online_title_bg_fx = nil
end
online_title_bg_fx_original_dispose(*args, &block)
end
end
end
end
OnlineTitleBackgroundFX.install!
+205
View File
@@ -0,0 +1,205 @@
# encoding: UTF-8
#==============================================================================
# Wrong password dialogue.
# Reacts only to the authoritative server packet auth_error:wrong_password.
# It does not alter auth_ok, connection order or cloud bootstrap.
#==============================================================================
module MPWrongPasswordTeller
@blocked = false
@reason = :wrong_password
def self.blocked?
@blocked ? true : false
rescue
false
end
def self.dismiss_overlays
begin
MPGameLoadProgress.dispose if defined?(MPGameLoadProgress) && MPGameLoadProgress.respond_to?(:dispose)
rescue
end
begin
System_NotificationOverlay.dispose if defined?(System_NotificationOverlay) && System_NotificationOverlay.respond_to?(:dispose)
rescue
end
true
end
def self.show!(reason=:wrong_password)
return true if blocked?
@blocked = true
@reason = reason.to_s.start_with?('integrity_') ? :integrity : :wrong_password
$mp_pending_auth_error_text = nil
$mp_pending_auth_error_lock_frames = 0
$mp_wrong_password_open_settings = false
begin
MPConnectStatus.instance_variable_set(:@manual_disconnect, true) if defined?(MPConnectStatus)
rescue
end
dismiss_overlays
Graphics.update rescue nil
unless ensure_scene
@blocked = false
return false
end
begin
if defined?(WebSocket) && WebSocket.respond_to?(:connected?) && WebSocket.connected?
WebSocket.disconnect
end
rescue
end
true
rescue => e
puts "[WRONG-PASSWORD] Teller scene failed: #{e.class}: #{e.message}" rescue nil
false
end
def self.integrity_failure?
@reason == :integrity
rescue
false
end
def self.ensure_scene
return false unless blocked?
return false unless defined?(SceneManager) && defined?(Scene_MPWrongPasswordTeller)
current = SceneManager.scene rescue nil
return true if current && current.is_a?(Scene_MPWrongPasswordTeller)
SceneManager.snapshot_for_background(false) rescue nil
SceneManager.goto(Scene_MPWrongPasswordTeller)
true
rescue => e
puts "[WRONG-PASSWORD] Scene transition failed: #{e.class}: #{e.message}" rescue nil
false
end
def self.release!
@blocked = false
true
rescue
false
end
end
class Scene_MPWrongPasswordTeller < Scene_Base
def start
MPWrongPasswordTeller.dismiss_overlays
super
create_wrong_password_background
create_wrong_password_dialog
end
def create_wrong_password_background
@wrong_password_background = Sprite.new
@wrong_password_background.z = 0
@wrong_password_bitmap = Bitmap.new(Graphics.width, Graphics.height)
@wrong_password_bitmap.fill_rect(
0, 0, Graphics.width, Graphics.height, Color.new(0, 0, 0, 255)
)
@wrong_password_background.bitmap = @wrong_password_bitmap
rescue => e
puts "[WRONG-PASSWORD] Background failed: #{e.class}: #{e.message}" rescue nil
end
def create_wrong_password_dialog
@wrong_password_choice = nil
@message_window = Window_Message.new
$game_message.clear
$game_message.background = 0
$game_message.position = 2
if MPWrongPasswordTeller.integrity_failure?
$game_message.add("\\ph\\SETpl[TellerConfused]\\SETpr[nil]\\c[4]Гадалка:\\C[0] Мой друг... вокруг тебя вьётся\\n \\C[2]запрещённое заклинание\\C[0].\f" +
"\\SETpl[TellerNormal]\\c[4]Гадалка:\\C[0] Нити судьбы заметили изменённые\\n или незваные файлы игры.\f" +
"\\SETpl[TellerOkay]\\c[4]Гадалка:\\C[0] Пока игре не вернут истинный облик,\\n врата сервера тебя не впустят.")
$game_message.choices.push("Вернуться в главное меню")
$game_message.choice_cancel_type = 0
else
$game_message.add("\\ph\\SETpl[TellerNormal]\\SETpr[nil]\\c[4]Гадалка:\\C[0] Увы...\\n Нити судьбы не узнают тебя с этим тайным словом.\f" +
"\\SETpl[TellerConfused]\\c[4]Гадалка:\\C[0] Сервер ответил:\\n \\C[2]Пароль неверный\\C[0].\\n Врата в LonaRPG Online остались закрыты.\f" +
"\\SETpl[TellerOkay]\\c[4]Гадалка:\\C[0] Хочешь перейти в настройки и изменить пароль?")
$game_message.choices.push("Перейти в настройки")
$game_message.choices.push("Выйти в главное меню")
$game_message.choice_cancel_type = 1
end
$game_message.choice_proc = Proc.new { |index| @wrong_password_choice = index.to_i }
rescue => e
puts "[WRONG-PASSWORD] Dialogue failed: #{e.class}: #{e.message}" rescue nil
end
def update
super
$game_portraits.update if defined?($game_portraits) && $game_portraits
finish_wrong_password_dialog if !@wrong_password_choice.nil? && !$game_message.busy?
end
def finish_wrong_password_dialog
choice = @wrong_password_choice
@wrong_password_choice = nil
$game_message.clear rescue nil
$game_portraits.hide_all_portraits(true) rescue nil
MPWrongPasswordTeller.release!
if choice == 0 && !MPWrongPasswordTeller.integrity_failure?
$mp_wrong_password_open_settings = true
SceneManager.goto(Scene_TitleOptions)
else
$mp_wrong_password_open_settings = false
SceneManager.goto(Scene_MapTitle)
end
rescue => e
puts "[WRONG-PASSWORD] Dialogue exit failed: #{e.class}: #{e.message}" rescue nil
end
def terminate
@wrong_password_background.dispose if @wrong_password_background && !@wrong_password_background.disposed? rescue nil
@wrong_password_bitmap.dispose if @wrong_password_bitmap && !@wrong_password_bitmap.disposed? rescue nil
super
end
end
# A socket-close callback must not replace the Teller scene before the player
# chooses one of its two explicit actions.
if defined?(SceneManager)
module SceneManager
class << self
unless method_defined?(:mp_wrong_password_goto_without_lock)
alias mp_wrong_password_goto_without_lock goto
def goto(scene_class)
if defined?(MPWrongPasswordTeller) && MPWrongPasswordTeller.blocked? &&
defined?(Scene_MPWrongPasswordTeller) && scene_class != Scene_MPWrongPasswordTeller
scene_class = Scene_MPWrongPasswordTeller
end
mp_wrong_password_goto_without_lock(scene_class)
end
end
if method_defined?(:call) && !method_defined?(:mp_wrong_password_call_without_lock)
alias mp_wrong_password_call_without_lock call
def call(scene_class)
if defined?(MPWrongPasswordTeller) && MPWrongPasswordTeller.blocked? &&
defined?(Scene_MPWrongPasswordTeller)
return goto(Scene_MPWrongPasswordTeller)
end
mp_wrong_password_call_without_lock(scene_class)
end
end
if method_defined?(:return) && !method_defined?(:mp_wrong_password_return_without_lock)
alias mp_wrong_password_return_without_lock return
def return
if defined?(MPWrongPasswordTeller) && MPWrongPasswordTeller.blocked? &&
defined?(Scene_MPWrongPasswordTeller)
return goto(Scene_MPWrongPasswordTeller)
end
mp_wrong_password_return_without_lock
end
end
end
end
end
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,2 @@
# Ruby 3 / mkxp-z note:
# The old RGSS pointer-based bitmap memory failsafe is intentionally disabled.
+147
View File
@@ -0,0 +1,147 @@
# encoding: UTF-8
# AutoEnableMods for LonaRPG (MKXP-Z / Ruby 3.1)
# Install into: ModScripts/499_AutoEnableMods.rb
# Runs before ModScripts/500_Mod_loader.rb.
# Enables every folder mod; no GameMods.ini is needed (with included core patches).
# Does not modify or bypass the game's own security checks.
module AutoEnableAllMods
MOD_ROOT = "ModScripts/_Mods".freeze
# Log output disabled: no AutoEnableMods.log file or console messages.
def self.log(_message)
nil
end
# Check disk only. The game's stock manager has already been
# created; register any folders that it may not have picked up.
def self.scan(manager)
unless Dir.exist?(MOD_ROOT)
log("Folder not found: #{MOD_ROOT}")
return
end
Dir.glob(File.join(MOD_ROOT, "*")).sort.each do |path|
next unless File.directory?(path)
next if manager.mods.values.any? { |mod| File.expand_path(mod.path) == File.expand_path(path) }
begin
existing_ids = manager.mods.keys.dup
mod = manager.load_mod_info(path)
if existing_ids.include?(mod.id) && File.expand_path(mod.path) != File.expand_path(path)
log("SKIPPED #{path}: duplicate mod ID #{mod.id}")
else
log("DISCOVERED #{mod.id} (#{path})")
end
rescue StandardError => error
log("SCAN ERROR #{path}: #{error.class}: #{error.message}")
end
end
end
# Deterministic dependency-aware order, independent of INI LoadOrder.
# Dependencies are ordered when present, but missing ones do not disable a mod.
def self.order(mods)
by_id = {}
mods.each { |mod| by_id[mod.id.to_s] = mod }
incoming = {}
next_mods = {}
mods.each do |mod|
incoming[mod] = 0
next_mods[mod] = []
end
add_edge = lambda do |first, second|
next if first.nil? || second.nil? || first.equal?(second)
next if next_mods[first].include?(second)
next_mods[first] << second
incoming[second] += 1
end
mods.each do |mod|
if mod.requires.is_a?(Hash)
mod.requires.each_key do |required_id|
next if required_id.to_s == "LonaRPG"
prerequisite = by_id[required_id.to_s]
if prerequisite
add_edge.call(prerequisite, mod)
else
log("MISSING DEPENDENCY #{mod.id}: #{required_id}; loading will still be attempted")
end
end
end
Array(mod.before).each do |target_id|
add_edge.call(mod, by_id[target_id.to_s])
end
end
sort_key = lambda { |mod| [mod.id.to_s.downcase, mod.path.to_s.downcase] }
ready = mods.select { |mod| incoming[mod] == 0 }.sort_by(&sort_key)
result = []
until ready.empty?
current = ready.shift
result << current
next_mods[current].each do |following|
incoming[following] -= 1
ready << following if incoming[following] == 0
end
ready.sort_by!(&sort_key)
end
if result.size < mods.size
remaining = (mods - result).sort_by(&sort_key)
log("CYCLIC DEPENDENCIES: #{remaining.map(&:id).join(', ')}; attempting to load anyway")
result.concat(remaining)
end
result
end
def self.prepare(manager)
scan(manager)
sorted = order(manager.mods.values)
manager.instance_variable_set(:@load_order, sorted)
sorted.each do |mod|
# An error from the stock dependency/INI pass must not disable it.
mod.clear_error if mod.respond_to?(:clear_error) && !mod.loaded
mod.enabled = true
end
log("AUTO ENABLED #{sorted.length} mod(s): #{sorted.map(&:id).join(', ')}")
sorted
end
def self.report(manager)
manager.load_order.each do |mod|
if mod.loaded
log("LOADED #{mod.id}")
else
details = mod.respond_to?(:error) ? mod.error.to_s.gsub(/\s+/, " ")[0, 300] : ""
log("LOAD FAILED #{mod.id}: #{details}")
end
end
end
end
module AutoEnableModsManagerHook
def link_texts
AutoEnableAllMods.prepare(self)
super
end
def preload_mods
AutoEnableAllMods.prepare(self)
super
end
def load_mods(bnd)
AutoEnableAllMods.prepare(self)
super
ensure
AutoEnableAllMods.report(self)
end
end
if defined?(ModManager) && defined?($mod_manager) && $mod_manager
ModManager.prepend(AutoEnableModsManagerHook) unless ModManager.ancestors.include?(AutoEnableModsManagerHook)
AutoEnableAllMods.log("START (INI-less auto-loading of all folder mods)")
AutoEnableAllMods.prepare($mod_manager)
else
AutoEnableAllMods.log("ERROR: ModManager is not available. Check script load order.")
end
+61
View File
@@ -0,0 +1,61 @@
begin
unless defined?(Ruby310Compat)
compat_candidates = []
begin
cwd = Dir.pwd.to_s
unless cwd.nil? || cwd.empty?
compat_candidates << File.expand_path('ModScripts/000_Ruby310_Compat.rb', cwd)
compat_candidates << File.expand_path('000_Ruby310_Compat.rb', cwd)
end
rescue StandardError
end
begin
script_dir = File.dirname(__FILE__)
unless script_dir.nil? || script_dir.empty?
compat_candidates << File.expand_path('000_Ruby310_Compat.rb', script_dir)
end
rescue StandardError
end
compat_candidates.compact.uniq.each do |path|
begin
next unless File.file?(path)
load path
break if defined?(Ruby310Compat)
rescue StandardError
end
end
end
rescue StandardError
end
$lang = $LonaINI["LonaRPG"]["Language"]
$game_text = Text.new("Text/#{$lang}")
#module FileGetter
#end
$mod_manager.link_texts
$mod_manager.load_mods(binding)
#if !File.exist?("GameMods.ini")
# new_file = IniFile.new
# # set properties
# new_file["Mods"]={}
# # pretty print object
# p new_file
# # set file path
# new_file.filename = "GameMods.ini"
# # save file
# new_file.write()
#end
#$ModINI = IniFile.load("GameMods.ini")
#
#module FileGetter
# def self.mods_remove_sections_folder_not_found
# $ModINI.sections.each{|folder|
# next if Dir.exist?("ModScripts/_Mods/#{folder}")
# prp "Mod folder not found! Remove GameMods.ini=>#{folder}"
# $ModINI.delete_section(folder)
# }
# end
#end
#FileGetter.mods_remove_sections_folder_not_found
+127
View File
@@ -0,0 +1,127 @@
module DataManager
def self.patch_old_save
gameCurrVer = translate_game_ver(DataManager.export_full_ver_info)
gameSaveVer = translate_game_ver($story_stats["VerInfo"])
lowestSuppotVer = 0.79
if gameSaveVer < lowestSuppotVer
return msgbox "ERROR > Lowest patchable ver = #{lowestSuppotVer}"
SceneManager.exit
end
patchedMsg = ""
patchedMsg += $game_player.patch_old_save(gameCurrVer,gameSaveVer)
patchedMsg += $game_player.actor.patch_old_save(gameCurrVer,gameSaveVer)
patchedMsg += $game_map.patch_old_save(gameCurrVer,gameSaveVer)
if patchedMsg != ""
boardMsg = "\\board[SavePatched]"
$game_message.add(boardMsg)
$game_message.add("\\C[6]Please reset map ASAP\\C[0]\\n")
$game_message.add(patchedMsg)
$game_temp.loadEval("$game_map.interpreter.wait_for_message")
end
end
end
class Scene_Load < Scene_File
alias_method :on_load_success_fix, :on_load_success
def on_load_success
on_load_success_fix
DataManager.patch_old_save
end
end
class Scene_CustomModeLoad < Scene_MenuBase
alias_method :on_load_success_fix, :on_load_success
def on_load_success
on_load_success_fix
DataManager.patch_old_save
end
end
#########################################
#map
class Game_Map
def patch_old_save(gameCurrVer,gameSaveVer)
patchedMsg = ""
if 1.003 > gameSaveVer
$game_map.npcs.each{|event|
event.npc.stat.default_stat.each{|id,val|
event.npc.stat.default_stat[id][5] =0
event.npc.stat.default_stat[id][6] =0
event.npc.stat.default_stat[id][7] =true
p "#{id} #{val}"
}
event.npc.stat.stat.each{|id,val|
event.npc.stat.stat[id][5] =0
event.npc.stat.stat[id][6] =0
event.npc.stat.stat[id][7] =true
p "#{id} #{val}"
}
}
patchedMsg += "Add NPC BTmax, BTmin\\n"
end
patchedMsg
end
end
#GP
class Game_Player < Game_Character
def patch_old_save(gameCurrVer,gameSaveVer)
patchedMsg = ""
#if !@stepSndCount
# @stepSndCount = 0
# patchedMsg += "save patch, 0860 add stepSndCount to player class\\n"
#end
patchedMsg
end
end
#GP.a
class Game_Actor < Game_Battler
def patch_old_save(gameCurrVer,gameSaveVer)
patchedMsg = ""
#1.07~10.9 need following fix for cocona
#$game_NPCLayerMain= Game_NPC_Actor.new("NPCLayerMain")
#$game_NPCLayerSub= Game_NPC_Actor.new("NPCLayerSub")
#$game_portraits = Portrait_System.new
if 1.075 > gameSaveVer
$game_NPCLayerMain= Game_NPC_Actor.new("NPCLayerMain")
$game_NPCLayerSub= Game_NPC_Actor.new("NPCLayerSub")
$game_portraits = Portrait_System.new
patchedMsg += "reset cocona's portraitData'\\n"
end
if 1.003 > gameSaveVer
asd = $game_player.actor.actStat.stat.clone
@actStat=LonaActorStat.new
$game_player.actor.actStat.stat.each{|id,val|
$game_player.actor.actStat.stat[id]=asd[id].clone
}
asd = nil
$game_player.actor.actStat.update_1003
patchedMsg += "Add Player BTmax, BTmin\\n"
end
if 1.02 > gameSaveVer
self.stat["SacredAegis"] = 0
patchedMsg += "save patch to 01020 init SacredAegis trait.\\n"
end
if 1.03 > gameSaveVer
@equips[17] = Game_BaseItem.new
@equips[18] = Game_BaseItem.new
@equips[19] = Game_BaseItem.new
patchedMsg += "save patch to 01030 init eqp slot 17~19.\\n"
end
patchedMsg
end
end
class LonaActorStat < ActorStat #1.003 patch only
def update_1003
@stat.keys.each{|key|
@stat[key][BUFF_TMIN]=0
@stat[key][BUFF_TMAX]=0
}
end
end
+566
View File
@@ -0,0 +1,566 @@
# MKXP-Z / Duktape animated rainbow hair dye for LonaRPG
# Place into: ModScripts/99997_RainbowHairDuktape.rb
module RainbowHairDuktape
extend self
ITEM_KEY = "AddHairRainbow"
DISPLAY_NAME = "Rainbow Hair Dye"
DESCRIPTION = "A shimmering rainbow dye that makes Lona's hair glow in animated rainbow bands."
HAIR_COLOR_ID = 6
SHOP_NAME = "NoerMarketHairCutter"
CACHE_TAG = "HairRainbowDuktape"
TARGET_JSON = "ModScripts/PaletteChanger/20_DEFAULT_Hair_dyes.json"
PHASE_BUCKETS = 12
FRAMES_PER_STEP = 4
BAND_COUNT = 6
BASE_HAIR_KEYS = %w[
AddHairDefault
AddHairBlack
AddHairWhite
AddHairLightLavender
AddHairRed
AddHairYellow
]
HAIRDRESSER_HAIRSTYLE_KEYS = %w[
ItemHairPony
ItemHairTwinBraid
ItemHairShortMessy
ItemHairDancer
ItemHairMessy
]
HAIRDRESSER_COLOR_KEYS = (BASE_HAIR_KEYS + [ITEM_KEY]).freeze
# Duktape is used only to generate band colors for a given phase bucket.
# Timing is driven from Ruby (Graphics.frame_count) because that's reliable on mkxp-z.
JS_CODE = <<'JAVASCRIPT'
(function (global) {
function clamp(v, min, max) {
return v < min ? min : (v > max ? max : v);
}
function hsvToRgb(h, s, v) {
h = ((h % 1.0) + 1.0) % 1.0;
s = clamp(s, 0.0, 1.0);
v = clamp(v, 0.0, 1.0);
var i = Math.floor(h * 6.0);
var f = h * 6.0 - i;
var p = v * (1.0 - s);
var q = v * (1.0 - f * s);
var t = v * (1.0 - (1.0 - f) * s);
var r, g, b;
switch (i % 6) {
case 0: r = v; g = t; b = p; break;
case 1: r = q; g = v; b = p; break;
case 2: r = p; g = v; b = t; break;
case 3: r = p; g = q; b = v; break;
case 4: r = t; g = p; b = v; break;
default: r = v; g = p; b = q; break;
}
return [
clamp((r * 255) | 0, 0, 255),
clamp((g * 255) | 0, 0, 255),
clamp((b * 255) | 0, 0, 255)
];
}
var RainbowHair = {
exportColumns: function (w, bucket, bucketCount) {
w = w | 0;
bucket = bucket | 0;
bucketCount = bucketCount | 0;
if (w <= 1) return "255,32,32";
if (bucketCount <= 0) bucketCount = 1;
var phase = bucket / bucketCount;
var out = [];
for (var x = 0; x < w; x++) {
var u = x / (w - 1);
var wave = Math.sin((u + phase) * Math.PI * 2.0) * 0.045;
var hue = (u * 0.94 + 0.02 + wave + phase + 1.0) % 1.0;
var rgb = hsvToRgb(hue, 0.98, 1.0);
out.push(rgb[0], rgb[1], rgb[2]);
}
return out.join(",");
}
};
global.RainbowHair = RainbowHair;
})(this);
JAVASCRIPT
def log(msg)
if defined?(System) && System.respond_to?(:puts)
System.puts("[rainbow_hair_duktape] #{msg}")
else
p "[rainbow_hair_duktape] #{msg}"
end
end
def clamp_byte(v)
v = v.round
v = 0 if v < 0
v = 255 if v > 255
v
end
def hsv_to_rgb(h, s, v)
h = h.to_f % 1.0
h += 1.0 if h < 0.0
s = [[s.to_f, 0.0].max, 1.0].min
v = [[v.to_f, 0.0].max, 1.0].min
i = (h * 6.0).floor
f = h * 6.0 - i
p = v * (1.0 - s)
q = v * (1.0 - f * s)
t = v * (1.0 - (1.0 - f) * s)
r, g, b = case i % 6
when 0 then [v, t, p]
when 1 then [q, v, p]
when 2 then [p, v, t]
when 3 then [p, q, v]
when 4 then [t, p, v]
else [v, p, q]
end
[clamp_byte(r * 255), clamp_byte(g * 255), clamp_byte(b * 255)]
end
def duktape_available?
defined?(Duktape) &&
Duktape.respond_to?(:available?) &&
Duktape.respond_to?(:eval) &&
Duktape.available?
rescue
false
end
def init_js
return if @js_ready
return unless duktape_available?
Duktape.eval(JS_CODE)
@js_ready = true
@using_duktape = true
log("Duktape rainbow generator enabled")
rescue => e
@using_duktape = false
log("Duktape init failed, using Ruby fallback: #{e.class}: #{e}")
end
def using_duktape?
init_js if @using_duktape.nil?
!!@using_duktape
end
def load_target_names
return @target_names if @target_names
names = []
begin
if File.exist?(TARGET_JSON)
data = JSON.parse(Ruby310Compat.read_text_file(TARGET_JSON))
if data.is_a?(Hash) && data["names"].is_a?(Array)
names = data["names"]
elsif data.is_a?(Array)
data.each do |entry|
next unless entry.is_a?(Hash) && entry["names"].is_a?(Array)
names.concat(entry["names"])
end
end
end
rescue => e
log("Failed to parse #{TARGET_JSON}: #{e.class}: #{e}")
end
expanded = []
names.each do |name|
n = name.to_s.split("@").first.to_s
next if n.empty?
expanded << n.downcase
ext = File.extname(n)
expanded << n[0...-ext.length].downcase unless ext.empty?
end
@target_names = expanded.uniq
end
def active?
return false unless $game_player && $game_player.actor
$game_player.actor.record_HairColor.to_i == HAIR_COLOR_ID
rescue
false
end
def target_file?(filename)
load_target_names.include?(filename.to_s.downcase)
end
def active_for?(filename)
active? && target_file?(filename)
end
def current_bucket
@current_bucket ||= 0
end
# Reliable animation timing on mkxp-z.
def compute_bucket
frame = (Graphics.frame_count rescue 0).to_i
((frame / FRAMES_PER_STEP) % PHASE_BUCKETS)
end
def tick
new_bucket = compute_bucket
@last_active = false if @last_active.nil?
if active?
if new_bucket != current_bucket || !@last_active
@current_bucket = new_bucket
@columns_cache = {}
apply_player_hair_refresh
end
@last_active = true
else
if @last_active
@current_bucket = 0
@columns_cache = {}
apply_player_hair_refresh
end
@last_active = false
end
rescue => e
log("tick failed: #{e.class}: #{e}")
end
def columns_for_width(width, bucket = current_bucket)
@columns_cache ||= {}
key = [width.to_i, bucket.to_i]
return @columns_cache[key] if @columns_cache[key]
width = width.to_i
width = 1 if width < 1
bucket = bucket.to_i
cols = nil
if using_duktape?
begin
raw = Duktape.eval("RainbowHair.exportColumns(#{width},#{bucket},#{PHASE_BUCKETS})")
parts = raw.to_s.split(",").map { |v| v.to_i }
cols = parts if parts.length >= width * 3
rescue => e
@using_duktape = false
log("Duktape exportColumns failed for width=#{width}, bucket=#{bucket}: #{e.class}: #{e}")
end
end
if cols.nil?
phase = bucket.to_f / PHASE_BUCKETS
cols = []
0.upto(width - 1) do |x|
u = width <= 1 ? 0.0 : x.to_f / (width - 1)
wave = Math.sin((u + phase) * Math::PI * 2.0) * 0.045
hue = (u * 0.94 + 0.02 + wave + phase) % 1.0
rgb = hsv_to_rgb(hue, 0.98, 1.0)
cols.concat(rgb)
end
end
@columns_cache[key] = cols
end
def apply_if_needed(bitmap, filename)
return bitmap unless active_for?(filename)
return bitmap if bitmap.nil? || (bitmap.respond_to?(:disposed?) && bitmap.disposed?)
colors = bitmap.get_data.unpack("C*")
width = bitmap.width
height = bitmap.height
bucket = current_bucket
cols = columns_for_width(BAND_COUNT, bucket)
y = 0
while y < height
row_min = nil
row_max = nil
x = 0
while x < width
offset = (x + y * width) * 4
a = colors[offset + 3]
if a && a > 10
row_min = x if row_min.nil?
row_max = x
end
x += 1
end
if !row_min.nil? && !row_max.nil?
visible_w = row_max - row_min + 1
visible_w = 1 if visible_w < 1
y_shift = ((height - 1 - y) / 2) + bucket
x = row_min
while x <= row_max
offset = (x + y * width) * 4
r = colors[offset]
g = colors[offset + 1]
b = colors[offset + 2]
a = colors[offset + 3]
if a && a > 10
luma = (r * 299 + g * 587 + b * 114) / 1000.0
unless luma < 18
local_x = x - row_min
band_index = ((local_x + y_shift) * BAND_COUNT / visible_w) % BAND_COUNT
ci = band_index * 3
base_r = cols[ci]
base_g = cols[ci + 1]
base_b = cols[ci + 2]
shade = 0.60 + (luma / 255.0) * 0.40
glow = 26 + (luma / 255.0 * 24).to_i
colors[offset] = clamp_byte(base_r * shade + glow)
colors[offset + 1] = clamp_byte(base_g * shade + glow)
colors[offset + 2] = clamp_byte(base_b * shade + glow)
end
end
x += 1
end
end
y += 1
end
bitmap.set_data(colors.pack("C*"))
bitmap
rescue => e
log("apply_if_needed failed: #{e.class}: #{e}")
bitmap
end
def apply_player_hair_refresh
return unless $game_player
return unless $game_player.actor
Cache.clear_chs_character if defined?(Cache) && Cache.respond_to?(:clear_chs_character)
if $game_player.actor.respond_to?(:portrait) && $game_player.actor.portrait
$game_player.actor.portrait.refresh if $game_player.actor.portrait.respond_to?(:refresh)
$game_player.actor.portrait.update if $game_player.actor.portrait.respond_to?(:update)
end
$game_player.refresh_chs if $game_player.respond_to?(:refresh_chs)
rescue => e
log("apply_player_hair_refresh failed: #{e.class}: #{e}")
end
def ensure_rainbow_item
return if !$data_items || !$data_ItemName
return if $data_ItemName[ITEM_KEY]
base = $data_ItemName["AddHairYellow"] ||
$data_ItemName["AddHairRed"] ||
$data_ItemName["AddHairWhite"] ||
$data_items.compact.find { |it| it.respond_to?(:common_tags) && it.common_tags && it.common_tags["DyeHairColor"] }
unless base
log("Unable to create #{ITEM_KEY}: no base hair dye item found")
return
end
item = base.clone
new_id = $data_items.length
item.instance_variable_set(:@id, new_id)
item.instance_variable_set(:@item_name, ITEM_KEY)
item.instance_variable_set(:@name, DISPLAY_NAME)
item.instance_variable_set(:@description, DESCRIPTION)
common_tags = item.instance_variable_get(:@common_tags)
common_tags = common_tags ? common_tags.dup : {}
common_tags["DyeHairColor"] = HAIR_COLOR_ID
item.instance_variable_set(:@common_tags, common_tags)
base_price = item.instance_variable_get(:@price).to_i
base_price = 150 if base_price <= 0
item.instance_variable_set(:@price, (base_price * 1.35).round)
$data_items[new_id] = item
$data_ItemName[ITEM_KEY] = item
log("Registered #{ITEM_KEY} as item id=#{new_id}")
rescue => e
log("ensure_rainbow_item failed: #{e.class}: #{e}")
end
def filter_hairdresser_barter
return unless $data_barters && $data_barters[SHOP_NAME].is_a?(Hash)
items = $data_barters[SHOP_NAME]["items"]
return unless items.is_a?(Array)
items.delete_if do |entry|
entry.is_a?(Hash) && HAIRDRESSER_COLOR_KEYS.include?(entry["item_name"].to_s)
end
rescue => e
log("filter_hairdresser_barter failed: #{e.class}: #{e}")
end
def cached_hair_shop?(goods)
return false unless goods.is_a?(Hash)
keys = goods.keys.map(&:to_s)
!(HAIRDRESSER_HAIRSTYLE_KEYS & keys).empty? ||
!(HAIRDRESSER_COLOR_KEYS & keys).empty?
end
def filter_cached_hairdresser_colors
return unless $story_stats
stores = $story_stats["CharacterItems"]
return unless stores.is_a?(Hash)
stores.each do |store_key, store_data|
next unless store_data.is_a?(Array)
next unless store_data[0].is_a?(Hash)
goods = store_data[0]
next unless cached_hair_shop?(goods)
HAIRDRESSER_COLOR_KEYS.each do |item_key|
goods.delete(item_key)
goods.delete(item_key.to_sym)
end
end
rescue => e
log("filter_cached_hairdresser_colors failed: #{e.class}: #{e}")
end
def install_runtime_data
ensure_rainbow_item
filter_hairdresser_barter
rescue => e
log("install_runtime_data failed: #{e.class}: #{e}")
end
end
module DataManager
class << self
unless method_defined?(:load_mod_database_rainbow_hair_duktape)
alias_method :load_mod_database_rainbow_hair_duktape, :load_mod_database
end
def load_mod_database
load_mod_database_rainbow_hair_duktape
RainbowHairDuktape.install_runtime_data
end
if method_defined?(:extract_save_contents)
unless method_defined?(:extract_save_contents_rainbow_hair_duktape)
alias_method :extract_save_contents_rainbow_hair_duktape, :extract_save_contents
end
def extract_save_contents(contents)
extract_save_contents_rainbow_hair_duktape(contents)
RainbowHairDuktape.install_runtime_data
RainbowHairDuktape.filter_cached_hairdresser_colors
end
end
end
end
module BitmapChanger
class << self
unless method_defined?(:find_cache_name_rainbow_hair_duktape)
alias_method :find_cache_name_rainbow_hair_duktape, :find_cache_name
end
def find_cache_name(filename)
base = find_cache_name_rainbow_hair_duktape(filename)
return base unless RainbowHairDuktape.active_for?(filename)
phase_tag = "#{RainbowHairDuktape::CACHE_TAG}_#{RainbowHairDuktape.current_bucket}"
return phase_tag if base.nil? || base.empty?
return base if base.include?(phase_tag)
"#{base}:#{phase_tag}"
end
unless method_defined?(:change_bitmap_rainbow_hair_duktape)
alias_method :change_bitmap_rainbow_hair_duktape, :change_bitmap
end
def change_bitmap(bitmap, filename)
bitmap = change_bitmap_rainbow_hair_duktape(bitmap, filename)
RainbowHairDuktape.apply_if_needed(bitmap, filename)
bitmap
end
end
end
if defined?(GIM_ADDON)
module GIM_ADDON
unless method_defined?(:manual_barters_rainbow_hair_duktape)
alias_method :manual_barters_rainbow_hair_duktape, :manual_barters
end
def manual_barters(tmpTradeID)
RainbowHairDuktape.install_runtime_data
RainbowHairDuktape.filter_cached_hairdresser_colors if tmpTradeID == RainbowHairDuktape::SHOP_NAME
manual_barters_rainbow_hair_duktape(tmpTradeID)
end
end
end
if defined?(Window_CheatMenuHairColor)
class Window_CheatMenuHairColor
def minmaxHairColor(value)
return RainbowHairDuktape::HAIR_COLOR_ID if value < 0
return 0 if value > RainbowHairDuktape::HAIR_COLOR_ID
value
end
def cursor_right(wrap = false)
SndLib.play_cursor
$game_player.actor.record_HairColor += 1
$game_player.actor.record_HairColor = minmaxHairColor($game_player.actor.record_HairColor)
RainbowHairDuktape.apply_player_hair_refresh
draw_item(index)
end
def cursor_left(wrap = false)
SndLib.play_cursor
$game_player.actor.record_HairColor -= 1
$game_player.actor.record_HairColor = minmaxHairColor($game_player.actor.record_HairColor)
RainbowHairDuktape.apply_player_hair_refresh
draw_item(index)
end
end
end
unless $mkxpz_rainbow_hair_duktape_hooked
$mkxpz_rainbow_hair_duktape_hooked = true
Graphics.singleton_class.class_eval do
alias_method :rainbow_hair_duktape_update_without_hook, :update
def update(*args)
rainbow_hair_duktape_update_without_hook(*args)
RainbowHairDuktape.tick
end
end
end
RainbowHairDuktape.log("loaded")
+46
View File
@@ -0,0 +1,46 @@
# mkxp-z compatibility fix for scripts that pass non-boolean values to visible=
# Place this file in ModScripts/ as: ModScripts/99998_mkxp_visible_bool_fix.rb
module MKXPZVisibleBoolFix
module_function
def normalize_visible_value(value)
case value
when true, false
value
when nil
false
when Numeric
value != 0
when String
v = value.strip.downcase
return false if v.empty? || v == '0' || v == 'false' || v == 'nil' || v == 'off' || v == 'no'
true
else
!!value
end
end
def patch_visible_writer(klass)
return unless klass.instance_methods.include?(:visible=)
return if klass.instance_methods.include?(:mkxpz_visible_without_boolfix=)
klass.class_eval do
alias_method :mkxpz_visible_without_boolfix=, :visible=
define_method(:visible=) do |value|
send(:mkxpz_visible_without_boolfix=, MKXPZVisibleBoolFix.normalize_visible_value(value))
end
end
end
end
[Sprite, Plane, Window, Viewport].each do |klass|
begin
MKXPZVisibleBoolFix.patch_visible_writer(klass)
rescue StandardError => e
p "[mkxp-z boolfix] failed to patch #{klass}: #{e.class}: #{e.message}"
end
end
p '[mkxp-z boolfix] visible= compatibility patch loaded'
+260
View File
@@ -0,0 +1,260 @@
module MKXPZTimeStep
DEFAULT_FRAME_RATE = 60.0
MAX_FRAME_SCALE = 4.0
module_function
def current_frame_rate
rate = Graphics.frame_rate.to_f rescue DEFAULT_FRAME_RATE
rate = DEFAULT_FRAME_RATE if rate <= 0.0
rate
end
def default_delta
1.0 / current_frame_rate
end
def monotonic_now
Process.clock_gettime(Process::CLOCK_MONOTONIC)
rescue StandardError
Time.now.to_f
end
def sanitize_delta(delta)
return default_delta if delta.nil?
return default_delta if delta <= 0.0
return default_delta unless delta.finite?
[delta, 0.25].min
end
def frame_scale
scale = Graphics.delta.to_f * current_frame_rate
return 1.0 if scale <= 0.0
return 1.0 unless scale.finite?
[scale, MAX_FRAME_SCALE].min
end
def adjust_duration(value)
return 0 if value.nil? || value <= 0
adjusted = value + 1.0 - frame_scale
return 1 if adjusted > 0 && adjusted < 1
[adjusted, 0].max
end
end
class << Graphics
alias mkxpz_time_step_update update
def update(*args, &block)
now = MKXPZTimeStep.monotonic_now
last = @mkxpz_time_step_last_tick
@mkxpz_time_step_last_tick = now
@mkxpz_time_step_delta = if last
MKXPZTimeStep.sanitize_delta(now - last)
else
MKXPZTimeStep.default_delta
end
mkxpz_time_step_update(*args, &block)
end
def delta
@mkxpz_time_step_delta || MKXPZTimeStep.default_delta
end
def frame_time_scale
MKXPZTimeStep.frame_scale
end
end
class Game_CharacterBase
alias mkxpz_time_step_distance_per_frame distance_per_frame
def distance_per_frame(*args, &block)
mkxpz_time_step_distance_per_frame(*args, &block) * Graphics.frame_time_scale
end
end
class Spriteset_Weather
def update_sprite_rain(sprite)
scale = Graphics.frame_time_scale
sprite.bitmap = @rain_bitmap
sprite.x -= scale
sprite.y += scale * 6
sprite.opacity -= scale * 12
end
def update_sprite_storm(sprite)
scale = Graphics.frame_time_scale
sprite.bitmap = @storm_bitmap
sprite.x -= scale * 3
sprite.y += scale * 6
sprite.opacity -= scale * 12
end
def update_sprite_snow(sprite)
scale = Graphics.frame_time_scale
sprite.bitmap = @snow_bitmap
sprite.x -= scale
sprite.y += scale * 3
sprite.opacity -= scale * 12
end
end
class Game_Map
alias mkxpz_time_step_scroll_distance scroll_distance
def scroll_distance(*args, &block)
mkxpz_time_step_scroll_distance(*args, &block) * Graphics.frame_time_scale
end
def update_parallax
scale = Graphics.frame_time_scale
sx = (@parallax_sx / 64.0) * scale
sy = (@parallax_sy / 64.0) * scale
@parallax_x += sx if @parallax_loop_x
@parallax_y += sy if @parallax_loop_y
end
end
class Game_Picture
alias mkxpz_time_step_update_move update_move
alias mkxpz_time_step_update_tone_change update_tone_change
def update_move(*args, &block)
active = @duration != 0
mkxpz_time_step_update_move(*args, &block)
return unless active
return if @duration == 0
@duration = MKXPZTimeStep.adjust_duration(@duration)
end
def update_tone_change(*args, &block)
active = @tone_duration != 0
mkxpz_time_step_update_tone_change(*args, &block)
return unless active
return if @tone_duration == 0
@tone_duration = MKXPZTimeStep.adjust_duration(@tone_duration)
end
def update_rotate
return if @rotate_speed == 0
@angle += (@rotate_speed / 2.0) * Graphics.frame_time_scale
@angle += 360 while @angle < 0
@angle %= 360
end
end
class Game_Screen
alias mkxpz_time_step_update_fadeout update_fadeout
alias mkxpz_time_step_update_fadein update_fadein
alias mkxpz_time_step_update_tone update_tone
alias mkxpz_time_step_update_flash update_flash
alias mkxpz_time_step_update_shake update_shake
def update_fadeout(*args, &block)
active = @fadeout_duration != 0
mkxpz_time_step_update_fadeout(*args, &block)
return unless active
return if @fadeout_duration == 0
@fadeout_duration = MKXPZTimeStep.adjust_duration(@fadeout_duration)
end
def update_fadein(*args, &block)
active = @fadein_duration != 0
mkxpz_time_step_update_fadein(*args, &block)
return unless active
return if @fadein_duration == 0
@fadein_duration = MKXPZTimeStep.adjust_duration(@fadein_duration)
end
def update_tone(*args, &block)
active = @tone_duration != 0
mkxpz_time_step_update_tone(*args, &block)
return unless active
return if @tone_duration == 0
@tone_duration = MKXPZTimeStep.adjust_duration(@tone_duration)
end
def update_flash(*args, &block)
active = @flash_duration != 0
mkxpz_time_step_update_flash(*args, &block)
return unless active
return if @flash_duration == 0
@flash_duration = MKXPZTimeStep.adjust_duration(@flash_duration)
end
def update_shake(*args, &block)
active = @shake_duration != 0
mkxpz_time_step_update_shake(*args, &block)
return unless active
return if @shake_duration == 0
@shake_duration = MKXPZTimeStep.adjust_duration(@shake_duration)
end
def update_weather
return unless @weather_duration > 0
duration = @weather_duration.to_f
@weather_power = (@weather_power * (duration - 1.0) + @weather_power_target) / duration
@weather_duration = MKXPZTimeStep.adjust_duration(@weather_duration)
@weather_type = :none if @weather_duration <= 0 && @weather_power_target == 0
end
end
class Game_Timer
def update
return unless @working
return if @chkMode
return unless @count > 0
@count -= Graphics.frame_time_scale
off if @count <= 0
end
def sec
seconds = @count.to_f / MKXPZTimeStep.current_frame_rate
[seconds.ceil, 0].max
end
end
class Window_Message
unless method_defined?(:mkxpz_time_step_update_fiber)
alias mkxpz_time_step_update_fiber update_fiber
end
def update_fiber(*args, &block)
@mkxpz_message_char_budget = [@mkxpz_message_char_budget.to_f, 0.0].max + Graphics.frame_time_scale
mkxpz_time_step_update_fiber(*args, &block)
end
def wait(duration)
return if timeout?
remaining = duration.to_f
while remaining > 0.0
remaining -= Graphics.frame_time_scale
Fiber.yield if remaining > 0.0
end
end
def wait_for_one_character
update_show_fast
return if @show_fast || @line_show_fast
@mkxpz_message_char_budget = [@mkxpz_message_char_budget.to_f, 1.0].max - 1.0
Fiber.yield if @mkxpz_message_char_budget < 1.0
end
end
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,320 @@
# encoding: UTF-8
#==============================================================================
# NoerHomeCatKick 1.0.0
# Separate client-side add-on for the NoerHome cat.
# Adds "Пнуть" to the existing cat menu. After a kick the local cat runs away
# from the player and refuses interaction for 60 real seconds.
# Does not alter saves, server core, ClanEstate, chat or PvP.
#==============================================================================
return unless defined?(NoerHomeCat)
module NoerHomeCat
KICK_AVOID_SECONDS = 60.0 unless const_defined?(:KICK_AVOID_SECONDS)
KICK_FLEE_DISTANCE = 7 unless const_defined?(:KICK_FLEE_DISTANCE)
KICK_MOVE_SPEED = 5 unless const_defined?(:KICK_MOVE_SPEED)
def self.kick_now
Time.now.to_f
rescue
0.0
end
def self.kick_target_character
target = @noerhome_kick_target
return target if target && (@noerhome_kick_map_id.to_i == ($game_map.map_id rescue -1).to_i)
if current_follow_enabled?
follower_character(false)
else
current_cat_event
end
rescue
nil
end
def self.finish_kick_avoid
target = @noerhome_kick_target
begin
if target && target.instance_variable_defined?(:@noerhome_kick_old_move_speed)
old_speed = target.instance_variable_get(:@noerhome_kick_old_move_speed)
target.move_speed = old_speed.to_i if target.respond_to?(:move_speed=) && !old_speed.nil?
target.remove_instance_variable(:@noerhome_kick_old_move_speed) rescue nil
end
rescue
end
@noerhome_kick_until = nil
@noerhome_kick_target = nil
@noerhome_kick_map_id = nil
@noerhome_kick_next_step = nil
true
rescue
false
end
def self.kick_avoiding?
until_t = @noerhome_kick_until.to_f
return false if until_t <= 0.0
# The command is specifically a house interaction. Leaving the map cancels
# the temporary behavior instead of leaking it into unrelated maps.
if @noerhome_kick_map_id && $game_map && @noerhome_kick_map_id.to_i != $game_map.map_id.to_i
finish_kick_avoid
return false
end
if kick_now >= until_t
finish_kick_avoid
return false
end
true
rescue
false
end
def self.kick_seconds_left
return 0.0 unless kick_avoiding?
[@noerhome_kick_until.to_f - kick_now, 0.0].max
rescue
0.0
end
def self.kick_avoiding_character?(character)
return false unless kick_avoiding?
target = kick_target_character
!target.nil? && target.equal?(character)
rescue
false
end
def self.prepare_kick_target(target)
return if target.nil?
begin
unless target.instance_variable_defined?(:@noerhome_kick_old_move_speed)
target.instance_variable_set(:@noerhome_kick_old_move_speed, (target.move_speed rescue 4))
end
target.move_speed = KICK_MOVE_SPEED if target.respond_to?(:move_speed=)
rescue
end
end
def self.start_kick_avoid(target=nil)
finish_kick_avoid if @noerhome_kick_until
target ||= if current_follow_enabled?
follower_character(false)
else
current_cat_event
end
return false if target.nil?
@noerhome_kick_target = target
@noerhome_kick_map_id = ($game_map.map_id rescue nil)
@noerhome_kick_until = kick_now + KICK_AVOID_SECONDS.to_f
@noerhome_kick_next_step = 0.0
prepare_kick_target(target)
# Immediate first recoil after the menu closes.
kick_escape_step(true)
true
rescue
false
end
def self.kick_distance_to_player(target=nil)
target ||= kick_target_character
return 999 if target.nil? || $game_player.nil?
dx = target.distance_x_from($game_player.x).abs rescue (target.x.to_i - $game_player.x.to_i).abs
dy = target.distance_y_from($game_player.y).abs rescue (target.y.to_i - $game_player.y.to_i).abs
dx.to_i + dy.to_i
rescue
999
end
def self.kick_escape_step(force=false)
return false unless kick_avoiding?
target = kick_target_character
return false if target.nil? || $game_player.nil?
return false if target.respond_to?(:moving?) && target.moving?
now = kick_now
return false if !force && now < @noerhome_kick_next_step.to_f
@noerhome_kick_next_step = now + 0.10
distance = kick_distance_to_player(target)
if force || distance <= KICK_FLEE_DISTANCE.to_i
begin
# move_away_from_player does nothing if both occupy exactly one tile.
if target.x.to_i == $game_player.x.to_i && target.y.to_i == $game_player.y.to_i
target.turn_random if target.respond_to?(:turn_random)
target.move_forward if target.respond_to?(:move_forward)
elsif target.respond_to?(:move_away_from_player)
target.move_away_from_player
elsif target.respond_to?(:move_away_from_character)
target.move_away_from_character($game_player)
end
rescue
end
else
begin
target.turn_away_from_player if target.respond_to?(:turn_away_from_player)
rescue
end
end
true
rescue
false
end
class << self
if method_defined?(:drive_follower) && !method_defined?(:noerhome_cat_kick_drive_follower_without_flee)
alias_method :noerhome_cat_kick_drive_follower_without_flee, :drive_follower
end
if method_defined?(:update_runtime) && !method_defined?(:noerhome_cat_kick_update_runtime_without_flee)
alias_method :noerhome_cat_kick_update_runtime_without_flee, :update_runtime
end
if method_defined?(:request_menu) && !method_defined?(:noerhome_cat_kick_request_menu_without_block)
alias_method :noerhome_cat_kick_request_menu_without_block, :request_menu
end
end
if respond_to?(:noerhome_cat_kick_drive_follower_without_flee)
def self.drive_follower
if kick_avoiding? && current_follow_enabled?
follower = follower_character(false)
@noerhome_kick_target = follower if follower
prepare_kick_target(follower)
kick_escape_step(false)
return
end
noerhome_cat_kick_drive_follower_without_flee
end
end
if respond_to?(:noerhome_cat_kick_update_runtime_without_flee)
def self.update_runtime
noerhome_cat_kick_update_runtime_without_flee
if kick_avoiding? && !current_follow_enabled?
event = current_cat_event
@noerhome_kick_target = event if event
prepare_kick_target(event)
kick_escape_step(false)
end
end
end
if respond_to?(:noerhome_cat_kick_request_menu_without_block)
def self.request_menu(target=nil)
return false if kick_avoiding?
noerhome_cat_kick_request_menu_without_block(target)
end
end
end
# Stop the house cat's normal autonomous movement while it is scared. This is
# what makes "avoid the player" reliable instead of fighting the event's normal
# random movement route.
if defined?(Game_Event)
class Game_Event
if method_defined?(:update_self_movement) && !method_defined?(:noerhome_cat_kick_update_self_movement_without_flee)
alias noerhome_cat_kick_update_self_movement_without_flee update_self_movement
end
if method_defined?(:noerhome_cat_kick_update_self_movement_without_flee)
def update_self_movement
begin
if defined?(NoerHomeCat) && NoerHomeCat.respond_to?(:kick_avoiding_character?) &&
NoerHomeCat.kick_avoiding_character?(self)
NoerHomeCat.kick_escape_step(false)
return
end
rescue
end
noerhome_cat_kick_update_self_movement_without_flee
end
end
end
end
if defined?(Game_Interpreter)
class Game_Interpreter
if method_defined?(:noerhome_cat_pick_from_sheet) && !method_defined?(:noerhome_cat_kick_pick_from_sheet_without_command)
alias noerhome_cat_kick_pick_from_sheet_without_command noerhome_cat_pick_from_sheet
end
if method_defined?(:noerhome_cat_main_menu) && !method_defined?(:noerhome_cat_kick_main_menu_without_scared_block)
alias noerhome_cat_kick_main_menu_without_scared_block noerhome_cat_main_menu
end
def noerhome_cat_kick_main_sheet?(sheet)
return false unless sheet.is_a?(Array)
commands = sheet.map { |row| row.is_a?(Array) ? row[1].to_s : "" }
%w[Pet Color Effect Music Follow Decor Cancel].all? { |cmd| commands.include?(cmd) }
rescue
false
end
if method_defined?(:noerhome_cat_kick_pick_from_sheet_without_command)
def noerhome_cat_pick_from_sheet(cmd_sheet, target=nil)
sheet = cmd_sheet
if noerhome_cat_kick_main_sheet?(cmd_sheet)
sheet = cmd_sheet.map { |row| row.is_a?(Array) ? row.dup : row }
unless sheet.any? { |row| row.is_a?(Array) && row[1].to_s == "Kick" }
cancel_idx = sheet.index { |row| row.is_a?(Array) && row[1].to_s == "Cancel" } || sheet.length
title = begin
NoerHomeCat.text("CatMenu/Kick", "Пнуть")
rescue
"Пнуть"
end
sheet.insert(cancel_idx, [title, "Kick"])
end
end
picked = noerhome_cat_kick_pick_from_sheet_without_command(sheet, target)
if picked.to_s == "Kick"
noerhome_cat_kick(target)
# The original main-menu case statement does not know this command;
# return a private marker so it simply closes after the kick.
return "__NoerHomeCatKickDone__"
end
picked
end
end
if method_defined?(:noerhome_cat_kick_main_menu_without_scared_block)
def noerhome_cat_main_menu(target=nil)
begin
if NoerHomeCat.kick_avoiding?
SndLib.sys_buzzer rescue nil
return false
end
rescue
end
noerhome_cat_kick_main_menu_without_scared_block(target)
end
end
def noerhome_cat_kick(target=nil)
begin
SndLib.sound_punch_hit(70, 100) if SndLib.respond_to?(:sound_punch_hit)
rescue
end
begin
SndLib.catHurt(85, 120) if SndLib.respond_to?(:catHurt)
rescue
end
target ||= begin
NoerHomeCat.current_follow_enabled? ? NoerHomeCat.follower_character(false) : NoerHomeCat.current_cat_event
rescue
nil
end
NoerHomeCat.start_kick_avoid(target)
true
rescue
false
end
end
end
puts "[NOERHOME-CAT-KICK] loaded v1.0.0; command=Пнуть avoid=60s" rescue nil
@@ -0,0 +1,742 @@
# encoding: UTF-8
#==============================================================================
# PvPCombatUXFix 1.1.0
# - suppresses vanilla low-stamina / overfatigue cutscenes when stamina was
# exhausted by another player in PvP;
# - highlights the current PvP aggressor red only on the victim's client.
#
# Client-only. Does not alter damage, stamina, capture/slavery, saves, chat,
# ClanEstate, or server state.
#==============================================================================
return unless defined?(WebSocket)
module WebSocket
MP_PVP_AGGRESSOR_HOLD_SEC = 8.0 unless const_defined?(:MP_PVP_AGGRESSOR_HOLD_SEC)
class << self
if method_defined?(:_mp_pvp_apply_skill_payload) && !method_defined?(:_mp_ux_old_apply_skill_payload)
alias_method :_mp_ux_old_apply_skill_payload, :_mp_pvp_apply_skill_payload
end
if method_defined?(:handle_being_attacked) && !method_defined?(:_mp_ux_old_handle_being_attacked)
alias_method :_mp_ux_old_handle_being_attacked, :handle_being_attacked
end
end
def self._mp_ux_now
Time.now.to_f
rescue
0.0
end
def self._mp_ux_local_actor
begin
return _mp_pvp_local_actor if respond_to?(:_mp_pvp_local_actor)
rescue
end
begin
return _mp_local_actor if respond_to?(:_mp_local_actor)
rescue
end
begin
return $game_player.actor if $game_player && $game_player.respond_to?(:actor)
rescue
end
begin
return $game_party.leader
rescue
end
nil
end
def self._mp_ux_actor_sta(actor=nil)
actor ||= _mp_ux_local_actor
return nil if actor.nil? || !actor.respond_to?(:sta)
actor.sta.to_f
rescue
nil
end
# Called before an incoming PvP hit is applied. This makes the suppression
# active even if the original damage code performs a nested player refresh.
def self._mp_ux_begin_incoming(attacker_id)
@mp_ux_incoming_depth = @mp_ux_incoming_depth.to_i + 1
@mp_ux_incoming_attacker = attacker_id.to_i
rescue
end
def self._mp_ux_finish_incoming(attacker_id, before_sta=nil, after_sta=nil)
aid = attacker_id.to_i
# Mark attacker for victim-only red tint. Refresh on every received hit.
if aid > 0
@mp_ux_aggressors ||= {}
@mp_ux_aggressors[aid] = _mp_ux_now + MP_PVP_AGGRESSOR_HOLD_SEC.to_f
end
# If the incoming player hit leaves us with no stamina, remember that this
# exhaustion belongs to PvP. Keep the latch until stamina is positive again
# so the vanilla scene cannot pop a few seconds later after combat TTL ends.
cur = after_sta
cur = _mp_ux_actor_sta if cur.nil?
if !cur.nil? && cur.to_f <= 0.0
@mp_ux_pvp_exhausted = true
@mp_ux_pvp_exhausted_by = aid if aid > 0
end
rescue
ensure
@mp_ux_incoming_depth = [@mp_ux_incoming_depth.to_i - 1, 0].max
@mp_ux_incoming_attacker = nil if @mp_ux_incoming_depth.to_i <= 0
end
def self.mp_pvp_stamina_cutscene_suppressed?
# Suppress during the actual incoming damage call too.
return true if @mp_ux_incoming_depth.to_i > 0
actor = _mp_ux_local_actor
return false if actor.nil?
sta = _mp_ux_actor_sta(actor)
return false if sta.nil?
# Recovery clears the PvP exhaustion latch. A later normal exhaustion may
# therefore use the vanilla low-stamina event as usual.
if sta.to_f > 0.0
@mp_ux_pvp_exhausted = false
@mp_ux_pvp_exhausted_by = nil
return false
end
@mp_ux_pvp_exhausted ? true : false
rescue
false
end
def self.mp_pvp_aggressor?(player_id)
pid = player_id.to_i
return false if pid <= 0
@mp_ux_aggressors ||= {}
until_t = @mp_ux_aggressors[pid]
return false if until_t.nil?
if until_t.to_f <= _mp_ux_now
@mp_ux_aggressors.delete(pid)
return false
end
true
rescue
false
end
# Extended PvP skill payload path (98_pvp_skill_sync.rb).
if respond_to?(:_mp_ux_old_apply_skill_payload)
def self._mp_pvp_apply_skill_payload(attacker_id, payload_hash)
return false if defined?(MPSafeZone) && MPSafeZone.active?
actor = _mp_ux_local_actor
before_sta = _mp_ux_actor_sta(actor)
_mp_ux_begin_incoming(attacker_id)
result = false
begin
result = _mp_ux_old_apply_skill_payload(attacker_id, payload_hash)
ensure
after_sta = _mp_ux_actor_sta(actor)
_mp_ux_finish_incoming(attacker_id, before_sta, after_sta)
end
result
end
end
# Legacy / basic attack path. 98_pvp_skill_sync also routes fallback hits here.
if respond_to?(:_mp_ux_old_handle_being_attacked)
def self.handle_being_attacked(attacker_id, damage, opts=nil)
return if defined?(MPSafeZone) && MPSafeZone.active?
actor = _mp_ux_local_actor
before_sta = _mp_ux_actor_sta(actor)
_mp_ux_begin_incoming(attacker_id)
result = nil
begin
begin
result = _mp_ux_old_handle_being_attacked(attacker_id, damage, opts)
rescue ArgumentError
result = _mp_ux_old_handle_being_attacked(attacker_id, damage)
end
ensure
after_sta = _mp_ux_actor_sta(actor)
_mp_ux_finish_incoming(attacker_id, before_sta, after_sta)
end
result
end
end
end
#------------------------------------------------------------------------------
# Vanilla stamina events
# check_MainStats_event contains BOTH:
# sta <= -100 -> OverEvent_Overfatigue.rb
# sta <= 0 -> low-stamina portrait/dialogue
# We only bypass it while health is still positive and exhaustion is PvP-owned.
# Health-death handling remains untouched.
#------------------------------------------------------------------------------
if defined?(Game_Interpreter) && Game_Interpreter.instance_methods.include?(:check_MainStats_event)
class Game_Interpreter
unless instance_methods.include?(:mp_pvp_ux_old_check_MainStats_event)
alias mp_pvp_ux_old_check_MainStats_event check_MainStats_event
end
def check_MainStats_event(parallel=false)
begin
if defined?(WebSocket) && WebSocket.respond_to?(:mp_pvp_stamina_cutscene_suppressed?) &&
WebSocket.mp_pvp_stamina_cutscene_suppressed? &&
defined?($game_player) && $game_player && $game_player.respond_to?(:actor) &&
$game_player.actor && $game_player.actor.respond_to?(:health) &&
$game_player.actor.respond_to?(:sta) &&
$game_player.actor.health.to_f > 0.0 && $game_player.actor.sta.to_f <= 0.0
return
end
rescue
end
mp_pvp_ux_old_check_MainStats_event(parallel)
end
end
end
#------------------------------------------------------------------------------
# Victim-only aggressor highlight.
# Remote players are Game_Event objects with @net_player_id. We tint only their
# character sprite, not the nickname/status UI. No packet is sent to server.
#------------------------------------------------------------------------------
if defined?(Sprite_Character)
class Sprite_Character
unless instance_methods.include?(:mp_pvp_ux_old_update)
alias mp_pvp_ux_old_update update
end
def update
mp_pvp_ux_old_update
mp_pvp_ux_update_aggressor_tint
end
def mp_pvp_ux_update_aggressor_tint
pid = 0
begin
if @character && @character.instance_variable_defined?(:@net_player_id)
pid = @character.instance_variable_get(:@net_player_id).to_i
end
rescue
pid = 0
end
active = false
begin
active = pid > 0 && defined?(WebSocket) && WebSocket.respond_to?(:mp_pvp_aggressor?) && WebSocket.mp_pvp_aggressor?(pid)
rescue
active = false
end
if active
unless @mp_pvp_ux_red_tint
begin
c = self.color
@mp_pvp_ux_saved_color = [c.red, c.green, c.blue, c.alpha]
rescue
@mp_pvp_ux_saved_color = [0, 0, 0, 0]
end
@mp_pvp_ux_red_tint = true
end
begin
self.color.set(255, 0, 0, 112)
rescue
self.color = Color.new(255, 0, 0, 112) rescue nil
end
elsif @mp_pvp_ux_red_tint
vals = @mp_pvp_ux_saved_color || [0, 0, 0, 0]
begin
self.color.set(vals[0], vals[1], vals[2], vals[3])
rescue
self.color = Color.new(vals[0], vals[1], vals[2], vals[3]) rescue nil
end
@mp_pvp_ux_red_tint = false
@mp_pvp_ux_saved_color = nil
end
rescue
end
end
end
puts "[PVP-UX] loaded 1.0.0; PvP stamina cutscenes suppressed, aggressor tint active" rescue nil
#==============================================================================
# PvPCombatUXFix 1.1.0 additions
# 1) STA <= -100 from PvP is NOT treated as Lona death while HEALTH > 0.
# This fixes the old "first exhausted hit works, further HP damage stops until
# map reload" bug caused by Game_Actor#lonaDeath? short-circuiting PvP hits.
# 2) Victim pushes a lightweight player-stat sync after every PvP hit.
# 3) Attacker sees the same flying HEALTH/STA numbers above the remote target.
# 4) Attacker keeps a local mirror of the remote target HEALTH/STA so advanced
# PvP skill calculations do not use a stale map-entry snapshot.
#==============================================================================
module WebSocket
def self.mp_pvp_local_exhaustion_alive?(actor=nil)
actor ||= _mp_ux_local_actor rescue nil
return false if actor.nil?
begin
local = _mp_ux_local_actor
return false unless actor.equal?(local)
rescue
return false
end
hp = actor.respond_to?(:health) ? actor.health.to_f : 0.0
sta = actor.respond_to?(:sta) ? actor.sta.to_f : 0.0
return false unless hp > 0.0 && sta <= -100.0
# During the incoming hit the latch may not have been set yet. Afterwards
# @mp_ux_pvp_exhausted keeps the exception alive until stamina recovers.
@mp_ux_incoming_depth.to_i > 0 || !!@mp_ux_pvp_exhausted
rescue
false
end
def self._mp_ux_sync_local_stats_after_hit
begin
send_playersync_full("pvp_damage", true) if respond_to?(:send_playersync_full)
rescue
end
end
def self._mp_ux_remote_actor(player_id)
pid = player_id.to_i
return nil if pid <= 0 || !@players || !@players[pid]
rp = @players[pid]
begin
return rp.actor if rp.respond_to?(:actor)
rescue
end
begin
return rp.instance_variable_get(:@net_actor)
rescue
end
nil
rescue
nil
end
def self._mp_ux_apply_remote_damage_mirror(target_id, hp_damage, sta_damage)
actor = _mp_ux_remote_actor(target_id)
return false if actor.nil?
hd = hp_damage.to_i
sd = sta_damage.to_i
begin
if hd > 0 && actor.respond_to?(:health) && actor.respond_to?(:health=)
cur = actor.health
actor.health = cur.to_f - hd.to_f unless cur.nil?
end
rescue
end
begin
if sd > 0 && actor.respond_to?(:sta) && actor.respond_to?(:sta=)
cur = actor.sta
actor.sta = cur.to_f - sd.to_f unless cur.nil?
end
rescue
end
true
rescue
false
end
def self._mp_ux_show_outgoing_popups(x, y, direction, hp_damage, sta_damage)
return unless defined?($game_damage_popups) && $game_damage_popups
hd = hp_damage.to_i
sd = sta_damage.to_i
dir = direction.to_i
dir = 2 unless [2,4,6,8].include?(dir)
begin
$game_damage_popups.add(hd, x.to_i, y.to_i, dir, MP_PVP_POPUP_HP_TYPE) if hd > 0
rescue
end
begin
$game_damage_popups.add(sd, x.to_i, y.to_i, dir, MP_PVP_POPUP_STA_TYPE) if sd > 0
rescue
end
end
class << self
# WebSocket.parse is installed with prepend at the end of this file. Using
# alias here can recurse if ClanEstate already prepended its parser during a
# mobile loading-frame Graphics.update.
if method_defined?(:send_deistvia) && !method_defined?(:mp_pvp_ux11_send_deistvia_without_outgoing_popup)
alias_method :mp_pvp_ux11_send_deistvia_without_outgoing_popup, :send_deistvia
end
end
# Extended PvP skills already know their exact hp/sta deltas in payload.
# The server excludes the sender from deistvia relay, so render/mirror here.
def self._mp_ux_payload_is_heal?(payload)
return false if payload.nil?
if payload.is_a?(Hash)
return true if payload["heal"].to_s == "1"
return true if payload["sup"].to_s == "1" && (
payload["skill_name"].to_s.include?("NunHeal") ||
payload["skill"].to_s.include?("NunHeal") ||
payload["hp"].to_i < 0 || payload["sta"].to_i < 0
)
return true if payload["skill_name"].to_s == "BasicNunHeal"
return false
end
s = payload.to_s
return true if s.include?("heal=1")
return true if s.include?("BasicNunHeal")
return true if s.include?("sup=1") && (s.include?("NunHeal") || s.include?("hp=-") || s.include?("sta=-"))
false
rescue
false
end
if respond_to?(:mp_pvp_ux11_send_deistvia_without_outgoing_popup)
def self.send_deistvia(action_id, phase, payload)
begin
if action_id.to_s == "pvp_skill_hit" && phase.to_s != "stop" && payload.is_a?(Hash)
target_id = (payload["target"] || payload["tgt"] || payload["target_id"]).to_i
if target_id > 0 && (!@my_id || target_id != @my_id.to_i)
hp_raw = (payload["hp"] || 0).to_i
sta_raw = (payload["sta"] || 0).to_i
tx = (payload["tx"] || 0).to_i
ty = (payload["ty"] || 0).to_i
dir = ($game_player.direction rescue 2)
if _mp_ux_payload_is_heal?(payload)
# Heal amounts may be positive (heal=1) or negative (stock deltas).
hh = hp_raw.abs
sh = sta_raw.abs
begin
if defined?($game_damage_popups) && $game_damage_popups
$game_damage_popups.add(hh, tx, ty, dir, (defined?(MP_PVP_POPUP_PLUS_HP_TYPE) ? MP_PVP_POPUP_PLUS_HP_TYPE : 10)) if hh > 0
$game_damage_popups.add(sh, tx, ty, dir, (defined?(MP_PVP_POPUP_PLUS_STA_TYPE) ? MP_PVP_POPUP_PLUS_STA_TYPE : 11)) if sh > 0
end
rescue
end
# Mirror heal onto local remote actor preview (add, don't subtract).
begin
actor = _mp_ux_remote_actor(target_id)
if actor
actor.health = actor.health.to_f + hh if hh > 0 && actor.respond_to?(:health=)
actor.sta = actor.sta.to_f + sh if sh > 0 && actor.respond_to?(:sta=)
end
rescue
end
else
_mp_ux_show_outgoing_popups(tx, ty, dir, hp_raw, sta_raw)
_mp_ux_apply_remote_damage_mirror(target_id, hp_raw, sta_raw)
end
end
end
rescue
end
mp_pvp_ux11_send_deistvia_without_outgoing_popup(action_id, phase, payload)
end
end
end
# PvP stamina exhaustion must not trip the stock death predicate. Without this,
# multiplayer/04_remote_players.rb returns before applying the next hit whenever
# STA <= -100, which is why HP starts decreasing again only after a map reload.
if defined?(Game_Actor)
class Game_Actor
if method_defined?(:lonaDeath?) && !method_defined?(:mp_pvp_ux11_lonaDeath_without_fix)
alias_method :mp_pvp_ux11_lonaDeath_without_fix, :lonaDeath?
def lonaDeath?
begin
if defined?(WebSocket) && WebSocket.respond_to?(:mp_pvp_local_exhaustion_alive?) &&
WebSocket.mp_pvp_local_exhaustion_alive?(self)
return false
end
rescue
end
mp_pvp_ux11_lonaDeath_without_fix
end
end
if method_defined?(:determine_death) && !method_defined?(:mp_pvp_ux11_determine_death_without_fix)
alias_method :mp_pvp_ux11_determine_death_without_fix, :determine_death
def determine_death
begin
if defined?(WebSocket) && WebSocket.respond_to?(:mp_pvp_local_exhaustion_alive?) &&
WebSocket.mp_pvp_local_exhaustion_alive?(self)
# If an older hit already put the actor in :death solely because of
# stamina, recover the action state. HEALTH death is never masked.
if respond_to?(:health) && health.to_f > 0.0
begin
set_action_state(:none, true) if respond_to?(:set_action_state) && respond_to?(:action_state) && action_state == :death
rescue
end
return
end
end
rescue
end
mp_pvp_ux11_determine_death_without_fix
end
end
end
end
# Add the lightweight stat broadcast to the already-installed incoming-hit
# finalizer without changing cloud-save behavior.
module WebSocket
class << self
if method_defined?(:_mp_ux_finish_incoming) && !method_defined?(:mp_pvp_ux11_finish_incoming_without_stat_sync)
alias_method :mp_pvp_ux11_finish_incoming_without_stat_sync, :_mp_ux_finish_incoming
end
end
if respond_to?(:mp_pvp_ux11_finish_incoming_without_stat_sync)
def self._mp_ux_finish_incoming(attacker_id, before_sta=nil, after_sta=nil)
result = mp_pvp_ux11_finish_incoming_without_stat_sync(attacker_id, before_sta, after_sta)
_mp_ux_sync_local_stats_after_hit
result
end
end
end
puts "[PVP-UX] loaded v1.1.0; PvP exhaustion stays alive, outgoing damage popups + stat sync active" rescue nil
#==============================================================================
# PvPCombatUXFix 1.3.0 additions
# - mark the aggressor directly from authoritative network traffic;
# - show a separate red aura BEHIND the aggressor on the victim's client;
# - do not recolor/tint the aggressor character itself.
#==============================================================================
module WebSocket
MP_PVP_AGGRESSOR_HOLD_SEC = 8.0 unless const_defined?(:MP_PVP_AGGRESSOR_HOLD_SEC)
def self.mp_pvp_mark_aggressor(player_id, seconds=nil)
pid = player_id.to_i
return false if pid <= 0
hold = seconds.nil? ? MP_PVP_AGGRESSOR_HOLD_SEC.to_f : seconds.to_f
hold = MP_PVP_AGGRESSOR_HOLD_SEC.to_f if hold <= 0.0
@mp_ux_aggressors ||= {}
@mp_ux_aggressors[pid] = _mp_ux_now + hold
puts "[PVP-UX] aggressor aura pid=#{pid} hold=#{hold}" rescue nil
true
rescue
false
end
class << self
if method_defined?(:handle_remote_deistvia) && !method_defined?(:mp_pvp_ux13_remote_deistvia_without_aggressor_mark)
alias_method :mp_pvp_ux13_remote_deistvia_without_aggressor_mark, :handle_remote_deistvia
end
end
if respond_to?(:mp_pvp_ux13_remote_deistvia_without_aggressor_mark)
def self.handle_remote_deistvia(player_id, action_id, phase, payload)
# Safe zone: block hostile PvP hits, but always allow support heals
# (BasicNunHeal / sup=1 / heal=1). The old blanket return prevented
# Исцеление души from ever applying on the receiver.
if action_id.to_s == "pvp_skill_hit" && defined?(MPSafeZone) && MPSafeZone.active?
allow_heal = _mp_ux_payload_is_heal?(payload)
return unless allow_heal
end
begin
if action_id.to_s == "pvp_skill_hit" && phase.to_s != "stop"
target_id = 0
if payload.is_a?(Hash)
target_id = (payload["target"] || payload["tgt"] || payload["target_id"]).to_i
elsif payload.is_a?(String)
begin
h = respond_to?(:_deistvia_unpack) ? _deistvia_unpack(payload.to_s) : {}
target_id = (h["target"] || h["tgt"] || h["target_id"]).to_i
rescue
target_id = 0
end
end
# Do not mark heal casters as aggressors.
unless _mp_ux_payload_is_heal?(payload)
if @my_id && target_id == @my_id.to_i && player_id.to_i != @my_id.to_i
mp_pvp_mark_aggressor(player_id.to_i)
end
end
end
rescue
end
mp_pvp_ux13_remote_deistvia_without_aggressor_mark(player_id, action_id, phase, payload)
end
end
end
# Runtime-generated pixel aura. A single cached bitmap is shared by all remote
# character sprites, so there is no per-frame bitmap allocation.
module MPPvPAggressorAura
WIDTH = 52
HEIGHT = 58
def self.bitmap
return @bitmap if @bitmap && !(@bitmap.disposed? rescue false)
bmp = Bitmap.new(WIDTH, HEIGHT)
cx = (WIDTH - 1) / 2.0
cy = (HEIGHT - 1) / 2.0
rx = WIDTH * 0.46
ry = HEIGHT * 0.46
y = 0
while y < HEIGHT
x = 0
while x < WIDTH
dx = (x - cx) / rx
dy = (y - cy) / ry
d = Math.sqrt(dx * dx + dy * dy)
alpha = 0
# A hollow halo: brightest around the character silhouette, fading both
# inward and outward. The character itself stays completely untinted.
if d >= 0.48 && d <= 1.08
ring = 1.0 - ((d - 0.76).abs / 0.32)
ring = 0.0 if ring < 0.0
alpha = (ring * 118.0).to_i
end
# Small ground glow behind the feet.
if y >= HEIGHT - 12
gx = (x - cx).abs / (WIDTH * 0.42)
gy = (y - (HEIGHT - 7)).abs / 7.0
gd = gx * gx + gy * gy
if gd <= 1.0
g_alpha = ((1.0 - gd) * 72.0).to_i
alpha = g_alpha if g_alpha > alpha
end
end
bmp.set_pixel(x, y, Color.new(255, 24, 24, alpha)) if alpha > 0
x += 1
end
y += 1
end
@bitmap = bmp
rescue
nil
end
end
if defined?(Sprite_Character)
class Sprite_Character
if method_defined?(:dispose) && !method_defined?(:mp_pvp_ux13_dispose_without_aura)
alias mp_pvp_ux13_dispose_without_aura dispose
def dispose
begin
if @mp_pvp_ux_aura_sprite
@mp_pvp_ux_aura_sprite.dispose unless @mp_pvp_ux_aura_sprite.disposed?
@mp_pvp_ux_aura_sprite = nil
end
rescue
end
mp_pvp_ux13_dispose_without_aura
end
end
def mp_pvp_ux_remote_player_id
return 0 unless @character
return 0 unless @character.instance_variable_defined?(:@net_player_id)
@character.instance_variable_get(:@net_player_id).to_i
rescue
0
end
def mp_pvp_ux_ensure_aura_sprite
return @mp_pvp_ux_aura_sprite if @mp_pvp_ux_aura_sprite && !(@mp_pvp_ux_aura_sprite.disposed? rescue true)
aura = Sprite.new(self.viewport)
aura.bitmap = MPPvPAggressorAura.bitmap
aura.ox = MPPvPAggressorAura::WIDTH / 2
aura.oy = MPPvPAggressorAura::HEIGHT - 2
aura.visible = false
aura.opacity = 0
@mp_pvp_ux_aura_sprite = aura
rescue
nil
end
# Kept under the old method name because the base part of this patch calls
# it from Sprite_Character#update. It now manages ONLY the background aura.
def mp_pvp_ux_update_aggressor_tint
pid = mp_pvp_ux_remote_player_id
active = false
begin
active = pid > 0 && defined?(WebSocket) &&
WebSocket.respond_to?(:mp_pvp_aggressor?) &&
WebSocket.mp_pvp_aggressor?(pid)
rescue
active = false
end
aura = @mp_pvp_ux_aura_sprite
if active
aura = mp_pvp_ux_ensure_aura_sprite
return if aura.nil?
aura.x = self.x
aura.y = self.y + 2
aura.z = self.z.to_i - 1
aura.zoom_x = self.zoom_x rescue 1.0
aura.zoom_y = self.zoom_y rescue 1.0
aura.visible = self.visible
# Gentle pulse, not a full-character flash.
phase = ((Graphics.frame_count rescue 0).to_f / 8.0)
aura.opacity = 175 + (Math.sin(phase) * 28).to_i
elsif aura
aura.visible = false
aura.opacity = 0
end
rescue
begin
@mp_pvp_ux_aura_sprite.visible = false if @mp_pvp_ux_aura_sprite
rescue
end
end
end
end
#------------------------------------------------------------------------------
# Order-safe WebSocket parser layer for mobile/desktop.
#------------------------------------------------------------------------------
module MPPvPCombatUXWebSocketParsePatch
def parse(msg)
begin
line = msg.to_s
# Victim: remember who hit us so the aura can be shown locally.
if line =~ /\Aattack:(\d+):(\d+):/
attacker_id = $1.to_i
target_id = $2.to_i
if @my_id && target_id == @my_id.to_i && attacker_id != @my_id.to_i
mp_pvp_mark_aggressor(attacker_id) if respond_to?(:mp_pvp_mark_aggressor)
end
end
# Attacker: mirror accepted basic hit and show outgoing HP/STA numbers.
if line =~ /^attack:(\d+):(\d+):(\d+):(\d+):(\d+)/
attacker_id = $1.to_i
target_id = $2.to_i
tx = $3.to_i
ty = $4.to_i
raw = $5.to_i
if @my_id && attacker_id == @my_id.to_i && target_id != @my_id.to_i
raw = 1 if raw < 1
hp_dmg = (raw + 1) / 2
sta_dmg = raw * 2
dir = ($game_player.direction rescue 2)
_mp_ux_show_outgoing_popups(tx, ty, dir, hp_dmg, sta_dmg)
_mp_ux_apply_remote_damage_mirror(target_id, hp_dmg, sta_dmg)
end
end
rescue
end
super(msg)
end
end
begin
sc = WebSocket.singleton_class
sc.prepend(MPPvPCombatUXWebSocketParsePatch) unless sc.ancestors.include?(MPPvPCombatUXWebSocketParsePatch)
rescue => e
puts "[PVP-UX] parser prepend failed #{e.class}: #{e.message}" rescue nil
end
puts "[PVP-UX] loaded v1.3.0; aggressor shown with victim-local red background aura" rescue nil
@@ -0,0 +1,304 @@
# encoding: UTF-8
#==============================================================================
# AuthoritativePlayerDrops 1.3.0
# Manual/menu drops are registered immediately with the authoritative server.
# Equal drops made in the same frame are coalesced into one server packet.
# No local/PWO copy is created for supported RPG items, so pickup is one-shot.
#==============================================================================
module MPAuthoritativePlayerDrops
VERSION = "1.3.0"
@pending = {}
@pending_raw = []
@pending_frame = nil
class << self
def online_ready?
return false unless defined?(WebSocket)
connected = WebSocket.instance_variable_get(:@connected) rescue false
worldsync = WebSocket.instance_variable_get(:@worldsync) rescue false
!!connected && !!worldsync && WebSocket.respond_to?(:net_drop_item)
rescue
false
end
def overmap?
return false unless defined?($game_map) && $game_map
!!($game_map.isOverMap rescue false)
rescue
false
end
def object_for(raw)
return raw unless raw.is_a?(String) || raw.is_a?(Symbol)
token = raw.to_s
return nil if token.empty?
begin
obj = $data_ItemName[token] if defined?($data_ItemName) && $data_ItemName
return obj unless obj.nil?
rescue
end
nil
rescue
nil
end
def network_identity(raw)
obj = object_for(raw)
return nil if obj.nil?
kind = nil
begin
kind = "item" if defined?(RPG::Item) && obj.is_a?(RPG::Item)
kind = "weapon" if defined?(RPG::Weapon) && obj.is_a?(RPG::Weapon)
kind = "armor" if defined?(RPG::Armor) && obj.is_a?(RPG::Armor)
rescue
end
if kind.nil?
klass = (obj.class.name.to_s rescue "")
kind = "item" if klass == "RPG::Item"
kind = "weapon" if klass == "RPG::Weapon"
kind = "armor" if klass == "RPG::Armor"
end
iid = (obj.id.to_i rescue 0)
return nil if kind.nil? || iid <= 0
[kind, iid]
rescue
nil
end
def character_xy(character)
ch = character
ch = $game_player if ch.nil? && defined?($game_player)
return nil unless ch
[ch.x.to_i, ch.y.to_i]
rescue
nil
end
def raw_token(raw)
return raw.item_name.to_s if raw.respond_to?(:item_name)
raw.to_s
rescue
raw.to_s
end
# Called instead of vanilla record_dropped_items for normal online items.
# Returns true only when every supplied token is handled by the server path.
def register_online(items, character=nil)
return false unless online_ready?
return false if overmap?
pos = character_xy(character)
return false if pos.nil?
x, y = pos
list = Array(items)
return false if list.empty?
resolved = []
list.each do |raw|
ident = network_identity(raw)
return false if ident.nil? # preserve vanilla semantics for custom tokens
resolved << [ident[0], ident[1], raw_token(raw)]
end
@pending ||= {}
resolved.each do |kind, iid, token|
key = [kind, iid.to_i, x.to_i, y.to_i]
rec = @pending[key]
if rec
rec[:qty] += 1
else
@pending[key] = {
:kind => kind,
:id => iid.to_i,
:x => x.to_i,
:y => y.to_i,
:qty => 1,
:token => token
}
end
end
@pending_frame = (Graphics.frame_count rescue 0)
true
rescue => e
puts "[DROP-AUTH] register error #{e.class}: #{e}" rescue nil
false
end
# If connection vanished between menu click and next update, restore vanilla
# local drop instead of silently eating the already removed item.
def spawn_local_fallback(token, x, y, qty)
return false unless defined?(EvLib)
qty.to_i.times do
EvLib.sum(token.to_s, x.to_i, y.to_i, {:user => $game_player})
end
true
rescue => e
puts "[DROP-AUTH] fallback error #{e.class}: #{e}" rescue nil
false
end
def flush_pending(force=false)
rows = @pending
return 0 if rows.nil? || rows.empty?
unless force
now = (Graphics.frame_count rescue 0)
# Coalesce all SHIFT/drop repetitions generated during the same frame.
return 0 if !@pending_frame.nil? && now <= @pending_frame.to_i
end
@pending = {}
@pending_frame = nil
sent = 0
rows.each_value do |rec|
if online_ready?
WebSocket.net_drop_item(rec[:kind], rec[:id], rec[:qty], rec[:x], rec[:y])
puts "[DROP-AUTH] sent #{rec[:kind]}##{rec[:id]} x#{rec[:qty]} @#{rec[:x]},#{rec[:y]}" rescue nil
sent += 1
else
spawn_local_fallback(rec[:token], rec[:x], rec[:y], rec[:qty])
puts "[DROP-AUTH] offline fallback #{rec[:token]} x#{rec[:qty]} @#{rec[:x]},#{rec[:y]}" rescue nil
end
end
sent
rescue => e
puts "[DROP-AUTH] flush error #{e.class}: #{e}" rescue nil
0
end
end
end
# Hook the actual registration point. This happens immediately when the item is
# removed in the item menu, before the player closes the menu.
if defined?(Game_Temp)
class Game_Temp
unless method_defined?(:mp_authdrop_register_item_drop_without_fix)
alias mp_authdrop_register_item_drop_without_fix register_item_drop
end
def register_item_drop(items, character=$game_player)
begin
if MPAuthoritativePlayerDrops.register_online(items, character)
return true
end
rescue => e
puts "[DROP-AUTH] hook error #{e.class}: #{e}" rescue nil
end
mp_authdrop_register_item_drop_without_fix(items, character)
end
end
end
# Flush on the next UI/game frame. Scene_Base also updates while Scene_Menu is
# open, so other players receive the canonical server drop immediately.
if defined?(Scene_Base)
class Scene_Base
unless method_defined?(:mp_authdrop_update_without_fix)
alias mp_authdrop_update_without_fix update
end
def update(*args, &block)
result = mp_authdrop_update_without_fix(*args, &block)
MPAuthoritativePlayerDrops.flush_pending(false) rescue nil
result
end
end
end
# Safety flush before leaving the menu. Normally the next-frame flush above has
# already sent everything; this prevents a pending row surviving a fast close.
if defined?(Scene_Menu)
class Scene_Menu
if instance_methods.include?(:process_exit_menu) && !method_defined?(:mp_authdrop_process_exit_menu_without_fix)
alias mp_authdrop_process_exit_menu_without_fix process_exit_menu
def process_exit_menu(*args, &block)
MPAuthoritativePlayerDrops.flush_pending(true) rescue nil
mp_authdrop_process_exit_menu_without_fix(*args, &block)
end
end
end
end
puts "[DROP-AUTH] loaded v#{MPAuthoritativePlayerDrops::VERSION}; live server-authoritative menu drops enabled" rescue nil
#------------------------------------------------------------------------------
# Pickup input compatibility 1.3.0
# LonaRPG does NOT use multiplayer's hard-coded :E for normal item pickup.
# It uses Game_Player#inputToTriggerEvent? (the remappable action/confirm key,
# internally :C, plus the stock mouse path). Authoritative network drops must
# obey that same input and only the exact tile under the player.
#------------------------------------------------------------------------------
if defined?(WebSocket)
module WebSocket
class << self
if method_defined?(:check_pickup_or_interaction) && !method_defined?(:mp_authdrop_check_pickup_without_action_fix)
alias_method :mp_authdrop_check_pickup_without_action_fix, :check_pickup_or_interaction
end
end
def self.mp_authdrop_action_trigger?
return false unless defined?($game_player) && $game_player
begin
return false if defined?($game_map) && $game_map && $game_map.interpreter && $game_map.interpreter.running?
rescue
end
begin
return false if $game_player.respond_to?(:movable?) && !$game_player.movable?
rescue
end
begin
actor = $game_player.actor if $game_player.respond_to?(:actor)
return false if actor && actor.respond_to?(:lonaDeath?) && actor.lonaDeath?
rescue
end
begin
return false if Input.respond_to?(:skillKeyPressed?) && Input.skillKeyPressed?
rescue
end
begin
return !!$game_player.inputToTriggerEvent? if $game_player.respond_to?(:inputToTriggerEvent?)
rescue
end
# Fallback for unusual builds: :C is LonaRPG's remappable action symbol.
begin
return !!Input.trigger?(:C)
rescue
false
end
rescue
false
end
def self.check_pickup_or_interaction
begin
if @worldsync && mp_authdrop_action_trigger?
did = find_drop_on_tile($game_player.x, $game_player.y)
if did
# debounce / in-flight — без optimistic remove
if request_map_drop_pickup(did)
puts "[DROP-AUTH] pickup request #{did} tile=#{$game_player.x},#{$game_player.y}" rescue nil
end
return
end
end
rescue => e
puts "[DROP-AUTH] pickup input error #{e.class}: #{e}" rescue nil
end
# Preserve the old multiplayer interaction path (including its :E key)
# for non-drop interactions; only authoritative drop pickup is changed.
mp_authdrop_check_pickup_without_action_fix if respond_to?(:mp_authdrop_check_pickup_without_action_fix)
end
end
end
@@ -0,0 +1,468 @@
# encoding: UTF-8
# Цвет текста над ником:
# global -> золотой, видят все, кому сервер прислал сообщение
# clan -> зелёный, видят только члены клана
# system -> не отображается
#
# Текст находится над ником (и над иконкой паузы/чата, если она уже там).
module MPChatOverhead
VERSION = "1.0.0"
MAX_CHARS = 200
MAX_WIDTH = 280
MAX_LINES = 3
HOLD_SEC = 7.2
FADE_SEC = 0.8
FRESH_MS = 8000
SKEW_MS = 5000
GAP = 2
@lines = {}
@seen = {}
@seen_order = []
@parser_installed = false
@measure_bitmap = nil
def self.parser_installed?
@parser_installed
end
def self.install_parser!
return true if @parser_installed
return false unless defined?(WebSocket)
sc = WebSocket.singleton_class
unless sc.ancestors.include?(MPChatOverheadWebSocketPatch)
sc.prepend(MPChatOverheadWebSocketPatch)
end
@parser_installed = true
true
rescue => e
puts "[ChatOverhead] parser prepend failed #{e.class}: #{e.message}" rescue nil
false
end
def self.normalize_channel(channel)
if defined?(MPChatChannels) && MPChatChannels.respond_to?(:normalize)
MPChatChannels.normalize(channel)
else
ch = channel.to_s.strip.downcase
return "clan" if ch == "clan" || ch == "клан"
return "system" if ch == "system" || ch == "система"
"global"
end
rescue
"global"
end
def self.color_for(channel)
if defined?(MPChatChannels) && MPChatChannels.respond_to?(:color)
color = MPChatChannels.color(channel)
return color if color.is_a?(Color)
end
normalize_channel(channel) == "clan" ? Color.new(120, 230, 150) : Color.new(255, 213, 128)
rescue
Color.new(255, 213, 128)
end
def self.font_name
FONT_MOD::POPUP
rescue
"Digital Pixel"
end
def self.font_size
size = FONT_MOD::POPUP_S.to_i
size > 0 ? size : 20
rescue
20
end
def self.system_message?(channel, pid, nick)
return true if normalize_channel(channel) == "system"
n = nick.to_s.strip.upcase
return true if pid.to_i <= 0
return true if n == "SERVER" || n == "[SERVER]" || n == "SYSTEM" || n == "СИСТЕМА"
false
rescue
false
end
def self.clean_text(text)
t = text.to_s.dup
begin
t.force_encoding("UTF-8")
t = t.scrub("") if t.respond_to?(:scrub) && !t.valid_encoding?
rescue
end
t = t.gsub(/\r\n?/, " ").gsub("\n", " ").gsub("\0", "").strip
t = t[0, MAX_CHARS] if t.length > MAX_CHARS
t
rescue
""
end
def self.fresh?(ts_ms)
ts = ts_ms.to_i
now = (Time.now.to_f * 1000.0).to_i
if ts >= 1_000_000_000_000
age = now - ts
elsif ts >= 1_000_000_000
age = now - (ts * 1000)
else
return false
end
age >= -SKEW_MS && age <= FRESH_MS
rescue
false
end
def self.seen?(key)
return true if @seen[key]
@seen[key] = true
@seen_order << key
if @seen_order.size > 400
old = @seen_order.shift(@seen_order.size - 400)
old.each { |k| @seen.delete(k) }
end
false
rescue
false
end
def self.capture(raw)
msg = raw.to_s
if msg.start_with?("chat_msg2:")
parts = msg.split(":", 7)
return if parts.size < 7
channel = normalize_channel(parts[1])
msg_id = parts[2].to_i
ts_ms = parts[3].to_i
pid = parts[4].to_i
nick = unescape_nick(parts[5])
text = parts[6].to_s
show(channel, msg_id, ts_ms, pid, nick, text)
return
end
return unless msg.start_with?("chat_msg:")
parts = msg.split(":", 6)
return if parts.size < 6
msg_id = parts[1].to_i
ts_ms = parts[2].to_i
pid = parts[3].to_i
nick = unescape_nick(parts[4])
text = parts[5].to_s
channel = legacy_channel(pid, nick)
show(channel, msg_id, ts_ms, pid, nick, text)
rescue => e
puts "[ChatOverhead] capture error #{e.class}: #{e.message}" rescue nil
end
def self.unescape_nick(nick)
if defined?(WebSocket) && WebSocket.respond_to?(:unesc)
WebSocket.unesc(nick.to_s)
else
nick.to_s
end
rescue
nick.to_s
end
def self.legacy_channel(pid, nick)
if defined?(WebSocket) && WebSocket.respond_to?(:legacy_chat_channel)
WebSocket.legacy_chat_channel(pid, nick)
else
pid.to_i < 0 ? "system" : "global"
end
rescue
"global"
end
def self.show(channel, msg_id, ts_ms, pid, nick, text)
ch = normalize_channel(channel)
return false unless ch == "global" || ch == "clan"
return false if system_message?(ch, pid, nick)
return false unless fresh?(ts_ms)
body = clean_text(text)
return false if body.empty?
id = msg_id.to_i
key = id > 0 ? "#{ch}:#{id}" : "#{ch}:#{pid.to_i}:#{ts_ms.to_i}:#{body}"
return false if seen?(key)
@lines[pid.to_i] = {
:channel => ch,
:text => body,
:key => key,
:born => Time.now.to_f
}
true
rescue => e
puts "[ChatOverhead] show error #{e.class}: #{e.message}" rescue nil
false
end
def self.prune!
limit = HOLD_SEC + FADE_SEC
@lines.delete_if { |_pid, line| age_of(line) >= limit }
rescue
@lines ||= {}
end
def self.line_for(pid)
prune!
id = pid.to_i
return nil if id <= 0
@lines[id]
rescue
nil
end
def self.age_of(line)
Time.now.to_f - line[:born].to_f
rescue
HOLD_SEC + FADE_SEC
end
def self.opacity_for(line)
age = age_of(line)
return 0 if age >= (HOLD_SEC + FADE_SEC)
return 255 if age <= HOLD_SEC
remain = (HOLD_SEC + FADE_SEC) - age
value = (255.0 * remain / FADE_SEC).to_i
value < 0 ? 0 : (value > 255 ? 255 : value)
rescue
255
end
def self.measure_bitmap
bmp = @measure_bitmap
if bmp.nil? || (bmp.respond_to?(:disposed?) && bmp.disposed?)
bmp = Bitmap.new(8, 8)
@measure_bitmap = bmp
end
bmp.font.name = font_name
bmp.font.size = font_size
bmp.font.bold = false
bmp.font.outline = false
bmp.font.shadow = true
bmp
end
def self.wrap_lines(text)
bmp = measure_bitmap
words = text.to_s.split(/\s+/)
lines = []
current = ""
words.each do |word|
if bmp.text_size(word).width > MAX_WIDTH
lines << current unless current.empty?
current = ""
chunk = ""
word.each_char do |ch|
trial = chunk + ch
if !chunk.empty? && bmp.text_size(trial).width > MAX_WIDTH
lines << chunk
chunk = ch
else
chunk = trial
end
end
current = chunk
next
end
trial = current.empty? ? word : "#{current} #{word}"
if current.empty? || bmp.text_size(trial).width <= MAX_WIDTH
current = trial
else
lines << current
current = word
end
end
lines << current unless current.empty?
lines = [text.to_s] if lines.empty?
if lines.size > MAX_LINES
lines = lines[0, MAX_LINES]
last = lines[-1].to_s
ellipsis = "..."
while !last.empty? && bmp.text_size(last + ellipsis).width > MAX_WIDTH
last = last[0, last.length - 1].to_s
end
lines[-1] = last + ellipsis
end
lines
rescue
[text.to_s[0, MAX_CHARS]]
end
def self.build_bitmap(channel, text)
lines = wrap_lines(text)
bmp_measure = measure_bitmap
line_h = font_size + 2
width = 1
lines.each do |line|
w = bmp_measure.text_size(line.to_s).width.to_i
width = w if w > width
end
width += 4
width = MAX_WIDTH + 4 if width > MAX_WIDTH + 4
width = 1 if width < 1
height = line_h * lines.size
height = line_h if height < 1
bitmap = Bitmap.new(width, height)
bitmap.font.name = font_name
bitmap.font.size = font_size
bitmap.font.bold = false
bitmap.font.outline = false
bitmap.font.shadow = true
bitmap.font.color = color_for(channel)
lines.each_with_index do |line, index|
bitmap.draw_text(0, index * line_h, width, line_h, line.to_s, 1)
end
bitmap
end
end
# Installed from the first character sprite, after later ModScripts have
# already wrapped WebSocket.parse. Outermost prepend always calls super,
# so both chat_msg2 and legacy chat_msg are seen.
module MPChatOverheadWebSocketPatch
def parse(msg)
MPChatOverhead.capture(msg) if defined?(MPChatOverhead)
super(msg)
end
end
class Sprite_Character < Sprite_Base
unless method_defined?(:mp_chat_overhead_init_without)
alias mp_chat_overhead_init_without initialize
end
def initialize(*args, &block)
MPChatOverhead.install_parser! if defined?(MPChatOverhead)
mp_chat_overhead_init_without(*args, &block)
end
unless method_defined?(:mp_chat_overhead_update_without)
alias mp_chat_overhead_update_without update
end
def update(*args, &block)
MPChatOverhead.install_parser! if defined?(MPChatOverhead) && !MPChatOverhead.parser_installed?
mp_chat_overhead_update_without(*args, &block)
mp_chat_overhead_update
end
unless method_defined?(:mp_chat_overhead_dispose_without)
alias mp_chat_overhead_dispose_without dispose
end
def dispose(*args, &block)
mp_chat_overhead_dispose
mp_chat_overhead_dispose_without(*args, &block)
end
def mp_chat_overhead_pid
return 0 unless @character
if @character.is_a?(Game_Player)
return 0 unless defined?(WebSocket) && WebSocket.respond_to?(:my_id) && WebSocket.my_id
return WebSocket.my_id.to_i
end
if @character.instance_variable_defined?(:@net_player_id)
return @character.instance_variable_get(:@net_player_id).to_i
end
0
rescue
0
end
def mp_chat_overhead_dispose
if @mp_chat_overhead_sprite
begin
@mp_chat_overhead_sprite.bitmap.dispose if @mp_chat_overhead_sprite.bitmap && !@mp_chat_overhead_sprite.bitmap.disposed?
rescue
end
begin
@mp_chat_overhead_sprite.dispose unless @mp_chat_overhead_sprite.disposed?
rescue
end
end
@mp_chat_overhead_sprite = nil
@mp_chat_overhead_key = nil
rescue
@mp_chat_overhead_sprite = nil
@mp_chat_overhead_key = nil
end
def mp_chat_overhead_nick_sprite
sprite = @character.is_a?(Game_Player) ? @nickname_sprite : @mp_nick_sprite
return nil unless sprite
return nil if sprite.respond_to?(:disposed?) && sprite.disposed?
return nil unless sprite.bitmap && !sprite.bitmap.disposed?
return nil unless sprite.visible
sprite
rescue
nil
end
def mp_chat_overhead_anchor_y
anchor = self.y - self.height
nick = mp_chat_overhead_nick_sprite
if nick
nick_top = nick.y - nick.bitmap.height
anchor = nick_top if nick_top < anchor
end
icon = @mp_presence_status_sprite
if icon && !(icon.respond_to?(:disposed?) && icon.disposed?) && icon.bitmap && !icon.bitmap.disposed? && icon.visible
gap = defined?(MPPlayerPresenceVersionGate) ? MPPlayerPresenceVersionGate::STATUS_GAP : 2
anchor -= gap + icon.bitmap.height
end
anchor
rescue
self.y - self.height
end
def mp_chat_overhead_update
pid = mp_chat_overhead_pid
line = (pid > 0 && defined?(MPChatOverhead)) ? MPChatOverhead.line_for(pid) : nil
if line.nil?
mp_chat_overhead_dispose if @mp_chat_overhead_sprite
return
end
unless self.visible
@mp_chat_overhead_sprite.visible = false if @mp_chat_overhead_sprite
return
end
if @mp_chat_overhead_sprite.nil? || (@mp_chat_overhead_sprite.respond_to?(:disposed?) && @mp_chat_overhead_sprite.disposed?)
@mp_chat_overhead_sprite = Sprite.new(self.viewport)
@mp_chat_overhead_key = nil
end
if @mp_chat_overhead_key != line[:key]
bitmap = MPChatOverhead.build_bitmap(line[:channel], line[:text])
old = @mp_chat_overhead_sprite.bitmap
@mp_chat_overhead_sprite.bitmap = bitmap
@mp_chat_overhead_sprite.ox = bitmap.width / 2
@mp_chat_overhead_sprite.oy = bitmap.height
@mp_chat_overhead_key = line[:key]
begin
old.dispose if old && !old.disposed?
rescue
end
end
sprite = @mp_chat_overhead_sprite
sprite.x = self.x
sprite.y = mp_chat_overhead_anchor_y - MPChatOverhead::GAP
sprite.z = self.z + 40
sprite.opacity = MPChatOverhead.opacity_for(line)
sprite.visible = self.visible && sprite.opacity > 0
rescue
mp_chat_overhead_dispose
end
end
puts "[ChatOverhead] loaded v#{MPChatOverhead::VERSION}; global=gold clan=green above-nick" rescue nil
@@ -0,0 +1,129 @@
# encoding: UTF-8
#==============================================================================
# PvPHealSafeZoneRecv — apply Исцеление души in safe zones on the receiver.
#------------------------------------------------------------------------------
# Loads AFTER 99999999999999999996_PvPCombatUXFix.rb. Older UX builds drop ALL
# pvp_skill_hit in safe zones before 98_pvp_skill_sync can run; this wrapper
# intercepts heal packets first and applies HP/STA locally.
#
# Required on the healed client's ModScripts (whitelist this file once).
#==============================================================================
return unless defined?(WebSocket)
module WebSocket
def self._mp_heal_sz_recv_payload_heal?(payload)
return false if payload.nil?
h = payload
if payload.is_a?(String)
begin
h = respond_to?(:_deistvia_unpack) ? _deistvia_unpack(payload.to_s) : {}
rescue
h = {}
end
end
return false unless h.is_a?(Hash)
return true if h["heal"].to_s == "1"
return true if h["sup"].to_s == "1" && (
h["skill_name"].to_s.include?("NunHeal") ||
h["skill"].to_s.include?("NunHeal") ||
h["hp"].to_i < 0 || h["sta"].to_i < 0
)
sn = h["skill_name"].to_s
sn = h["skill"].to_s if sn.empty?
return true if sn == "BasicNunHeal" || sn.include?("NunHeal")
false
rescue
false
end
class << self
if method_defined?(:handle_remote_deistvia) && !method_defined?(:mp_heal_sz_recv_old_handle_remote_deistvia)
alias_method :mp_heal_sz_recv_old_handle_remote_deistvia, :handle_remote_deistvia
end
end
if respond_to?(:mp_heal_sz_recv_old_handle_remote_deistvia)
def self.handle_remote_deistvia(player_id, action_id, phase, payload)
if action_id.to_s == "pvp_skill_hit" && phase.to_s != "stop" && _mp_heal_sz_recv_payload_heal?(payload)
payload_hash = {}
begin
if payload.is_a?(Hash)
payload_hash = payload
else
payload_hash = respond_to?(:_deistvia_unpack) ? _deistvia_unpack(payload.to_s) : {}
end
rescue
payload_hash = {}
end
target_id = (payload_hash["target"] || payload_hash["tgt"] || payload_hash["target_id"]).to_i
my = (@my_id.to_i rescue 0)
if my > 0 && target_id == my
begin
_mp_heal_sz_recv_apply_local(player_id.to_i, payload_hash)
rescue
end
return
end
end
mp_heal_sz_recv_old_handle_remote_deistvia(player_id, action_id, phase, payload)
end
end
# Self-contained apply so older 98 without _mp_pvp_apply_heal_payload still works.
def self._mp_heal_sz_recv_apply_local(attacker_id, payload_hash)
if respond_to?(:_mp_pvp_apply_heal_payload)
return _mp_pvp_apply_heal_payload(attacker_id, payload_hash)
end
actor = nil
begin
actor = _mp_pvp_local_actor if respond_to?(:_mp_pvp_local_actor)
rescue
actor = nil
end
begin
actor = $game_player.actor if actor.nil? && $game_player && $game_player.respond_to?(:actor)
rescue
actor = nil
end
return false if actor.nil?
hp_heal = payload_hash["hp"].to_i.abs
sta_heal = payload_hash["sta"].to_i.abs
return false if hp_heal <= 0 && sta_heal <= 0
begin
actor.health = actor.health.to_f + hp_heal.to_f if hp_heal > 0 && actor.respond_to?(:health=)
rescue
end
begin
actor.sta = actor.sta.to_f + sta_heal.to_f if sta_heal > 0 && actor.respond_to?(:sta=)
rescue
end
begin
if actor.respond_to?(:actor_ForceUpdate)
actor.actor_ForceUpdate
else
$game_player.update rescue nil
end
rescue
end
begin
dir = ($game_player.direction rescue 2)
tx = (payload_hash["tx"] || $game_player.x).to_i
ty = (payload_hash["ty"] || $game_player.y).to_i
if defined?($game_damage_popups) && $game_damage_popups
$game_damage_popups.add(hp_heal, tx, ty, dir, 10) if hp_heal > 0
$game_damage_popups.add(sta_heal, tx, ty, dir, 11) if sta_heal > 0
end
rescue
end
true
rescue
false
end
end
puts "[PVP-HEAL-SZ] receive patch loaded" rescue nil
@@ -0,0 +1,173 @@
# encoding: UTF-8
#==============================================================================
# TopChatOverlay 1.0.0
#------------------------------------------------------------------------------
# Верхний мини-чат:
# global -> белый
# clan -> светло-зелёный
# system -> НЕ показывается наверху
#
# Полный MPChat и системная вкладка не меняются.
# Работает поверх существующих multiplayer/34_chat_channels.rb и 90_hooks.rb.
#==============================================================================
module MPTopChatOverlay
VERSION = "1.0.1"
GLOBAL_COLOR = Color.new(255, 255, 255)
CLAN_COLOR = Color.new(155, 255, 175)
@seen = {}
@seen_order = []
def self.normalize_channel(channel)
if defined?(MPChatChannels) && MPChatChannels.respond_to?(:normalize)
MPChatChannels.normalize(channel)
else
ch = channel.to_s.strip.downcase
return "clan" if ch == "clan" || ch == "клан"
return "system" if ch == "system" || ch == "система"
"global"
end
rescue
"global"
end
def self.color_for(channel)
normalize_channel(channel) == "clan" ? CLAN_COLOR : GLOBAL_COLOR
rescue
GLOBAL_COLOR
end
def self.system_message?(channel, pid=nil, nick=nil)
return true if normalize_channel(channel) == "system"
n = nick.to_s.strip.upcase
return true if pid.to_i < 0
return true if n == "SERVER" || n == "[SERVER]" || n == "SYSTEM" || n == "СИСТЕМА"
false
rescue
false
end
def self.seen?(channel, msg_id)
id = msg_id.to_i
return false if id <= 0
key = "#{normalize_channel(channel)}:#{id}"
return true if @seen[key]
@seen[key] = true
@seen_order << key
if @seen_order.size > 200
old = @seen_order.shift(@seen_order.size - 200)
old.each { |k| @seen.delete(k) }
end
false
rescue
false
end
def self.push(channel, msg_id, ts_ms, pid, nick, text)
ch = normalize_channel(channel)
return false if system_message?(ch, pid, nick)
return false unless ch == "global" || ch == "clan"
return false if seen?(ch, msg_id)
return false unless defined?(MPNotify)
n = nick.to_s
n = "Player" if n.strip.empty?
t = text.to_s.gsub(/\r\n?/, " ").gsub("\n", " ").gsub("\0", "").strip
t = t[0, 200]
return false if t.empty?
time_text = ""
begin
if defined?(WebSocket) && WebSocket.respond_to?(:chat_time_text)
time_text = WebSocket.chat_time_text(ts_ms)
end
rescue
time_text = ""
end
prefix = time_text.to_s.empty? ? "" : "#{time_text} "
if MPNotify.respond_to?(:_push)
MPNotify._push({
:type => (ch == "clan" ? :topchat_clan : :topchat_global),
:channel => ch,
:text => "#{prefix}#{n}: #{t}",
:color => color_for(ch)
})
true
else
false
end
rescue => e
begin
puts "[TopChatOverlay] push error #{e.class}: #{e.message}"
rescue
end
false
end
end
# prepend is intentional here. ClanEstate may already have prepended its own
# WebSocket parser on mobile while ModScripts are still loading. Aliasing parse
# after that can capture a prepended method whose `super` re-enters this wrapper
# and causes SystemStackError. prepend+super is order-safe in both cases.
module MPTopChatOverlayWebSocketPatch
def parse(msg)
raw = msg.to_s
# Новый канальный протокол.
if raw.start_with?("chat_msg2:")
parts = raw.split(":", 7)
if parts.size >= 7
ch = MPTopChatOverlay.normalize_channel(parts[1])
msg_id = parts[2].to_i
ts_ms = parts[3].to_i
pid = parts[4].to_i
nick = (unesc(parts[5].to_s) rescue parts[5].to_s)
text = parts[6].to_s
MPTopChatOverlay.push(ch, msg_id, ts_ms, pid, nick, text)
end
return super(msg)
end
# Старые chat_msg всё ещё используются некоторыми серверными плагинами
# для системных сообщений. Не даём старому MPNotify вывести их наверх,
# но пропускаем дальше в историю полного чата.
if raw.start_with?("chat_msg:")
parts = raw.split(":", 6)
if parts.size >= 6
msg_id = parts[1].to_i
ts_ms = parts[2].to_i
pid = parts[3].to_i
nick = (unesc(parts[4].to_s) rescue parts[4].to_s)
text = parts[5].to_s
ch = begin
respond_to?(:legacy_chat_channel) ? legacy_chat_channel(pid, nick) : (pid < 0 ? "system" : "global")
rescue
pid < 0 ? "system" : "global"
end
MPTopChatOverlay.push(ch, msg_id, ts_ms, pid, nick, text)
# 90_hooks.rb сам рисует любой chat_msg белым. Обходим только его
# notify-wrapper, чтобы system не всплыл наверху и global не удвоился.
if respond_to?(:mp_parse_without_notify)
return mp_parse_without_notify(msg)
end
end
end
super(msg)
end
end
if defined?(WebSocket)
begin
sc = WebSocket.singleton_class
sc.prepend(MPTopChatOverlayWebSocketPatch) unless sc.ancestors.include?(MPTopChatOverlayWebSocketPatch)
rescue => e
puts "[TopChatOverlay] parser prepend failed #{e.class}: #{e.message}" rescue nil
end
end
puts "[TopChatOverlay] loaded v#{MPTopChatOverlay::VERSION}; global=white clan=light-green system=hidden"
@@ -0,0 +1,643 @@
# encoding: UTF-8
#==============================================================================
# Web map integrity check
#------------------------------------------------------------------------------
# During game startup, read the current manifest from the HTTPS endpoint once
# and keep it only in process memory. Before every real map change:
# 1. find the exact map file used by $data_mapinfos in the memory manifest;
# 2. calculate SHA-256 of the local map file;
# 3. cancel the transfer and disconnect when verification fails.
#
# Deliberately has no fallback to the local Secure.json. A network or manifest
# error is a failed verification, not permission to enter an unchecked map.
#==============================================================================
return if defined?($mp_web_map_integrity_loaded) && $mp_web_map_integrity_loaded
$mp_web_map_integrity_loaded = true
begin
require 'digest'
require 'digest/sha2'
rescue LoadError
end
module MPWebMapIntegrity
MANIFEST_URL = 'https://lonarpg.online/Secure/Secure.json'
HOST = 'lonarpg.online'
PORT = 443
REQUEST_PATH = '/Secure/Secure.json'
MAX_BYTES = 4 * 1024 * 1024
TIMEOUT_MS = 10_000
VERIFY_ATTEMPTS = 1
RETRY_DELAY_SECONDS = 0.20
FAILURE_LOG = File.join('UserData', 'map_integrity.log')
Result = Struct.new(:ok, :code, :path, :expected, :actual, :details)
@blocked = false
@last_error = nil
@manifest_cache = nil
@manifest_error = nil
@manifest_loaded = false
module WinHTTP
module_function
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY = 0
WINHTTP_FLAG_SECURE = 0x00800000
WINHTTP_QUERY_STATUS_CODE = 19
WINHTTP_QUERY_FLAG_NUMBER = 0x20000000
def function(handle, name, args, result)
Fiddle::Function.new(
handle[name], args, result,
Ruby310Compat.respond_to?(:stdcall_abi) ? Ruby310Compat.stdcall_abi : Fiddle::Function::DEFAULT
)
end
def init
return true if @ready
raise 'Ruby310Compat is unavailable' unless defined?(Ruby310Compat)
raise 'Fiddle is unavailable' unless Ruby310Compat.fiddle_ready?
@dll = Ruby310Compat.open_library('winhttp.dll')
p = Fiddle::TYPE_VOIDP
i = Fiddle::TYPE_INT
@open = function(@dll, 'WinHttpOpen', [p, i, p, p, i], p)
@connect = function(@dll, 'WinHttpConnect', [p, p, i, i], p)
@open_request = function(@dll, 'WinHttpOpenRequest', [p, p, p, p, p, p, i], p)
@set_timeouts = function(@dll, 'WinHttpSetTimeouts', [p, i, i, i, i], i)
@send_request = function(@dll, 'WinHttpSendRequest', [p, p, i, p, i, i, p], i)
@receive_response = function(@dll, 'WinHttpReceiveResponse', [p, p], i)
@query_headers = function(@dll, 'WinHttpQueryHeaders', [p, i, p, p, p, p], i)
@query_available = function(@dll, 'WinHttpQueryDataAvailable', [p, p], i)
@read_data = function(@dll, 'WinHttpReadData', [p, p, i, p], i)
@close = function(@dll, 'WinHttpCloseHandle', [p], i)
@ready = true
end
def wide(text)
text.to_s.encode(Encoding::UTF_16LE).b + "\0\0".b
end
def ptr(value)
return 0 if value.nil?
return value if defined?(Fiddle::Pointer) && value.is_a?(Fiddle::Pointer)
return Fiddle::Pointer[value] if value.is_a?(String)
value
end
def valid_handle?(handle)
!handle.nil? && handle.to_i != 0
rescue
false
end
def close(handle)
@close.call(handle) if @close && valid_handle?(handle)
rescue
end
def status_code(request)
value = "\0".b * 4
length = [4].pack('L<')
level = WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER
ok = @query_headers.call(request, level, 0, ptr(value), ptr(length), 0)
raise 'WinHTTP could not read the HTTP status' if ok.to_i == 0
value.unpack1('L<').to_i
end
def read_body(request)
body = ''.b
loop do
available_buffer = "\0".b * 4
ok = @query_available.call(request, ptr(available_buffer))
raise 'WinHTTP could not query response data' if ok.to_i == 0
available = available_buffer.unpack1('L<').to_i
break if available <= 0
raise "manifest is larger than #{MAX_BYTES} bytes" if body.bytesize + available > MAX_BYTES
chunk = "\0".b * available
read_buffer = "\0".b * 4
ok = @read_data.call(request, ptr(chunk), available, ptr(read_buffer))
raise 'WinHTTP could not read response data' if ok.to_i == 0
read = read_buffer.unpack1('L<').to_i
raise 'WinHTTP returned an invalid response chunk' if read < 0 || read > available
break if read == 0
body << chunk.byteslice(0, read)
end
body
end
def get(host, port, path)
# mkxp-z ships its own HTTPS client. Prefer it because some release
# builds intentionally omit Ruby's Fiddle extension even on Windows.
if defined?(HTTPLite) && HTTPLite.respond_to?(:get)
url = "https://#{host}#{path}"
headers = {
'Cache-Control' => 'no-cache',
'Pragma' => 'no-cache'
}
response = HTTPLite.get(url, headers, true)
raise 'HTTPLite returned an invalid response' unless response.is_a?(Hash)
status = response[:status]
status = response['status'] if status.nil?
raise "manifest server returned HTTP #{status}" unless status.to_i == 200
body = response[:body]
body = response['body'] if body.nil?
body = body.to_s.b
raise "manifest is larger than #{MAX_BYTES} bytes" if body.bytesize > MAX_BYTES
return body
end
# Compatibility fallback for engines without HTTPLite.
init
session = connection = request = nil
begin
agent = wide('LonaRPG-MapIntegrity/1.0')
server = wide(host)
verb = wide('GET')
object = wide(path)
header_text = "Cache-Control: no-cache\r\nPragma: no-cache\r\n"
headers = wide(header_text)
session = @open.call(ptr(agent), WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, 0, 0, 0)
raise 'WinHttpOpen failed' unless valid_handle?(session)
@set_timeouts.call(session, TIMEOUT_MS, TIMEOUT_MS, TIMEOUT_MS, TIMEOUT_MS)
connection = @connect.call(session, ptr(server), port.to_i, 0)
raise 'WinHttpConnect failed' unless valid_handle?(connection)
request = @open_request.call(connection, ptr(verb), ptr(object), 0, 0, 0, WINHTTP_FLAG_SECURE)
raise 'WinHttpOpenRequest failed' unless valid_handle?(request)
@set_timeouts.call(request, TIMEOUT_MS, TIMEOUT_MS, TIMEOUT_MS, TIMEOUT_MS)
# WinHttpSendRequest receives a UTF-16 buffer. Passing -1 here is not
# reliable for the wide API and can fail with ERROR_INVALID_PARAMETER.
ok = @send_request.call(request, ptr(headers), header_text.length, 0, 0, 0, 0)
raise 'WinHttpSendRequest failed' if ok.to_i == 0
ok = @receive_response.call(request, 0)
raise 'WinHttpReceiveResponse failed' if ok.to_i == 0
status = status_code(request)
raise "manifest server returned HTTP #{status}" unless status == 200
read_body(request)
ensure
close(request)
close(connection)
close(session)
end
end
end
module_function
def log(message)
puts "[MAP-INTEGRITY] #{message}"
rescue
end
def log_failure(message)
text = "#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} [MAP-INTEGRITY] #{message}\n"
begin
Dir.mkdir('UserData') unless Dir.exist?('UserData')
File.open(FAILURE_LOG, 'ab') { |stream| stream.write(text) }
rescue
end
log(message)
rescue
end
def parse_json(text)
normalized = if defined?(Ruby310Compat) && Ruby310Compat.respond_to?(:normalize_json_source)
Ruby310Compat.normalize_json_source(text)
else
text
end
# LonaRPG's bundled JSON module defines JSON.parse as its internal
# zero-argument parser (the optional argument is only a debug flag). It
# does not accept JSON source like stdlib JSON.parse does, so calling it
# first parses stale module state and commonly returns nil. JSON.decode
# is the public entry point which loads the supplied source into that
# parser.
return JSON.decode(normalized) if defined?(JSON) && JSON.respond_to?(:decode)
if defined?(Ruby310Compat) && Ruby310Compat.respond_to?(:decode_json_text)
return Ruby310Compat.decode_json_text(normalized)
end
return JSON.parse(normalized) if defined?(JSON) && JSON.respond_to?(:parse)
raise 'JSON parser is unavailable'
end
def fetch_manifest(attempt = 1)
# A unique query prevents an intermediary from serving an older manifest
# immediately after the administrator publishes a new Secure.json.
nonce = "#{Time.now.to_i}-#{rand(1_000_000)}-#{attempt.to_i}"
body = WinHTTP.get(HOST, PORT, "#{REQUEST_PATH}?integrity=#{nonce}")
raise 'manifest response is empty' if body.nil? || body.empty?
text = if defined?(Ruby310Compat) && Ruby310Compat.respond_to?(:normalize_json_source)
Ruby310Compat.normalize_json_source(body)
else
body.to_s
end
# The bundled JSON decoder is extremely slow on the 3000+ entry manifest
# and freezes the render loop during every transfer. Validate the envelope
# here and extract only the requested flat file record in manifest_record.
stripped = text.to_s.strip
raise 'manifest root is not an object' unless stripped.start_with?('{') && stripped.end_with?('}')
algorithm = stripped.match(/"algorithm"\s*:\s*"([^"]+)"/i)
raise 'manifest algorithm is not SHA-256' unless algorithm && algorithm[1].to_s.upcase == 'SHA-256'
raise 'manifest files list is missing' unless stripped =~ /"files"\s*:\s*\[/i
stripped
end
def preload_manifest
return !@manifest_cache.nil? if @manifest_loaded
@manifest_loaded = true
@manifest_cache = fetch_manifest(1).freeze
@manifest_error = nil
log("manifest loaded into memory bytes=#{@manifest_cache.bytesize}")
true
rescue Exception => e
@manifest_cache = nil
@manifest_error = e
log_failure("manifest preload failed: #{e.class}: #{e.message}")
false
end
def memory_manifest
preload_manifest unless @manifest_loaded
return @manifest_cache unless @manifest_cache.nil?
error = @manifest_error
raise error if error
raise 'web manifest is unavailable in memory'
end
def clear_manifest
@manifest_cache = nil
@manifest_error = nil
@manifest_loaded = false
true
rescue
false
end
def map_path(map_token)
info = nil
begin
info = $data_mapinfos[map_token] if defined?($data_mapinfos) && $data_mapinfos
rescue
end
if info.nil? && map_token.respond_to?(:to_i)
begin
info = $data_mapinfos[map_token.to_i] if defined?($data_mapinfos) && $data_mapinfos
rescue
end
end
filename = info.filename.to_s if info && info.respond_to?(:filename)
if filename.nil? || filename.empty?
id = info.respond_to?(:id) ? info.id.to_i : map_token.to_i
filename = format('Data/Map%03d.rvdata2', id) if id > 0
end
normalize_path(filename)
end
def normalize_path(path)
clean = path.to_s.tr('\\', '/').sub(%r{\A\./+}, '')
raise 'map path is empty' if clean.empty?
raise 'absolute map paths are forbidden' if clean =~ %r{\A(?:/|[A-Za-z]:/)}
raise 'parent path segments are forbidden' if clean.split('/').include?('..')
clean
end
def actual_file_path(relative_path)
root = File.expand_path('.', Dir.pwd.to_s)
full = File.expand_path(relative_path.gsub('/', File::SEPARATOR), root)
prefix = root.end_with?(File::SEPARATOR) ? root : root + File::SEPARATOR
unless full.downcase.start_with?(prefix.downcase)
raise 'map path escapes the game directory'
end
full
end
def manifest_record(manifest, relative_path)
wanted = relative_path.to_s.downcase
if manifest.is_a?(String)
# Secure.json file records are flat JSON objects. Searching for the one
# requested path avoids constructing thousands of Ruby hashes merely to
# verify a single map.
escaped_path = relative_path.to_s.tr('\\', '/').gsub('\\', '\\\\').gsub('"', '\\"')
object_pattern = /\{[^{}]*"path"\s*:\s*"#{Regexp.escape(escaped_path)}"[^{}]*\}/i
object_match = manifest.match(object_pattern)
return nil unless object_match
object_text = object_match[0]
hash_match = object_text.match(/"sha256"\s*:\s*"([0-9a-fA-F]+)"/)
return nil unless hash_match
bytes_match = object_text.match(/"bytes"\s*:\s*(\d+)/)
return {
'path' => relative_path.to_s,
'sha256' => hash_match[1],
'bytes' => bytes_match ? bytes_match[1].to_i : nil
}
end
manifest['files'].each do |entry|
next unless entry.is_a?(Hash)
candidate = entry['path'].to_s.tr('\\', '/').sub(%r{\A\./+}, '')
return entry if candidate.downcase == wanted
end
nil
end
def sha256_file(path)
raise 'Digest::SHA256 is unavailable' unless defined?(Digest::SHA256)
digest = Digest::SHA256.new
File.open(path, 'rb') do |stream|
while (chunk = stream.read(1024 * 1024))
digest.update(chunk)
end
end
digest.hexdigest.downcase
end
def verify_once(map_token, attempt)
path = map_path(map_token)
manifest = memory_manifest
record = manifest_record(manifest, path)
return Result.new(false, :not_listed, path, '', '', 'map is absent from the web manifest') if record.nil?
expected = record['sha256'].to_s.strip.downcase
unless expected =~ /\A[0-9a-f]{64}\z/
return Result.new(false, :bad_manifest_hash, path, expected, '', 'manifest contains an invalid SHA-256')
end
full_path = actual_file_path(path)
return Result.new(false, :missing_file, path, expected, '', 'local map file is missing') unless File.file?(full_path)
expected_bytes = record['bytes']
if !expected_bytes.nil? && File.size(full_path).to_i != expected_bytes.to_i
actual = sha256_file(full_path)
return Result.new(false, :size_mismatch, path, expected, actual, 'local map size differs')
end
actual = sha256_file(full_path)
ok = secure_equal?(expected, actual)
Result.new(ok, ok ? :ok : :hash_mismatch, path, expected, actual, ok ? '' : 'local map SHA-256 differs')
rescue Exception => e
Result.new(false, :verification_error, (map_path(map_token) rescue ''), '', '', "#{e.class}: #{e.message}")
end
def verify(map_token)
last_result = nil
1.upto(VERIFY_ATTEMPTS) do |attempt|
last_result = verify_once(map_token, attempt)
return last_result if last_result.ok
# The web manifest is an immutable in-memory snapshot for this process;
# repeating a failed comparison cannot produce a different result.
break if last_result.code == :missing_file
log_failure(
"attempt=#{attempt}/#{VERIFY_ATTEMPTS} code=#{last_result.code} " +
"path=#{last_result.path.inspect} details=#{last_result.details}"
)
sleep(RETRY_DELAY_SECONDS) if attempt < VERIFY_ATTEMPTS
end
if last_result
if VERIFY_ATTEMPTS > 1 && last_result.code != :missing_file
last_result.details = "after #{VERIFY_ATTEMPTS} attempts: #{last_result.details}"
end
return last_result
end
Result.new(false, :verification_error, (map_path(map_token) rescue ''), '', '', 'verification returned no result')
rescue Exception => e
Result.new(false, :verification_error, (map_path(map_token) rescue ''), '', '', "#{e.class}: #{e.message}")
end
def secure_equal?(left, right)
a = left.to_s
b = right.to_s
return false unless a.bytesize == b.bytesize
diff = 0
a.bytes.each_with_index { |byte, index| diff |= byte ^ b.getbyte(index) }
diff == 0
rescue
false
end
def real_map_change?(map_token)
return false unless defined?($game_map) && $game_map
destination = map_path(map_token)
current_token = if $game_map.respond_to?(:map_id_rec)
$game_map.map_id_rec
else
$game_map.map_id
end
current = map_path(current_token)
destination.downcase != current.downcase
rescue
true
end
def blocked_message(result)
case result.code
when :hash_mismatch, :size_mismatch
"Переход отменён: файл карты изменён или повреждён.\n#{result.path}"
when :not_listed
"Переход отменён: карты нет в веб-манифесте безопасности.\n#{result.path}"
when :missing_file
"Переход отменён: файл карты отсутствует.\n#{result.path}"
when :bad_manifest_hash
"Переход отменён: сервер вернул некорректный хеш карты.\n#{result.path}"
else
"Переход отменён: не удалось проверить карту через\n#{MANIFEST_URL}\n\n#{result.details}"
end
rescue
'Переход отменён: проверка целостности карты не пройдена.'
end
def owner?
defined?(LonaIntegrity) && LonaIntegrity.respond_to?(:owner?) && LonaIntegrity.owner?
rescue
false
end
def block!(result)
@blocked = true
@last_error = result
log_failure(
"BLOCK code=#{result.code} path=#{result.path.inspect} " +
"expected=#{result.expected} actual=#{result.actual} details=#{result.details}"
)
begin
WebSocket.disconnect if defined?(WebSocket) && WebSocket.respond_to?(:connected?) && WebSocket.connected?
rescue
end
begin
if defined?(SceneManager) && defined?(Scene_MPMapIntegrityBlocked)
SceneManager.snapshot_for_background(false) rescue nil
SceneManager.goto(Scene_MPMapIntegrityBlocked)
end
rescue => e
log("could not open blocked dialog: #{e.class}: #{e.message}")
begin
msgbox(blocked_message(result))
SceneManager.exit if defined?(SceneManager)
rescue
end
end
false
end
def verify_transfer(map_token)
result = verify(map_token)
if result.ok
log("OK #{result.path} sha256=#{result.actual}")
true
elsif owner?
log("OWNER BYPASS code=#{result.code} path=#{result.path.inspect} details=#{result.details}")
true
else
block!(result)
end
end
def blocked?
!!@blocked
end
def last_error
@last_error
end
end
#==============================================================================
# Non-owner failure dialog. There are no choices: after the player advances
# through the Fortune Teller's message, SceneManager.exit closes the game.
#==============================================================================
class Scene_MPMapIntegrityBlocked < Scene_Base
def start
super
create_integrity_background
create_integrity_dialog
end
def create_integrity_background
@integrity_background = Sprite.new
@integrity_background.z = 0
@integrity_background_bitmap = Bitmap.new(Graphics.width, Graphics.height)
@integrity_background_bitmap.fill_rect(
0, 0, Graphics.width, Graphics.height, Color.new(0, 0, 0, 255)
)
@integrity_background.bitmap = @integrity_background_bitmap
rescue => e
puts "[MAP-INTEGRITY] blocked background failed: #{e.class}: #{e.message}" rescue nil
end
def create_integrity_dialog
@integrity_dialog_started = true
@integrity_exit_requested = false
@message_window = Window_Message.new
$game_message.clear
$game_message.background = 0
$game_message.position = 2
result = MPWebMapIntegrity.last_error
path = result && !result.path.to_s.empty? ? result.path.to_s : 'неизвестная карта'
if result && result.code == :verification_error
message =
"\\ph\\SETpl[TellerConfused]\\SETpr[nil]\\c[4]Гадалка:\\C[0] Нити судьбы дрожат...\\n Веб-манифест не загрузился при запуске игры.\f" +
"\\SETpl[TellerOkay]\\c[4]Гадалка:\\C[0] Это не означает, что файл карты изменён.\\n Не удалось проверить: \\C[6]#{path}\\C[0]\f" +
"\\SETpl[TellerAngry]\\c[4]Гадалка:\\C[0] Игра будет закрыта для безопасности. Попробуй войти снова."
else
message =
"\\ph\\SETpl[TellerConfused]\\SETpr[nil]\\c[4]Гадалка:\\C[0] Нити судьбы оборвались...\\n Файлы игры были изменены или не прошли проверку.\f" +
"\\SETpl[TellerAngry]\\c[4]Гадалка:\\C[0] Путь к этой карте закрыт.\\n \\C[6]#{path}\\C[0]\f" +
"\\SETpl[TellerOkay]\\c[4]Гадалка:\\C[0] Игра будет закрыта. Установи чистую версию LonaRPG Online."
end
$game_message.add(message)
rescue => e
puts "[MAP-INTEGRITY] blocked dialog failed: #{e.class}: #{e.message}" rescue nil
@integrity_exit_requested = true
end
def update
super
$game_portraits.update if defined?($game_portraits) && $game_portraits
if @integrity_exit_requested || (@integrity_dialog_started && !$game_message.busy?)
@integrity_exit_requested = false
$game_message.clear rescue nil
$game_portraits.hide_all_portraits(true) rescue nil
SceneManager.exit
end
rescue => e
puts "[MAP-INTEGRITY] blocked dialog update failed: #{e.class}: #{e.message}" rescue nil
SceneManager.exit rescue nil
end
def terminate
@integrity_background.dispose if @integrity_background && !@integrity_background.disposed? rescue nil
@integrity_background_bitmap.dispose if @integrity_background_bitmap && !@integrity_background_bitmap.disposed? rescue nil
super
end
end
module MPWebMapIntegrityPlayerPatch
def perform_transfer(*args, &block)
if transfer?
target = instance_variable_get(:@new_map_id)
if MPWebMapIntegrity.real_map_change?(target)
unless MPWebMapIntegrity.verify_transfer(target)
clear_transfer_info rescue nil
return false
end
end
end
super(*args, &block)
end
end
if defined?(Game_Player)
begin
unless Game_Player.ancestors.include?(MPWebMapIntegrityPlayerPatch)
Game_Player.prepend(MPWebMapIntegrityPlayerPatch)
end
rescue => e
puts "[MAP-INTEGRITY] hook failed: #{e.class}: #{e.message}" rescue nil
end
end
# Download Secure.json once while the normal game loading screen is active.
# The ensure block drops the only retained reference when SceneManager.run ends;
# process termination then releases the backing memory as usual.
module MPWebMapIntegritySceneManagerPatch
def run(*args, &block)
begin
if defined?($loading_screen) && $loading_screen && $loading_screen.respond_to?(:step_progress)
$loading_screen.step_progress('Веб-проверка карт')
end
rescue
end
MPWebMapIntegrity.preload_manifest
super(*args, &block)
ensure
MPWebMapIntegrity.clear_manifest
end
end
if defined?(SceneManager) && SceneManager.respond_to?(:run)
begin
manager_singleton = class << SceneManager; self; end
unless manager_singleton.ancestors.include?(MPWebMapIntegritySceneManagerPatch)
manager_singleton.prepend(MPWebMapIntegritySceneManagerPatch)
end
rescue => e
puts "[MAP-INTEGRITY] startup hook failed: #{e.class}: #{e.message}" rescue nil
end
end
@@ -0,0 +1,741 @@
# encoding: UTF-8
#==============================================================================
# PlayerPresenceVersionGate 1.0.8 BLACK-DIALOG-BACKGROUND
#------------------------------------------------------------------------------
# Separate client feature:
# - pause/chat icon above remote players' heads
# - hard game-build gate using Game.ini -> Title=LonaRPG Online B.x.x.x
#
# Assets expected:
# Graphics/Online/status_pause.png
# Graphics/Online/status_chat.png
#
# Server peer:
# 00000_PlayerPresenceVersionGate-1.0.2.jar # server protocol unchanged
#==============================================================================
module MPPlayerPresenceVersionGate
CLIENT_PATCH_VERSION = "1.0.8"
# Mobile builds may not expose Game.ini. Change this by hand together with
# server game-version.txt whenever the public game build changes.
FALLBACK_GAME_VERSION = "B.0.10.8.8.7"
TITLE_PREFIX = "LonaRPG Online"
ICON_DIR = "Graphics/Online/"
ICON_FILES = {
"pause" => "status_pause",
"chat" => "status_chat"
}
STATUS_GAP = 2
STATUS_ICON_SIZE = 16
STATUS_ICON_OUTLINE = 1
STATUS_HEARTBEAT_FRAMES = 180
UPDATE_URL = "https://lonarpg.online/Download/"
@custom_version_ok = false
@custom_version_sent = false
@blocked = false
@blocked_need = ""
@blocked_have = ""
@last_local_state = nil
@last_state_send_frame = -99_999
@remote_states = {}
@missing_asset_warned = {}
def self.frame
Graphics.frame_count.to_i
rescue
0
end
def self.reset_connection_state
@custom_version_ok = false
@custom_version_sent = false
@last_local_state = nil
@last_state_send_frame = -99_999
@remote_states = {}
# @blocked intentionally stays true once a mismatched build is rejected.
true
rescue
false
end
def self.custom_version_ok?
!!@custom_version_ok
rescue
false
end
def self.blocked?
!!@blocked
rescue
false
end
def self.read_game_ini_text
path = File.expand_path("Game.ini", Dir.pwd.to_s)
raw = File.binread(path)
begin
if raw.bytesize >= 2 && raw.getbyte(0) == 0xFF && raw.getbyte(1) == 0xFE
return raw.byteslice(2, raw.bytesize - 2).force_encoding("UTF-16LE").encode("UTF-8", :invalid => :replace, :undef => :replace, :replace => "")
elsif raw.bytesize >= 2 && raw.getbyte(0) == 0xFE && raw.getbyte(1) == 0xFF
return raw.byteslice(2, raw.bytesize - 2).force_encoding("UTF-16BE").encode("UTF-8", :invalid => :replace, :undef => :replace, :replace => "")
end
rescue
end
begin
text = raw.dup
text.force_encoding("UTF-8") if text.respond_to?(:force_encoding)
return text.encode("UTF-8", "UTF-8", :invalid => :replace, :undef => :replace, :replace => "")
rescue
begin
return raw.force_encoding("Windows-1251").encode("UTF-8", :invalid => :replace, :undef => :replace, :replace => "")
rescue
return raw.to_s
end
end
rescue => e
puts "[PRESENCE/GATE] Game.ini read failed: #{e.class}: #{e.message}" rescue nil
""
end
def self.game_title
text = read_game_ini_text
text.each_line do |line|
if line.to_s =~ /^\s*Title\s*=\s*(.*?)\s*$/i
return $1.to_s.strip
end
end
""
rescue
""
end
def self.client_game_version
title = game_title.to_s.strip
unless title.empty?
if title =~ /^#{Regexp.escape(TITLE_PREFIX)}\s+(.+)$/i
version = $1.to_s.strip
return version unless version.empty?
else
# Preserve desktop compatibility with custom Title values.
return title
end
end
fallback = FALLBACK_GAME_VERSION.to_s.strip
puts "[PRESENCE/GATE] Game.ini unavailable/Title missing; using RB fallback build=#{fallback.inspect}" rescue nil
fallback
rescue => e
fallback = FALLBACK_GAME_VERSION.to_s.strip rescue ""
puts "[PRESENCE/GATE] version fallback after #{e.class}: #{e.message}; build=#{fallback.inspect}" rescue nil
fallback
end
def self.send_build_version
return false unless defined?(WebSocket)
return false unless WebSocket.respond_to?(:connected?) && WebSocket.connected?
version = client_game_version
puts "[PRESENCE/GATE] client build=#{version.inspect} Game.ini Title=#{game_title.inspect} fallback=#{FALLBACK_GAME_VERSION.inspect}" rescue nil
result = WebSocket.send_line("client_build:#{wire_safe(version)}")
ok = !result.nil? && result.to_i >= 0
@custom_version_sent = ok
puts "[PRESENCE/GATE] client_build send failed result=#{result.inspect}" unless ok rescue nil
ok
rescue => e
@custom_version_sent = false
puts "[PRESENCE/GATE] build send failed: #{e.class}: #{e.message}" rescue nil
false
end
def self.wire_safe(value)
value.to_s.gsub(/[\r\n\0:]/, "_").strip[0, 96]
rescue
""
end
def self.on_builtin_version_ok
return if blocked?
send_build_version unless @custom_version_sent
rescue
end
def self.on_custom_version_ok(server_version)
return if blocked?
@custom_version_ok = true
puts "[PRESENCE/GATE] version accepted #{server_version}" rescue nil
rescue
end
def self.block_version!(need, have)
return true if @blocked
@blocked = true
@custom_version_ok = false
@blocked_need = need.to_s.strip
@blocked_have = have.to_s.strip
puts "[PRESENCE/GATE] BLOCKED need=#{@blocked_need.inspect} have=#{@blocked_have.inspect}" rescue nil
begin
if defined?(MPConnectStatus)
MPConnectStatus.instance_variable_set(:@manual_disconnect, true)
end
rescue
end
# The cloud bootstrap progress sprite is global and survives a scene
# switch. Remove it before taking the dialog background snapshot.
dismiss_loading_ui
Graphics.update rescue nil
# Put the unskippable scene first. A later socket close must not be able
# to send the player back to the title/loading scene.
ensure_blocked_scene
begin
WebSocket.disconnect if defined?(WebSocket) && WebSocket.respond_to?(:connected?) && WebSocket.connected?
rescue
end
true
rescue => e
puts "[PRESENCE/GATE] block failed: #{e.class}: #{e.message}" rescue nil
false
end
def self.ensure_blocked_scene
return false unless @blocked
return false unless defined?(SceneManager) && defined?(Scene_MPGameVersionBlocked)
current = SceneManager.scene rescue nil
return true if current && current.is_a?(Scene_MPGameVersionBlocked)
SceneManager.snapshot_for_background(false) rescue nil
SceneManager.goto(Scene_MPGameVersionBlocked)
true
rescue => e
puts "[PRESENCE/GATE] blocked scene failed: #{e.class}: #{e.message}" rescue nil
false
end
def self.blocked_need
@blocked_need.to_s
rescue
""
end
def self.blocked_have
@blocked_have.to_s
rescue
""
end
def self.dismiss_loading_ui
if defined?(MPGameLoadProgress) && MPGameLoadProgress.respond_to?(:dispose)
MPGameLoadProgress.dispose
end
if defined?(System_NotificationOverlay) && System_NotificationOverlay.respond_to?(:dispose)
System_NotificationOverlay.dispose
end
true
rescue => e
puts "[PRESENCE/GATE] loading overlay cleanup failed: #{e.class}: #{e.message}" rescue nil
false
end
# The version lock protects the running online session, but the player must
# still be able to leave its explanatory dialog through an explicit choice.
def self.leave_blocked_screen!
@blocked = false
@blocked_need = ""
@blocked_have = ""
@custom_version_ok = false
@custom_version_sent = false
true
rescue
false
end
def self.open_update_page
Thread.new { system("start #{UPDATE_URL}") }
true
rescue => e
puts "[PRESENCE/GATE] update page open failed: #{e.class}: #{e.message}" rescue nil
false
end
def self.normalize_state(value)
s = value.to_s.downcase.strip
return "pause" if s == "pause"
return "chat" if s == "chat"
"none"
rescue
"none"
end
def self.receive_remote_state(pid, state)
player_id = pid.to_i
return if player_id <= 0
state = normalize_state(state)
if state == "none"
@remote_states.delete(player_id)
else
@remote_states[player_id] = state
end
true
rescue
false
end
def self.remote_state(pid)
@remote_states[pid.to_i].to_s
rescue
""
end
def self.clear_remote_states
@remote_states = {}
rescue
end
def self.chat_open?
defined?(MPChat) && MPChat.respond_to?(:active?) && MPChat.active?
rescue
false
end
def self.menu_open?
return false unless defined?(SceneManager)
scene = SceneManager.scene rescue nil
return false if scene.nil?
return false if defined?(Scene_MPGameVersionBlocked) && scene.is_a?(Scene_MPGameVersionBlocked)
return true if defined?(Scene_Menu) && scene.is_a?(Scene_Menu)
return true if defined?(Scene_MenuBase) && scene.is_a?(Scene_MenuBase)
false
rescue
false
end
def self.desired_local_state
return "none" if blocked?
return "chat" if chat_open?
return "pause" if menu_open?
"none"
rescue
"none"
end
def self.can_send_ui_state?
return false unless custom_version_ok?
return false unless defined?(WebSocket)
WebSocket.respond_to?(:connected?) && WebSocket.connected?
rescue
false
end
def self.send_ui_state(state, force=false)
return false unless can_send_ui_state?
state = normalize_state(state)
now = frame
changed = (@last_local_state.to_s != state)
due = (now - @last_state_send_frame.to_i) >= STATUS_HEARTBEAT_FRAMES
return false unless force || changed || due
WebSocket.send_line("ui_state:#{state}")
@last_local_state = state
@last_state_send_frame = now
true
rescue
false
end
def self.tick
if blocked?
ensure_blocked_scene
return
end
send_ui_state(desired_local_state, false)
rescue
end
def self.icon_source_bitmap(state)
state = normalize_state(state)
name = ICON_FILES[state]
return nil if name.nil?
@icon_source_cache ||= {}
return @icon_source_cache[state] if @icon_source_cache.has_key?(state)
bitmap = nil
begin
bitmap = Cache.load_bitmap(ICON_DIR, name)
rescue
begin
bitmap = Bitmap.new("#{ICON_DIR}#{name}.png")
rescue => e
unless @missing_asset_warned[state]
@missing_asset_warned[state] = true
puts "[PRESENCE] missing #{ICON_DIR}#{name}.png (#{e.class}: #{e.message})" rescue nil
end
bitmap = nil
end
end
@icon_source_cache[state] = bitmap
bitmap
rescue
nil
end
# The source PNG may be any size. Render a fixed 16x16 nearest-neighbour
# pixel icon with a 1px black outline, matching the nickname emoji scale.
# This avoids huge 64/128px status art covering half the screen.
def self.icon_bitmap(state)
state = normalize_state(state)
return nil unless state == "pause" || state == "chat"
@icon_cache ||= {}
return @icon_cache[state] if @icon_cache[state]
src = icon_source_bitmap(state)
return nil if src.nil? || src.width.to_i <= 0 || src.height.to_i <= 0
icon_size = STATUS_ICON_SIZE.to_i
pad = STATUS_ICON_OUTLINE.to_i
out_size = icon_size + pad * 2
out = Bitmap.new(out_size, out_size)
scaled = Bitmap.new(icon_size, icon_size)
# Explicit nearest-neighbour sampling keeps deliberate pixel art crisp.
0.upto(icon_size - 1) do |y|
sy = [(y * src.height.to_i / icon_size), src.height.to_i - 1].min
0.upto(icon_size - 1) do |x|
sx = [(x * src.width.to_i / icon_size), src.width.to_i - 1].min
px = src.get_pixel(sx, sy)
scaled.set_pixel(x, y, px) if px
end
end
black = Color.new(0, 0, 0, 255)
if pad > 0
0.upto(icon_size - 1) do |y|
0.upto(icon_size - 1) do |x|
px = scaled.get_pixel(x, y)
next if px.nil? || px.alpha.to_i <= 0
(-pad).upto(pad) do |oy|
(-pad).upto(pad) do |ox|
next if ox == 0 && oy == 0
tx = x + pad + ox
ty = y + pad + oy
next if tx < 0 || ty < 0 || tx >= out_size || ty >= out_size
out.set_pixel(tx, ty, black)
end
end
end
end
end
out.blt(pad, pad, scaled, scaled.rect)
scaled.dispose rescue nil
@icon_cache[state] = out
out
rescue => e
scaled.dispose rescue nil
puts "[PRESENCE] icon resize failed #{state}: #{e.class}: #{e.message}" rescue nil
nil
end
end
#==============================================================================
# In-world version-block dialog. It deliberately uses the same Window_Message
# and Teller portrait machinery as the normal death scene.
#==============================================================================
class Scene_MPGameVersionBlocked < Scene_Base
def start
MPPlayerPresenceVersionGate.dismiss_loading_ui
super
create_version_background
create_version_dialog
end
def create_version_background
@version_background = Sprite.new
@version_background.z = 0
@version_background_bitmap = Bitmap.new(Graphics.width, Graphics.height)
@version_background_bitmap.fill_rect(
0, 0, Graphics.width, Graphics.height, Color.new(0, 0, 0, 255)
)
@version_background.bitmap = @version_background_bitmap
rescue => e
puts "[PRESENCE/GATE] blocked background failed: #{e.class}: #{e.message}" rescue nil
end
def create_version_dialog
@version_choice = nil
@message_window = Window_Message.new
$game_message.clear
$game_message.background = 0
$game_message.position = 2
need = MPPlayerPresenceVersionGate.blocked_need
have = MPPlayerPresenceVersionGate.blocked_have
need = "неизвестно" if need.nil? || need.empty?
have = "неизвестно" if have.nil? || have.empty?
$game_message.add("\\ph\\SETpl[TellerNormal]\\SETpr[nil]\\c[4]Гадалка:\\C[0] Увы...\\n Нити судьбы изменились, и эта версия игры больше не ведёт в мир LonaRPG Online.\f" +
"\\SETpl[TellerConfused]\\c[4]Гадалка:\\C[0] Миру требуется версия \\C[6]#{need}\\C[0].\\n У тебя установлена версия \\C[6]#{have}\\C[0].\f" +
"\\SETpl[TellerOkay]\\c[4]Гадалка:\\C[0] Хочешь перейти на сайт и скачать обновление?")
$game_message.choices.push("Перейти на сайт LonaRPG Online")
$game_message.choices.push("Выйти в главное меню")
$game_message.choice_cancel_type = 0
$game_message.choice_proc = Proc.new { |index| @version_choice = index.to_i }
rescue => e
puts "[PRESENCE/GATE] blocked dialog failed: #{e.class}: #{e.message}" rescue nil
end
def update
super
$game_portraits.update if defined?($game_portraits) && $game_portraits
finish_version_dialog if !@version_choice.nil? && !$game_message.busy?
end
def finish_version_dialog
choice = @version_choice
@version_choice = nil
MPPlayerPresenceVersionGate.open_update_page if choice == 0
$game_message.clear rescue nil
$game_portraits.hide_all_portraits(true) rescue nil
MPPlayerPresenceVersionGate.leave_blocked_screen!
SceneManager.goto(Scene_MapTitle)
rescue => e
puts "[PRESENCE/GATE] blocked dialog exit failed: #{e.class}: #{e.message}" rescue nil
end
def terminate
@version_background.dispose if @version_background && !@version_background.disposed? rescue nil
@version_background_bitmap.dispose if @version_background_bitmap && !@version_background_bitmap.disposed? rescue nil
super
end
end
#==============================================================================
# While the dialog is open, unrelated network callbacks may not navigate away
# from it. The dialog's own explicit choices release the lock first.
#==============================================================================
if defined?(SceneManager)
module SceneManager
class << self
unless method_defined?(:mp_presence_gate_goto_without_version_lock)
alias mp_presence_gate_goto_without_version_lock goto
def goto(scene_class)
if defined?(MPPlayerPresenceVersionGate) && MPPlayerPresenceVersionGate.blocked? &&
defined?(Scene_MPGameVersionBlocked) && scene_class != Scene_MPGameVersionBlocked
scene_class = Scene_MPGameVersionBlocked
end
mp_presence_gate_goto_without_version_lock(scene_class)
end
end
if method_defined?(:call) && !method_defined?(:mp_presence_gate_call_without_version_lock)
alias mp_presence_gate_call_without_version_lock call
def call(scene_class)
if defined?(MPPlayerPresenceVersionGate) && MPPlayerPresenceVersionGate.blocked? &&
defined?(Scene_MPGameVersionBlocked)
return goto(Scene_MPGameVersionBlocked)
end
mp_presence_gate_call_without_version_lock(scene_class)
end
end
if method_defined?(:return) && !method_defined?(:mp_presence_gate_return_without_version_lock)
alias mp_presence_gate_return_without_version_lock return
def return
if defined?(MPPlayerPresenceVersionGate) && MPPlayerPresenceVersionGate.blocked? &&
defined?(Scene_MPGameVersionBlocked)
return goto(Scene_MPGameVersionBlocked)
end
mp_presence_gate_return_without_version_lock
end
end
end
end
end
#==============================================================================
# Network gate and remote UI status parser.
#------------------------------------------------------------------------------
# Mobile hardening:
# - uses prepend instead of another alias chain for WebSocket.parse/connect/
# disconnect;
# - is idempotent when the file is evaluated more than once;
# - catches a legacy recursive parser chain instead of killing mkxp-z with
# SystemStackError. The alias wrappers in this package are also guarded
# against double evaluation, so this rescue is only the final safety net.
#==============================================================================
if defined?(WebSocket)
module MPPlayerPresenceVersionGateWebSocketPatch
def parse(msg)
line = msg.to_s.strip
# IMPORTANT: do not let the normal parser see version_ok yet.
# Its normal action is to authenticate and begin bootstrap immediately.
if line == "version_ok" && !MPPlayerPresenceVersionGate.custom_version_ok?
MPPlayerPresenceVersionGate.on_builtin_version_ok
return
end
if line =~ /^client_build_ok(?::(.*))?$/
server_version = $1.to_s
MPPlayerPresenceVersionGate.on_custom_version_ok(server_version)
# Release the original multiplayer handshake only after our build gate.
super("version_ok")
MPPlayerPresenceVersionGate.send_ui_state(MPPlayerPresenceVersionGate.desired_local_state, true)
return
end
if line =~ /^client_build_bad:([^:]*)(?::(.*))?$/
need = $1.to_s
have = $2.to_s
MPPlayerPresenceVersionGate.block_version!(need, have)
return
end
if line =~ /^player_ui_status:(\d+):(none|pause|chat)$/
MPPlayerPresenceVersionGate.receive_remote_state($1.to_i, $2)
return
end
super(msg)
rescue SystemStackError => e
# Android/mobile mkxp-z has a noticeably smaller usable Ruby stack than
# desktop. A stale/double-loaded legacy alias wrapper must not take down
# the whole client. Log once per process and drop only the bad packet.
unless instance_variable_defined?(:@mp_presence_stack_guard_reported) && @mp_presence_stack_guard_reported
@mp_presence_stack_guard_reported = true
begin
puts "[PRESENCE/GATE] blocked recursive WebSocket.parse chain: #{e.class}: #{e.message} packet=#{line.inspect}"
rescue
end
end
nil
end
def connect(*args, &block)
MPPlayerPresenceVersionGate.reset_connection_state
super(*args, &block)
end
def disconnect(*args, &block)
MPPlayerPresenceVersionGate.clear_remote_states
super(*args, &block)
end
end
begin
sc = WebSocket.singleton_class
unless sc.ancestors.include?(MPPlayerPresenceVersionGateWebSocketPatch)
sc.prepend(MPPlayerPresenceVersionGateWebSocketPatch)
end
rescue => e
puts "[PRESENCE/GATE] WebSocket prepend failed: #{e.class}: #{e.message}" rescue nil
end
end
#==============================================================================
# Local scene/chat state heartbeat.
#==============================================================================
class Scene_Base
unless method_defined?(:mp_presence_gate_update_without_tick)
alias mp_presence_gate_update_without_tick update
end
def update(*args, &block)
mp_presence_gate_update_without_tick(*args, &block)
MPPlayerPresenceVersionGate.tick if defined?(MPPlayerPresenceVersionGate)
end
end
#==============================================================================
# Remote overhead icon. Independent of nick style/VIP/custom emojis.
#==============================================================================
class Sprite_Character < Sprite_Base
unless method_defined?(:mp_presence_gate_update_without_status_icon)
alias mp_presence_gate_update_without_status_icon update
end
def update(*args, &block)
mp_presence_gate_update_without_status_icon(*args, &block)
mp_presence_gate_update_status_icon
end
def mp_presence_gate_remote_pid
return 0 unless @character
return 0 unless @character.instance_variable_defined?(:@net_player_id)
@character.instance_variable_get(:@net_player_id).to_i
rescue
0
end
def mp_presence_gate_dispose_status_icon
begin
@mp_presence_status_sprite.dispose if @mp_presence_status_sprite && !@mp_presence_status_sprite.disposed?
rescue
end
@mp_presence_status_sprite = nil
@mp_presence_status_value = nil
rescue
end
def mp_presence_gate_update_status_icon
pid = mp_presence_gate_remote_pid
if pid <= 0
mp_presence_gate_dispose_status_icon if @mp_presence_status_sprite
return
end
state = MPPlayerPresenceVersionGate.remote_state(pid).to_s
unless state == "pause" || state == "chat"
mp_presence_gate_dispose_status_icon if @mp_presence_status_sprite
return
end
bitmap = MPPlayerPresenceVersionGate.icon_bitmap(state)
if bitmap.nil?
mp_presence_gate_dispose_status_icon if @mp_presence_status_sprite
return
end
if @mp_presence_status_sprite.nil? || (@mp_presence_status_sprite.respond_to?(:disposed?) && @mp_presence_status_sprite.disposed?)
@mp_presence_status_sprite = Sprite.new(self.viewport)
@mp_presence_status_value = nil
end
if @mp_presence_status_value.to_s != state || @mp_presence_status_sprite.bitmap != bitmap
@mp_presence_status_sprite.bitmap = bitmap
@mp_presence_status_sprite.ox = bitmap.width / 2
@mp_presence_status_sprite.oy = bitmap.height
@mp_presence_status_value = state
end
top_y = self.y - self.height
begin
# Put the status centered above the nickname when a nickname is present.
# It is never placed before/after the nickname text.
if @mp_nick_sprite && @mp_nick_sprite.bitmap && @mp_nick_sprite.visible
nick_top = @mp_nick_sprite.y - @mp_nick_sprite.bitmap.height
top_y = [top_y, nick_top].min
end
rescue
end
@mp_presence_status_sprite.x = self.x
@mp_presence_status_sprite.y = top_y - MPPlayerPresenceVersionGate::STATUS_GAP
@mp_presence_status_sprite.z = self.z + 30
@mp_presence_status_sprite.visible = self.visible
rescue
mp_presence_gate_dispose_status_icon
end
unless method_defined?(:mp_presence_gate_dispose_without_status_icon)
alias mp_presence_gate_dispose_without_status_icon dispose
end
def dispose(*args, &block)
mp_presence_gate_dispose_status_icon
mp_presence_gate_dispose_without_status_icon(*args, &block)
end
end
puts "[PRESENCE/GATE] client #{MPPlayerPresenceVersionGate::CLIENT_PATCH_VERSION} loaded; build=#{MPPlayerPresenceVersionGate.client_game_version.inspect}" rescue nil
@@ -0,0 +1,204 @@
# encoding: UTF-8
# ClanEstate transient chest hotfix 1.3.3d
#
# Box 65532 is a CLIENT-SIDE MIRROR of the authoritative clan chest and must
# never become persistent player storage. Box 65533 (personal NoerHome/bank)
# is intentionally untouched.
#
# 1.3.3d fixes a recursion bug from 1.3.3c: singleton_class.prepend + a later
# alias of DataManager.setup_new_game / WebSocket.disconnect could make `super`
# re-enter the wrapper forever (SystemStackError: stack level too deep).
# This revision uses explicit alias chains and does NOT wrap setup_new_game at
# all; create_game_objects already runs for New Game and is sufficient.
return if defined?($mp_clan_chest_transient_fix_v133d_loaded) && $mp_clan_chest_transient_fix_v133d_loaded
$mp_clan_chest_transient_fix_v133d_loaded = true
module MPClanChestTransientFix
VERSION = '1.3.3d' unless const_defined?(:VERSION)
BOX_ID = 65_532 unless const_defined?(:BOX_ID)
def self.clear_transient_box(reason=nil)
begin
if defined?($game_boxes) && $game_boxes
# Avoid write_box(65532,nil) on a pristine game because some box
# implementations use a sparse Array and would allocate up to this id.
boxes = $game_boxes.instance_variable_get(:@boxes)
if boxes.is_a?(Array)
boxes[BOX_ID] = nil if BOX_ID < boxes.length
elsif $game_boxes.respond_to?(:write_box)
# Non-array implementations are assumed not to have the sparse-array
# allocation problem.
$game_boxes.write_box(BOX_ID, nil)
end
end
rescue Exception => e
puts "[ClanEstate transient chest clear] #{e.class}: #{e.message}" rescue nil
end
begin
if defined?(MPClanEstate)
MPClanEstate.instance_variable_set(:@chest_box_fingerprint, nil)
end
rescue Exception => e
puts "[ClanEstate transient chest fingerprint] #{e.class}: #{e.message}" rescue nil
end
true
end
def self.save_copy_without_clan_chest(source)
return source unless source
copy = source.dup
boxes = source.instance_variable_get(:@boxes)
if boxes.is_a?(Array)
save_boxes = boxes.dup
save_boxes[BOX_ID] = nil if BOX_ID < save_boxes.length
copy.instance_variable_set(:@boxes, save_boxes)
end
copy
rescue Exception => e
puts "[ClanEstate transient chest save filter] #{e.class}: #{e.message}" rescue nil
source
end
end
# -----------------------------------------------------------------------------
# DataManager
# -----------------------------------------------------------------------------
# IMPORTANT: no prepend here. A later script (CloudSaveDurabilityFix) aliases
# setup_new_game. In 1.3.3c the prepended setup_new_game wrapper was copied by
# that alias and its `super` then re-entered the later method, causing infinite
# recursion. New Game already calls create_game_objects, so wrapping
# create_game_objects is enough to clear 65532 safely.
if defined?(DataManager)
module DataManager
class << self
if method_defined?(:make_save_contents) && !method_defined?(:mp_clan_chest_transient_make_save_contents_without_filter)
alias mp_clan_chest_transient_make_save_contents_without_filter make_save_contents
def make_save_contents(*args, &block)
contents = mp_clan_chest_transient_make_save_contents_without_filter(*args, &block)
begin
if contents.is_a?(Hash) && contents[:imp_boxes]
contents[:imp_boxes] = MPClanChestTransientFix.save_copy_without_clan_chest(contents[:imp_boxes])
end
rescue Exception => e
puts "[ClanEstate transient chest save contents] #{e.class}: #{e.message}" rescue nil
end
contents
end
end
if method_defined?(:extract_save_contents) && !method_defined?(:mp_clan_chest_transient_extract_save_contents_without_clear)
alias mp_clan_chest_transient_extract_save_contents_without_clear extract_save_contents
def extract_save_contents(contents, *args, &block)
result = mp_clan_chest_transient_extract_save_contents_without_clear(contents, *args, &block)
MPClanChestTransientFix.clear_transient_box('load')
result
end
end
if method_defined?(:create_game_objects) && !method_defined?(:mp_clan_chest_transient_create_game_objects_without_clear)
alias mp_clan_chest_transient_create_game_objects_without_clear create_game_objects
def create_game_objects(*args, &block)
result = mp_clan_chest_transient_create_game_objects_without_clear(*args, &block)
MPClanChestTransientFix.clear_transient_box('create_game_objects')
result
end
end
end
end
end
# -----------------------------------------------------------------------------
# ClanEstate state/session hooks
# -----------------------------------------------------------------------------
if defined?(MPClanEstate)
class << MPClanEstate
if method_defined?(:ensure_game_session) && !method_defined?(:mp_clan_chest_transient_ensure_game_session_without_clear)
alias mp_clan_chest_transient_ensure_game_session_without_clear ensure_game_session
def ensure_game_session(*args, &block)
changed = mp_clan_chest_transient_ensure_game_session_without_clear(*args, &block)
MPClanChestTransientFix.clear_transient_box('game_session') if changed
changed
end
end
if method_defined?(:apply_state) && !method_defined?(:mp_clan_chest_transient_apply_state_without_clear)
alias mp_clan_chest_transient_apply_state_without_clear apply_state
def apply_state(value, *args, &block)
begin
if value.is_a?(Hash)
previous = respond_to?(:state) ? state : nil
if previous.is_a?(Hash)
old_profile = previous['profile'].to_i
new_profile = value['profile'].to_i
old_clan = previous['clan'].to_i
new_clan = value['clan'].to_i
profile_changed = old_profile > 0 && new_profile > 0 && old_profile != new_profile
clan_changed = old_clan > 0 && new_clan > 0 && old_clan != new_clan
MPClanChestTransientFix.clear_transient_box('estate_identity_change') if profile_changed || clan_changed
end
end
rescue Exception => e
puts "[ClanEstate transient chest identity] #{e.class}: #{e.message}" rescue nil
end
mp_clan_chest_transient_apply_state_without_clear(value, *args, &block)
end
end
if method_defined?(:home_kind=) && !method_defined?(:mp_clan_chest_transient_home_kind_without_clear=)
alias mp_clan_chest_transient_home_kind_without_clear= home_kind=
def home_kind=(value)
previous = begin
home_kind
rescue Exception
nil
end
result = self.mp_clan_chest_transient_home_kind_without_clear = value
if !previous.nil? && value.nil?
MPClanChestTransientFix.clear_transient_box('leave_estate')
end
result
end
end
end
end
# -----------------------------------------------------------------------------
# WebSocket disconnect
# -----------------------------------------------------------------------------
# Explicit alias chain is intentional. A later CloudSave patch also aliases
# disconnect; this form remains safe because our wrapper calls the captured old
# implementation directly instead of using `super`.
if defined?(WebSocket)
class << WebSocket
if method_defined?(:disconnect) && !method_defined?(:mp_clan_chest_transient_disconnect_without_clear)
alias mp_clan_chest_transient_disconnect_without_clear disconnect
def disconnect(*args, &block)
begin
mp_clan_chest_transient_disconnect_without_clear(*args, &block)
ensure
MPClanChestTransientFix.clear_transient_box('disconnect')
end
end
end
end
end
# -----------------------------------------------------------------------------
# Clan chest scene close
# -----------------------------------------------------------------------------
if defined?(Scene_ClanEstateStorage)
class Scene_ClanEstateStorage
if method_defined?(:terminate) && !method_defined?(:mp_clan_chest_transient_terminate_without_clear)
alias mp_clan_chest_transient_terminate_without_clear terminate
def terminate(*args, &block)
begin
mp_clan_chest_transient_terminate_without_clear(*args, &block)
ensure
MPClanChestTransientFix.clear_transient_box('chest_close')
end
end
end
end
end
@@ -0,0 +1,295 @@
# encoding: UTF-8
# TabLocationStatus client 1.0.2 MOBILE SAFE
# Adds explicit home/clan-home location labels to the multiplayer TAB overlay.
# Server companion: TabLocationStatus 1.0.0 (unchanged).
#
# 1.0.1:
# - removes the per-frame Scene_Map#update wrapper from 1.0.0;
# - adds a re-entry guard around status sending;
# - sends location only on map/scene transitions, ClanEstate entry and TAB refresh;
# - avoids calling WebSocket.connected? from the location sender.
# This prevents SystemStackError / "stack level too deep" caused by update/alias
# chains in large ModScripts installations.
module MPTabLocationStatus
VERSION = '1.0.2-mobile-safe'
class MapRef
attr_reader :map_id, :label
def initialize(map_id, label)
@map_id = map_id.to_i
@label = label.to_s
end
def to_i
@map_id
end
def to_s
"tabloc:#{@map_id}:#{@label}"
end
end
def self.hex_encode(text)
text.to_s.encode('UTF-8').unpack1('H*')
rescue
''
end
def self.hex_decode(hex)
raw = hex.to_s
return '' unless raw =~ /\A[0-9A-Fa-f]*\z/ && raw.size.even?
value = [raw].pack('H*').force_encoding('UTF-8')
return '' unless value.valid_encoding?
value.gsub(/[\r\n\t\0]/, ' ').strip[0, 32].to_s
rescue
''
end
def self.clan_context
return nil unless defined?(MPClanEstate)
return nil unless MPClanEstate.respond_to?(:active?) && MPClanEstate.active?
kind = MPClanEstate.respond_to?(:home_kind) ? MPClanEstate.home_kind.to_s : ''
return nil unless kind == 'house' || kind == 'yard'
clan_id = MPClanEstate.respond_to?(:local_clan_id) ? MPClanEstate.local_clan_id.to_i : 0
return nil if clan_id <= 0
clan_name = MPClanEstate.respond_to?(:local_clan_name) ? MPClanEstate.local_clan_name.to_s.strip : ''
[kind == 'yard' ? 'clan_yard' : 'clan_house', clan_name]
rescue
nil
end
def self.private_context
return nil unless defined?(NoerHomeEstate)
return nil unless defined?($game_map) && $game_map
return nil unless NoerHomeEstate.respond_to?(:home_kind_for_local)
kind = NoerHomeEstate.home_kind_for_local($game_map.map_id).to_s
return ['private_house', ''] if kind == 'house'
return ['private_yard', ''] if kind == 'yard'
nil
rescue
nil
end
def self.camp_context
return nil unless defined?(LonaCraft::Bases) && defined?($game_map) && $game_map
return nil if $game_map.respond_to?(:isOverMap) && $game_map.isOverMap
rec = LonaCraft::Bases.record_for_map($game_map)
return nil unless rec.is_a?(Hash) && rec['om'].is_a?(Array)
name = LonaCraft::Bases.name_of(rec).to_s
['camp', name]
rescue StandardError
nil
end
def self.current_context
clan_context || private_context || camp_context || ['none', '']
rescue
['none', '']
end
# Do not call WebSocket.connected? here. This add-on can sit at the tail of a
# very long alias chain, so reading the core connection flag directly is the
# safest possible test and cannot recurse back into client wrappers.
def self.connected_raw?
return false unless defined?(WebSocket)
!!WebSocket.instance_variable_get(:@connected)
rescue
false
end
def self.send_current(force=false)
return false if @sending
return false unless connected_raw?
@sending = true
kind, name = current_context
key = "#{kind}|#{name}"
return false if !force && key == @last_key
WebSocket.send_line("tabloc_set:#{kind}:#{hex_encode(name)}")
@last_key = key
true
rescue Exception => e
# Do not allow this cosmetic TAB add-on to take the game down. The re-entry
# guard is always cleared below. Logging is intentionally tiny.
begin
puts "[TABLOC] send failed #{e.class}: #{e.message}"
rescue
end
false
ensure
@sending = false
end
def self.label(kind, name)
case kind.to_s
when 'camp'
n = name.to_s.strip
n.empty? ? 'Лагерь' : n
when 'private_house'
'Частный дом'
when 'private_yard'
'Огород'
when 'clan_house'
n = name.to_s.strip
n.empty? ? 'Клановый дом' : "Клановый дом - #{n}"
when 'clan_yard'
n = name.to_s.strip
n.empty? ? 'Клановый двор' : "Клановый двор - #{n}"
else
nil
end
end
end
if defined?(WebSocket)
module WebSocket
@mp_tab_locations ||= {}
class << self
unless method_defined?(:tabloc_entries_without_location_status)
alias tabloc_entries_without_location_status mp_tab_entries if method_defined?(:mp_tab_entries)
end
unless method_defined?(:tabloc_request_who_without_location_status)
alias tabloc_request_who_without_location_status mp_tab_request_who if method_defined?(:mp_tab_request_who)
end
end
def self.tabloc_apply_status(msg)
return false unless msg.to_s.start_with?('tabloc_status:')
parts = msg.to_s.split(':', 4)
return true if parts.size < 3
pid = parts[1].to_i
return true if pid <= 0
kind = parts[2].to_s
name = MPTabLocationStatus.hex_decode(parts[3].to_s)
@mp_tab_locations ||= {}
if kind == 'none' || kind.empty?
@mp_tab_locations.delete(pid)
else
@mp_tab_locations[pid] = {:kind => kind, :name => name}
end
true
rescue
true
end
# parse is installed below with prepend. This avoids aliasing an already
# prepended ClanEstate WebSocket parser on mobile during ModScripts loading.
def self.mp_tab_location_label(pid)
@mp_tab_locations ||= {}
data = @mp_tab_locations[pid.to_i]
return nil unless data.is_a?(Hash)
MPTabLocationStatus.label(data[:kind], data[:name])
rescue
nil
end
if respond_to?(:tabloc_entries_without_location_status)
def self.mp_tab_entries(current_map_id)
total, entries = tabloc_entries_without_location_status(current_map_id)
wrapped = (entries || []).map do |row|
pid, nick, map, same = row
label = mp_tab_location_label(pid)
if label && !label.to_s.empty?
[pid, nick, MPTabLocationStatus::MapRef.new(map, label), same]
else
[pid, nick, map, same]
end
end
[total, wrapped]
rescue
tabloc_entries_without_location_status(current_map_id)
end
end
if respond_to?(:tabloc_request_who_without_location_status)
def self.mp_tab_request_who
# Refresh our own location immediately before the TAB list is requested.
MPTabLocationStatus.send_current(false)
tabloc_request_who_without_location_status
send_line('tabloc_who') if respond_to?(:send_line) && MPTabLocationStatus.connected_raw?
rescue
end
end
end
end
module MPTabLocationStatusWebSocketPatch
def parse(msg)
return if tabloc_apply_status(msg)
super(msg)
end
end
if defined?(WebSocket)
begin
sc = WebSocket.singleton_class
sc.prepend(MPTabLocationStatusWebSocketPatch) unless sc.ancestors.include?(MPTabLocationStatusWebSocketPatch)
rescue => e
puts "[TABLOC] parser prepend failed #{e.class}: #{e.message}" rescue nil
end
end
if defined?(MPMapInfo)
module MPMapInfo
class << self
unless method_defined?(:tabloc_display_name_without_location_status)
alias tabloc_display_name_without_location_status display_name
end
def display_name(map_id)
if map_id.is_a?(MPTabLocationStatus::MapRef)
return map_id.label.to_s
end
tabloc_display_name_without_location_status(map_id)
end
end
end
end
# Event-driven refresh only. 1.0.0 wrapped Scene_Map#update every frame; in a
# heavily patched client that can complete an alias cycle and overflow the Ruby
# stack. Map setup + Scene_Map start + TAB refresh is sufficient for this label.
if defined?(Game_Map)
class Game_Map
unless method_defined?(:tabloc_setup_without_location_status)
alias tabloc_setup_without_location_status setup
def setup(map_id)
result = tabloc_setup_without_location_status(map_id)
MPTabLocationStatus.send_current(true)
result
end
end
end
end
if defined?(Scene_Map)
class Scene_Map < Scene_Base
unless method_defined?(:tabloc_start_without_location_status)
alias tabloc_start_without_location_status start
def start
result = tabloc_start_without_location_status
MPTabLocationStatus.send_current(true)
result
end
end
end
end
# ClanEstate can enter its virtual house/yard after ordinary map setup. Send a
# fresh marker right after the existing enter method completes.
if defined?(MPClanEstate)
module MPClanEstate
class << self
if method_defined?(:enter) && !method_defined?(:tabloc_enter_without_location_status)
alias tabloc_enter_without_location_status enter
def enter(value)
result = tabloc_enter_without_location_status(value)
MPTabLocationStatus.send_current(true)
result
end
end
end
end
end
@@ -0,0 +1,269 @@
# encoding: UTF-8
# Client half of OnlineSaveFix and compatibility fixes for multiplayer actors.
module MPWorldEventFix
@treasure = nil
class << self
attr_reader :treasure
def set_treasure(id, map_id, x, y, name)
@treasure={"id"=>id.to_i,"map_id"=>map_id.to_i,"x"=>x.to_i,"y"=>y.to_i,"name"=>name.to_s}
rescue
@treasure=nil
end
def remove_treasure(id)
@treasure=nil if @treasure && @treasure["id"].to_i==id.to_i
rescue
end
def visible_treasure
return nil unless @treasure && defined?($game_map) && $game_map
@treasure["map_id"].to_i==$game_map.map_id.to_i ? @treasure : nil
rescue
nil
end
def near?(treasure)
return false unless treasure && defined?($game_player) && $game_player
($game_player.x.to_i-treasure["x"].to_i).abs<=2 && ($game_player.y.to_i-treasure["y"].to_i).abs<=2
rescue
false
end
def claim_if_requested
t=visible_treasure
return unless t && near?(t) && Input.trigger?(:C)
WebSocket.send_line("eventpack_treasure_claim:#{t["id"].to_i}") if defined?(WebSocket)
rescue
end
def reward(item_name, amount)
qty=[[amount.to_i,1].max,99].min
item=(defined?($data_ItemName) && $data_ItemName ? $data_ItemName[item_name.to_s] : nil) rescue nil
item=$data_items.compact.find{|obj|obj.respond_to?(:item_name) && obj.item_name.to_s==item_name.to_s} if item.nil? && defined?($data_items) && $data_items
return false unless item && defined?($game_party) && $game_party
$game_party.gain_item(item,qty)
System_NotificationOverlay.success("Найден тайник: +#{qty} #{item.name}") if defined?(System_NotificationOverlay)
WebSocket.live_sync_send_now("eventpack_reward",true,true) if defined?(WebSocket) && WebSocket.respond_to?(:live_sync_send_now)
true
rescue
false
end
end
class TreasureMarker
def initialize
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height);@viewport.z=9500
@sprite=Sprite.new(@viewport);@sprite.bitmap=Bitmap.new(140,42);@sprite.ox=70;@sprite.oy=42
@last_near=nil;redraw(false)
end
def update(t)
tw=($game_map.tile_width.to_i rescue 32);th=($game_map.tile_height.to_i rescue 32)
tw=32 if tw<=0;th=32 if th<=0
@sprite.x=(($game_map.adjust_x(t["x"].to_i)*tw)+tw/2).to_i
@sprite.y=(($game_map.adjust_y(t["y"].to_i)*th)+th).to_i
near=MPWorldEventFix.near?(t);redraw(near) if @last_near!=near;@last_near=near
@sprite.visible=true
rescue
@sprite.visible=false if @sprite
end
def redraw(near)
b=@sprite.bitmap;b.clear
b.fill_rect(62,2,16,16,Color.new(255,185,30,255));b.fill_rect(66,0,8,20,Color.new(255,230,80,255))
b.font.size=15;b.font.bold=true;b.font.outline=true rescue nil;b.font.color=Color.new(255,230,120,255)
b.draw_text(0,19,140,20,near ? "ТАЙНИК [C]" : "ТАЙНИК",1)
rescue
end
def hide;@sprite.visible=false if @sprite;end
def dispose
bmp=@sprite.bitmap rescue nil;@sprite.dispose if @sprite && !@sprite.disposed?;bmp.dispose if bmp && !bmp.disposed?;@viewport.dispose if @viewport && !@viewport.disposed?
rescue
end
end
end
if defined?(WebSocket)
module WebSocket
class NetSyncBattleStat
def initialize(owner); @owner=owner; end
def get_stat(name,type=0); value=@owner._ps_stat_num(name.to_s); value.nil? ? 0 : value; rescue; 0; end
def set_stat(name,value,type=0); @owner._ps_stat_write(name.to_s,value); end
def set_stat_m(name,value,types=nil); @owner._ps_stat_write(name.to_s,value); end
def stat; @owner.stat; end
end unless const_defined?(:NetSyncBattleStat)
if const_defined?(:NetSyncActor)
class NetSyncActor
def battle_stat; @online_bugfix_battle_stat ||= WebSocket::NetSyncBattleStat.new(self); end
end
end
class << self
# parse is installed with prepend below. Aliasing WebSocket.parse here is
# unsafe if ClanEstate already installed its prepended parser during a
# mobile loading-frame Graphics.update.
if method_defined?(:bootstrap_state_ready?) && !method_defined?(:online_bugfix_bootstrap_state_ready_without_body)
alias online_bugfix_bootstrap_state_ready_without_body bootstrap_state_ready?
def bootstrap_state_ready?
ready=online_bugfix_bootstrap_state_ready_without_body
return ready unless ready && @bootstrap_mode.to_s=='load' && @online_bugfix_body_requested
@online_bugfix_body_wait=@online_bugfix_body_wait.to_i+1
return false unless @online_bugfix_body_received || @online_bugfix_body_wait>300
ready
end
end
if method_defined?(:_live_sync_collect_story_body) && !method_defined?(:online_bugfix_collect_story_body_without_palette)
alias online_bugfix_collect_story_body_without_palette _live_sync_collect_story_body
def _live_sync_collect_story_body
out=online_bugfix_collect_story_body_without_palette
source=($story_stats.data rescue nil)
source=$story_stats if !source.is_a?(Hash) && ($story_stats.is_a?(Hash) rescue false)
if source.respond_to?(:has_key?)
%w[LonaPaletteStudio LonaPaletteStudioSettings].each{|key|out[key]=_live_sync_body_safe_value(source[key]) if source.has_key?(key)}
end
out
rescue
out || {}
end
end
end
end
end
# World-event marker used to wrap Scene_Map#update here. Scene_Map is one of
# the most heavily wrapped classes in the online client, so another alias layer
# could become recursive after reload/compat patches and end in
# SystemStackError (the old line 169). Keep the feature on Spriteset_Map
# instead: it is updated once per map frame but does not participate in the
module MPOnlineBugFixWebSocketParsePatch
def parse(message)
text=message.to_s
if text.start_with?('eventpack_treasure:')
p=text.strip.split(':',6);MPWorldEventFix.set_treasure(p[1],p[2],p[3],p[4],p[5]) if p.length>=6
return
elsif text.start_with?('eventpack_treasure_remove:')
MPWorldEventFix.remove_treasure(text.split(':',2)[1]);return
elsif text.start_with?('eventpack_reward:')
p=text.strip.split(':',3);MPWorldEventFix.reward(p[1],p[2]) if p.length>=3
return
end
if text.start_with?('bootstrap_mode:')
@online_bugfix_body_requested=false
@online_bugfix_body_received=(text.strip=='bootstrap_mode:new')
@online_bugfix_body_wait=0
end
result=super(message)
if text.strip=='bootstrap_mode:load'
@online_bugfix_body_requested=true
send_line('cloud_body_req') rescue nil
elsif text.start_with?('bootstrap_body:')
@online_bugfix_body_received=true
end
result
end
end
if defined?(WebSocket)
begin
sc=WebSocket.singleton_class
sc.prepend(MPOnlineBugFixWebSocketParsePatch) unless sc.ancestors.include?(MPOnlineBugFixWebSocketParsePatch)
rescue => e
puts "[OnlineBugFix] parser prepend failed #{e.class}: #{e.message}" rescue nil
end
end
# Scene_Map alias chain.
if defined?(Spriteset_Map)
class Spriteset_Map
unless method_defined?(:online_bugfix_world_event_initialize_original)
alias online_bugfix_world_event_initialize_original initialize
def initialize(*args, &block)
result=online_bugfix_world_event_initialize_original(*args, &block)
begin
@online_bugfix_treasure_marker=MPWorldEventFix::TreasureMarker.new
rescue
@online_bugfix_treasure_marker=nil
end
result
end
end
unless method_defined?(:online_bugfix_world_event_update_original)
alias online_bugfix_world_event_update_original update
def update(*args, &block)
result=online_bugfix_world_event_update_original(*args, &block)
begin
t=MPWorldEventFix.visible_treasure
if t
@online_bugfix_treasure_marker.update(t) if @online_bugfix_treasure_marker
MPWorldEventFix.claim_if_requested
else
@online_bugfix_treasure_marker.hide if @online_bugfix_treasure_marker
end
rescue
end
result
end
end
unless method_defined?(:online_bugfix_world_event_dispose_original)
alias online_bugfix_world_event_dispose_original dispose
def dispose(*args, &block)
begin
@online_bugfix_treasure_marker.dispose if @online_bugfix_treasure_marker
rescue
ensure
@online_bugfix_treasure_marker=nil
end
online_bugfix_world_event_dispose_original(*args, &block)
end
end
end
end
if defined?(MPCompanionSync)
module MPCompanionSync
class << self
if method_defined?(:reset_sync_state) && !method_defined?(:online_bugfix_reset_sync_state_without_registry)
alias online_bugfix_reset_sync_state_without_registry reset_sync_state
def reset_sync_state
result=online_bugfix_reset_sync_state_without_registry
@remote_companion_meta_by_server_id={};@remote_story_companion_event_ids={};@personal_story_event_ids={}
@remote_companion_registry_map_id=current_map_id
result
end
end
if method_defined?(:remote_companion_creation_blocked?) && !method_defined?(:online_bugfix_remote_creation_without_static_guard)
alias online_bugfix_remote_creation_without_static_guard remote_companion_creation_blocked?
def remote_companion_creation_blocked?(server_event_id)
eid=server_event_id.to_i;dynamic_base=(WebSocket::SERVER_DYNAMIC_EVENT_ID_BASE rescue 50000)
return true if eid>0 && eid<dynamic_base
online_bugfix_remote_creation_without_static_guard(server_event_id)
rescue
true
end
end
end
end
end
if defined?(LonaPaletteStudio)
class << LonaPaletteStudio
if method_defined?(:skin_family_recolor_components) && !method_defined?(:online_bugfix_skin_family_original)
alias online_bugfix_skin_family_original skin_family_recolor_components
def skin_family_recolor_components(red,green,blue,profile,category,context=nil)
return online_bugfix_skin_family_original(red,green,blue,profile,category,context) unless category.to_s=='skin'
luma=red*0.299+green*0.587+blue*0.114;max_value=[red,green,blue].max.to_f;min_value=[red,green,blue].min.to_f
detail=(max_value-min_value)/255.0;shadow=luma/255.0
target_h=profile['h'].to_f;target_s=profile['s'].to_f;target_v=profile['v'].to_f
if context && context[:skin_color_mode].to_s=='solid'
sat=target_s;val=target_v;edge_scale=0.10;highlight_scale=0.04
else
sat=target_s*(0.72+detail*0.18+shadow*0.10);val=target_v*(0.32+shadow*0.74);edge_scale=0.42;highlight_scale=0.10
end
sat=clamp(sat,0.0,255.0);val=clamp(val,0.0,255.0);rgb=hsv_to_rgb(target_h,sat,val)
keep=clamp((28.0-luma)/28.0,0.0,1.0)*edge_scale+clamp((luma-232.0)/23.0,0.0,1.0)*highlight_scale
[(rgb[0]*(1.0-keep)+red*keep).round,(rgb[1]*(1.0-keep)+green*keep).round,(rgb[2]*(1.0-keep)+blue*keep).round]
end
end
end
end
File diff suppressed because it is too large. Load diff
+294
View File
@@ -0,0 +1,294 @@
# encoding: UTF-8
# PlayerDocuments 1.0.1. Requires the shipped multiplayer and CorpseRecovery clients.
module MPPlayerDocuments
BASE = 'ItemPassportLona'
PREFIX = 'ItemPassportPlayer_'
class << self
attr_accessor :incoming, :legacy_owner, :merchant_key
def nick
value = WebSocket.local_nickname.to_s.strip
value.empty? ? 'Лона' : value
end
def base; $data_ItemName[BASE]; end
def owner(item)
return nil unless item
return nick if item.item_name == BASE
item.instance_variable_get(:@mp_document_owner)
end
def document?(item); !owner(item).nil?; end
def stable_name(who); PREFIX + who.to_s.encode('UTF-8').unpack1('H*'); end
def from_name(name)
return base if name == BASE
return nil unless name.to_s.match?(/\AItemPassportPlayer_(?:[0-9a-f]{2}){1,256}\z/)
who = [name.delete_prefix(PREFIX)].pack('H*').force_encoding('UTF-8')
return nil unless who.valid_encoding? && !who.match?(/[\x00-\x1f]/)
item_for(who)
end
def item_for(who)
who = who.to_s
return base if who == nick
name = stable_name(who)
found = $data_ItemName[name]
return found if found && $data_items[found.id].equal?(found)
item = base.dup
item.instance_variable_set(:@id, $data_items.length)
item.instance_variable_set(:@item_name, name)
item.instance_variable_set(:@name, "Документы #{who}")
item.instance_variable_set(:@mp_document_owner, who)
$data_items << item
$data_ItemName[name] = item
item
end
def ledger
$game_party.instance_variable_get(:@mp_document_merchants) ||
$game_party.instance_variable_set(:@mp_document_merchants, {})
end
def metadata
owners = {}
$game_party.items.each do |item|
who = owner(item)
owners[item.id.to_s] = who if who
end
{'version' => 1, 'owners' => owners, 'merchants' => ledger}
end
def with_snapshot(stats, fallback = nil)
previous, previous_owner = incoming, legacy_owner
data = stats.is_a?(Hash) ? stats['player_documents'] : nil
self.incoming = data.is_a?(Hash) && data['owners'].is_a?(Hash) ? data['owners'] : {}
self.legacy_owner = fallback
yield data
ensure
self.incoming, self.legacy_owner = previous, previous_owner
end
def sync
WebSocket.live_sync_mark_dirty if WebSocket.respond_to?(:live_sync_mark_dirty)
MPBankGuard.report if defined?(MPBankGuard) && MPBankGuard.ready?
end
def sell_gang(interpreter)
count = $game_party.item_number(BASE)
return if count <= 0
$game_party.lose_item(BASE, count)
interpreter.optain_item('ItemCoin3', 1)
row = (ledger['gang_boss'] ||= {'amount' => 0, 'coins' => 0})
row['amount'] += count
row['coins'] += 2
sync
end
def buy_gang(interpreter)
row = ledger['gang_boss']
return unless row && row['amount'].to_i > 0
cost = row['coins'].to_i
interpreter.call_msg("Выкупить свои документы за #{cost} золотых монет?\\optB[Нет,Выкупить]")
accepted = $game_temp.choice == 1
$game_temp.choice = -1
return unless accepted
if $game_party.item_number('ItemCoin3') < cost
interpreter.call_msg('Для выкупа документов не хватает золотых монет.')
return
end
$game_party.lose_item('ItemCoin3', cost)
$game_party.gain_item(BASE, row['amount'])
ledger.delete('gang_boss')
sync
interpreter.call_msg('Вот твои оригинальные документы. Забирай.')
end
end
module Party
def normalize_party_item(item)
if item.is_a?(String) && item.start_with?(PREFIX)
return MPPlayerDocuments.from_name(item)
end
who = item.instance_variable_get(:@mp_document_owner) if item.respond_to?(:item_name)
return MPPlayerDocuments.item_for(who) if who
super
end
# Foreign document runtime IDs can move after restarting/loading a save.
def mp_restore_documents
return if @mp_restoring_documents || !@mp_document_ids
@mp_restoring_documents = true
old = @mp_document_ids
moved = []
old.each do |id, who|
count = @items[id].to_i
item = MPPlayerDocuments.item_for(who)
moved << [id, item, count] if count > 0
end
moved.each { |id, _, _| @items.delete(id) }
@mp_document_ids = {}
moved.each do |_, item, count|
@items[item.id] = @items.fetch(item.id, 0) + count
@mp_document_ids[item.id] = MPPlayerDocuments.owner(item) unless item.item_name == BASE
end
ensure
@mp_restoring_documents = false
end
def items
mp_restore_documents
super
end
def item_number(item)
mp_restore_documents
super
end
def gain_item_core(item, amount = 1, include_equip = false)
mp_restore_documents
item = MPPlayerDocuments.from_name(item) || item if item.is_a?(String) && item.start_with?(PREFIX)
result = super(item, amount, include_equip)
actual = normalize_party_item(item)
if actual && actual.item_name != BASE && MPPlayerDocuments.document?(actual)
(@mp_document_ids ||= {})[actual.id] = MPPlayerDocuments.owner(actual)
end
result
end
end
module TextNames
def [](key, *args)
return MPPlayerDocuments.nick if key == 'menu:main_stats/name'
return "Документы #{MPPlayerDocuments.nick}" if key == 'DataItem:PassportLona/item_name'
return key if key.is_a?(String) && key.start_with?('Документы ')
super
end
end
# Validation runs before apply_bootstrap_state, while foreign passport IDs
# from a previous process do not exist in the current item database yet.
module BootstrapValidation
def validate_payload(state)
return super unless state.is_a?(Hash)
stats = payload_parts(state)['stats_json']
MPPlayerDocuments.with_snapshot(stats) { super(state) }
end
def data_item(kind, id)
if kind.to_s == 'item'
who = (MPPlayerDocuments.incoming || {})[id.to_s]
if who.is_a?(String) && !who.empty? && who.valid_encoding? && !who.match?(/[\x00-\x1f]/)
return MPPlayerDocuments.base
end
end
super
end
end
module Network
def _live_sync_collect_stats(actor)
super.merge('player_documents' => MPPlayerDocuments.metadata)
end
def _bootstrap_data_item_by_name(name)
MPPlayerDocuments.from_name(name) || super
end
def _bootstrap_gain_hash(kind, payload)
return super unless kind == 'item' && payload.is_a?(Hash)
remaining = payload.dup
payload.each do |id, qty|
who = (MPPlayerDocuments.incoming || {})[id.to_s]
if !who && id.to_i == MPPlayerDocuments.base.id
who = MPPlayerDocuments.legacy_owner || MPPlayerDocuments.nick
end
next unless who.is_a?(String) && !who.empty?
remaining.delete(id)
$game_party.gain_item(MPPlayerDocuments.item_for(who), qty.to_i) if qty.to_i > 0
end
super(kind, remaining)
end
def apply_bootstrap_state(state)
return super unless state.is_a?(Hash) && !state['server_spawn_only']
stats = state['stats_json'].is_a?(Hash) ? state['stats_json'] : bootstrap_decode_json_blob(state['stats_blob'])
MPPlayerDocuments.with_snapshot(stats) do |data|
# A corpse's merchant history never replaces a living player's history.
result = super(state)
if result && data.is_a?(Hash) && data['merchants'].is_a?(Hash)
$game_party.instance_variable_set(:@mp_document_merchants, data['merchants'])
end
result
end
end
end
module CorpseLoot
def consume_public_loot_packet(message)
return super unless public_loot_pending? && message.to_s.start_with?('bootstrap_state:')
parts = message.split(':', 21)
corpse = (@corpses || {})[@public_loot_pending_id.to_i]
fallback = corpse && corpse['nick']
stats = WebSocket.bootstrap_decode_json_blob(parts[16])
MPPlayerDocuments.with_snapshot(stats, fallback || 'Неизвестный игрок') { super(message) }
end
end
module Merchant
def manual_barters(trade_id)
previous = MPPlayerDocuments.merchant_key
MPPlayerDocuments.merchant_key = "#{trade_id}/#{@map_id}/#{get_character(0).id}"
MPPlayerDocuments.ledger.each_value do |rows|
next unless rows.is_a?(Array)
rows.each { |row| MPPlayerDocuments.item_for(row['owner']) }
end
$game_party.items # Remap saved inventory before barter takes its cancel snapshot.
super
ensure
MPPlayerDocuments.merchant_key = previous
end
end
module GangEvent
def load_script(path)
return super unless path == 'Data/HCGframes/event/NoerBackStreetGangBoss.rb'
script = File.binread(path).force_encoding('UTF-8')
menu = '\tcmd_sheet = tmpTarList'.gsub('\\t', "\t")
raise 'PlayerDocuments: gang menu changed' unless script.include?(menu)
script = script.sub(menu, "\ttmpTarList << ['Выкупить свои документы', 'buyOwnID'] if MPPlayerDocuments.ledger['gang_boss']\n" + menu)
marker = '\t\twhen "sellID"'.gsub('\\t', "\t")
raise 'PlayerDocuments: passport sale changed' unless script.include?(marker)
script = script.sub(marker, "\t\twhen \"buyOwnID\"\n\t\t\tMPPlayerDocuments.buy_gang(self)\n" + marker)
loss = 'optain_lose_item("ItemPassportLona",$game_party.item_number("ItemPassportLona"))'
payout = 'optain_item("ItemCoin3",1)'
raise 'PlayerDocuments: passport payout changed' unless script.include?(loss) && script.include?(payout)
script = script.sub(loss, 'MPPlayerDocuments.sell_gang(self)').sub(payout, '# Payout recorded by PlayerDocuments')
instance_eval(script, path)
end
end
module Trade
def prepare(*args)
super
@mp_merchant_key = MPPlayerDocuments.merchant_key
saved = MPPlayerDocuments.ledger[@mp_merchant_key]
return unless saved.is_a?(Array)
box = $game_boxes.box(@box_id)
box.keys.each { |item| box.delete(item) if MPPlayerDocuments.document?(item) }
saved.each do |row|
item = MPPlayerDocuments.item_for(row['owner'])
$game_boxes.setStoreWithPrice(@box_id, item, row['price'].to_i, row['amount'].to_i)
end
end
def move_item(val = nil)
item = @bag_window.active ? @bag_window.item : nil
document = item && MPPlayerDocuments.document?(item)
before = document ? $game_party.item_number(item) : 0
price = document ? item.get_sell_price : 0
result = super
if document && $game_party.item_number(item) < before
$game_boxes.setStoreItemPrice(item, price * 2)
refresh
end
result
end
def terminate
if !@resetToDefault && @mp_merchant_key
rows = []
$game_boxes.box(@box_id).each do |item, amount|
next unless amount.to_i > 0 && MPPlayerDocuments.document?(item)
rows << {'owner' => MPPlayerDocuments.owner(item), 'amount' => amount.to_i,
'price' => $game_boxes.getStoreItemPrice(item).to_i}
end
MPPlayerDocuments.ledger[@mp_merchant_key] = rows
end
super
end
end
end
Game_Party.prepend(MPPlayerDocuments::Party)
Text.prepend(MPPlayerDocuments::TextNames)
WebSocket.singleton_class.prepend(MPPlayerDocuments::Network)
MPStateInfra.singleton_class.prepend(MPPlayerDocuments::BootstrapValidation) if defined?(MPStateInfra)
MPCorpseRecovery.singleton_class.prepend(MPPlayerDocuments::CorpseLoot) if defined?(MPCorpseRecovery)
GIM_ADDON.prepend(MPPlayerDocuments::Merchant)
GIM_ADDON.prepend(MPPlayerDocuments::GangEvent)
Scene_TradeStorage.prepend(MPPlayerDocuments::Trade)
+240
View File
@@ -0,0 +1,240 @@
# encoding: UTF-8
# Server-authorized GOD mode. The flag is runtime-only, never stored in a save.
module MPGodMode
STATS = %w[health sta sat mood].freeze
class << self
def actor
$game_player.actor if defined?($game_player) && $game_player && $game_player.respond_to?(:actor)
end
def active?
!!@enabled && defined?(WebSocket) && WebSocket.respond_to?(:admin_owner_active?) && WebSocket.admin_owner_active? && Time.now.to_f < @expires.to_f
end
def protects?(target)
active? && target && target.equal?(actor)
end
def maximum(table, name)
row = table.get_stat_data(name)
return nil unless row.is_a?(Array) && row[ActorStat::MAX_STAT].is_a?(Numeric)
[row[ActorStat::MAX_STAT], 1].max
end
def reset
@enabled = false
@expires = 0
@hello_at = nil
@pending_at = nil
end
def set(on)
changed = @enabled != on
@enabled = on
@expires = Time.now.to_f + 35
@pending_at = nil
refill if on
WebSocket.chat_local_system(on ? "GOD включён: урон отключён, здоровье, выносливость, сытость и настроение полные." : "GOD выключен.") if changed && WebSocket.respond_to?(:chat_local_system)
refresh_menu
end
def pending?
@pending_at && Time.now.to_f - @pending_at < 6
end
def label
return "GOD: проверка сервера..." if pending?
active? ? "GOD: ВКЛ" : "GOD: ВЫКЛ"
end
def request_toggle
return if pending? || !WebSocket.connected? || !WebSocket.admin_owner_active?
@pending_at = Time.now.to_f
WebSocket.send_line("god_toggle:#{active? ? 0 : 1}")
# Never enable locally here. Only god_state from the server changes the flag.
refresh_menu
end
def refresh_menu
scene = SceneManager.scene if defined?(SceneManager)
scene.mp_god_refresh if scene && scene.respond_to?(:mp_god_refresh)
end
def refill
target = actor
return unless protects?(target)
table = target.battle_stat
STATS.each do |name|
row = table.get_stat_data(name)
value = maximum(table, name)
next if !row || !value || row[ActorStat::CURRENT_STAT] == value
# Raw table writes elsewhere in the game are corrected without recursively
# invoking health/stamina side effects or generating experience from costs.
row[ActorStat::CURRENT_STAT] = value
row[ActorStat::STAT_CHANGED] = true
target.instance_variable_set(:@stat_changed, true)
end
target.instance_variable_set(:@hp, [target.mhp.to_i, 1].max) if target.respond_to?(:mhp)
end
def tick
unless WebSocket.connected?
reset
return
end
if WebSocket.admin_owner_active? && WebSocket.bootstrap_sync_unlocked? && (!@hello_at || Time.now.to_f - @hello_at > 10)
@hello_at = Time.now.to_f
WebSocket.send_line("god_hello:1")
end
refill
if @pending_at && !pending?
@pending_at = nil
refresh_menu
end
end
end
end
# Extend the existing admin menu opened by backslash (MPAdminMenu::OPEN_VK).
# Do not replace its hotkey, style, kick, or ban handlers.
if defined?(Scene_Map) && Scene_Map.method_defined?(:mp_admin_show_commands)
class Scene_Map
alias godmode_admin_show mp_admin_show_commands
def mp_admin_show_commands(commands, state, width = 320, font = nil)
rows = commands.dup
# Backward compatible with older menu scripts, without duplicating
# the GOD tile provided by the icon-grid version.
if state == :root && WebSocket.admin_owner_active? &&
!rows.any? { |entry| entry[1] == :god_toggle }
rows << [MPGodMode.label, :god_toggle, !MPGodMode.pending?, nil]
end
godmode_admin_show(rows, state, width, font)
@mp_admin_window.set_handler(:god_toggle, method(:mp_god_toggle)) if @mp_admin_window && state == :root
end
def mp_god_toggle
MPGodMode.request_toggle
@mp_admin_window.activate if @mp_admin_window
end
def mp_god_refresh
return unless @mp_admin_state == :root && @mp_admin_window && !@mp_admin_window.disposed?
# New icon grid stores entries in @mp_entries, not @mp_commands.
# Update in place without losing selected cell or action handlers.
rows = @mp_admin_window.instance_variable_get(:@mp_entries)
if rows.is_a?(Array)
rows.each do |row|
next unless row[1] == :god_toggle
row[0] = MPGodMode.label
row[2] = !MPGodMode.pending?
end
@mp_admin_window.refresh
elsif @mp_admin_window.respond_to?(:set_commands)
rows = @mp_admin_window.instance_variable_get(:@mp_commands)
return unless rows.is_a?(Array)
@mp_admin_window.set_commands(rows.map { |row|
row[1] == :god_toggle ? [MPGodMode.label, :god_toggle, !MPGodMode.pending?, nil] : row
})
end
@mp_admin_window.activate
end
end
end
module WebSocket
class << self
# Invalidate GOD immediately when the server revokes OWNER privileges.
alias godmode_admin_set_role admin_set_role
def admin_set_role(role_name)
result = godmode_admin_set_role(role_name)
MPGodMode.reset unless admin_owner_active?
result
end
alias godmode_parse parse
def parse(message)
if message == "god_state:1" || message == "god_state:0"
MPGodMode.set(message.end_with?(":1"))
return
elsif message.start_with?("god_notice:")
chat_local_system(unesc(message.split(":",2)[1])) if respond_to?(:chat_local_system)
return
end
godmode_parse(message)
end
alias godmode_update update
def update(*args)
MPGodMode.refill
result = godmode_update(*args)
MPGodMode.tick
result
end
alias godmode_disconnect disconnect
def disconnect(*args)
MPGodMode.reset
godmode_disconnect(*args)
end
alias godmode_attacked handle_being_attacked
def handle_being_attacked(*args)
return if MPGodMode.active?
godmode_attacked(*args)
end
if method_defined?(:_mp_pvp_apply_skill_payload)
alias godmode_skill_payload _mp_pvp_apply_skill_payload
def _mp_pvp_apply_skill_payload(*args)
return true if MPGodMode.active?
godmode_skill_payload(*args)
end
end
alias godmode_remote_action handle_remote_deistvia
def handle_remote_deistvia(player_id, action_id, phase, payload)
return if MPGodMode.active? && action_id.to_s == "pvp_skill_hit"
godmode_remote_action(player_id, action_id, phase, payload)
end
alias godmode_stats _live_sync_collect_stats
def _live_sync_collect_stats(actor)
MPGodMode.refill
godmode_stats(actor)
end
end
end
class LonaActorStat
alias godmode_set_stat set_stat
def set_stat(name, value, type = CURRENT_STAT)
if type == CURRENT_STAT && MPGodMode::STATS.include?(name) && MPGodMode.protects?(@actor)
row = get_stat_data(name)
row[CURRENT_STAT] = MPGodMode.maximum(self, name) if row
row[STAT_CHANGED] = true if row
return
end
godmode_set_stat(name, value, type)
end
alias godmode_get_stat get_stat
def get_stat(name, type = CURRENT_STAT)
if type == CURRENT_STAT && MPGodMode::STATS.include?(name) && MPGodMode.protects?(@actor)
value = MPGodMode.maximum(self, name)
return value if value
end
godmode_get_stat(name, type)
end
end
class Game_Actor
alias godmode_take_damage take_damage
def take_damage(*args)
return 0 if MPGodMode.protects?(self)
godmode_take_damage(*args)
end
alias godmode_determine_death determine_death
def determine_death(*args)
return if MPGodMode.protects?(self)
godmode_determine_death(*args)
end
alias godmode_lona_death lonaDeath?
def lonaDeath?
return false if MPGodMode.protects?(self)
godmode_lona_death
end
alias godmode_die die
def die
return if MPGodMode.protects?(self)
godmode_die
end
alias godmode_action_state set_action_state
def set_action_state(state, *args)
return if state == :death && MPGodMode.protects?(self)
godmode_action_state(state, *args)
end
alias godmode_hp_set hp=
def hp=(value)
value = [mhp.to_i, 1].max if MPGodMode.protects?(self)
self.godmode_hp_set(value)
end
end
+294
View File
@@ -0,0 +1,294 @@
# encoding: UTF-8
# BankGuard client 1.0.1. Compatible with BankGuard server 1.0.0.
# New game resets documents/debt normally. Only the existing bank survives.
module MPBankGuard
REFUSAL = "У вы не можете пополнять счёт пока не закроете долг и не будете иметь оригинальные документы Лоны!"
KEYS = {
"principal" => "BackStreetArrearsPrincipal",
"interest" => "BackStreetArrearsInterest",
"workDebt" => "BackStreetArrearsWhorePrincipal",
"loanSeen" => "RecordBackStreetArrears"
}
class << self
def connected?
defined?(WebSocket) && WebSocket.connected?
end
def available?
connected? && WebSocket.bootstrap_sync_unlocked? &&
defined?($game_party) && $game_party && defined?($story_stats) && $story_stats &&
defined?($game_date) && $game_date &&
(!WebSocket.respond_to?(:gameplay_scene_active?) || WebSocket.gameplay_scene_active?)
end
def snapshot
state = {"documents" => $game_party.item_number("ItemPassportLona").to_i > 0}
KEYS.each { |key, story| state[key] = [$story_stats[story].to_i, 0].max }
state["graceDays"] = [$story_stats["BackStreetArrearsPrepayDateAMT"].to_i - $game_date.dateAmt.to_i, 0].max
state
end
def encode(value)
blob = WebSocket._live_sync_blob_from_object(value, nil, "bank_guard")
raise "Cannot encode BankGuard state" if blob.to_s.empty?
blob
end
def decode(value)
raise "Oversized BankGuard state" if value.to_s.size > 16384
result = WebSocket.bootstrap_decode_json_blob(value)
raise "Invalid BankGuard state" unless result.is_a?(Hash)
result
end
def reset_connection
@ready = false
@token = nil
@request = nil
@last_report = nil
@hello_frame = nil
@party_id = nil
end
def before_new_game
report if @ready && connected?
# setup_new_game is also used to construct objects for an ordinary cloud load.
# Only an already running game explicitly starts a new run here.
@force_new = true if @ready || (connected? && WebSocket.bootstrap_sync_unlocked?)
reset_connection
end
def ready?
!!@ready && connected? && @party_id == $game_party.object_id
end
def tick
unless connected?
reset_connection
return
end
return unless available?
if @party_id && @party_id != $game_party.object_id
@force_new = true
reset_connection
end
unless @request
@party_id = $game_party.object_id
@request = "#{Time.now.to_i}_#{rand(1000000000)}"
mode = WebSocket.instance_variable_get(:@bootstrap_mode).to_s
@mode = (@force_new || mode == "new") ? "new" : "resume"
@hello_blob = encode(snapshot)
end
unless @token
frame = Graphics.frame_count
if !@hello_frame || frame - @hello_frame >= 180
@hello_frame = frame
WebSocket.send_line("bankguard_hello:#{@mode}:#{@request}:#{@hello_blob}")
end
return
end
report if ready?
rescue => e
@ready = false
puts "[BankGuard] #{e.class}: #{e.message}"
end
def apply(state)
KEYS.each { |key, story| $story_stats[story] = [state.fetch(key).to_i, 0].max }
days = [state.fetch("graceDays").to_i, 0].max
$story_stats["BackStreetArrearsPrepayDateAMT"] = days > 0 ? $game_date.dateAmt.to_i + days : 0
count = $game_party.item_number("ItemPassportLona").to_i
if state.fetch("documents")
$game_party.gain_item("ItemPassportLona", 1) if count <= 0
elsif count > 0
$game_party.lose_item("ItemPassportLona", count)
end
end
def receive(message)
if message.start_with?("bankguard_state:")
parts = message.split(":", 4)
return true unless parts[1] == @request && @party_id == $game_party.object_id
@token = parts[2]
state = decode(parts[3])
# Server replies with new-run facts for 'new', old-run facts only for 'resume'.
apply(state)
@force_new = false
@last_report = encode(state)
WebSocket.send_line("bankguard_report:#{@token}:#{@last_report}")
return true
elsif message.start_with?("bankguard_ok:")
@ready = true if message.split(":", 2)[1] == @token
return true
elsif message.start_with?("bankguard_denied:")
@denied = true
@ready = false if message.end_with?(":state_error")
return true
elsif message == "bankguard_wait"
@hello_frame = nil
return true
end
false
rescue => e
@ready = false
puts "[BankGuard] invalid response: #{e.message}"
true
end
def report
return unless @token && connected? && @party_id == $game_party.object_id
blob = encode(snapshot)
return if blob == @last_report
WebSocket.send_line("bankguard_report:#{@token}:#{blob}")
@last_report = blob
end
def metadata
return nil unless ready?
snapshot.merge("token" => @token)
end
def may_deposit?
return false unless ready?
!restricted_locally?
end
def restricted_locally?
state = snapshot
!state["documents"] || %w[principal interest workDebt].any? { |key| state[key] > 0 }
end
def close_bank_choices(interpreter)
interpreter.wait_for_message
current_scene = SceneManager.scene
window = current_scene.instance_variable_get(:@message_window) if current_scene
if window
choice = window.instance_variable_get(:@choice_window)
if choice && !choice.disposed?
choice.deactivate
choice.close
choice.openness = 0
end
window.close
# Let the previous message finish its close animation/fiber before adding
# the new reply. Otherwise it can share the old choice page.
Fiber.yield while window.instance_variable_get(:@fiber)
end
if defined?($game_message) && $game_message
$game_message.choices.clear
$game_message.choice_proc = nil
end
end
end
end
module WebSocket
class << self
alias bankguard_parse parse
def parse(message)
return if MPBankGuard.receive(message)
result = bankguard_parse(message)
MPBankGuard.reset_connection if message.start_with?("bootstrap_mode:")
result
end
alias bankguard_update update
def update(*args)
result = bankguard_update(*args)
MPBankGuard.tick
result
end
alias bankguard_send_line send_line
def send_line(line)
packet = line.to_s
# Integrity v2 is a PRE-LOGIN authentication packet, not gameplay state.
# BankGuard becomes ready only after bootstrap, so gating this packet
# causes a circular dependency and a server-side integrity_missing timeout.
if packet.start_with?("sync_state:integrity_attest:v2:")
integrity_debug('bankguard_integrity_allow', 'pre_login_attestation') if respond_to?(:integrity_debug)
elsif packet.start_with?("sync_state:")
return -1 unless MPBankGuard.ready?
MPBankGuard.report
end
bankguard_send_line(line)
end
alias bankguard_collect_stats _live_sync_collect_stats
def _live_sync_collect_stats(actor)
result = bankguard_collect_stats(actor)
meta = MPBankGuard.metadata
result["bank_guard"] = meta if meta
result
end
alias bankguard_build_packet _live_sync_build_packet
def _live_sync_build_packet
result = bankguard_build_packet
return result unless result.is_a?(Array) && result[0].is_a?(String)
parts = result[0].split(":", -1)
# Encode an empty bank explicitly; the base server ignores an empty string.
parts[13] = MPBankGuard.encode(_live_sync_collect_bank_storage)
packet = parts.join(":")
[packet, packet]
end
end
end
module DataManager
class << self
alias bankguard_setup_new_game setup_new_game
def setup_new_game(*args)
MPBankGuard.before_new_game
bankguard_setup_new_game(*args)
end
end
end
module SceneManager
class << self
alias bankguard_goto goto
def goto(scene_class)
warned = false
if scene_class == Scene_BankStorage && MPBankGuard.restricted_locally?
interpreter = $game_map.interpreter if defined?($game_map) && $game_map
# Banker events run in this fiber. Show her reply BEFORE switching scenes,
# while the normal map dialogue window and portrait are still alive.
if interpreter && interpreter.instance_variable_get(:@fiber).equal?(Fiber.current)
MPBankGuard.close_bank_choices(interpreter)
interpreter.call_msg("\\SETpl[MaaniNormal]\\c[4]Банкирша:\\c[0] " + MPBankGuard::REFUSAL)
warned = true
end
end
result = bankguard_goto(scene_class)
scene.instance_variable_set(:@bankguard_warned_on_open, warned) if scene_class == Scene_BankStorage
result
end
end
end
class Scene_BankStorage
alias bankguard_start start
def start(*args)
result = bankguard_start(*args)
if !@mp_bank_storage_blocked && !@bankguard_warned_on_open && MPBankGuard.restricted_locally?
bankguard_show_refusal
end
result
end
alias bankguard_move_item move_item
def move_item(value = nil)
if @bag_window && @bag_window.active && @bag_window.item &&
(!MPBankGuard.may_deposit? || @bag_window.item.item_name == "ItemPassportLona")
SndLib.sys_buzzer
bankguard_show_refusal
return
end
bankguard_move_item(value)
end
def bankguard_show_refusal
return if @bankguard_dialog
@bankguard_dialog = Window_Base.new(8, (Graphics.height - 184) / 2, Graphics.width - 16, 184)
@bankguard_dialog.z = 9999
lines = ["Банкирша:", "У вы не можете пополнять счёт пока не", "закроете долг и не будете иметь", "оригинальные документы Лоны!", "", "Enter / Esc — закрыть"]
lines.each_with_index { |line, i| @bankguard_dialog.draw_text(0, i * 24, Graphics.width - 48, 24, line) }
end
alias bankguard_scene_update update
def update
if @bankguard_dialog
if Input.trigger?(:C) || Input.trigger?(:B)
@bankguard_dialog.dispose
@bankguard_dialog = nil
end
return
end
bankguard_scene_update
end
alias bankguard_terminate terminate
def terminate
@bankguard_dialog.dispose if @bankguard_dialog && !@bankguard_dialog.disposed?
@bankguard_dialog = nil
bankguard_terminate
end
end
+485
View File
@@ -0,0 +1,485 @@
# encoding: UTF-8
return if defined?($mp_disconnect_guard_loaded) && $mp_disconnect_guard_loaded
$mp_disconnect_guard_loaded = true
begin
if defined?(MPStateInfra)
if MPStateInfra.const_defined?(:LOG_ENABLED)
MPStateInfra.send(:remove_const, :LOG_ENABLED)
end
MPStateInfra.const_set(:LOG_ENABLED, false)
end
rescue Exception
end
if defined?(WebSocket)
module WebSocket
class << self
def mp_disconnect_guard_log(tag, message)
# Disconnect-guard tracing is intentionally disabled.
false
end
def disconnecting?
!!@mp_disconnect_guard_active
rescue
false
end
unless method_defined?(:mp_disconnect_guard_disconnect_without_guard)
alias mp_disconnect_guard_disconnect_without_guard disconnect
end
def disconnect(*args, &block)
if @mp_disconnect_guard_active
begin
transport_close if respond_to?(:transport_close)
rescue Exception
ensure
@connected = false
end
return false
end
@mp_disconnect_guard_active = true
begin
mp_disconnect_guard_disconnect_without_guard(*args, &block)
ensure
@mp_disconnect_guard_active = false
end
end
unless method_defined?(:mp_disconnect_guard_send_line_without_trace)
alias mp_disconnect_guard_send_line_without_trace send_line
end
def send_line(s)
begin
line = s.to_s
cmd = line.split(":", 2)[0].to_s
case cmd
when "auth"
parts = line.split(":", 3)
nick = parts[1].to_s
mp_disconnect_guard_log("send", "auth nick=#{nick.inspect} password=<redacted>")
when "version", "bootstrap_loaded", "bank_req"
mp_disconnect_guard_log("send", line[0, 300])
end
rescue Exception
end
mp_disconnect_guard_send_line_without_trace(s)
end
unless method_defined?(:mp_disconnect_guard_parse_without_trace)
alias mp_disconnect_guard_parse_without_trace parse
end
def parse(msg)
begin
line = msg.to_s
cmd = line.split(":", 2)[0].to_s
case cmd
when "version_need", "version_ok", "version_bad", "auth_ok", "auth_error",
"bootstrap_mode", "bootstrap_map", "bootstrap_pos", "bootstrap_state",
"bank_state", "sync_unlocked", "server_kick"
preview = line[0, 500]
preview = "bootstrap_state:<#{line.length} chars>" if cmd == "bootstrap_state"
mp_disconnect_guard_log("recv", preview)
end
rescue Exception
end
mp_disconnect_guard_parse_without_trace(msg)
end
end
end
end
if defined?(MPConnectStatus)
module MPConnectStatus
class << self
unless method_defined?(:mp_disconnect_guard_socket_error_without_guard)
alias mp_disconnect_guard_socket_error_without_guard socket_error!
end
def socket_error!
return if @mp_socket_error_guard_active
if defined?(WebSocket) && WebSocket.respond_to?(:disconnecting?) && WebSocket.disconnecting?
return
end
@mp_socket_error_guard_active = true
begin
mp_disconnect_guard_socket_error_without_guard
ensure
@mp_socket_error_guard_active = false
end
end
end
end
end
module MPStatShapeGuard
MAX_DEPTH = 8 unless const_defined?(:MAX_DEPTH)
STAT_CHANGED_INDEX = 7 unless const_defined?(:STAT_CHANGED_INDEX)
class << self
def log(tag, message)
text = message.to_s
puts "[STATGUARD] #{tag} #{text}" rescue nil
if defined?(MPStateInfra) && MPStateInfra.respond_to?(:log_line)
MPStateInfra.log_line("stat_guard_#{tag}", text)
end
rescue Exception
end
def scalar(value)
depth = 0
while value.is_a?(Array) && depth < MAX_DEPTH
value = value[0]
depth += 1
end
value
rescue Exception
value
end
def number(value, fallback = 0)
value = scalar(value)
return value if value.is_a?(Numeric)
if value.is_a?(String)
text = value.strip
return text.include?(".") ? text.to_f : text.to_i if text =~ /\A-?\d+(?:\.\d+)?\z/
end
fallback
rescue Exception
fallback
end
def current_value(value, fallback = 0)
number(value, fallback)
end
def stat_row?(value)
value.is_a?(Array) && (value.length >= 5 || value[0].is_a?(Array))
rescue Exception
false
end
def clone_stat_row(row, fallback_row = nil)
return nil unless row.is_a?(Array)
base = fallback_row.is_a?(Array) ? fallback_row : []
len = [row.length, base.length, 8].max
out = []
0.upto(len - 1) do |i|
raw = i < row.length ? row[i] : base[i]
if i <= 6
fallback = base[i].is_a?(Numeric) ? base[i] : 0
out[i] = number(raw, fallback)
elsif i == STAT_CHANGED_INDEX
out[i] = raw.nil? ? true : !!raw
else
out[i] = raw.is_a?(Array) ? raw.map { |v| v } : raw
end
end
out[0] = current_value(row[0], base[0].is_a?(Numeric) ? base[0] : 0)
out
rescue Exception
nil
end
def stat_table(actor)
return nil if actor.nil?
act_stat = actor.instance_variable_get(:@actStat) rescue nil
return nil unless act_stat && act_stat.respond_to?(:stat)
act_stat.stat
rescue Exception
nil
end
def repair_table(table, reason = nil)
return 0 unless table.is_a?(Hash)
repaired = 0
table.keys.each do |key|
row = table[key]
next unless row.is_a?(Array)
needs = row[0].is_a?(Array)
unless needs
1.upto([row.length - 1, 6].min) do |i|
if row[i].is_a?(Array)
needs = true
break
end
end
end
next unless needs
fixed = clone_stat_row(row, row)
next unless fixed.is_a?(Array)
table[key] = fixed
repaired += 1
end
log("repair", "#{reason || 'table'} rows=#{repaired}") if repaired > 0
repaired
rescue Exception
0
end
def repair_actor(actor, reason = nil)
table = stat_table(actor)
count = repair_table(table, reason)
if count > 0
act_stat = actor.instance_variable_get(:@actStat) rescue nil
begin
act_stat.check_stat if act_stat && act_stat.respond_to?(:check_stat)
rescue Exception
end
begin
actor.recalculate_stats if actor && actor.respond_to?(:recalculate_stats)
rescue Exception
end
begin
actor.instance_variable_set(:@stat_changed, true) if actor
rescue Exception
end
end
count
rescue Exception
0
end
def current_actor
begin
if defined?(WebSocket) && WebSocket.respond_to?(:_live_sync_actor)
actor = WebSocket._live_sync_actor
return actor if actor
end
rescue Exception
end
begin
return $game_player.actor if defined?($game_player) && $game_player && $game_player.respond_to?(:actor)
rescue Exception
end
nil
end
def repair_current_actor(reason = nil)
repair_actor(current_actor, reason)
rescue Exception
0
end
def sanitize_stats_json(stats_json, actor = nil)
return stats_json unless stats_json.is_a?(Hash)
safe = stats_json.dup
table = stat_table(actor)
full = safe["act_stat_full"]
if full.is_a?(Hash)
new_full = {}
full.each do |raw_key, raw_value|
key = raw_key.to_s
fallback = table.is_a?(Hash) ? table[key] : nil
fixed = raw_value.is_a?(Array) ? clone_stat_row(raw_value, fallback) : nil
new_full[key] = fixed.is_a?(Array) ? fixed : raw_value
end
safe["act_stat_full"] = new_full
end
special = {
"act_stat_full" => true,
"trait_point" => true,
"actor_class_id" => true,
"actor_exp" => true,
"actor_skills" => true
}
fixed_scalars = 0
safe.keys.each do |raw_key|
key = raw_key.to_s
next if special[key]
value = safe[raw_key]
next unless value.is_a?(Array)
next unless (table.is_a?(Hash) && table.has_key?(key)) || (actor && actor.respond_to?(key + "="))
fallback_row = table.is_a?(Hash) ? table[key] : nil
fallback = fallback_row.is_a?(Array) ? current_value(fallback_row[0], 0) : 0
safe[raw_key] = current_value(value, fallback)
fixed_scalars += 1
end
log("sanitize_stats", "scalar_arrays=#{fixed_scalars}") if fixed_scalars > 0
safe
rescue Exception
stats_json
end
def sanitize_body_json(body_json, actor = nil)
return body_json unless body_json.is_a?(Hash)
safe = body_json.dup
stats = safe["body_stats"]
return safe unless stats.is_a?(Hash)
table = stat_table(actor)
new_stats = {}
fixed = 0
stats.each do |raw_key, raw_value|
key = raw_key.to_s
if raw_value.is_a?(Array)
fallback_row = table.is_a?(Hash) ? table[key] : nil
fallback = fallback_row.is_a?(Array) ? current_value(fallback_row[0], 0) : 0
new_stats[raw_key] = current_value(raw_value, fallback)
fixed += 1
else
new_stats[raw_key] = raw_value
end
end
safe["body_stats"] = new_stats
log("sanitize_body", "body_stat_arrays=#{fixed}") if fixed > 0
safe
rescue Exception
body_json
end
end
end
if defined?(ActorStat)
class ActorStat
unless method_defined?(:mp_stat_shape_guard_set_stat_without_guard)
alias mp_stat_shape_guard_set_stat_without_guard set_stat
def set_stat(stat_name, value, type = CURRENT_STAT)
value = MPStatShapeGuard.current_value(value, 0) if defined?(MPStatShapeGuard) && value.is_a?(Array)
mp_stat_shape_guard_set_stat_without_guard(stat_name, value, type)
end
end
if method_defined?(:check_stat) && !method_defined?(:mp_stat_shape_guard_check_stat_without_guard)
alias mp_stat_shape_guard_check_stat_without_guard check_stat
def check_stat(*args, &block)
MPStatShapeGuard.repair_table(@stat, "actor_stat_check") if defined?(MPStatShapeGuard)
mp_stat_shape_guard_check_stat_without_guard(*args, &block)
end
end
if method_defined?(:reset_definition) && !method_defined?(:mp_stat_shape_guard_reset_definition_without_guard)
alias mp_stat_shape_guard_reset_definition_without_guard reset_definition
def reset_definition(*args, &block)
MPStatShapeGuard.repair_table(@stat, "actor_stat_reset") if defined?(MPStatShapeGuard)
mp_stat_shape_guard_reset_definition_without_guard(*args, &block)
end
end
end
end
if defined?(LonaActorStat)
class LonaActorStat
unless method_defined?(:mp_stat_shape_guard_lona_set_stat_without_guard)
alias mp_stat_shape_guard_lona_set_stat_without_guard set_stat
def set_stat(stat_name, value, type = CURRENT_STAT)
value = MPStatShapeGuard.current_value(value, 0) if defined?(MPStatShapeGuard) && value.is_a?(Array)
mp_stat_shape_guard_lona_set_stat_without_guard(stat_name, value, type)
end
end
if method_defined?(:check_single_stat) && !method_defined?(:mp_stat_shape_guard_check_single_stat_without_guard)
alias mp_stat_shape_guard_check_single_stat_without_guard check_single_stat
def check_single_stat(key)
if defined?(MPStatShapeGuard) && @stat.is_a?(Hash)
row = @stat[key]
MPStatShapeGuard.repair_table(@stat, "lona_check_single") if row.is_a?(Array) && row[0].is_a?(Array)
end
mp_stat_shape_guard_check_single_stat_without_guard(key)
end
end
if method_defined?(:reset_definition) && !method_defined?(:mp_stat_shape_guard_lona_reset_definition_without_guard)
alias mp_stat_shape_guard_lona_reset_definition_without_guard reset_definition
def reset_definition(*args, &block)
MPStatShapeGuard.repair_table(@stat, "lona_reset") if defined?(MPStatShapeGuard)
mp_stat_shape_guard_lona_reset_definition_without_guard(*args, &block)
end
end
end
end
if defined?(WebSocket)
module WebSocket
class << self
if method_defined?(:_bootstrap_apply_stats_json) && !method_defined?(:mp_stat_shape_guard_apply_stats_json_without_guard)
alias mp_stat_shape_guard_apply_stats_json_without_guard _bootstrap_apply_stats_json
def _bootstrap_apply_stats_json(actor, stats_json)
safe = defined?(MPStatShapeGuard) ? MPStatShapeGuard.sanitize_stats_json(stats_json, actor) : stats_json
result = mp_stat_shape_guard_apply_stats_json_without_guard(actor, safe)
MPStatShapeGuard.repair_actor(actor, "after_stats_json") if defined?(MPStatShapeGuard)
result
end
end
if method_defined?(:_bootstrap_apply_body_json) && !method_defined?(:mp_stat_shape_guard_apply_body_json_without_guard)
alias mp_stat_shape_guard_apply_body_json_without_guard _bootstrap_apply_body_json
def _bootstrap_apply_body_json(actor, body_json)
safe = defined?(MPStatShapeGuard) ? MPStatShapeGuard.sanitize_body_json(body_json, actor) : body_json
result = mp_stat_shape_guard_apply_body_json_without_guard(actor, safe)
MPStatShapeGuard.repair_actor(actor, "after_body_json") if defined?(MPStatShapeGuard)
result
end
end
if method_defined?(:apply_bootstrap_state) && !method_defined?(:mp_stat_shape_guard_apply_bootstrap_state_without_guard)
alias mp_stat_shape_guard_apply_bootstrap_state_without_guard apply_bootstrap_state
def apply_bootstrap_state(state)
result = mp_stat_shape_guard_apply_bootstrap_state_without_guard(state)
MPStatShapeGuard.repair_current_actor("after_bootstrap") if defined?(MPStatShapeGuard)
result
end
end
if method_defined?(:_live_sync_build_packet) && !method_defined?(:mp_stat_shape_guard_build_packet_without_guard)
alias mp_stat_shape_guard_build_packet_without_guard _live_sync_build_packet
def _live_sync_build_packet
MPStatShapeGuard.repair_current_actor("before_cloud_packet") if defined?(MPStatShapeGuard)
mp_stat_shape_guard_build_packet_without_guard
end
end
end
end
end
if defined?(Scene_Map)
class Scene_Map
unless method_defined?(:mp_stat_shape_guard_start_without_guard)
alias mp_stat_shape_guard_start_without_guard start
def start(*args, &block)
MPStatShapeGuard.repair_current_actor("scene_start") if defined?(MPStatShapeGuard)
mp_stat_shape_guard_start_without_guard(*args, &block)
end
end
if method_defined?(:update) && !method_defined?(:mp_stat_shape_guard_update_without_guard)
alias mp_stat_shape_guard_update_without_guard update
def update(*args, &block)
MPStatShapeGuard.repair_current_actor("scene_update") if defined?(MPStatShapeGuard)
mp_stat_shape_guard_update_without_guard(*args, &block)
end
end
end
end
if defined?(Game_Actor)
class Game_Actor
if method_defined?(:change_equip) && !method_defined?(:mp_stat_shape_guard_change_equip_without_guard)
alias mp_stat_shape_guard_change_equip_without_guard change_equip
def change_equip(*args, &block)
MPStatShapeGuard.repair_actor(self, "before_change_equip") if defined?(MPStatShapeGuard)
result = mp_stat_shape_guard_change_equip_without_guard(*args, &block)
MPStatShapeGuard.repair_actor(self, "after_change_equip") if defined?(MPStatShapeGuard)
result
end
end
if method_defined?(:force_change_equip) && !method_defined?(:mp_stat_shape_guard_force_change_equip_without_guard)
alias mp_stat_shape_guard_force_change_equip_without_guard force_change_equip
def force_change_equip(*args, &block)
MPStatShapeGuard.repair_actor(self, "before_force_change_equip") if defined?(MPStatShapeGuard)
result = mp_stat_shape_guard_force_change_equip_without_guard(*args, &block)
MPStatShapeGuard.repair_actor(self, "after_force_change_equip") if defined?(MPStatShapeGuard)
result
end
end
end
end
puts "[NET] disconnect guard enabled" rescue nil
puts "[STATGUARD] stat shape guard enabled" rescue nil
+146
View File
@@ -0,0 +1,146 @@
# encoding: UTF-8
module MKXPZPerformancePack
HUD_REFRESH_INTERVAL = 2
NICK_LOGIC_INTERVAL = 2
module_function
def apply_graphics_flags
return unless defined?(Graphics)
return unless Graphics.respond_to?(:thread_safe=)
Graphics.thread_safe = false
rescue
end
end
MKXPZPerformancePack.apply_graphics_flags
class Scene_Base
unless method_defined?(:mkxpz_perf_pack_post_start)
alias mkxpz_perf_pack_post_start post_start
end
def post_start(*args, &block)
MKXPZPerformancePack.apply_graphics_flags
mkxpz_perf_pack_post_start(*args, &block)
end
end
class Map_Hud
def mkxpz_perf_refresh
return unless @viewport && @viewport.visible
@mkxpz_perf_refresh_counter ||= 0
@mkxpz_perf_refresh_counter += 1
if @dmg_timer.to_i > 0
refresh_face
update_damage_effect
end
return unless (@mkxpz_perf_refresh_counter % MKXPZPerformancePack::HUD_REFRESH_INTERVAL) == 0
refresh_face if @dmg_timer.to_i <= 0
refresh_mood_meter
refresh_exp_meter
refresh_numbers
refresh_combat_icon
refresh_wound_layout
rescue
end
unless method_defined?(:mkxpz_perf_pack_refresh_overmap_time_number)
alias mkxpz_perf_pack_refresh_overmap_time_number refresh_overmap_time_number
end
def refresh_overmap_time_number
sig = mkxpz_perf_overmap_time_signature
return if !sig.nil? && @mkxpz_perf_overmap_time_signature == sig
@mkxpz_perf_overmap_time_signature = sig
mkxpz_perf_pack_refresh_overmap_time_number
rescue
@mkxpz_perf_overmap_time_signature = nil
mkxpz_perf_pack_refresh_overmap_time_number rescue nil
end
def mkxpz_perf_overmap_time_signature
return nil unless $game_map && $game_map.isOverMap
return :hidden if ($game_map.napping rescue false) || ($game_pause rescue false)
return nil if $story_stats.nil? || $game_date.nil?
steps = ($story_stats["OverMapEvent_DateCount"].to_f % 100.0)
is_day = ($game_date.day? rescue false)
month = ($game_date.month.to_i rescue 1)
month = 1 if month < 1 || month > 12
sun_data = self.class::SUNRISE_SUNSET[month] || self.class::SUNRISE_SUNSET[1]
sunrise_minutes = sun_data[:sunrise]
sunset_minutes = sun_data[:sunset]
day_length_minutes = sunset_minutes - sunrise_minutes
night_length_minutes = 1440 - day_length_minutes
total_minutes =
if is_day
((steps / 100.0) * day_length_minutes).to_i + sunrise_minutes
else
((steps / 100.0) * night_length_minutes).to_i + sunset_minutes
end
[month, is_day ? 1 : 0, total_minutes % 1440]
rescue
nil
end
end
class Scene_Map < Scene_Base
def update_map_hud_input
return if @hud.nil?
if Input.press?(:ALT) || $hudForceHide
@hud.hide
else
@hud.show
end
if @hud.respond_to?(:mkxpz_perf_refresh)
@hud.mkxpz_perf_refresh
else
@hud.refresh
end
end
end
class Sprite_Character < Sprite_Base
if method_defined?(:mp_update_net_nickname) && !method_defined?(:mkxpz_perf_pack_mp_update_net_nickname)
alias mkxpz_perf_pack_mp_update_net_nickname mp_update_net_nickname
end
def mp_update_net_nickname
if !self.visible
begin
@mp_nick_sprite.visible = false if @mp_nick_sprite
rescue
end
return
end
now = (Graphics.frame_count rescue 0)
if @mp_nick_sprite && @mp_nick_text && @mkxpz_perf_next_nick_logic_frame.to_i > now
begin
@mp_nick_sprite.x = self.x
@mp_nick_sprite.y = self.y - height - 1
@mp_nick_sprite.z = self.z + 1
@mp_nick_sprite.visible = self.visible
rescue
end
return
end
@mkxpz_perf_next_nick_logic_frame = now + MKXPZPerformancePack::NICK_LOGIC_INTERVAL
mkxpz_perf_pack_mp_update_net_nickname
rescue
mkxpz_perf_pack_mp_update_net_nickname rescue nil
end
end
+306
View File
@@ -0,0 +1,306 @@
# encoding: UTF-8
return if defined?($mp_online_unique_npc_fixes_loaded) && $mp_online_unique_npc_fixes_loaded
$mp_online_unique_npc_fixes_loaded = true
module MPOnlineUniqueNpcFixes
UNIQUE_STORY_KEYS = {
"UniqueCecily" => "UniqueCharUniqueCecily",
"UniqueGrayRat" => "UniqueCharUniqueGrayRat"
}
UNIQUE_DEATH_EVENTS = [
"EffectUniqueCecilyDed",
"EffectUniqueGrayRatDed"
]
def self.story_key_for_npc(npc_name)
UNIQUE_STORY_KEYS[npc_name.to_s]
end
def self.unique_death_event?(event_name)
UNIQUE_DEATH_EVENTS.include?(event_name.to_s)
end
def self.unique_npc?(npc_name)
UNIQUE_STORY_KEYS.has_key?(npc_name.to_s)
end
def self.unique_dead?(npc_name)
key = story_key_for_npc(npc_name)
return false if key.nil?
begin
return $story_stats[key] == -1
rescue
return false
end
end
def self.mark_unique_dead(npc_name)
key = story_key_for_npc(npc_name)
return if key.nil?
begin
$story_stats[key] = -1 if $story_stats && $story_stats.respond_to?(:[]=)
rescue
end
begin
WebSocket.net_set_story(key, -1, "int") if defined?(WebSocket)
rescue
end
begin
cleanup_current_map_unique(npc_name)
rescue
end
end
def self.cleanup_current_map_unique(npc_name)
return unless $game_map && $game_map.respond_to?(:events)
events = $game_map.events
return unless events && events.respond_to?(:each_value)
events.each_value do |ev|
next if ev.nil?
begin
next if ev.deleted?
rescue
end
event_npc_name = nil
begin
event_npc_name = ev.npc.npc_name if ev.respond_to?(:npc?) && ev.npc?
rescue
event_npc_name = nil
end
begin
event_npc_name = ev.instance_variable_get(:@npc_name) if event_npc_name.nil?
rescue
end
next unless event_npc_name.to_s == npc_name.to_s
begin
ev.delete
rescue
begin
ev.instance_variable_set(:@deleted, true)
rescue
end
end
end
begin
$game_map.need_refresh = true
rescue
end
end
def self.cleanup_all_dead_uniques
UNIQUE_STORY_KEYS.keys.each do |npc_name|
cleanup_current_map_unique(npc_name) if unique_dead?(npc_name)
end
end
def self.safe_delete_broken_unique_death_event(ev)
begin
ev.instance_variable_set(:@deleted, true)
ev.instance_variable_set(:@initialized, true)
rescue
end
nil
end
end
if defined?(Game_NonPlayerCharacter)
class Game_NonPlayerCharacter
unless method_defined?(:mp_unique_fix_summon_death_event__orig)
alias mp_unique_fix_summon_death_event__orig summon_death_event
end
def summon_death_event(*args)
begin
MPOnlineUniqueNpcFixes.mark_unique_dead(npc_name)
rescue
end
mp_unique_fix_summon_death_event__orig(*args)
end
end
end
if defined?(Game_Event)
class Game_Event
def mp_unique_fix_broken_death_event?
event_name = nil
begin
event_name = @event.name
rescue
event_name = nil
end
return false unless MPOnlineUniqueNpcFixes.unique_death_event?(event_name)
data = nil
begin
data = @summon_data
rescue
data = nil
end
return true if data.nil?
return true unless data.respond_to?(:[])
user = nil
begin
user = data[:user]
rescue
user = nil
end
return true if user.nil?
false
end
unless method_defined?(:mp_unique_fix_find_proper_page__orig)
alias mp_unique_fix_find_proper_page__orig find_proper_page
end
def find_proper_page(*args)
if mp_unique_fix_broken_death_event?
begin
prp "skip broken unique death event #{@event.name} x=#{@event.x} y=#{@event.y}", 5
rescue
end
return MPOnlineUniqueNpcFixes.safe_delete_broken_unique_death_event(self)
end
mp_unique_fix_find_proper_page__orig(*args)
rescue RuntimeError, NoMethodError => e
event_name = nil
begin
event_name = @event.name
rescue
event_name = nil
end
if MPOnlineUniqueNpcFixes.unique_death_event?(event_name)
begin
prp "recover broken unique death event #{event_name}: #{e.class}: #{e.message}", 5
rescue
end
return MPOnlineUniqueNpcFixes.safe_delete_broken_unique_death_event(self)
end
raise
end
unless method_defined?(:mp_unique_fix_set_npc__orig)
alias mp_unique_fix_set_npc__orig set_npc
end
def set_npc(npc)
result = mp_unique_fix_set_npc__orig(npc)
begin
if MPOnlineUniqueNpcFixes.unique_dead?(npc)
delete
end
rescue
end
result
end
end
end
if defined?(Sex)
module Sex
def mp_unique_fix_safe_chs_configuration
cfg = nil
begin
cfg = @chs_configuration
rescue
cfg = nil
end
unless cfg.is_a?(Hash)
cfg = {}
begin
@chs_configuration = cfg
rescue
end
end
cfg
end
def set_chs_sex(pose, position)
p "set_chs_sex(#{pose},#{position})"
set_chs_sex_prev_zoomXY
actor.remove_stun_verbs if actor
cfg = mp_unique_fix_safe_chs_configuration
cfg["sex_pos"] = pose
cfg["sex_position"] = position
@sex_state = 1
@tile_id = 0
@chs_need_update = true
end
def unset_chs_sex(release=false)
set_chs_sex_recover_zoomXY
self.animation = nil
cfg = mp_unique_fix_safe_chs_configuration
cfg["sex_pos"] = -1
cfg["sex_position"] = -1
@chs_need_update = true
@story_mode_sex = nil
@eventSexMode = nil
@prev_action_state = nil
if actor
actor.fucker_target.quit_sex_gang(self) if !actor.fucker_target.nil?
actor.fucker_target = nil
actor.set_action_state(:none, true)
end
@sex_state = -1
@grabber = nil
actor.refresh if actor
end
def set_event_chs_sex(pose, position)
set_chs_sex_prev_zoomXY
cfg = mp_unique_fix_safe_chs_configuration
cfg["sex_pos"] = pose
cfg["sex_position"] = position
@chs_need_update = true
end
def unset_event_chs_sex
set_chs_sex_recover_zoomXY
cfg = mp_unique_fix_safe_chs_configuration
cfg["sex_pos"] = -1
cfg["sex_position"] = -1
@chs_need_update = true
@story_mode_sex = nil
end
end
end
if defined?(WebSocket)
module WebSocket
class << self
unless method_defined?(:mp_unique_fix_apply_sync_var__orig)
alias mp_unique_fix_apply_sync_var__orig apply_sync_var
end
def apply_sync_var(name, vtype, val)
mp_unique_fix_apply_sync_var__orig(name, vtype, val)
begin
case name.to_s
when "UniqueCharUniqueCecily"
MPOnlineUniqueNpcFixes.cleanup_current_map_unique("UniqueCecily") if $story_stats && $story_stats[name] == -1
when "UniqueCharUniqueGrayRat"
MPOnlineUniqueNpcFixes.cleanup_current_map_unique("UniqueGrayRat") if $story_stats && $story_stats[name] == -1
end
rescue
end
end
end
end
end
begin
MPOnlineUniqueNpcFixes.cleanup_all_dead_uniques
rescue
end
+432
View File
@@ -0,0 +1,432 @@
# encoding: UTF-8
#==============================================================================
# TypingStatus client patch 1.0.0
#------------------------------------------------------------------------------
# Shows who is actively typing next to the chat input field.
# one player: ✏ cyberya
# several players: ✏ cyberya, WorldBosse...
#
# Client -> server:
# typing:<global|clan>:<1|0>
# Server -> client:
# typing_status:<channel>:<pid>:<1|0>:<percent-escaped UTF-8 nick>
#==============================================================================
module MPTypingStatus
HEARTBEAT_SECONDS = 0.90
LOCAL_IDLE_SECONDS = 1.55
REMOTE_TTL_SECONDS = 5.0
PENCIL = "✍"
PENCIL_VIP_FALLBACK = "📎"
@remote = { "global" => {}, "clan" => {} }
@local_announced = false
@local_channel = nil
@last_local_edit = 0.0
@last_local_send = 0.0
@last_render_signature = nil
def self.now
Process.clock_gettime(Process::CLOCK_MONOTONIC)
rescue
Time.now.to_f
end
def self.normalize_channel(value)
ch = value.to_s.downcase
return "clan" if ch == "clan"
return "global" if ch == "global"
nil
rescue
nil
end
def self.percent_unescape(value)
src = value.to_s
bytes = []
i = 0
while i < src.bytesize
b = src.getbyte(i)
if b == 37 && i + 2 < src.bytesize # %
hex = src.byteslice(i + 1, 2)
if hex && hex =~ /\A[0-9A-Fa-f]{2}\z/
bytes << hex.to_i(16)
i += 3
next
end
end
bytes << b
i += 1
end
out = bytes.pack('C*')
out.force_encoding('UTF-8') if out.respond_to?(:force_encoding)
begin
out = out.encode('UTF-8', 'UTF-8', :invalid => :replace, :undef => :replace, :replace => '')
rescue
end
out.gsub(/[\r\n\t\0]/, ' ').strip
rescue
value.to_s
end
def self.current_channel
return nil unless defined?(MPChat) && MPChat.respond_to?(:current_channel)
normalize_channel(MPChat.current_channel)
rescue
nil
end
def self.local_pid
return 0 unless defined?(WebSocket) && WebSocket.respond_to?(:my_id)
WebSocket.my_id.to_i
rescue
0
end
def self.connected?
defined?(WebSocket) && WebSocket.respond_to?(:connected?) && WebSocket.connected?
rescue
false
end
def self.send_state(active, channel = nil)
return false unless connected?
ch = normalize_channel(channel || @local_channel || current_channel)
return false if ch.nil?
WebSocket.send_line("typing:#{ch}:#{active ? 1 : 0}")
@last_local_send = now if active
true
rescue
false
end
# Called only when text actually changed by keyboard/backspace.
def self.note_local_edit
ch = current_channel
return if ch.nil? # system channel/read-only
t = now
if @local_announced && @local_channel != ch
send_state(false, @local_channel)
@local_announced = false
end
@local_channel = ch
@last_local_edit = t
if !@local_announced
if send_state(true, ch)
@local_announced = true
@last_local_send = t
end
elsif t - @last_local_send >= HEARTBEAT_SECONDS
send_state(true, ch)
@last_local_send = t
end
rescue
end
def self.stop_local
if @local_announced && @local_channel
send_state(false, @local_channel)
end
@local_announced = false
@local_channel = nil
@last_local_edit = 0.0
@last_local_send = 0.0
rescue
@local_announced = false
@local_channel = nil
end
def self.receive(channel, pid, typing, nick)
ch = normalize_channel(channel)
return if ch.nil?
player_id = pid.to_i
return if player_id <= 0 || player_id == local_pid
@remote[ch] ||= {}
if typing
clean = percent_unescape(nick)
if clean.to_s.empty? && defined?(WebSocket) && WebSocket.respond_to?(:nickname_for)
clean = WebSocket.nickname_for(player_id).to_s rescue ""
end
clean = "Player#{player_id}" if clean.to_s.empty?
@remote[ch][player_id] = { :nick => clean.to_s, :at => now }
else
@remote[ch].delete(player_id)
end
refresh_if_changed(true)
rescue
end
def self.prune_remote
t = now
changed = false
@remote.each_value do |bucket|
bucket.keys.each do |pid|
row = bucket[pid]
if row.nil? || t - row[:at].to_f > REMOTE_TTL_SECONDS
bucket.delete(pid)
changed = true
end
end
end
changed
rescue
false
end
def self.names(channel = nil)
ch = normalize_channel(channel || current_channel)
return [] if ch.nil?
prune_remote
bucket = @remote[ch] || {}
bucket.values.sort_by { |row| row[:nick].to_s.downcase }.map { |row| row[:nick].to_s }.reject { |n| n.empty? }
rescue
[]
end
def self.display_text(channel = nil)
list = names(channel)
return "" if list.empty?
return list[0].to_s if list.size == 1
shown = list.first(3)
"#{shown.join(', ')}..."
rescue
""
end
def self.signature
[current_channel, names(current_channel)]
rescue
[nil, []]
end
def self.refresh_input_window
return unless defined?(MPChat)
win = MPChat.instance_variable_get(:@input_window) rescue nil
return if win.nil? || (win.respond_to?(:disposed?) && win.disposed?)
win.refresh if win.respond_to?(:refresh)
rescue
end
def self.refresh_if_changed(force = false)
sig = signature
if force || sig != @last_render_signature
@last_render_signature = sig
refresh_input_window
end
rescue
end
def self.tick
t = now
if @local_announced && (t - @last_local_edit.to_f >= LOCAL_IDLE_SECONDS)
stop_local
end
changed = prune_remote
refresh_if_changed(changed)
rescue
end
def self.clear_remote
@remote = { "global" => {}, "clan" => {} }
@last_render_signature = nil
refresh_input_window
rescue
end
end
#==============================================================================
# Network parser + helper
#==============================================================================
module WebSocket
class << self
unless method_defined?(:mp_typing_status_parse_without_typing)
alias mp_typing_status_parse_without_typing parse
end
end
def self.parse(msg)
if msg.to_s.start_with?("typing_status:")
parts = msg.to_s.split(":", 5)
if parts.size >= 5
MPTypingStatus.receive(parts[1], parts[2].to_i, parts[3].to_s == "1", parts[4])
end
return
end
mp_typing_status_parse_without_typing(msg)
end
class << self
if method_defined?(:disconnect) && !method_defined?(:mp_typing_status_disconnect_without_clear)
alias mp_typing_status_disconnect_without_clear disconnect
def disconnect(*args)
MPTypingStatus.stop_local rescue nil
MPTypingStatus.clear_remote rescue nil
mp_typing_status_disconnect_without_clear(*args)
end
end
end
end
#==============================================================================
# MPChat lifecycle. This file is loaded after chat channels, so these aliases
# wrap the final versions used by the provided client.
#==============================================================================
module MPChat
class << self
unless method_defined?(:mp_typing_status_update_without_tick)
alias mp_typing_status_update_without_tick update
end
unless method_defined?(:mp_typing_status_close_without_stop)
alias mp_typing_status_close_without_stop close
end
if method_defined?(:set_channel) && !method_defined?(:mp_typing_status_set_channel_without_stop)
alias mp_typing_status_set_channel_without_stop set_channel
end
end
def self.update
MPTypingStatus.tick
mp_typing_status_update_without_tick
end
def self.close
MPTypingStatus.stop_local
mp_typing_status_close_without_stop
end
if respond_to?(:mp_typing_status_set_channel_without_stop)
def self.set_channel(channel)
old = current_channel rescue nil
target = (defined?(MPChatChannels) ? MPChatChannels.normalize(channel) : channel.to_s)
MPTypingStatus.stop_local if old.to_s != target.to_s
result = mp_typing_status_set_channel_without_stop(channel)
MPTypingStatus.refresh_if_changed(true)
result
end
end
# Make room for a compact typing line directly above the text entry line,
# inside the same chat input window.
def self.create_windows
dispose_windows
w = Graphics.width
h = Graphics.height
input_h = 68
tabs_h = const_defined?(:TAB_H) ? TAB_H : 30
log_h = h - input_h - tabs_h
log_h = [log_h, 1].max
@tabs_window = Window_MPChatTabs.new(0, 0, w, tabs_h) if defined?(Window_MPChatTabs)
log_y = @tabs_window ? tabs_h : 0
@log_window = Window_MPChatLog.new(0, log_y, w, log_h)
@input_window = Window_MPChatInput.new(0, log_y + log_h, w, input_h)
@tabs_window.z = 9999 if @tabs_window rescue nil
@log_window.z = 9999 rescue nil
@input_window.z = 9999 rescue nil
MPTypingStatus.refresh_if_changed(true)
end
end
#==============================================================================
# Detect real edits and render the indicator beside the input field.
#==============================================================================
class Window_MPChatInput < Window_Base
unless method_defined?(:mp_typing_status_update_without_probe)
alias mp_typing_status_update_without_probe update
end
unless method_defined?(:mp_typing_status_clear_without_stop)
alias mp_typing_status_clear_without_stop clear
end
def update
before = @text.to_s.dup
mp_typing_status_update_without_probe
after = @text.to_s
MPTypingStatus.note_local_edit if after != before
end
def clear
MPTypingStatus.stop_local
mp_typing_status_clear_without_stop
end
def refresh
contents.clear
contents.font.name = MPChat.ui_font_name
contents.font.shadow = false
contents.font.outline = false
# Typing row: muted and compact. It is part of the input panel, not a popup.
typing = MPTypingStatus.display_text(MPChat.current_channel)
unless typing.to_s.empty?
contents.font.size = 16
contents.font.color = Color.new(185, 185, 185)
# Never send the Unicode pencil through draw_text: some game fonts miss
# that glyph and render a broken square. Use the same PNG-backed VIP
# emoji renderer as nickname icons. If the pencil asset is absent, show
# the names without an icon rather than falling back to the broken glyph.
text_x = 4
begin
if defined?(MPNickEmoji) && MPNickEmoji.respond_to?(:draw_icon)
icon_rect = Rect.new(4, 0, 18, 18)
rendered = MPNickEmoji.draw_icon(contents, icon_rect, MPTypingStatus::PENCIL, 16)
unless rendered
# 1F4CE is already part of the VIP icon pack used by this client.
rendered = MPNickEmoji.draw_icon(contents, icon_rect, MPTypingStatus::PENCIL_VIP_FALLBACK, 16)
end
text_x = 25 if rendered
end
rescue
text_x = 4
end
draw_text(text_x, -3, [contents.width - text_x - 4, 1].max, 22, typing.to_s)
end
contents.font.size = 20
default_color = if defined?(MPChatChannels)
MPChatChannels.color(MPChat.current_channel)
else
Color.new(255, 125, 25)
end
contents.font.color = default_color
if defined?(MPChatChannels) && MPChat.current_channel == "system"
prefix = "Системный: "
visible = "только уведомления"
else
prefix = if MPChat.respond_to?(:current_channel_label)
MPChat.current_channel_label + ": "
else
"Чат: "
end
visible = @text.to_s.dup
end
draw_width = [contents.width - 8, 1].max
begin
plain = defined?(MPChatFormat) ? MPChatFormat.strip_color_codes(visible) : visible
while visible.size > 0 && contents.text_size(prefix + plain).width > draw_width
visible = visible[1..-1] || ""
plain = defined?(MPChatFormat) ? MPChatFormat.strip_color_codes(visible) : visible
end
if visible != @text.to_s && (!defined?(MPChatChannels) || MPChat.current_channel != "system")
visible = "..." + visible
end
rescue
end
y = 19
if respond_to?(:draw_colored_input)
draw_colored_input(4, y, draw_width, line_height, prefix, visible, default_color)
else
draw_text(4, y, draw_width, line_height, prefix + visible.to_s)
end
rescue
end
end
+618
View File
@@ -0,0 +1,618 @@
# encoding: UTF-8
module MPOvermapStack
ICON_NAME = "overmap32_obj.png"
ICON_SX = 128
ICON_SY = 160
ICON_SIZE = 32
TEXT_LOCATION = "\u041B\u043E\u043A\u0430\u0446\u0438\u044F"
TEXT_PLAYERS = "\u0418\u0433\u0440\u043E\u043A\u0438"
TEXT_LEAVE = "\u0423\u0439\u0442\u0438"
class << self
def overmap?
return false unless $game_map
return false unless $game_map.respond_to?(:isOverMap)
!!$game_map.isOverMap
rescue
false
end
def remote_players
return {} unless defined?(WebSocket)
players = WebSocket.instance_variable_get(:@players)
players.is_a?(Hash) ? players : {}
rescue
{}
end
def net_player_id(character)
return 0 if character.nil?
return 0 unless character.instance_variable_defined?(:@net_player_id)
character.instance_variable_get(:@net_player_id).to_i
rescue
0
end
def player_sprite?(character)
return false if character.nil?
return true if $game_player && character.equal?($game_player)
net_player_id(character) > 0
rescue
false
end
def apply_remote_through(event)
return if event.nil?
pass = overmap?
event.instance_variable_set(:@manual_through, pass)
event.instance_variable_set(:@through, pass)
event.through = pass if event.respond_to?(:through=)
rescue
end
def refresh_remote_through
remote_players.each_value do |event|
apply_remote_through(event)
end
rescue
end
def occupancy
frame = 0
begin
frame = Graphics.frame_count.to_i
rescue
frame = 0
end
return @occupancy if @occupancy_frame == frame && @occupancy
map = {}
if overmap?
if $game_player
key = [$game_player.x.to_i, $game_player.y.to_i]
map[key] = [$game_player]
end
remote_players.each_value do |event|
next if event.nil?
key = [event.x.to_i, event.y.to_i]
bucket = map[key]
if bucket.nil?
map[key] = [event]
else
bucket << event
end
end
end
@occupancy = map
@occupancy_frame = frame
map
rescue
{}
end
def occupants_at(x, y)
list = occupancy[[x.to_i, y.to_i]]
list.is_a?(Array) ? list : []
rescue
[]
end
def anchor_at(x, y)
list = occupants_at(x, y)
return nil if list.size < 2
list.each do |character|
return character if $game_player && character.equal?($game_player)
end
best = nil
best_id = nil
list.each do |character|
pid = net_player_id(character)
next if pid <= 0
if best.nil? || pid < best_id
best = character
best_id = pid
end
end
best || list[0]
rescue
nil
end
def icon_anchor?(character)
return false unless player_sprite?(character)
anchor = anchor_at(character.x, character.y)
!anchor.nil? && anchor.equal?(character)
rescue
false
end
def hidden_character?(character)
return false unless player_sprite?(character)
list = occupants_at(character.x, character.y)
return false if list.size < 2
anchor = anchor_at(character.x, character.y)
!anchor.nil? && !anchor.equal?(character)
rescue
false
end
def others_here
return [] unless overmap?
return [] unless $game_player
x = $game_player.x.to_i
y = $game_player.y.to_i
ids = []
remote_players.each do |player_id, event|
next if event.nil?
next unless event.x.to_i == x && event.y.to_i == y
pid = player_id.to_i
ids << pid if pid > 0
end
ids.uniq.sort
rescue
[]
end
def player_label(player_id)
nick = nil
begin
if defined?(WebSocket) && WebSocket.respond_to?(:nickname_for)
nick = WebSocket.nickname_for(player_id)
end
rescue
nick = nil
end
text = nick.to_s.strip
return text unless text.empty?
"ID #{player_id.to_i}"
rescue
"ID #{player_id.to_i}"
end
def menu_open?
scene = SceneManager.scene rescue nil
return false unless scene && scene.respond_to?(:mp_overmap_stack_menu_active?)
scene.mp_overmap_stack_menu_active?
rescue
false
end
def should_open_hub?
return false unless overmap?
return false if others_here.empty?
return false if menu_open?
return false if defined?(WebSocket) && WebSocket.respond_to?(:player_menu_open?) && WebSocket.player_menu_open?
return false if $game_map && $game_map.interpreter && $game_map.interpreter.running?
return false if $game_message && ($game_message.busy? || $game_message.visible)
return false if defined?(WebSocket) && WebSocket.respond_to?(:trade_active?) && WebSocket.trade_active?
return false if defined?(MPCompanionSync) && MPCompanionSync.respond_to?(:ui_active?) && MPCompanionSync.ui_active?
true
rescue
false
end
def open_hub
return unless should_open_hub?
scene = SceneManager.scene rescue nil
return unless scene && scene.respond_to?(:mp_overmap_stack_request)
scene.mp_overmap_stack_request(:hub)
begin
SndLib.sys_ok if defined?(SndLib) && SndLib.respond_to?(:sys_ok)
rescue
end
rescue
end
def enter_location
return unless $game_player
# The shared-cell hub replaced the normal action button. Choosing the
# location must run that same path: the cell event (bank and other
# places) first, then the region menu when the cell has no event.
if $game_player.respond_to?(:mp_overmap_stack_check_action_event)
$game_player.mp_overmap_stack_check_action_event(true)
return
end
return unless $game_temp && $game_temp.respond_to?(:reserve_region_event)
$game_temp.reserve_region_event($game_player.region_id)
rescue
end
def sheet_bitmap
bitmap = @sheet_bitmap
if bitmap.nil? || (bitmap.respond_to?(:disposed?) && bitmap.disposed?)
@sheet_bitmap = Cache.character(ICON_NAME)
end
@sheet_bitmap
rescue
nil
end
def icon_bitmap
bitmap = @icon_bitmap
if bitmap.nil? || (bitmap.respond_to?(:disposed?) && bitmap.disposed?)
sheet = sheet_bitmap
return nil if sheet.nil?
cropped = Bitmap.new(ICON_SIZE, ICON_SIZE)
cropped.blt(0, 0, sheet, Rect.new(ICON_SX, ICON_SY, ICON_SIZE, ICON_SIZE))
@icon_bitmap = cropped
end
@icon_bitmap
rescue
nil
end
end
end
if defined?(WebSocket)
module WebSocket
class << self
unless method_defined?(:mp_overmap_stack_create_remote_player)
alias_method :mp_overmap_stack_create_remote_player, :create_remote_player
end
unless method_defined?(:mp_overmap_stack_move_remote_player)
alias_method :mp_overmap_stack_move_remote_player, :move_remote_player
end
unless method_defined?(:mp_overmap_stack_player_menu_open?)
alias_method :mp_overmap_stack_player_menu_open?, :player_menu_open?
end
end
def self.create_remote_player(id)
mp_overmap_stack_create_remote_player(id)
event = nil
begin
event = @players[id] if @players
rescue
event = nil
end
MPOvermapStack.apply_remote_through(event)
end
def self.move_remote_player(*args)
mp_overmap_stack_move_remote_player(*args)
event = nil
begin
event = @players[args[0]] if @players
rescue
event = nil
end
MPOvermapStack.apply_remote_through(event)
end
def self.player_menu_open?
return true if MPOvermapStack.menu_open?
mp_overmap_stack_player_menu_open?
rescue
false
end
end
end
if defined?(Game_Player)
class Game_Player < Game_Character
unless method_defined?(:mp_overmap_stack_check_action_event)
alias mp_overmap_stack_check_action_event check_action_event
end
def check_action_event(*args)
if MPOvermapStack.overmap? && !MPOvermapStack.others_here.empty?
MPOvermapStack.open_hub
return true
end
mp_overmap_stack_check_action_event(*args)
end
end
end
if defined?(Scene_Map)
class Scene_Map < Scene_Base
unless method_defined?(:mp_overmap_stack_scene_update)
alias mp_overmap_stack_scene_update update
end
unless method_defined?(:mp_overmap_stack_scene_start)
alias mp_overmap_stack_scene_start start
end
unless method_defined?(:mp_overmap_stack_scene_terminate)
alias mp_overmap_stack_scene_terminate terminate
end
unless method_defined?(:mp_overmap_stack_call_menu)
alias mp_overmap_stack_call_menu update_call_menu
end
def update(*args, &block)
MPOvermapStack.refresh_remote_through
mp_overmap_stack_scene_update(*args, &block)
mp_overmap_stack_finish_frame
end
def start(*args, &block)
mp_overmap_stack_scene_start(*args, &block)
mp_overmap_stack_dispose
end
def terminate(*args, &block)
mp_overmap_stack_dispose
mp_overmap_stack_scene_terminate(*args, &block)
end
def update_call_menu(*args, &block)
return if mp_overmap_stack_menu_active?
mp_overmap_stack_call_menu(*args, &block)
end
def mp_overmap_stack_menu_active?
window = @mp_overmap_stack_window
return false if window.nil?
return false if window.respond_to?(:disposed?) && window.disposed?
true
rescue
false
end
def mp_overmap_stack_request(kind)
return if mp_overmap_stack_menu_active?
@mp_overmap_stack_pending = kind
end
def mp_overmap_stack_finish_frame
mp_overmap_stack_maintain if @mp_overmap_stack_pending.nil?
mp_overmap_stack_apply_pending
rescue
end
def mp_overmap_stack_maintain
return unless mp_overmap_stack_menu_active?
if !MPOvermapStack.overmap? || MPOvermapStack.others_here.empty?
@mp_overmap_stack_pending = :close
return
end
return unless @mp_overmap_stack_mode == :list
ids = MPOvermapStack.others_here
@mp_overmap_stack_pending = :players if ids != @mp_overmap_stack_ids
rescue
end
def mp_overmap_stack_apply_pending
pending = @mp_overmap_stack_pending
return if pending.nil?
@mp_overmap_stack_pending = nil
if pending == :close
mp_overmap_stack_dispose
elsif pending == :hub
mp_overmap_stack_show_hub
elsif pending == :players
mp_overmap_stack_show_players
elsif pending == :location
mp_overmap_stack_dispose
MPOvermapStack.enter_location
elsif pending.is_a?(Array) && pending[0] == :pick
player_id = pending[1].to_i
mp_overmap_stack_dispose
if player_id > 0 && defined?(WebSocket) && WebSocket.respond_to?(:open_player_menu)
WebSocket.open_player_menu(player_id)
end
end
rescue
mp_overmap_stack_dispose
end
def mp_overmap_stack_show_hub
return unless defined?(Window_MPPlayerMenu)
mp_overmap_stack_dispose
window = Window_MPPlayerMenu.new
window.set_actions([
[MPOvermapStack::TEXT_LOCATION, :location],
[MPOvermapStack::TEXT_PLAYERS, :players],
[MPOvermapStack::TEXT_LEAVE, :leave]
])
window.set_handler(:location, method(:mp_overmap_stack_on_location))
window.set_handler(:players, method(:mp_overmap_stack_on_players))
window.set_handler(:leave, method(:mp_overmap_stack_on_leave))
window.set_handler(:cancel, method(:mp_overmap_stack_on_leave))
window.activate
@mp_overmap_stack_window = window
@mp_overmap_stack_mode = :hub
rescue
mp_overmap_stack_dispose
end
def mp_overmap_stack_show_players
return unless defined?(Window_MPPlayerMenu)
ids = MPOvermapStack.others_here
if ids.empty?
mp_overmap_stack_dispose
return
end
mp_overmap_stack_dispose
actions = []
ids.each do |player_id|
actions << [MPOvermapStack.player_label(player_id), :pick, player_id]
end
window = Window_MPPlayerMenu.new
window.set_actions(actions)
window.set_handler(:pick, method(:mp_overmap_stack_on_pick))
window.set_handler(:cancel, method(:mp_overmap_stack_on_back))
window.activate
@mp_overmap_stack_window = window
@mp_overmap_stack_mode = :list
@mp_overmap_stack_ids = ids
rescue
mp_overmap_stack_dispose
end
def mp_overmap_stack_on_location
@mp_overmap_stack_pending = :location
end
def mp_overmap_stack_on_players
@mp_overmap_stack_pending = :players
end
def mp_overmap_stack_on_leave
@mp_overmap_stack_pending = :close
end
def mp_overmap_stack_on_back
@mp_overmap_stack_pending = :hub
end
def mp_overmap_stack_on_pick
window = @mp_overmap_stack_window
ext = nil
begin
ext = window.current_ext if window && window.respond_to?(:current_ext)
rescue
ext = nil
end
@mp_overmap_stack_pending = [:pick, ext.to_i]
end
def mp_overmap_stack_dispose
window = @mp_overmap_stack_window
@mp_overmap_stack_window = nil
@mp_overmap_stack_mode = nil
@mp_overmap_stack_ids = nil
begin
window.dispose if window && (!window.respond_to?(:disposed?) || !window.disposed?)
rescue
end
end
end
end
if defined?(Sprite_Character)
class Sprite_Character < Sprite_Base
unless method_defined?(:mp_overmap_stack_prev_update)
alias mp_overmap_stack_prev_update update
end
unless method_defined?(:mp_overmap_stack_prev_dispose)
alias mp_overmap_stack_prev_dispose dispose
end
def update(*args, &block)
mp_overmap_stack_prev_update(*args, &block)
mp_overmap_stack_apply_visual
end
def dispose(*args, &block)
mp_overmap_stack_dispose_icon
mp_overmap_stack_prev_dispose(*args, &block)
end
def mp_overmap_stack_apply_visual
return if @character.nil?
return unless MPOvermapStack.player_sprite?(@character)
mp_overmap_stack_restore_poisoned_bitmap
unless MPOvermapStack.overmap?
mp_overmap_stack_hide_icon
return
end
if MPOvermapStack.hidden_character?(@character)
self.visible = false
mp_overmap_stack_hide_overlays
mp_overmap_stack_hide_icon
return
end
if MPOvermapStack.icon_anchor?(@character)
mp_overmap_stack_show_icon
return
end
mp_overmap_stack_hide_icon
rescue
mp_overmap_stack_hide_icon
end
def mp_overmap_stack_restore_poisoned_bitmap
return if @mp_overmap_stack_checked_sheet
@mp_overmap_stack_checked_sheet = true
return unless MPOvermapStack.player_sprite?(@character)
sheet = MPOvermapStack.sheet_bitmap
return if sheet.nil? || self.bitmap.nil?
return unless self.bitmap.equal?(sheet)
@character_name = nil
@tile_id = -1
begin
@character.chs_need_update = true if @character.respond_to?(:chs_need_update=)
rescue
end
update_bitmap if respond_to?(:update_bitmap)
update_src_rect if respond_to?(:update_src_rect)
update_position if respond_to?(:update_position)
update_other if respond_to?(:update_other)
rescue
end
def mp_overmap_stack_show_icon
bitmap = MPOvermapStack.icon_bitmap
if bitmap.nil?
mp_overmap_stack_hide_icon
return
end
sprite = @mp_overmap_stack_icon_sprite
if sprite.nil? || (sprite.respond_to?(:disposed?) && sprite.disposed?)
sprite = Sprite.new(self.viewport)
sprite.bitmap = bitmap
sprite.ox = MPOvermapStack::ICON_SIZE / 2
sprite.oy = MPOvermapStack::ICON_SIZE
@mp_overmap_stack_icon_sprite = sprite
end
sprite.x = self.x
sprite.y = self.y
sprite.z = self.z
begin
sprite.zoom_x = self.zoom_x
sprite.zoom_y = self.zoom_y
rescue
end
sprite.opacity = self.opacity
sprite.visible = !@character.transparent
self.visible = false
mp_overmap_stack_hide_overlays
rescue
mp_overmap_stack_hide_icon
end
def mp_overmap_stack_hide_icon
sprite = @mp_overmap_stack_icon_sprite
return if sprite.nil?
return if sprite.respond_to?(:disposed?) && sprite.disposed?
sprite.visible = false
rescue
end
def mp_overmap_stack_dispose_icon
sprite = @mp_overmap_stack_icon_sprite
@mp_overmap_stack_icon_sprite = nil
return if sprite.nil?
begin
sprite.dispose unless sprite.respond_to?(:disposed?) && sprite.disposed?
rescue
end
end
def mp_overmap_stack_hide_overlays
[
:@mp_nick_sprite,
:@mp_nick_front_emoji_sprite,
:@mp_nick_back_emoji_sprite,
:@nickname_sprite,
:@nickname_front_emoji_sprite,
:@nickname_back_emoji_sprite,
:@mp_group_sprite,
:@mp_presence_status_sprite
].each do |name|
overlay = instance_variable_get(name) rescue nil
next if overlay.nil?
next if overlay.respond_to?(:disposed?) && overlay.disposed?
overlay.visible = false
end
rescue
end
end
end
@@ -0,0 +1,15 @@
module DataManager
self.singleton_class.send(:alias_method, :load_mod_database_ContinuousNap, :load_mod_database)
def self.load_mod_database
load_mod_database_ContinuousNap
# # #If you activate other mods related to load_mod_database, please put the following two lines at the end of that mod, then delete this file
folderOfContinuousNap= "ModScripts/_Mods/ContinuousNap/"
evLibHash = FileGetter.load_mod_EventLib("#{folderOfContinuousNap}Map195.rvdata2")
$data_EventLib = $data_EventLib.merge(evLibHash)
# # #If you know how to do it, you can write more clever code to keep mods compatible
tmpSkill = FileGetter.load_skill_from_json(folderOfContinuousNap)
$data_arpgskills = $data_arpgskills.merge(tmpSkill)
end
end
+30
View File
@@ -0,0 +1,30 @@
{
"item_name": "BasicNap",
"CHS_animation": "animation_mc_pick_up",
"wait_hit_frame": true,
"hold_animation": "animation_stun",
"range": 1,
"back_stab":1,
"stealth": false,
"is_support" : true,
"hit_frame":20,
"summon_hold": "EffectHoldNap",
"summon_hit": null,
"summon_user": null,
"hold_type": "energizing",
"hit_detection":"NoRangeMap",
"projectile_type": 0,
"effect_since" : 80,
"launch_since" : 120,
"launch_max" : 65536,
"ai_value": {
"assulter": 100,
"killer": 100,
"fucker": 100
},
"cost": [],
"effect": [],
"add_state": [],
"hit_chance": []
}
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
417 rebuild for test functions.
only for 0900 or higher.
+13
View File
@@ -0,0 +1,13 @@
class Scene_Base
unless method_defined?(:ws_update_original)
alias ws_update_original update
end
def update
ws_update_original
# Добавляем проверку: если класс WebSocket существует, обновляем его
if defined?(WebSocket) && WebSocket.respond_to?(:connected?)
WebSocket.update if WebSocket.connected?
end
end
end
+385
View File
@@ -0,0 +1,385 @@
#==============================================================================
# ** Map_Hud
#==============================================================================
class Map_Hud
def initialize
@actor = $game_player.actor
@player = $game_player
@viewport = Viewport.new
@viewport.z = System_Settings::MAP_HUD_Z
setting = [
["Layout", 18, 13],
["Small_Number", 37, 40],
["main_bars", 37, 49],
["main_bars", 37, 49],
["main_bars", 37, 49],
["main_bars", 37, 49],
["main_bars", 38, 50],
["Small_Number", 37, 54],
["main_bars", 37, 63],
["main_bars", 37, 63],
["main_bars", 37, 63],
["main_bars", 37, 63],
["main_bars", 38, 64],
["Small_Number", 37, 68],
["main_bars", 37, 77],
["main_bars", 37, 77],
["main_bars", 37, 77],
["main_bars", 37, 77],
["main_bars", 38, 78],
]
@list = [ :layout,
:health_number,
:health_bar_cap,
:health_bar,
:health_bar_background_cap,
:health_bar_background,
:health_bar_transition,
:sta_number,
:sta_bar_cap,
:sta_bar,
:sta_bar_background_cap,
:sta_bar_background,
:sta_bar_transition,
:sat_number,
:sat_bar_cap,
:sat_bar,
:sat_bar_background_cap,
:sat_bar_background,
:sat_bar_transition,
].collect{|i|
instance_variable_set("@#{i}", Sprite.new(@viewport))
}
@list.each_with_index do |sprite, index|
sprite.bitmap = File.exist?("ModScripts/_Mods/NewBars/#{setting[index][0]}.png") ? Bitmap.new("ModScripts/_Mods/NewBars/#{setting[index][0]}") : sprite.bitmap = Bitmap.new("#{System_Settings::MAP_HUD_FOLDER}#{setting[index][0]}")
sprite.x = setting[index][1]
sprite.y = setting[index][2]
end
@ratio = 0.1 #control length
@health_bar_cap.src_rect = Rect.new(0, 0, 1, 4)
@health_bar.src_rect = Rect.new(0,0,(@ratio*@actor.health).ceil+1,4)
@health_bar_transition.src_rect = Rect.new(0, 16, (@ratio*@actor.health).ceil, 2)
@health_bar_background_cap.src_rect = Rect.new(202, 0, 1, 4)
@health_bar_background.src_rect = Rect.new(202, 0, (@ratio*@actor.attr_dimensions["health"][2]).ceil+1, 4)
@health_bar_cap.z+=1
@health_bar.z+=3
@health_bar_transition.z+=2
@health_bar_background_cap.z-=1
@health_bar_background.z-=1
@health_bar_cap.x=37+@health_bar.src_rect.width
@prev_health = @actor.health
@health_bar_background_cap.x=37+@health_bar_background.src_rect.width
@prev_health_max = @actor.attr_dimensions["health"][2]
@sta_bar_cap.src_rect = Rect.new(0, 4, 1, 4)
@sta_bar.src_rect = Rect.new(0,4,[@ratio*@actor.sta,0].max.ceil+1,4)
@sta_bar_transition.src_rect = Rect.new(0, 16, [@ratio*@actor.sta,0].max.ceil, 2)
@sta_bar_background_cap.src_rect = Rect.new(202, 4, 1, 4)
@sta_bar_background.src_rect = Rect.new(202, 4, (@ratio*@actor.attr_dimensions["sta"][2]).ceil+1, 4)
@sta_bar_cap.z+=1
@sta_bar.z+=3
@sta_bar_transition.z+=2
@sta_bar_background_cap.z-=1
@sta_bar_background.z-=1
@sta_bar_cap.x=37+@sta_bar.src_rect.width
@prev_sta = @actor.sta
@sta_bar_background_cap.x=37+@sta_bar_background.src_rect.width
@prev_sta_max = @actor.attr_dimensions["sta"][2]
if @actor.sta<=0
@sta_bar.opacity=0
@sta_bar_cap.opacity=0
else
@sta_bar.opacity=255
@sta_bar_cap.opacity=255
end
@sat_bar_cap.src_rect = Rect.new(0, 8, 1, 4)
@sat_bar.src_rect = Rect.new(0,8,(@ratio*@actor.sat).ceil+1,4)
@sat_bar_transition.src_rect = Rect.new(0, 16, (@ratio*@actor.sat).ceil, 2)
@sat_bar_background_cap.src_rect = Rect.new(202, 8, 1, 4)
@sat_bar_background.src_rect = Rect.new(202, 8, (@ratio*@actor.attr_dimensions["sat"][2]).ceil+1, 4)
@sat_bar_cap.z+=1
@sat_bar.z+=3
@sat_bar_transition.z+=2
@sat_bar_background_cap.z-=1
@sat_bar_background.z-=1
@sat_bar_cap.x=37+@sat_bar.src_rect.width
@prev_sat = @actor.sat
@sat_bar_background_cap.x=37+@sat_bar_background.src_rect.width
@prev_sat_max = @actor.attr_dimensions["sat"][2]
@number_bmp = Bitmap.new("#{System_Settings::MAP_HUD_FOLDER}health_Number")
w = @number_bmp.width/10
@number_rect = {}
(0..9).each {|num|
@number_rect[num] = Rect.new(w * num, 0, w, @number_bmp.height / 2)}
@small_number_bmp = Bitmap.new("ModScripts/_Mods/NewBars/Small_Number")
w = @small_number_bmp.width/12
@small_number_rect = {}
(0..11).each {|num|
@small_number_rect[num] = Rect.new(w * num, 0, w, @small_number_bmp.height / 2)}
draw_number_with_max(@health_number.bitmap, @small_number_bmp, @actor.health,@actor.attr_dimensions["health"][2],@small_number_rect, @actor.health <= 0)
draw_number_with_max(@sta_number.bitmap, @small_number_bmp, @actor.sta,@actor.attr_dimensions["sta"][2],@small_number_rect, @actor.sta <= 0)
draw_number_with_max(@sat_number.bitmap, @small_number_bmp, @actor.sat,@actor.attr_dimensions["sat"][2],@small_number_rect, @actor.attr_dimensions["sat"][2] <= 0.25)
states_fadeout_init
refresh
end
def states_fadeout_init
states_list = []
@state_fadeout_icons = {}
@state_fadeout_bar_list = {}
@state_changed = false
$data_StateName.each{|stName,stData|
next unless stData.remove_by_walking
next unless (stData.icon_index && stData.icon_index != 0 && stData.icon_index != -1) || stData.hud_trace_icon
states_list << [stData.item_name,stData.id,stData.icon_index,stData.steps_to_remove*60,stData.hud_trace_icon]
}
states_list.each_with_index{|(stName, stID, stIconID, stStepFrame), index|
tmpSprite = Sprite.new(@viewport)
tmpSprite.bitmap = Cache.normal_bitmap("ModScripts/_Mods/NewBars/state_bar.png")
@state_fadeout_bar_list[stName] = tmpSprite
}
states_list.each_with_index{|(stName, stID, stIconID, stStepFrame,tmp_hud_trace), index|
tmpSprite = Sprite.new(@viewport)
states_list[index][4] = tmpSprite
if tmp_hud_trace
cachedBitmapICON = Cache.normal_bitmap(tmp_hud_trace)
icon_src_rect = Rect.new(0, 0, 12, 12)
elsif stIconID.is_a?(String)
cachedBitmapICON = Cache.normal_bitmap(stIconID)
icon_src_rect = Rect.new(0, 0, 24, 24)
else
cachedBitmapICON = Cache.system("Iconset")
icon_src_rect = Rect.new(stIconID % 16 * 24, stIconID / 16 * 24, 24, 24)
end
tmpSprite.bitmap = Bitmap.new(24,24)
tmpSprite.bitmap.blt(0 , 0 ,cachedBitmapICON , icon_src_rect)
tmpSprite.zoom_x = 0.5 if !tmp_hud_trace #original icon is 24x24. this ui support 12x12
tmpSprite.zoom_y = 0.5 if !tmp_hud_trace
tmpSprite.opacity = 0
@state_fadeout_icons[stName] = tmpSprite
}
end
def states_fadeout_dispose
@state_fadeout_icons.each{|tmpName,spr|
spr.bitmap.dispose
spr.dispose
}
@state_fadeout_bar_list.each{|tmpName,spr|
spr.bitmap.dispose
spr.dispose
}
@state_fadeout_icons = nil
@state_fadeout_bar_list = nil
end
def refresh
return unless @viewport.visible
refresh_numbers
#refresh_states
#refresh_sight_icon
end
def refresh_numbers
refresh_health
refresh_health_bar
refresh_health_transition
refresh_health_background
refresh_sta
refresh_sta_bar
refresh_sta_transition
refresh_sta_background
refresh_sat
refresh_sat_bar
refresh_sat_transition
refresh_sat_background
@actor.skill_changed=false
#refresh_unread_mail mod
end
def refresh_health
return if @prev_health == @actor.health
draw_number_with_max(@health_number.bitmap, @small_number_bmp, @actor.health,@actor.attr_dimensions["health"][2],@small_number_rect, @actor.health <= 0)
@prev_health = @actor.health
end
def refresh_health_bar
return if @health_bar.src_rect.width==(@ratio*@actor.health).ceil+1
if @health_bar.src_rect.width>(@ratio*@actor.health).ceil+1
@health_bar.src_rect.width=(@ratio*@actor.health).ceil+1
else
@health_bar.src_rect.width+=1
end
@health_bar_cap.x=37+@health_bar.src_rect.width
end
def refresh_health_transition
return if @health_bar.src_rect.width - @health_bar_transition.src_rect.width ==1
if @health_bar.src_rect.width - @health_bar_transition.src_rect.width >1
@health_bar_transition.src_rect.width =-1+@health_bar.src_rect.width
else
@health_bar_transition.src_rect.width-=1 if !$game_map.threat
end
end
def refresh_health_background
return if @prev_health_max == @actor.attr_dimensions["health"][2]
@health_bar_background.src_rect.width=(@ratio*@actor.attr_dimensions["health"][2]).ceil+1
@health_bar_background_cap.x=37+@health_bar_background.src_rect.width
@prev_health_max = @actor.attr_dimensions["health"][2]
end
def refresh_sta
return if @prev_sta == @actor.sta
draw_number_with_max(@sta_number.bitmap, @small_number_bmp, @actor.sta,@actor.attr_dimensions["sta"][2],@small_number_rect, @actor.sta <= 0)
@prev_sta = @actor.sta
if @actor.sta<=0
@sta_bar.opacity=0
@sta_bar_cap.opacity=0
else
@sta_bar.opacity=255
@sta_bar_cap.opacity=255
end
end
def refresh_sta_bar
return if @sta_bar.src_rect.width==[@ratio*@actor.sta,0].max.ceil+1
if @sta_bar.src_rect.width>[@ratio*@actor.sta,0].max.ceil+1
@sta_bar.src_rect.width=[@ratio*@actor.sta,0].max.ceil+1
else
@sta_bar.src_rect.width+=1
end
@sta_bar_cap.x=37+@sta_bar.src_rect.width
end
def refresh_sta_transition
return if @sta_bar.src_rect.width - @sta_bar_transition.src_rect.width ==1
if @sta_bar.src_rect.width - @sta_bar_transition.src_rect.width >1
@sta_bar_transition.src_rect.width =-1+@sta_bar.src_rect.width
else
@sta_bar_transition.src_rect.width-=1 if !$game_map.threat
end
end
def refresh_sta_background
return if @prev_sta_max == @actor.attr_dimensions["sta"][2]
@sta_bar_background.src_rect.width=(@ratio*@actor.attr_dimensions["sta"][2]).ceil+1
@sta_bar_background_cap.x=37+@sta_bar_background.src_rect.width
@prev_sta_max = @actor.attr_dimensions["sta"][2]
end
def refresh_sat_bar
return if @sat_bar.src_rect.width==[@ratio*@actor.sat,0].max.ceil+1
if @sat_bar.src_rect.width>[@ratio*@actor.sat,0].max.ceil+1
@sat_bar.src_rect.width=[@ratio*@actor.sat,0].max.ceil+1
else
@sat_bar.src_rect.width+=1
end
@sat_bar_cap.x=37+@sat_bar.src_rect.width
end
def refresh_sat
return if @prev_sat == @actor.sat
draw_number_with_max(@sat_number.bitmap, @small_number_bmp, @actor.sat,@actor.attr_dimensions["sat"][2],@small_number_rect, @actor.attr_dimensions["sat"][2] <= 0.25)
@prev_sat = @actor.sat
if @actor.sat<=0
@sat_bar.opacity=0
@sat_bar_cap.opacity=0
else
@sat_bar.opacity=255
@sat_bar_cap.opacity=255
end
end
def refresh_sat_transition
return if @sat_bar.src_rect.width - @sat_bar_transition.src_rect.width ==1
if @sat_bar.src_rect.width - @sat_bar_transition.src_rect.width >1
@sat_bar_transition.src_rect.width =-1+@sat_bar.src_rect.width
else
@sat_bar_transition.src_rect.width-=1
end
end
def refresh_sat_background
return if @prev_sat_max == @actor.attr_dimensions["sat"][2]
@sat_bar_background.src_rect.width=@ratio*@actor.attr_dimensions["sat"][2].ceil+1
@sat_bar_background_cap.x=37+@sat_bar_background.src_rect.width
@prev_sat_max = @actor.attr_dimensions["sat"][2]
end
#############################################################################################################################################################
#############################################################################################################################################################
def draw_number(tar_bmp, src_bmp, number, rects, crisis = false)
tar_bmp.clear
w = rects[0].width
number.ceil.split_digits.map.with_index do |char, index|
rect = rects[char].dup
rect.y += rect.height if crisis
tar_bmp.blt(index*w, 0, src_bmp, rect)
end
end
def draw_number_with_max(tar_bmp, src_bmp, number, max, rects, crisis = false)
tar_bmp.clear
w = rects[0].width
if number.ceil == max.ceil
array=max.ceil.split_digits
else
array=number.ceil.split_digits
array << 10
array+=max.ceil.split_digits
end
array.map.with_index do |char, index|
rect = rects[char].dup
crisis=false if char==10
rect.y += rect.height if crisis
tar_bmp.blt(index*w, 0, src_bmp, rect)
end
end
def hide
@viewport.visible = false
#@list.each{|spr|spr.visible=false}
end
def show
return if @viewport.visible
refresh
@viewport.visible = true
end
def hud_opa(tmpOpa=255)
@viewport.opacity = tmpOpa
end
def dispose
@list.each do |spr|
spr.bitmap.dispose
spr.dispose
end
states_fadeout_dispose
@number_bmp.dispose
@small_number_bmp.dispose
@viewport.dispose
end
end
Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

File diff suppressed because it is too large. Load diff
@@ -0,0 +1,999 @@
{
"name": "TrueDeepone",
"condition": "if $game_actors.length>0 then $game_player.actor.stat['RaceRecord'] == 'TrueDeepone' end",
"names": [
"Graphics/Portrait/Lona/pose1_subpose1_body.png",
"Graphics/Portrait/Lona/pose1_Tail.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m.png",
"Graphics/Portrait/Lona/pose1_subpose2_body.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m.png",
"Graphics/Portrait/Lona/pose1_subpose3_body.png",
"Graphics/Portrait/Lona/pose1_head.png",
"Graphics/Portrait/Lona/pose1_head_moot.png",
"Graphics/Portrait/Lona/pose1_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/pose1_head_HairDancer_skin.png",
"Graphics/Portrait/Lona/pose1_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/pose1_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes02_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes03_subeyes03.png",
"Graphics/Portrait/Lona/pose1_head_eyes03_subeyes04.png",
"Graphics/Portrait/Lona/pose1_head_eyes04_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes05_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes06_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes06_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes07_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes08_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes08_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes09_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes09_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes09_subeyes03.png",
"Graphics/Portrait/Lona/pose1_head_eyes10_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes11_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes11_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes11_subeyes03.png",
"Graphics/Portrait/Lona/pose1_head_eyes11_subeyes04.png",
"Graphics/Portrait/Lona/pose1_head_mouth01.png",
"Graphics/Portrait/Lona/pose1_head_mouth02.png",
"Graphics/Portrait/Lona/pose1_head_mouth03.png",
"Graphics/Portrait/Lona/pose1_head_mouth04.png",
"Graphics/Portrait/Lona/pose1_head_mouth05.png",
"Graphics/Portrait/Lona/pose1_head_mouth06.png",
"Graphics/Portrait/Lona/pose1_head_mouth07.png",
"Graphics/Portrait/Lona/pose1_head_mouth08.png",
"Graphics/Portrait/Lona/pose1_head_mouth09.png",
"Graphics/Portrait/Lona/pose1_head_mouth10.png",
"Graphics/Portrait/Lona/pose1_head_mouth11.png",
"Graphics/Portrait/Lona/pose1_head_mouth12.png",
"Graphics/Portrait/Lona/pose1_head_mouth13.png",
"Graphics/Portrait/Lona/pose1_head_mouth14.png",
"Graphics/Portrait/Lona/pose1_head_mouth15.png",
"Graphics/Portrait/Lona/pose1_head_mouth16.png",
"Graphics/Portrait/Lona/pose1_head_mouth17.png",
"Graphics/Portrait/Lona/pose1_head_mouth18.png",
"Graphics/Portrait/Lona/pose1_head_Freckle.png",
"Graphics/Portrait/Lona/pose1_subpose1_equip_HairPony.png",
"Graphics/Portrait/Lona/pose1_subpose1_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/pose1_subpose2_equip_HairPony.png",
"Graphics/Portrait/Lona/pose1_subpose2_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/pose1_subpose3_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/pose1_subpose3_equip_HairMessy.png",
"Graphics/Portrait/Lona/pose1_subpose2_equip_HairMessy.png",
"Graphics/Portrait/Lona/pose1_subpose1_equip_HairMessy.png",
"Graphics/Portrait/Lona/pose1_head_HairBasic.png",
"Graphics/Portrait/Lona/pose1_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/pose1_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/pose1_head_HairMessy.png",
"Graphics/Portrait/Lona/pose1_head_HairDancer.png",
"Graphics/Portrait/Lona/pose1_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/pose1_head_HairDancer_low.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag1_preg4m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag1_preg6m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag1_preg8m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag2_preg4m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag2_preg6m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag2_preg8m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag3_preg4m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag3_preg6m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag3_preg8m.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar1.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar2.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar3.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar1_low.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingVag1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingVag2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingVag3.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingArms2.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingArms3.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingChest1.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingChest2.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingChest3.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingArms2.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingArms3.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingChest1.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingChest2.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingChest3.png",
"Graphics/Portrait/Lona/pose1_subpose1_EffectWet.png",
"Graphics/Portrait/Lona/pose1_subpose2_EffectWet.png",
"Graphics/Portrait/Lona/pose1_subpose3_MelaninSNipple.png",
"Graphics/Portrait/Lona/pose1_subpose3_MelaninMNipple.png",
"Graphics/Portrait/Lona/pose1_subpose2_MelaninSNipple.png",
"Graphics/Portrait/Lona/pose1_subpose1_MelaninVag.png",
"Graphics/Portrait/Lona/pose1_subpose1_MelaninMNipple.png",
"Graphics/Portrait/Lona/pose1_subpose2_MelaninMNipple.png",
"Graphics/Portrait/Lona/pose1_subpose1_MelaninSNipple.png",
"Graphics/Portrait/Lona/pose4_body_low.png",
"Graphics/Portrait/Lona/pose4_Tail.png",
"Graphics/Portrait/Lona/pose4_analopen.png",
"Graphics/Portrait/Lona/pose4_vagopen.png",
"Graphics/Portrait/Lona/pose4_preg4m.png",
"Graphics/Portrait/Lona/pose4_preg6m.png",
"Graphics/Portrait/Lona/pose4_preg8m.png",
"Graphics/Portrait/Lona/pose4_MelaninSNipple.png",
"Graphics/Portrait/Lona/pose4_analopen_MelaninAnal.png",
"Graphics/Portrait/Lona/pose4_MelaninAnal.png",
"Graphics/Portrait/Lona/pose4_vagopen_MelaninVag.png",
"Graphics/Portrait/Lona/pose4_MelaninVag.png",
"Graphics/Portrait/Lona/pose4_PiercingAnal1.png",
"Graphics/Portrait/Lona/pose4_PiercingAnal2.png",
"Graphics/Portrait/Lona/pose4_PiercingAnal3.png",
"Graphics/Portrait/Lona/pose4_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/pose4_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/pose4_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/pose4_PiercingVag1.png",
"Graphics/Portrait/Lona/pose4_PiercingVag2.png",
"Graphics/Portrait/Lona/pose4_PiercingVag3.png",
"Graphics/Portrait/Lona/pose4_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/pose4_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/pose4_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/pose4_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_PiercingChest1.png",
"Graphics/Portrait/Lona/pose4_PiercingChest2.png",
"Graphics/Portrait/Lona/pose4_PiercingChest3.png",
"Graphics/Portrait/Lona/pose4_head.png",
"Graphics/Portrait/Lona/pose4_head_moot.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/pose4_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/pose4_head_mouth01.png",
"Graphics/Portrait/Lona/pose4_head_mouth02.png",
"Graphics/Portrait/Lona/pose4_head_mouth03.png",
"Graphics/Portrait/Lona/pose4_head_mouth04.png",
"Graphics/Portrait/Lona/pose4_head_mouth05.png",
"Graphics/Portrait/Lona/pose4_head_mouth05_EXT.png",
"Graphics/Portrait/Lona/pose4_head_mouth06.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNoseB1.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNoseB2.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNoseB3.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNose.png",
"Graphics/Portrait/Lona/pose4_head_PiercingEar1.png",
"Graphics/Portrait/Lona/pose4_head_PiercingEar2.png",
"Graphics/Portrait/Lona/pose4_head_PiercingEar3.png",
"Graphics/Portrait/Lona/pose4_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/pose4_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/pose4_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/pose4_head_HairBasic.png",
"Graphics/Portrait/Lona/pose4_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/pose4_head_HairMessy.png",
"Graphics/Portrait/Lona/pose4_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/pose4_head_HairDancer.png",
"Graphics/Portrait/Lona/pose4_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/pose4_equip_HairTwinBraid_mid.png",
"Graphics/Portrait/Lona/pose4_equip_HairMessy_mid.png",
"Graphics/Portrait/Lona/pose4_body_high.png",
"Graphics/Portrait/Lona/pose5_subpose1_body.png",
"Graphics/Portrait/Lona/pose5_Tail.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m.png",
"Graphics/Portrait/Lona/pose5_head.png",
"Graphics/Portrait/Lona/pose5_head_moot.png",
"Graphics/Portrait/Lona/pose5_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/pose5_head_Freckle.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/pose5_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/pose5_head_mouth01.png",
"Graphics/Portrait/Lona/pose5_head_mouth02.png",
"Graphics/Portrait/Lona/pose5_head_mouth03.png",
"Graphics/Portrait/Lona/pose5_head_mouth04.png",
"Graphics/Portrait/Lona/pose5_head_mouth05.png",
"Graphics/Portrait/Lona/pose5_head_mouth05_EXT.png",
"Graphics/Portrait/Lona/pose5_head_mouth06.png",
"Graphics/Portrait/Lona/pose5_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/pose5_head_HairBasic.png",
"Graphics/Portrait/Lona/pose5_subpose1_equip_HairPony.png",
"Graphics/Portrait/Lona/pose5_subpose1_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/pose5_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/pose5_head_HairMessy.png",
"Graphics/Portrait/Lona/pose5_subpose1_equip_HairMessy.png",
"Graphics/Portrait/Lona/pose5_head_HairDancer.png",
"Graphics/Portrait/Lona/pose5_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/pose5_head_HairDancer_low.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag1_preg4m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag1_preg6m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag1_preg8m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag2_preg4m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag2_preg6m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag2_preg8m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag3_preg4m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag3_preg6m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag3_preg8m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/pose5_subpose1_ext_PiercingChest1.png",
"Graphics/Portrait/Lona/pose5_subpose1_ext_PiercingChest2.png",
"Graphics/Portrait/Lona/pose5_subpose1_ext_PiercingChest3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingVag1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingVag2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingVag3.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar1.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar2.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar3.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar1_low.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_EffectWet.png",
"Graphics/Portrait/Lona/pose5_subpose1_MelaninSNipple.png",
"Graphics/Portrait/Lona/pose5_subpose1_MelaninVag.png",
"Graphics/Portrait/Lona/pose5_subpose1_MelaninMNipple.png",
"Graphics/Portrait/Lona/chcg1_head.png",
"Graphics/Portrait/Lona/chcg1_head_moot.png",
"Graphics/Portrait/Lona/chcg1_head_Freckle.png",
"Graphics/Portrait/Lona/chcg1_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes04_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes05_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes06_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes07_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes08_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_tear.png",
"Graphics/Portrait/Lona/chcg1_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/chcg1_head_eyes02_tear.png",
"Graphics/Portrait/Lona/chcg1_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/chcg1_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/chcg1_head_eyes03_tear.png",
"Graphics/Portrait/Lona/chcg1_head_mouth01.png",
"Graphics/Portrait/Lona/chcg1_head_mouth02.png",
"Graphics/Portrait/Lona/chcg1_head_mouth02_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_mouth03.png",
"Graphics/Portrait/Lona/chcg1_head_mouth04.png",
"Graphics/Portrait/Lona/chcg1_head_mouth05.png",
"Graphics/Portrait/Lona/chcg1_head_mouth05_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_mouth06.png",
"Graphics/Portrait/Lona/chcg1_head_mouth06_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_mouth07.png",
"Graphics/Portrait/Lona/chcg1_head_mouth08.png",
"Graphics/Portrait/Lona/chcg1_head_mouth09.png",
"Graphics/Portrait/Lona/chcg1_subpose1_body.png",
"Graphics/Portrait/Lona/chcg1_subpose2_body.png",
"Graphics/Portrait/Lona/chcg1_Tail.png",
"Graphics/Portrait/Lona/chcg1_vagopen.png",
"Graphics/Portrait/Lona/chcg1_analopen.png",
"Graphics/Portrait/Lona/chcg1_preg4m.png",
"Graphics/Portrait/Lona/chcg1_preg6m.png",
"Graphics/Portrait/Lona/chcg1_preg8m.png",
"Graphics/Portrait/Lona/chcg1_head_HairBasic.png",
"Graphics/Portrait/Lona/chcg1_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/chcg1_head_equip_HairPony.png",
"Graphics/Portrait/Lona/chcg1_head_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/chcg1_head_equip_HairMessy.png",
"Graphics/Portrait/Lona/chcg1_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg1_head_HairMessy.png",
"Graphics/Portrait/Lona/chcg1_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg1_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/chcg1_head_HairDancer_low.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal1.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal1_analopen.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal2.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal2_analopen.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal3.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal3_analopen.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag1.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag1_vagopen.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag2.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag2_vagopen.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag3.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag3_vagopen.png",
"Graphics/Portrait/Lona/chcg1_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg1_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg1_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg1_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg1_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg1_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg1_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg1_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg1_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg1_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg1_PiercingBack1.png",
"Graphics/Portrait/Lona/chcg1_PiercingBack2.png",
"Graphics/Portrait/Lona/chcg1_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg1_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg1_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg1_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_CumsCreamPie3.png",
"Graphics/Portrait/Lona/chcg1_CumsCreamPie2.png",
"Graphics/Portrait/Lona/chcg1_CumsCreamPie1.png",
"Graphics/Portrait/Lona/chcg1_EffectWet.png",
"Graphics/Portrait/Lona/chcg1_vagopen_analopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg1_vagopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg1_analopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg1_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg1_MelaninVag.png",
"Graphics/Portrait/Lona/chcg1_subpose1_MelaninMNipple.png",
"Graphics/Portrait/Lona/chcg1_vagopen_MelaninVag.png",
"Graphics/Portrait/Lona/chcg1_subpose2_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg1_subpose1_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg1_subpose2_MelaninMNipple.png",
"Graphics/Portrait/Lona/chcg1_analopen_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg1_subpose1_equip_RagTop.png",
"Graphics/Portrait/Lona/chcg1_subpose2_equip_RagTop.png",
"Graphics/Portrait/Lona/chcg2_head.png",
"Graphics/Portrait/Lona/chcg2_head_moot.png",
"Graphics/Portrait/Lona/chcg2_head_Freckle.png",
"Graphics/Portrait/Lona/chcg2_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes04_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes05_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes06_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes07_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes08_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_tear.png",
"Graphics/Portrait/Lona/chcg2_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/chcg2_head_eyes02_subeyes01_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes02_tear.png",
"Graphics/Portrait/Lona/chcg2_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/chcg2_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/chcg2_head_eyes03_tear.png",
"Graphics/Portrait/Lona/chcg2_head_mouth01.png",
"Graphics/Portrait/Lona/chcg2_head_mouth02.png",
"Graphics/Portrait/Lona/chcg2_head_mouth02_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_mouth03.png",
"Graphics/Portrait/Lona/chcg2_head_mouth04.png",
"Graphics/Portrait/Lona/chcg2_head_mouth05.png",
"Graphics/Portrait/Lona/chcg2_head_mouth06.png",
"Graphics/Portrait/Lona/chcg2_head_mouth06_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_mouth07.png",
"Graphics/Portrait/Lona/chcg2_head_mouth08.png",
"Graphics/Portrait/Lona/chcg2_head_mouth09.png",
"Graphics/Portrait/Lona/chcg2_subpose1_body.png",
"Graphics/Portrait/Lona/chcg2_Tail_high.png",
"Graphics/Portrait/Lona/chcg2_Tail_low.png",
"Graphics/Portrait/Lona/chcg2_vagopen.png",
"Graphics/Portrait/Lona/chcg2_analopen.png",
"Graphics/Portrait/Lona/chcg2_preg4m.png",
"Graphics/Portrait/Lona/chcg2_preg6m.png",
"Graphics/Portrait/Lona/chcg2_vagopen_preg6m.png",
"Graphics/Portrait/Lona/chcg2_preg8m.png",
"Graphics/Portrait/Lona/chcg2_vagopen_preg8m.png",
"Graphics/Portrait/Lona/chcg2_head_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/chcg2_head_equip_HairPony.png",
"Graphics/Portrait/Lona/chcg2_head_equip_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg2_head_equip_HairMessy.png",
"Graphics/Portrait/Lona/chcg2_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg2_head_HairMessy.png",
"Graphics/Portrait/Lona/chcg2_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg2_head_HairDancer_low.png",
"Graphics/Portrait/Lona/chcg2_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/chcg2_head_HairBasic.png",
"Graphics/Portrait/Lona/chcg2_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal1.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal1_analopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal2.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal2_analopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal3.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal3_analopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag1.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag1_preg8m.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag1_vagopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag1_vagopen_preg8m.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag2.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag2_preg8m.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag2_vagopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag2_vagopen_preg8m.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag3.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag3_preg8m.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag3_vagopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag3_vagopen_preg8m.png",
"Graphics/Portrait/Lona/chcg2_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg2_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg2_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg2_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg2_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg2_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg2_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg2_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg2_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg2_PiercingBack1.png",
"Graphics/Portrait/Lona/chcg2_PiercingBack2.png",
"Graphics/Portrait/Lona/chcg2_PiercingBack3.png",
"Graphics/Portrait/Lona/chcg2_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg2_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg2_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg2_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg2_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg2_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg2_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg2_CumsMoonPie1.png",
"Graphics/Portrait/Lona/chcg2_CumsMoonPie2.png",
"Graphics/Portrait/Lona/chcg2_CumsMoonPie3.png",
"Graphics/Portrait/Lona/chcg2_preg8m_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_preg6m_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_vagopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_preg8m_vagopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_preg6m_vagopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_preg8m_MelaninVag.png",
"Graphics/Portrait/Lona/chcg2_vagopen_preg8m_MelaninVag.png",
"Graphics/Portrait/Lona/chcg2_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg2_vagopen_MelaninVag.png",
"Graphics/Portrait/Lona/chcg2_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg2_MelaninVag.png",
"Graphics/Portrait/Lona/chcg2_analopen_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg3_head.png",
"Graphics/Portrait/Lona/chcg3_head_moot.png",
"Graphics/Portrait/Lona/chcg3_head_Freckle.png",
"Graphics/Portrait/Lona/chcg3_head_HeadGround.png",
"Graphics/Portrait/Lona/chcg3_head_HeadGround_moot.png",
"Graphics/Portrait/Lona/chcg3_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg3_subpose1_body.png",
"Graphics/Portrait/Lona/chcg3_Tail.png",
"Graphics/Portrait/Lona/chcg3_analopen.png",
"Graphics/Portrait/Lona/chcg3_preg4m.png",
"Graphics/Portrait/Lona/chcg3_preg6m.png",
"Graphics/Portrait/Lona/chcg3_preg8m.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes01_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes02_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes03_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes04_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes05_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes06_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes07_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes08_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_tear.png",
"Graphics/Portrait/Lona/chcg3_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/chcg3_head_eyes02_tear.png",
"Graphics/Portrait/Lona/chcg3_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/chcg3_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/chcg3_head_mouth01.png",
"Graphics/Portrait/Lona/chcg3_head_mouth02.png",
"Graphics/Portrait/Lona/chcg3_head_mouth02_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_mouth03.png",
"Graphics/Portrait/Lona/chcg3_head_mouth04.png",
"Graphics/Portrait/Lona/chcg3_head_mouth05.png",
"Graphics/Portrait/Lona/chcg3_head_mouth05_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_mouth06.png",
"Graphics/Portrait/Lona/chcg3_head_mouth06_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_mouth07.png",
"Graphics/Portrait/Lona/chcg3_head_mouth08.png",
"Graphics/Portrait/Lona/chcg3_head_mouth09.png",
"Graphics/Portrait/Lona/chcg3_head_equip_low_HairPony.png",
"Graphics/Portrait/Lona/chcg3_head_equip_HairPony.png",
"Graphics/Portrait/Lona/chcg3_head_equip_HairPony_HeadGround.png",
"Graphics/Portrait/Lona/chcg3_head_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/chcg3_head_equip_HairMessy_HeadGround.png",
"Graphics/Portrait/Lona/chcg3_head_equip_HairMessy.png",
"Graphics/Portrait/Lona/chcg3_head_HairMessy.png",
"Graphics/Portrait/Lona/chcg3_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg3_head_HairBasic.png",
"Graphics/Portrait/Lona/chcg3_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/chcg3_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg3_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/chcg3_PubicHairAnal1.png",
"Graphics/Portrait/Lona/chcg3_PubicHairAnal2.png",
"Graphics/Portrait/Lona/chcg3_PubicHairAnal3.png",
"Graphics/Portrait/Lona/chcg3_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg3_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg3_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg3_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg3_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg3_PiercingBack1.png",
"Graphics/Portrait/Lona/chcg3_PiercingBack2.png",
"Graphics/Portrait/Lona/chcg3_PiercingBack3.png",
"Graphics/Portrait/Lona/chcg3_preg8m_EffectWet.png",
"Graphics/Portrait/Lona/chcg3_EffectWet.png",
"Graphics/Portrait/Lona/chcg3_preg6m_EffectWet.png",
"Graphics/Portrait/Lona/chcg3_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg3_analopen_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg4_head.png",
"Graphics/Portrait/Lona/chcg4_head_moot.png",
"Graphics/Portrait/Lona/chcg4_head_Freckle.png",
"Graphics/Portrait/Lona/chcg4_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg4_head_HairDancer_skin.png",
"Graphics/Portrait/Lona/chcg4_head_HairDancer_skin.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes04_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes05_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes06_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes07_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes08_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/chcg4_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/chcg4_head_eyes03_subeyes01_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/chcg4_head_eyes03_subeyes02_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_mouth01.png",
"Graphics/Portrait/Lona/chcg4_head_mouth02.png",
"Graphics/Portrait/Lona/chcg4_head_mouth02_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_mouth03.png",
"Graphics/Portrait/Lona/chcg4_head_mouth04.png",
"Graphics/Portrait/Lona/chcg4_head_mouth05.png",
"Graphics/Portrait/Lona/chcg4_head_mouth05_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_mouth06.png",
"Graphics/Portrait/Lona/chcg4_head_mouth07.png",
"Graphics/Portrait/Lona/chcg4_head_mouth08.png",
"Graphics/Portrait/Lona/chcg4_head_mouth09.png",
"Graphics/Portrait/Lona/chcg4_subpose1_body.png",
"Graphics/Portrait/Lona/chcg4_subpose2_body.png",
"Graphics/Portrait/Lona/chcg4_Tail.png",
"Graphics/Portrait/Lona/chcg4_subpose1_preg4m.png",
"Graphics/Portrait/Lona/chcg4_subpose1_preg6m.png",
"Graphics/Portrait/Lona/chcg4_subpose1_preg8m.png",
"Graphics/Portrait/Lona/chcg4_subpose2_preg4m.png",
"Graphics/Portrait/Lona/chcg4_subpose2_preg6m.png",
"Graphics/Portrait/Lona/chcg4_subpose2_preg8m.png",
"Graphics/Portrait/Lona/chcg4_vagopen.png",
"Graphics/Portrait/Lona/chcg4_analopen.png",
"Graphics/Portrait/Lona/chcg4_vagruined.png",
"Graphics/Portrait/Lona/chcg4_head_HairBasic.png",
"Graphics/Portrait/Lona/chcg4_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/chcg4_head_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/chcg4_head_equip_HairPony.png",
"Graphics/Portrait/Lona/chcg4_head_equip_HairMessy_high.png",
"Graphics/Portrait/Lona/chcg4_head_equip_HairMessy_low.png",
"Graphics/Portrait/Lona/chcg4_head_HairMessy.png",
"Graphics/Portrait/Lona/chcg4_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg4_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg4_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/chcg4_head_HairDancer_low.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal1.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal1_analopen.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal2.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal2_analopen.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal3.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal3_analopen.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag1.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag1_vagopen.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag2.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag2_vagopen.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag3.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag3_vagopen.png",
"Graphics/Portrait/Lona/chcg4_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg4_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg4_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg4_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg4_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg4_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg4_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg4_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg4_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg4_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg4_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg4_subpose2_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg4_subpose2_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg4_subpose2_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg4_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg4_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg4_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg4_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg4_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg4_CumsCreamPie3.png",
"Graphics/Portrait/Lona/chcg4_CumsCreamPie1.png",
"Graphics/Portrait/Lona/chcg4_CumsCreamPie2.png",
"Graphics/Portrait/Lona/chcg4_vagopen_analopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_vagruined_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_vagruined_analopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_vagopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_analopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_MelaninVag.png",
"Graphics/Portrait/Lona/chcg4_vagopen_MelaninVag.png",
"Graphics/Portrait/Lona/chcg4_MelaninMNipple.png",
"Graphics/Portrait/Lona/chcg4_subpose1_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg4_analopen_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg4_subpose2_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg4_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg5_head.png",
"Graphics/Portrait/Lona/chcg5_head_moot.png",
"Graphics/Portrait/Lona/chcg5_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg5_head_Freckle.png",
"Graphics/Portrait/Lona/chcg5_subpose1_body.png",
"Graphics/Portrait/Lona/chcg5_preg4m.png",
"Graphics/Portrait/Lona/chcg5_preg6m.png",
"Graphics/Portrait/Lona/chcg5_preg8m.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes01_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes02_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes03_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes04_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes05_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes06_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes07_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes08_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/chcg5_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/chcg5_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/chcg5_head_eyes03_subeyes02_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_mouth01.png",
"Graphics/Portrait/Lona/chcg5_head_mouth02.png",
"Graphics/Portrait/Lona/chcg5_head_mouth02_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_mouth03.png",
"Graphics/Portrait/Lona/chcg5_head_mouth04.png",
"Graphics/Portrait/Lona/chcg5_head_mouth05.png",
"Graphics/Portrait/Lona/chcg5_head_mouth06.png",
"Graphics/Portrait/Lona/chcg5_head_mouth07.png",
"Graphics/Portrait/Lona/chcg5_head_mouth08.png",
"Graphics/Portrait/Lona/chcg5_head_mouth09.png",
"Graphics/Portrait/Lona/chcg5_head_HairBasic.png",
"Graphics/Portrait/Lona/chcg5_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/chcg5_head_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/chcg5_head_equip_HairPony.png",
"Graphics/Portrait/Lona/chcg5_head_equip_HairMessy.png",
"Graphics/Portrait/Lona/chcg5_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg5_head_HairMessy.png",
"Graphics/Portrait/Lona/chcg5_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg5_head_HairDancer_low.png",
"Graphics/Portrait/Lona/chcg5_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg5_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg5_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg5_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg5_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg5_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg5_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg5_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg5_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg5_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg5_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg5_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg5_MelaninMNipple.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_moot.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_body_preg6m.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_body_preg8m.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_body.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_body_SH.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_body_MH.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_mouth01.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_mouth02.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_eyes01.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_eyes02.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_body.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_Tail.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_BasicHair.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_HairPony.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_HairTwinBraid.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_HairMessy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_HairShortMessy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_HairDancer.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_HairDancer.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_bad.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_BadLewd.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_Good.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_GoodLewd.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_Happy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_bad.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_BadLewd.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_Good.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_GoodLewd.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_Happy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_Pain.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_Supprise.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_Pain.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_Supprise.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_Freckle.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_BasicHair.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_HairPony.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_HairTwinBraid.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_HairMessy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_HairShortMessy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_preg6m.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_preg8m.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_body.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_Tail.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_BasicHair.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_HairPony.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_HairTwinBraid.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_HairMessy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_HairShortMessy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_HairDancer.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_moot_equip_HairDancer.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_bad.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_BadLewd.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_Happy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_moot_bad.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_moot_BadLewd.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_moot_Happy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_moot_Pain.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_moot_Supprise.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_Pain.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_Supprise.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_Freckle.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_moot_equip_BasicHair.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_moot_equip_HairTwinBraid.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_moot_equip_HairMessy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_moot_equip_HairShortMessy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_preg6m.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_preg8m.png",
"Graphics/CharacterCharsets/MhugeC/MhugeC_mid_MeatArmorLona.png",
"Graphics/Characters/!_Z_AbomLonaRapeLoop.png",
"Graphics/Characters/overmap32_obj@128,192,32,32",
"Graphics/Characters/LonaEXT/LonaCoconaBed.png",
"Graphics/Characters/LonaEXT/LonaMootCoconaBed.png",
"Graphics/Characters/LonaEXT/WoodenBondage.png",
"Graphics/Characters/LonaEXT/WoodenBondageMoot.png",
"Graphics/Characters/LonaEXT/LonaBondageOnBed_sm.png",
"Graphics/Characters/LonaEXT/LonaMootBondageOnBed_sm.png"
],
"palette_old": ["source_mc/eyes.act",
"source_mc/eyes_h.act",
"source_mc/sclera.act",
"source_mc/hair.act",
"source_mc/tongue.act",
"source_mc/teeth.act",
"source_mc/skin.act",
"source_mc/skin_h.act"],
"palette_new": ["race/Deepone/eyes_DP_True.act",
"race/Deepone/eyes_h_DP_True.act",
"race/Deepone/sclera_DP_True.act",
"race/Deepone/hair_DP_True.act",
"race/Deepone/tongue_DP_True.act",
"race/Deepone/teeth_DP_True.act",
"race/Deepone/skin_DP_True.act",
"race/Deepone/skin_h_DP_True.act"]
}
@@ -0,0 +1,282 @@
{
"names": [
"Graphics/Portrait/Lona/pose1_subpose1_equip_HairPony.png",
"Graphics/Portrait/Lona/pose1_subpose1_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/pose1_subpose2_equip_HairPony.png",
"Graphics/Portrait/Lona/pose1_subpose2_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/pose1_subpose3_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/pose1_subpose3_equip_HairMessy.png",
"Graphics/Portrait/Lona/pose1_subpose2_equip_HairMessy.png",
"Graphics/Portrait/Lona/pose1_subpose1_equip_HairMessy.png",
"Graphics/Portrait/Lona/pose1_head_HairBasic.png",
"Graphics/Portrait/Lona/pose1_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/pose1_head_HairBasic.png",
"Graphics/Portrait/Lona/pose1_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/pose1_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/pose1_head_HairMessy.png",
"Graphics/Portrait/Lona/pose1_head_HairDancer.png",
"Graphics/Portrait/Lona/pose1_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/pose1_head_HairDancer_low.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag1_preg4m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag1_preg6m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag1_preg8m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag2_preg4m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag2_preg6m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag2_preg8m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag3_preg4m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag3_preg6m.png",
"Graphics/Portrait/Lona/pose1_subpose1_PubicHairVag3_preg8m.png",
"Graphics/Portrait/Lona/pose4_head_HairBasic.png",
"Graphics/Portrait/Lona/pose4_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/pose4_head_HairMessy.png",
"Graphics/Portrait/Lona/pose4_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/pose4_head_HairDancer.png",
"Graphics/Portrait/Lona/pose4_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/pose4_equip_HairTwinBraid_mid.png",
"Graphics/Portrait/Lona/pose4_equip_HairMessy_mid.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg4m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg6m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg8m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg4m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg6m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg8m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg4m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg6m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg8m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg4m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg6m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg8m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg4m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg6m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg8m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg4m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg6m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg8m_vagopen.png",
"Graphics/Portrait/Lona/pose5_subpose1_equip_HairPony.png",
"Graphics/Portrait/Lona/pose5_subpose1_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/pose5_head_HairBasic.png",
"Graphics/Portrait/Lona/pose5_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/pose5_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/pose5_head_HairMessy.png",
"Graphics/Portrait/Lona/pose5_subpose1_equip_HairMessy.png",
"Graphics/Portrait/Lona/pose5_head_HairDancer.png",
"Graphics/Portrait/Lona/pose5_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/pose5_head_HairDancer_low.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag1_preg4m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag1_preg6m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag1_preg8m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag2_preg4m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag2_preg6m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag2_preg8m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag3_preg4m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag3_preg6m.png",
"Graphics/Portrait/Lona/pose5_subpose1_PubicHairVag3_preg8m.png",
"Graphics/Portrait/Lona/chcg1_head_HairBasic.png",
"Graphics/Portrait/Lona/chcg1_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/chcg1_head_equip_HairPony.png",
"Graphics/Portrait/Lona/chcg1_head_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/chcg1_head_equip_HairMessy.png",
"Graphics/Portrait/Lona/chcg1_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg1_head_HairMessy.png",
"Graphics/Portrait/Lona/chcg1_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg1_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/chcg1_head_HairDancer_low.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal1.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal1_analopen.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal2.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal2_analopen.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal3.png",
"Graphics/Portrait/Lona/chcg1_PubicHairAnal3_analopen.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag1.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag1_vagopen.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag2.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag2_vagopen.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag3.png",
"Graphics/Portrait/Lona/chcg1_PubicHairVag3_vagopen.png",
"Graphics/Portrait/Lona/chcg2_head_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/chcg2_head_equip_HairPony.png",
"Graphics/Portrait/Lona/chcg2_head_equip_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg2_head_equip_HairMessy.png",
"Graphics/Portrait/Lona/chcg2_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg2_head_HairMessy.png",
"Graphics/Portrait/Lona/chcg2_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg2_head_HairDancer_low.png",
"Graphics/Portrait/Lona/chcg2_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/chcg2_head_HairBasic.png",
"Graphics/Portrait/Lona/chcg2_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal1.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal1_analopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal2.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal2_analopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal3.png",
"Graphics/Portrait/Lona/chcg2_PubicHairAnal3_analopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag1.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag1_preg8m.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag1_vagopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag1_vagopen_preg8m.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag2.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag2_preg8m.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag2_vagopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag2_vagopen_preg8m.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag3.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag3_preg8m.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag3_vagopen.png",
"Graphics/Portrait/Lona/chcg2_PubicHairVag3_vagopen_preg8m.png",
"Graphics/Portrait/Lona/chcg3_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg3_head_equip_low_HairPony.png",
"Graphics/Portrait/Lona/chcg3_head_equip_HairPony.png",
"Graphics/Portrait/Lona/chcg3_head_equip_HairPony_HeadGround.png",
"Graphics/Portrait/Lona/chcg3_head_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/chcg3_head_equip_HairMessy_HeadGround.png",
"Graphics/Portrait/Lona/chcg3_head_equip_HairMessy.png",
"Graphics/Portrait/Lona/chcg3_head_HairMessy.png",
"Graphics/Portrait/Lona/chcg3_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg3_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg3_head_HairBasic.png",
"Graphics/Portrait/Lona/chcg3_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/chcg3_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg3_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/chcg3_PubicHairAnal1.png",
"Graphics/Portrait/Lona/chcg3_PubicHairAnal2.png",
"Graphics/Portrait/Lona/chcg3_PubicHairAnal3.png",
"Graphics/Portrait/Lona/chcg4_head_HairBasic.png",
"Graphics/Portrait/Lona/chcg4_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/chcg4_head_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/chcg4_head_equip_HairPony.png",
"Graphics/Portrait/Lona/chcg4_head_equip_HairMessy_high.png",
"Graphics/Portrait/Lona/chcg4_head_equip_HairMessy_low.png",
"Graphics/Portrait/Lona/chcg4_head_HairMessy.png",
"Graphics/Portrait/Lona/chcg4_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg4_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg4_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/chcg4_head_HairDancer_low.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal1.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal1_analopen.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal2.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal2_analopen.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal3.png",
"Graphics/Portrait/Lona/chcg4_PubicHairAnal3_analopen.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag1.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag1_vagopen.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag2.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag2_vagopen.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag3.png",
"Graphics/Portrait/Lona/chcg4_PubicHairVag3_vagopen.png",
"Graphics/Portrait/Lona/chcg5_head_HairBasic.png",
"Graphics/Portrait/Lona/chcg5_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/chcg5_head_equip_HairTwinBraid.png",
"Graphics/Portrait/Lona/chcg5_head_equip_HairPony.png",
"Graphics/Portrait/Lona/chcg5_head_equip_HairMessy.png",
"Graphics/Portrait/Lona/chcg5_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/chcg5_head_HairMessy.png",
"Graphics/Portrait/Lona/chcg5_head_HairDancer.png",
"Graphics/Portrait/Lona/chcg5_head_HairDancer_low.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_moot.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_BasicHair.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_HairPony.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_HairTwinBraid.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_HairMessy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_HairShortMessy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_equip_HairDancer.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_HairDancer.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_BasicHair.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_HairPony.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_HairTwinBraid.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_HairMessy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_moot_equip_HairShortMessy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_BasicHair.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_HairPony.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_HairTwinBraid.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_HairMessy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_HairShortMessy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_equip_HairDancer.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_moot_equip_HairDancer.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_moot_equip_BasicHair.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_moot_equip_HairTwinBraid.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_moot_equip_HairMessy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_moot_equip_HairShortMessy.png",
"Graphics/CharacterCharsets/MhugeC/MhugeC_mid_MeatArmorLona.png",
"Graphics/Characters/!_Z_AbomLonaRapeLoop.png",
"Graphics/Characters/overmap32_obj@128,192,32,32",
"Graphics/Characters/LonaEXT/LonaCoconaBed.png",
"Graphics/Characters/LonaEXT/LonaMootCoconaBed.png",
"Graphics/Characters/LonaEXT/LonaBondageOnBed.png",
"Graphics/Characters/LonaEXT/LonaMootBondageOnBed.png",
"Graphics/Characters/LonaEXT/WoodenBondage.png",
"Graphics/Characters/LonaEXT/WoodenBondageMoot.png",
"Graphics/Characters/LonaEXT/LonaBondageOnBed_sm.png",
"Graphics/Characters/LonaEXT/LonaMootBondageOnBed_sm.png"
],
"palettes":[
{
"name": "HairBlack",
"condition": "if $game_actors.length>0 then $game_player.actor.record_HairColor == 1 end",
"palette_old": ["source_mc/hair.act"],
"palette_new": ["cyans_pals/hair_black.act"]
},
{
"name": "HairWhite",
"condition": "if $game_actors.length>0 then $game_player.actor.record_HairColor == 2 end",
"palette_old": ["source_mc/hair.act"],
"palette_new": ["cyans_pals/hair_Gyaru.act"]
},
{
"name": "LightLavender",
"condition": "if $game_actors.length>0 then $game_player.actor.record_HairColor == 3 end",
"palette_old": ["source_mc/hair.act"],
"palette_new": ["cyans_pals/hair_light_lavender.act"]
},
{
"name": "HairRed",
"condition": "if $game_actors.length>0 then $game_player.actor.record_HairColor == 4 end",
"palette_old": ["source_mc/hair.act"],
"palette_new": ["cyans_pals/hair_Red.act"]
},
{
"name": "HairYellow",
"condition": "if $game_actors.length>0 then $game_player.actor.record_HairColor == 5 end",
"palette_old": ["source_mc/hair.act"],
"palette_new": ["cyans_pals/hair_Yellow.act"]
}
]
}
@@ -0,0 +1,502 @@
[
{
"name": "Piercing_Gold_NOSE",
"condition": "if $game_actors.length>0 then $game_player.actor.state_stack(62) > 0 end",
"names": [
"Graphics/Portrait/Lona/chcg1_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingNose.png",
"Graphics/Portrait/Lona/pose1_head_PiercingNose.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNose.png",
"Graphics/Portrait/Lona/pose5_head_PiercingNose.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_PiercingNose.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_PiercingNose.png"
],
"palette_old": ["source_mc/piercing_basic.act"],
"palette_new": ["cyans_pals/piercing_basic_gold.act"]
},
{
"name": "Piercing_Gold_NOSE_B",
"condition": "if $game_actors.length>0 then $game_player.actor.state_stack(71) > 0 end",
"names": [
"Graphics/Portrait/Lona/pose1_head_PiercingNoseB1.png",
"Graphics/Portrait/Lona/pose1_head_PiercingNoseB2.png",
"Graphics/Portrait/Lona/pose1_head_PiercingNoseB3.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNoseB1.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNoseB2.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNoseB3.png",
"Graphics/Portrait/Lona/pose5_head_PiercingNoseB1.png",
"Graphics/Portrait/Lona/pose5_head_PiercingNoseB2.png",
"Graphics/Portrait/Lona/pose5_head_PiercingNoseB3.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingNoseB1.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingNoseB2.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingNoseB3.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingNoseB1.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingNoseB2.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingNoseB3.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingNoseB1.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingNoseB2.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingNoseB3.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingNoseB1.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingNoseB2.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingNoseB3.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingNoseB1.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingNoseB2.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingNoseB3.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_PiercingNoseB1.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_PiercingNoseB2.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_PiercingNoseB3.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_PiercingNoseB1.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_PiercingNoseB2.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_PiercingNoseB3.png"
],
"palette_old": ["source_mc/piercing_basic.act"],
"palette_new": ["cyans_pals/piercing_basic_gold.act"]
},
{
"name": "Piercing_Gold_Head",
"condition": "if $game_actors.length>0 then $game_player.actor.state_stack(63) > 0 end",
"names": [
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg4_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg4_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg4_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg5_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg5_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg5_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingEar3.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar1.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar2.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar3.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar1_low.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/pose4_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/pose4_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/pose4_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/pose4_head_PiercingEar1.png",
"Graphics/Portrait/Lona/pose4_head_PiercingEar2.png",
"Graphics/Portrait/Lona/pose4_head_PiercingEar3.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar1_low.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar1.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar2.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar3.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_PiercingEar1.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_PiercingEar2.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_PiercingEar3.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_PiercingEar1.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_PiercingEar2.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_PiercingEar3.png"
],
"palette_old": ["source_mc/piercing_basic.act"],
"palette_new": ["cyans_pals/piercing_basic_gold.act"]
},
{
"name": "Piercing_Gold_Chest",
"condition": "if $game_actors.length>0 then $game_player.actor.state_stack(64) > 0 end",
"names": [
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg2_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg2_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg4_subpose2_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg4_subpose2_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg4_subpose2_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg5_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg5_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg5_PiercingChest3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingChest1.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingChest2.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingChest3.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingChest1.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingChest2.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingChest3.png",
"Graphics/Portrait/Lona/pose4_PiercingChest1.png",
"Graphics/Portrait/Lona/pose4_PiercingChest2.png",
"Graphics/Portrait/Lona/pose4_PiercingChest3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/pose5_subpose1_ext_PiercingChest1.png",
"Graphics/Portrait/Lona/pose5_subpose1_ext_PiercingChest2.png",
"Graphics/Portrait/Lona/pose5_subpose1_ext_PiercingChest3.png"
],
"palette_old": ["source_mc/piercing_basic.act"],
"palette_new": ["cyans_pals/piercing_basic_gold.act"]
},
{
"name": "Piercing_Gold_Belly",
"condition": "if $game_actors.length>0 then $game_player.actor.state_stack(65) > 0 end",
"names": [
"Graphics/Portrait/Lona/chcg1_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg2_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg5_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg5_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m_PiercingBelly3.png"
],
"palette_old": ["source_mc/piercing_basic.act"],
"palette_new": ["cyans_pals/piercing_basic_gold.act"]
},
{
"name": "Piercing_Gold_Arms",
"condition": "if $game_actors.length>0 then $game_player.actor.state_stack(66) > 0 end",
"names": [
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg2_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg2_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg2_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg3_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg3_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg3_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg4_subpose2_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg5_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg5_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg5_PiercingArms3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingArms1.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingArms2.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingArms3.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingArms1.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingArms2.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingArms3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingArms3.png"
],
"palette_old": ["source_mc/piercing_basic.act"],
"palette_new": ["cyans_pals/piercing_basic_gold.act"]
},
{
"name": "Piercing_Gold_BOT",
"condition": "if $game_actors.length>0 then $game_player.actor.state_stack(67) > 0 end",
"names": [
"Graphics/Portrait/Lona/pose4_PiercingAnal1.png",
"Graphics/Portrait/Lona/pose4_PiercingAnal2.png",
"Graphics/Portrait/Lona/pose4_PiercingAnal3.png",
"Graphics/Portrait/Lona/pose4_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/pose4_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/pose4_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg1_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg1_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg1_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg1_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg1_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg1_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg2_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg2_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg2_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg2_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg2_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg2_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg3_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg3_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg3_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg3_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg4_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg4_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg4_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg4_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg4_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg4_analopen_PiercingAnal3.png"
],
"palette_old": ["source_mc/piercing_basic.act"],
"palette_new": ["cyans_pals/piercing_basic_gold.act"]
},
{
"name": "Piercing_Gold_Vag",
"condition": "if $game_actors.length>0 then $game_player.actor.state_stack(68) > 0 end",
"names": [
"Graphics/Portrait/Lona/chcg1_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg1_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg1_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg1_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg1_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg1_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg2_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg2_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg2_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg2_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg2_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg2_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg4_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg4_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg4_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg4_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg4_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg4_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingVag1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingVag2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingVag3.png",
"Graphics/Portrait/Lona/pose4_PiercingVag1.png",
"Graphics/Portrait/Lona/pose4_PiercingVag2.png",
"Graphics/Portrait/Lona/pose4_PiercingVag3.png",
"Graphics/Portrait/Lona/pose4_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/pose4_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/pose4_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingVag1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingVag2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingVag3.png"
],
"palette_old": ["source_mc/piercing_basic.act"],
"palette_new": ["cyans_pals/piercing_basic_gold.act"]
},
{
"name": "Piercing_Gold_Back",
"condition": "if $game_actors.length>0 then $game_player.actor.state_stack(69) > 0 end",
"names": [
"Graphics/Portrait/Lona/chcg1_PiercingBack1.png",
"Graphics/Portrait/Lona/chcg1_PiercingBack2.png",
"Graphics/Portrait/Lona/chcg1_PiercingBack3.png",
"Graphics/Portrait/Lona/chcg2_PiercingBack1.png",
"Graphics/Portrait/Lona/chcg2_PiercingBack2.png",
"Graphics/Portrait/Lona/chcg2_PiercingBack3.png",
"Graphics/Portrait/Lona/chcg3_PiercingBack1.png",
"Graphics/Portrait/Lona/chcg3_PiercingBack2.png",
"Graphics/Portrait/Lona/chcg3_PiercingBack3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBack2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBack3.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingBack2.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingBack3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBack2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBack3.png"
],
"palette_old": ["source_mc/piercing_basic.act"],
"palette_new": ["cyans_pals/piercing_basic_gold.act"]
}
]
@@ -0,0 +1,886 @@
{
"names": [
"Graphics/Portrait/Lona/pose1_subpose1_body.png",
"Graphics/Portrait/Lona/pose1_Tail.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m.png",
"Graphics/Portrait/Lona/pose1_subpose2_body.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m.png",
"Graphics/Portrait/Lona/pose1_subpose3_body.png",
"Graphics/Portrait/Lona/pose1_head.png",
"Graphics/Portrait/Lona/pose1_head_moot.png",
"Graphics/Portrait/Lona/pose1_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/pose1_head_HairDancer_skin.png",
"Graphics/Portrait/Lona/pose1_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/pose1_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes02_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes03_subeyes03.png",
"Graphics/Portrait/Lona/pose1_head_eyes03_subeyes04.png",
"Graphics/Portrait/Lona/pose1_head_eyes04_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes05_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes06_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes06_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes07_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes08_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes08_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes09_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes09_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes09_subeyes03.png",
"Graphics/Portrait/Lona/pose1_head_eyes10_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes11_subeyes01.png",
"Graphics/Portrait/Lona/pose1_head_eyes11_subeyes02.png",
"Graphics/Portrait/Lona/pose1_head_eyes11_subeyes03.png",
"Graphics/Portrait/Lona/pose1_head_eyes11_subeyes04.png",
"Graphics/Portrait/Lona/pose1_head_mouth01.png",
"Graphics/Portrait/Lona/pose1_head_mouth02.png",
"Graphics/Portrait/Lona/pose1_head_mouth03.png",
"Graphics/Portrait/Lona/pose1_head_mouth04.png",
"Graphics/Portrait/Lona/pose1_head_mouth05.png",
"Graphics/Portrait/Lona/pose1_head_mouth06.png",
"Graphics/Portrait/Lona/pose1_head_mouth07.png",
"Graphics/Portrait/Lona/pose1_head_mouth08.png",
"Graphics/Portrait/Lona/pose1_head_mouth09.png",
"Graphics/Portrait/Lona/pose1_head_mouth10.png",
"Graphics/Portrait/Lona/pose1_head_mouth11.png",
"Graphics/Portrait/Lona/pose1_head_mouth12.png",
"Graphics/Portrait/Lona/pose1_head_mouth13.png",
"Graphics/Portrait/Lona/pose1_head_mouth14.png",
"Graphics/Portrait/Lona/pose1_head_mouth15.png",
"Graphics/Portrait/Lona/pose1_head_mouth16.png",
"Graphics/Portrait/Lona/pose1_head_mouth17.png",
"Graphics/Portrait/Lona/pose1_head_mouth18.png",
"Graphics/Portrait/Lona/pose1_head_Freckle.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingVag1.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingVag2.png",
"Graphics/Portrait/Lona/pose1_subpose1_PiercingVag3.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose1_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingArms2.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingArms3.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingChest1.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingChest2.png",
"Graphics/Portrait/Lona/pose1_subpose2_PiercingChest3.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose1_subpose2_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingArms2.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingArms3.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingChest1.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingChest2.png",
"Graphics/Portrait/Lona/pose1_subpose3_PiercingChest3.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/pose1_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar1.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar2.png",
"Graphics/Portrait/Lona/pose1_head_PiercingEar3.png",
"Graphics/Portrait/Lona/pose1_subpose1_EffectWet.png",
"Graphics/Portrait/Lona/pose1_subpose2_EffectWet.png",
"Graphics/Portrait/Lona/pose1_subpose3_MelaninSNipple.png",
"Graphics/Portrait/Lona/pose1_subpose3_MelaninMNipple.png",
"Graphics/Portrait/Lona/pose1_subpose2_MelaninSNipple.png",
"Graphics/Portrait/Lona/pose1_subpose1_MelaninVag.png",
"Graphics/Portrait/Lona/pose1_subpose1_MelaninMNipple.png",
"Graphics/Portrait/Lona/pose1_subpose2_MelaninMNipple.png",
"Graphics/Portrait/Lona/pose1_subpose1_MelaninSNipple.png",
"Graphics/Portrait/Lona/pose4_body_low.png",
"Graphics/Portrait/Lona/pose4_Tail.png",
"Graphics/Portrait/Lona/pose4_analopen.png",
"Graphics/Portrait/Lona/pose4_vagopen.png",
"Graphics/Portrait/Lona/pose4_preg4m.png",
"Graphics/Portrait/Lona/pose4_preg6m.png",
"Graphics/Portrait/Lona/pose4_preg8m.png",
"Graphics/Portrait/Lona/pose4_MelaninSNipple.png",
"Graphics/Portrait/Lona/pose4_analopen_MelaninAnal.png",
"Graphics/Portrait/Lona/pose4_MelaninAnal.png",
"Graphics/Portrait/Lona/pose4_vagopen_MelaninVag.png",
"Graphics/Portrait/Lona/pose4_MelaninVag.png",
"Graphics/Portrait/Lona/pose4_PiercingAnal1.png",
"Graphics/Portrait/Lona/pose4_PiercingAnal2.png",
"Graphics/Portrait/Lona/pose4_PiercingAnal3.png",
"Graphics/Portrait/Lona/pose4_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/pose4_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/pose4_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/pose4_PiercingVag1.png",
"Graphics/Portrait/Lona/pose4_PiercingVag2.png",
"Graphics/Portrait/Lona/pose4_PiercingVag3.png",
"Graphics/Portrait/Lona/pose4_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/pose4_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/pose4_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/pose4_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose4_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose4_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose4_PiercingChest1.png",
"Graphics/Portrait/Lona/pose4_PiercingChest2.png",
"Graphics/Portrait/Lona/pose4_PiercingChest3.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg4m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg6m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg8m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg4m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg6m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag1_preg8m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg4m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg6m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg8m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg4m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg6m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag2_preg8m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg4m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg6m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg8m.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg4m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg6m_vagopen.png",
"Graphics/Portrait/Lona/pose4_PubicHairVag3_preg8m_vagopen.png",
"Graphics/Portrait/Lona/pose4_head.png",
"Graphics/Portrait/Lona/pose4_head_moot.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/pose4_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/pose4_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/pose4_head_mouth01.png",
"Graphics/Portrait/Lona/pose4_head_mouth02.png",
"Graphics/Portrait/Lona/pose4_head_mouth03.png",
"Graphics/Portrait/Lona/pose4_head_mouth04.png",
"Graphics/Portrait/Lona/pose4_head_mouth05.png",
"Graphics/Portrait/Lona/pose4_head_mouth05_EXT.png",
"Graphics/Portrait/Lona/pose4_head_mouth06.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNoseB1.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNoseB2.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNoseB3.png",
"Graphics/Portrait/Lona/pose4_head_PiercingNose.png",
"Graphics/Portrait/Lona/pose4_head_PiercingEar1.png",
"Graphics/Portrait/Lona/pose4_head_PiercingEar2.png",
"Graphics/Portrait/Lona/pose4_head_PiercingEar3.png",
"Graphics/Portrait/Lona/pose4_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/pose4_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/pose4_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/pose4_head_HairBasic.png",
"Graphics/Portrait/Lona/pose4_head_moot_HairBasic.png",
"Graphics/Portrait/Lona/pose4_head_HairMessy.png",
"Graphics/Portrait/Lona/pose4_head_moot_HairMessy.png",
"Graphics/Portrait/Lona/pose4_head_HairDancer.png",
"Graphics/Portrait/Lona/pose4_head_moot_HairDancer.png",
"Graphics/Portrait/Lona/pose4_equip_HairTwinBraid_mid.png",
"Graphics/Portrait/Lona/pose4_equip_HairMessy_mid.png",
"Graphics/Portrait/Lona/pose4_body_high.png",
"Graphics/Portrait/Lona/pose5_subpose1_body.png",
"Graphics/Portrait/Lona/pose5_Tail.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m.png",
"Graphics/Portrait/Lona/pose5_head.png",
"Graphics/Portrait/Lona/pose5_head_moot.png",
"Graphics/Portrait/Lona/pose5_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/pose5_head_Freckle.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/pose5_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/pose5_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/pose5_head_mouth01.png",
"Graphics/Portrait/Lona/pose5_head_mouth02.png",
"Graphics/Portrait/Lona/pose5_head_mouth03.png",
"Graphics/Portrait/Lona/pose5_head_mouth04.png",
"Graphics/Portrait/Lona/pose5_head_mouth05.png",
"Graphics/Portrait/Lona/pose5_head_mouth05_EXT.png",
"Graphics/Portrait/Lona/pose5_head_mouth06.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/pose5_subpose1_ext_PiercingChest1.png",
"Graphics/Portrait/Lona/pose5_subpose1_ext_PiercingChest2.png",
"Graphics/Portrait/Lona/pose5_subpose1_ext_PiercingChest3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingVag1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingVag2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingVag3.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/pose5_subpose1_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar1.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar2.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar3.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar1_low.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/pose5_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/pose5_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/pose5_subpose1_PiercingBelly1.png",
"Graphics/Portrait/Lona/pose5_subpose1_EffectWet.png",
"Graphics/Portrait/Lona/pose5_subpose1_MelaninSNipple.png",
"Graphics/Portrait/Lona/pose5_subpose1_MelaninVag.png",
"Graphics/Portrait/Lona/pose5_subpose1_MelaninMNipple.png",
"Graphics/Portrait/Lona/chcg1_head.png",
"Graphics/Portrait/Lona/chcg1_head_moot.png",
"Graphics/Portrait/Lona/chcg1_head_Freckle.png",
"Graphics/Portrait/Lona/chcg1_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes04_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes05_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes06_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes07_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_subeyes08_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_eyes01_tear.png",
"Graphics/Portrait/Lona/chcg1_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/chcg1_head_eyes02_tear.png",
"Graphics/Portrait/Lona/chcg1_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/chcg1_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/chcg1_head_eyes03_tear.png",
"Graphics/Portrait/Lona/chcg1_head_mouth01.png",
"Graphics/Portrait/Lona/chcg1_head_mouth02.png",
"Graphics/Portrait/Lona/chcg1_head_mouth02_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_mouth03.png",
"Graphics/Portrait/Lona/chcg1_head_mouth04.png",
"Graphics/Portrait/Lona/chcg1_head_mouth05.png",
"Graphics/Portrait/Lona/chcg1_head_mouth05_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_mouth06.png",
"Graphics/Portrait/Lona/chcg1_head_mouth06_EXT.png",
"Graphics/Portrait/Lona/chcg1_head_mouth07.png",
"Graphics/Portrait/Lona/chcg1_head_mouth08.png",
"Graphics/Portrait/Lona/chcg1_head_mouth09.png",
"Graphics/Portrait/Lona/chcg1_subpose1_body.png",
"Graphics/Portrait/Lona/chcg1_subpose2_body.png",
"Graphics/Portrait/Lona/chcg1_Tail.png",
"Graphics/Portrait/Lona/chcg1_vagopen.png",
"Graphics/Portrait/Lona/chcg1_analopen.png",
"Graphics/Portrait/Lona/chcg1_preg4m.png",
"Graphics/Portrait/Lona/chcg1_preg6m.png",
"Graphics/Portrait/Lona/chcg1_preg8m.png",
"Graphics/Portrait/Lona/chcg1_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg1_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg1_subpose2_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg1_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg1_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg1_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg1_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg1_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg1_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg1_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg1_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg1_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg1_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg1_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg1_PiercingBack1.png",
"Graphics/Portrait/Lona/chcg1_PiercingBack2.png",
"Graphics/Portrait/Lona/chcg1_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg1_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg1_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg1_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg1_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg1_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg1_CumsCreamPie3.png",
"Graphics/Portrait/Lona/chcg1_CumsCreamPie2.png",
"Graphics/Portrait/Lona/chcg1_CumsCreamPie1.png",
"Graphics/Portrait/Lona/chcg1_EffectWet.png",
"Graphics/Portrait/Lona/chcg1_vagopen_analopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg1_vagopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg1_analopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg1_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg1_MelaninVag.png",
"Graphics/Portrait/Lona/chcg1_subpose1_MelaninMNipple.png",
"Graphics/Portrait/Lona/chcg1_vagopen_MelaninVag.png",
"Graphics/Portrait/Lona/chcg1_subpose2_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg1_subpose1_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg1_subpose2_MelaninMNipple.png",
"Graphics/Portrait/Lona/chcg1_analopen_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg1_subpose1_equip_RagTop.png",
"Graphics/Portrait/Lona/chcg1_subpose2_equip_RagTop.png",
"Graphics/Portrait/Lona/chcg2_head.png",
"Graphics/Portrait/Lona/chcg2_head_moot.png",
"Graphics/Portrait/Lona/chcg2_head_Freckle.png",
"Graphics/Portrait/Lona/chcg2_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes04_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes05_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes06_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes07_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_subeyes08_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes01_tear.png",
"Graphics/Portrait/Lona/chcg2_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/chcg2_head_eyes02_subeyes01_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_eyes02_tear.png",
"Graphics/Portrait/Lona/chcg2_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/chcg2_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/chcg2_head_eyes03_tear.png",
"Graphics/Portrait/Lona/chcg2_head_mouth01.png",
"Graphics/Portrait/Lona/chcg2_head_mouth02.png",
"Graphics/Portrait/Lona/chcg2_head_mouth02_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_mouth03.png",
"Graphics/Portrait/Lona/chcg2_head_mouth04.png",
"Graphics/Portrait/Lona/chcg2_head_mouth05.png",
"Graphics/Portrait/Lona/chcg2_head_mouth06.png",
"Graphics/Portrait/Lona/chcg2_head_mouth06_EXT.png",
"Graphics/Portrait/Lona/chcg2_head_mouth07.png",
"Graphics/Portrait/Lona/chcg2_head_mouth08.png",
"Graphics/Portrait/Lona/chcg2_head_mouth09.png",
"Graphics/Portrait/Lona/chcg2_subpose1_body.png",
"Graphics/Portrait/Lona/chcg2_Tail_high.png",
"Graphics/Portrait/Lona/chcg2_Tail_low.png",
"Graphics/Portrait/Lona/chcg2_vagopen.png",
"Graphics/Portrait/Lona/chcg2_analopen.png",
"Graphics/Portrait/Lona/chcg2_preg4m.png",
"Graphics/Portrait/Lona/chcg2_preg6m.png",
"Graphics/Portrait/Lona/chcg2_vagopen_preg6m.png",
"Graphics/Portrait/Lona/chcg2_preg8m.png",
"Graphics/Portrait/Lona/chcg2_vagopen_preg8m.png",
"Graphics/Portrait/Lona/chcg2_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg2_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg2_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar1_low.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar2_low.png",
"Graphics/Portrait/Lona/chcg2_head_moot_PiercingEar3_low.png",
"Graphics/Portrait/Lona/chcg2_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg2_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg2_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg2_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg2_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg2_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg2_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg2_PiercingBack1.png",
"Graphics/Portrait/Lona/chcg2_PiercingBack2.png",
"Graphics/Portrait/Lona/chcg2_PiercingBack3.png",
"Graphics/Portrait/Lona/chcg2_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg2_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg2_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg2_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg2_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg2_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg2_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg2_CumsMoonPie1.png",
"Graphics/Portrait/Lona/chcg2_CumsMoonPie2.png",
"Graphics/Portrait/Lona/chcg2_CumsMoonPie3.png",
"Graphics/Portrait/Lona/chcg2_preg8m_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_preg6m_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_vagopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_preg8m_vagopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_preg6m_vagopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg2_preg8m_MelaninVag.png",
"Graphics/Portrait/Lona/chcg2_vagopen_preg8m_MelaninVag.png",
"Graphics/Portrait/Lona/chcg2_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg2_vagopen_MelaninVag.png",
"Graphics/Portrait/Lona/chcg2_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg2_MelaninVag.png",
"Graphics/Portrait/Lona/chcg2_analopen_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg3_head.png",
"Graphics/Portrait/Lona/chcg3_head_moot.png",
"Graphics/Portrait/Lona/chcg3_head_Freckle.png",
"Graphics/Portrait/Lona/chcg3_head_HeadGround.png",
"Graphics/Portrait/Lona/chcg3_head_HeadGround_moot.png",
"Graphics/Portrait/Lona/chcg3_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg3_subpose1_body.png",
"Graphics/Portrait/Lona/chcg3_Tail.png",
"Graphics/Portrait/Lona/chcg3_analopen.png",
"Graphics/Portrait/Lona/chcg3_preg4m.png",
"Graphics/Portrait/Lona/chcg3_preg6m.png",
"Graphics/Portrait/Lona/chcg3_preg8m.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes01_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes02_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes03_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes04_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes05_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes06_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes07_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_subeyes08_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_eyes01_tear.png",
"Graphics/Portrait/Lona/chcg3_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/chcg3_head_eyes02_tear.png",
"Graphics/Portrait/Lona/chcg3_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/chcg3_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/chcg3_head_mouth01.png",
"Graphics/Portrait/Lona/chcg3_head_mouth02.png",
"Graphics/Portrait/Lona/chcg3_head_mouth02_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_mouth03.png",
"Graphics/Portrait/Lona/chcg3_head_mouth04.png",
"Graphics/Portrait/Lona/chcg3_head_mouth05.png",
"Graphics/Portrait/Lona/chcg3_head_mouth05_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_mouth06.png",
"Graphics/Portrait/Lona/chcg3_head_mouth06_EXT.png",
"Graphics/Portrait/Lona/chcg3_head_mouth07.png",
"Graphics/Portrait/Lona/chcg3_head_mouth08.png",
"Graphics/Portrait/Lona/chcg3_head_mouth09.png",
"Graphics/Portrait/Lona/chcg3_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg3_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg3_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg3_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg3_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg3_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg3_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg3_PiercingBack1.png",
"Graphics/Portrait/Lona/chcg3_PiercingBack2.png",
"Graphics/Portrait/Lona/chcg3_PiercingBack3.png",
"Graphics/Portrait/Lona/chcg3_preg8m_EffectWet.png",
"Graphics/Portrait/Lona/chcg3_EffectWet.png",
"Graphics/Portrait/Lona/chcg3_preg6m_EffectWet.png",
"Graphics/Portrait/Lona/chcg3_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg3_analopen_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg4_head.png",
"Graphics/Portrait/Lona/chcg4_head_moot.png",
"Graphics/Portrait/Lona/chcg4_head_Freckle.png",
"Graphics/Portrait/Lona/chcg4_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg4_head_HairDancer_skin.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes04_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes05_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes06_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes07_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/chcg4_head_eyes01_subeyes08_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/chcg4_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/chcg4_head_eyes03_subeyes01_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/chcg4_head_eyes03_subeyes02_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_mouth01.png",
"Graphics/Portrait/Lona/chcg4_head_mouth02.png",
"Graphics/Portrait/Lona/chcg4_head_mouth02_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_mouth03.png",
"Graphics/Portrait/Lona/chcg4_head_mouth04.png",
"Graphics/Portrait/Lona/chcg4_head_mouth05.png",
"Graphics/Portrait/Lona/chcg4_head_mouth05_EXT.png",
"Graphics/Portrait/Lona/chcg4_head_mouth06.png",
"Graphics/Portrait/Lona/chcg4_head_mouth07.png",
"Graphics/Portrait/Lona/chcg4_head_mouth08.png",
"Graphics/Portrait/Lona/chcg4_head_mouth09.png",
"Graphics/Portrait/Lona/chcg4_subpose1_body.png",
"Graphics/Portrait/Lona/chcg4_subpose2_body.png",
"Graphics/Portrait/Lona/chcg4_Tail.png",
"Graphics/Portrait/Lona/chcg4_subpose1_preg4m.png",
"Graphics/Portrait/Lona/chcg4_subpose1_preg6m.png",
"Graphics/Portrait/Lona/chcg4_subpose1_preg8m.png",
"Graphics/Portrait/Lona/chcg4_subpose2_preg4m.png",
"Graphics/Portrait/Lona/chcg4_subpose2_preg6m.png",
"Graphics/Portrait/Lona/chcg4_subpose2_preg8m.png",
"Graphics/Portrait/Lona/chcg4_vagopen.png",
"Graphics/Portrait/Lona/chcg4_analopen.png",
"Graphics/Portrait/Lona/chcg4_vagruined.png",
"Graphics/Portrait/Lona/chcg4_analopen_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg4_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg4_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg4_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg4_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg4_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg4_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg4_PiercingAnal3.png",
"Graphics/Portrait/Lona/chcg4_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg4_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg4_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg4_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_preg6m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg4_preg8m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg4_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg4_subpose1_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg4_subpose2_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg4_subpose2_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg4_subpose2_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg4_vagopen_PiercingVag1.png",
"Graphics/Portrait/Lona/chcg4_vagopen_PiercingVag2.png",
"Graphics/Portrait/Lona/chcg4_vagopen_PiercingVag3.png",
"Graphics/Portrait/Lona/chcg4_analopen_PiercingAnal1.png",
"Graphics/Portrait/Lona/chcg4_analopen_PiercingAnal2.png",
"Graphics/Portrait/Lona/chcg4_CumsCreamPie3.png",
"Graphics/Portrait/Lona/chcg4_CumsCreamPie1.png",
"Graphics/Portrait/Lona/chcg4_CumsCreamPie2.png",
"Graphics/Portrait/Lona/chcg4_vagopen_analopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_vagruined_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_vagruined_analopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_vagopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_analopen_EffectWet.png",
"Graphics/Portrait/Lona/chcg4_MelaninVag.png",
"Graphics/Portrait/Lona/chcg4_vagopen_MelaninVag.png",
"Graphics/Portrait/Lona/chcg4_MelaninMNipple.png",
"Graphics/Portrait/Lona/chcg4_subpose1_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg4_analopen_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg4_subpose2_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg4_MelaninAnal.png",
"Graphics/Portrait/Lona/chcg5_head.png",
"Graphics/Portrait/Lona/chcg5_head_moot.png",
"Graphics/Portrait/Lona/chcg5_head_HairBasic_skin.png",
"Graphics/Portrait/Lona/chcg5_head_Freckle.png",
"Graphics/Portrait/Lona/chcg5_subpose1_body.png",
"Graphics/Portrait/Lona/chcg5_preg4m.png",
"Graphics/Portrait/Lona/chcg5_preg6m.png",
"Graphics/Portrait/Lona/chcg5_preg8m.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes01.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes01_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes02.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes02_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes03.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes03_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes04.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes04_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes05.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes05_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes06.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes06_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes07.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes07_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes08.png",
"Graphics/Portrait/Lona/chcg5_head_eyes01_subeyes08_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_eyes02_subeyes01.png",
"Graphics/Portrait/Lona/chcg5_head_eyes03_subeyes01.png",
"Graphics/Portrait/Lona/chcg5_head_eyes03_subeyes02.png",
"Graphics/Portrait/Lona/chcg5_head_eyes03_subeyes02_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_mouth01.png",
"Graphics/Portrait/Lona/chcg5_head_mouth02.png",
"Graphics/Portrait/Lona/chcg5_head_mouth02_EXT.png",
"Graphics/Portrait/Lona/chcg5_head_mouth03.png",
"Graphics/Portrait/Lona/chcg5_head_mouth04.png",
"Graphics/Portrait/Lona/chcg5_head_mouth05.png",
"Graphics/Portrait/Lona/chcg5_head_mouth06.png",
"Graphics/Portrait/Lona/chcg5_head_mouth07.png",
"Graphics/Portrait/Lona/chcg5_head_mouth08.png",
"Graphics/Portrait/Lona/chcg5_head_mouth09.png",
"Graphics/Portrait/Lona/chcg5_head_moot_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg5_head_moot_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg5_head_moot_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingEar1.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingEar2.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingEar3.png",
"Graphics/Portrait/Lona/chcg5_head_PiercingNose.png",
"Graphics/Portrait/Lona/chcg5_PiercingArms1.png",
"Graphics/Portrait/Lona/chcg5_PiercingArms2.png",
"Graphics/Portrait/Lona/chcg5_PiercingArms3.png",
"Graphics/Portrait/Lona/chcg5_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg5_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_PiercingChest1.png",
"Graphics/Portrait/Lona/chcg5_PiercingChest2.png",
"Graphics/Portrait/Lona/chcg5_PiercingChest3.png",
"Graphics/Portrait/Lona/chcg5_preg4m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_preg4m_PiercingBelly2.png",
"Graphics/Portrait/Lona/chcg5_preg4m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_preg6m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_preg6m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_preg8m_PiercingBelly1.png",
"Graphics/Portrait/Lona/chcg5_preg8m_PiercingBelly3.png",
"Graphics/Portrait/Lona/chcg5_MelaninSNipple.png",
"Graphics/Portrait/Lona/chcg5_MelaninMNipple.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_moot.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_body_preg6m.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_body_preg8m.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_body.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_body_SH.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_body_MH.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_mouth01.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_mouth02.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_eyes01.png",
"Graphics/Portrait/LayeredNPC/CoconaSitFearEV/CoconaSitFearEV_Lona_head_eyes02.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_body.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_Tail.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_bad.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_BadLewd.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_Good.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_GoodLewd.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_Happy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_bad.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_BadLewd.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_Good.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_GoodLewd.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_Happy.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_Pain.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_moot_Supprise.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_Pain.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_Freckle.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_head_Supprise.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_preg6m.png",
"Graphics/CharacterCharsets/LonaMCC/LonaMCC_preg8m.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_body.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_Tail.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_bad.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_BadLewd.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_Happy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_moot_bad.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_moot_BadLewd.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_moot_Happy.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_moot_Pain.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_moot_Supprise.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_Pain.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_Freckle.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_head_Supprise.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_preg6m.png",
"Graphics/CharacterCharsets/LonaMCC/CHSF0/LonaMCC_preg8m.png",
"Graphics/CharacterCharsets/MhugeC/MhugeC_mid_MeatArmorLona.png",
"Graphics/Characters/!_Z_AbomLonaRapeLoop.png",
"Graphics/Characters/overmap32_obj@128,192,32,32",
"Graphics/Characters/LonaEXT/LonaCoconaBed.png",
"Graphics/Characters/LonaEXT/LonaMootCoconaBed.png",
"Graphics/Characters/LonaEXT/WoodenBondage.png",
"Graphics/Characters/LonaEXT/WoodenBondageMoot.png",
"Graphics/Characters/LonaEXT/LonaBondageOnBed_sm.png",
"Graphics/Characters/LonaEXT/LonaMootBondageOnBed_sm.png"
],
"palettes":[
{
"name": "Banshee",
"condition": "if $game_actors.length>0 then $game_player.actor.stat['RaceRecord'] == 'Banshee' end",
"palette_old": ["source_mc/eyes.act",
"source_mc/eyes_h.act",
"source_mc/skin.act",
"source_mc/skin_h.act"],
"palette_new": ["race/Banshee/eyes1_Normal.act",
"race/Banshee/eyes1_Normal.act",
"race/Banshee/skin_Normal.act",
"race/Banshee/skin_Normal.act"]
},
{
"name": "Nibba",
"condition": "if $game_actors.length>0 then $game_player.actor.stat['RaceRecord'] == 'Nibba' end",
"palette_old": ["source_mc/eyes.act",
"source_mc/skin.act",
"source_mc/skin_h.act"],
"palette_new": ["race/Nibba/eyes.act",
"race/Nibba/skin.act",
"race/Nibba/skin.act"]
},
{
"name": "Moot",
"condition": "if $game_actors.length>0 then $game_player.actor.stat['RaceRecord'] == 'Moot' end",
"palette_old": ["source_mc/eyes.act",
"source_mc/skin.act",
"source_mc/skin_h.act"],
"palette_new": ["race/moot/eyes_moot.act",
"race/moot/skin_moot.act",
"race/moot/skin_h_moot.act"]
},
{
"name": "preDeepone",
"condition": "if $game_actors.length>0 then $game_player.actor.stat['RaceRecord'] == 'PreDeepone' end",
"palette_old": ["source_mc/eyes.act",
"source_mc/eyes_h.act",
"source_mc/skin.act"],
"palette_new": ["race/Deepone/eyes_DP_Pre.act",
"race/Deepone/eyes_h_DP_True.act",
"race/Deepone/skin_DP_Pre.act"]
},
{
"name": "Abomination",
"condition": "if $game_actors.length>0 then $game_player.actor.stat['RaceRecord'] == 'Abomination' end",
"palette_old": ["source_mc/eyesL.act",
"source_mc/eyesL_h.act",
"source_mc/eyesR.act",
"source_mc/eyesR_h.act",
"source_mc/skin.act",
"source_mc/skin_h.act"],
"palette_new": ["race/Abomination/eyes_abom_red.act",
"race/Abomination/eyes_abom_red.act",
"race/Abomination/eyes_abom_magenta.act",
"race/Abomination/eyes_abom_magenta.act",
"race/Abomination/skin_abom.act",
"race/Abomination/skin_abom.act"]
}
]
}
+127
View File
@@ -0,0 +1,127 @@
##################################################################
LonaRPG Bitmap(Palette) Changer (PCh for short)
All code made by Teravisor
Some palettes and color fix made by ECCMA417
Everything else (include this readme) by cyancyan214
this readme is no good and needs to be completely rewritten by someone
##################################################################
tl;dr
put some .json from ModScripts/PaletteChanger/unactive_jsons folder in to ModScripts/PaletteChanger/ folder to activate it. "number_" will be the load order
If u made color mod, but see weird 00FFFF (u guys call it blue) color - check _viewme.png
this mod's files:
ModScripts/2_LonaBitmapChanger.rb - main code. Contains remarks with most ESSENTIAL explanations, read it to learn basics
currently unused:
ModScripts/Unused/3_PaletteLoader.rb - Lets you set custom path for .jsons
ModScripts/Unused/3_GimpTxt.rb.DIS - compatibility for GIMP .txt palettes
##################################################################
some random explanations:
default path - for PaletteChanger to look for .json - "game_folder\ModScripts\PaletteChanger\*.json" - all .json that is inside this folder will be active
Put .json somewhere else to deactivate it
PaletteChanger uses FileGetter's default code when load files, but loads .json instead of .rb
FileGetter will look for "number_" prefix in filename to decide loading order
it will consider anything else than "number_" as 0 (or random?), so naming ur files "number_filename.json" is recommended
.json loaded first will prevent other .jsons to overwrite it if it recolors same parts (colors)
color cells order (structure) inside palette_new must be same as in palette_old, or u'll see 00FFFF
If some color cell in palette_new has same color code as in palette_old, that cell will be ignored, unchanged (will not change something in to same exact color)
This can cause weird looking glitch sometimes if you make active multiple .jsons, that recolors same exact parts
If there is a .json that is "below" that tries to recolor that skipped color cell, you'll see that color in the "gap" created by that ignored color in the "upper" .json
To avoid it, make sure, that any color from ur palette_new is != palette_old:
If u made, for example, some eyes mod, changed all colors, but decided to keep it's brightest color same as original - 247.255.128
You just need to change that color code by 1, like, in to 248.255.128
You can also ignore it and use this feature for your advantage in some cases (like it's done with .act 00FFFF background)
Pay attention for "," symbol when making a custom .json. It might not work just because , is missing or put in wrong place
there is currently no difference if u use capital letters or lowercase letters in .json for files you add in there
.jsons with "DEFAULT" in its names (number_DEFAULT_*.json) are used in base game, removing or editing them may cause breaking of game immersion (unless u know what u doing)
.act = Adobe Color Table - file that can store 256 colors
##################################################################
Recoloring:
Get the LonaRPG-PChPreviewer.psd file, that contains ALL colors from source_mc and lets you preview what you recoloring, from here:
https://mega.nz/folder/vdYhSDyI#VgWhG0UfQu56rTsRUKY3jQ
This .psd gonna update from time to time, so check its version. It doesn't have ALL graphics in it, that's not really necessary
Every layer(name) in it = (name).act - select it, recolor, create your custom .acts!
Watch Videos examples to learn how to create an .act
Preview.Edits(*).psd are storages that contains import of all palette_new from the base game
Suggested soft:
Photoshop(PS), any version of it, even old CS5 or CS6 (dont use CS1, it will lag crazy). Use it's indexed mod (good at recolor, bad if try move colors inside .act)
Fighter Factory(FF) (freeware), use it's Advanced palette editor. (good at move bunch of colors in .act, not that good at recolor)
Cyotek Color Palette Editor (freeware) if u hate/don't have PS. Good for pick colors from anywhere (from .psd) easy to open an .act to quickly look what's inside it
Spidey's Palette Dump Tool (freeware) Absolute timesaver. Instantly creates .act from .png while keeping order of colors intact. No more manual labor.
Download from here: http://baghead.drdteam.org click on DoomCrap
Other:
CLIP Studio Paint (CLIP) - OK, but can't work with .acts. Loads the .psd a bit slow
anything that can edit .act or it's converted analog
anything that can open a .psd
Not recommended:
Krita - (freeware) can open .psd, but doesn't support mask and adjustment layers. No support for .act. Loading slow
GIMP - (freeware) supports PS' masks but doesn't support PS' adjustment layers. UI looks like shit. Eats a lot of RAM. Can save palettes to a .txt
One needs at least a basic understanding, how Photoshop mask layers does work to operate this .psd. YouTube can help
PCh uses RGB and ignores the Alpha channel (transparency, RGBA) so u can ignore it too in every partly-transparent layers, that's why there is masks, to imitate it
please, create your own unique folder for your .acts for convenience and to avoid creating file mess: ModScripts/PaletteChanger/USERNAME/*.act
please, do not include contents of source_mc in to your mod, unless your palette_old is unique
##################################################################
some more boring random explanations:
While the source_mc .acts has defined structure of the color cells/rows, it just made for convenience and compability
colors can be placed in any order, there is no rules. One .act can easily contain colors from many parts, at complete random order
Just make palette_new's color order to be equal to palette_old's color order
if some thing contain more, than 256 colors, more than one .act can be used to recolor it (put them in a subfolder?) Or a .txt can be used(?) never tested it :\
Why background inside .acts is 00FFFF color? Because I like it. And It's not used in game graphics, so can be used as "neutral" color
It's better(?) to keep the "background" color to be same in the palette_old and palette_new so it can be ignored by PCh to spare some performance
source_mc - folder that contains base game colors from ingame graphics - used as palette_old
base game color palettes from source_mc is recommended as a base for recoloring. Drawn by 417, it's already has good saturation/value correlations
DO NOT edit any .act inside source_mc folder. DO NOT report any visual bug if u did
acc1, 2 etc - hair accessories: twin braid; ponytail etc
skin_h; eyes_h. H - short for Hentai
You don't need to have unique .acts in palette_new for every palette_old .act
You can combine multiple parts in to one palette_new. Get reference from the Previewer.psd and base game .acts/.jsons
How to make Lona with heterochromia:
In .json's palette_old line: add R(ight) or L(eft) after "eyes", "sclera" etc. Supported parts: eyes, eyes_h, sclera
example:
"palette_old": ["source_mc/eyesr.act", "source_mc/eyesR_h.act", "source_mc/scleraR.act"]
this will make .json to recolor right eye only. All base game palette_new eyes and sclera .acts is with support for this
Left and Right eyes position is based on Lona's own point of view
The following palettes can be set to it too, but this needs to be done manually, inside the .act: glasses_basic
Why "_" symbol is everywhere? Because you can copypaste it easily by mouse double click
If you really know wtf you doing, only set of rules you should follow is in 2_LonaBitmapChanger.rb
##################################################################
"Graphics/Characters/item_icon01@48,144,24,24", #x, y , witdh,height
"Graphics/Characters/item_icon02@264,72,24,48",
"Graphics/Characters/item_icon02@192,96,24,24",
#"Graphics/Characters/item_icon02@24,144,24,24",
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loaded 100 of 16283 files, more files were not shown because too many files have changed in this diff. Show more