Mundo Maker
¡Bienvenid@ a Mundo Maker!

¿Quieres aprender todo sobre el RPG Maker?



Regístrate y forma parte de Mundo Maker.

Problema incompatible de KGC_HelpExtension

Ver el tema anterior Ver el tema siguiente Ir abajo

RPG Maker VX Problema incompatible de KGC_HelpExtension

Mensaje por Andrés Vasconcellos el 2013-09-19, 15:00

Tengo un problema con el script KGC_HelpExtension ya que al usar el sistema YEZealous, la ventana del personaje se superpone sobre la información de la habilidad, pero necesito las dos barras para que entre la información, ¿hay alguna forma de hacerlos compatibles entre sí, u otro script que me permita escribir en dos líneas que sí sea compatible?

Gracias de antemano

La prueba del delito:


notworthy
avatar
Andrés Vasconcellos
Iniciado
Iniciado

0/3

Créditos 25

Gracias : 2

Volver arriba Ir abajo

RPG Maker VX Re: Problema incompatible de KGC_HelpExtension

Mensaje por orochii el 2013-09-19, 19:21

Hay que revisar ambos scripts, y cambiar un poco las posiciones. ¿Podrías compartir ambos scripts por acá? Y aparte, el órden en que los pones, porque eso también varía la solución.

Salut,
OZ
avatar
orochii
Reportero

0/3

Créditos 7722

Gracias : 436

Volver arriba Ir abajo

RPG Maker VX Re: Problema incompatible de KGC_HelpExtension

Mensaje por Andrés Vasconcellos el 2013-09-20, 13:22

Orden: YEZ Skill Command Selection, KGC_HelpExtension, KGC_DrawFormatText.

Script KGC Help Extension:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ◆ Additional Help Window Functions - KGC_HelpExtension ◆ VX ◆
#_/ ◇ Last update : 2007/12/19 ◇
#_/ ◆ Translation by Mr. Anonymous ◆
#_/----------------------------------------------------------------------------
#_/ Additional Help Window functions.
#_/============================================================================
#_/ KCG_DrawFormatText is required for this script to function.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
# ★ Customization ★
#==============================================================================

module KGC
module HelpExtension
# The number of rows (lines) the help window can display.
# Rows are divided with the | character in the item/skill's description.
ROW_MAX = 2

# Button used when status window of shop screen scrolls.
SHOP_STATUS_SCROLL_BUTTON = Input::A
end
end

#------------------------------------------------------------------------------#

$imported = {} if $imported == nil
$imported["HelpExtension"] = true

#==============================================================================
# ■ Window_Help
#==============================================================================

class Window_Help < Window_Base
attr_reader :row_max
#--------------------------------------------------------------------------
# ● Object initialization
#--------------------------------------------------------------------------
alias initialize_KGC_HelpExtension initialize
def initialize
@row_max = 1

initialize_KGC_HelpExtension
end
#--------------------------------------------------------------------------
# ● The number of lines setting
#--------------------------------------------------------------------------
def row_max=(value)
@row_max = [value, 1].max
self.height = WLH * @row_max + 32
create_contents

# Content restoration
text = @text
align = @align
@text = @align = nil
set_text(text, align)
end
#--------------------------------------------------------------------------
# ● Text setting
# Text: Character string displayed in window
# Align: Alignment(0. left justification, 1 center just., 2 right just.)
#--------------------------------------------------------------------------
def set_text(text, align = 0)
if text != @text or align != @align
self.contents.clear
self.contents.font.color = normal_color
font_buf = self.contents.font.clone
# \N[x] Converts to an integer.
buf = text.gsub(/\\N(\[\d+\])/i) { "\\__#{$1}" }
lines = buf.split(/(?:[|]|\\n)/i)
lines.each_with_index { |l, i|
# Convert \N[x] returns and draws.
l.gsub!(/\\__(\[\d+\])/i) { "\\N#{$1}" }
self.contents.draw_format_text(4, i * WLH, self.width - 40, WLH, l, align)
}
self.contents.font = font_buf
@text = text
@align = align
end
end
end

#==================================End Class===================================#

#==============================================================================
# ■ Scene_Item
#==============================================================================
class Scene_Item < Scene_Base
#--------------------------------------------------------------------------
# ● Beginning processing
#--------------------------------------------------------------------------
alias start_KGC_HelpExtension start
def start
start_KGC_HelpExtension

adjust_window_size
end
#--------------------------------------------------------------------------
# ● Adjustment of window size
#--------------------------------------------------------------------------
def adjust_window_size
@help_window.row_max = KGC::HelpExtension::ROW_MAX
@item_window.y = @help_window.height
@item_window.height = Graphics.height - @help_window.height
@item_window.refresh
end
end

#==================================End Class===================================#

#==============================================================================
# ■ Scene_Skill
#==============================================================================

class Scene_Skill < Scene_Base
#--------------------------------------------------------------------------
# ● Beginning processing
#--------------------------------------------------------------------------
alias start_KGC_HelpExtension start
def start
start_KGC_HelpExtension

adjust_window_size
end
#--------------------------------------------------------------------------
# ● Adjustment of window size
#--------------------------------------------------------------------------
def adjust_window_size
@help_window.row_max = KGC::HelpExtension::ROW_MAX
@status_window.y = @help_window.height
dy = @help_window.height + @status_window.height
@skill_window.y = dy
@skill_window.height = Graphics.height - dy
@skill_window.refresh
end
end

#==================================End Class===================================#

#==============================================================================
# ■ Scene_Equip
#==============================================================================

class Scene_Equip < Scene_Base
#--------------------------------------------------------------------------
# ● Beginning processing
#--------------------------------------------------------------------------
alias start_KGC_HelpExtension start
def start
start_KGC_HelpExtension

adjust_window_size
end
#--------------------------------------------------------------------------
# ● Adjustment of window size
#--------------------------------------------------------------------------
def adjust_window_size
@help_window.row_max = KGC::HelpExtension::ROW_MAX
@equip_window.y = @help_window.height
@status_window.y = @help_window.height
resize_item_windows
end
#--------------------------------------------------------------------------
# ● Size change of item window
#--------------------------------------------------------------------------
def resize_item_windows
@item_windows.each { |w|
dy = @help_window.height + @equip_window.height
w.y = dy
w.height = Graphics.height - dy
w.refresh
}
end
end

#==================================End Class===================================#

#==============================================================================
# ■ Scene_Shop
#==============================================================================

class Scene_Shop < Scene_Base
#--------------------------------------------------------------------------
# ● Beginning processing
#--------------------------------------------------------------------------
alias start_KGC_HelpExtension start
def start
start_KGC_HelpExtension

adjust_window_size
end
#--------------------------------------------------------------------------
# ● Adjustment of window size
#--------------------------------------------------------------------------
def adjust_window_size
@help_window.row_max = KGC::HelpExtension::ROW_MAX
@command_window.y = @help_window.height
@gold_window.y = @help_window.height
dy = @help_window.height + @command_window.height
@dummy_window.y = @buy_window.y = @sell_window.y =
@number_window.y = @status_window.y = dy
@dummy_window.height = @buy_window.height =
@sell_window.height = @number_window.height =
@status_window.height = Graphics.height - dy
@dummy_window.create_contents
@number_window.create_contents
end
#--------------------------------------------------------------------------
# ● Frame Update
#--------------------------------------------------------------------------
alias udpate_KGC_HelpExtension update
def update
if !@command_window.active &&
Input.press?(KGC::HelpExtension::SHOP_STATUS_SCROLL_BUTTON)
super
update_menu_background
update_scroll_status
return
else
@status_window.cursor_rect.empty
end

udpate_KGC_HelpExtension
end
#--------------------------------------------------------------------------
# ● Processing status window scroll
#--------------------------------------------------------------------------
def update_scroll_status
@status_window.cursor_rect.width = @status_window.contents.width
@status_window.cursor_rect.height = @status_window.height - 32
@status_window.update
if Input.press?(Input::UP)
@status_window.oy = [@status_window.oy - 4, 0].max
elsif Input.press?(Input::DOWN)
max_pos = [@status_window.contents.height -
(@status_window.height - 32), 0].max
@status_window.oy = [@status_window.oy + 4, max_pos].min
end
end
end

#==================================End Class===================================#

#==============================================================================
# ■ Scene_Battle
#==============================================================================

class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● Beginning of skill selection
#--------------------------------------------------------------------------
alias start_skill_selection_KGC_HelpExtension start_skill_selection
def start_skill_selection
start_skill_selection_KGC_HelpExtension

adjust_skill_window_size
end
#--------------------------------------------------------------------------
# ● Size adjustment of skill window
#--------------------------------------------------------------------------
def adjust_skill_window_size
@help_window.row_max = KGC::HelpExtension::ROW_MAX
@skill_window.y = @help_window.height
@skill_window.height = Graphics.height -
(@help_window.height + @status_window.height)
@skill_window.refresh
end
#--------------------------------------------------------------------------
# ● Beginning of item selection
#--------------------------------------------------------------------------
alias start_item_selection_KGC_HelpExtension start_item_selection
def start_item_selection
start_item_selection_KGC_HelpExtension

adjust_item_window_size
end
#--------------------------------------------------------------------------
# ● Size adjustment of item window
#--------------------------------------------------------------------------
def adjust_item_window_size
@help_window.row_max = KGC::HelpExtension::ROW_MAX
@item_window.y = @help_window.height
@item_window.height = Graphics.height -
(@help_window.height + @status_window.height)
@item_window.refresh
end
end

#==================================End Class===================================#
Script KGC Drawformatext:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/ ◆ Special Text Formatting - KGC_DrawFormatText ◆ VX ◆
#_/ ◇ Last update : 2007/12/19 ◇
#_/ ◆ Translation by Mr. Anonymous ◆
#_/-----------------------------------------------------------------------------
#_/ Specialized text display.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_

$imported = {} if $imported == nil
$imported["DrawFormatText"] = true

#------------------------------------------------------------------------------#

class Bitmap
@@__dummy_window = Window_Base.new(-64, -64, 64, 64)
@@__dummy_window.visible = false
#--------------------------------------------------------------------------
# ● Format specification character drawing
#--------------------------------------------------------------------------
def draw_format_text(x, y, width, height, text, align = 0)
str = convert_special_characters(text)
dx = 0
buf = Bitmap.new(Graphics.width * 2, Window_Base::WLH)
buf.font = self.font.clone
loop {
c = str.slice!(/./m) # following letter the acquisition case c when nil
case c
when nil # When no character present where it should draw
break
when "\x01" # \C[n] (Character color change)
str.sub!(/\[([0-9]+)\]/, "")
buf.font.color = @@__dummy_window.text_color($1.to_i)
next
else # Else draw usual character
buf.draw_text(dx, 0, 40, Window_Base::WLH, c)
c_width = buf.text_size(c).width
dx += c_width
end
}
self.font = buf.font.clone
# The buffer is transmitted in the window.
dest = Rect.new(x, y, [width, dx].min, height)
src = Rect.new(0, 0, dx, Window_Base::WLH)
offset = width - dx
case align
when 1 # Center justification
dest.x += offset / 2
when 2 # Right justification
dest.x += offset
end
stretch_blt(dest, buf, src)
buf.dispose
end
#--------------------------------------------------------------------------
# ● Conversion of special characters
#--------------------------------------------------------------------------
def convert_special_characters(str)
text = str.dup
text.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] }
text.gsub!(/\\N\[([0-9]+)\]/i) { $game_actors[$1.to_i].name }
text.gsub!(/\\C\[([0-9]+)\]/i) { "\x01[#{$1}]" }
text.gsub!(/\\G/) { $game_party.gold }
text.gsub!(/\\\\/) { "\\" }
return text
end
end
Script YEZ:
#===============================================================================
#
# Yanfly Engine Zealous - Skill Command Selection
# Last Date Updated: 2010.01.28
# Level: Normal
#
# This script basically functions as a bridge inbetween many YEZ scripts in
# addition to making all of the skill-related YEZ scripts accessible from one
# common place. Menu searching and surfing can become quite annoying for the
# player and this script's main purpose is to minimize that annoyance.
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 2010.01.28 - Efficiency update.
# o 2010.01.20 - Passive equipping efficiency update.
# o 2010.01.12 - Job System: Passives Compatibility.
# o 2010.01.05 - Job System: Classes Compatibility.
# o 2010.01.03 - Mastery refresh window bugfix.
# o 2009.01.01 - Job System: Skill Levels Compatibility.
# - Efficiency update.
# o 2009.12.30 - Started Script and Finished Script.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Debug Shortcuts - Only during $TEST and $BTEST mode
# -----------------------------------------------------------------------------
# During testplay mode, pressing F5 during the command window selection process
# or the skill selection process will recover all of the actor's MP.
#
#===============================================================================
# Compatibility
# -----------------------------------------------------------------------------
# - Works With: YEZ Status Command Menu, YEZ Job System: Base
# -----------------------------------------------------------------------------
# Note: This script may not work with former Yanfly Engine ReDux scripts.
# Use Yanfly Engine Zealous scripts to work with this if available.
#===============================================================================

$imported = {} if $imported == nil
$imported["SkillCommandSelection"] = true

module YEZ
module SKILL

#===========================================================================
# Basic Settings
# --------------------------------------------------------------------------
# The following below will adjust the basic settings and vocabulary that
# will display throughout the script. Change them as you see fit.
#===========================================================================

# The following array determines the commands that appear in the command
# window at the skill scene's upper left corner.
COMMANDS =[
:view_skills, # View all skills.
:learn_skill, # Requires Job System: Base
:level_skill, # Requires Job System: Skill Levels
:equip_state, # Requires Job System: Passives
:learn_state, # Requires Job System: Passives
# :mastery, # Requires Weapon Mastery Skills
] # Do not remove this.

# If you would like the command window to have centered alignment for text,
# set this to true. Otherwise, setting it to false will have left alignment.
CENTERED_COMMAND = true

# The following determines the vocabulary used for the remade skill scene.
VOCAB ={
:view_skills => "Consultar",
:equip_state => "Add Passive",
:learn_state => "New Passive",
} # Do not remove this.

end # SKILL
end # YEZ

#===============================================================================
# Editting anything past this point may potentially result in causing computer
# damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
# Therefore, edit at your own risk.
#===============================================================================

#===============================================================================
# Game_Temp
#===============================================================================

class Game_Temp

#--------------------------------------------------------------------------
# public instance variables
#--------------------------------------------------------------------------
attr_accessor :scs_on
attr_accessor :scs_oy

end # Game_Temp

#===============================================================================
# Scene_Skill
#===============================================================================

class Scene_Skill < Scene_Base

#--------------------------------------------------------------------------
# alias method: initialize
#--------------------------------------------------------------------------
alias initialize_scs initialize unless $@
def initialize(actor_index = 0, last_index = 0)
initialize_scs(actor_index, last_index)
@last_index = last_index
$game_temp.scs_on = true
end

#--------------------------------------------------------------------------
# overwrite method: start
#--------------------------------------------------------------------------
def start
super
create_menu_background
@actor = $game_party.members[@actor_index]
$game_party.last_actor_index = @actor_index
@viewport = Viewport.new(0, 0, 544, 416)
@help_window = Window_Help.new
@help_window.viewport = @viewport
@help_window.y = 128
if $imported["JobSystemBase"]
@status_window = Window_JP_Actor.new(@actor)
elsif $imported["StatusCommandMenu"]
@status_window = Window_Status_Actor.new(@actor)
else
@status_window = Window_Skill_Actor.new(@actor)
end
@status_window.viewport = @viewport
if $imported["JobSystemClasses"] and @actor.all_unlocked_classes.size > 1
@class_window = Window_Class_List.new(@actor, 0, @help_window.y +
@help_window.height)
@class_window.help_window = @help_window
@classdata_window = Window_Class_Info.new(@class_window.width,
@class_window.y, @actor)
@class_window.y = 416*3
@classdata_window.y = @class_window.y
end
create_command_window
@target_window = Window_MenuStatus.new(0, 0)
hide_target_window
end

#--------------------------------------------------------------------------
# overwrite method: terminate
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@help_window.dispose if @help_window != nil
@status_window.dispose if @status_window != nil
@target_window.dispose if @target_window != nil
@command_window.dispose if @command_window != nil
@learndata_window.dispose if @learndata_window != nil
@leveldata_window.dispose if @leveldata_window != nil
@class_window.dispose if @class_window != nil
@classdata_window.dispose if @classdata_window != nil
@stapas_window.dispose if @stapas_window != nil
@eqpaslist_window.dispose if @eqpaslist_window != nil
@eqpasstat_window.dispose if @eqpasstat_window != nil
@lepasdata_window.dispose if @lepasdata_window != nil
@clpasdata_window.dispose if @clpasdata_window != nil
dispose_mini_windows
end

#--------------------------------------------------------------------------
# new method: create_command_window
#--------------------------------------------------------------------------
def create_command_window
commands = []; @data = []; @mini_windows = {}
for command in YEZ::SKILL::COMMANDS
case command
when :view_skills
@skill_window = Window_Skill.new(0, 184, 544, 232, @actor)
@skill_window.viewport = @viewport
@skill_window.help_window = @help_window
@skill_window.active = false
@mini_windows[@data.size] = @skill_window
commands.push(YEZ::SKILL::VOCAB[command])

when :learn_skill
next unless $imported["JobSystemBase"]
next unless $game_switches[YEZ::JOB::LEARN_ENABLE_SWITCH]
dy = @status_window.height + @help_window.height
@learnskill_window = Window_LearnSkill.new(0, dy, @actor)
@learndata_window = Window_LearnData.new(@learnskill_window.width,
@learnskill_window.y, @learnskill_window.skill, @actor, @actor.class_id)
@learnskill_window.help_window = @help_window
@learnskill_window.active = false
@mini_windows[@data.size] = @learnskill_window
commands.push(YEZ::JOB::LEARN_TITLE)

when :level_skill
next unless $imported["JobSystemSkillLevels"]
next unless $game_switches[YEZ::JOB::LEVEL_ENABLE_SWITCH]
dy = @status_window.height + @help_window.height
@levelskill_window = Window_LevelSkill.new(0, dy, @actor)
@leveldata_window = Window_LevelData.new(@levelskill_window.width,
@levelskill_window.y, @levelskill_window.skill, @actor, @actor.class_id)
@levelskill_window.help_window = @help_window
@levelskill_window.active = false
@mini_windows[@data.size] = @levelskill_window
commands.push(YEZ::JOB::LEVEL_TITLE)

when :equip_state
next unless $imported["JobSystemPassives"]
next unless $game_switches[YEZ::JOB::ENABLE_PASSIVE_SWITCH]
create_passive_windows
@equippas_window = Window_PassiveEquip.new(0, @help_window.y +
@help_window.height, @actor)
@equippas_window.help_window = @help_window
@eqpaslist_window = Window_PassiveEquipList.new(0, @equippas_window.y,
@actor)
@eqpaslist_window.help_window = @help_window
@eqpasstat_window = Window_PassiveEquipStat.new(@eqpaslist_window.width,
@eqpaslist_window.y, @actor)
@mini_windows[@data.size] = @equippas_window
commands.push(YEZ::SKILL::VOCAB[command])

when :learn_state
next unless $imported["JobSystemPassives"]
next unless $game_switches[YEZ::JOB::ENABLE_PASSIVE_SWITCH]
create_passive_windows
@learnpas_window = Window_LearnPassive.new(0, @help_window.y +
@help_window.height, @actor)
@learnpas_window.help_window = @help_window
@lepasdata_window = Window_LearnPassiveData.new(@learnpas_window.width,
@learnpas_window.y, @learnpas_window.passive, @actor)
@learnpas_window.active = false
@clpasdata_window = Window_Class_PassiveInfo.new(@class_window.width,
@learnpas_window.y, @actor) if @class_window != nil
@mini_windows[@data.size] = @learnpas_window
commands.push(YEZ::SKILL::VOCAB[command])

when :mastery
next unless $imported["WeaponMasterySkills"]
@mastery_window = Window_Mastery.new(0, 128, @actor, true)
@mini_windows[@data.size] = @mastery_window
commands.push(YEZ::WEAPON_MASTERY::TITLE)

else; next
end
@data.push(command)
end
if YEZ::SKILL::CENTERED_COMMAND
@command_window = Window_Command_Centered.new(160, commands)
else
@command_window = Window_Command.new(160, commands)
end
@command_window.height = 128
@command_window.oy = $game_temp.scs_oy if $game_temp.scs_oy != nil
@command_window.index = @last_index
@command_window.active = true
@command_window.viewport = @viewport
update_mini_windows
end

#--------------------------------------------------------------------------
# new method: update_mini_windows
#--------------------------------------------------------------------------
def update_mini_windows
@last_index = @command_window.index
@status_window.y = 0
@class_window.y = 416*3 if @class_window != nil
@classdata_window.y = @class_window.y if @classdata_window != nil
@learndata_window.y = 416*3 if @learndata_window != nil
@leveldata_window.y = 416*3 if @leveldata_window != nil
@eqpaslist_window.y = 416*3 if @eqpaslist_window != nil
@eqpasstat_window.y = 416*3 if @eqpasstat_window != nil
@stapas_window.y = 416*3 if @stapas_window != nil
@lepasdata_window.y = 416*3 if @lepasdata_window != nil
@clpasdata_window.y = 416*3 if @clpasdata_window != nil
class_id = @status_window.class
for i in 0..(@mini_windows.size-1)
@mini_windows[i].y = 416*3
end
case @mini_windows[@last_index]
when @skill_window
@help_window.visible = true
@skill_window.refresh
@mini_windows[@last_index].update_help
@mini_windows[@last_index].y = @status_window.height
@mini_windows[@last_index].y += @help_window.height if @help_window.visible
when @learnskill_window
@help_window.visible = true
if @class_window != nil
@class_window.y = @status_window.height + @help_window.height
@classdata_window.y = @class_window.y
@class_window.update_help
return
end
@learnskill_window.refresh(class_id)
@learndata_window.y = @status_window.height + @help_window.height
@learndata_window.refresh(@learnskill_window.skill, @status_window.class)
@mini_windows[@last_index].update_help
@mini_windows[@last_index].y = @status_window.height
@mini_windows[@last_index].y += @help_window.height if @help_window.visible
when @levelskill_window
@help_window.visible = true
if @class_window != nil
@class_window.y = @status_window.height + @help_window.height
@classdata_window.y = @class_window.y
@class_window.update_help
return
end
@levelskill_window.refresh(class_id)
@leveldata_window.y = @status_window.height + @help_window.height
@leveldata_window.refresh(@levelskill_window.skill, @status_window.class)
@mini_windows[@last_index].update_help
@mini_windows[@last_index].y = @status_window.height
@mini_windows[@last_index].y += @help_window.height if @help_window.visible
when @equippas_window
@equippas_window.refresh
@stapas_window.refresh
@eqpasstat_window.refresh
@help_window.visible = true
@stapas_window.y = 0
@status_window.y = 416*3
@equippas_window.y = @help_window.height + @help_window.y
@eqpasstat_window.y = @equippas_window.y
@equippas_window.update_help
when @learnpas_window
@learnpas_window.refresh(@stapas_window.class)
@help_window.visible = true
@stapas_window.y = 0
@status_window.y = 416*3
if @class_window != nil
@class_window.y = @status_window.height + @help_window.height
@clpasdata_window.y = @class_window.y
@class_window.update_help
return
end
@learnpas_window.y = @help_window.height + @help_window.y
@lepasdata_window.y = @learnpas_window.y
@learnpas_window.update_help

when @mastery_window
@help_window.visible = false
@mini_windows[@last_index].y = @status_window.height
end
end

#--------------------------------------------------------------------------
# new method: dispose_mini_windows
#--------------------------------------------------------------------------
def dispose_mini_windows
for i in 0..(@mini_windows.size-1)
next if @mini_windows[i] == nil
@mini_windows[i].dispose
@mini_windows[i] = nil
end
end

#--------------------------------------------------------------------------
# new method: refresh_windows
#--------------------------------------------------------------------------
def refresh_windows(class_id = nil)
@status_window.refresh(class_id) if @status_window != nil
@class_window.refresh if @class_window != nil
@classdata_window.refresh(class_id) if @classdata_window != nil
end

#--------------------------------------------------------------------------
# new method: old_refresh_windows
#--------------------------------------------------------------------------
def old_refresh_windows(class_id = nil)
@status_window.refresh(class_id) if @status_window != nil
@skill_window.refresh if @skill_window != nil
@class_window.refresh if @class_window != nil
@classdata_window.refresh(class_id) if @classdata_window != nil
@learnskill_window.refresh(class_id) if @learnskill_window != nil
@levelskill_window.refresh(class_id) if @levelskill_window != nil
@equippas_window.refresh if @equippas_window != nil
@stapas_window.refresh if @stapas_window != nil
@eqpasstat_window.refresh if @eqpasstat_window != nil
@learnpas_window.refresh(@stapas_window.class) if @learnpas_window != nil
end

#--------------------------------------------------------------------------
# alias method: return_scene
#--------------------------------------------------------------------------
alias return_scene_scs return_scene
def return_scene
$game_temp.scs_oy = nil
$game_temp.scs_on = nil
return_scene_scs
end

#--------------------------------------------------------------------------
# overwrite method: next_actor
#--------------------------------------------------------------------------
def next_actor
$game_temp.scs_oy = @command_window.oy
@actor_index += 1
@actor_index %= $game_party.members.size
$scene = Scene_Skill.new(@actor_index, @last_index)
end

#--------------------------------------------------------------------------
# overwrite method: prev_actor
#--------------------------------------------------------------------------
def prev_actor
$game_temp.scs_oy = @command_window.oy
@actor_index += $game_party.members.size - 1
@actor_index %= $game_party.members.size
$scene = Scene_Skill.new(@actor_index, @last_index)
end

#--------------------------------------------------------------------------
# overwrite method: update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@help_window.update
if @command_window.active
update_command_selection
elsif @subskill_window != nil and @subskill_window.active
update_subskill_window
elsif @learnskill_window != nil and @learnskill_window.active
update_learnskill_selection
elsif @levelskill_window != nil and @levelskill_window.active
update_levelskill_selection
elsif @equippas_window != nil and @equippas_window.active
update_equippas_selection
elsif @eqpaslist_window != nil and @eqpaslist_window.active
update_equiplist_selection
elsif @learnpas_window != nil and @learnpas_window.active
update_learnpassive_selection
elsif @class_window != nil and @class_window.active
update_class_selection
elsif @skill_window.active
@skill_window.update
update_skill_selection
elsif @target_window.active
@target_window.update
update_target_selection
end
end

#--------------------------------------------------------------------------
# new method: update_command_selection
#--------------------------------------------------------------------------
def update_command_selection
@command_window.update
update_mini_windows if @last_index != @command_window.index
if Input.trigger?(Input::B)
Sound.play_cancel
return_scene
elsif $TEST and Input.trigger?(Input::F5) # Debug MP Recovery
Sound.play_recovery
@actor.mp += @actor.maxmp
@status_window.refresh
@skill_window.refresh if @skill_window.visible
elsif Input.repeat?(Input::RIGHT)
Sound.play_cursor
next_actor
elsif Input.repeat?(Input::LEFT)
Sound.play_cursor
prev_actor
elsif Input.trigger?(Input::C)
Sound.play_decision
case @data[@command_window.index]
when :view_skills
@command_window.active = false
@skill_window.active = true
when :mastery
$scene = Scene_Mastery.new(@actor_index, @command_window.index)
when :learn_skill
if @class_window != nil
@command_window.active = false
@class_window.active = true
else
start_learnskill_selection
end
when :level_skill
if @class_window != nil
@command_window.active = false
@class_window.active = true
else
start_levelskill_selection
end
when :equip_state
Sound.play_decision
@command_window.active = false
@equippas_window.active = true
when :learn_state
if @class_window != nil
@command_window.active = false
@class_window.active = true
else
start_learn_passives
end
end
end
end

#--------------------------------------------------------------------------
# overwrite method: update_skill_selection
#--------------------------------------------------------------------------
def update_skill_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@command_window.active = true
@skill_window.active = false
elsif $TEST and Input.trigger?(Input::F5) # Debug MP Recovery
Sound.play_recovery
@actor.mp += @actor.maxmp
@status_window.refresh
@skill_window.refresh
elsif Input.trigger?(Input::C)
@skill = @skill_window.skill
if @skill != nil
@actor.last_skill_id = @skill.id
end
if @actor.skill_can_use?(@skill)
Sound.play_decision
determine_skill
else
Sound.play_buzzer
end
end
end

#--------------------------------------------------------------------------
# new method: update_class_selection
#--------------------------------------------------------------------------
def update_class_selection
@class_window.update
if @class_window.class != @status_window.class
@status_window.refresh(@class_window.class)
@stapas_window.refresh(@class_window.class) if @stapas_window != nil
@classdata_window.refresh(@class_window.class)
@clpasdata_window.refresh(@class_window.class) if @clpasdata_window != nil
end
if Input.trigger?(Input::B)
Sound.play_cancel
@command_window.active = true
@class_window.active = false
elsif Input.repeat?(Input::F8) and $TEST # Debug increase JP
Sound.play_equip
value = YEZ::JOB::JP_COST * 10
value *= 10 if Input.press?(Input::SHIFT)
for class_id in @actor.all_unlocked_classes
@actor.gain_jp(value + rand(value), class_id)
end
@class_window.refresh
@status_window.refresh(@class_window.class)
elsif Input.repeat?(Input::F7) and $TEST # Debug increase JP
Sound.play_equip
value = YEZ::JOB::JP_COST * 10
value *= 10 if Input.press?(Input::SHIFT)
for class_id in @actor.all_unlocked_classes
@actor.lose_jp(value + rand(value), class_id)
end
@class_window.refresh
@status_window.refresh(@class_window.class)
elsif Input.trigger?(Input::C)
Sound.play_decision
refresh_windows(@status_window.class)
class_id = @status_window.class
case @data[@command_window.index]
when :learn_skill
start_learnskill_selection
@learnskill_window.refresh(class_id)
@learndata_window.y = @status_window.height + @help_window.height
@learndata_window.refresh(@learnskill_window.skill, @status_window.class)
when :level_skill
start_levelskill_selection
@levelskill_window.refresh(class_id)
@leveldata_window.y = @status_window.height + @help_window.height
@leveldata_window.refresh(@levelskill_window.skill, @status_window.class)
when :learn_state
start_learn_passives
@learnpas_window.refresh(@stapas_window.class)
@clpasdata_window.y = 416*3 if @clpasdata_window != nil
end
@class_window.y = 416*3
@classdata_window.y = @class_window.y
end
end

#--------------------------------------------------------------------------
# new method: create_passive_windows
#--------------------------------------------------------------------------
def create_passive_windows
return if @stapas_window != nil
@stapas_window = Window_Passive_Actor.new(@actor)
end

#--------------------------------------------------------------------------
# new method: update_equippas_selection
#--------------------------------------------------------------------------
def update_equippas_selection
@equippas_window.update
if @equip_index != @equippas_window.index
@equip_index = @equippas_window.index
end
if Input.trigger?(Input::B)
Sound.play_cancel
@command_window.active = true
@equippas_window.active = false
elsif Input.trigger?(Input::C) or ($TEST and Input.trigger?(Input::F5))
if @equip_index <= @equippas_window.auto_size - 1
Sound.play_buzzer
return
end
Sound.play_decision
@equippas_window.active = false
@equippas_window.y = 416*3
@eqpaslist_window.active = true
@eqpaslist_window.y = @help_window.height + @stapas_window.height
@eqpaslist_window.refresh(@equippas_window.passive)
@eqpasstat_window.y = @help_window.height + @stapas_window.height
refresh_equipstat_window
@eqpaslist_window.update_help
elsif Input.trigger?(Input::X)
if @equip_index <= @equippas_window.auto_size - 1
Sound.play_buzzer
return
end
return if @equippas_window.passive == nil
Sound.play_equip
slot = @equippas_window.index - @equippas_window.auto_size
passive = 0
last_hp = @actor.maxhp
last_mp = @actor.maxmp
@actor.equip_passive(passive, slot)
@actor.hp += @actor.maxhp - last_hp
@actor.mp += @actor.maxmp - last_mp
@equippas_window.refresh
@equippas_window.update_help
@stapas_window.refresh
end
end

#--------------------------------------------------------------------------
# refresh_equipstat_window
#--------------------------------------------------------------------------
def refresh_equipstat_window
@equiplist_last_index = @eqpaslist_window.index
passive = @eqpaslist_window.passive
slot = @equippas_window.index - @equippas_window.auto_size
if passive == @equippas_window.passive or passive == nil
passive = 0
elsif @actor.equipped_passives.include?(passive.id)
passive = @actor.equipped_passives[slot]
end
@eqpasstat_window.refresh(passive, slot)
end

#--------------------------------------------------------------------------
# update_equiplist_selection
#--------------------------------------------------------------------------
def update_equiplist_selection
@eqpaslist_window.update
refresh_equipstat_window if @equiplist_last_index != @eqpaslist_window.index
if Input.trigger?(Input::B)
Sound.play_cancel
@equippas_window.active = true
@equippas_window.y = @help_window.height + @stapas_window.height
@eqpaslist_window.active = false
@eqpaslist_window.y = 416*3
refresh_windows
@equippas_window.refresh
@equippas_window.update_help
elsif $TEST and Input.repeat?(Input::F5) # Debug Force Equip
Sound.play_equip
passive = @eqpaslist_window.passive
slot = @equippas_window.index - @equippas_window.auto_size
passive = 0 if passive == nil or passive == @equippas_window.passive
last_hp = @actor.maxhp
last_mp = @actor.maxmp
@actor.equip_passive(passive, slot)
@actor.hp += @actor.maxhp - last_hp
@actor.mp += @actor.maxmp - last_mp
@equippas_window.active = true
@equippas_window.y = @help_window.height + @stapas_window.height
@eqpaslist_window.active = false
@eqpaslist_window.y = 416*3
refresh_windows
@equippas_window.refresh
@stapas_window.refresh
@eqpasstat_window.refresh
@equippas_window.update_help
elsif Input.trigger?(Input::C)
passive = @eqpaslist_window.passive
if passive != nil and !@eqpaslist_window.enabled_passive?(passive)
Sound.play_buzzer
return
end
Sound.play_equip
slot = @equippas_window.index - @equippas_window.auto_size
passive = 0 if passive == nil or passive == @equippas_window.passive
last_hp = @actor.maxhp
last_mp = @actor.maxmp
@actor.equip_passive(passive, slot)
@actor.hp += @actor.maxhp - last_hp
@actor.mp += @actor.maxmp - last_mp
@equippas_window.active = true
@equippas_window.y = @help_window.height + @stapas_window.height
@eqpaslist_window.active = false
@eqpaslist_window.y = 416*3
refresh_windows
@equippas_window.refresh
@stapas_window.refresh
@eqpasstat_window.refresh
@equippas_window.update_help
elsif Input.trigger?(Input::X)
Sound.play_equip
slot = @equippas_window.index - @equippas_window.auto_size
passive = 0
last_hp = @actor.maxhp
last_mp = @actor.maxmp
@actor.equip_passive(passive, slot)
@actor.hp += @actor.maxhp - last_hp
@actor.mp += @actor.maxmp - last_mp
@equippas_window.active = true
@equippas_window.y = @help_window.height + @stapas_window.height
@eqpaslist_window.active = false
@eqpaslist_window.y = 416*3
refresh_windows
@equippas_window.refresh
@stapas_window.refresh
@eqpasstat_window.refresh
@equippas_window.update_help
end
end

#--------------------------------------------------------------------------
# start_learn_passives
#--------------------------------------------------------------------------
def start_learn_passives
@learnpas_window.y = @help_window.height + @stapas_window.height
@learnpas_window.active = true
@lepasdata_window.y = @help_window.height + @stapas_window.height
@lepasdata_window.refresh(@learnpas_window.passive, @stapas_window.class)
end

#--------------------------------------------------------------------------
# update_learnpassive_selection
#--------------------------------------------------------------------------
def update_learnpassive_selection
@learnpas_window.update
if @last_learn_index != @learnpas_window.index
@last_learn_index = @learnpas_window.index
@lepasdata_window.refresh(@learnpas_window.passive, @stapas_window.class)
end
if Input.trigger?(Input::B)
Sound.play_cancel
if @class_window != nil
@class_window.y = @learnpas_window.y
@class_window.active = true
@class_window.update_help
@clpasdata_window.y = @class_window.y
@learnpas_window.active = false
@learnpas_window.y = 416*3
@lepasdata_window.y = 416*3
else
@learnpas_window.active = false
@command_window.active = true
end
elsif $TEST and Input.repeat?(Input::F8) # Debug JP Increase
Sound.play_equip
value = YEZ::JOB::DEFAULT_PASSIVE_JP_COST * 10
value *= 10 if Input.press?(Input::SHIFT)
@actor.gain_jp(value + rand(value), @stapas_window.class)
@stapas_window.refresh
@equippas_window.refresh if @equippas_window != nil
@lepasdata_window.refresh(@learnpas_window.passive, @stapas_window.class)
@class_window.refresh if @class_window != nil
@learnpas_window.refresh
elsif $TEST and Input.repeat?(Input::F7) # Debug JP Decrease
Sound.play_equip
value = YEZ::JOB::DEFAULT_PASSIVE_JP_COST * 10
value *= 10 if Input.press?(Input::SHIFT)
@actor.lose_jp(value + rand(value), @stapas_window.class)
@stapas_window.refresh
@equippas_window.refresh if @equippas_window != nil
@lepasdata_window.refresh(@learnpas_window.passive, @stapas_window.class)
@class_window.refresh if @class_window != nil
@learnpas_window.refresh
elsif $TEST and Input.repeat?(Input::F5) # Debug Force Learn
passive = @learnpas_window.passive
return if passive == nil
YEZ::JOB::LEARN_SOUND.play
@actor.learn_passive(passive)
@stapas_window.refresh
@learnpas_window.refresh
@equippas_window.refresh if @equippas_window != nil
@lepasdata_window.refresh(passive, @stapas_window.class)
@clpasdata_window.refresh(@class_window.class) if @clpasdata_window != nil
elsif Input.trigger?(Input::C)
passive = @learnpas_window.passive
if passive == nil or !@learnpas_window.enabled_state?(passive)
Sound.play_buzzer
return
end
YEZ::JOB::LEARN_SOUND.play
@actor.learn_passive(passive)
@actor.lose_jp(passive.jp_cost, @stapas_window.class)
@stapas_window.refresh
@learnpas_window.refresh
@equippas_window.refresh if @equippas_window != nil
@lepasdata_window.refresh(passive, @stapas_window.class)
@clpasdata_window.refresh(@class_window.class) if @clpasdata_window != nil
end
end

end # Scene_Skill

#===============================================================================
# Window_Command_Centered
#===============================================================================

class Window_Command_Centered < Window_Command

#--------------------------------------------------------------------------
# draw_item
#--------------------------------------------------------------------------
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index], 1)
end

end # Window_Command_Centered

#===============================================================================
# Window_Skill_Actor
#===============================================================================

class Window_Skill_Actor < Window_Base

#--------------------------------------------------------------------------
# initialize
#--------------------------------------------------------------------------
def initialize(actor)
super(160, 0, 384, 128)
@actor = actor
refresh
end

#--------------------------------------------------------------------------
# refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_face(@actor, 0, 0, size = 96)
x = 104
y = WLH / 2
draw_actor_name(@actor, x, y)
draw_actor_class(@actor, x + 120, y)
draw_actor_level(@actor, x, y + WLH * 1)
draw_actor_state(@actor, x, y + WLH * 2)
draw_actor_hp(@actor, x + 120, y + WLH * 1)
draw_actor_mp(@actor, x + 120, y + WLH * 2)
end

end # Window_Skill_Actor

#===============================================================================
#
# END OF FILE
#
#===============================================================================
avatar
Andrés Vasconcellos
Iniciado
Iniciado

0/3

Créditos 25

Gracias : 2

Volver arriba Ir abajo

RPG Maker VX Re: Problema incompatible de KGC_HelpExtension

Mensaje por Andrés Vasconcellos el 2013-09-20, 19:59

En principio ese es el script de YEZ que hace incompatible, tengo otros más pero no creo que sean el problema.
avatar
Andrés Vasconcellos
Iniciado
Iniciado

0/3

Créditos 25

Gracias : 2

Volver arriba Ir abajo

RPG Maker VX Re: Problema incompatible de KGC_HelpExtension

Mensaje por orochii el 2013-09-20, 21:59

Ok, es bastante simple, busca esta línea
Código:
@status_window.y = @help_window.height
Reemplázala por esto:
Código:
@status_window.y = 0 #@help_window.height
Y listo xd,
Orochii Zouveleki
avatar
orochii
Reportero

0/3

Créditos 7722

Gracias : 436

Volver arriba Ir abajo

RPG Maker VX Un error más...

Mensaje por Andrés Vasconcellos el 2013-09-21, 00:41

Se ha solucionado, MUCHAS gracias.
Tengo otro problema...


Última edición por Andrés Vasconcellos el 2013-09-21, 21:19, editado 4 veces
avatar
Andrés Vasconcellos
Iniciado
Iniciado

0/3

Créditos 25

Gracias : 2

Volver arriba Ir abajo

RPG Maker VX Ventana a la izquierda, debería estar centrada y abajo.

Mensaje por Andrés Vasconcellos el 2013-09-21, 00:44

Ahora el script YEZ Skill Comand Selection:
# If you would like the command window to have centered alignment for text,
# set this to true. Otherwise, setting it to false will have left alignment.
CENTERED_COMMAND = true

Ponga "true" o ponga "false" la ventana siempre se muestra a la izquierda, si quito el script de KGC_HelpExtension se muestra correctamente, centrado.

¿Existe una solución para esto?
avatar
Andrés Vasconcellos
Iniciado
Iniciado

0/3

Créditos 25

Gracias : 2

Volver arriba Ir abajo

RPG Maker VX Re: Problema incompatible de KGC_HelpExtension

Mensaje por Andrés Vasconcellos el 2013-09-21, 22:28

avatar
Andrés Vasconcellos
Iniciado
Iniciado

0/3

Créditos 25

Gracias : 2

Volver arriba Ir abajo

RPG Maker VX Re: Problema incompatible de KGC_HelpExtension

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Ver el tema anterior Ver el tema siguiente Volver arriba


Permisos de este foro:
No puedes responder a temas en este foro.