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

[转载发布] Help Scene (Custom Encyclopedia)

[复制链接]
累计送礼:
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 11:49:29 | 显示全部楼层 |阅读模式
    Help Scene
    by: IneptAttorney

    Introduction:
    This script can create scene "Help" which contains guidance on your game. maybe you can abbreviate the tutorial so we only need to define a little of our game features and the rest can be defined in the scene Help

    Instruction:
    Place above ▼ Main Process and below ▼ Materials. Set the configuration in the script and make the script call
    SceneManager.call(Scene_Help) to access the help scene

    Screenshot:
    I'm sorry I have not included this!

    Script:
    Spoiler                Code:       
    1. #HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
    2. #                                 Help Scene
    3. #HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
    4. =begin
    5. ▼ Writer: IneptAttorney
    6. ▼ Date  : 22, June, 2019
    7. ▼ Engine: RMVX Ace
    8. ▼ Name  : Help Scene
    9. -------------------------------------[+]----------------------------------------
    10. ▼ Instruction
    11.   This script will make the Help Scene for your game. you can call it Custom
    12.   Encyclopedia if you want.
    13. -------------------------------------[+]----------------------------------------
    14. ▼ Instruction
    15.   Place above ▼ Main Process and below ▼ Materials. Set the configuration below
    16.   and testplay your game!
    17.   Make script call to open help scene
    18.   =====================================
    19.   =   SceneManager.call(Scene_Help)   =
    20.   =====================================
    21. -------------------------------------[+]----------------------------------------
    22. ▼ Terms
    23.   Credit me (if you want)
    24.   Repost? free! but don't claiming this script!
    25. -------------------------------------[+]----------------------------------------
    26. =end
    27. module INPTATTRNY
    28.   module HELP
    29.     ENTRY = [] #<----- Don't click!
    30.     TEXT  = [] #<----- Don't click!
    31. #...............................................................................
    32. # Write List here!
    33. # the format like this:
    34. # TEXT[x] = [
    35. #            "Title",
    36. #            "Line 1",
    37. #            "Line 2",
    38. #            "Line 3",
    39. #            "Line 4",
    40. #           ]
    41. # Where x is Text ID. You add more lines if you want (Max is 14 lines)
    42. #...............................................................................
    43.     TEXT[0] = ["Movement",                       #<-- Title
    44.               "Use Arrow keys to move",          #<-- Line 1
    45.               "Press 'A' for use weapon",      #<-- Line 2
    46.               "You can click any place to move", #<-- Line 3
    47.               "Press 'Enter' to Talk with NPC",  #<-- Line 4
    48.               "Press & Hold 'Shift' to dash character"
    49.               ]
    50.    
    51.     TEXT[1] = [
    52.                "Title",
    53.                "Line1",
    54.                "Line2",
    55.                "Line3",
    56.                "Line4",
    57.                "Line5",
    58.                "Line6",
    59.                ]
    60. #...............................................................................
    61. # Entry settings!
    62. # Format:
    63. # ENTRY[x] = ["string1", "String2", "Switch Required 1"]
    64. #...............................................................................
    65.     ENTRY[0] = ["Entry0(1)","Entry0(2)",1]
    66.     ENTRY[1] = ["Entry1(1)","Entry1(2)",2]
    67.    
    68. #...............................................................................
    69. # Additional Settings
    70. #...............................................................................
    71.     UNICON = 238            #Icon for unknown entries
    72.     ICON   = 237            #Icon for known entries
    73.     NOTEXT = "No Data"      #Text for unknown data
    74.     NOT    = "Nil"          #Text for unknown title
    75.    
    76.     FOOTER = "Help Scene"   #Footer Text
    77.     FOOT_X = 0              #X possision for Footer Text
    78.     FOOT_Y = 0              #Y possision for Footer Text
    79. #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    80. #                          End of configuration!
    81. # Don't edit the text below or your PC will burn up!
    82. #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    83.   end
    84. end
    85. #...............................................................................
    86. # Scene Help
    87. #...............................................................................
    88. class Scene_Help < Scene_MenuBase
    89.   def start
    90.     super
    91.     create_entry_list
    92.     create_info
    93.     create_footer
    94.   end
    95.   def create_entry_list
    96.     @entry_list = Window_EntryList.new(0, 0, 170, 366)
    97.     @entry_list.viewport = @viewport
    98.     @entry_list.activate
    99.     @entry_list.set_handler(:cancel, method(:return_scene))
    100.     $Entryindex = @entry_list.index
    101.   end
    102.   def create_footer
    103.     @footer_window = Window_HelpDesc.new(0, 363, 544, 54)
    104.     @footer_window.viewport = @viewport
    105.   end
    106.   def create_info
    107.     @info_window = Window_HelpInfo.new(170, 0, Graphics.width - 170, Graphics.height - 50)
    108.     @info_window.viewport = @viewport
    109.   end
    110. end
    111. #...............................................................................
    112. # Footer Window
    113. #...............................................................................
    114. class Window_HelpDesc < Window_Base
    115.   def initialize( x, y, window_width, window_height)
    116.     super
    117.     refresh
    118.   end
    119.   def refresh
    120.     contents.clear
    121.     draw_text_ex(INPTATTRNY::HELP::FOOT_X, INPTATTRNY::HELP::FOOT_Y, INPTATTRNY::HELP::FOOTER)
    122.   end
    123. end   
    124. #...............................................................................
    125. # Info Window
    126. #...............................................................................
    127. class Window_HelpInfo < Window_Base
    128.   def initialize(x, y, window_width, window_height)
    129.     super
    130.     update
    131.   end
    132.   def update
    133.     contents.clear
    134.     if $game_switches[INPTATTRNY::HELP::ENTRY[$Entryindex][3]] == true
    135.       draw_text(1,0,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][1])
    136.       draw_text(1,25,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][2])
    137.       draw_text(1,50,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][3])
    138.       draw_text(1,75,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][4])
    139.       draw_text(1,100,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][5])
    140.       draw_text(1,125,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][6])
    141.       draw_text(1,150,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][7])
    142.       draw_text(1,175,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][8])
    143.       draw_text(1,200,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][9])
    144.       draw_text(1,225,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][10])
    145.       draw_text(1,250,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][11])
    146.       draw_text(1,275,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][12])
    147.       draw_text(1,300,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][13])
    148.       draw_text(1,325,350,30,INPTATTRNY::HELP::TEXT[$Entryindex][14])
    149.     else
    150.       draw_text(1,0,350,30,INPTATTRNY::HELP::NOTEXT)
    151.     end
    152.   end
    153. end
    154. #...............................................................................
    155. # Entry List Window
    156. #...............................................................................
    157. class Window_EntryList < Window_Selectable
    158.   def initialize( x, y, window_width, window_height)
    159.     super
    160.     @data = []
    161.     refresh
    162.     select(0)
    163.   end
    164.   def item_max
    165.     @data ? @data.size : 1
    166.   end
    167.   def item
    168.     @data && index >= 0 ? @data[index] : nil
    169.   end
    170.   def make_item_list
    171.     @data = INPTATTRNY::HELP::ENTRY
    172.   end
    173.   def draw_item(index)
    174.     item = @data[index]
    175.     rect = item_rect(index)
    176.     if $game_switches[INPTATTRNY::HELP::ENTRY[$Entryindex][3]] == true
    177.       draw_text(32, rect.y, 200, line_height, INPTATTRNY::HELP::TEXT[index][0])
    178.       draw_icon(INPTATTRNY::HELP::ICON, 4, rect.y )
    179.     else
    180.       draw_text(32, rect.y, 200, line_height, INPTATTRNY::HELP::NOT )
    181.       draw_icon(INPTATTRNY::HELP::UNICON, 4, rect.y )
    182.     end
    183.   end
    184.    
    185.   def refresh
    186.     make_item_list
    187.     create_contents
    188.     draw_all_items
    189.   end
    190.   def update
    191.     process_cursor_move
    192.     process_handling
    193.   end
    194.   def process_cursor_move
    195.     return unless cursor_movable?
    196.     last_index = @index
    197.     cursor_down (Input.trigger?(:DOWN))  if Input.repeat?(:DOWN)
    198.     cursor_up   (Input.trigger?(:UP))    if Input.repeat?(:UP)
    199.     cursor_right(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
    200.     cursor_left (Input.trigger?(:LEFT))  if Input.repeat?(:LEFT)
    201.     cursor_pagedown   if !handle?(:pagedown) && Input.trigger?(:R)
    202.     cursor_pageup     if !handle?(:pageup)   && Input.trigger?(:L)
    203.     Sound.play_cursor if @index != last_index
    204.     $Entryindex = @index #@data[index]
    205.   end
    206. end #End of script! 0=0)/
    复制代码






    Credits:

    • IneptAttorney
    • Enterbrain



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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 11:39 , Processed in 0.108529 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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