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

[转载发布] title screen in map

[复制链接]
累计送礼:
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-3 13:15:05 | 显示全部楼层 |阅读模式
    so i was looking for a script for rpg maker vx ace that put the title screen in a map, so i found this script from the user Acezon.

    original script:

                            #==============================================================================
    #   ** Map as Title Screen v1.1
    #   Author: Acezon
    #   Date: 16 June 2013
    #------------------------------------------------------------------------------
    #   Version 1.1
    #   - Merged with the Yami TD compatible script
    #   - Now compatible with Khas's Awesome Light Effects script
    #   Version 1.0
    #   - Initial Release
    #------------------------------------------------------------------------------
    #   Just credit me. Free to use for commercial/non-commercial games.
    #==============================================================================

    $imported = {} if $imported.nil?
    $imported["Acezon-MapTitleScreen"] = true

    #==============================================================================
    # ** START Configuration
    #==============================================================================
    module Config
      # The id of the map you want the title to be displayed.
      Starting_Map_ID = 1

      # Character's position (though he/she is invisible)
      # This feature is useful for large maps.
      X_Pos = 7
      Y_Pos = 6
    end
    #==============================================================================
    # ** END Configuration
    #==============================================================================

    #==============================================================================
    # ** Scene_Title
    #==============================================================================
    class Scene_Title < Scene_Base
      #--------------------------------------------------------------------------
      # * Start
      #--------------------------------------------------------------------------
      def start
        SceneManager.call(Scene_MapTitle)
      end
      #--------------------------------------------------------------------------
      # * Terminate
      #--------------------------------------------------------------------------
      def terminate
        SceneManager.snapshot_for_background
        Graphics.fadeout(Graphics.frame_rate)
      end
    end

    #==============================================================================
    # ** Scene_MapTitle
    #==============================================================================
    class Scene_MapTitle < Scene_Map
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_accessor   :character_name           # character graphic filename
      attr_accessor   :character_index          # character graphic index
      #--------------------------------------------------------------------------
      # * Start
      #--------------------------------------------------------------------------
      def start
        DataManager.create_game_objects
        $game_party.setup_starting_members
        $game_map.setup(Config::Starting_Map_ID)
        $game_player.moveto(Config::X_Pos, Config::Y_Pos)
        $game_player.followers.visible = false
        $game_player.refresh
        $game_player.make_encounter_count

        @character_name = $game_player.character_name
        @character_index = $game_player.character_index
        $game_player.set_graphic('', 0)

        $game_system.menu_disabled = true
        Graphics.frame_count = 0

        super
        create_foreground
        create_background
        create_command_window
        play_title_music
      end
      #--------------------------------------------------------------------------
      # * Update
      #--------------------------------------------------------------------------
      def update
        # Yami's Title Decoration Compatibility Scriptlet
        if $imported["YSE-TD-VerticalCommand"]
          @command_sprite.each { |sprite|
            sprite.update
            @command_window.index == sprite.id ? sprite.activate : sprite.deactivate
          }
        end

        update_basic
        @spriteset.update
        $game_map.update(true)
        update_scene if scene_change_ok?
      end
      #--------------------------------------------------------------------------
      # * Determine if Debug Call by F9 key
      #--------------------------------------------------------------------------
      def update_call_debug
        # do nothing
      end
      #--------------------------------------------------------------------------
      # * Get Transition Speed
      #--------------------------------------------------------------------------
      def transition_speed
        return 20
      end
      #--------------------------------------------------------------------------
      # * Termination Processing
      #--------------------------------------------------------------------------
      def terminate
        super
        dispose_background
        dispose_foreground
        dispose_command_sprite if $imported["YSE-TD-VerticalCommand"]
        SceneManager.snapshot_for_background
      end
      #--------------------------------------------------------------------------
      # * Create Background
      #--------------------------------------------------------------------------
      def create_background
        @sprite1 = Sprite.new
        @sprite1.bitmap = Cache.title1($data_system.title1_name)
        @sprite2 = Sprite.new
        @sprite2.bitmap = Cache.title2($data_system.title2_name)
        center_sprite(@sprite1)
        center_sprite(@sprite2)
      end
      #--------------------------------------------------------------------------
      # * Create Foreground
      #--------------------------------------------------------------------------
      def create_foreground
        @foreground_sprite = Sprite.new
        @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
        @foreground_sprite.z = 100
        draw_game_title if $data_system.opt_draw_title
      end
      #--------------------------------------------------------------------------
      # * Draw Game Title
      #--------------------------------------------------------------------------
      def draw_game_title
        @foreground_sprite.bitmap.font.size = 48
        rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2)
        @foreground_sprite.bitmap.draw_text(rect, $data_system.game_title, 1)
      end
      #--------------------------------------------------------------------------
      # * Free Background
      #--------------------------------------------------------------------------
      def dispose_background
        @sprite1.bitmap.dispose
        @sprite1.dispose
        @sprite2.bitmap.dispose
        @sprite2.dispose
      end
      #--------------------------------------------------------------------------
      # * Free Foreground
      #--------------------------------------------------------------------------
      def dispose_foreground
        @foreground_sprite.bitmap.dispose
        @foreground_sprite.dispose
      end
      #--------------------------------------------------------------------------
      # * Move Sprite to Screen Center
      #--------------------------------------------------------------------------
      def center_sprite(sprite)
        sprite.ox = sprite.bitmap.width / 2
        sprite.oy = sprite.bitmap.height / 2
        sprite.x = Graphics.width / 2
        sprite.y = Graphics.height / 2
      end
      #--------------------------------------------------------------------------
      # * Create Command Window
      #--------------------------------------------------------------------------
      def create_command_window
        @command_window = Window_TitleCommand.new
        @command_window.set_handler
    new_game, method
    command_new_game))
        @command_window.set_handler
    continue, method
    command_continue))
        @command_window.set_handler
    shutdown, method
    command_shutdown))

        if $imported["YSE-TD-VerticalCommand"]
          @command_window.y = Graphics.height
          @command_sprite = []
          i = 0
          @command_window.symbol_list.each { |symbol|
            sprite = Sprite_TitleCommand.new(symbol, i); i += 1
            @command_sprite.push(sprite)
          }
          @command_sprite.each { |sprite| sprite.show }
        end
      end
      #--------------------------------------------------------------------------
      # * Dispose Command Sprites
      #--------------------------------------------------------------------------
      def dispose_command_sprite
        @command_sprite.each { |sprite| sprite.dispose }
      end
      #--------------------------------------------------------------------------
      # * Close Command Window
      #--------------------------------------------------------------------------
      def close_command_window
        @command_window.close
        update until @command_window.close?
      end
      #--------------------------------------------------------------------------
      # * [New Game] Command
      #--------------------------------------------------------------------------
      def command_new_game
        close_command_window
        fadeout_all
        $game_map.setup($data_system.start_map_id)
        $game_player.moveto($data_system.start_x, $data_system.start_y)
        $game_player.followers.visible = true
        $game_player.refresh
        $game_player.set_graphic(@character_name, @character_index)
        $game_map.autoplay
        SceneManager.goto(Scene_Map)
      end
      #--------------------------------------------------------------------------
      # * [Continue] Command
      #--------------------------------------------------------------------------
      def command_continue
        close_command_window
        fadeout_all
        SceneManager.call(Scene_Load)
      end
      #--------------------------------------------------------------------------
      # * [Shut Down] Command
      #--------------------------------------------------------------------------
      def command_shutdown
        close_command_window
        fadeout_all
        SceneManager.exit
      end
      #--------------------------------------------------------------------------
      # * Play Title Screen Music
      #--------------------------------------------------------------------------
      def play_title_music
        $data_system.title_bgm.play
        RPG::BGS.stop
        RPG::ME.stop
      end
    end               
    Click to expand...


    but the problem was this.
    in game you cant open the menu, this is because maybe acezon forgot to make the player able to open the menu after starts a new game.

    Fixed version:

                            #==============================================================================
    #   ** Map as Title Screen v1.1
    #   Author: Acezon
    #   Date: 16 June 2013
    #------------------------------------------------------------------------------
    #   Version 1.1
    #   - Merged with the Yami TD compatible script
    #   - Now compatible with Khas's Awesome Light Effects script
    #   Version 1.0
    #   - Initial Release
    #------------------------------------------------------------------------------
    #   Just credit me. Free to use for commercial/non-commercial games.
    #==============================================================================

    $imported = {} if $imported.nil?
    $imported["Acezon-MapTitleScreen"] = true

    #==============================================================================
    # ** START Configuration
    #==============================================================================
    module Config
      # The id of the map you want the title to be displayed.
      Starting_Map_ID = 193

      # Character's position (though he/she is invisible)
      # This feature is useful for large maps.
      X_Pos = 7
      Y_Pos = 6
    end
    #==============================================================================
    # ** END Configuration
    #==============================================================================

    #==============================================================================
    # ** Scene_Title
    #==============================================================================
    class Scene_Title < Scene_Base
      #--------------------------------------------------------------------------
      # * Start
      #--------------------------------------------------------------------------
      def start
        SceneManager.call(Scene_MapTitle)
      end
      #--------------------------------------------------------------------------
      # * Terminate
      #--------------------------------------------------------------------------
      def terminate
        SceneManager.snapshot_for_background
        Graphics.fadeout(Graphics.frame_rate)
      end
    end

    #==============================================================================
    # ** Scene_MapTitle
    #==============================================================================
    class Scene_MapTitle < Scene_Map
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_accessor   :character_name           # character graphic filename
      attr_accessor   :character_index          # character graphic index
      #--------------------------------------------------------------------------
      # * Start
      #--------------------------------------------------------------------------
      def start
        DataManager.create_game_objects
        $game_party.setup_starting_members
        $game_map.setup(Config::Starting_Map_ID)
        $game_player.moveto(Config::X_Pos, Config::Y_Pos)
        $game_player.followers.visible = false
        $game_player.refresh
        $game_player.make_encounter_count

        @character_name = $game_player.character_name
        @character_index = $game_player.character_index
        $game_player.set_graphic('', 0)

        $game_system.menu_disabled = true
        Graphics.frame_count = 0

        super
        create_foreground
        create_background
        create_command_window
        play_title_music
      end
      #--------------------------------------------------------------------------
      # * Update
      #--------------------------------------------------------------------------
      def update
        # Yami's Title Decoration Compatibility Scriptlet
        if $imported["YSE-TD-VerticalCommand"]
          @command_sprite.each { |sprite|
            sprite.update
            @command_window.index == sprite.id ? sprite.activate : sprite.deactivate
          }
        end

        update_basic
        @spriteset.update
        $game_map.update(true)
        update_scene if scene_change_ok?
      end
      #--------------------------------------------------------------------------
      # * Determine if Debug Call by F9 key
      #--------------------------------------------------------------------------
      def update_call_debug
        # do nothing
      end
      #--------------------------------------------------------------------------
      # * Get Transition Speed
      #--------------------------------------------------------------------------
      def transition_speed
        return 20
      end
      #--------------------------------------------------------------------------
      # * Termination Processing
      #--------------------------------------------------------------------------
      def terminate
        super
        dispose_background
        dispose_foreground
        dispose_command_sprite if $imported["YSE-TD-VerticalCommand"]
        SceneManager.snapshot_for_background
      end
      #--------------------------------------------------------------------------
      # * Create Background
      #--------------------------------------------------------------------------
      def create_background
      @sprite1 = Sprite.new
      @sprite1.bitmap = Cache.title1($data_system.title1_name)
      @sprite2 = Sprite.new
      @sprite2.bitmap = Cache.title2($data_system.title2_name)

      # --- MODIFICACIÓN AQUÍ ---
      # Establecer una Z muy alta para sprite2 para que aparezca por encima de todo
       @sprite2.z = 9000 # O un valor aún mayor si hay otros elementos con Z muy alta

       center_sprite(@sprite1)
       center_sprite(@sprite2)
      end
      #--------------------------------------------------------------------------
      # * Create Foreground
      #--------------------------------------------------------------------------
      def create_foreground
        @foreground_sprite = Sprite.new
        @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
        @foreground_sprite.z = 100
        draw_game_title if $data_system.opt_draw_title
      end
      #--------------------------------------------------------------------------
      # * Draw Game Title
      #--------------------------------------------------------------------------
      def draw_game_title
        @foreground_sprite.bitmap.font.size = 48
        rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2)
        @foreground_sprite.bitmap.draw_text(rect, $data_system.game_title, 1)
      end
      #--------------------------------------------------------------------------
      # * Free Background
      #--------------------------------------------------------------------------
      def dispose_background
        @sprite1.bitmap.dispose
        @sprite1.dispose
        @sprite2.bitmap.dispose
        @sprite2.dispose
      end
      #--------------------------------------------------------------------------
      # * Free Foreground
      #--------------------------------------------------------------------------
      def dispose_foreground
        @foreground_sprite.bitmap.dispose
        @foreground_sprite.dispose
      end
      #--------------------------------------------------------------------------
      # * Move Sprite to Screen Center
      #--------------------------------------------------------------------------
      def center_sprite(sprite)
        sprite.ox = sprite.bitmap.width / 2
        sprite.oy = sprite.bitmap.height / 2
        sprite.x = Graphics.width / 2
        sprite.y = Graphics.height / 2
      end
      #--------------------------------------------------------------------------
      # * Create Command Window
      #--------------------------------------------------------------------------
      def create_command_window
    @command_window = Window_TitleCommand.new
        @command_window.set_handler
    new_game, method
    command_new_game))
        @command_window.set_handler
    continue, method
    command_continue))
        @command_window.set_handler
    shutdown, method
    command_shutdown))

        if $imported["YSE-TD-VerticalCommand"]
          @command_window.y = Graphics.height
          @command_sprite = []
          i = 0
          @command_window.symbol_list.each { |symbol|
            sprite = Sprite_TitleCommand.new(symbol, i); i += 1
            @command_sprite.push(sprite)
          }
          @command_sprite.each { |sprite| sprite.show }
        end
      end
      #--------------------------------------------------------------------------
      # * Dispose Command Sprites
      #--------------------------------------------------------------------------
      def dispose_command_sprite
        @command_sprite.each { |sprite| sprite.dispose }
      end
      #--------------------------------------------------------------------------
      # * Close Command Window
      #--------------------------------------------------------------------------
      def close_command_window
        @command_window.close
        update until @command_window.close?
      end
    #--------------------------------------------------------------------------
    # * [New Game] Command
    #--------------------------------------------------------------------------
    def command_new_game
      close_command_window
      fadeout_all
      $game_map.setup($data_system.start_map_id)
      $game_player.moveto($data_system.start_x, $data_system.start_y)
      $game_player.followers.visible = true
      $game_player.refresh
      $game_player.set_graphic(@character_name, @character_index)
      $game_map.autoplay
      $game_system.menu_disabled = false
      SceneManager.goto(Scene_Map)
    end
      #--------------------------------------------------------------------------
      # * [Continue] Command
      #--------------------------------------------------------------------------
      def command_continue
        $game_system.menu_disabled = false
        close_command_window
        fadeout_all
        SceneManager.call(Scene_Load)
      end
      #--------------------------------------------------------------------------
      # * [Shut Down] Command
      #--------------------------------------------------------------------------
      def command_shutdown
        close_command_window
        fadeout_all
        SceneManager.exit
      end
      #--------------------------------------------------------------------------
      # * Play Title Screen Music
      #--------------------------------------------------------------------------
      def play_title_music
        $data_system.title_bgm.play
        RPG::BGS.stop
        RPG::ME.stop
      end
    end               
    Click to expand...




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

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 06:15 , Processed in 0.142351 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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