设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2013|回复: 2
打印 上一主题 下一主题

[已经过期] 求修改下脚本!

[复制链接]

Lv4.逐梦者

梦石
0
星屑
7323
在线时间
912 小时
注册时间
2015-2-10
帖子
248
跳转到指定楼层
1
发表于 2016-3-5 21:13:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

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/                         #
#==============================================================================#

Lv3.寻梦者

梦石
0
星屑
1293
在线时间
995 小时
注册时间
2014-12-14
帖子
3016

开拓者

2
发表于 2016-3-5 21:52:23 | 只看该作者
一般这种修改的求助是很冷的,不知道是不是因为版权?!建议楼主指定某一个人来拜托这种事物。不知道别人都怎么看?

点评

"建议楼主指定某一个人来拜托这种事物" 除非给钱否则不要这么做  发表于 2016-3-20 06:04
【RMVA教程】
---------------------
欲买桂花同载酒,终不似,少年游.
回复 支持 反对

使用道具 举报

Lv4.逐梦者

「Pemercyia」


Urhurrenna

梦石
0
星屑
9372
在线时间
2747 小时
注册时间
2008-9-5
帖子
3542

开拓者短篇八RM组冠军短篇九导演组亚军白银编剧

3
发表于 2016-3-5 21:56:36 | 只看该作者
那干脆不要这个脚本,然后把自己想要的战斗图放到Graphics\System里面,图片名字改成“BattleStart”……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-6-29 15:51

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表