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

[转载发布] KInquire XP

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

    连续签到: 2 天

    [LV.7]常住居民III

    4469

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 前天 14:20 | 显示全部楼层 |阅读模式
    KInquire XP
    v1.2.0

    by Kyonides Arkanthes



    Introduction

    Detective:
    "What have you been doing as of late?
    I've been investigating some weird events that have been taking place in a small place called Kustom Town as of late.
    Have you got any piece of valuable information, sir?
    A contact, the name of any serial killer :killer: , a suspicious location, a piece of evidence. Anything, pretty much anything, might prove to be quite helpful at the end of the day."

    "It seems that some suspicious character might have an accomplice out there..."


    All of the pictures required by my script should be placed in the Graphics/Pictures directory.

    Screenshots

    Spoiler: Two Snapshots


    Basic Script Calls


    Open the Case Menu scene
    $scene = KInquire::Scene.new

    New Case
    new_case(101, "Trickster Affair", "Kustom Town")

    Case with specific Priority
    new_case(101, "Trickster Affair", "Kustom Town",
    => 1)

    Case with specific Status
    new_case(101, "Trickster Affair", "Kustom Town", :s => :cold)


    The Script

    It is NOT the latest version avaiable...

                    Code:        
    1. # * KInquire XP
    2. #   Scripter : Kyonides Arkanthes
    3. #   2021-08-16 - v1.1.1
    4. # The diary or encyclopedia or a detective's or inspector's notebook script!
    5. # It exclusively relies on script calls to add new information to the book.
    6. # The script also lets you set up a fake date system but it depends on script
    7. # calls to make any progress. Hours, minutes and seconds are unavailable.
    8. # Place all images in the Graphics/Pictures directory.
    9. # * Script Calls * #
    10. # - Open the Inquiry Scene
    11. # $scene = KInquireScene.new
    12. # Warning! case is one of Ruby's reserved words so I use kase instead.
    13. # - Add a New Case
    14. #   - CaseID: 1+
    15. #   - Priority: 1 as Top Priority, 2+ not that important
    16. #   - Statuses: nil, :cold, :closed, :sealed, :top_secret
    17. #   - You can add one or both options.
    18. # new_case(CaseID, "Case Name", "City Name")
    19. #   - Case with specific Priority
    20. # new_case(CaseID, "Case Name", "City Name", :p => Priority)
    21. #   - Case with specific Status
    22. # new_case(CaseID, "Case Name", "City Name", :s => Status)
    23. # - Find a Case
    24. # case_by_id(CaseID)
    25. # case_by_name("Case Name")
    26. # - Does a Case exist?
    27. # case_id?(CaseID)
    28. # case_name?("Case Name")
    29. # - Get Last Created Case
    30. # If any of these script calls fails, it means you never created it.
    31. #   - Script Calls Only
    32. # @case.some_script_call
    33. #   - Script Calls & Script Modifications
    34. # KInquire.last_case
    35. # KInquire.this_case
    36. # - Set or Reset a Target - Use it at least once!
    37. # @case.target = "Trickster"
    38. # - Set a Case's date
    39. # @case.date = [Year, Month, Day]
    40. # @case.year = Year
    41. # @case.month = Month
    42. # @case.day = Day
    43. # @case.month_day(Month, Day)
    44. # - Add new Page to a given Case
    45. #   - First Find a Case using one of the available script calls
    46. #     You can set an empty picture like this: ""
    47. #     Threat Level: "Highest" as Top Priority
    48. #     Relevance: "Low" or "Medium" or "High"
    49. # @case.person("Name", Age, "Picture", ThreatLevel, Relevance)
    50. # @case.place("Location", "Owner", "Picture", ThreatLevel, Relevance)
    51. # @case.evidence("Something", "Owner", "Contact", "Pic.", TL, Relev.)
    52. #   - After any of these 3 script calls use:
    53. # @page.some_script_call
    54. # - Set Lines of Data to a given Page - Use it at least once!
    55. # @page.lines = [Line1, etc.]
    56. # - Reset the Threat Level of a given Page
    57. # @page.threat_level = "High"
    58. # - Reset the Relevance of a given Page
    59. # @page.relevance = "High"
    60. # - Set Page Location
    61. # @page.location = "Madison Avenue"
    62. # - Set Page MapID
    63. # @page.map_id = MapID
    64. # - Check a given Case's status
    65. # @case.open?
    66. # @case.cold?
    67. # @case.closed?
    68. # @case.sealed?
    69. # @case.top_secret?
    70. # - Change a given Case's status
    71. #   Statuses: nil, :cold, :closed, :sealed, :top_secret, :declass
    72. # @page.status = some_status ## For Single Page
    73. # @case.status = some_status ## For Entire Case
    74. # @case.open!
    75. # @case.cold!
    76. # @case.close!
    77. # @case.declassify!
    78. # - Check if the current Case has got more than N pages
    79. # @case.more_pages?(N)
    80. # - Set Fake System Date
    81. # $game_system.date = [Year, Month, Day]
    82. # $game_system.year = Year
    83. # $game_system.month = Month
    84. # $game_system.day = Day
    85. # $game_system.month_day(Month, Day)
    86. # $game_system.next_day
    87. # $game_system.next_week
    88. # $game_system.next_month
    89. # - Get Fake System Date Data
    90. # $game_system.days
    91. # $game_system.months
    92. # $game_system.years
    93. module KInquire
    94.   DEFAULT_DATE = [257, 1, 2] # Format: Y, M, D
    95.   START_DATE = [257, 1, 5] # Format: Y, M, D
    96.   UNKNOWN = "Unknown"
    97.   STATUSES = ["Open", "Cold", "Closed", "Sealed", "Top Secret"]
    98.   DECLASSIFIED = "Declassified"
    99.   module DateSetup
    100.     MAX_DAYS = 30
    101.     MAX_MONTHS = 12
    102.   end
    103.   module Heading
    104.     BACKDROP = "heading"
    105.     FONT_NAME = "Times New Roman"
    106.     FONT_SIZE = 24
    107.     FONT_BOLD = true
    108.     FONT_SHADOW = true
    109.     TITLE = "Cases"
    110.     SELECT_LABEL = "Please select a category"
    111.   end
    112.   module FileManager
    113.     CHARS_TO_REMOVE = 7
    114.     FONT_NAME = "Times New Roman"
    115.     FONT_SIZE = 21
    116.     FONT_BOLD = false
    117.     FONT_SHADOW = true
    118.     SELECT_LABEL = "Please select a case"
    119.   end
    120.   module Files
    121.     # Available Formats: "Y/M/D", "M/D/Y", "D/M/Y"
    122.     DATE_FORMAT = "Y/M/D"
    123.     TITLE_FONT_NAME = ""
    124.     TITLE_FONT_SIZE = 22
    125.     TITLE_FONT_BOLD = true
    126.     TITLE_FONT_SHADOW = true
    127.     TEXT_FONT_NAME = "Times New Roman"
    128.     TEXT_FONT_SIZE = 21
    129.     TEXT_FONT_BOLD = true
    130.     TEXT_FONT_SHADOW = true
    131.     PAGE_FONT_SIZE = 21
    132.     PAGE_FONT_SHADOW = true
    133.     HIDDEN_FONT_NAME = "Verdana"
    134.     HIDDEN_FONT_SIZE = 24
    135.     HIDDEN_FONT_BOLD = true
    136.     HIDDEN_FONT_SHADOW = true
    137.     NO_RECORD = "No record was found"
    138.     CASE_NUMBER = "Case No."
    139.     DATE = "Date"
    140.     NAME = "Name"
    141.     AGE = "Age"
    142.     OWNER = "Owner"
    143.     LOCATION = "Location"
    144.     THREAT_LEVEL = "Threat Level"
    145.     RELEVANCE = "Relevance"
    146.     CITY = "City"
    147.     CONTACT = "Contact"
    148.     TARGET = "Target"
    149.     STATUS = "Status"
    150.     DESCRIPTION = "Description"
    151.   end
    152.   module DateMethods
    153.     def month_day(nm, nd)
    154.       @date.month = nm
    155.       @date.day = nd
    156.     end
    157.     def year=(ny) @date.year = ny end
    158.     def month=(nm) @date.month = nm end
    159.     def day=(nd) @date.day = nd end
    160.     def date=(ary) @date = KInquire::Date.new(ary) end
    161.     def date() @date end
    162.   end
    163.   class Date
    164.     include DateSetup
    165.     def initialize(*data)
    166.       data = data.flatten
    167.       total = data.size
    168.       if total < 3
    169.         str = "Wrong number of arguments (found #{total}, expected 3)"
    170.         raise ArgumentError, str
    171.       end
    172.       @year = data.shift
    173.       @month = data.shift
    174.       @day = data.shift
    175.       @days = 0
    176.     end
    177.     def next_month(days=1)
    178.       if days > 1
    179.         left = MAX_DAYS - @day
    180.         days -= left
    181.       end
    182.       if @month < MAX_MONTHS
    183.         @month += 1
    184.         @day = days
    185.       else
    186.         @year += 1
    187.         @month = 1
    188.         @day = days
    189.       end
    190.     end
    191.     def next_day
    192.       @days += 1
    193.       @day < MAX_DAYS ? @day += 1 : next_month
    194.     end
    195.     def next_days(days)
    196.       @days += days
    197.       @day < MAX_DAYS ? @day += days : next_month(days)
    198.     end
    199.     def next_week
    200.       @days += 7
    201.       @day < MAX_DAYS ? @day += 7 : next_month(7)
    202.     end
    203.     def months() (@days / MAX_DAYS).round end
    204.     def years() (@days / MAX_DAYS / MAX_MONTHS).round end
    205.     attr_accessor :year, :month, :day, :days
    206.   end
    207.   class CasePage
    208.     def initialize
    209.       @name = UNKNOWN
    210.       @age = 0
    211.       @threat_level = nil
    212.       @relevance = nil
    213.       @location = UNKNOWN
    214.       @map_id = 0
    215.       @owner = UNKNOWN
    216.       @contact = UNKNOWN
    217.       @picture = ""
    218.       @type = nil
    219.       @status = nil
    220.       @lines = []
    221.     end
    222.     def classified?() @status == :sealed or @status == :top_secret end
    223.     def info?() @type == :info end
    224.     def person?() @type == :person end
    225.     def place?() @type == :location end
    226.     def evidence?() @type == :evidence end
    227.     attr_accessor :name, :age, :owner, :picture, :threat_level, :type, :lines
    228.     attr_accessor :location, :map_id, :relevance, :contact, :status
    229.   end
    230.   class Case
    231.     include DateMethods
    232.     def initialize(cid, case_name=UNKNOWN, city_name=UNKNOWN)
    233.       @id = cid
    234.       @name = case_name
    235.       @city = city_name
    236.       @location = UNKNOWN
    237.       @contact = UNKNOWN
    238.       @target = UNKNOWN
    239.       @priority = nil
    240.       @pages = [CasePage.new]
    241.       @pages[0].type = :info
    242.       @status = nil
    243.       @date = Date.new(DEFAULT_DATE)
    244.     end
    245.     def add_page(type, pic)
    246.       @pages << page = CasePage.new
    247.       page.picture = pic
    248.       page.type = type
    249.       page.status = @status
    250.       page
    251.     end
    252.     def person(name, age, pic, threat_level, relevance)
    253.       page = add_page(:person, pic)
    254.       page.name = name
    255.       page.age = age
    256.       page.threat_level = threat_level
    257.       page.relevance = relevance
    258.       $game_system.map_interpreter.page = page
    259.     end
    260.     def place(location, owner, pic, threat_level, relevance)
    261.       page = add_page(:location, pic)
    262.       page.name = location
    263.       page.owner = owner
    264.       page.threat_level = threat_level
    265.       page.relevance = relevance
    266.       $game_system.map_interpreter.page = page
    267.     end
    268.     def evidence(thing, owner, contact, pic, threat_level, relevance)
    269.       page = add_page(:evidence, pic)
    270.       page.name = thing
    271.       page.owner = owner
    272.       page.contact = contact
    273.       page.threat_level = threat_level
    274.       page.relevance = relevance
    275.       $game_system.map_interpreter.page = page
    276.     end
    277.     def more_pages?(n) @pages.size > n end
    278.     def open?() @status == nil or @status == :declass end
    279.     def cold?() @status == :cold end
    280.     def closed?() @status == :closed end
    281.     def sealed?() @status == :sealed end
    282.     def top_secret?() @status == :top_secret end
    283.     def declassified?() @status == :declass end
    284.     def open!() @status = nil end
    285.     def cold!() @status = :cold end
    286.     def close!() @status = :closed end
    287.     def declassify!() @status = :declass end
    288.     attr_accessor :id, :name, :city, :location, :priority, :pages, :status
    289.     attr_accessor :target, :contact
    290.   end
    291.   class Finding
    292.     def initialize() @cases = [] end
    293.     def <<(kase) @cases << kase end
    294.     def case_id?(cid) @cases.select{|c| c.id == cid }.any? end
    295.     def case_name?(name) @cases.select{|c| c.name == name }.any? end
    296.     def case_by_id(cid) @cases.select{|c| c.id == cid }[0] end
    297.     def case_by_name(name) @cases.select{|c| c.name == name }[0] end
    298.     def case_names() @cases.map{|c| c.name } end
    299.     def last_case() @last_case end
    300.     attr_accessor :cases
    301.   end
    302.   extend self
    303.   attr_accessor :last_case, :this_case
    304. end
    305. class Game_System
    306.   include KInquire::DateMethods
    307.   alias :kyon_inquiry_gm_sys_init :initialize
    308.   def initialize
    309.     kyon_inquiry_gm_sys_init
    310.     @date = KInquire::Date.new(KInquire::START_DATE)
    311.     @start_date = @date.dup
    312.   end
    313.   def next_day() @date.next_day end
    314.   def next_days(n) @date.next_days(n) end
    315.   def next_week() @date.next_week end
    316.   def days() @date.days end
    317.   def months() @date.months end
    318.   def years() @date.years end
    319.   attr_reader :start_date, :date
    320. end
    321. class Game_Party
    322.   alias :kyon_inquiry_gm_pty_init :initialize
    323.   def initialize
    324.     kyon_inquiry_gm_pty_init
    325.     @inquiry = KInquire::Finding.new
    326.   end
    327.   def case_id?(cid) @inquiry.case_id?(cid) end
    328.   def case_name?(name) @inquiry.case_name?(name) end
    329.   def case(name) KInquire.this_case = @inquiry.case_by_name(name) end
    330.   def case_by_id(cid) KInquire.this_case = @inquiry.case_by_id(cid) end
    331.   def new_case(cid, case_name, city_name, options={})
    332.     cs = case_by_id(cid)
    333.     return cs if cs
    334.     cs = KInquire::Case.new(cid, case_name, city_name)
    335.     @inquiry << cs
    336.     cs.priority = options.delete(:p) || 10
    337.     cs.status = options.delete(:s)
    338.     KInquire.last_case = cs
    339.   end
    340.   attr_reader :inquiry
    341. end
    342. class Interpreter
    343.   def new_case(cid, kase, city, options={})
    344.     @case = $game_party.new_case(cid, kase, city, options)
    345.   end
    346.   def case_by_id(cid) @case = $game_party.case_by_id(cid) end
    347.   def case_by_name(name) @case = $game_party.case(name) end
    348.   def case_id?(cid) $game_party.case_id?(cid) end
    349.   def case_name?(cid) $game_party.case_name?(cid) end
    350.   attr_writer :page
    351. end
    352. class KInfoHeading
    353.   include KInquire::Heading
    354.   def initialize(hx, hy)
    355.     @sprites = [Sprite.new, Sprite.new]
    356.     @sprites.each do |s|
    357.       s.x = hx
    358.       s.y = hy
    359.     end
    360.     @sprites[0].bitmap = b = RPG::Cache.picture(BACKDROP).dup
    361.     @cw = b.width
    362.     @sprites[1].bitmap = Bitmap.new(@cw, b.height)
    363.   end
    364.   def set_text(text, align=0)
    365.     b = @sprites[1].bitmap
    366.     b.clear
    367.     f = b.font
    368.     f.name = FONT_NAME
    369.     f.size = FONT_SIZE
    370.     f.bold = FONT_BOLD
    371.     if FONT_SHADOW
    372.       f.color.set(0, 0, 0)
    373.       b.draw_text(1, 4, @cw, FONT_SIZE, text, align)
    374.       b.draw_text(1, 5, @cw, FONT_SIZE, text, align)
    375.       f.color.set(255, 255, 255)
    376.     end
    377.     b.draw_text(0, 4, @cw, FONT_SIZE, text, align)
    378.   end
    379.   def dispose
    380.     @sprites.each do |s|
    381.       s.bitmap.dispose
    382.       s.dispose
    383.     end
    384.     @sprites.clear
    385.   end
    386. end
    387. class KCaseManWindow < Window_Selectable
    388.   include KInquire::FileManager
    389.   def initialize(wx, wy)
    390.     super(wx, wy, 212, 480 - wy)
    391.     @cw = width - 32
    392.     @data = []
    393.   end
    394.   def open_list(type)
    395.     cases = $game_party.inquiry.cases
    396.     @cases = case type
    397.     when 0 then cases.select{|c| c.open? }
    398.     when 1 then cases.select{|c| c.cold? }
    399.     when 2 then cases.select{|c| c.closed? }
    400.     when 3 then cases.select{|c| c.sealed? }
    401.     when 4 then cases.select{|c| c.top_secret? }
    402.     end
    403.     @item_max = @cases.size
    404.     return if @cases.empty?
    405.     @data = @cases.map{|c| c.name }
    406.     activate
    407.     refresh
    408.   end
    409.   def refresh
    410.     return if @data.empty?
    411.     self.contents.dispose if self.contents
    412.     self.contents = Bitmap.new(@cw, row_max * 28)
    413.     f = self.contents.font
    414.     f.name = FONT_NAME
    415.     f.size = FONT_SIZE
    416.     f.bold = FONT_BOLD
    417.     @item_max.times{|n| draw_item(n) }
    418.   end
    419.   def draw_item(pos)
    420.     data = @data[pos]
    421.     ts = data.size
    422.     tw = contents.text_size(data).width
    423.     data = data.slice(0..ts-CHARS_TO_REMOVE) + "..." if tw > @cw
    424.     contents.draw_text(4, pos * 28 + 2, @cw, 24, data)
    425.   end
    426.   def update_cursor_rect
    427.     if @index < 0
    428.       self.cursor_rect.empty
    429.     else
    430.       self.cursor_rect.set(0, @index * 28, @cw, 28)
    431.     end
    432.   end
    433.   def activate
    434.     self.active = bool = !empty_list?
    435.     self.index = 0 if bool
    436.   end
    437.   def deactivate
    438.     self.index = -1
    439.     self.active = false
    440.   end
    441.   def empty_list?() @item_max == 0 end
    442.   def empty_pages?() @cases.empty? end
    443.   def case() @cases[@index] end
    444. end
    445. class KInfoFileWindow < Window_Base
    446.   include KInquire
    447.   def initialize
    448.     super(224, 0, 416, 480)
    449.     @cw = width - 32
    450.     @ch = height - 32
    451.     @text_size = Files::TEXT_FONT_SIZE + 2
    452.     self.contents = Bitmap.new(@cw, @ch)
    453.     refresh_no_file(nil)
    454.   end
    455.   def draw_text_shadow(sx, sy, sw, size, text, align)
    456.     c = contents
    457.     c.font.color.set(0, 0, 0)
    458.     c.draw_text(sx+1, sy, sw, size, text, align)
    459.     c.draw_text(sx+1, sy+1, sw, size, text, align)
    460.     c.font.color.set(255, 255, 255)
    461.   end
    462.   def refresh_no_file(kind)
    463.     c = contents
    464.     c.clear
    465.     text = case kind
    466.     when nil then Heading::SELECT_LABEL
    467.     when :case then FileManager::SELECT_LABEL
    468.     when :page then Files::NO_RECORD
    469.     end
    470.     tfs = Files::TITLE_FONT_SIZE
    471.     if Files::TITLE_FONT_SHADOW
    472.       draw_text_shadow(0, 0, @cw, tfs, text, 1)
    473.     end
    474.     c.draw_text(0, 0, @cw, tfs, text, 1)
    475.   end
    476.   def refresh
    477.     c = contents
    478.     c.clear
    479.     tfs = Files::TITLE_FONT_SIZE
    480.     if Files::TITLE_FONT_SHADOW
    481.       draw_text_shadow(0, 0, @cw, tfs, @name, 1)
    482.     end
    483.     c.draw_text(0, 0, @cw, tfs, @name, 1)
    484.     pages = @case.pages
    485.     @page = pages[@index]
    486.     @lines = @page.lines
    487.     pos = (@index + 1).to_s + "/" + @total.to_s
    488.     txfs = Files::TEXT_FONT_SIZE
    489.     if @total == 0
    490.       nothing = Files::NO_RECORD
    491.       if Files::TEXT_FONT_SHADOW
    492.         draw_text_shadow(0, 60, @cw, txfs, nothing, 1)
    493.       end
    494.       c.draw_text(0, 60, @cw, txfs, nothing, 1)
    495.     end
    496.     if @page.info?
    497.       draw_info
    498.     elsif @page.classified?
    499.       draw_hidden
    500.     elsif @page.person?
    501.       draw_person
    502.     elsif @page.place?
    503.       draw_place
    504.     elsif @page.evidence?
    505.       draw_evidence
    506.     end
    507.     pfs = Files::PAGE_FONT_SIZE
    508.     py = @ch - pfs
    509.     if Files::PAGE_FONT_SHADOW
    510.       draw_text_shadow(0, py, @cw, pfs, pos, 2)
    511.     end
    512.     c.draw_text(0, py, @cw, pfs, pos, 2)
    513.   end
    514.   def find_status
    515.     labels = KInquire::STATUSES
    516.     case @case.status
    517.     when nil      then labels[0]
    518.     when :declass then DECLASSIFIED
    519.     when :cold    then labels[1]
    520.     when :closed  then labels[2]
    521.     when :sealed  then labels[3]
    522.     when :top_secret then labels[4]
    523.     end
    524.   end
    525.   def draw_date
    526.     dt = @case.date
    527.     case format = Files::DATE_FORMAT
    528.     when /y\/m\/d/i
    529.       date = sprintf("%02d/%02d/%02d", dt.year, dt.month, dt.day)
    530.     when /m\/d\/y/i
    531.       date = sprintf("%02d/%02d/%02d", dt.month, dt.day, dt.year)
    532.     when /d\/m\/y/i
    533.       date = sprintf("%02d/%02d/%02d", dt.day, dt.month, dt.year)
    534.     end
    535.     dx = 108 + contents.text_size(date).width
    536.     contents.draw_text(100, 66, @cw, @text_size, date)
    537.     contents.draw_text(dx, 66, @cw, @text_size, "(" + format.upcase + ")")
    538.   end
    539.   def draw_info
    540.     c = self.contents
    541.     draw_text_shadow(0, 40, @cw, @text_size, Files::CASE_NUMBER, 0)
    542.     draw_text_shadow(0, 66, @cw, @text_size, Files::DATE, 0)
    543.     draw_text_shadow(0, 92, @cw, @text_size, Files::STATUS, 0)
    544.     draw_text_shadow(0, 120, @cw, @text_size, Files::TARGET, 0)
    545.     draw_text_shadow(0, 148, @cw, @text_size, Files::CITY, 0)
    546.     draw_text_shadow(0, 176, @cw, @text_size, Files::CONTACT, 0)
    547.     c.font.color.set(220, 220, 20)
    548.     c.draw_text(0, 40, @cw, @text_size, Files::CASE_NUMBER)
    549.     c.draw_text(0, 66, @cw, @text_size, Files::DATE)
    550.     c.draw_text(0, 92, @cw, @text_size, Files::STATUS)
    551.     c.draw_text(0, 120, @cw, @text_size, Files::TARGET)
    552.     c.draw_text(0, 148, @cw, @text_size, Files::CITY)
    553.     c.draw_text(0, 176, @cw, @text_size, Files::CONTACT)
    554.     c.font.color.set(255, 255, 255)
    555.     c.draw_text(100, 40, @cw, @text_size, sprintf("%08d", @case.id))
    556.     draw_date
    557.     c.draw_text(100, 92, @cw, @text_size, find_status)
    558.     c.draw_text(100, 120, @cw, @text_size, @case.target)
    559.     c.draw_text(100, 148, @cw, @text_size, @case.city)
    560.     c.draw_text(100, 176, @cw, @text_size, @case.contact)
    561.   end
    562.   def draw_hidden
    563.     c = self.contents
    564.     hfs = Files::HIDDEN_FONT_SIZE + 2
    565.     draw_text_shadow(0, 140, @cw, hfs, Files::DATE, 1)
    566.     c.draw_text(0, 140, @cw, hfs, Files::DATE)
    567.   end
    568.   def draw_picture
    569.     src = RPG::Cache.picture(@page.picture)
    570.     contents.blt(4, 32, src, src.rect)
    571.     src.dispose
    572.   end
    573.   def draw_person
    574.     c = self.contents
    575.     if @page.picture.empty?
    576.       pex = 0
    577.     else
    578.       pex = 116
    579.       draw_picture
    580.     end
    581.     draw_text_shadow(pex, 32, @cw, @text_size, Files::NAME, 0)
    582.     draw_text_shadow(pex, 88, @cw, @text_size, Files::AGE, 0)
    583.     draw_text_shadow(pex + 72, 88, @cw, @text_size, Files::THREAT_LEVEL, 0)
    584.     draw_text_shadow(4, 144, @cw, @text_size, Files::RELEVANCE, 0)
    585.     draw_text_shadow(4, 172, @cw, @text_size, Files::DESCRIPTION, 0)
    586.     c.font.color.set(220, 220, 20)
    587.     c.draw_text(pex, 32, @cw, @text_size, Files::NAME)
    588.     c.draw_text(pex, 88, @cw, @text_size, Files::AGE)
    589.     c.draw_text(pex + 72, 88, @cw, @text_size, Files::THREAT_LEVEL)
    590.     c.draw_text(4, 144, @cw, @text_size, Files::RELEVANCE)
    591.     c.draw_text(4, 172, @cw, @text_size, Files::DESCRIPTION)
    592.     c.font.color.set(255, 255, 255)
    593.     c.draw_text(pex, 60, @cw, @text_size, @page.name)
    594.     c.draw_text(pex + 8, 116, @cw, @text_size, @page.age.to_s)
    595.     c.draw_text(pex + 80, 116, @cw, @text_size, @page.threat_level)
    596.     c.draw_text(120, 144, @cw, @text_size, @page.threat_level)
    597.     draw_lines(200, @text_size)
    598.   end
    599.   def draw_place
    600.     c = self.contents
    601.     if @page.picture.empty?
    602.       pex = 0
    603.     else
    604.       pex = 156
    605.       draw_picture
    606.     end
    607.     draw_text_shadow(pex, 54, @cw, @text_size, Files::LOCATION, 0)
    608.     draw_text_shadow(pex, 82, @cw, @text_size, Files::OWNER, 0)
    609.     draw_text_shadow(pex, 110, @cw, @text_size, Files::THREAT_LEVEL, 0)
    610.     draw_text_shadow(pex, 138, @cw, @text_size, Files::RELEVANCE, 0)
    611.     draw_text_shadow(4, 172, @cw, @text_size, Files::DESCRIPTION, 0)
    612.     c.font.color.set(220, 220, 20)
    613.     c.draw_text(pex, 54, @cw, @text_size, Files::LOCATION)
    614.     c.draw_text(pex, 82, @cw, @text_size, Files::OWNER)
    615.     c.draw_text(pex, 110, @cw, @text_size, Files::THREAT_LEVEL)
    616.     c.draw_text(pex, 138, @cw, @text_size, Files::RELEVANCE)
    617.     c.draw_text(4, 172, @cw, @text_size, Files::DESCRIPTION)
    618.     c.font.color.set(255, 255, 255)
    619.     c.draw_text(pex, 32, @cw, @text_size, @page.name)
    620.     pex += 116
    621.     c.draw_text(pex, 54, @cw, @text_size, @page.location)
    622.     c.draw_text(pex, 82, @cw, @text_size, @page.owner)
    623.     c.draw_text(pex, 110, @cw, @text_size, @page.threat_level)
    624.     c.draw_text(pex, 138, @cw, @text_size, @page.relevance)
    625.     draw_lines(198, @text_size)
    626.   end
    627.   def draw_evidence
    628.     c = self.contents
    629.     if @page.picture.empty?
    630.       pex = 0
    631.     else
    632.       pex = 116
    633.       draw_picture
    634.     end
    635.     draw_text_shadow(pex, 58, @cw, @text_size, Files::OWNER, 0)
    636.     draw_text_shadow(pex, 86, @cw, @text_size, Files::CONTACT, 0)
    637.     draw_text_shadow(pex, 114, @cw, @text_size, Files::RELEVANCE, 0)
    638.     draw_text_shadow(4, 172, @cw, @text_size, Files::DESCRIPTION, 0)
    639.     c.font.color.set(220, 220, 20)
    640.     c.draw_text(pex, 58, @cw, @text_size, Files::OWNER)
    641.     c.draw_text(pex, 86, @cw, @text_size, Files::CONTACT)
    642.     c.draw_text(pex, 114, @cw, @text_size, Files::RELEVANCE)
    643.     c.draw_text(4, 172, @cw, @text_size, Files::DESCRIPTION)
    644.     c.font.color.set(255, 255, 255)
    645.     c.draw_text(pex, 32, @cw, @text_size, @page.name)
    646.     c.draw_text(pex + 104, 58, @cw, @text_size, @page.owner)
    647.     c.draw_text(pex + 104, 86, @cw, @text_size, @page.contact)
    648.     c.draw_text(pex + 104, 114, @cw, @text_size, @page.relevance)
    649.     draw_lines(156 + @text_size * 2, @text_size)
    650.   end
    651.   def draw_lines(base_y, size)
    652.     c = self.contents
    653.     w = @cw - 24
    654.     @lines.size.times do |n|
    655.       c.draw_text(12, base_y + n * size - 2, w, size, @lines[n])
    656.     end
    657.   end
    658.   def case=(kase)
    659.     @case = kase
    660.     @name = kase.name
    661.     @total = @case.pages.size
    662.     @index = 0
    663.     refresh
    664.   end
    665.   def update
    666.     if Input.trigger?(Input::LEFT)
    667.       return $game_system.se_play($data_system.buzzer_se) if @total == 0
    668.       $game_system.se_play($data_system.cursor_se)
    669.       @index = (@index - 1) % @total
    670.       refresh
    671.       return
    672.     elsif Input.trigger?(Input::RIGHT)
    673.       return $game_system.se_play($data_system.buzzer_se) if @total == 0
    674.       $game_system.se_play($data_system.cursor_se)
    675.       @index = (@index + 1) % @total
    676.       refresh
    677.     end
    678.   end
    679. end
    680. class KInquireScene
    681.   include KInquire
    682.   def main
    683.     @stage = :main
    684.     @command_window = Window_Command.new(212, STATUSES)
    685.     @command_window.active = true
    686.     @heading = KInfoHeading.new(0, 32 * 6)
    687.     @heading.set_text(Heading::TITLE, 1)
    688.     @case_window = KCaseManWindow.new(0, 32 * 7)
    689.     @file_window = KInfoFileWindow.new
    690.     Graphics.transition
    691.     while @stage
    692.       Graphics.update
    693.       Input.update
    694.       update
    695.     end
    696.     Graphics.freeze
    697.     @file_window.dispose
    698.     @case_window.dispose
    699.     @heading.dispose
    700.     @command_window.dispose
    701.   end
    702.   def update
    703.     case @stage
    704.     when :main
    705.       update_main
    706.     when :cases
    707.       update_cases
    708.     when :file
    709.       update_file
    710.     end
    711.   end
    712.   def update_main
    713.     @command_window.update
    714.     if Input.trigger?(Input::B)
    715.       $game_system.se_play($data_system.cancel_se)
    716.       $scene = Scene_Map.new
    717.       return @stage = nil
    718.     elsif Input.trigger?(Input::C)
    719.       @case_window.open_list(@command_window.index)
    720.       if @case_window.empty_list?
    721.         return $game_system.se_play($data_system.buzzer_se)
    722.       end
    723.       $game_system.se_play($data_system.decision_se)
    724.       @file_window.refresh_no_file(:case)
    725.       @stage = :cases
    726.     end
    727.   end
    728.   def update_cases
    729.     @case_window.update
    730.     if Input.trigger?(Input::B)
    731.       $game_system.se_play($data_system.cancel_se)
    732.       $scene = Scene_Map.new
    733.       return @stage = nil
    734.     elsif Input.trigger?(Input::C)
    735.       if @case_window.empty_list?
    736.         return $game_system.se_play($data_system.buzzer_se)
    737.       end
    738.       $game_system.se_play($data_system.decision_se)
    739.       @case_window.active = false
    740.       @stage = :file
    741.       if @case_window.empty_pages?
    742.         @file_window.refresh_no_file(:page)
    743.         return
    744.       end
    745.       @file_window.case = @case_window.case
    746.     end
    747.   end
    748.   def update_file
    749.     @file_window.update
    750.     if Input.trigger?(Input::B)
    751.       $game_system.se_play($data_system.cancel_se)
    752.       @file_window.refresh_no_file(:case)
    753.       @case_window.active = true
    754.       return @stage = :cases
    755.     end
    756.   end
    757. end
    复制代码





    Terms & Conditions

    Free for use in non commercial games. Contact me if you need it for a commercial game instead.
    Include me in your game credits!
    Do not report my script anywhere else!


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 17:55 , Processed in 0.098012 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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