Pomógł: 20 razy Dołączył: 19 Mar 2010 Posty: 421 Skąd: Reykjavik
Wysłany: Sro 21 Mar, 2012 23:11
przerobienie skryptu
siemka. nie wiem czy dla dobrych skrypterów nie stanowiło by problemu przerobienie tych skryptów z vx na vx- ace.
Każdy bohater i wróg ma inne SE uderzenia i śmierci:
Spoiler:
# Wszystkie dźwięki to SE.
# By skrypt działał, wystarczy do folderu Audio/SE wrzucić pliki, których
# nazwa powinna być odpowiednio:
# 'Actor_Hit_ID' - gdzie ID to id bohatera w bazie danych, np. 'Actor_Hit_12'
# SE zostanie odegrane, gdy bohater o ID 12 otrzyma obrażenia od przeciwnika
# 'Enemy_Hit_ID' - gdzie ID to id przeciwnika w bazie danych, np. 'Enemy_Hit_4'
# SE zostanie odegrane, gdy przeciwnik o ID 4 otrzyma obrażenia od bohatera
# 'Actor_Dead_ID' - gdzie ID to id bohatera w bazie danych, np. 'Actor_Dead_8'
# SE zostanie odegrane, gdy bohater o ID 8 zginie w walce
# 'Enemy_Dead_ID' - gdzie ID to id przeciwnika w bazie danych, np. 'Enemy_Dead_23'
# SE zostanie odegrane, gdy przeciwnik o ID 23 zginie w walce
class Sprite_Battler < Sprite_Base
alias aye_custscr_sp_bat_setnewef setup_new_effect
def setup_new_effect
if @battler.blink
if @battler.is_a?(Game_Actor)
RPG::SE.new("Actor_Hit_" + @battler.actor_id.to_s, 100, 100).play rescue nil
else
RPG::SE.new("Enemy_Hit_" + @battler.enemy_id.to_s, 100, 100).play rescue nil
end
end
if @battler.collapse
if @battler.is_a?(Game_Actor)
RPG::SE.new("Actor_Dead_" + @battler.actor_id.to_s, 100, 100).play rescue nil
else
RPG::SE.new("Enemy_Dead_" + @battler.enemy_id.to_s, 100, 100).play rescue nil
end
end
aye_custscr_sp_bat_setnewef
end
end
class Scene_Battle < Scene_Base
alias aye_custscr_scbat_dishpdam display_hp_damage
def display_hp_damage(target, obj = nil)
if target.hp_damage > 0 and target.actor?
target.blink = true
end
aye_custscr_scbat_dishpdam(target, obj)
end
end
class Game_Actor < Game_Battler
attr_reader :actor_id
end
Ikony statusy (dodanie jeszcze mag. obr. i luck pod acea :d)
Pomogła: 232 razy Dołączyła: 18 Wrz 2007 Posty: 2424
Wysłany: Czw 22 Mar, 2012 21:24
Sprawdź to:
1. Inne SE uderzenia i śmierci (uwaga nieco inna konfiguracja)
Spoiler:
Kod:
#==============================================================================
# Custom Hit and Collapse SE [VXAce]
# by Ayene
# 22.03.2012
# www.ultimateam.pl
#==============================================================================
# Opis:
# Skrypt umożliwia ustawienie osobnych dźwięków (SE) uderzenia i śmierci
# poszczególnym przeciwnikom oraz bohaterom w drużynie.
#
# Instrukcja:
# By ustawić osobny SE uderzenia w oknie 'Notes' w zakładce Actors i/lub Enemies
# wpisz:
# <hit_se: NAZWA_SE>
#
# Na przykład:
# <hit_se: Blow2>
#
# By ustawić osobny SE śmierci w oknie 'Notes' w zakładce Actors i/lub Enemies
# wpisz:
# <collapse_se: NAZWA_SE>
#
# Na przykład:
# <collapse_se: Down1>
#==============================================================================
# ** AYENE
#==============================================================================
module AYENE
module Custom_Sounds
HIT_SE = /<(?:HIT_SE|hit_se):[ ]*(.*)>/i
COLLAPSE_SE = /<(?:COLLAPSE_SE|collapse_se):[ ]*(.*)>/i
end
end
#==============================================================================
# ** DataManager
#==============================================================================
module DataManager
#--------------------------------------------------------------------------
# Load Database
#--------------------------------------------------------------------------
class << self; alias aye_custse_datman_loaddata load_database; end
def self.load_database
aye_custse_datman_loaddata
for group in [$data_enemies, $data_actors]
for obj in group
next if obj.nil?
obj.get_action_sound
end
end
end
end
#==============================================================================
# ** RPG::BaseItem
#==============================================================================
class RPG::BaseItem
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :hit_se
attr_accessor :collapse_se
#--------------------------------------------------------------------------
# Get Action Sound
#--------------------------------------------------------------------------
def get_action_sound
@hit_se = ""
@collapse_se = ""
self.note.split(/[\r\n]+/).each { |line|
case line
when AYENE::Custom_Sounds::HIT_SE
@hit_se = $1.to_s
when AYENE::Custom_Sounds::COLLAPSE_SE
@collapse_se = $1.to_s
end
}
end
end
#==============================================================================
# ** Game_Battler
#==============================================================================
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# Die
#--------------------------------------------------------------------------
alias aye_custse_gabat_die die
def die
if actor?
RPG::SE.new(actor.collapse_se, 100, 100).play if $game_party.in_battle
else
RPG::SE.new(enemy.collapse_se, 100, 100).play
end
aye_custse_gabat_die
end
#--------------------------------------------------------------------------
# Get Hit Sound Effect
#--------------------------------------------------------------------------
def hit_se
return actor? ? actor.hit_se : enemy.hit_se
return ""
end
end
#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# Execute Action
#--------------------------------------------------------------------------
alias aye_custse_scbat_exact execute_action
def execute_action
action = @subject.current_action.item
unless action.is_a?(RPG::Item)
RPG::SE.new(@subject.hit_se, 100, 100).play
end
aye_custse_scbat_exact
end
end
2. Ikony statusy + Ikony broni:
Spoiler:
Kod:
class Window_Base < Window
PARAM_ICON = {
0 => 40, # ikona MAX HP
1 => 41, # ikona MAX MP
2 => 42, # ikona ataku
3 => 43, # ikona obrony
4 => 44, # ikona ataku magicznego
5 => 45, # ikona obrony magicznej
6 => 46, # ikona szybkość
7 => 47, # ikona szczęścia
}
WINDOW_EQUIP = true # Czy wyświetlać w oknie ekwipunku? (true/false)
def draw_actor_param(actor, x, y, param_id)
if PARAM_ICON.include?(param_id)
draw_icon(PARAM_ICON[param_id], x, y)
x += 24
end
change_color(system_color)
draw_text(x, y, 120, line_height, Vocab::param(param_id))
change_color(normal_color)
draw_text(x + 120, y, 36, line_height, actor.param(param_id), 2)
end
end
class Window_EquipSlot < Window_Selectable
def draw_item(index)
return unless @actor
rect = item_rect_for_text(index)
draw_icon(EQUIP_ICON[index], rect.x, rect.y)
rect.x += 24
change_color(system_color, enable?(index))
draw_text(rect.x, rect.y, 92, line_height, slot_name(index))
draw_item_name(@actor.equips[index], rect.x + 92, rect.y, enable?(index))
end
end
class Window_EquipStatus < Window_Base
def draw_param_name(x, y, param_id)
if PARAM_ICON.include?(param_id) and WINDOW_EQUIP
draw_icon(PARAM_ICON[param_id], x, y)
x += 24
end
change_color(system_color)
draw_text(x, y, 80, line_height, Vocab::param(param_id))
end
end
Pomógł: 20 razy Dołączył: 19 Mar 2010 Posty: 421 Skąd: Reykjavik
Wysłany: Czw 22 Mar, 2012 21:40
dzięki ci Ayene ale sąpewne problemy.
mianowicie nie działa mi ikonki statusu (bronie sąokej)
i coś jest z tym kodem: (uderzenia SE)
<hit_se: Blow2>
odtwarza się on kiedy postać/wróg atakuje a nie otrzymuje obrażenia.
da się to naprawić?
pomijając fakt, ze ty wszystko umiesz bardzo bym prosił o naprawkę
Pomogła: 232 razy Dołączyła: 18 Wrz 2007 Posty: 2424
Wysłany: Czw 22 Mar, 2012 21:56
Skrypt na Inne SE uderzenia i śmierci podmień na poniższy:
Spoiler:
Kod:
#==============================================================================
# Custom Hit and Colllapse SE [VXAce]
# by Ayene
# 22.03.2012
# www.ultimateam.pl
#==============================================================================
# Opis:
# Skrypt umożliwia ustawienie osobnych dźwięków (SE) uderzenia i śmierci
# poszczególnym przeciwnikom oraz bohaterom w drużynie.
#
# Instrukcja:
# By ustawić osobny SE uderzenia w oknie 'Notes' w zakładce Actors i/lub Enemies
# wpisz:
# <hit_se: NAZWA_SE>
#
# Na przykład:
# <hit_se: Blow2>
#
# By ustawić osobny SE śmierci w oknie 'Notes' w zakładce Actors i/lub Enemies
# wpisz:
# <collapse_se: NAZWA_SE>
#
# Na przykład:
# <collapse_se: Down1>
#==============================================================================
# ** AYENE
#==============================================================================
module AYENE
module Custom_Sounds
HIT_SE = /<(?:HIT_SE|hit_se):[ ]*(.*)>/i
COLLAPSE_SE = /<(?:COLLAPSE_SE|collapse_se):[ ]*(.*)>/i
end
end
#==============================================================================
# ** DataManager
#==============================================================================
module DataManager
#--------------------------------------------------------------------------
# Load Database
#--------------------------------------------------------------------------
class << self; alias aye_custse_datman_loaddata load_database; end
def self.load_database
aye_custse_datman_loaddata
for group in [$data_enemies, $data_actors]
for obj in group
next if obj.nil?
obj.get_action_sound
end
end
end
end
#==============================================================================
# ** RPG::BaseItem
#==============================================================================
class RPG::BaseItem
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :hit_se
attr_accessor :collapse_se
#--------------------------------------------------------------------------
# Get Action Sound
#--------------------------------------------------------------------------
def get_action_sound
@hit_se = ""
@collapse_se = ""
self.note.split(/[\r\n]+/).each { |line|
case line
when AYENE::Custom_Sounds::HIT_SE
@hit_se = $1.to_s
when AYENE::Custom_Sounds::COLLAPSE_SE
@collapse_se = $1.to_s
end
}
end
end
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# Perform Damage Effect
#--------------------------------------------------------------------------
alias aye_custse_gaactor_perdamef perform_damage_effect
def perform_damage_effect
aye_custse_gaactor_perdamef
RPG::SE.new(actor.hit_se, 100, 100).play
end
#--------------------------------------------------------------------------
# Perform Collapse Effect
#--------------------------------------------------------------------------
alias aye_custse_gaactor_percolef perform_collapse_effect
def perform_collapse_effect
aye_custse_gaactor_percolef
RPG::SE.new(actor.collapse_se, 100, 100).play if $game_party.in_battle
end
end
#==============================================================================
# ** Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# Perform Damage Effect
#--------------------------------------------------------------------------
alias aye_custse_gaenemy_perdamef perform_damage_effect
def perform_damage_effect
aye_custse_gaenemy_perdamef
RPG::SE.new(enemy.hit_se, 100, 100).play
end
#--------------------------------------------------------------------------
# Perform Collapse Effect
#--------------------------------------------------------------------------
alias aye_custse_gaenemy_percolef perform_collapse_effect
def perform_collapse_effect
aye_custse_gaenemy_percolef
RPG::SE.new(enemy.collapse_se, 100, 100).play if $game_party.in_battle
end
end
Pomógł: 20 razy Dołączył: 19 Mar 2010 Posty: 421 Skąd: Reykjavik
Wysłany: Czw 22 Mar, 2012 22:27
Łups, już wiem w czym problem.
Mam w projekcie duży iconset i domyślne liczby, które tam ustawiłaś akurat były pustym miejscem w iconsecie.
Sorki za to. Problem z głowy, dzięki za wszystko
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum