Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
member
group: member
posts: 32
joined: 26-november 04
member no.: 36
i thought people might want this as this is a simple edit of the atb
battle system by makiorau (something like that) this shows new skills
learned at level up
code
#===========================================================================
===
# new_battle
#---------------------------------------------------------------------------
---
# compiled by : makirouaru
#===========================================================================
===
# ?????? xrxs_bp 3. ??????hp? ver.1.01 ??????
# by fukuyama, ???ݓy
# battle_end_recovery
#
# ?퓬?れ? ??????w???[??
#
# request: stay
# script: fukuyama
# test: ?m?r?m?q
#
# url: http://www4.big.or.jp/~fukuyama/rgss/battle_end_recovery.txt
#
#===========================================================================
===
# new_battle
#---------------------------------------------------------------------------
---
# compiled by : makirouaru
#===========================================================================
===
# ?????? xrxs_bp 3. ??????hp? ver.1.01 ??????
# by fukuyama, ???ݓy
# battle_end_recovery
#
# ?퓬?れ? ??????w???[??
#
# request: stay
# script: fukuyama
# test: ?m?r?m?q
#
# url: http://www4.big.or.jp/~fukuyama/rgss/battle_end_recovery.txt
#
module battle_end_recovery
module scene_battle_module
# ? ??ϐ??̉d
@@recovery_rate_variable_id = nil
# ? ??̎擾
def battle_end_recovery_rate
if @@recovery_rate_variable_id.nil?
@@recovery_rate_variable_id =
$data_system.variables.index '?퓬?れ? ?'
if @@recovery_rate_variable_id.nil?
@@recovery_rate_variable_id = false
end
end
return 0 unless @@recovery_rate_variable_id
return $game_variables[@@recovery_rate_variable_id]
end
# ?퓬?れ? ???
def battle_end_recovery
# ? ?
recovery_rate = battle_end_recovery_rate
# ? ??ϐ????o?Ȋo???a?n?^?[?????????Ă??鏪???a?퓬?れ? ??????
if recovery_rate != 0 and not actor.dead?
# ?p?[?e?b?a?n?^?[???
̃ Ƀ??[?v
$game_party.actors.each do |actor|
# ? ʌv?z
recovery_hp = (actor.maxhp / 20.0 * recovery_rate).truncate
recovery_sp = (actor.maxsp / 20.0 * recovery_rate).truncate
# ??ۂɉ br /> actor.hp += recovery_hp
actor.sp += recovery_sp
end
# ?x?e?[?^?x?e?b???h?e??v
@status_window.refresh
end
end
#------------------------------
# ?퓬?v?[???̍Ē 苠
#------------------------------
class scene_battle
# scene_battle?p???w???[??????n???[?h
include battle_end_recovery::scene_battle_module
# ???t?f?[?y?t?j?n?
̃ ɕʖ?????鼢 r /> alias
battle_end_recovery_original_start_phase5 start_phase5
# ?t?f?[?y?t?j?n??苠
def start_phase5
# ?퓬?れ? ?????яo??
battle_end_recovery
# ???t?f?[?y?t?j?n??
̃ яo??
battle_end_recovery_original_start_phase5
end
end
# battle_end_recovery
#===========================================================================
===
# ? ?j?x?^?}?c?y?|?c???g
#===========================================================================
===
class scene_battle
level_up_se = "" # ???x???a?b?vse?b""?Ŗ????b
level_up_me = "audio/me/007-fanfare01" # ???x???a?b?vme
end
class window_skilllearning < window_base
skilllearn_se = "audio/se/106-heal02" # ?x?l???k??se?b
end
#===========================================================================
===
# ?? window_levelupwindow
#---------------------------------------------------------------------------
---
# ?@?o?g???i?????a???x???a?b?v????? ?Ƀx?e?[?^?x? 092;?????郅?b???h?e?ł??b
#===========================================================================
===
class window_levelupwindow < window_base
#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
def initialize(x, y, actor, last_lv, up_hp, up_sp, up_str, up_dex,
up_agi, up_int)
# super(x, y, 160, 192)
super(x, y-32, 160, 192+32)
#--------------------------------------------------------------------------
# ?? ???t???b?v??
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# ?? ???t???b?v??
#--------------------------------------------------------------------------
def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
self.contents.clear
self.contents.font.color = system_color
self.contents.font.name = "arial"
self.contents.font.size = 14
self.contents.draw_text( 0, 0, 160, 24, "level up!!")
self.contents.font.size = 18
self.contents.draw_text( 0, 28, 160, 24, $data_system.words.hp)
self.contents.draw_text( 0, 50, 160, 24, $data_system.words.sp)
self.contents.font.size = 14
self.contents.draw_text( 0, 72, 80, 24, $data_system.words.str)
self.contents.draw_text( 0, 94, 80, 24, $data_system.words.dex)
self.contents.draw_text( 0, 116, 80, 24, $data_system.words.agi)
self.contents.draw_text( 0, 138, 80, 24, $data_system.words.int)
self.contents.draw_text(92, 0, 128, 24, "??")
self.contents.draw_text(76, 28, 128, 24, "=")
self.contents.draw_text(76, 50, 128, 24, "=")
self.contents.draw_text(76, 72, 128, 24, "=")
self.contents.draw_text(76, 94, 128, 24, "=")
self.contents.draw_text(76, 116, 128, 24, "=")
self.contents.draw_text(76, 138, 128, 24, "=")
self.contents.font.color = normal_color
self.contents.draw_text( 0, 0, 88, 24, last_lv.to_s, 2)
self.contents.draw_text( 0, 28, 72, 24, "+" + up_hp.to_s, 2)
self.contents.draw_text( 0, 50, 72, 24, "+" + up_sp.to_s, 2)
self.contents.draw_text( 0, 72, 72, 24, "+" + up_str.to_s, 2)
self.contents.draw_text( 0, 94, 72, 24, "+" + up_dex.to_s, 2)
self.contents.draw_text( 0, 116, 72, 24, "+" + up_agi.to_s, 2)
self.contents.draw_text( 0, 138, 72, 24, "+" + up_int.to_s, 2)
self.contents.font.size = 20
self.contents.draw_text( 0, 0, 128, 24, actor.level.to_s, 2)
self.contents.draw_text( 0, 26, 128, 24, actor.maxhp.to_s, 2)
self.contents.draw_text( 0, 48, 128, 24, actor.maxsp.to_s, 2)
self.contents.draw_text( 0, 70, 128, 24, actor.str.to_s, 2)
self.contents.draw_text( 0, 92, 128, 24, actor.dex.to_s, 2)
self.contents.draw_text( 0, 114, 128, 24, actor.agi.to_s, 2)
self.contents.draw_text( 0, 136, 128, 24, actor.int.to_s, 2)
end
end
#===========================================================================
===
# ?? window_skilllearning
#---------------------------------------------------------------------------
---
# ?@???x???a?b?v???ȂǂɃx?l?????????? ?ɂ?? ?\?????郅?b???h?e?ł??b
#===========================================================================
===
class window_skilllearning < window_base
#--------------------------------------------------------------------------
# ?? ??c???x?^???x?ϐ?
#--------------------------------------------------------------------------
attr_reader :learned # ?x?l????????????ǂ???
#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
def initialize(class_id, last_lv, now_lv)
super(160, 64-32, 320, 64)
#--------------------------------------------------------------------------
# ?? ???t???b?v??
#--------------------------------------------------------------------------
def refresh(class_id, last_lv, now_lv)
for i in 0...$data_classes[class_id].learnings.size
learn_lv = $data_classes[class_id].learnings[i].level
# ??? ??x???a?b?v?͈͂ŏk?????郘?l???̏
if learn_lv > last_lv and learn_lv <= now_lv
@learned = true
# se?̍Đ?
if skilllearn_se != ""
audio.se_play(skilllearn_se)
end
# ?e?`?ʼbr /> skill_name =
$data_skills[$data_classes[class_id].learnings[i].skill_id].name
self.contents.clear
self.contents.font.name = $fontface
self.contents.draw_text(0,0,448,32, skill_name + " learned !!")
self.visible = true
# ???c?????[?v
loop do
# ?q?[???斊??v
graphics.update
# ?? x?v
input.update
# ?t???[???x?v
update
# ?斊???葖?킁???烋?[?v? f
if @learned == false
break
end
end
# ???c?????[?v?????܂żbr /> end
end
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v
#--------------------------------------------------------------------------
def update
# c ?{?^????????? ?
if input.trigger?(input::c)
@learned = false
self.visible = false
end
end
end
#===========================================================================
===
# ?? window_battlestatus
#===========================================================================
===
class window_battlestatus < window_base
#--------------------------------------------------------------------------
# ?? ?lj?e??c???x?^???x?ϐ?
#--------------------------------------------------------------------------
attr_accessor :level_up_flags # level up!?\??
end
#===========================================================================
===
# ?? scene_battle
#===========================================================================
===
class scene_battle
#--------------------------------------------------------------------------
# ?? ?a?t?^?[?o?g???t?f?[?y?j?n
#--------------------------------------------------------------------------
alias xrxs_bp10_start_phase5 start_phase5
def start_phase5
xrxs_bp10_start_phase5
# ?l?? exp???
@exp_gained = battle_exp
# exp ?l????菁??
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp -= @exp_gained
if actor.level < last_level
@status_window.level_up_flags[i] = false
end
end
end
# ?ݒ輢 r /> @exp_gain_actor = -1
# ???u???g?e?b???h?e? 092;??
@result_window.visible = true
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (?a?t?^?[?o?g???t?f?[?y)
#--------------------------------------------------------------------------
alias xrxs_bp10_update_phase5 update_phase5
def update_phase5
@level_up_phase_done = false if @level_up_phase_done != true
# c ?{?^????????? ?
if input.trigger?(input::c)
# ?e?b???h?e? ??Ď??̃a?n?^?[?ּbr /> @levelup_window.visible =
false if @levelup_window != nil
@status_window.level_up_flags[@exp_gain_actor] = false
@level_up_phase_done = phase5_next_levelup
end
if @level_up_phase_done
if @phase5_wait_count < 2
# ???u???g?e?b???h?e? ible=true?ł????ɼbr />
@result_window.opacity = 0
@result_window.back_opacity = 0
@result_window.contents_opacity = 0
end
# ?Ăі ?
xrxs_bp10_update_phase5
͋
# ???x???a?b?v???Ă??鏪???????o?g???i??
battle_end(0) if @levelup_window != nil and @phase5_wait_count <= 0
end
end
#--------------------------------------------------------------------------
# ?? ???a?n?^?[???x???a?b?v?\???
̃ ̃ ּbr />
#--------------------------------------------------------------------------
def phase5_next_levelup
begin
# ???a?n?^?[?
̃ ּbr /> @exp_gain_actor += 1
# ?Ō れ?a?n?^?[?̏
if @exp_gain_actor >= $game_party.actors.size
# ?a?t?^?[?o?g???t?f?[?y?j?n
return true
end
actor = $game_party.actors[@exp_gain_actor]
if actor.cant_get_exp? == false
# ???݂̔\?l?
͒ ?
last_level = actor.level
last_maxhp = actor.maxhp
last_maxsp = actor.maxsp
last_str = actor.str
last_dex = actor.dex
last_agi = actor.agi
last_int = actor.int
# ?퓬?o???l?̍Ď 擾
actor.exp += @exp_gained
# ???輢 r /> if actor.level > last_level
# ???x???a?b?v?????
@status_window.level_up(@exp_gain_actor)
# ???u???g?e?b???h?e???
@result_window.visible = false
# se?̍Đ?
if level_up_se != ""
audio.se_play(level_up_se)
end
# me?̍Đ?
if level_up_me != ""
audio.me_stop
audio.me_play(level_up_me)
end
# level-up?e?b???h?e?̐ݒ輢 r /> actors_size =
[$game_party.actors.size, 4].max
x_shift = 160 + (640 - 160*actors_size)/(actors_size - 1)
x = x_shift * @exp_gain_actor
y = 128
@levelup_window = window_levelupwindow.new(x, y, actor,
last_level,
actor.maxhp - last_maxhp, actor.maxsp - last_maxsp, actor.str -
last_str,
actor.dex - last_dex, actor.agi - last_agi, actor.int -
last_int)
@levelup_window.visible = true
# ?x?e?[?^?x?e?b???h?e??t???b?v??
@status_window.refresh
# ?x?l???k???e?b???h?e?̐ݒ輢 r /> @skilllearning_window =
window_skilllearning.new(actor.class_id, last_level, actor.level)
# ?e?f?c?g?j?e???g? 輢 r /> @phase5_wait_count = 40
return false
end
end
end until false
end
def battle_exp
bexp = 0
# ???[?v
for enemy in $game_troop.enemies
# ?g?l?~?[???b? ?ԂłȂ??
unless enemy.hidden
# ?l??? ?br /> bexp += enemy.exp
end
end
return bexp
end
end
#===========================================================================
===
# ?? game_battler
#===========================================================================
===
class game_battler
#--------------------------------------------------------------------------
# ?? ?x???b?v?_???[?w?̌??p
#--------------------------------------------------------------------------
alias xrxs_bp7_slip_damage_effect slip_damage_effect
def slip_damage_effect
# ???l?̏???r /> slip_damage_percent = 0
slip_damage_plus = 0
# ???ݕt???? ???郘?e?[?g?̒????烘???b?v?_???[?w?l?肌???m? ?
for i in @states
if $data_states[i].slip_damage
# ???x?e?[?g??????
̃ Ă??郘???b?v?_???[?w?̼br /> #
͌
lv?v???x?x?e?[?g???܂v?}?c?i?x?x?e?[?g? 聂
for j in $data_states[i].plus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^?x???b?v([0-9]+)(%|??)/
slip_damage_percent += $1.to_i
elsif $data_states[j].name =~ /^?x???b?v([0-9]+)$/
slip_damage_plus += $1.to_i
end
end
end
for j in $data_states[i].minus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^?x???b?v([0-9]+)(%|??)/
slip_damage_percent -= $1.to_i
elsif $data_states[j].name =~ /^?x???b?v([0-9]+)$/
slip_damage_plus -= $1.to_i
end
end
end
end
end
if slip_damage_percent == 0 and slip_damage_plus == 0
xrxs_bp7_slip_damage_effect
else
# ?h? ?x???b?v?h? ? ?鏪??? 輢 r /> for i in [@armor1_id, @armor2_id,
@armor3_id, @armor4_id]
armor = $data_armors[i]
next if armor == nil
for j in armor.guard_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^?x???b?v([0-9]+)(%|??)/
if slip_damage_percent > 0
slip_damage_percent = [slip_damage_percent - $1.to_i, 0].max
end
end
if $data_states[j].name =~ /^?x???b?v([0-9]+)$/
if slip_damage_percent > 0
slip_damage_plus = [slip_damage_plus - $1.to_i, 0].max
end
end
end
end
end
# ?_???[?w? 輢 r /> self.damage = self.maxhp * slip_damage_percent
/ 100 + slip_damage_plus
# ???u
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# hp ???烟???[?w??z
self.hp -= self.damage
# ???\?b?h?i??
return true
end
end
end
# ?????? xrxs_bp 1. cp??????15 ??????
# by ???ݓy, ?a? ack-r
#===========================================================================
===
# ?? scene_battle_cp
#===========================================================================
===
class scene_battle_cp
#--------------------------------------------------------------------------
# ?? ??c???x?^???x?ϐ?
#--------------------------------------------------------------------------
attr_accessor :stop # cp??z?x?g?b?v
#---------------------------------------------------------------------------
-
# ?? ?i?u?w?f?n?g?̏???r />
#---------------------------------------------------------------------------
-
def initialize
@battlers = []
@cancel = false
@agi_total = 0
# ?z? ount_battlers ???r /> @count_battlers = []
# ?g?l?~?[? ount_battlers ?ɒlj?br /> for enemy in
$game_troop.enemies
@count_battlers.push(enemy)
end
# ?a?n?^?[? ount_battlers ?ɒlj?br /> for actor in $game_party.actors
@count_battlers.push(actor)
end
for battler in @count_battlers
@agi_total += battler.agi
end
for battler in @count_battlers
battler.cp = [[65535 * (rand(15) + 85) / 100 * battler.agi /
@agi_total * 4, 0].max, 65535].min
end
end
#---------------------------------------------------------------------------
-
# ?? cp?j?e???g?̊j?n
#---------------------------------------------------------------------------
-
def start
if @cp_thread != nil then
return
end
@cancel = false
@stop = false
# ???????烘???b?h
@cp_thread = thread.new do
while @cancel != true
if @stop != true
self.update # ?x?v
sleep(0.05)
end
end
end
# ?????܂Ńx???b?h
end
#---------------------------------------------------------------------------
-
# ?? cp?j?e???g?a?b?v
#---------------------------------------------------------------------------
-
def update
if @count_battlers != nil then
for battler in @count_battlers
# ?s???o???Ȃ?? ????
if battler.dead? == true #or battler.movable? == false then
battler.cp = 0
next
end
# ?????̠1.3? ??邱?ƂŁ??x?s?[?h? x?\?b???????????_?g?p???
͎ 邱?Ɓb
battler.cp = [[battler.cp + 1.3 * 4096 * battler.agi / @agi_total,
0].max, 65535].min
end
end
end
#---------------------------------------------------------------------------
-
# ?? cp?j?e???g?̊j?n
#---------------------------------------------------------------------------
-
def stop
@cancel = true
if @cp_thread != nil then
@cp_thread.join
@cp_thread = nil
end
end
end
#===========================================================================
===
# ?? game_battler
#===========================================================================
===
class game_battler
attr_accessor :now_guarding # ???ݖh? ?t???o
# ???蠓 e ??t
$game_system.se_play($data_system.decision_se)
@cp_thread.start
# ?a?n?^?[?r?}???h?t?f?[?y?j?n
start_phase3
end
return
end
xrxs_bp1_update_phase2
end
#--------------------------------------------------------------------------
# ?? ???a?n?^?[?r?}???h??br
̃ ̃ />
#--------------------------------------------------------------------------
def phase3_next_actor
# ???[?v
begin
# ?a?n?^?[?̖??Ńg?t?f?n?g off
if @active_battler != nil
@active_battler.blink = false
end
# ?Ō れ?a?n?^?[?̏
if @actor_index == $game_party.actors.size-1
# ???c???t?f?[?y?j?n
@cp_thread.start
start_phase4
return
end
# ?a?n?^?[?c???f?b?n?x?
̃ 鼢 r /> @actor_index += 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
if @active_battler.inputable? == false
@active_battler.current_action.kind = -1
end
# ?a?n?^?[???r?}???h?? t???Ȃ?? Ȃ 炠???
end until @active_battler.inputable?
@cp_thread.stop
# ?a?n?^?[?r?}???h?e?b???h?e??b?g?a?b?v
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ?? ?o?a?n?^?[?r?}???h??br
̃ ̃ />
#--------------------------------------------------------------------------
def phase3_prior_actor
# ???[?v
begin
# ?a?n?^?[?̖??Ńg?t?f?n?g off
if @active_battler != nil
@active_battler.blink = false
end
# ?ŏ??a?n?^?[?
̃ ̏
if @actor_index == 0
# ?ŏ??֖ 鼢 r /> start_phase3
return
end
# ?a?n?^?[?c???f?b?n?x?
̃ ?
@actor_index -= 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
# ?a?n?^?[???r?}???h?? t???Ȃ?? Ȃ 炠???
end until @active_battler.inputable?
@cp_thread.stop
# ?a?n?^?[?r?}???h?e?b???h?e??b?g?a?b?v
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ?? ?a?n?^?[?r?}???h?e?b???h?e?z?b?g?a?b?v
̃
#--------------------------------------------------------------------------
alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
# ???̍Đ?
audio.se_play($data_system_command_up_se) if $data_system_command_up_se
!= ""
# ? ?
xrxs_bp1_phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (?a?n?^?[?r?}???h?t?f?[?y : ??r?}???h)
#--------------------------------------------------------------------------
alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
# c ?{?^????????? ?
if input.trigger?(input::c)
# ?a?n?^?[?r?}???h?e?b???h?e?j?[?\???
̃ ʒu?ŕ?? /> case
@actor_command_window.index
when 4 # ?????鼢 r /> if $game_temp.battle_can_escape
# ???蠓 e ??t
$game_system.se_play($data_system.decision_se)
# ?a?n?v????? 輢 r /> @active_battler.current_action.kind =
0
@active_battler.current_action.basic = 4
# ???a?n?^?[?r?}???h??br
̃ ̃ /> phase3_next_actor
else
# ?u?u?[ se ??t
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
xrxs_bsp1_update_phase3_basic_command
end
#--------------------------------------------------------------------------
# ?? ???c???t?f?[?y?j?n
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase4 start_phase4
def start_phase4
xrxs_bp1_start_phase4
# ?g?l?~?[?a?n?v?????쐬
for enemy in $game_troop.enemies
if enemy.cp < 65535
enemy.current_action.clear
enemy.current_action.kind = -1 # ?^?[??? ??b
next
end
enemy.make_action
end
# ?s???????쐬
make_action_orders
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (???c???t?f?[?y ?x?e?b?v 1 : ?a?n?v????????1;
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step1 update_phase4_step1
def update_phase4_step1
# ????r /> @phase4_act_continuation = 0
# ???s???輢 r /> if judge
@cp_thread.stop
͔
# ???????܂s?k?̏ : ???\?b?h?i??
return
end
# ???s???o?g???[?z? 擪???玦??
@active_battler = @action_battlers[0]
# ?x?e?[?^?x?x?v?????? ?聂
@status_window.update_cp_only = true
# ?x?e?[?g?x?v??~?b
@active_battler.slip_state_update_ban = true if @active_battler != nil
# ? ?
xrxs_bp1_update_phase4_step1
# ? ~???
@status_window.update_cp_only = false
@active_battler.slip_state_update_ban = false if @active_battler != nil
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (???c???t?f?[?y ?x?e?b?v 2 : ?a?n?v?????j?n)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# ?????a?n?v?????łȂ??
unless @active_battler.current_action.forcing
# cp?????肄???Ȃ??
if @phase4_act_continuation == 0 and @active_battler.cp < 65535
@phase4_step = 6
return
end
# ??? [?g? 퍕?????馣 93; ?? [?????퍕?????馣 93; ?̏
if @active_battler.restriction == 2 or @active_battler.restriction ==
3
# ?a?n?v?????ɍu??? 輢 r /> @active_battler.current_action.kind
= 0
@active_battler.current_action.basic = 0
end
# ??? [?s???ł??Ȃ?] ?̏
if @active_battler.restriction == 4
# ?a?n?v?????????Ώ ̃ۂo?g???[????a
$game_temp.forcing_battler = nil
if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
# ?x?e?[?g???r??br /> @active_battler.remove_states_auto
# cp??B r /> @active_battler.cp = [(@active_battler.cp -
65535),0].max
# ?x?e?[?^?x?e?b???h?e??t???b?v??
@status_window.refresh
end
# ?x?e?b?v 1 ?Ɉڍs
@phase4_step = 1
return
end
end
# ?a?n?v?????̎핊?ŕ?? /> case @active_battler.current_action.kind
when 0
# ?u????h?䁅?????遅?????Ȃ??????
̋ ʏ?
@active_battler.cp -= 0 if @phase4_act_continuation == 0
when 1
# ?x?l???g?p???̏?
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when 2
# ?a?c?e???g?p???̏?
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when -1
# cp??????܂Ă??Ȃ?
@phase4_step = 6
return
end
# cp??z???? ???鼢 r /> @cp_thread.stop = true
# ?x?e?[?g???r??br /> @active_battler.remove_states_auto
xrxs_bp1_update_phase4_step2
end
#--------------------------------------------------------------------------
# ?? ??a?n?v???? ??? 쐬
#--------------------------------------------------------------------------
alias xrxs_bp1_make_basic_action_result make_basic_action_result
def make_basic_action_result
# ?u???̏
if @active_battler.current_action.basic == 0 and
@phase4_act_continuation == 0
@active_battler.cp -= 65535 # ?u?????p??
̃ B r /> end
# ?h? ?
if @active_battler.current_action.basic == 1 and
@phase4_act_continuation == 0
@active_battler.cp -= 32767 # ?h? ?p??
̃ B r /> end
# ?g?̓????邌?
if @active_battler.is_a?(game_enemy) and
@active_battler.current_action.basic == 2 and
@phase4_act_continuation == 0
@active_battler.cp -= 65535 # ???????p??
̃ B r /> end
# ?????Ȃ??̏
if @active_battler.current_action.basic == 3 and
@phase4_act_continuation == 0
@active_battler.cp -= 32767 # ?????Ȃ????p??
̃ B r /> end
# ?????邌?
if @active_battler.current_action.basic == 4 and
@phase4_act_continuation == 0
@active_battler.cp -= 65535 # ???????p??
̃ B r /> # ?????\?ł͂Ȃ??
if $game_temp.battle_can_escape == false
# ?u?u?[ se ??t
$game_system.se_play($data_system.buzzer_se)
return
end
# ???蠓 e ??t
$game_system.se_play($data_system.decision_se)
# ????????
update_phase2_escape
return
end
xrxs_bp1_make_basic_action_result
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (???c???t?f?[?y ?x?e?b?v 5 : ?_???[?w?\??)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step5 update_phase4_step5
def update_phase4_step5
# ?x???b?v?_???[?w
if @active_battler.hp > 0 and @active_battler.slip_damage?
@active_battler.slip_damage_effect
@active_battler.damage_pop = true
end
xrxs_bp1_update_phase4_step5
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (???c???t?f?[?y ?x?e?b?v 6 : ???t???b?v??)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step6 update_phase4_step6
def update_phase4_step6
# cp??z??j???鼢 r /> @cp_thread.stop = false
# ?w???v?e?b???h?e???
@help_window.visible = false
xrxs_bp1_update_phase4_step6
end
end
# ?????? xrxs_bp 7. ?o?g???x?e?[?^?x?e?n???a?f?u?c?? ver.1.02 ??????
# by ???ݓy, tomy
#===========================================================================
===
# ?? window_battlestatus
#===========================================================================
===
class window_battlestatus < window_base
#--------------------------------------------------------------------------
# ?? ??c???x?^???x?ϐ?
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # cp???[?^?[?݂̂̍x?v
#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
alias xrxs_bp7_initialize initialize
def initialize
xrxs_bp7_initialize
͉
# ??full-view?̏ ??? ̠# ????Ă????????b
#self.opacity = 0
#self.back_opacity = 0
end
#--------------------------------------------------------------------------
# ?? ???t???b?v??
#--------------------------------------------------------------------------
alias xrxs_bp7_refresh refresh
def refresh
if @update_cp_only
xrxs_bp7_refresh
return
end
# ?`?ʂ?~???Ȃ??疟??
@draw_ban = true
xrxs_bp7_refresh
# ?`?ʂ̋ ~???
@draw_ban = false
# ?`?ʂ?n
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 21
# ???l?????o???t?b?b?n?̕`?ʼbr /> draw_actor_graphic(actor, actor_x
- 9, 116)
# hp/sp???[?^?[?̕`?ʼbr /> draw_actor_hp_meter_line(actor, actor_x,
72, 96, 12)
draw_actor_sp_meter_line(actor, actor_x, 104, 96, 12)
# hp???l?̕`?ʼbr /> self.contents.font.size = 24 #
hp/sp???l?̕????̑傫??
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 58, 96, 24, actor.hp.to_s, 2)
# sp???l?̕`?ʼbr /> self.contents.font.color = actor.sp == 0 ?
knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 90, 96, 24, actor.sp.to_s, 2)
# ?p? hp?v?Ɨp? sp?v?̕`?ʼbr /> self.contents.font.size = 12
# ?p? hp/sp?v?̕????̑傫??
#--------------------------------------------------------------------------
# ?? ?e?????`?栢 y tomy
#--------------------------------------------------------------------------
def draw_shadow_text(x, y, width, height, string, align = 0)
# ???̐f? ????Ă???
color = self.contents.font.color.dup
# ?????ʼne?`?漢 r /> self.contents.font.color = color.new(0, 0, 0)
self.contents.draw_text(x + 2, y + 2, width, height, string, align)
# ???̐f?ɖ ??ĕ`?漢 r /> self.contents.font.color = color
self.contents.draw_text(x, y, width, height, string, align)
end
end
expert
group: expert
posts: 92
joined: 10-november 04
from: usa - california
member no.: 3
rpg maker level: expert
class title:
i am a writer and mapmaking
ex-armadia status
|||||||||| - story
|||||||||| - scripting
|||||||||| - map making
|||||||||| - finish editing heros and all bosses
|||||||||| - finishing touches/beta testing
click here.
member
group: member
posts: 32
joined: 26-november 04
member no.: 36
newbie
group: newbie
posts: 11
joined: 26-november 04
member no.: 35
member
group: member
posts: 32
joined: 26-november 04
member no.: 36
you must of done something wrong, you are the only one who has problems
with this script. everyone else who i have given it to, it works fine
did you make a new script above "main" ?
newbie
group: newbie
posts: 11
joined: 26-november 04
member no.: 35
yup. and i tried it without the script and it still doesn't work!
member
group: member
posts: 32
joined: 26-november 04
member no.: 36
newbie
group: newbie
posts: 11
joined: 26-november 04
member no.: 35
newbie
group: newbie
posts: 13
joined: 29-november 04
from: thunder bay, ontario, canada
member no.: 41
um is there a script that just has the level up info because i don't know
how to cut out just that part
member
group: member
posts: 32
joined: 26-november 04
member no.: 36
this is the code for the level-up
code
#================================================
# ====create a new script above main and put all that code in it. ======
#================================================
#
#
#
#
#
# window_battlestatus
#
#?????? xrxs_bp10. level up!?\?͏㏸?\???e?b???h?e plus! ??????
# by ???ݓy
#
# ?v?fxrxs.rgss??x?^?}?c?y
#
#
#script found at http://f26.aaa.livedoor.jp/~xxms/rpgxp_xrxs_bp10.htm
#modified by guillaume777
#
#
#===========================================================================
===
# ? ?j?x?^?}?c?y?|?c???g
#===========================================================================
===
class scene_battle
level_up_se = "" # ???x???a?b?vse?b""?Ŗ????b
level_up_me = "audio/me/007-fanfare01" # ???x???a?b?vme
end
class window_skilllearning < window_base
skilllearn_se = "audio/se/106-heal02" # ?x?l???k??se?b
end
#===========================================================================
===
# ?? window_levelupwindow
#---------------------------------------------------------------------------
---
# ?@?o?g???i?????a???x???a?b?v????? ?Ƀx?e?[?^?x? 092;?????郅?b???h?e?ł??b
#===========================================================================
===
class window_levelupwindow < window_base
#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
def initialize(x, y, actor, last_lv, up_hp, up_sp, up_str, up_dex,
up_agi, up_int)
# super(x, y, 160, 192)
super(x, y-32, 160, 192+32)
#--------------------------------------------------------------------------
# ?? ???t???b?v??
#--------------------------------------------------------------------------
def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
self.contents.clear
self.contents.font.color = system_color
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 20, 0, 160, 24, "level up!!")
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 0, 28+32, 160, 24, $data_system.words.hp)
self.contents.draw_text( 0, 50+32, 160, 24, $data_system.words.sp)
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 0, 0+32, 80, 24, "level")
self.contents.draw_text( 0, 72+32, 80, 24,
$data_system.words.str[0,3])
self.contents.draw_text( 0, 94+32, 80, 24,
$data_system.words.dex[0,3])
self.contents.draw_text( 0, 116+32, 80, 24,
$data_system.words.agi[0,3])
self.contents.draw_text( 0, 138+32, 80, 24,
$data_system.words.int[0,3])
self.contents.draw_text(76, 0+32, 128, 24, "=")
self.contents.draw_text(76, 28+32, 128, 24, "=")
self.contents.draw_text(76, 50+32, 128, 24, "=")
self.contents.draw_text(76, 72+32, 128, 24, "=")
self.contents.draw_text(76, 94+32, 128, 24, "=")
self.contents.draw_text(76, 116+32, 128, 24, "=")
self.contents.draw_text(76, 138+32, 128, 24, "=")
self.contents.font.size = 20
self.contents.font.color = normal_color
self.contents.draw_text( 0, 0+32, 72, 24, "+" +
(actor.level-last_lv).to_s, 2)
self.contents.draw_text( 0, 28+32, 72, 24, "+" + up_hp.to_s, 2)
self.contents.draw_text( 0, 50+32, 72, 24, "+" + up_sp.to_s, 2)
self.contents.draw_text( 0, 72+32, 72, 24, "+" + up_str.to_s, 2)
self.contents.draw_text( 0, 94+32, 72, 24, "+" + up_dex.to_s, 2)
self.contents.draw_text( 0, 116+32, 72, 24, "+" + up_agi.to_s, 2)
self.contents.draw_text( 0, 138+32, 72, 24, "+" + up_int.to_s, 2)
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 0, 0+32, 128, 24, actor.level.to_s, 2)
self.contents.draw_text( 0, 26+32, 128, 24, actor.maxhp.to_s, 2)
self.contents.draw_text( 0, 48+32, 128, 24, actor.maxsp.to_s, 2)
self.contents.draw_text( 0, 70+32, 128, 24, actor.str.to_s, 2)
self.contents.draw_text( 0, 92+32, 128, 24, actor.dex.to_s, 2)
self.contents.draw_text( 0, 114+32, 128, 24, actor.agi.to_s, 2)
self.contents.draw_text( 0, 136+32, 128, 24, actor.int.to_s, 2)
end
end
#===========================================================================
===
# ?? window_skilllearning
#---------------------------------------------------------------------------
---
# ?@???x???a?b?v???ȂǂɃx?l?????????? ?ɂ?? ?\?????郅?b???h?e?ł??b
#===========================================================================
===
class window_skilllearning < window_base
#--------------------------------------------------------------------------
# ?? ??c???x?^???x?ϐ?
#--------------------------------------------------------------------------
attr_reader :learned # ?x?l????????????ǂ???
#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
def initialize(class_id, last_lv, now_lv)
super(160, 64-32, 320, 64)
#--------------------------------------------------------------------------
# ?? ???t???b?v??
#--------------------------------------------------------------------------
def refresh(class_id, last_lv, now_lv)
for i in 0...$data_classes[class_id].learnings.size
learn_lv = $data_classes[class_id].learnings[i].level
# ??? ??x???a?b?v?͈͂ŏk?????郘?l???̏
if learn_lv > last_lv and learn_lv <= now_lv
@learned = true
# se?̍Đ?
if skilllearn_se != ""
audio.se_play(skilllearn_se)
end
# ?e?`?ʼbr /> skill_name =
$data_skills[$data_classes[class_id].learnings[i].skill_id].name
self.contents.clear
self.contents.font.name = $fontface
self.contents.draw_text(0,0,448,32, skill_name + " learned !!")
self.visible = true
# ???c?????[?v
loop do
# ?q?[???斊??v
graphics.update
# ?? x?v
input.update
# ?t???[???x?v
update
# ?斊???葖?킁???烋?[?v? f
if @learned == false
break
end
end
# ???c?????[?v?????܂żbr /> end
end
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v
#--------------------------------------------------------------------------
def update
# c ?{?^????????? ?
if input.trigger?(input::c)
@learned = false
self.visible = false
end
end
end
#===========================================================================
===
# ?? window_battlestatus
#===========================================================================
===
class window_battlestatus < window_base
#--------------------------------------------------------------------------
# ?? ?lj?e??c???x?^???x?ϐ?
#--------------------------------------------------------------------------
attr_accessor :level_up_flags # level up!?\??
end
#===========================================================================
===
# ?? scene_battle
#===========================================================================
===
class scene_battle
#--------------------------------------------------------------------------
# ?? ?a?t?^?[?o?g???t?f?[?y?j?n
#--------------------------------------------------------------------------
alias xrxs_bp10_start_phase5 start_phase5
def start_phase5
xrxs_bp10_start_phase5
# ?l?? exp???
@exp_gained = battle_exp
# exp ?l????菁??
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp -= @exp_gained
if actor.level < last_level
@status_window.level_up_flags[i] = false
end
end
end
# ?ݒ輢 r /> @exp_gain_actor = -1
# ???u???g?e?b???h?e? 092;??
@result_window.visible = true
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (?a?t?^?[?o?g???t?f?[?y)
#--------------------------------------------------------------------------
alias xrxs_bp10_update_phase5 update_phase5
def update_phase5
@level_up_phase_done = false if @level_up_phase_done != true
# c ?{?^????????? ?
if input.trigger?(input::c)
# ?e?b???h?e? ??Ď??̃a?n?^?[?ּbr /> @levelup_window.visible =
false if @levelup_window != nil
@status_window.level_up_flags[@exp_gain_actor] = false
@level_up_phase_done = phase5_next_levelup
end
if @level_up_phase_done
if @phase5_wait_count < 2
# ???u???g?e?b???h?e? ible=true?ł????ɼbr />
@result_window.opacity = 0
@result_window.back_opacity = 0
@result_window.contents_opacity = 0
end
# ?Ăі ?
xrxs_bp10_update_phase5
͋
# ???x???a?b?v???Ă??鏪???????o?g???i??
battle_end(0) if @levelup_window != nil and @phase5_wait_count <= 0
end
end
#--------------------------------------------------------------------------
# ?? ???a?n?^?[???x???a?b?v?\???
̃ ̃ ּbr />
#--------------------------------------------------------------------------
def phase5_next_levelup
begin
# ???a?n?^?[?
̃ ּbr /> @exp_gain_actor += 1
# ?Ō れ?a?n?^?[?̏
if @exp_gain_actor >= $game_party.actors.size
# ?a?t?^?[?o?g???t?f?[?y?j?n
return true
end
actor = $game_party.actors[@exp_gain_actor]
if actor.cant_get_exp? == false
# ???݂̔\?l?
͒ ?
last_level = actor.level
last_maxhp = actor.maxhp
last_maxsp = actor.maxsp
last_str = actor.str
last_dex = actor.dex
last_agi = actor.agi
last_int = actor.int
# ?퓬?o???l?̍Ď 擾
actor.exp += @exp_gained
# ???輢 r /> if actor.level > last_level
# ???x???a?b?v?????
@status_window.level_up(@exp_gain_actor)
# ???u???g?e?b???h?e???
@result_window.visible = false
# se?̍Đ?
if level_up_se != ""
audio.se_play(level_up_se)
end
# me?̍Đ?
if level_up_me != ""
audio.me_stop
audio.me_play(level_up_me)
end
# level-up?e?b???h?e?̐ݒ輢 r /> actors_size =
[$game_party.actors.size, 4].max
x_shift = 160 + (640 - 160*actors_size)/(actors_size - 1)
x = x_shift * @exp_gain_actor
y = 128
@levelup_window = window_levelupwindow.new(x, y, actor,
last_level,
actor.maxhp - last_maxhp, actor.maxsp - last_maxsp, actor.str -
last_str,
actor.dex - last_dex, actor.agi - last_agi, actor.int -
last_int)
@levelup_window.visible = true
# ?x?e?[?^?x?e?b???h?e??t???b?v??
@status_window.refresh
# ?x?l???k???e?b???h?e?̐ݒ輢 r /> @skilllearning_window =
window_skilllearning.new(actor.class_id, last_level, actor.level)
# ?e?f?c?g?j?e???g? 輢 r /> @phase5_wait_count = 40
return false
end
end
end until false
end
def battle_exp
bexp = 0
# ???[?v
for enemy in $game_troop.enemies
# ?g?l?~?[???b? ?ԂłȂ??
unless enemy.hidden
# ?l??? ?br /> bexp += enemy.exp
end
end
return bexp
end
end
x-treme
group: x-treme
posts: 192
joined: 30-november 04
from: usa, ohio
member no.: 46
rpg maker level: master
class title:
artist, designer, creator
on the topic of this battle system, how do you enable auto heal after
battle. every time i try to enable it, it makes the script fail. so i
figure i'll just pose the question to someone who knows what they're
doing.
member
group: member
posts: 32
joined: 26-november 04
member no.: 36
after battle is automatically turned on when you insert the script into ur
rmxp o.o
agemosu dec 3 2004, 12:53 pm post #13
x-treme
group: x-treme
posts: 192
joined: 30-november 04
from: usa, ohio
member no.: 46
rpg maker level: master
class title:
artist, designer, creator
@_# hmm it wasn't working when i first put it in. . . i'll have to look
some more into this
member
group: member
posts: 32
joined: 26-november 04
member no.: 36
x-treme
group: x-treme
posts: 192
joined: 30-november 04
from: usa, ohio
member no.: 46
rpg maker level: master
class title:
artist, designer, creator
i didn't even know there was supposed to be a pop-up, and they nobody gets
healed.
newbie
group: newbie
posts: 13
joined: 29-november 04
from: thunder bay, ontario, canada
member no.: 41
newbie
group: newbie
posts: 26
joined: 3-december 04
member no.: 53
can someone post the script with out auto heal in it i'm new and can't
find it
newbie
group: newbie
posts: 1
joined: 12-december 04
member no.: 82
rpg maker level: not applicable
if someone could post the script with the auto heal removed i'd be
grateful as well.
member
group: member
posts: 32
joined: 26-november 04
member no.: 36
newbie
group: newbie
posts: 5
joined: 29-january 05
member no.: 195
rpg maker level: not applicable
everything works ok but the text for the spells learned are not showing...
just an empty box...
« next oldest · scripts & tutorials submission and request · next newest »
3 pages 1 2 3 >
1 user(s) are reading this topic (1 guests and 0 anonymous users)
0 members: