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

[转载发布] FG7 - Simple Convoy

[复制链接]
累计送礼:
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-2 19:15:16 | 显示全部楼层 |阅读模式
    Simple Convoy
    By: FamilyGamer7​


    Introduction
                            This script simulates a party guest/convoy system. Very similar to the system used in Suikoden 2 (Convoy).               
    Click to expand...


    Features
                            The Convoy window is automatically hidden (by design) until you decide to add an actor within the Convoy. This script is purely designed to give a visual representation that other actors are with you outside of your normal party members (If an actor is in party, they will be removed).               
    Click to expand...


    Screenshot(s)





    Click to expand...


    Script
    Spoiler: FG7 - Simple Convoy
                    Ruby:       
    1. #==============================================================================
    2. # Title: Simple Convoy
    3. # Author: FamilyGamer7 (FG7)
    4. # Version: 1.3
    5. # Engine: RPG Maker VX Ace
    6. #==============================================================================
    7. # ** Change Log |
    8. # ---------------
    9. # 1.0 => Created Script
    10. # 1.1 => Added removal of actor from party if available
    11. # 1.2 => Reconfigured script call logic - easier to read + convoy text option
    12. # 1.3 => Adjusted window placement (To the top) for Graphic resize purposes
    13. #==============================================================================
    14. # ** Description |
    15. # ----------------
    16. # This script simulates a party guest/convoy system. Very similar to the system
    17. # used in Suikoden 2 (Convoy).
    18. #==============================================================================
    19. # ** Terms of Use |
    20. # -----------------
    21. # * Free to use in non-commercial projects and commercial projects
    22. # * Feel free to modify and improve the script. Credit is still required.
    23. # * Credit FamilyGamer7
    24. #==============================================================================
    25. # ** Usage |
    26. # ----------
    27. # * NOT Plug & Play (See notes below for more information)
    28. #==============================================================================
    29. # ** Notes |
    30. # ----------
    31. # The Convoy window is automatically hidden (by design) until you decide to
    32. # add an actor within the Convoy. This script is purely designed to give a
    33. # visual representation that other actors are with you outside of your normal
    34. # party members (If an actor is in party, they will be removed).
    35. #
    36. # - The Convoy window is displayed on the Scene_Menu.
    37. #
    38. # Assign the actor id number that corresponds to the actor that you want to be
    39. # apart of the convoy. Use $game_party.convoy_actor_slot_1 when you add the
    40. # first actor to the convoy. See example below.
    41. #
    42. # (Ex: Actor 13 / $game_party.convoy_actor_slot_1 = 13)
    43. #
    44. # For Actor 1 Convoy Slot - Replace the # with an actor id value
    45. # $game_party.convoy_actor_slot_1 = #
    46. #
    47. # For Actor 2 Convoy Slot - Replace the # with an actor id value
    48. # $game_party.convoy_actor_slot_2 = #
    49. #
    50. # When you are done with the 1 actor being in your convoy, change the script
    51. # call value to "0" to remove. When you are done with both actors, change both
    52. # game script calls back to "0" and then the Convoy window will disappear.
    53. #
    54. # -----------------------------------------------------------------------------
    55. #
    56. # To add actors back into the party after removal from the convoy, use the
    57. # following script call example below.
    58. #
    59. # $game_party.add_actor(#) - Replace the # with an actor id of your choice
    60. # - Ex: $game_party.add_actor(5)
    61. #==============================================================================
    62. #==============================================================================
    63. # ** Module: FG7::Simple_Convoy
    64. #------------------------------------------------------------------------------
    65. #  This modules creates a static variable to be used within the script.
    66. #==============================================================================
    67. module FG7
    68.   module Simple_Convoy
    69. #==============================================================================
    70. # -------------------- ALLOWED TO EDIT BELOW THIS LINE ---------------------- #
    71. #==============================================================================
    72.     # Sets the convoy text for the window
    73.     Convoy_Text = "Convoy"
    74.     # Sets value for $game_variable on actor 1 - Convoy
    75.     # (Change the value to a game variable not in use within your game)
    76.     Game_Variable_Actor_Slot_1 = 18
    77.     # Sets value for $game_variable on actor 2 - Convoy
    78.     # (Change the value to a game variable not in use within your game)
    79.     Game_Variable_Actor_Slot_2 = 19
    80. #==============================================================================
    81. # ---------- DO NOT EDIT BELOW THIS LINE (FOR ADVANCED USERS) --------------- #
    82. #==============================================================================
    83.   end
    84. end
    85. #==============================================================================
    86. # ** Game_Party
    87. #------------------------------------------------------------------------------
    88. #  This class handles parties. Information such as gold and items is included.
    89. # Instances of this class are referenced by $game_party.
    90. #==============================================================================
    91. class Game_Party < Game_Unit
    92.   #--------------------------------------------------------------------------
    93.   # * New Method: Convoy Actor 1 by Game Variable
    94.   #--------------------------------------------------------------------------
    95.   def convoy_actor_slot_1=(value)
    96.     @convoy_actor_slot_1 = value
    97.     $game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_1] = @convoy_actor_slot_1
    98.   end
    99.   #--------------------------------------------------------------------------
    100.   # * New Method: Convoy Actor 2 by Game Variable
    101.   #--------------------------------------------------------------------------
    102.   def convoy_actor_slot_2=(value)
    103.     @convoy_actor_slot_2 = value
    104.     $game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_2] = @convoy_actor_slot_2
    105.   end
    106.   #--------------------------------------------------------------------------
    107.   # * New Method: Convoy?
    108.   #--------------------------------------------------------------------------
    109.   def convoy?
    110.     return true if $game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_1] != 0 or $game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_2] != 0
    111.     return false
    112.   end
    113. end
    114. #==============================================================================
    115. # ** Window_Base
    116. #------------------------------------------------------------------------------
    117. #  This is a super class of all windows within the game.
    118. #==============================================================================
    119. class Window_Base < Window
    120.   #--------------------------------------------------------------------------
    121.   # * New Method: Draw Face Graphic
    122.   #     enabled : Enabled flag. When false, draw semi-transparently.
    123.   #--------------------------------------------------------------------------
    124.   def draw_face_for_convoy(face_name, face_index, x, y, enabled = true)
    125.     bitmap = Cache.face(face_name)
    126.     rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, 96, 69)
    127.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
    128.     bitmap.dispose
    129.   end
    130.   #--------------------------------------------------------------------------
    131.   # * New Method: Draw Actor Face Graphic
    132.   #--------------------------------------------------------------------------
    133.   def draw_actor_face_for_convoy(actor, x, y, enabled = true)
    134.     draw_face_for_convoy(actor.face_name, actor.face_index, x, y, enabled)
    135.   end
    136. end
    137. #==============================================================================
    138. # ** Window_MenuStatus
    139. #------------------------------------------------------------------------------
    140. #  This window displays party member status on the menu screen.
    141. #==============================================================================
    142. class Window_MenuStatus < Window_Selectable
    143.   #--------------------------------------------------------------------------
    144.   # * Alias Method: Get Window Height
    145.   #--------------------------------------------------------------------------
    146.   alias :fg7_simple_convoy_window_height :window_height
    147.   def window_height
    148.     # Returns value if scene_menu and convoy
    149.     return Graphics.height - 100 if SceneManager.scene_is?(Scene_Menu) && $game_party.convoy? == true
    150.     fg7_simple_convoy_window_height
    151.   end
    152.   #--------------------------------------------------------------------------
    153.   # * Override Method: Draw Item
    154.   #--------------------------------------------------------------------------
    155.   def draw_item(index)
    156.     actor = $game_party.members[index]
    157.     enabled = $game_party.battle_members.include?(actor)
    158.     rect = item_rect(index)
    159.     draw_item_background(index)
    160.     # If not on Scene_Menu and convoy is false - draw default
    161.     if !SceneManager.scene_is?(Scene_Menu) or $game_party.convoy? == false
    162.       draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)
    163.       draw_actor_simple_status(actor, rect.x + 108, rect.y + line_height / 2)
    164.     # On Scene_Menu and convoy is true - draw non default
    165.     else
    166.       draw_actor_face_for_convoy(actor, rect.x + 1, rect.y + 2, enabled)
    167.       draw_actor_simple_status(actor, rect.x + 108, rect.y - 12 + line_height / 2)
    168.     end
    169.   end
    170. end
    171. #==============================================================================
    172. # ** Window_SimpleConvoy
    173. #------------------------------------------------------------------------------
    174. #  This window displays up to 2 actors that follow the party (They gain no EXP)
    175. #==============================================================================
    176. class Window_SimpleConvoy < Window_Base
    177.   #--------------------------------------------------------------------------
    178.   # * Added Method: Object Initialization
    179.   #--------------------------------------------------------------------------
    180.   def initialize
    181.     super(0, 0, window_width, window_height)
    182.     refresh
    183.   end
    184.   #--------------------------------------------------------------------------
    185.   # * Added Method: Get Window Width
    186.   #--------------------------------------------------------------------------
    187.   def window_width
    188.     Graphics.width - 160
    189.   end
    190.   #--------------------------------------------------------------------------
    191.   # * Added Method: Get Window Width
    192.   #--------------------------------------------------------------------------
    193.   def window_height
    194.     100
    195.   end
    196.   #--------------------------------------------------------------------------
    197.   # * Added Method: Refresh - Draws 1 or 2 actor faces & names
    198.   #--------------------------------------------------------------------------
    199.   def refresh
    200.     contents.clear
    201.     draw_convoy_guests
    202.   end
    203.   #--------------------------------------------------------------------------
    204.   # * New Method: Draw Convoy Guests
    205.   #--------------------------------------------------------------------------
    206.   def draw_convoy_guests
    207.     # Convoy Title Text & Nuumber Indicator
    208.     change_color(system_color)
    209.     draw_text(228, -90, 200, 200, FG7::Simple_Convoy::Convoy_Text)
    210.     change_color(text_color(0))
    211.     draw_text(228, -62, 200, 200, "1.")
    212.     draw_text(228, -37, 200, 200, "2.")
    213.     # Checks for Actor Slot 1 - If game variable has been changed
    214.     if $game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_1] != 0
    215.       # Draw Convoy Actor #1 Face & Name
    216.       draw_actor_face($game_actors[$game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_1]], 0, 0)
    217.       change_color(text_color(0))
    218.       draw_actor_name($game_actors[$game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_1]], 252, 25, 200)
    219.       # Removes Actor #1 From Party (If available)
    220.       $game_party.remove_actor($game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_1])
    221.     end
    222.     # Checks for Actor Slot 2 - If game variable has been changed
    223.     if $game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_2] != 0
    224.       # Draw Convoy Actor #2 Face & Name
    225.       draw_actor_face($game_actors[$game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_2]], 115, 0)
    226.       #change_color(text_color(0))
    227.       draw_actor_name($game_actors[$game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_2]], 252, 50)
    228.       # Removes Actor #2 From Party (If available)
    229.       $game_party.remove_actor($game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_2])
    230.     end
    231.   end
    232.   #--------------------------------------------------------------------------
    233.   # * Added Method: Open Window
    234.   #--------------------------------------------------------------------------
    235.   def open
    236.     refresh
    237.     super
    238.   end
    239. end
    240. #==============================================================================
    241. # ** Scene_Menu
    242. #------------------------------------------------------------------------------
    243. #  This class performs the menu screen processing.
    244. #==============================================================================
    245. class Scene_Menu < Scene_MenuBase
    246.   #--------------------------------------------------------------------------
    247.   # * Alias Method: Start Processing
    248.   #--------------------------------------------------------------------------
    249.   alias :fg7_simply_convoy_start :start
    250.   def start
    251.     fg7_simply_convoy_start
    252.     # Return nothing if convoy is false
    253.     return if $game_party.convoy? == false
    254.     create_simple_convoy_window
    255.   end
    256.   #--------------------------------------------------------------------------
    257.   # * Alias Method: Create Status Window (Refreshes for Actor Removal)
    258.   #--------------------------------------------------------------------------
    259.   alias :fg7_simply_convoy_create_status_window :create_status_window
    260.   def create_status_window
    261.     fg7_simply_convoy_create_status_window
    262.     # Removes Actor # 1 From Party (If available)
    263.     $game_party.remove_actor($game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_1]) if $game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_1] != 0
    264.     # Removes Actor # 2 From Party (If available)
    265.     $game_party.remove_actor($game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_2]) if $game_variables[FG7::Simple_Convoy::Game_Variable_Actor_Slot_2] != 0
    266.     # Sets the actor(s) window "y" coordinates if convoy is enabled
    267.     @status_window.y = 100 if $game_party.convoy? == true
    268.     # Refresh Correct Scenes
    269.     @status_window.refresh
    270.   end
    271.   #--------------------------------------------------------------------------
    272.   # * New Method: Creates Simply Convoy Window
    273.   #--------------------------------------------------------------------------
    274.   def create_simple_convoy_window
    275.     @simple_convoy_window = Window_SimpleConvoy.new
    276.     @simple_convoy_window.x = @command_window.width
    277.     @simple_convoy_window.refresh
    278.   end
    279. end
    复制代码


    How to Use
                            Add this script in the script editor under in the "Materials" section and above "Main Process".
    The instructions and setup for the script are held within the script header itself. No need to repeat here.               
    Click to expand...


    Terms of Use
                            - Free to use in non-commercial projects and commercial projects
    - Feel free to modify and improve the script. Credit is still required.
    - Credit FamilyGamer7               
    Click to expand...




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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 09:26 , Processed in 0.141152 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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