赞 | 12 |
VIP | 0 |
好人卡 | 0 |
积分 | 77 |
经验 | 12026 |
最后登录 | 2024-10-1 |
在线时间 | 946 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7743
- 在线时间
- 946 小时
- 注册时间
- 2015-2-10
- 帖子
- 248
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
这个脚本是随机战斗开始时的渐变图的,但是我不想随机,能不能改成每次战斗开始时放出由我制定的渐变图?
=begin =========================================================================
Dekita's v1.0
★ Battle Transitions? ★
================================================================================
Script Information:
====================
This script allows for multiple battle transitions.
It also allows for each transition to have its own "battle start" sound.
Each map can be given its own set of transitions using notetags.
Transitions are random.
(you can fix the next battles transition with a simple script call.)
================================================================================
★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
================================================================================
1. You must give credit to "Dekita"
2. You are NOT allowed to repost this script.(or modified versions)
3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
4. You are NOT allowed to use this script for Commercial games.
5. ENJOY!
"FINE PRINT"
By using this script you hereby agree to the above terms and conditions,
if any violation of the above terms occurs "legal action" may be taken.
Not understanding the above terms and conditions does NOT mean that
they do not apply to you.
If you wish to discuss the terms and conditions in further detail you can
contact me at http://dekitarpg.wordpress.com/ or [email protected]
================================================================================
History:
=========
D /M /Y
06/01/2o13 - started && finished,
================================================================================
INSTRUCTIONS:
==============
Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
Simply put your transition graphic in the "Graphics/System" folder
and fill in the details in the customisation module.
================================================================================
NOTETAGS : (MAP Notebox)
===========
<trans: id>
replace id with the id of the transition this map has.
maps can have multiple transitions (as many as you want),
simply put a comma , after each id number like so...
<trans: id, id, id, id, id, id, id, id, id, id, id> ect..
================================================================================
SCRIPT CALLS :
==============
set_battle_trans(id)
Replace id with the Trans[id] of the transition you want.
This will make the next transition the one you select.
=end #==========================================================================#
module Battle_Transitions
Trans=[]# Do Not Delete.
Use_Script = true
Use_Transition_Sounds = true
# Default is 10, i didnt like it ^_^
Battle_Trans_Speed = 0 # (transition after entering battle).
# Trans[id]= [Duration, "NAME" Vauge, "Sound", Volume, Pitch]
Trans[0] = [50, "BattleStart.png", 100, "Battle1.ogg", 100, 100]
Trans[1] = [80, "BattleStartBoss.png", 100, "Battle1.ogg", 100, 100]
Trans[2] = [80, "BattleStartFFF.png", 100, "$静音$", 100, 100]
Trans[3] = [360, "BattleStartFFF.png", 100, "$静音$", 100, 100]
Trans[4] = [100, "BattleStartBigBoss", 100, "Battle1.ogg", 100, 100]
Trans[5] = [100, "BattleStartShenhai", 100, "$静音$", 100, 100]
Trans[6] = [160, "BattleStartJianniang.png", 100, "$静音$", 100, 100]
Trans[7] = [160, "BattleStartLastBoss.png", 100, "$静音$", 100, 100]
Trans[8] = [200, "BattleStartMirror.png", 100, "$静音$", 100, 100]
##
# Duration = number of frames the transition will last.
# The default for battles is 100.
#--
# Vague = the ambiguity of the borderline between the graphic's
# starting and ending points. The larger the value, the greater the ambiguity.
# The default for battles is 100.
#--
# Sound = the sound effect to use for this transition.
# Volume = the volume for the sound used.
# Pitch = the pitch for the sound used.
#--
# You can add more lines like so...
# Trans[id] = [Duration, "NAME" Vauge, "Sound", Volume, Pitch]
###
Dekitas_Option = false
# This is an option i have included for my own project.
# if this is true each time a battle is encountered the game will
# try to find a battlestart image with the above name +
# Graphics_width x Graphics_height
# e.g B1-640x384 , B2-576x352.
# i reccomend making this false unless your game can have
# multiple screen sizes.
end #####################
# CUSTOMISATION END #
#####################
#===============================================================================#
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
# #
# http://dekitarpg.wordpress.com/ #
# #
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
#===============================================================================#
# ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
# YES?\.\. #
# OMG, REALLY? \| #
# WELL SLAP MY FACE AND CALL ME A DITTO.\..\.. #
# I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
#===============================================================================#
module Sound
#===============================================================================#
if Battle_Transitions::Use_Transition_Sounds
def self.play_battle_start
end
end
end
#===============================================================================#
class RPG::Map
#===============================================================================#
attr_reader(:b_trans_set)
def get_battle_trans
@b_trans_set = Battle_Transitions::Trans
self.note.split(/[\r\n]+/).each { |line|
case line ;
when /<(?:TRANS|trans):[ ](\d+(?:\s*,\s*\d+)*)>/i
@b_trans_set = []
bts = Battle_Transitions::Trans
$1.scan(/\d+/).each {|num|@b_trans_set.push(bts[num.to_i]) if num.to_i > 0 ;}
end ; } # self.note.split
end
end
#===============================================================================#
class Game_Temp
#===============================================================================#
attr_accessor :set_battle_trans
alias :i_gt_4_bts_DPBz :initialize
def initialize
i_gt_4_bts_DPBz
@set_battle_trans = [false, nil]
end
end
#===============================================================================#
class Game_Map
#===============================================================================#
attr_reader(:trans_set)
alias :bt_4_gm_DPBz__ :setup
def setup(map_id)
bt_4_gm_DPBz__(map_id)
setup_this_maps_battle_transitions
end
def setup_this_maps_battle_transitions
@map.get_battle_trans
@trans_set = @map.b_trans_set
end
end
#===============================================================================#
class Game_Interpreter
#===============================================================================#
def set_battle_trans(id)
$game_temp.set_battle_trans = [true, id]
end
end
#===============================================================================#
class Scene_Map < Scene_Base
#===============================================================================#
alias :pbt_random_trans :perform_battle_transition
def perform_battle_transition(*args, &block)
if !Battle_Transitions::Use_Script
pbt_random_trans(*args, &block)
else
dekitas_battle_trans
end
end
def dekitas_battle_trans
t = rand_b_trans
spd = t[0]
tra = t[1] + add_g_wid
vag = t[2]
if Battle_Transitions::Use_Transition_Sounds
sound = t[3]
volum = t[4]
pitch = t[5]
Audio.se_play("Audio/SE/" + sound, volum, pitch)
end
Graphics.transition(spd, "Graphics/System/" + tra, vag)
Graphics.freeze
end
def rand_b_trans
if $game_temp.set_battle_trans[0]
mod = Battle_Transitions::Trans
val = $game_temp.set_battle_trans[1]
$game_temp.set_battle_trans = [false, nil]
id = mod[val]
else
mod = $game_map.trans_set
val = rand(mod.size)
id = mod[val]
end
id
end
def add_g_wid
return "" unless Battle_Transitions::Dekitas_Option
voc = "#{Graphics.width.to_s}x#{Graphics.height.to_s}"
return voc
end
end
#==============================================================================
class Scene_Battle < Scene_Base
#==============================================================================
alias :ts_4_rand_trans :transition_speed
def transition_speed
if !Battle_Transitions::Use_Script
return ts_4_rand_trans
else
return Battle_Transitions::Battle_Trans_Speed
end
end
end
#==============================================================================#
# - SCRIPT END - #
#==============================================================================#
# http://dekitarpg.wordpress.com/ #
#==============================================================================# |
|