|
|||||||
| RPG Maker Si tienes dudas o quieres compartir con nosotros tu juego, adelante, este es tu foro |
![]() |
|
|
LinkBack | Herramientas |
|
||||
|
Bueno esta es la Recopilación de Scripts del RPG Maker XP y VX, donde segun vaya encontrando Scrips de ambos, los ire colgando.
Que quede una cosa bien clara. Y mas para los N00b Novatos. en esta seccion del foro: Yo no resuelvo dudas i/o consigo pedidos, ya que para eso se creo las secciones > Indice + Zona RPG Maker XP Deluxe, Zona de pedidos de recursos RPG Maker XP Deluxe y la Zona de pedidos tutoriales RPG Maker XP, para ese tipo de cosas Y como ultima cosa, yo no me reponsabilizo del mal uso que haga de/los Script, frente a sus proyectos, que para eso estan los respaldos ![]() Recopilacion de Scrips RPG MAKER XP Recopilacion de utilidades (aveces) necesarias para el RPG Maker XP. Spoiler para -:
AntiHack del RPG Maker Xp
Spoiler para :
#================================================= =============================
# ** TDS Anti Hack #------------------------------------------------------------------------------ # Defines a different variable for some testing purposes. #================================================= ============================= # Variable Name ANTI_HACK_VARIABLE = true #================================================= ============================= # ** Scene_Map #------------------------------------------------------------------------------ # This class performs map screen processing. #================================================= ============================= class Scene_Map #-------------------------------------------------------------------------- # * Debug Call #-------------------------------------------------------------------------- def call_debug # Clear debug call flag $game_temp.debug_calling = false if ANTI_HACK_VARIABLE == false # Play decision SE $game_system.se_play($data_system.decision_se) # Straighten player position $game_player.straighten # Switch to debug screen $scene = Scene_Debug.new end end end #================================================= ============================= # ** Game_Player #------------------------------------------------------------------------------ # This class handles the player. Its functions include event starting # determinants and map scrolling. Refer to "$game_player" for the one # instance of this class. #================================================= ============================= class Game_Player < Game_Character #-------------------------------------------------------------------------- # * Passable Determinants # x : x-coordinate # y : y-coordinate # d : direction (0,2,4,6,8) # * 0 = Determines if all directions are impassable (for jumping) #-------------------------------------------------------------------------- alias tds_anti_hack_passable? passable? def passable?(x, y, d) tds_anti_hack_passable?(x, y, d) # Get new coordinates new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0) new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0) # If coordinates are outside of map unless $game_map.valid?(new_x, new_y) # Impassable return false end # If debug mode is ON and ctrl key was pressed if $DEBUG and Input.press?(Input::CTRL) # Passable return true if ANTI_HACK_VARIABLE == false end super end end KGC_ItemGrouping, Por: KGC Spoiler para :
Este pequeño script debe ser usado junto a otros scripts creados por KGC (KGC_LimitBreaks, KGC_SkillGrouping, etc.).
Solo creen clase nueva arriba de Main y peguen esto: Código:
module KGC
$game_special_elements = {}
$imported = {}
$data_states = load_data("Data/States.rxdata")
$data_system = load_data("Data/System.rxdata")
end
Todos los scripts creados por KGC ponerlos debajo de este, sino no funcionan adecuadamente. Creditos: xXDarkDragonXx Scripts de Sistema Spoiler para -:
Accesorios x3
Spoiler para -:
Ponedlo arriba del main, ponedle cualquier nombre e introducid esto dentro:
Código:
#====================================
# Accessoire en plus
# Script téléchargé sur RPG-creation - www.rpg-creation.com
#====================================
module XRXS_MP8_Fixed_Valuables
EQUIP_KINDS = [1, 2, 3, 4, 4, 4]
EQUIP_KIND_NAMES = []
WINDOWS_STRETCH = true
STATUS_WINDOW_ARRANGE = true
STATUS_WINDOW_EX_EQUIP_ROW_SIZE = 24
STATUS_WINDOW_EX_EQUIP_X = 336
STATUS_WINDOW_EX_EQUIP_Y = 256
end
#====================================
# ¡ Game_Actor
#====================================
class Game_Actor < Game_Battler
#--------------------------------
# Â? ?C???N??Â[?h
#--------------------------------
include XRXS_MP8_Fixed_Valuables
#--------------------------------
# Â? ?ö?J?C???X?^???X?ÃÂ?
#--------------------------------
attr_reader :armor_ids
#--------------------------------
# Â? ?Z?b?g?A?b?v
#--------------------------------
alias xrxs_mp8_setup setup
def setup(actor_id)
xrxs_mp8_setup(actor_id)
@armor_ids = []
# ?g?£Â?—Â
for i in 4...EQUIP_KINDS.size
@armor_ids[i+1] = 0
end
end
#--------------------------------
# � ?î–{?r—�Ì?æ?¾
#--------------------------------
alias xrxs_mp8_base_str base_str
def base_str
n = xrxs_mp8_base_str
for i in 4...EQUIP_KINDS.size
armor = $data_armors[@armor_ids[i+1]]
n += armor != nil ? armor.str_plus : 0
end
return n
end
#--------------------------------
# Â? ?î–{?Ã*—p?³?ÃŒ?æ?¾
#--------------------------------
alias xrxs_mp8_base_dex base_dex
def base_dex
n = xrxs_mp8_base_dex
for i in 4...EQUIP_KINDS.size
armor = $data_armors[@armor_ids[i+1]]
n += armor != nil ? armor.dex_plus : 0
end
return n
end
#--------------------------------
# � ?î–{?f?�³?Ì?æ?¾
#--------------------------------
alias xrxs_mp8_base_agi base_agi
def base_agi
n = xrxs_mp8_base_agi
for i in 4...EQUIP_KINDS.size
armor = $data_armors[@armor_ids[i+1]]
n += armor != nil ? armor.agi_plus : 0
end
return n
end
#--------------------------------
# � ?î–{–?—�Ì?æ?¾
#--------------------------------
alias xrxs_mp8_base_int base_int
def base_int
n = xrxs_mp8_base_int
for i in 4...EQUIP_KINDS.size
armor = $data_armors[@armor_ids[i+1]]
n += armor != nil ? armor.int_plus : 0
end
return n
end
#--------------------------------
# Â? ?î–{?¨—–h?ä?ÃŒ?æ?¾
#--------------------------------
alias xrxs_mp8_base_pdef base_pdef
def base_pdef
n = xrxs_mp8_base_pdef
for i in 4...EQUIP_KINDS.size
armor = $data_armors[@armor_ids[i+1]]
n += armor != nil ? armor.pdef : 0
end
return n
end
#--------------------------------
# � ?î–{–?–@–h?ä?Ì?æ?¾
#--------------------------------
alias xrxs_mp8_base_mdef base_mdef
def base_mdef
n = xrxs_mp8_base_mdef
for i in 4...EQUIP_KINDS.size
armor = $data_armors[@armor_ids[i+1]]
n += armor != nil ? armor.mdef : 0
end
return n
end
#--------------------------------
# Â? ?î–{?ñ?ðÂC³?ÃŒ?æ?¾
#--------------------------------
alias xrxs_mp8_base_eva base_eva
def base_eva
n = xrxs_mp8_base_eva
for i in 4...EQUIP_KINDS.size
armor = $data_armors[@armor_ids[i+1]]
n += armor != nil ? armor.eva : 0
end
return n
end
#--------------------------------
# Â? ???õ?ÃŒ?ÃÂX
# equip_type : ???õ?^?C?v
# id : ?Â?Ã* or –h?ï ID (0 ?È?ç???õ?ðÂ?)
#--------------------------------
alias xrxs_mp8_equip equip
def equip(equip_type, id)
xrxs_mp8_equip(equip_type, id)
if equip_type >= 5
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor_ids[equip_type]], $data_armors[id])
$game_party.gain_armor(@armor_ids[equip_type], 1)
@armor_ids[equip_type] = id
$game_party.lose_armor(id, 1)
end
end
end
end
#====================================
# ¡ Window_EquipRight
#====================================
class Window_EquipRight < Window_Selectable
#--------------------------------
# Â? ?C???N??Â[?h
#--------------------------------
include XRXS_MP8_Fixed_Valuables
#--------------------------------
# � ?I?u?W?F?N?g�?ú?»
# actor : ?A?N?^Â[
#--------------------------------
if WINDOWS_STRETCH
def initialize(actor)
super(272, 64, 368, 192)
h = (EQUIP_KINDS.size + 1) * 32
self.contents = Bitmap.new(width - 32, h)
@actor = actor
refresh
self.index = 0
end
end
#--------------------------------
# Â? ???t???b?V??
#--------------------------------
alias xrxs_mp8_refresh refresh
def refresh
xrxs_mp8_refresh
@item_max = EQUIP_KINDS.size + 1
for i in 4...EQUIP_KINDS.size
@data.push($data_armors[@actor.armor_ids[i+1]])
self.contents.font.color = system_color
self.contents.draw_text(5, 32 * (i+1), 92, 32, EQUIP_KIND_NAMES[i-4].to_s)
draw_item_name(@data[i+1], 92, 32 * (i+1))
end
end
end
#====================================
# ¡ Window_EquipItem
#====================================
class Window_EquipItem < Window_Selectable
#--------------------------------
# Â? ???õ?Ã*??ÃŒÂÃ?è
#--------------------------------
def equip_type=(et)
@equip_type = et
refresh
end
#--------------------------------
# Â? ???t???b?V??
#--------------------------------
alias xrxs_mp8_refresh refresh
def refresh
xrxs_mp8_refresh
if @equip_type >= 5
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
type = $data_armors[i].kind + 1
if !@equip_type.to_s.scan(/#{type}/).empty?
@data.push($data_armors[i])
end
end
end
@data.push(nil)
@item_max = @data.size
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max-1
draw_item(i)
end
end
end
end
#====================================
# ¡ Window_Status
#====================================
class Window_Status < Window_Base
#--------------------------------
# Â? ?C???N??Â[?h
#--------------------------------
include XRXS_MP8_Fixed_Valuables
#--------------------------------
# ?J?X?^?}?C?Y?|?C???gÂu?X?eÂ[?^?X?æ–?ÃŒ?f?U?C???ð?ÃÂX?·?éÂv
#--------------------------------
if STATUS_WINDOW_ARRANGE
def refresh
self.contents.clear
draw_actor_graphic(@actor, 40, 112)
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 4 + 144, 0)
draw_actor_level(@actor, 96, 32)
draw_actor_state(@actor, 96, 64)
draw_actor_hp(@actor, 96, 112, 172)
draw_actor_sp(@actor, 96, 144, 172)
draw_actor_parameter(@actor, 96, 192, 0)
draw_actor_parameter(@actor, 96, 224, 1)
draw_actor_parameter(@actor, 96, 256, 2)
draw_actor_parameter(@actor, 96, 304, 3)
draw_actor_parameter(@actor, 96, 336, 4)
draw_actor_parameter(@actor, 96, 368, 5)
draw_actor_parameter(@actor, 96, 400, 6)
self.contents.font.color = system_color
self.contents.draw_text(320, 48, 80, 32, "EXP")
self.contents.draw_text(320, 80, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(320, 112, 96, 32, "Equipement")
draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 136)
draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 160)
draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 184)
draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 208)
draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 232)
end
end
#--------------------------------
# Â? ???t???b?V??
#--------------------------------
alias xrxs_mp8_refresh refresh
def refresh
xrxs_mp8_refresh
# ?g?£Â?—Â
for i in 4...EQUIP_KINDS.size
armor = $data_armors[@actor.armor_ids[i+1]]
draw_item_name($data_armors[@actor.armor_ids[i+1]], STATUS_WINDOW_EX_EQUIP_X, STATUS_WINDOW_EX_EQUIP_Y + STATUS_WINDOW_EX_EQUIP_ROW_SIZE * (i-4))
end
end
end
#====================================
# ¡ Scene_Equip
#====================================
class Scene_Equip
#--------------------------------
# Â? ?C???N??Â[?h
#--------------------------------
include XRXS_MP8_Fixed_Valuables
#--------------------------------
# Â? ?Â?C??Â?—Â
#--------------------------------
alias xrxs_mp8_main main
def main
@addition_initialize_done = false
xrxs_mp8_main
for i in 4...EQUIP_KINDS.size
@item_windows[i+2].dispose
end
end
#--------------------------------
# Â? ???t???b?V??
#--------------------------------
alias xrxs_mp8_refresh refresh
def refresh
unless @addition_initialize_done
@item_windows = []
@item_window2.equip_type = EQUIP_KINDS[0]
@item_window3.equip_type = EQUIP_KINDS[1]
@item_window4.equip_type = EQUIP_KINDS[2]
@item_window5.equip_type = EQUIP_KINDS[3]
for i in 4...EQUIP_KINDS.size
@item_windows[i+2] = Window_EquipItem.new(@actor, EQUIP_KINDS[i])
@item_windows[i+2].help_window = @help_window
end
if WINDOWS_STRETCH
@right_window.height = (EQUIP_KINDS.size + 2) * 32
if @left_window.y + @left_window.height == 256
@left_window.height = @right_window.height
end
y_pos = (@right_window.y + @right_window.height)
y_space = 480 - y_pos
@item_window1.y = y_pos
@item_window2.y = y_pos
@item_window3.y = y_pos
@item_window4.y = y_pos
@item_window5.y = y_pos
@item_window1.height = y_space
@item_window2.height = y_space
@item_window3.height = y_space
@item_window4.height = y_space
@item_window5.height = y_space
for i in 4...EQUIP_KINDS.size
@item_windows[i+2].y = y_pos
@item_windows[i+2].height = y_space
end
end
@addition_initialize_done = true
end
for i in 4...EQUIP_KINDS.size
@item_windows[i+2].visible = (@right_window.index == i+1)
end
if @right_window.index >= 5
@item_window = @item_windows[@right_window.index + 1]
end
xrxs_mp8_refresh
end
#--------------------------------
# Â? ?t??Â[??ÂXÂV (?A?C?e???E?B???h?E?ª?A?N?e?B?u?ÃŒÂêÂ?)
#--------------------------------
alias xrxs_mp8_update_item update_item
def update_item
xrxs_mp8_update_item
if Input.trigger?(Input::C)
@item_window1.refresh
@item_window2.refresh
@item_window3.refresh
@item_window4.refresh
@item_window5.refresh
for i in 4...EQUIP_KINDS.size
@item_windows[i+2].refresh
end
Graphics.frame_reset
return
end
end
end
Creditos: www.rpg-creation.com Afinidad Elemental Spoiler para -:
Descripcción.
Este script permite usar varias funciones elementales, como subir el daño que causas por elemento, o lo que cuesta usar una habilidad de ese elemento. También incluye elementos opuestos. Script: Código:
#--------------------------------------------------------------------------
# Element Affinity
# Script by Fomar0153
#--------------------------------------------------------------------------
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# Constantes
#--------------------------------------------------------------------------
Elements = [
{'name'=>'Fire', 'id'=>1, 'opp'=>'Ice'},
{'name'=>'Ice', 'id'=>2, 'opp'=>'Fire'},
{'name'=>'Thunder', 'id'=>3, 'opp'=>'Water'},
{'name'=>'Water', 'id'=>4, 'opp'=>'Thunder'},
{'name'=>'Earth', 'id'=>5, 'opp'=>'Wind'},
{'name'=>'Wind', 'id'=>6, 'opp'=>'Earth'},
{'name'=>'Light', 'id'=>7, 'opp'=>'Darkness'},
{'name'=>'Darkness', 'id'=>8, 'opp'=>'Light'}
]
# El máximo de afinidad con un elemento
Max_Affinity = 1000
# El mÃ*nimo de afinidad con un elemento
Min_Affinity = -1000
# La afinidad que ganas al usar un elemento
Element_Usage = 1
# Cuanta afinidad pierde con el elemento opuesto
Opposite_Cost = 1
# La afinidad que se pierde con los demás elementos
All_Cost = 0
# La afinidad que necesitas con un elemento para que el hechizo cueste la mitad
# Nota: 0 significa que la función no ocurre
Half_Spell_Cost = 250
# La afinidad que necesitas con un elemento para que el hechizo cueste un cuarto
# Nota: 0 significa que la función no ocurre
Quarter_Spell_Cost = 750
# La afinidad que necesitas con un elemento para causar doble daño
# Nota: 0 significa que la función no ocurre
Double_Spell_Damage = 500
# La afinidad que necesitas con un elemento para causar daño cuádruple
# Nota: 0 significa que la función no ocurre
Quad_Spell_Damage = 1000
# La afinidad hasta la que la habilidad cuesta el doble
# Nota: 0 significa que la función no ocurre
Double_Spell_Cost = -250
# La afinidad hasta la que la habilidad cuesta el cuádruple
# Nota: 0 significa que la función no ocurre
Quad_Spell_Cost = -750
# La afinidad hasta la que la habilidad causa la mitad de daño
# Nota: 0 significa que la función no ocurre
Half_Spell_Damage = -500
# La afinidad hasta la que la habilidad causa un cuarto del daño
# Nota: 0 significa que la función no ocurre
Quarter_Spell_Damage = -1000
# Si está en true tu afinidad afectará positivamente a tu resistencia elemental (> 0)
Affect_Resistences_Pos = true
# Si está en true tu afinidad afectará negativamente a tu resistencia elemental (< 0)
Affect_Resistences_Neg = true
#--------------------------------------------------------------------------
# Fin de las Constantes
#--------------------------------------------------------------------------
alias old_setup setup
def setup(actor_id)
old_setup(actor_id)
@element_affinity = []
for i in 0...Elements.size
@element_affinity.push(0)
end
end
def is_element?(element)
for i in 0...Elements.size
hash = Elements[i]
if hash['id'] == element
return true
end
end
return false
end
def element_affinity_adjust(element)
if is_element?(element)
for i in 0...Elements.size
hash = Elements[i]
if hash['id'] == element
k = i
opp_name = hash['opp']
end
end
for i in 0...Elements.size
hash = Elements[i]
if hash['name'] = opp_name
j = i
end
end
if @element_affinity[k] < Max_Affinity
@element_affinity[k] += Element_Usage
end
if @element_affinity[k] > Max_Affinity
@element_affinity[k] = Element_Usage
end
if @element_affinity[j] > Min_Affinity
@element_affinity[j] -= Opposite_Cost
end
if @element_affinity[j] < Min_Affinity
@element_affinity[j] = Opposite_Cost
end
unless All_Cost == 0
for i in 0...Elements.size
Elements[i] -= All_Cost
end
Elements[k] += All_Cost
Elements[j] += All_Cost
end
end
end
def affinity(element)
if is_element?(element)
for i in 0...Elements.size
hash = Elements[i]
if hash['id'] == element
return @element_affinity[i]
end
end
end
return 0
end
def element_rate(element_id)
# Da los valores correspondientes a la efectividad de cada elemento
table = [0,200,150,100,50,0,-100]
result = table[$data_classes[@class_id].element_ranks[element_id]]
# Por cada 1% de afinidad máxima consigues +2 de Resistencia
# lo que significa que al 50% no recibes daño, y al 100%
# absorbes el daño (asumiendo que empiezas en C (100)
if is_element?(element_id)
x = affinity(element_id)
x /= Max_Affinity
x *= 200
if x > 0 and Affect_Resistences_Pos == true
result -= x
end
if x < 0 and Affect_Resistences_Neg == true
result -= x/2
end
end
# Si el elemento se proteje con armadura, se reduce a la mitad
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
if armor != nil and armor.guard_element_set.include?(element_id)
result /= 2
end
end
# Si el elemento se proteje con estado, se reduce a la mitad
for i in @states
if $data_states[i].guard_element_set.include?(element_id)
result /= 2
end
end
# Fin del Método
return result
end
def half_spell_cost_is
return Half_Spell_Cost
end
def quarter_spell_cost_is
return Quarter_Spell_Cost
end
def double_spell_damage_is
return Double_Spell_Damage
end
def quad_spell_damage_is
return Quad_Spell_Damage
end
def double_spell_cost_is
return Double_Spell_Cost
end
def quad_spell_cost_is
return Quad_Spell_Cost
end
def half_spell_damage_is
return Half_Spell_Damage
end
def quarter_spell_damage_is
return Quarter_Spell_Damage
end
def is_actor?
return true
end
end
class Game_Enemy < Game_Battler
def is_actor?
return false
end
end
class Game_Battler
def skill_effect(user, skill)
# Clear critical flag
self.critical = false
# If skill scope is for ally with 1 or more HP, and your own HP = 0,
# or skill scope is for ally with 0, and your own HP = 1 or more
if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
# End Method
return false
end
# Clear effective flag
effective = false
# Set effective flag if common ID is effective
effective |= skill.common_event_id > 0
# First hit detection
hit = skill.hit
if skill.atk_f > 0
hit *= user.hit / 100
end
hit_result = (rand(100) < hit)
# Set effective flag if skill is uncertain
effective |= hit < 100
# If hit occurs
if hit_result == true
# Calculate power
power = skill.power + user.atk * skill.atk_f / 100
if power > 0
power -= self.pdef * skill.pdef_f / 200
power -= self.mdef * skill.mdef_f / 200
power = [power, 0].max
end
# Calculate rate
rate = 20
rate += (user.str * skill.str_f / 100)
rate += (user.dex * skill.dex_f / 100)
rate += (user.agi * skill.agi_f / 100)
rate += (user.int * skill.int_f / 100)
# For you merging this only the code in this method that is new
if user.is_actor? and skill.element_set != []
for i in skill.element_set
affinity = user.affinity(i)
if affinity >= user.double_spell_damage_is and user.double_spell_damage_is != 0
rate *= 2
end
if affinity >= user.quad_spell_damage_is and user.quad_spell_damage_is != 0
rate *= 2
end
if affinity <= user.half_spell_damage_is and user.half_spell_damage_is != 0
rate /= 2
end
if affinity <= user.quarter_spell_damage_is and user.quarter_spell_damage_is != 0
rate /= 2
end
end
end
# Calculate basic damage
self.damage = power * rate / 20
# Element correction
self.damage *= elements_correct(skill.element_set)
self.damage /= 100
# If damage value is strictly positive
if self.damage > 0
# Guard correction
if self.guarding?
self.damage /= 2
end
end
# Dispersion
if skill.variance > 0 and self.damage.abs > 0
amp = [self.damage.abs * skill.variance / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# Second hit detection
eva = 8 * self.agi / user.dex + self.eva
hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
# Set effective flag if skill is uncertain
effective |= hit < 100
end
# If hit occurs
if hit_result == true
# If physical attack has power other than 0
if skill.power != 0 and skill.atk_f > 0
# State Removed by Shock
remove_states_shock
# Set to effective flag
effective = true
end
# Substract damage from HP
last_hp = self.hp
self.hp -= self.damage
effective |= self.hp != last_hp
# State change
@state_changed = false
effective |= states_plus(skill.plus_state_set)
effective |= states_minus(skill.minus_state_set)
# If power is 0
if skill.power == 0
# Set damage to an empty string
self.damage = ""
# If state is unchanged
unless @state_changed
# Set damage to "Miss"
self.damage = "Fallo"
end
end
# If miss occurs
else
# Set damage to "Miss"
self.damage = "Fallo"
end
# If not in battle
unless $game_temp.in_battle
# Set damage to nil
self.damage = nil
end
# End Method
return effective
end
end
class Window_Skill < Window_Selectable
def draw_item(index)
skill = @data[index]
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
sp_cost = skill.sp_cost
unless skill.element_set == []
for i in skill.element_set
affinity = @actor.affinity(i)
if affinity >= @actor.half_spell_cost_is and @actor.half_spell_cost_is != 0
sp_cost /= 2
end
if affinity >= @actor.quarter_spell_cost_is and @actor.quarter_spell_cost_is != 0
sp_cost /= 2
end
if affinity <= @actor.double_spell_cost_is and @actor.double_spell_cost_is != 0
sp_cost *= 2
end
if affinity <= @actor.quad_spell_cost_is and @actor.quad_spell_cost_is != 0
sp_cost *= 2
end
end
end
self.contents.draw_text(x + 232, y, 48, 32, sp_cost.to_s, 2)
end
end
class Scene_Battle
def make_skill_action_result
# Get skill
@skill = $data_skills[@active_battler.current_action.skill_id]
# If not a forcing action
unless @active_battler.current_action.forcing
# If unable to use due to SP running out
unless @active_battler.skill_can_use?(@skill.id)
# Clear battler being forced into action
$game_temp.forcing_battler = nil
# Shift to step 1
@phase4_step = 1
return
end
end
# Use up SP
sp_cost = @skill.sp_cost
if @active_battler.is_actor? and @skill.element_set != []
for i in @skill.element_set
affinity = @active_battler.affinity(i)
if affinity >= @active_battler.half_spell_cost_is and @active_battler.half_spell_cost_is != 0
sp_cost /= 2
end
if affinity >= @active_battler.quarter_spell_cost_is and @active_battler.quarter_spell_cost_is != 0
sp_cost /= 2
end
if affinity <= @active_battler.double_spell_cost_is and @active_battler.double_spell_cost_is != 0
sp_cost *= 2
end
if affinity <= @active_battler.quad_spell_cost_is and @active_battler.quad_spell_cost_is != 0
sp_cost *= 2
end
end
end
@active_battler.sp -= sp_cost
# Refresh status window
@status_window.refresh
# Show skill name on help window
@help_window.set_text(@skill.name, 1)
# Set animation ID
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# Set command event ID
@common_event_id = @skill.common_event_id
# Set target battlers
set_target_battlers(@skill.scope)
# Apply skill effect
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
if @active_battler.is_actor? and @skill.element_set != []
for i in @skill.element_set
@active_battler.element_affinity_adjust(i)
end
end
end
end
Pega este script debajo de la parte principal del otro script. Código:
class Game_Battler
def skill_effect(user, skill)
# クリティカルフラグをクリア
self.critical[user] = false
state_p[user] = []
state_m[user] = []
# スキルの効果範囲が HP 1 以上の味方で、自分の HP が 0、
# またはスキルの効果範囲が HP 0 の味方で、自分の HP が 1 以上の場合
if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
# メソッド終了
return false
end
# 有効フラグをクリア
effective = false
# コモンイベント ID が有効の場合は有効フラグをセット
effective |= skill.common_event_id > 0
# 第一命中判定
hit = skill.hit
if skill.atk_f > 0
hit *= user.hit / 100
end
hit_result = (rand(100) < hit)
# 不確実なスキルの場合は有効フラグをセット
effective |= hit < 100
# 命中の場合
if hit_result == true
# 威力を計算
power = skill.power + user.atk * skill.atk_f / 100
if power > 0
power -= self.pdef * skill.pdef_f / 200
power -= self.mdef * skill.mdef_f / 200
power = [power, 0].max
end
# 倍率を計算
rate = 20
rate += (user.str * skill.str_f / 100)
rate += (user.dex * skill.dex_f / 100)
rate += (user.agi * skill.agi_f / 100)
rate += (user.int * skill.int_f / 100)
if user.is_actor? and skill.element_set != []
for i in skill.element_set
affinity = user.affinity(i)
if affinity >= user.double_spell_damage_is and user.double_spell_damage_is != 0
rate *= 2
end
if affinity >= user.quad_spell_damage_is and user.quad_spell_damage_is != 0
rate *= 2
end
if affinity <= user.half_spell_damage_is and user.half_spell_damage_is != 0
rate /= 2
end
if affinity <= user.quarter_spell_damage_is and user.quarter_spell_damage_is != 0
rate /= 2
end
end
end
# 基本ダメージを計算
self.damage[user] = power * rate / 20
# 属性修正
self.damage[user] *= elements_correct(skill.element_set)
self.damage[user] /= 100
# ダメージの符号が正の場合
if self.damage[user] > 0
# 防御修正
if self.guarding?
self.damage[user] /= 2
end
end
# 分散
if skill.variance > 0 and self.damage[user].abs > 0
amp = [self.damage[user].abs * skill.variance / 100, 1].max
self.damage[user] += rand(amp+1) + rand(amp+1) - amp
end
# 第二命中判定
eva = 8 * self.agi / user.dex + self.eva
hit = self.damage[user] < 0 ? 100 : 100 - eva * skill.eva_f / 100
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
# 不確実なスキルの場合は有効フラグをセット
effective |= hit < 100
end
# 命中の場合
if hit_result == true
# 威力 0 以外の物理攻撃の場合
if skill.power != 0 and skill.atk_f > 0
# ステート衝撃解除
remove_states_shock
# 有効フラグをセット
effective = true
end
# HP の変動判定
last_hp = [[self.hp - self.damage[user], self.maxhp].min, 0].max
# 効果判定
effective |= self.hp != last_hp
# ステート変化
@state_changed = false
effective |= states_plus(user, skill.plus_state_set)
effective |= states_minus(user, skill.minus_state_set)
unless $game_temp.in_battle
self.damage_effect(user, 1)
end
# 威力が 0 の場合
if skill.power == 0
# ダメージに空文字列を設定
self.damage[user] = ""
# ステートに変化がない場合
unless @state_changed
# ダメージに "Miss" を設定
self.damage[user] = "Fallo"
end
end
# ミスの場合
else
# ダメージに "Miss" を設定
self.damage[user] = "Fallo"
end
# 戦闘中でない場合
unless $game_temp.in_battle
# ダメージに nil を設定
self.damage[user] = nil
end
# メソッド終了
return effective
end
end
class Scene_Battle
def make_skill_action_result(battler)
# スキルを取得
@skill = $data_skills[battler.current_action.skill_id]
# 連携スキルであるかどうか確認
speller = synthe?(battler)
# 強制アクションでなければ
unless battler.current_action.forcing
# SP 切れなどで使用できなくなった場合
if speller == nil
unless battler.skill_can_use?(@skill.id)
# ステップ 6 に移行
battler.phase = 6
return
end
end
end
# SP 消費
temp = false
if speller != nil
for spell in speller
if spell.current_action.spell_id == 0
sp_cost = @skill.sp_cost
if spell.is_actor? and @skill.element_set != []
for i in @skill.element_set
affinity = spell.affinity(i)
if affinity >= spell.half_spell_cost_is and spell.half_spell_cost_is != 0
sp_cost /= 2
end
if affinity >= spell.quarter_spell_cost_is and spell.quarter_spell_cost_is != 0
sp_cost /= 2
end
if affinity <= spell.double_spell_cost_is and spell.double_spell_cost_is != 0
sp_cost *= 2
end
if affinity <= spell.quad_spell_cost_is and spell.quad_spell_cost_is != 0
sp_cost *= 2
end
end
end
spell.sp -= sp_cost
else
sp_cost = $data_skills[spell.current_action.spell_id].sp_cost
if spell.is_actor? and $data_skills[spell.current_action.spell_id].element_set != []
for i in $data_skills[spell.current_action.spell_id].element_set
affinity = spell.affinity(i)
if affinity >= spell.half_spell_cost_is and spell.half_spell_cost_is != 0
sp_cost /= 2
end
if affinity >= spell.quarter_spell_cost_is and spell.quarter_spell_cost_is != 0
sp_cost /= 2
end
if affinity <= spell.double_spell_cost_is and spell.double_spell_cost_is != 0
sp_cost *= 2
end
if affinity <= spell.quad_spell_cost_is and spell.quad_spell_cost_is != 0
sp_cost *= 2
end
end
end
spell.sp -= sp_cost
end
# ステータスウィンドウをリフレッシュ
status_refresh(spell)
end
else
battler.sp -= @skill.sp_cost
# ステータスウィンドウをリフレッシュ
status_refresh(battler)
end
# アニメーション ID を設定
battler.anime1 = @skill.animation1_id
battler.anime2 = @skill.animation2_id
# コモンイベント ID を設定
battler.event = @skill.common_event_id
# 対象側バトラーを設定
set_target_battlers(@skill.scope, battler)
# スキルの効果を適用
for target in battler.target
if speller != nil
damage = 0
effective = false
state_p = []
state_m = []
for spell in speller
if spell.current_action.spell_id != 0
@skill = $data_skills[spell.current_action.spell_id]
end
effective |= target.skill_effect(spell, @skill)
if target.damage[spell].class != String
damage += target.damage[spell]
elsif effective == true
effect = target.damage[spell]
end
state_p += target.state_p[spell]
state_m += target.state_m[spell]
target.damage.delete(spell)
target.state_p.delete(spell)
target.state_m.delete(spell)
end
if damage != 0
target.damage[battler] = damage
elsif effective = true
target.damage[battler] = effect
end
target.state_p[battler] = state_p
target.state_m[battler] = state_m
else
target.skill_effect(battler, @skill)
end
end
if if battler.current_action.spell_id == 0
if battler.is_actor? and @skill.element_set != []
for i in @skill.element_set
battler.element_affinity_adjust(i)
end
end
else
if battler.is_actor? and $data_skills[spell.current_action.spell_id].element_set != []
for i in $data_skills[spell.current_action.spell_id].element_set
battler.element_affinity_adjust(i)
end
end
end
end
end
end
Creditos Script creado por: Fomar0153 Agrupacin de Habilidades Spoiler para -:
Se pone encima de main y debajo del KGC Module (que ustedes tendran que ponerlo, para que funcione)
y se deben crear los atributos "Recovery", "Attack", "Assistance", "Uniqueness" y darselo a las habilidades Código:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/ * Skill classification - KGC_SkillGrouping *
#_/----------------------------------------------------------------------------
#_/ The performance which classifies skill classified by type is added.
#_/ Translated by Me
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#==============================================================================
#* Customization item *
#==============================================================================
module KGC
#============================INSTRUCTIONS==================================
#
# * The instructions are easy, but need to be folowed with care.
# --------------------------OutSide Battle-----------------------------------
# * Below you set in the array element names to use as groups, where the zero
# wil be displaying ALL KINDS (read: all skills). The name must be double
# quoted and followed by an , Like this: "Recovery", "Attack",
#----------------------------------------------------------------------------
SG_ELEMENTS = ["Recovery", "Attack", "Assistance", "Uniqueness", 0]
#----------------------------------------------------------------------------
# * Below wil set the Names that wil displayed in the menu of the skillgroups
# The position in the array is the same as above. So the first element set
# above will be chaned to the first one below. Again double quoted and ,
#----------------------------------------------------------------------------
SG_NAME = ["Recuperativa", "Ataque", "Asistencia", "Únicas", "Todas"]
#----------------------------------------------------------------------------
# * Descriptive text is set below. This tekst will be displayed in the help
# window. Again the first one here, must be and is the same as the first
# above. (Dont forget to quote it double, so the text turns purple)
#----------------------------------------------------------------------------
SG_HELP = ["Habilidades recuperativas.",
"Habilidades que causan daño.",
"Habilidades que ayudan en batallas.",
"Habilidades únicas del héroe.",
"Todas las habilidades."]
# --------------------------Inside Battle------------------------------------
# * All above is going to be used in the MENU, below will be used in BATTLE
# Again, set the element names that will be used IN BATLLE, so the can be
# different. You might have skills that are special, wich are only used
# inside battle, so u can assign them here, and not above.
#----------------------------------------------------------------------------
SG_ELEMENTS_BATTLE = ["Recovery", "Attack", "Assistance", "Uniqueness", 0]
#----------------------------------------------------------------------------
# * Again set the names, same way as above. NOTE: the name does not have to
# be the same as the element name.
#----------------------------------------------------------------------------
SG_NAME_BATTLE = ["Recuperativa", "Ataque", "Asistencia", "Únicas", "Todas"]
#----------------------------------------------------------------------------
# * Descriptive text is set below. This tekst will be displayed in the help
# window. Again the first one here, must be and is the same as the first
# above. (Dont forget to quote it double, so the text turns purple).
#----------------------------------------------------------------------------
SG_HELP_BATTLE = ["Habilidades recuperativas.",
"Habilidades que causan daño.",
"Habilidades que ayudan en batallas.",
"Habilidades únicas del héroe.",
"Todas las habilidades."]
#----------------------------------------------------------------------------
# * Instructions end. U do NOT need to change anything below these lines.
#============================================================================
end
$imported = {} if $imported == nil
$imported["SkillGrouping"] = true
if $game_special_elements == nil
$game_special_elements = {}
$data_system = load_data("Data/System.rxdata")
end
module KGC
# Classification arrangement compilation
SKILL_GROUP, SG_BATTLE = [], []
# Non field type attribute acquisition
SG_ELEMENTS.each_with_index { |element, i|
# When 0 (all kind) is,
if element == 0
SKILL_GROUP[i] = 0
next
end
# Setting the key of hash
key = "_grouping_skill_#{i}}"
# Attribute ID acquisition
$game_special_elements[key] = $data_system.elements.index(element)
SKILL_GROUP[i] = $game_special_elements[key]
}
# Field type attribute acquisition
SG_ELEMENTS_BATTLE.each_with_index { |element, i|
if element == 0
SG_BATTLE[i] = 0
next
end
key = "_grouping_skill_battle_#{i}}"
$game_special_elements[key] = $data_system.elements.index(element)
SG_BATTLE[i] = $game_special_elements[key]
}
end
#==============================================================================
# ■ Module_Graphics
#==============================================================================
module Graphics
unless defined?(transition_interrupt_KGC)
#--------------------------------------------------------------------------
# ● Transition execution
#--------------------------------------------------------------------------
class << Graphics
alias transition_interrupt_KGC transition
end
def self.transition(duration = 8, filename = "", vague = 40)
if $game_temp && $game_temp.interrupt_transition
return
end
transition_interrupt_KGC(duration, filename, vague)
end
end
end
#==============================================================================
# ■ Game_Temp
#==============================================================================
class Game_Temp
attr_accessor :interrupt_transition
#--------------------------------------------------------------------------
# ● Object initialization
#--------------------------------------------------------------------------
alias initialize_KGC_SkillGrouping initialize
def initialize
initialize_KGC_SkillGrouping
@interrupt_transition = false
end
end
#==============================================================================
# ■ Window_Skill
#==============================================================================
class Window_Skill < Window_Selectable
#--------------------------------------------------------------------------
# ● Object initialization
# actor : Actor
#--------------------------------------------------------------------------
alias initialize_KGC_SkillGrouping initialize
def initialize(actor)
@group = $game_temp.in_battle ? KGC::SG_BATTLE : KGC::SKILL_GROUP
# Executing the processing of the origin
initialize_KGC_SkillGrouping(actor)
# When it is in the midst of non fighting,
unless $game_temp.in_battle
self.y += 64
self.height -= 64
end
self.index = -1
# Active conversion cancellation
self.active = false
end
#--------------------------------------------------------------------------
# ● Refreshment
#--------------------------------------------------------------------------
def refresh(skillkind = 0)
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# When "all kind" is not,
if @group[skillkind] != 0
for i in 0...@actor.skills.size
# When it has corresponding attribute,
if $data_skills[@actor.skills[i]].element_set.include?(@group[skillkind])
@data << $data_skills[@actor.skills[i]]
end
end
else
# Adding all skill
for i in 0...@actor.skills.size
@data.push << $data_skills[@actor.skills[i]]
end
end
# If the number of items is not 0, it draws up bit map, drawing all item
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
end
#==============================================================================
# ■ Window_SkillGroup
#------------------------------------------------------------------------------
# In the skill picture, it is the window which selects type.
#==============================================================================
class Window_SkillGroup < Window_Selectable
#--------------------------------------------------------------------------
# ● Object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 64, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
# Drawing up command summary
@commands = []
for name in ($game_temp.in_battle ? KGC::SG_NAME_BATTLE : KGC::SG_NAME)
@commands.push(name)
end
@item_max = @commands.size
@column_max = @commands.size
@item_width = (width - 32) / @commands.size
self.index = 0
# In the midst of battle
if $game_temp.in_battle
@help_text = KGC::SG_HELP_BATTLE
# Adjusting window position
self.y = 0 unless $imported["HelpExtension"]
else
@help_text = KGC::SG_HELP
end
self.z = 2000
refresh
end
#--------------------------------------------------------------------------
# ● Refreshment
#--------------------------------------------------------------------------
def refresh
for i in 0...@commands.size
rect = Rect.new(@item_width * i, 0, @item_width, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = system_color
self.contents.draw_text(rect, @commands[i], 1)
end
end
#--------------------------------------------------------------------------
# ● Rectangle renewal of cursor
#--------------------------------------------------------------------------
def update_cursor_rect
if index != -1
self.cursor_rect.set(@item_width * index, 0, @item_width, 32)
end
end
#--------------------------------------------------------------------------
# ● Help text renewal
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(@help_text[self.index])
end
end
#==============================================================================
# ■ Scene_Skill
#==============================================================================
class Scene_Skill
#--------------------------------------------------------------------------
# ● Main processing
#--------------------------------------------------------------------------
alias main_KGC_SkillGrouping main
def main
# Classification window compilation
@group_window = Window_SkillGroup.new
if $imported["MenuAlter"] && KGC::MA_MENU_TRANSPARENT
@group_window.back_opacity = 160
end
@group_window.y = 64
$game_temp.interrupt_transition = true
main_KGC_SkillGrouping
# Opening the window
@group_window.dispose
end
#--------------------------------------------------------------------------
# ● Frame renewal
#--------------------------------------------------------------------------
def update
# When the window is not initialized,
unless @window_initialize
# Various window adjustments
@status_window.y = 128
@target_window.z = 2100
# Help window association
@group_window.help_window = @help_window
if $imported["MenuAlter"] && KGC::MA_MENU_TRANSPARENT
@help_window.back_opacity = 160
end
# Turning on the initialization flag
@window_initialize = true
# Transition execution
$game_temp.interrupt_transition = false
Graphics.transition
end
# Renewing the window
@help_window.update
@status_window.update
@skill_window.update
@target_window.update
@group_window.update
# When the skill window is active,:
# Update_skill is called
if @skill_window.active
update_skill
return
end
# When the target window is active,:
# Update_target is called
if @target_window.active
update_target
return
end
# When the taxonomic window is active,:
# Update_group is called
if @group_window.active
update_group
return
end
end
#--------------------------------------------------------------------------
# ● When frame renewal (the skill window is active)
#--------------------------------------------------------------------------
alias update_skill_KGC_SkillGrouping update_skill
def update_skill
# When the button B is pushed
if Input.trigger?(Input::B)
# Performing cancellation SE
$game_system.se_play($data_system.cancel_se)
# Active conversion taxonomic window
@group_window.active = true
@group_window.visible = true
@skill_window.active = false
@skill_window.index = -1
return
end
# Executing the processing of the origin
update_skill_KGC_SkillGrouping
end
#--------------------------------------------------------------------------
# ● When frame renewal (the target window is active)
#--------------------------------------------------------------------------
def update_target
# When the button B is pushed
if Input.trigger?(Input::B)
# # Performing cancellation SE
$game_system.se_play($data_system.cancel_se)
# Active conversion taxonomic window
@skill_window.active = true
@target_window.visible = false
@target_window.active = false
return
end
# When the button C is pushed
if Input.trigger?(Input::C)
# When SP with and so on is cut off and it becomes not be able to use,
unless @actor.skill_can_use?(@skill.id)
# Performing buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# When the target is the whole,
if @target_window.index == -1
# Applying the use effect of skill to the whole party
used = false
for i in $game_party.actors
used |= i.skill_effect(@actor, @skill)
end
end
# When the target is the user,
if @target_window.index <= -2
# Applying the use effect of skill to the actor of the target
target = $game_party.actors[@target_window.index + 10]
used = target.skill_effect(@actor, @skill)
end
# When the target is the single unit,
if @target_window.index >= 0
# Applying the use effect of skill to the actor of the target
target = $game_party.actors[@target_window.index]
used = target.skill_effect(@actor, @skill)
end
# When skill was used,
if used
# When using the skill, performing SE
$game_system.se_play(@skill.menu_se)
# SP consumption
if $imported["SPCostAlter"]
use_sp
else
@actor.sp -= @skill.sp_cost
end
# Rewriting the contents of each window
@status_window.refresh
@skill_window.refresh(@group_window.index)
@target_window.refresh
# In case of total destruction
if $game_party.all_dead?
# Change to game over picture
$scene = Scene_Gameover.new
return
end
# When common event ID is effective,
if @skill.common_event_id > 0
# Common event call reservation
$game_temp.common_event_id = @skill.common_event_id
# Change to map picture
$scene = Scene_Map.new
return
end
# When skill was not used,
else
# Performing buzzer SE
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
#--------------------------------------------------------------------------
# ● When frame renewal (the taxonomic window is active)
#--------------------------------------------------------------------------
def update_group
if @now_skillkind != @group_window.index
# Classification of skill which is indicated depending upon
# cursor position is divided
@skill_window.refresh(@group_window.index)
@skill_window.top_row = 0
@now_skillkind = @group_window.index
end
# When the B button is pushed,
if Input.trigger?(Input::B)
# Performing cancellation SE
$game_system.se_play($data_system.cancel_se)
# Change to menu screen
if $imported["MenuAlter"]
index = KGC::MA_COMMANDS.index(1)
if index != nil
$scene = Scene_Menu.new(index)
else
$scene = Scene_Menu.new
end
else
$scene = Scene_Menu.new(1)
end
return
end
# When the C button is pushed,
if Input.trigger?(Input::C)
# Performing decision SE
$game_system.se_play($data_system.decision_se)
# Active conversion skill window
@skill_window.active = true
@skill_window.index = 0
@group_window.active = false
@group_window.visible = false if $imported["HelpExtension"]
return
end
# When the R button is pushed,
if Input.trigger?(Input::R)
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# To the following actor
@actor_index += 1
@actor_index %= $game_party.actors.size
# Change to another skill picture
$scene = Scene_Skill.new(@actor_index)
return
end
# When the L button is pushed,
if Input.trigger?(Input::L)
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# To actor before
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# Change to another skill picture
$scene = Scene_Skill.new(@actor_index)
return
end
end
end
#==============================================================================
# ■ Scene_Battle (Division definition 3)
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ● Frame renewal (actor command phase: Skill selection)
#--------------------------------------------------------------------------
def update_phase3_skill_select
# The skill window is put in visible state
@skill_window.visible = true
# When it is in the midst of type selecting, indicating the taxonomic window
if @skill_group_select
@help_window.visible = false unless $imported["HelpExtension"]
@skill_window.active = false
@skill_group_window.visible = true
@skill_group_window.active = true
# When it is in the midst of skill selecting, it is opposite
else
@help_window.visible = true unless $imported["HelpExtension"]
@skill_window.active = true
@skill_group_window.visible = false
@skill_group_window.active = false
end
# Renewing the skill window
@skill_window.update
# Renewing the skill taxonomic window
@skill_group_window.update
if @now_skillkind != @skill_group_window.index
# Classification of skill which is indicated depending upon
# cursor position is divided
@skill_window.refresh(@skill_group_window.index)
@skill_window.oy = 0
@now_skillkind = @skill_group_window.index
end
# When the B button is pushe,
if Input.trigger?(Input::B)
# Performing cancellation SE
$game_system.se_play($data_system.cancel_se)
# When it is in the midst of type selecting,
if @skill_group_select
# End selection of skill
end_skill_select
else
# Change to taxonomic window
@skill_group_select = true
@skill_window.index = -1
end
return
end
# When the C button is pushed,
if Input.trigger?(Input::C)
# When it is in the midst of type selecting,
if @skill_group_select
# Performing decision SE
$game_system.se_play($data_system.decision_se)
# Type selection end
@skill_group_select = false
@skill_window.index = 0
else
# Acquiring the data which presently is selected in the skill window
@skill = @skill_window.skill
# When you cannot use,
if @skill == nil || !@active_battler.skill_can_use?(@skill.id)
# Performing buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# The help window is hidden
if @help_window2 != nil
@help_window2.visible = false
else
@help_window.visible = false
end
# Performing desision SE
$game_system.se_play($data_system.decision_se)
# Setting action
@active_battler.current_action.skill_id = @skill.id
# The skill window is put in invisibility state
@skill_window.visible = false
# When the effective range is the enemy single unit,
if @skill.scope == 1
# Starting the selection of the enemy
start_enemy_select
# When the effective range is the friend single unit,
elsif @skill.scope == 3 or @skill.scope == 5
# Starting the selection of the enemy
start_actor_select
# When the effective range is not the single unit,
else
# End selection of skill
end_skill_select
# To command input of the following actor
phase3_next_actor
end
end
return
end
end
#--------------------------------------------------------------------------
# ● Start of skill selection
#--------------------------------------------------------------------------
alias start_skill_select_KGC_SkillGrouping start_skill_select
def start_skill_select
# Executing the processing of the origin
start_skill_select_KGC_SkillGrouping
# Drawing up the skill taxonomic window
@skill_group_window = Window_SkillGroup.new
@skill_group_window.back_opacity = 160
@skill_group_window.y = @help_window2 != nil ? 64 : 0
# During type selecting the flag is raised
@skill_group_select = true
# Initializing the classification of skill
@now_skillkind = nil
# Help window association
if @help_window2 != nil
@skill_group_window.help_window = @help_window2
elsif $imported["HelpExtension"]
@skill_group_window.help_window = @help_window
end
end
#--------------------------------------------------------------------------
# ● Skill selection end
#--------------------------------------------------------------------------
alias end_skill_select_KGC_SkillGrouping end_skill_select
def end_skill_select
# Executing the processing of the origin
end_skill_select_KGC_SkillGrouping
# Releasing the skill taxonomic window
@skill_group_window.dispose
@skill_group_window = nil
end
end
Agrupacón de Objetos (KGC_ItemGrouping, por KGC) Spoiler para -:
Este script lo que hace es que organiza tus objetos, armas, armaduras, etc en 5 categorÃ*as:
Normal Especial Arma Armadura Importante Antes de poner nada pongan el KGC_Module, que esta en la Recopilacion de utilidades, de esta misma sección Creamos una nueva clase(con el nombre que nosotro queramos) y lo pegamos arriba del Main. Código:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  � アイ� � � 類 � KGC_ItemGrouping�
#_/----------------------------------------------------------------------------
#_/ アイãƒ� ãƒ� を種類別ã?«åˆ� 類ã?™ã‚‹å‡¦ç?� を追å� � ã?—ã?¾ã?™ã€‚
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#==============================================================================
# ★ カスタマイズé� …ç›® ★
#==============================================================================
module KGC
ITEM_GROUP_ELEMENTS = ["Standar", "Especial", -1, -2, "Importante", 0]
ITEM_GROUP_NAME = ["Normal", "Especial", "Armas", "Armadura", "Importante"]
ITEM_GROUP_HELP = ["AquÃ* están objetos básicos",
"AquÃ* encuentras objetos especiales",
"AquÃ* encuentras las armas",
"AquÃ* encuentras las armaduras",
"AquÃ* encuentras objetos importantes"]
end
#★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★
$imported["ItemGrouping"] = true
$game_special_elements["item_hide"] = $data_system.elements.index("item_hide")
module KGC
ITEM_GROUP = []
for i in 0...ITEM_GROUP_ELEMENTS.size
if ITEM_GROUP_ELEMENTS[i].is_a?(Numeric) && ITEM_GROUP_ELEMENTS[i] <= 0
ITEM_GROUP[i] = ITEM_GROUP_ELEMENTS[i]
next
end
key = "item_#{i}}"
$game_special_elements[key] = $data_system.elements.index(ITEM_GROUP_ELEMENTS[i])
ITEM_GROUP[i] = $game_special_elements[key]
end
end
class Object
include KGC
end
#★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★
#==============================================================================
# â–� Module_RPG
#------------------------------------------------------------------------------
#  RPGモジュールå� ?定義
#==============================================================================
module RPG
class Item
def usable?
if $game_party.item_can_use?(self.id)
return true
end
return false
end
end
unless $imported["UsableWeapon"]
class Weapon
def usable?
return false
end
end
end
end
#★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★
#==============================================================================
# â–� Window_Item
#------------------------------------------------------------------------------
#  アイãƒ� ãƒ� çâ€Â»Ã©?¢ã€?ãƒ?トルçâ€Â»Ã©?¢ã?§ã€?所æŒ?アイãƒ� ãƒ� ã?®ä¸€è¦§ã‚’表示ã?™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã?§ã?™ã€‚
#==============================================================================
class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# � オブジェクト�期化
#--------------------------------------------------------------------------
alias initialize_KGC_ItemGrouping initialize
def initialize
initialize_KGC_ItemGrouping
unless $game_temp.in_battle
unless $imported["HelpExtension"]
self.y += 64
self.height -= 64
end
self.index = -1
self.active = false
end
end
#--------------------------------------------------------------------------
# � �表示判定
# index : アイ� � ID
# type : 種別(0:アイãƒ� ãƒ� 1:æÂ*¦å™¨ 2:防具)
#--------------------------------------------------------------------------
def hide?(index, type = 0)
case type
when 0
elements = $data_items[index].element_set.dup
when 1
elements = $data_weapons[index].element_set.dup
when 2
elements = $data_armors[index].guard_element_set.dup
end
return elements.include?($game_special_elements["item_hide"])
end
#--------------------------------------------------------------------------
# � � 類後�アイ� � リストを�得
# itemkind : アイ� � �種別
#--------------------------------------------------------------------------
def itemlist(itemkind)
@data = []
unless $game_temp.in_battle
if ITEM_GROUP[itemkind] == 0
for i in 1...$data_items.size
if $game_party.item_number(i) > 0 && !self.hide?(i, 0)
@data.push($data_items[i])
end
end
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 && !self.hide?(i, 1)
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 && !self.hide?(i, 2)
@data.push($data_armors[i])
end
end
elsif ITEM_GROUP[itemkind] == -1
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 && !self.hide?(i, 1)
@data.push($data_weapons[i])
end
end
elsif ITEM_GROUP[itemkind] == -2
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 && !self.hide?(i, 2)
@data.push($data_armors[i])
end
end
else
for i in 1...$data_items.size
if $game_party.item_number(i) > 0 && !self.hide?(i, 0) &&
$data_items[i].element_set.include?(ITEM_GROUP[itemkind])
@data.push($data_items[i])
end
end
end
else
for i in 1...$data_items.size
if $game_party.item_number(i) > 0 && !self.hide?(i, 0)
@data.push($data_items[i])
end
end
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 && !self.hide?(i, 1) && $data_weapons[i].usable?
@data.push($data_weapons[i])
end
end
end
end
#--------------------------------------------------------------------------
# � リフレッシュ
# itemkind : アイ� � �� 類
#--------------------------------------------------------------------------
def refresh(itemkind = 0)
if self.contents != nil
self.contents.dispose
self.contents = nil
end
self.itemlist(itemkind)
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# â—? é� …ç›®ã?®æ??çâ€Â»
# index : é� …目番å?·
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if (item.is_a?(RPG::Item) && item.usable?) ||
($game_temp.in_battle && item.is_a?(RPG::Weapon) && item.usable?)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# â—? ヘルプãƒ� ã‚Â*スト更新
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★
#==============================================================================
# â–� Window_ItemGroup
#------------------------------------------------------------------------------
#  アイãƒ� ãƒ� çâ€Â»Ã©?¢ã?§ã€?åˆ� 類をé?¸æ� žã?™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã?§ã?™ã€‚
#==============================================================================
class Window_ItemGroup < Window_Selectable
#--------------------------------------------------------------------------
# � オブジェクト�期化
#--------------------------------------------------------------------------
def initialize
super(0, 64, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
@commands = []
for name in ITEM_GROUP_NAME
@commands.push(name)
end
@item_max = @commands.size
@column_max = @commands.size
@item_width = (width - 32) / @commands.size
self.index = 0
refresh
end
#--------------------------------------------------------------------------
# � リフレッシュ
#--------------------------------------------------------------------------
def refresh
for i in 0...@commands.size
rect = Rect.new(@item_width * i, 0, @item_width, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = system_color
self.contents.draw_text(rect, @commands[i], 1)
end
end
#--------------------------------------------------------------------------
# � カーソル�矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
if index != -1
self.cursor_rect.set(@item_width * index, 0, @item_width, 32)
end
end
#--------------------------------------------------------------------------
# â—? ヘルプãƒ� ã‚Â*スト更新
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(ITEM_GROUP_HELP[self.index])
end
end
#★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★� ★
#==============================================================================
# â–� Scene_Item
#------------------------------------------------------------------------------
#  アイãƒ� ãƒ� çâ€Â»Ã©?¢ã?®å‡¦ç?� を行ã?� クラスã?§ã?™ã€‚
#==============================================================================
class Scene_Item
#--------------------------------------------------------------------------
# � メイン処�
#--------------------------------------------------------------------------
alias main_KGC_ItemGrouping main
def main
# � 類ウィンドウを作�
@group_window = Window_ItemGroup.new
@group_window.back_opacity = 160 if $imported["MenuAlter"]
# 元�処� を実行
main_KGC_ItemGrouping
# ウィンドウを解æâ€Â¾
@group_window.dispose
end
#--------------------------------------------------------------------------
# � フレー� 更新
#--------------------------------------------------------------------------
def update
unless @window_initialize
@group_window.z = @help_window.z + 1
@group_window.help_window = @help_window
@window_initialize = true
end
@help_window.update
@item_window.update
@target_window.update
@group_window.update
# update_item
if @item_window.active
update_item
return
end
#update_target
if @target_window.active
update_target
return
end
# update_group
if @group_window.active
update_group
return
end
end
#--------------------------------------------------------------------------
# â—? フレーãƒ� æ›´æ–° (アイãƒ� ãƒ� ウィンドウã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ)
#--------------------------------------------------------------------------
alias update_item_KGC_ItemGrouping update_item
def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@group_window.active = true
@group_window.visible = true
@item_window.active = false
@item_window.index = -1
return
end
update_item_KGC_ItemGrouping
end
#--------------------------------------------------------------------------
# â—? フレーãƒ� æ›´æ–° (ターゲットウィンドウã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ)
#--------------------------------------------------------------------------
def update_target
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
unless $game_party.item_can_use?(@item.id)
@item_window.refresh(@group_window.index)
end
@item_window.active = true
@target_window.visible = false
@target_window.active = false
return
end
if Input.trigger?(Input::C)
if $game_party.item_number(@item.id) == 0
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_window.index == -1
used = false
for i in $game_party.actors
used |= i.item_effect(@item)
end
end
if @target_window.index >= 0
target = $game_party.actors[@target_window.index]
used = target.item_effect(@item)
end
if used
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@item_window.draw_item(@item_window.index)
end
@target_window.refresh
if $game_party.all_dead?
$scene = Scene_Gameover.new
return
end
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$scene = Scene_Map.new
return
end
end
unless used
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
#--------------------------------------------------------------------------
# â—? フレーãƒ� æ›´æ–° (åˆ� 類ウィンドウã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ)
#--------------------------------------------------------------------------
def update_group
if @now_itemkind != @group_window.index
@item_window.refresh(@group_window.index)
@now_itemkind = @group_window.index
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(0)
return
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
@item_window.active = true
@item_window.index = 0
@group_window.active = false
@group_window.visible = false if $imported["HelpExtension"]
return
end
end
end
Base de Datos -> Sistema En Atributos, ponen 4 mas. Los llamaran-nombraran) en el siguiente orden: Standar Especial Importante item_hide Y ahora, vayan a la pestaña de objetos (noten que solo deben ponerle el atributo deseado a objetos, las armaduras y armas de organizan solas) y le dan el atributo deseado a cada objeto. Standar es para objetos basicos Especial... pa' que mas... objetos especiales. xDD Importante... la palabra lo dice. o_O item_hide es para que no se muestre ese objeto. Accesorio Debug Spoiler para -:
Lo que hace el script es que al equiparnos un cierto accesorio nos deje traspasar las paredes como si estuvieramos apretando el CTRL en Test Play
Script: Arriba de Main creen una nueva clase Código:
#===============================================================================
# ** Debug Ring
#-------------------------------------------------------------------------------
# Author Icedmetal57
# Version 1.0
# Date October 16th, 2006
#===============================================================================
#
# Description
#-------------------
# If a certain item is equipped, the player will be able to walk through walls,
# as if they were in DEBUG mode, in the RMXP editor.
#
# Instructions
#-------------------
# Scroll down a bit to the ACCESS_ID_NUMBER, and change it to the id number of
# the accessory you wish to have this debug type property.
#
# Compatability
#-------------------
# Compatible with SDK.
# To make it compatible with non-SDK, just delete the SDK lines.
#
#-------------------------------------------------------------------------------
class Game_Player < Game_Character
ACCESS_ID_NUMBER = 107
def passable?(x, y, d)
# Get new coordinates
new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
# If coordinates are outside of map
unless $game_map.valid?(new_x, new_y)
# Impassable
return false
end
# If debug mode is ON and ctrl key was pressed
if $DEBUG and Input.press?(Input::CTRL)
# Passable
return true
end
if $game_actors[1].armor3_id = ACCESS_ID_NUMBER and Input.press?(Input::CTRL)
# Passable
return true
end
super
end
end
+ Cambien donde dice: Cita:
Creditos Icedmetal57 Armas x2 Spoiler para -:
Este script, como dice el ti*tulo, es para poder equipar dos armas y atacar al* mismo dos veces. Es sencillo y eficaz ya que solo tienen que poner el script y todo listo.
Creen clase nueva arriba de Main, llamenla como quieran, y peguen dentro esto: Código:
#=================================
# class Game_Actor mod's... -Midge-
#=================================
# This is where the meat of the script takes place...
# there is alot to be accounted for here too..
# i had to make sure that all the stat stuff was being
# from all the right things... in fact i think most of the
# original class has been modded here... not sure on that
# and too lazy to check and see... let's hope that you haven't
# made any forgetable changes to this before...
#=================================
class Game_Actor < Game_Battler
attr_accessor :weapon_type
attr_accessor :armor_type
attr_accessor :sec_attack
alias double_weapons_initialize initialize
def initialize(actor_id)
double_weapons_initialize(actor_id)
@weapon_type = $data_weapons[@weapon_id]
@armor_type = $data_armors[@armor1_id]
@sec_attack = nil
end
def animation3_id
weapon = $data_weapons[@armor1_id]
return (weapon != nil ? weapon.animation1_id : 0)
end
def animation4_id
weapon = $data_weapons[@armor1_id]
return (weapon != nil ? weapon.animation2_id : 0)
end
def two_shields
if (self.weapon_type.is_a?(RPG::Armor) and self.armor_type.is_a?(RPG::Armor)) and
(self.weapon_id != 0 and self.armor1_id != 0)
return true
else
return false
end
end
def two_weapons
if (self.weapon_type.is_a?(RPG::Weapon) and self.armor_type.is_a?(RPG::Weapon)) and
(self.weapon_id != 0 and self.armor1_id != 0)
return true
else
return false
end
end
def equip(equip_type, id, item = RPG::Armor)
case equip_type
when 0
if @weapon_id == 0
if item.is_a?(RPG::Weapon)
if id == 0 or $game_party.weapon_number(id) > 0
self.weapon_type = $data_weapons[id]
@weapon_id = id
$game_party.lose_weapon(id, 1)
end
elsif item.is_a?(RPG::Armor)
if id == 0 or $game_party.weapon_number(id) > 0
self.weapon_type = $data_armors[id]
@weapon_id = id
$game_party.lose_armor(id, 1)
end
end
end
if item == nil
if self.weapon_type.is_a?(RPG::Weapon)
if id == 0 or $game_party.weapon_number(id) > 0
$game_party.gain_weapon(@weapon_id, 1)
@weapon_id = id
end
elsif self.weapon_type.is_a?(RPG::Armor)
if id == 0 or $game_party.armor_number(id) > 0
$game_party.gain_armor(@weapon_id, 1)
@weapon_id = id
end
end
end
if item.is_a?(RPG::Weapon)
if self.weapon_type.is_a?(RPG::Weapon)
if id == 0 or $game_party.weapon_number(id) > 0
$game_party.gain_weapon(@weapon_id, 1)
self.weapon_type = $data_weapons[id]
@weapon_id = id
$game_party.lose_weapon(id, 1)
end
elsif self.weapon_type.is_a?(RPG::Armor)
if id == 0 or $game_party.weapon_number(id) > 0
$game_party.gain_armor(@weapon_id, 1)
self.weapon_type = $data_weapons[id]
@weapon_id = id
$game_party.lose_weapon(id, 1)
end
end
elsif item.is_a?(RPG::Armor)
if self.weapon_type.is_a?(RPG::Armor)
if id == 0 or $game_party.armor_number(id) > 0
$game_party.gain_armor(@weapon_id, 1)
self.weapon_type = $data_armors[id]
@weapon_id = id
$game_party.lose_armor(id, 1)
end
elsif self.weapon_type.is_a?(RPG::Weapon)
if id == 0 or $game_party.armor_number(id) > 0
$game_party.gain_weapon(@weapon_id, 1)
self.weapon_type = $data_armors[id]
@weapon_id = id
$game_party.lose_armor(id, 1)
end
end
end
when 1
if @armor1_id == 0
if item.is_a?(RPG::Weapon)
if id == 0 or $game_party.weapon_number(id) > 0
self.armor_type = $data_weapons[id]
@armor1_id = id
$game_party.lose_weapon(id, 1)
end
elsif item.is_a?(RPG::Armor)
if id == 0 or $game_party.armor_number(id) > 0
self.armor_type = $data_armors[id]
@armor1_id = id
$game_party.lose_armor(id, 1)
end
end
end
if item == nil
if self.armor_type.is_a?(RPG::Weapon)
if id == 0 or $game_party.weapon_number(id) > 0
$game_party.gain_weapon(@armor1_id, 1)
@armor1_id = id
end
elsif self.armor_type.is_a?(RPG::Armor)
if id == 0 or $game_party.armor_number(id) > 0
$game_party.gain_armor(@armor1_id, 1)
@armor1_id = id
end
end
end
if item.is_a?(RPG::Weapon)
if self.armor_type.is_a?(RPG::Weapon)
if id == 0 or $game_party.weapon_number(id) > 0
$game_party.gain_weapon(@armor1_id, 1)
self.armor_type = $data_weapons[id]
@armor1_id = id
$game_party.lose_weapon(id, 1)
end
elsif self.armor_type.is_a?(RPG::Armor)
if id == 0 or $game_party.weapon_number(id) > 0
$game_party.gain_armor(@armor1_id, 1)
self.armor_type = $data_weapons[id]
@armor1_id = id
$game_party.lose_weapon(id, 1)
end
end
elsif item.is_a?(RPG::Armor)
if self.armor_type.is_a?(RPG::Armor)
if id == 0 or $game_party.armor_number(id) > 0
$game_party.gain_armor(@armor1_id, 1)
self.armor_type = $data_armors[id]
@armor1_id = id
$game_party.lose_armor(id, 1)
end
elsif self.armor_type.is_a?(RPG::Weapon)
if id == 0 or $game_party.armor_number(id) > 0
$game_party.gain_weapon(@armor1_id, 1)
self.armor_type = $data_armors[id]
@armor1_id = id
$game_party.lose_armor(id, 1)
end
end
end
when 2
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor2_id], $data_armors[id])
$game_party.gain_armor(@armor2_id, 1)
@armor2_id = id
$game_party.lose_armor(id, 1)
end
when 3
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor3_id], $data_armors[id])
$game_party.gain_armor(@armor3_id, 1)
@armor3_id = id
$game_party.lose_armor(id, 1)
end
when 4
if id == 0 or $game_party.armor_number(id) > 0
update_auto_state($data_armors[@armor4_id], $data_armors[id])
$game_party.gain_armor(@armor4_id, 1)
@armor4_id = id
$game_party.lose_armor(id, 1)
end
end
end
def element_rate(element_id)
table = [0,200,150,100,50,0,-100]
result = table[$data_classes[@class_id].element_ranks[element_id]]
if self.armor_type.is_a?(RPG::Weapon)
for i in [@armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
if armor != nil and armor.guard_element_set.include?(element_id)
result /= 2
end
end
else
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
if armor != nil and armor.guard_element_set.include?(element_id)
result /= 2
end
end
end
for i in @states
if $data_states[i].guard_element_set.include?(element_id)
result /= 2
end
end
return result
end
def state_guard?(state_id)
if self.armor_type.is_a?(RPG::Weapon)
for i in [@armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
if armor != nil
if armor.guard_state_set.include?(state_id)
return true
end
end
end
else
return false
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
if armor != nil
if armor.guard_state_set.include?(state_id)
return true
end
end
end
return false
end
end
def element_set
n = []
unless self.weapon_type.is_a?(RPG::Armor)
weapon = $data_weapons[@weapon_id]
n += weapon != nil ? weapon.element_set : []
end
unless self.armor_type.is_a?(RPG::Armor)
weapon2 = $data_weapons[@armor1_id]
n += weapon2 != nil ? weapon2.element_set : []
end
n.flatten!
n.uniq!
return n
end
def plus_state_set
n = []
unless self.weapon_type.is_a?(RPG::Armor)
weapon = $data_weapons[@weapon_id]
n += weapon != nil ? weapon.plus_state_set : []
end
unless self.armor_type.is_a?(RPG::Armor)
weapon2 = $data_weapons[@armor1_id]
n += weapon2 != nil ? weapon2.plus_state_set : []
end
n.flatten!
n.uniq!
return n
end
def minus_state_set
n = []
unless self.weapon_type.is_a?(RPG::Armor)
weapon = $data_weapons[@weapon_id]
n += weapon != nil ? weapon.minus_state_set : []
end
unless self.armor_type.is_a?(RPG::Armor)
weapon2 = $data_weapons[@armor1_id]
n += weapon2 != nil ? weapon2.minus_state_set : []
end
n.flatten!
n.uniq!
return n
end
def base_str
n = $data_actors[@actor_id].parameters[2, @level]
if self.weapon_type.is_a?(RPG::Weapon)
weapon = $data_weapons[@weapon_id]
elsif self.weapon_type.is_a?(RPG::Armor)
weapon = $data_armors[@armor1_id]
end
if self.armor_type.is_a?(RPG::Armor)
armor1 = $data_armors[@armor1_id]
elsif self.armor_type.is_a?(RPG::Weapon)
armor1 = $data_weapons[@armor1_id]
end
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.str_plus : 0
n += armor1 != nil ? armor1.str_plus : 0
n += armor2 != nil ? armor2.str_plus : 0
n += armor3 != nil ? armor3.str_plus : 0
n += armor4 != nil ? armor4.str_plus : 0
return [[n, 1].max, 999].min
end
def base_dex
n = $data_actors[@actor_id].parameters[3, @level]
if self.weapon_type.is_a?(RPG::Weapon)
weapon = $data_weapons[@weapon_id]
elsif self.weapon_type.is_a?(RPG::Armor)
weapon = $data_armors[@armor1_id]
end
if self.armor_type.is_a?(RPG::Armor)
armor1 = $data_armors[@armor1_id]
elsif self.armor_type.is_a?(RPG::Weapon)
armor1 = $data_weapons[@armor1_id]
end
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.dex_plus : 0
n += armor1 != nil ? armor1.dex_plus : 0
n += armor2 != nil ? armor2.dex_plus : 0
n += armor3 != nil ? armor3.dex_plus : 0
n += armor4 != nil ? armor4.dex_plus : 0
return [[n, 1].max, 999].min
end
def base_agi
n = $data_actors[@actor_id].parameters[4, @level]
if self.weapon_type.is_a?(RPG::Weapon)
weapon = $data_weapons[@weapon_id]
elsif self.weapon_type.is_a?(RPG::Armor)
weapon = $data_armors[@armor1_id]
end
if self.armor_type.is_a?(RPG::Armor)
armor1 = $data_armors[@armor1_id]
elsif self.armor_type.is_a?(RPG::Weapon)
armor1 = $data_weapons[@armor1_id]
end
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.agi_plus : 0
n += armor1 != nil ? armor1.agi_plus : 0
n += armor2 != nil ? armor2.agi_plus : 0
n += armor3 != nil ? armor3.agi_plus : 0
n += armor4 != nil ? armor4.agi_plus : 0
return [[n, 1].max, 999].min
end
def base_int
n = $data_actors[@actor_id].parameters[5, @level]
if self.weapon_type.is_a?(RPG::Weapon)
weapon = $data_weapons[@weapon_id]
elsif self.weapon_type.is_a?(RPG::Armor)
weapon = $data_armors[@armor1_id]
end
if self.armor_type.is_a?(RPG::Armor)
armor1 = $data_armors[@armor1_id]
elsif self.armor_type.is_a?(RPG::Weapon)
armor1 = $data_weapons[@armor1_id]
end
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.int_plus : 0
n += armor1 != nil ? armor1.int_plus : 0
n += armor2 != nil ? armor2.int_plus : 0
n += armor3 != nil ? armor3.int_plus : 0
n += armor4 != nil ? armor4.int_plus : 0
return [[n, 1].max, 999].min
end
def base_atk
n = 0
unless self.weapon_type.is_a?(RPG::Armor)
weapon = $data_weapons[@weapon_id]
n += weapon != nil ? weapon.atk : 0
end
unless self.armor_type.is_a?(RPG::Armor)
weapon2 = $data_weapons[@armor1_id]
n += weapon2 != nil ? weapon2.atk : 0
end
return n
end
def base_pdef
if self.weapon_type.is_a?(RPG::Weapon)
weapon = $data_weapons[@weapon_id]
elsif self.weapon_type.is_a?(RPG::Armor)
weapon = $data_armors[@armor1_id]
end
if self.armor_type.is_a?(RPG::Armor)
armor1 = $data_armors[@armor1_id]
elsif self.armor_type.is_a?(RPG::Weapon)
armor1 = $data_weapons[@armor1_id]
end
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
pdef1 = weapon != nil ? weapon.pdef : 0
pdef2 = armor1 != nil ? armor1.pdef : 0
pdef3 = armor2 != nil ? armor2.pdef : 0
pdef4 = armor3 != nil ? armor3.pdef : 0
pdef5 = armor4 != nil ? armor4.pdef : 0
return pdef1 + pdef2 + pdef3 + pdef4 + pdef5
end
def base_mdef
if self.weapon_type.is_a?(RPG::Weapon)
weapon = $data_weapons[@weapon_id]
elsif self.weapon_type.is_a?(RPG::Armor)
weapon = $data_armors[@armor1_id]
end
if self.armor_type.is_a?(RPG::Armor)
armor1 = $data_armors[@armor1_id]
elsif self.armor_type.is_a?(RPG::Weapon)
armor1 = $data_weapons[@armor1_id]
end
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
mdef1 = weapon != nil ? weapon.mdef : 0
mdef2 = armor1 != nil ? armor1.mdef : 0
mdef3 = armor2 != nil ? armor2.mdef : 0
mdef4 = armor3 != nil ? armor3.mdef : 0
mdef5 = armor4 != nil ? armor4.mdef : 0
return mdef1 + mdef2 + mdef3 + mdef4 + mdef5
end
def base_eva
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
eva1 = armor1 != nil ? armor1.eva : 0
eva2 = armor2 != nil ? armor2.eva : 0
eva3 = armor3 != nil ? armor3.eva : 0
eva4 = armor4 != nil ? armor4.eva : 0
return eva1 + eva2 + eva3 + eva4
end
end
#=================================
# end -O- Game_Actor changes -Midge-
#=================================
#=================================
# class Window_EquipRight mods... -Midge-
#=================================
# this is just so that it will display the right stuff that
# you have equipped in the two hands...
#=================================
class Window_EquipRight < Window_Selectable
def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
if @actor.weapon_type.is_a?(RPG::Weapon)
@data[0] = $data_weapons[@actor.weapon_id]
elsif @actor.weapon_type.is_a?(RPG::Armor)
@data[0] = $data_armors[@actor.weapon_id]
end
if @actor.armor_type.is_a?(RPG::Weapon)
@data[1] = $data_weapons[@actor.armor1_id]
elsif @actor.armor_type.is_a?(RPG::Armor)
@data[1] = $data_armors[@actor.armor1_id]
end
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)
self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
draw_item_name(@data[0], 92, 32 * 0)
draw_item_name(@data[1], 92, 32 * 1)
draw_item_name(@data[2], 92, 32 * 2)
draw_item_name(@data[3], 92, 32 * 3)
draw_item_name(@data[4], 92, 32 * 4)
end
end
#=================================
# End -O- Window_EquipRight Mods... -Midge-
#=================================
#=================================
# class Window_EquipItem mods... -Midge-
#=================================
# basically i just made it so that both the weapons and
# sheilds would be displayed in the weapon and shield
# hands... both of them... so you can equip either in
# either hand... anyway.. its all cool and stuff...
#=================================
class Window_EquipItem < Window_Selectable
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons[i])
end
end
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors[i].kind == 0
@data.push($data_armors[i])
end
end
end
end
if @equip_type != 0
if @equip_type == 1
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons[i])
end
end
end
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors[i].kind == @equip_type-1
@data.push($data_armors[i])
end
end
end
end
@data.push(nil)
@item_max = @data.size
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = "Arial"
self.contents.font.size = 22
for i in 0...@item_max-1
draw_item(i)
end
end
end
#=================================
# End -O- Window_EquipItem mod's... -Midge-
#=================================
class Scene_Equip
def refresh
@item_window1.visible = (@right_window.index == 0)
@item_window2.visible = (@right_window.index == 1)
@item_window3.visible = (@right_window.index == 2)
@item_window4.visible = (@right_window.index == 3)
@item_window5.visible = (@right_window.index == 4)
item1 = @right_window.item
case @right_window.index
when 0
@item_window = @item_window1
when 1
@item_window = @item_window2
when 2
@item_window = @item_window3
when 3
@item_window = @item_window4
when 4
@item_window = @item_window5
end
if @right_window.active
@left_window.set_new_parameters(nil, nil, nil)
end
if @item_window.active
item2 = @item_window.item
last_hp = @actor.hp
last_sp = @actor.sp
@actor.equip(@right_window.index, item2 == nil ? 0 : item2.id, item2)
new_atk = @actor.atk
new_pdef = @actor.pdef
new_mdef = @actor.mdef
@actor.equip(@right_window.index, item1 == nil ? 0 : item1.id, item1)
@actor.hp = last_hp
@actor.sp = last_sp
@left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
end
end
def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@right_window.active = true
@item_window.active = false
@item_window.index = -1
return
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.equip_se)
item = @item_window.item
@actor.equip(@right_window.index, item == nil ? 0 : item.id, item)
@right_window.active = true
@item_window.active = false
@item_window.index = -1
@right_window.refresh
@item_window.refresh
return
end
end
def update
@left_window.update
@right_window.update
@item_window.update
@item_window1.refresh
@item_window2.refresh
refresh
if @right_window.active
update_right
return
end
if @item_window.active
update_item
return
end
end
end
class Scene_Battle
def update_phase3_basic_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
phase3_prior_actor
return
end
if @active_battler.two_shields
@actor_command_window.disable_item(0)
else
@actor_command_window.enable_item(0)
end
if Input.trigger?(Input::C)
case @actor_command_window.index
when 0
if @active_battler.two_shields
$game_system.se_play($data_system.buzzer_se)
return
end
if @active_battler.two_weapons == true
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 4
else
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
end
$game_system.se_play($data_system.decision_se)
start_enemy_select
when 1
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 1
start_skill_select
when 2
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
phase3_next_actor
when 3
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 2
start_item_select
end
return
end
end
def make_basic_action_result
if @active_battler.current_action.basic == 0
@animation1_id = @active_battler.animation1_id
@animation2_id = @active_battler.animation2_id
if @active_battler.is_a?(Game_Enemy)
if @active_battler.restriction == 3
target = $game_troop.random_target_enemy
elsif @active_battler.restriction == 2
target = $game_party.random_target_actor
else
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
end
end
if @active_battler.is_a?(Game_Actor)
if @active_battler.armor_type.is_a?(RPG::Weapon)
@animation1_id = @active_battler.animation3_id
@animation2_id = @active_battler.animation4_id
end
if @active_battler.restriction == 3
target = $game_party.random_target_actor
elsif @active_battler.restriction == 2
target = $game_troop.random_target_enemy
else
index = @active_battler.current_action.target_index
target = $game_troop.smooth_target_enemy(index)
end
end
@target_battlers = [target]
for target in @target_battlers
target.attack_effect(@active_battler)
end
return
end
if @active_battler.current_action.basic == 1
@help_window.set_text($data_system.words.guard, 1)
return
end
if @active_battler.is_a?(Game_Enemy) and @active_battler.current_action.basic == 2
@help_window.set_text("逃げる", 1)
@active_battler.escape
return
end
if @active_battler.current_action.basic == 3
$game_temp.forcing_battler = nil
@phase4_step = 1
return
end
if @active_battler.current_action.basic == 4
@animation1_id = @active_battler.animation1_id
@animation2_id = @active_battler.animation2_id
@animation3_id = @active_battler.animation3_id
@animation4_id = @active_battler.animation4_id
if @active_battler.is_a?(Game_Actor)
if @active_battler.restriction == 3
target = $game_party.random_target_actor
elsif @active_battler.restriction == 2
target = $game_troop.random_target_enemy
else
index = @active_battler.current_action.target_index
target = $game_troop.smooth_target_enemy(index)
end
end
@target_battlers = [target]
for target in @target_battlers
target.attack_effect(@active_battler)
end
return
end
end
def update_phase4_step4
if @active_battler.is_a?(Game_Actor)
if @active_battler.two_weapons == true && @active_battler.sec_attack == 0
for target in @target_battlers
target.animation_id = @animation4_id
target.animation_hit = (target.damage != "Miss")
@phase4_step = 5
return
end
end
end
for target in @target_battlers
target.animation_id = @animation2_id
target.animation_hit = (target.damage != "Miss")
end
@wait_count = 8
@phase4_step = 5
end
def update_phase4_step5
@help_window.visible = false
@status_window.refresh
if @active_battler.is_a?(Game_Actor)
if @active_battler.current_action.basic == 4
if @active_battler.two_weapons == true && @active_battler.sec_attack == nil
@active_battler.sec_attack = 0
@phase4_step = 3
return
else
@active_battler.sec_attack = nil
end
end
end
for target in @target_battlers
if target.damage != nil
target.damage_pop = true
end
end
@phase4_step = 6
end
end
class Window_Command
def enable_item(index)
draw_item(index, normal_color)
end
end
Atributos que suben "extra" cada nivel Spoiler para -:
El ataque, defensa y resistencia subirán en relación al nivel(o varios niveles)
Funciona sumándose a lo que puedan subir armas, protecciones u otros efectos sobre el personaje. Código:
#-----------------------------------------------------------------------
# Attack goes up with Level
#-----------------------------------------------------------------------
class Game_Actor < Game_Battler
alias sandgolem_atklvl_actor_baseatk base_atk
def base_atk
return sandgolem_atklvl_actor_baseatk + @level
end
#-----------------------------------------------------------------------
# Defense goes up with Level
#-----------------------------------------------------------------------
alias sandgolem_deflvl_actor_basepdef base_pdef
def base_pdef
return sandgolem_deflvl_actor_basepdef + @level
end
#-----------------------------------------------------------------------
# Resistence goes up with Level
#-----------------------------------------------------------------------
alias sandgolem_reslvl_actor_basemdef base_mdef
def base_mdef
return sandgolem_reslvl_actor_basemdef + @level
end
end
+ Si quieres que en vez de subir cada nivel sea cada 2 niveles, en vez de @level, pon Cita:
Creditos: Script credao por: Sandgolem Aumentar Parámetros Enemigos Spoiler para -:
Descripción: Lo que hace este script es que, en ciertos mapas, le sube los estados al enemigo completamente (por porcentaje). Funciona también con el ABS de Mr.Mo, de Near Fantastica o en eventos, lo del comando de 'Combatir'. Al igual es compatible con otros CBS'.
ponganlo arriba de Main y sigan dos instrucciones: Código:
#===============================================================================
# ** Map Monster Stat Inc.
#-------------------------------------------------------------------------------
# Author Icedmetal57
# Version 1.0
# Date October 15th, 2006
#===============================================================================
#
# Description
#-------------------
# Increases all the monsters' stats on certain maps, random battle encounter,
# Action Battle Systems, or just Called Battle Processing, by a certain ammount.
#
# Instructions
#-------------------
# Scroll down a bit to the Stats_Inc, and Map_Name, and change to your liking.
# Those number for Stats_Inc can be a decimal, like 0.25 would be an increase
# of 25% or 1/4 their total stats.
#
# Example
#-------------------
# If you want to make all maps with a '*' in them, increase the monsters'
# stats by 1/4 their normal stats, then change the variables too...
#
# Stats_Inc = 0.25
# Map_Name = '*'
#
# Compatability
#-------------------
# Compatible with SDK.
# To make it compatible with non-SDK, just delete the SDK lines.
# To make compatible with Near's ABS or Mr. Mo's ABS,
# search for this line...
# Game_Enemy
# and change it to...
# Game_ABS_Enemy
#
#-------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Map Monster Stat Inc.', 'Icedmetal57', '1.0', 'Oct - 15 - 2006')
#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Map Monster Stat Inc.') == true
module Stat_Inc
#--------------------------------------------------------------------------
# * Variable Setup
#--------------------------------------------------------------------------
Stats_Inc = 0.25 # increases stats by their original,
# multiplied by this number.
Map_Name = '*' # maps that include this in it, will
# increase or decrease the stats
end
#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
# This class handles the map. It includes scrolling and passable determining
# functions. Refer to "$game_map" for the instance of this class.
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# * Loads map name.
#--------------------------------------------------------------------------
def name(id = map_id)
$map_data = load_data("Data/MapInfos.rxdata")
return $map_data[map_id].name
end
end
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
def base_maxhp
if ($game_map.name).include?(Stat_Inc::Map_Name.to_s) == true
maxhp = $data_enemies[@enemy_id].maxhp
maxhp2 = maxhp * (Stat_Inc::Stats_Inc.to_i / 100)
maxhp3 = maxhp + Integer(maxhp2)
return maxhp3.to_i
else
return $data_enemies[@enemy_id].maxhp
end
end
#--------------------------------------------------------------------------
def base_maxsp
if ($game_map.name).include?(Stat_Inc::Map_Name.to_s) == true
maxsp = $data_enemies[@enemy_id].maxsp
maxsp2 = maxsp * Stat_Inc::Stats_Inc
maxsp3 = maxsp + Integer(maxsp2)
return maxsp3.to_i
else
return $data_enemies[@enemy_id].maxsp
end
end
#--------------------------------------------------------------------------
def base_str
if ($game_map.name).include?(Stat_Inc::Map_Name.to_s) == true
str = $data_enemies[@enemy_id].str
str2 = str * Stat_Inc::Stats_Inc
str3 = str + Integer(str2)
return str3.to_i
else
return $data_enemies[@enemy_id].str
end
end
#--------------------------------------------------------------------------
def base_dex
if ($game_map.name).include?(Stat_Inc::Map_Name.to_s) == true
dex = $data_enemies[@enemy_id].dex
dex2 = dex * Stat_Inc::Stats_Inc
dex3 = dex + Integer(dex2)
return dex3.to_i
else
return $data_enemies[@enemy_id].dex
end
end
#--------------------------------------------------------------------------
def base_agi
if ($game_map.name).include?(Stat_Inc::Map_Name.to_s) == true
agi = $data_enemies[@enemy_id].agi
agi2 = agi * Stat_Inc::Stats_Inc
agi3 = agi + Integer(agi2)
return agi3.to_i
else
return $data_enemies[@enemy_id].agi
end
end
#--------------------------------------------------------------------------
def base_int
if ($game_map.name).include?(Stat_Inc::Map_Name.to_s) == true
int = $data_enemies[@enemy_id].int
int2 = int * Stat_Inc::Stats_Inc
int3 = int + Integer(int2)
return int3.to_i
else
return $data_enemies[@enemy_id].int
end
end
#--------------------------------------------------------------------------
def base_atk
if ($game_map.name).include?(Stat_Inc::Map_Name.to_s) == true
atk = $data_enemies[@enemy_id].atk
atk2 = atk * Stat_Inc::Stats_Inc
atk3 = atk + Integer(atk2)
return atk3.to_i
else
return $data_enemies[@enemy_id].atk
end
end
#--------------------------------------------------------------------------
def base_pdef
if ($game_map.name).include?(Stat_Inc::Map_Name.to_s) == true
pdef = $data_enemies[@enemy_id].pdef
pdef2 = pdef * Stat_Inc::Stats_Inc
pdef3 = pdef + Integer(pdef2)
return pdef3.to_i
else
return $data_enemies[@enemy_id].pdef
end
end
#--------------------------------------------------------------------------
def base_mdef
if ($game_map.name).include?(Stat_Inc::Map_Name.to_s) == true
mdef = $data_enemies[@enemy_id].mdef
mdef2 = mdef * Stat_Inc::Stats_Inc
mdef3 = mdef + Integer(mdef2)
return mdef3.to_i
else
return $data_enemies[@enemy_id].mdef
end
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
Código:
module Stat_Inc #-------------------------------------------------------------------------- # * Variable Setup #-------------------------------------------------------------------------- Stats_Inc = 0.25 # increases stats by their original, # multiplied by this number. Map_Name = '*' # maps that include this in it, will # increase or decrease the stats end Map_Name = '*' define que debe tener el nobmre del mapa al final para que tenga ese efecto. Por defecto debe tener un asterisco ( * ) al final del nombre del mapa. Cuidados aquellos que usan scripts que muestran el nombre del mapa. Compatibilidades: SDK Por defecto es por SDK. Sin-SDK Se pueden quitar la dependencia del SDK segun Icedmetal57. Solo borren estas lineas en el script: Código:
#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Map Monster Stat Inc.', 'Icedmetal57', '1.0', 'Oct - 15 - 2006')
#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Map Monster Stat Inc.') == true
Código:
#-------------------------------------------------------------------------- # * End SDK Enable Test #-------------------------------------------------------------------------- end Cambio De Posición Spoiler para -:
B]Descripción:[/B] Es un script que te permite cambiar la posicion del personaje en batalla desde el menu No es un cambio fisico, es para poder cambiar a guardia avanzada, dentro y atras. Script Código:
#===========================================
# Posicion De Batalla
#===========================================
# Script por: Kotfire
# Version 1
#-----------------------------------------------------------------------------
# -Instrucciones-
# Pegar encima de main y disfrutar
#-----------------------------------------------------------------------------
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :position # position
#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
alias setup_kot setup
def setup(actor_id)
actor = $data_actors[actor_id]
@class_id = actor.class_id
@position = $data_classes[@class_id].position
setup_kot(actor_id)
end
end
#==============================================================================
# ** Game_Party
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# * Random Selection of Target Actor
# hp0 : limited to actors with 0 HP
#--------------------------------------------------------------------------
def random_target_actor(hp0 = false)
# Initialize roulette
roulette = []
# Loop
for actor in @actors
# If it fits the conditions
if (not hp0 and actor.exist?) or (hp0 and actor.hp0?)
# Get actor class [position]
position = actor.position
# Front guard: n = 4; Mid guard: n = 3; Rear guard: n = 2
n = 4 - position
# Add actor to roulette n times
n.times do
roulette.push(actor)
end
end
end
# If roulette size is 0
if roulette.size == 0
return nil
end
# Spin the roulette, choose an actor
return roulette[rand(roulette.size)]
end
end
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
position = actor.position
x = 64 + 24 * position
y = i * 116
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 90, y)
draw_actor_hp(actor, x, y + 32)
draw_actor_sp(actor, x, y + 64)
draw_actor_level(actor, x + 184, y)
draw_actor_exp(actor, x + 184, y + 32)
end
end
#--------------------------------------------------------------------------
# * Cursor Rectangle Update
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
#==============================================================================
# ** Window_Steps
#------------------------------------------------------------------------------
# This window displays step count on the menu screen.
#==============================================================================
class Window_Steps < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Pasos")
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 32, $game_party.steps.to_s, 2)
end
end
#==============================================================================
# ** Scene_Save
#==============================================================================
class Scene_Save < Scene_File
#--------------------------------------------------------------------------
# * Decision Processing
#--------------------------------------------------------------------------
def on_decision(filename)
# Play save SE
$game_system.se_play($data_system.save_se)
# Write save data
file = File.open(filename, "wb")
write_save_data(file)
file.close
# If called from event
if $game_temp.save_calling
# Clear save call flag
$game_temp.save_calling = false
# Switch to map screen
$scene = Scene_Map.new
return
end
# Switch to menu screen
$scene = Scene_Menu.new(5)
end
#--------------------------------------------------------------------------
# * Cancel Processing
#--------------------------------------------------------------------------
def on_cancel
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# If called from event
if $game_temp.save_calling
# Clear save call flag
$game_temp.save_calling = false
# Switch to map screen
$scene = Scene_Map.new
return
end
# Switch to menu screen
$scene = Scene_Menu.new(5)
end
end
#==============================================================================
# ** Scene_End
#==============================================================================
class Scene_End
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Menu.new(6)
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # to title
command_to_title
when 1 # shutdown
command_shutdown
when 2 # quit
command_cancel
end
return
end
end
#--------------------------------------------------------------------------
# * Process When Choosing [Cancel] Command
#--------------------------------------------------------------------------
def command_cancel
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to menu screen
$scene = Scene_Menu.new(6)
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs menu screen processing.
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make command window
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Estado"
s5 = "Posición"
s6 = "Guardar"
s7 = "Salir"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
# If number of party members is 0
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
@command_window.disable_item(4)
end
# If save is forbidden
if $game_system.save_disabled
# Disable save
@command_window.disable_item(5)
end
# Make play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 256
# Make steps window
@steps_window = Window_Steps.new
@steps_window.x = 0
@steps_window.y = 352
# Make gold window
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
# Make status window
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@command_window.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@command_window.update
@playtime_window.update
@steps_window.update
@gold_window.update
@status_window.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
# If status window is active: call update_status
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when command window is active)
#--------------------------------------------------------------------------
def update_command
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Map.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# If command other than save or end game, and party members = 0
if $game_party.actors.size == 0 and @command_window.index < 4
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Branch by command window cursor position
case @command_window.index
when 0 # item
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_Item.new
when 1 # skill
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 5 # save
# If saving is forbidden
if $game_system.save_disabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to save screen
$scene = Scene_Save.new
when 6 # end game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to end game screen
$scene = Scene_End.new
end
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when status window is active)
#--------------------------------------------------------------------------
def update_status
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Make command window active
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 1 # skill
# If this actor's action limit is 2 or more
if $game_party.actors[@status_window.index].restriction >= 2
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to skill screen
$scene = Scene_Skill.new(@status_window.index)
when 2 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to equipment screen
$scene = Scene_Equip.new(@status_window.index)
when 3 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
$scene = Scene_Status.new(@status_window.index)
when 4
# Play decision SE
$game_system.se_play($data_system.decision_se)
unless $game_party.actors[@status_window.index].position >= 2
$game_party.actors[@status_window.index].position += 1
else
$game_party.actors[@status_window.index].position = 0
end
@status_window.refresh
end
return
end
end
end
¿Que es dentro guardia y atras? - Son unos parametros que se utilizan en el maker para determinar que personaje es atacado mas frecuentemente por los enemigos, siendo el mas atacado guardia luego dentro y el que menos atras. Creditos: Kotfire Control de encuentros y Rango de Visión Spoiler para -:
Descripción: Este script lo que hace es dar la opción de poder establecer áreas de batalla en forma rectangular o circular
Un ejemplo de lo que hace este script es que creas areas en las que en una de ellas haya tales encuentros de enemigos, y cuando pasas a otra, otros muy diferentes, y asi* sucesivamente, este script es ideal para los mapamundis. Necesita el View Range Module de Near Fanta¡stica y el SDK, pero despues de postear esos scripts postear otros dos, son los mismos pero sin la dependencia del SDK: Aqui* estan los scripts: Este es el View Range Module (Debe ir arriba del Script de Encounter Control y debajo del SDK): Código:
#==============================================================================
# ** View Range Module
#==============================================================================
# Near Fantastica
# Version 4
# 29.11.05
#==============================================================================
#--------------------------------------------------------------------------
# * SDK Log Script
#--------------------------------------------------------------------------
SDK.log("View Range", "Near Fantastica", 4, "29.11.05")
#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.state("View Range") == true
module VR
#----------------------------------------------------------------------------
def VR.in_range?(element, object, range)
x = (element.x - object.x) * (element.x - object.x)
y = (element.y - object.y) * (element.y - object.y)
r = x + y
if r <= (range * range)
return true
else
return false
end
end
#----------------------------------------------------------------------------
def VR.range(element, object)
x = (element.x - object.x) * (element.x - object.x)
y = (element.y - object.y) * (element.y - object.y)
r = x + y
r = Math.sqrt(r)
return r.to_i
end
end
#& nbsp;#==========================================================================
#====
class Interpreter
#----------------------------------------------------------------------------
def event
return $game_map.events[@event_id]
end
end
end
Código:
#==============================================================================
# ** Encounter Control
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1.01
# 2006-10-23
#------------------------------------------------------------------------------
# * Version History :
#
# Version 1 ---------------------------------------------------- (2006-08-12)
# Version 1.01 ------------------------------------------------ (2006-10-23)
# - Bug Fix : Fixed Erase Event
#------------------------------------------------------------------------------
# * Requirements :
#
# Near Fantastica's View Range Module
#------------------------------------------------------------------------------
# * Description :
#
# This script was designed to give you more control of Random Encounters
# Encounter Control allows you give terrain tags, circular regions and
# rectangular regions groups of enemies, instead of just map encounters.
# Additionally, it allows you to view in the debugger the regions on the map
#------------------------------------------------------------------------------
# * Instructions :
#
# Place The Script Below the SDK and Above Main.
#
# Setting Up Terrain Groups (Game_Map::Terrain_Tag_Groups)
# TTG = { map_id => { terrain_tag => [troop_id, ...], ... }, ... }
# (Use 0 for map_id as a default for all maps, unless specified)
#
# Setting Up Encounter Regions
# Adds a Comment Line with this format:
# Comment : Enc Ctrl <type>(<params>)[group_id, ...]
#
# <type> = Circ (Circluar Region) or Rect (Rectangular Region)
# Circular <params> = center_x, center_y, radius
# Rectangular <params> = upper_left_x, upper_left_y, rect_width, rect_height
#------------------------------------------------------------------------------
# * Credits :
#
# Thanks to Near Fantastica For His View Range Module
#==============================================================================
#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Encounter Control', 'SephirothSpawn', 1.01, '2006-10-23')
#------------------------------------------------------------------------------
# * View Range Test
#------------------------------------------------------------------------------
unless SDK.state('View Range')
# Print Error
p 'View Range Module Not Found. Encounter Control Disabled.'
# Disable Encounter Control
SDK.disable('Encounter Control')
end
#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Encounter Control')
#==============================================================================
# ** View Range Module Extension
#==============================================================================
module VR
#--------------------------------------------------------------------------
# * In Rect Range?
#--------------------------------------------------------------------------
def self.in_rect_range?(rect, object)
return object.x.between?(rect.x, rect.x + rect.width) &&
object.y.between?(rect.y, rect.y + rect.height)
end
end
#==============================================================================
# ** Circle
#==============================================================================
class Circle
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :x
attr_accessor :y
attr_accessor :radius
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y, r)
@x, @y, @radius = x, y, r
end
end
#==============================================================================
# ** Color
#==============================================================================
class Color
#--------------------------------------------------------------------------
# * To Hexidecimal
#--------------------------------------------------------------------------
def to_hex
n = (self.red.to_i * 100) + (self.green.to_i * 10) + self.blue.to_i
return eval "0x#{n.to_s(16)}"
end
end
#==============================================================================
# ** Game_Event
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# * Circle Encounter Areas
#--------------------------------------------------------------------------
def seph_circle_enconter_areas
# Starts Enc Areas
enc_areas = {}
# Return Enc Areas If No List
return enc_areas if @list.nil? || @erased
# Checks All Event Commands
for i in 0...@list.size
# Checks For Comment Line
if @list[i].code == 108
# If Parameters Include 'Enc Ctrl'
if @list[i].parameters[0].upcase.include?('ENC CTRL')
# Collect Encounter List For Area
@list[i].parameters[0].dup.gsub(/\[(.+?)\]/, '')
list = $1.split.collect! {|x| x.to_i}
# Test For Circular Range
if @list[i].parameters[0].upcase.include?('CIRC')
@list[i].parameters[0].dup.gsub(/\((.+?)\)/, '')
unless $1.nil?
circ = eval "Circle.new(#{$1})"
# Stores Enc List
enc_areas[circ] = list
end
end
end
end
end
# Return Encounter List
return enc_areas
end
#--------------------------------------------------------------------------
# * Rect Encounter Areas
#--------------------------------------------------------------------------
def seph_rect_encounter_areas
# Starts Enc Areas
enc_areas = {}
# Return Enc Areas If No List
return enc_areas if @list.nil?
# Checks All Event Commands
for i in 0...@list.size
# Checks For Comment Line
if @list[i].code == 108
# If Parameters Include 'Enc Ctrl'
if @list[i].parameters[0].upcase.include?('ENC CTRL')
# Collect Encounter List For Area
@list[i].parameters[0].dup.gsub(/\[(.+?)\]/, '')
list = $1.split.collect! {|x| x.to_i}
# Test For Rect Boundaries
if @list[i].parameters[0].upcase.include?('RECT')
@list[i].parameters[0].dup.gsub(/\((.+?)\)/, '')
unless $1.nil?
rect = eval "Rect.new(#{$1})"
# Stores Enc List
enc_areas[rect] = list
end
end
end
end
end
# Return Encounter List
return enc_areas
end
end
#==============================================================================
# ** Game_Map
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# * Terrain Tags
# ~ map_id = > {terrain_tag => [troop_id, ...] }
# * Use 0 For Default For All Maps
# * To Overwrite Default, Include Map ID And Define or Leave Blank Terrain
#--------------------------------------------------------------------------
Terrain_Tag_Groups = {
0 => {
}
}
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_enccntrl_gmmap_el encounter_list
#--------------------------------------------------------------------------
# * Get Encounter List
#--------------------------------------------------------------------------
def encounter_list
# Checks Terrain Tag Groups
if Terrain_Tag_Groups.has_key?(@map_id)
# Test For Player Terrain Tag
if Terrain_Tag_Groups[@map_id].has_key?($game_player.terrain_tag)
# Return List
return Terrain_Tag_Groups[@map_id][$game_player.terrain_tag]
end
# Checks For Default
elsif Terrain_Tag_Groups[0].has_key?($game_player.terrain_tag)
# Return List
return Terrain_Tag_Groups[0][$game_player.terrain_tag]
end
# Checks All Events
for event in $game_map.events.values
# Checks Circular Ranges Of Event
circ_ranges = event.seph_circle_enconter_areas
circ_ranges.each do |circle, list|
# If Player In Range of Circle
if VR.in_range?(circle, $game_player, circle.radius)
# Return List
return list
end
end
# Checks Rect Ranges
rect_ranges = event.seph_rect_encounter_areas
rect_ranges.each do |rect, list|
# If Player In Range of Rect
if VR.in_rect_range?(rect, $game_player)
# Return List
return list
end
end
end
# Return Original Encounter List
return seph_enccntrl_gmmap_el
end
end
#==============================================================================
# ** Spriteset_Map
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_encctrl_gmmap_init initialize
alias seph_encctrl_gmmap_update update
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Original Initialization
seph_encctrl_gmmap_init
# Creates Flash Data Table & Flash Tile Flag
@tilemap.flash_data = Table.new($game_map.width, $game_map.height)
@seph_encctrl_tilesflashing = false
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Original Update
seph_encctrl_gmmap_update
# If Debugging
if $DEBUG
# If A Button Is Pressed
if Input.trigger?(Input::A)
# If Tiles Flashing
if @seph_encctrl_tilesflashing
# Unflashes All Map Tiles
for x in 0...$game_map.width
for y in 0...$game_map.height
@tilemap.flash_data[x, y] = 0
end
end
# Turns Flashing Flag Off
@seph_encctrl_tilesflashing = false
# If Tiles Not Flashing
else
# Sets Up Colors Array (To Prevent Matching Colors
@flashtile_colors = []
# Checks All Events
for event in $game_map.events.values
# Flashes All Circular Ranges
event.seph_circle_enconter_areas.keys.each do |circle|
seph_flash_circular_range(circle, circle.radius)
end
# Flashes All Rect Ranges
event.seph_rect_encounter_areas.keys.each do |rect|
seph_flash_rect_range(rect)
end
# Turns Flashing Flag On
@seph_encctrl_tilesflashing = true
end
end
end
end
end
#--------------------------------------------------------------------------
# * Flash Circular Range
#--------------------------------------------------------------------------
def seph_flash_circular_range(object, range)
# Gets Flash Color
color = get_random_color while color.nil? ||
@flashtile_colors.include?(color)
# Flashes Tiles Within Range
x = object.x
for i in (x - range)..(x + range)
sa = (x - i).abs
x_ = i < x ? x - sa : i == x ? x : x + sa
y_ = Integer((range ** 2 - sa ** 2) ** 0.5)
for j in (object.y - y_)..(object.y + y_)
@tilemap.flash_data[i, j] = color.to_hex
end
end
end
#--------------------------------------------------------------------------
# * Flash Rect Range
#--------------------------------------------------------------------------
def seph_flash_rect_range(rect)
color = get_random_color while color.nil? ||
@flashtile_colors.include?(color)
for x in 0...rect.width
for y in 0...rect.height
@tilemap.flash_data[rect.x + x, rect.y + y] = color.to_hex
end
end
end
#--------------------------------------------------------------------------
# * Get Random Color
#--------------------------------------------------------------------------
def get_random_color
return Color.new(rand(18) * 15, rand(18) * 15, rand(18) * 15)
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
El View Range Module: Código:
#==============================================================================
# ** View Range Module
#==============================================================================
# Near Fantastica
# Version 4
# 29.11.05
#==============================================================================
module VR
#----------------------------------------------------------------------------
def VR.in_range?(element, object, range)
x = (element.x - object.x) * (element.x - object.x)
y = (element.y - object.y) * (element.y - object.y)
r = x + y
if r <= (range * range)
return true
else
return false
end
end
#----------------------------------------------------------------------------
def VR.range(element, object)
x = (element.x - object.x) * (element.x - object.x)
y = (element.y - object.y) * (element.y - object.y)
r = x + y
r = Math.sqrt(r)
return r.to_i
end
end
#& nbsp;#==========================================================================
#====
class Interpreter
#----------------------------------------------------------------------------
def event
return $game_map.events[@event_id]
end
end
Código:
#==============================================================================
# ** Encounter Control
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1.01
# 2006-10-23
#------------------------------------------------------------------------------
# * Version History :
#
# Version 1 ---------------------------------------------------- (2006-08-12)
# Version 1.01 ------------------------------------------------ (2006-10-23)
# - Bug Fix : Fixed Erase Event
#------------------------------------------------------------------------------
# * Requirements :
#
# Near Fantastica's View Range Module
#------------------------------------------------------------------------------
# * Description :
#
# This script was designed to give you more control of Random Encounters
# Encounter Control allows you give terrain tags, circular regions and
# rectangular regions groups of enemies, instead of just map encounters.
# Additionally, it allows you to view in the debugger the regions on the map
#------------------------------------------------------------------------------
# * Instructions :
#
# Place The Script Below the SDK and Above Main.
#
# Setting Up Terrain Groups (Game_Map::Terrain_Tag_Groups)
# TTG = { map_id => { terrain_tag => [troop_id, ...], ... }, ... }
# (Use 0 for map_id as a default for all maps, unless specified)
#
# Setting Up Encounter Regions
# Adds a Comment Line with this format:
# Comment : Enc Ctrl <type>(<params>)[group_id, ...]
#
# <type> = Circ (Circluar Region) or Rect (Rectangular Region)
# Circular <params> = center_x, center_y, radius
# Rectangular <params> = upper_left_x, upper_left_y, rect_width, rect_height
#------------------------------------------------------------------------------
# * Credits :
#
# Thanks to Near Fantastica For His View Range Module
#==============================================================================
#==============================================================================
# ** View Range Module Extension
#==============================================================================
module VR
#--------------------------------------------------------------------------
# * In Rect Range?
#--------------------------------------------------------------------------
def self.in_rect_range?(rect, object)
return object.x.between?(rect.x, rect.x + rect.width) &&
object.y.between?(rect.y, rect.y + rect.height)
end
end
#==============================================================================
# ** Circle
#==============================================================================
class Circle
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :x
attr_accessor :y
attr_accessor :radius
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y, r)
@x, @y, @radius = x, y, r
end
end
#==============================================================================
# ** Color
#==============================================================================
class Color
#--------------------------------------------------------------------------
# * To Hexidecimal
#--------------------------------------------------------------------------
def to_hex
n = (self.red.to_i * 100) + (self.green.to_i * 10) + self.blue.to_i
return eval "0x#{n.to_s(16)}"
end
end
#==============================================================================
# ** Game_Event
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# * Circle Encounter Areas
#--------------------------------------------------------------------------
def seph_circle_enconter_areas
# Starts Enc Areas
enc_areas = {}
# Return Enc Areas If No List
return enc_areas if @list.nil? || @erased
# Checks All Event Commands
for i in 0...@list.size
# Checks For Comment Line
if @list[i].code == 108
# If Parameters Include 'Enc Ctrl'
if @list[i].parameters[0].upcase.include?('ENC CTRL')
# Collect Encounter List For Area
@list[i].parameters[0].dup.gsub(/\[(.+?)\]/, '')
list = $1.split.collect! {|x| x.to_i}
# Test For Circular Range
if @list[i].parameters[0].upcase.include?('CIRC')
@list[i].parameters[0].dup.gsub(/\((.+?)\)/, '')
unless $1.nil?
circ = eval "Circle.new(#{$1})"
# Stores Enc List
enc_areas[circ] = list
end
end
end
end
end
# Return Encounter List
return enc_areas
end
#--------------------------------------------------------------------------
# * Rect Encounter Areas
#--------------------------------------------------------------------------
def seph_rect_encounter_areas
# Starts Enc Areas
enc_areas = {}
# Return Enc Areas If No List
return enc_areas if @list.nil?
# Checks All Event Commands
for i in 0...@list.size
# Checks For Comment Line
if @list[i].code == 108
# If Parameters Include 'Enc Ctrl'
if @list[i].parameters[0].upcase.include?('ENC CTRL')
# Collect Encounter List For Area
@list[i].parameters[0].dup.gsub(/\[(.+?)\]/, '')
list = $1.split.collect! {|x| x.to_i}
# Test For Rect Boundaries
if @list[i].parameters[0].upcase.include?('RECT')
@list[i].parameters[0].dup.gsub(/\((.+?)\)/, '')
unless $1.nil?
rect = eval "Rect.new(#{$1})"
# Stores Enc List
enc_areas[rect] = list
end
end
end
end
end
# Return Encounter List
return enc_areas
end
end
#==============================================================================
# ** Game_Map
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# * Terrain Tags
# ~ map_id = > {terrain_tag => [troop_id, ...] }
# * Use 0 For Default For All Maps
# * To Overwrite Default, Include Map ID And Define or Leave Blank Terrain
#--------------------------------------------------------------------------
Terrain_Tag_Groups = {
0 => {
}
}
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_enccntrl_gmmap_el encounter_list
#--------------------------------------------------------------------------
# * Get Encounter List
#--------------------------------------------------------------------------
def encounter_list
# Checks Terrain Tag Groups
if Terrain_Tag_Groups.has_key?(@map_id)
# Test For Player Terrain Tag
if Terrain_Tag_Groups[@map_id].has_key?($game_player.terrain_tag)
# Return List
return Terrain_Tag_Groups[@map_id][$game_player.terrain_tag]
end
# Checks For Default
elsif Terrain_Tag_Groups[0].has_key?($game_player.terrain_tag)
# Return List
return Terrain_Tag_Groups[0][$game_player.terrain_tag]
end
# Checks All Events
for event in $game_map.events.values
# Checks Circular Ranges Of Event
circ_ranges = event.seph_circle_enconter_areas
circ_ranges.each do |circle, list|
# If Player In Range of Circle
if VR.in_range?(circle, $game_player, circle.radius)
# Return List
return list
end
end
# Checks Rect Ranges
rect_ranges = event.seph_rect_encounter_areas
rect_ranges.each do |rect, list|
# If Player In Range of Rect
if VR.in_rect_range?(rect, $game_player)
# Return List
return list
end
end
end
# Return Original Encounter List
return seph_enccntrl_gmmap_el
end
end
#==============================================================================
# ** Spriteset_Map
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_encctrl_gmmap_init initialize
alias seph_encctrl_gmmap_update update
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Original Initialization
seph_encctrl_gmmap_init
# Creates Flash Data Table & Flash Tile Flag
@tilemap.flash_data = Table.new($game_map.width, $game_map.height)
@seph_encctrl_tilesflashing = false
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Original Update
seph_encctrl_gmmap_update
# If Debugging
if $DEBUG
# If A Button Is Pressed
if Input.trigger?(Input::A)
# If Tiles Flashing
if @seph_encctrl_tilesflashing
# Unflashes All Map Tiles
for x in 0...$game_map.width
for y in 0...$game_map.height
@tilemap.flash_data[x, y] = 0
end
end
# Turns Flashing Flag Off
@seph_encctrl_tilesflashing = false
# If Tiles Not Flashing
else
# Sets Up Colors Array (To Prevent Matching Colors
@flashtile_colors = []
# Checks All Events
for event in $game_map.events.values
# Flashes All Circular Ranges
event.seph_circle_enconter_areas.keys.each do |circle|
seph_flash_circular_range(circle, circle.radius)
end
# Flashes All Rect Ranges
event.seph_rect_encounter_areas.keys.each do |rect|
seph_flash_rect_range(rect)
end
# Turns Flashing Flag On
@seph_encctrl_tilesflashing = true
end
end
end
end
end
#--------------------------------------------------------------------------
# * Flash Circular Range
#--------------------------------------------------------------------------
def seph_flash_circular_range(object, range)
# Gets Flash Color
color = get_random_color while color.nil? ||
@flashtile_colors.include?(color)
# Flashes Tiles Within Range
x = object.x
for i in (x - range)..(x + range)
sa = (x - i).abs
x_ = i < x ? x - sa : i == x ? x : x + sa
y_ = Integer((range ** 2 - sa ** 2) ** 0.5)
for j in (object.y - y_)..(object.y + y_)
@tilemap.flash_data[i, j] = color.to_hex
end
end
end
#--------------------------------------------------------------------------
# * Flash Rect Range
#--------------------------------------------------------------------------
def seph_flash_rect_range(rect)
color = get_random_color while color.nil? ||
@flashtile_colors.include?(color)
for x in 0...rect.width
for y in 0...rect.height
@tilemap.flash_data[rect.x + x, rect.y + y] = color.to_hex
end
end
end
#--------------------------------------------------------------------------
# * Get Random Color
#--------------------------------------------------------------------------
def get_random_color
return Color.new(rand(18) * 15, rand(18) * 15, rand(18) * 15)
end
end
Cita:
Luego, reemplacen dentro del parentesis <params> Por estas indicaciones (son distintas, depende del tipo, si es Rect o Circ) Para el a¡rea de tipo rect es: Coordenadas en x para la esquina superior izquierda, Coordenadas en y para la esquina superior izquierda, Nº de cuadros que tendras de ancho, Nº de cuadros que tendras de alto Y para el tipo Circ es: Coordenadas en x para el centro del ci*rculo, Coordenadas en y para el centro del circulo, Nº de cuadros que tendras el radio del ci*rculo Despues, dentro de los corchetes ( [ ] ) reemplacen group_id por la ID del grupo de enemigos que apareceran en esa area (tambien pueden ser varios, solo dividanlos con comas, por ejemplo [3, 4, 1] de esta forma apareceran en esa area los grupos con las IDs 3, 4 y 1) Un ejemplo de como quedar*a toda la anotacion ya hecha seri*a este: Enc Ctrl Rect(000, 000, 5, 5)[3, 2, 5] Eso indica que se crear un a¡rea de batalla en forma rectangular donde la esquina superior izquierda estara en las coordenadas x y y de 000, 000, tendra 5 cuadros de hancho y 5 de alto y dentro de esa area apareceran los grupos de enemigos con los IDs 3, 2 y 5. Creo que esa es la explicacion ba¡sica de como funciona el script, hasta ahora no le he hallado bugs. Ya se que todo esto lo tengo muy parado desde hace ya 2 años mas o menos. Intentare en todo lo posible sacar "Algo de tiempo" y poner los scripts de otra forma, ya bien subiendolos o poniendolos en otra pag aparte, pero el querer poner tantos scripts en un solo post, aparte de ser lioso con tanto spoiler escondiendo el codigo, tarda con todas las palabras un huevo en actualizar todo el post (Y eso que solo llevo poco scripts...) Última edición por Doest; 01-Mar-2009 a las 16:26 |
|
||||
|
Che que pasa q no hay más info sobre RPG VX?
Taría bueno si alguien conoce o tiene, que aporte los scrpts para esta nueva versión ^^. Busqué en google algo, pero soy pésimo para el inglés, así que si puede poner los scripts o poner alguna buena página que los tenga a todos medianamente ordenados, se los agradecería. |
|
||||
|
Me puede ayudar alguien, por favor? Eske hace tiempo ke no pongo scripts y ni me acuerdo de como se hacia, me voy a hacer una copia del proyecto y voy a intentar ponerlo ahi, por si acaso se fastidiara ke me kede el original... xD Supongo ke se añadira una pagina mas en los scripts y ke con copiar y pegar bastara no? Por si acaso contestad, ande mal encaminado o no, por favor
![]() _____________________________________________ Nada, he probado a ponerlos y no me funcionan aparte ke hay varias cosas ke no entiendo... :S Y porke solo hay dos spoilers con contenido? Por ahi hay uno de cambiar el sistema de batalla en construccion pero metalmorph ofrecio dar el script, porke no lo ponen? Me gustaria poder usarlo Última edición por Mikawa; 10-Aug-2008 a las 13:13 |
|
||||
|
ya edito el 1 post xD, ya que pase el año pasado, un poco duro y se me paso este post ^_^.
dentro de nada o nada estara lleno ![]() PD: aqui no resuelvo dudas, solo aporto Scrips para el RPGMK- XP y ahora que encontrado mas del RPGMK-VX lo posteare. Saludos
|
|
||||
|
Cita:
Porque nadie, nunca se toma el tiempo de leer los posts, e informarse de que aqui no resuelvo dudas i/o consigo pedidos, ya que solo busco Scrips para el RPG Maker XP y VX y los añado a la lista... Y repito: esta no es la seccion de pedidos...> Importante: Zona de pedidos de recursos RPG Maker XP Deluxe Sino te vale esa seccion del foro para hacer el pedido, yo no puedo ayudarte ![]() Saludos
Última edición por Doest; 20-Oct-2008 a las 12:51 |
![]() |
| (0 miembros y 1 visitantes) | |
| Herramientas | |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Indice de recopilaciones | SketchDeluxe | Recopilaciones de DC | 16 | 29-Mar-2010 09:47 |
| (DD) Recopilacion de ISOs de PSX [Sólo Aportes] | Catastrophe | Recopilaciones de DC | 108 | 16-Jan-2010 15:51 |
| [DD] Recopilacion de Abandonware | Mancifer | Recopilaciones de DC | 61 | 24-Aug-2008 21:24 |
| Recopilación de Libros by Gerar | Gerar | Biblioteca | 4 | 14-Jun-2008 19:56 |
| ¿Interesaria recopilación de ISOS de Sega Saturn? | thafestco | Recopilaciones de DC | 1 | 04-May-2007 18:23 |
|
Torneo DC 2012
|
| LinkBack |
LinkBack URL |
About LinkBacks |











Doest has played 400 hours of 







