じ☆ve冰风 发表于 2026-8-2 09:31:34

YCA-BattleFog

Hello people,i'm here posting a script i made today,that allows you tom use Fogs inside battle.

Terms:

Use as you want, just stick "Yangfly Jitter" in the credits.

#==============================================================================## ◘ YangFly Coding Ace - Ace Battle Fog(or whatever you wanna call this) # -- Last Updated: 2015.03.02# -- Level: Easy# -- Requires: n/a# -- Compatibility: Highly# -- Lag Created: Aulmost Nothing#==============================================================================$imported = {} if $imported.nil?$imported["YCA-BattleFog"] = true#==============================================================================# ◘ Updates# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#2015.03.02 => Started Script and Finished#==============================================================================# ◘ Introduction# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#If a Switch is on, the fog will be enabled.#You can set the X speed and Y speed by 2 variables.#The Fog can be changed in-game by calling: changebfog("x")#Where x = The name of the Fog in the "Fogs" folder inside the "Graphics"#folder.(You need to create Dat Folder...)#==============================================================================# ◘ Instructions# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#Ya knows how to do this already, right?#But it won't hurt to tell again, Place this below everything and above#main and blablabla...#==============================================================================# ◘ Compatibility# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#This Scripts Overwrites Nothing so, it's Highly compatible.#==============================================================================module YCAmodule Battle_fog   Default_Z = 2# Z value of Dat Fog   FogSwitch = 58 # Switch to turn on Fog   XSpeedVar = 61 # Variable of the X speed   YSpeedVar = 62 # Variable of the Y speedendend#--------------------------------------------------------------------------# Edits should stop here unless ya know what u doing.# But don't worry it won't cause computer damage, incontinence, # explosion of user's head, coma, death, and/or halitosis. ;3#--------------------------------------------------------------------------module Cache#--------------------------------------------------------------------------# New Method: self.fogs#--------------------------------------------------------------------------    def self.fogs(filename)    load_bitmap("Graphics/Fogs/", filename)endendclass Game_System#--------------------------------------------------------------------------# New Public instance Variable: @battlefog#--------------------------------------------------------------------------attr_accessor :battlefog#--------------------------------------------------------------------------# Alias: initialize#--------------------------------------------------------------------------alias yca_bfog_gamesystem_intialize initializedef initialize    yca_bfog_gamesystem_intialize    @battlefog = ""endendclass Scene_Battle < Scene_Base#--------------------------------------------------------------------------# Alias: start#--------------------------------------------------------------------------alias yca_bfog_start startdef start    yca_bfog_start    if $game_switches      create_bfog    endend   #--------------------------------------------------------------------------# New Method: create_bfog#--------------------------------------------------------------------------    def create_bfog    @bfog = Plane.new    @bfog.bitmap = Cache.fogs($game_system.battlefog)    @bfog.z = YCA::Battle_fog:
data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7efault_Zend#--------------------------------------------------------------------------# New Method: move_bfog#--------------------------------------------------------------------------    def move_bfog    @bfog.ox += $game_variables    @bfog.oy += $game_variablesend#--------------------------------------------------------------------------# New Method: dispose_bfog#--------------------------------------------------------------------------    def dispose_bfog    @bfog.bitmap.dispose    @bfog.disposeend#--------------------------------------------------------------------------# Alias: update_basic#--------------------------------------------------------------------------alias yca_bfog_updatebasic update_basicdef update_basic    yca_bfog_updatebasic    if $game_switches      move_bfog    endend    #--------------------------------------------------------------------------# Alias: terminate#--------------------------------------------------------------------------   alias yca_bfog_terminate terminatedef terminate    yca_bfog_terminate    if $game_switches      dispose_bfog    endend    endclass Game_Interpreterdef changebfog(name)    $game_system.battlefog = nameendendIf you wants any features, just lemme know.

See ya later.


本贴来自国际rpgmaker官方论坛作者:JioInzagi处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/yca-battlefog.37405/
页: [1]
查看完整版本: YCA-BattleFog