设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 115|回复: 0

[转载发布] Wyn Engine Ace -Splash Scene Script

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-1 17:49:41 | 显示全部楼层 |阅读模式
    Wyn Engine Ace - Splash Scene Version 1.0
    by Wyn Wizard


    Introduction:
    This script allows the user to add a splash screen to their game. While most games do not need one, it is a good resource to have if you want to displays your sponsors, the teams who helped you create you game, or if you want to display your own logo. This script is plug and play with little actual set up.


    Features:
    This script provides the users game with a splash screen that is very customizable. While there is only one animation, there will be more to come in later versions. Also allows the user to play their title track during the splash scene and straight into the title scene with no pauses or stops.

    How to Use:
    1.) Place script under the section labeled "Materials" in the script editor.
    2.) Navigate to the editable region of the script. Explicit directions and warning are given there. NOTE: Make sure all file names and paths match. Ruby is a very case-sensitive language meaning "teXtfile.txt' does not equal "textfile.txt". Also remember to place all music in the game's Audio/BGM folder and all pictures you wish to display during the splash scene in the game's Graphics/Pictures folder. If you do not, the script will error and will cause the game to fail.

    Script:
    Spoiler                Code:       
    1. #===============================================================================
    2. # Author: Wyn Wizard
    3. # Supporting Authors: Dekita
    4. # Email: eugenepetrie@live.com
    5. # Title: Wyn Engine Ace - Splash Scene
    6. # Creation Date: 2/16/2017
    7. # Version: 1.0
    8. #===============================================================================
    9. # KNOWN BUGS:
    10. # None
    11. #-------------------------------------------------------------------------------
    12. # WARNING:
    13. # This script does alias and overwrite some parts of the Scene_Title. Please be
    14. # aware that this can, and probably will, cause a conflict with any other
    15. # scripts that also change Scene_Title. Please use at your own caution.
    16. #-------------------------------------------------------------------------------
    17. # UPDATES:
    18. # 1.) Made this one stand alone. Core script no longer needed.
    19. #-------------------------------------------------------------------------------
    20. # INSTRUCTIONS:
    21. # 1.) This script must be placed below the DMEA Core Script in order for it to
    22. #     run properly.
    23. # 2.) This script is fairy flexible, and the editable region is fairly easy to
    24. #     follow.
    25. #     The Scenes array is broken into a set of hashs that incude:
    26. #     name of the picture file wanted to be shown, picture's "hang" on
    27. #     the screen, and then its fade speeds. You can create more than one scene.
    28. #     To do this, go to the last scene in the Splash_Settings module and add a
    29. #     "," to it. Then insert this into a new line:
    30. #     {:name => "file_name, :hang => frames, :fade => [fade_in, fade_out]}
    31. #       - The file name is the name of the picture
    32. #       - The frames tells the scene how long to hold the picture on the scene
    33. #         [60 frames = 1 sec]
    34. #       - The fade in speed controls the oppacity of the picture's incremement
    35. #         speed which makes the picture appear on the screen.
    36. #       - The fade out speed controls the oppacity of the picture's decremement
    37. #         speed which makes the picture disappear from the screen
    38. #
    39. # If any errors occur, please feel free to email me at eugenepetrie@live.com,
    40. # or pm me, Wyn Wizard.
    41. #-------------------------------------------------------------------------------
    42. # TERMS AND CONDITIONS:
    43. # 1.) You must credit Wyn Wizard and Dekita if you use this script or this
    44. #     engine.
    45. # 2.) This script and engine is free for non comercial games.
    46. # 3.) This script and engine is not free for commercial games. If you want to
    47. #     this engine in a comercial game, pm me since i am the main code master.
    48. # 4.) Do not claim this script as your own. I know my coding style, and I will
    49. #     persue legal actions.
    50. #===============================================================================
    51. # Version: At the moment, this is not needed. May be needed in future releases.
    52. ($imported||={})[:Wyn_Splash] = 1.1
    53. #===============================================================================
    54. # ■ EDITABLE REGION
    55. #===============================================================================
    56. module WEA
    57.   module Splash_Settings
    58.     Scenes = [
    59.       # [name of picture, how long the picture stays]
    60.       {:name => "studio_logo", :hang => 60},
    61.     ]
    62.     Fade_in_speed = 2
    63.     Fade_out_speed = 4
    64.     Sounds = {
    65.       :title      => ["Audio/BGM/" + "Theme5", 80, 100]
    66.     }
    67.     #---------------------------------------------------------------------------
    68.     # ■ Play BGM
    69.     #---------------------------------------------------------------------------
    70.     def self.play_bgm(key)
    71.       Audio.bgm_play(*Sounds[key])
    72.     end
    73.   end
    74. end
    75. #===============================================================================
    76. # DO NOT EDIT BELOW HERE!
    77. # EDITING BELOW HERE MAY RESULT IN, BUT NOT RESTRICTED TO: NAUSEA, VOMITING,
    78. # EXPLOSIVE DIARRHEA, IMPLOSIVE DIARRHEA, DEMINSIA, LOSS OF: VISION, HEARING,
    79. # FEELING IN YOUR LEFT LEG, OR HAIR.
    80. #===============================================================================
    81. # ** SceneManager
    82. #-----------------------------------------------------------------------------
    83. #  This module manages scene transitions. For example, it can handle
    84. # hierarchical structures such as calling the item screen from the main menu
    85. # or returning from the item screen to the main menu.
    86. #=============================================================================
    87. class << SceneManager
    88.   #---------------------------------------------------------------------------
    89.   # * Get First Scene Class
    90.   #---------------------------------------------------------------------------
    91.   def first_scene_class
    92.     $BTEST ? Scene_Battle : Scene_Splash
    93.   end
    94. end
    95. #=============================================================================
    96. # ** Splash Scene
    97. #-----------------------------------------------------------------------------
    98. #  This class holds the fucntionality that runs the splash scene before the
    99. #   screen runs.
    100. #=============================================================================
    101. class Scene_Splash < Scene_Base
    102.   #---------------------------------------------------------------------------
    103.   # ■ Start Method
    104.   #---------------------------------------------------------------------------
    105.   def start
    106.     super
    107.     WEA::Splash_Settings::play_bgm(:title)
    108.     @sprite = Sprite.new(@viewport)
    109.     @splash_scenes = WEA::Splash_Settings::Scenes.compact()
    110.     @splash_scene_id = 0
    111.     @fade_in_speed = WEA::Splash_Settings::Fade_in_speed
    112.     @fade_out_speed = WEA::Splash_Settings::Fade_out_speed
    113.     reset_splash()
    114.   end
    115.   #---------------------------------------------------------------------------
    116.   # ■ Reset Splash Scene Method
    117.   #---------------------------------------------------------------------------  
    118.   def reset_splash
    119.     data = @splash_scenes[@splash_scene_id]
    120.     return unless data
    121.     @stage = :fade_in
    122.     @stage_opacity = 0
    123.     @mid_hang = data[:hang]
    124.     @sprite.bitmap = Cache.picture(data[:name])
    125.     @sprite.opacity = @stage_opacity
    126.     @sprite_center_x = Graphics.width/2 - (@sprite.width/2)
    127.     @sprite_center_y = Graphics.height/2 - (@sprite.height/2)
    128.     @sprite.x = @sprite_center_x
    129.     @sprite.y = @sprite_center_y
    130.     @sprite.zoom_x = (@sprite.zoom_y = 1.0)
    131.   end
    132.   #---------------------------------------------------------------------------
    133.   # ■ Update Method
    134.   #---------------------------------------------------------------------------  
    135.   def update
    136.     super
    137.     case @stage
    138.       when :fade_in  then @stage_opacity += @fade_in_speed
    139.         @stage = :fade_mid if @stage_opacity >= 255
    140.       when :fade_mid  then @mid_hang -= 1
    141.         @stage = :fade_out if @mid_hang <= 0
    142.       when :fade_out then @stage_opacity -= @fade_out_speed
    143.         @sprite.zoom_x = (@sprite.zoom_y -= 0.001)
    144.         @sprite_center_x = Graphics.width/2 - ((@sprite.width * @sprite.zoom_x)/2)
    145.         @sprite_center_y = Graphics.height/2 - ((@sprite.height * @sprite.zoom_y)/2)
    146.         @sprite.x = @sprite_center_x
    147.         @sprite.y = @sprite_center_y
    148.         @stage = :end if @stage_opacity <= 0
    149.       when :end then update_stage_id()
    150.     end
    151.     @sprite.opacity = @stage_opacity
    152.   end
    153.   #---------------------------------------------------------------------------
    154.   # ■ Update Stage ID Method
    155.   #---------------------------------------------------------------------------  
    156.   def update_stage_id
    157.     if (@splash_scene_id == @splash_scenes.size())
    158.       SceneManager.call(Scene_Title)
    159.     else
    160.       @splash_scene_id += 1
    161.       reset_splash()
    162.     end
    163.   end
    164. end
    165. #==============================================================================
    166. # ** Scene_Title
    167. #------------------------------------------------------------------------------
    168. #  This class performs the title screen processing.
    169. #------------------------------------------------------------------------------
    170. # Functions Overwritten: 1
    171. # Functions Aliased: 14
    172. #==============================================================================
    173. class Scene_Title < Scene_Base
    174.   #--------------------------------------------------------------------------
    175.   # * Start Processing
    176.   #--------------------------------------------------------------------------
    177.   alias :wea_splash_title_start start
    178.   def start
    179.     wea_splash_title_start()
    180.   end
    181.   #--------------------------------------------------------------------------
    182.   # * Get Transition Speed
    183.   #--------------------------------------------------------------------------
    184.   alias :wea_splash_title_speed transition_speed
    185.   def transition_speed
    186.     wea_splash_title_speed()
    187.   end
    188.   #--------------------------------------------------------------------------
    189.   # * Termination Processing
    190.   #--------------------------------------------------------------------------
    191.   alias :wea_splash_title_terminate terminate
    192.   def terminate
    193.     wea_splash_title_terminate()
    194.   end
    195.   #--------------------------------------------------------------------------
    196.   # * Create Background
    197.   #--------------------------------------------------------------------------
    198.   alias :wea_splash_title_createBackground create_background
    199.   def create_background
    200.     wea_splash_title_createBackground()
    201.   end
    202.   #--------------------------------------------------------------------------
    203.   # * Create Foreground
    204.   #--------------------------------------------------------------------------
    205.   alias :wea_splash_title_createForeground create_foreground
    206.   def create_foreground
    207.     wea_splash_title_createForeground()
    208.   end
    209.   #--------------------------------------------------------------------------
    210.   # * Draw Game Title
    211.   #--------------------------------------------------------------------------
    212.   alias :wea_splash_title_drawGameTitle draw_game_title
    213.   def draw_game_title
    214.     wea_splash_title_drawGameTitle
    215.   end
    216.   #--------------------------------------------------------------------------
    217.   # * Free Background
    218.   #--------------------------------------------------------------------------
    219.   alias :wea_splash_title_disposeBackground dispose_background
    220.   def dispose_background
    221.     wea_splash_title_disposeBackground()
    222.   end
    223.   #--------------------------------------------------------------------------
    224.   # * Free Foreground
    225.   #--------------------------------------------------------------------------
    226.   alias :wea_splash_title_disposeForeground dispose_foreground
    227.   def dispose_foreground
    228.     wea_splash_title_disposeForeground()
    229.   end
    230.   #--------------------------------------------------------------------------
    231.   # * Move Sprite to Screen Center
    232.   #--------------------------------------------------------------------------
    233.   alias :wea_splash_title_centerSprite center_sprite
    234.   def center_sprite(sprite)
    235.     wea_splash_title_centerSprite(sprite)
    236.   end
    237.   #--------------------------------------------------------------------------
    238.   # * Create Command Window
    239.   #--------------------------------------------------------------------------
    240.   alias :wea_splash_title_createCMDWin create_command_window
    241.   def create_command_window
    242.     wea_splash_title_createCMDWin()
    243.   end
    244.   #--------------------------------------------------------------------------
    245.   # * Close Command Window
    246.   #--------------------------------------------------------------------------
    247.   alias :wea_splash_title_closeCMDWin close_command_window
    248.   def close_command_window
    249.     wea_splash_title_closeCMDWin()
    250.   end
    251.   #--------------------------------------------------------------------------
    252.   # * [New Game] Command
    253.   #--------------------------------------------------------------------------
    254.   alias :wea_splash_title_newGameCMD command_new_game
    255.   def command_new_game
    256.     wea_splash_title_newGameCMD()
    257.   end
    258.   #--------------------------------------------------------------------------
    259.   # * [Continue] Command
    260.   #--------------------------------------------------------------------------
    261.   alias :wea_splash_title_continueCMD command_continue
    262.   def command_continue
    263.     wea_splash_title_continueCMD()
    264.   end
    265.   #--------------------------------------------------------------------------
    266.   # * [Shut Down] Command
    267.   #--------------------------------------------------------------------------
    268.   alias :wea_splash_title_shutdownCMD command_shutdown
    269.   def command_shutdown
    270.     wea_splash_title_shutdownCMD()
    271.   end
    272.   #--------------------------------------------------------------------------
    273.   # * Play Title Screen Music
    274.   #--------------------------------------------------------------------------
    275.   def play_title_music
    276.     # Overwritten method to allow the music from the splash screen to continue.
    277.   end
    278. end #end script
    279. #==============================================================================#
    280. # ** Script created by Wyn Wizard **                                           #
    281. #==============================================================================#
    复制代码






    FAQ:
    Q: The game gives this error when it starts: "Unable to find file: Audio/BGM/file_name".
    A: Make sure you have the file in the game's Audio/BGM folder and that both the file name there and the file name on the script's editable region match.

    Q: The game gives this error when it starts: "Unable to find file: Graphics/Pictures/file_name".
    A: Make sure you have the file in the game's Graphics/Pictures folder and that both the file name there and the file name on the script's editable region match.

    Credits:
    - Eugene Petrie (Wyn Wizard)
    - Dekita




    本贴来自国际rpgmaker官方论坛作者:Wyn Wizard处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/wyn-engine-ace-splash-scene-script.75004/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-18 08:57 , Processed in 0.138008 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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