赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 949 |
最后登录 | 2019-4-8 |
在线时间 | 9 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 9 小时
- 注册时间
- 2013-5-25
- 帖子
- 17
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 shadowstep 于 2013-5-25 15:15 编辑
新人第一次发帖,不知道转载的东西在哪里发,
这个脚本是翻qiang在外网找到的,希望没有撞车{:2_270:} 如果违规的话请告知我。
我把最上端的注解翻译了一下,至于注解中的提及的代码行号,请对照未翻译的版本。
水平有限,如果翻译存在错误,请指正。
代码很长,请在附件里下载- #==============================================================================
- # 任务向导 [VXA]
- # 版本: 1.0.3
- # 作者: modern algebra (rmrk.net)
- # 日期: 24 September 2012
- #
- #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- # 描述:
- # 该脚本为你提供了一个显示任务进度的图形化界面。它是基于目标的,这意味着你能够
- #选择何时呈现任务目标,并能对它进行设置以便显示任务的成功或失败。也就是说,该脚本并
- #不直接为你制作任务,它仅仅是一个显示任务的补充界面。因此,所有的任务事件都需要你自
- #己制作,并通过脚本调用更新任务进度。所以,你要仔细阅读脚本介绍和介于代码第232行到第
- #612行之间的可编辑区域。
- #
- #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- # 介绍:
- # 把该脚本粘贴到位于Main上方,Materials下方的一个或多个槽位中。如果你已经使用
- #了菜单修改脚本,你必须把其他所有菜单脚本放到该脚本上方。
- # 所有的配置都是在QuestData模块中完成的。即便这不是必要的,但我仍建议你把配置
- #模块从脚本中剪切出来并粘贴到脚本编辑器中的另一个槽位里。这么做的原因是,当该脚本被
- #更新时,你能够保留配置部分,只替换脚本的其他部分。如果你愿意的话,你可以在位于第232
- #行的可编辑区域A配置脚本的默认设置。即使你不更改配置,脚本也能正常运作。但是,即使你
- #现在不打算进行配置,你也应该熟悉一下所有的设置项,只有这样你才能使脚本物尽其用。脚
- #本中包含非常多的设置项,这使得你能把它配置成你游戏中独一无二的任务手册。这些设置项
- #甚至细化到信息窗口的每个部分的绘制顺序。每个设置项或者常量旁边都有一个简短的描述。
- # 可编辑区域B可以说是整个脚本的真正核心——你可以在这里填写任务的一切细节。一
- #定要仔细阅读第612行的介绍!
- # 你能通过脚本事件命令中的这些代码来激活并写入任务:
- #
- # quest(quest_id)
- # quest_id:你想写入的任务的编号(整数)
- #
- # 通过以上代码,你能够写入或改变任何存储在任务中的相应数据,比如任务名,描述,
- #目标,等等。范例:
- #
- # quest(1).name = "Rest in Pieces"
- #
- # 更贴切地说,你能通过下面的代码来控制任务的进度。每个命令的参数都是相同的,因
- #此我只解释一次。它们都是不言自明的,使用它们中的任意一条代码都会激活任务。(除非你
- #使用了位于第267行的MANUAL REVEAL(手动显示)设置)
- #
- # reveal_objective(quest_id, objective_id_1, ..., objective_id_n)
- # quest_id:你想写入的任务的编号(整数)
- # objective_id_1, ..., objective_id_n :达成任务所需要的一系列目标的编
- #号(整数)。可以只有一个,也可以是全部。它将会在任务信息中列出目标。
- #
- # conceal_objective(quest_id, objective_id_1, ..., objective_id_n)
- # 它会隐藏任务信息中的目标列表
- #
- # complete_objective(quest_id, objective_id_1, ..., objective_id_n)
- # 改变目标为已完成的颜色。所有主要目标完成后,任务将会完成。
- #
- # uncomplete_objective (quest_id, objective_id_1, ..., objective_id_n)
- # 将已完成目标变为未完成状态。
- #
- # fail_objective(quest_id, objective_id_1, ..., objective_id_n)
- # 改变目标为失败的颜色。只要有一个目标失败,任务就会失败。
- #
- # unfail_objective(quest_id, objective_id_1, ..., objective_id_n)
- # 将失败的目标变为未失败状态。
- #
- # change_reward_status(quest_id, value)
- # value:可以是true或者false。如果未填写,则默认为true。完全是可选的,但这
- #只是个人开关,你可以在给予奖励时开启它。然后你可以把它作为条件,来避免玩家重复获得奖
- #励。(见第180行)
- #
- # 范例:
- # reveal_objective(1, 0)
- # 显示编号为1的任务的第一个目标
- # complete_objective(6, 2, 3)
- # 完成编号为6的任务的第三和第四个目标。 (0号是第一个,以此类推)
- # change_reward_status(8)
- # 把编号为8的任务的奖励开关设置为true(打开)
- #
- # 新特色:你能让奖励显示在菜单上(见可编辑区域 B)。补充说明:你可以用以下代码
- #来自动给已完成并且尚未给予奖励的任务分配指定奖励。
- #
- # distribute_quest_rewards(quest_id)
- # quest_id :你想为编号为多少的任务分配奖励
- #
- # 当然,它只能分配物质奖励(物品,武器,铠甲,金钱,或者经验)。它不会分配你通过字
- #符串指定的奖励。为此,你可以在条件分支中使用这个代码。(我并不建议你使用这个功能,
- #因为我觉得通过事件来指定奖励更好)
- #
- # 另外一些有用的代码:
- #
- # reset_quest(quest_id)
- # quest_id:你想写入的任务的编号(整数)
- # 它会重新初始化任务,即任务到目前为止的所有进度都会丢失。
- #
- # delete_quest(quest_id)
- # 取消激活并重置任务
- #
- # conceal_quest(quest_id)
- # 取消激活并隐藏任务,但是任务进度会被保存
- #
- # reveal_quest(quest_id)
- # 激活或重新激活任务。注意,如果位于第284行的MANUAL_REVEAL(手动显示)选项
- #为true(开启)或者该任务之前已经被隐藏,则该命令是必不可少的。否则的话,对于任务操
- #作来说它已经足够了。
- #
- # change_quest_access(:symbol)
- # “:symbol”必须是以下六个选项中的一个(一定不能漏掉“:”):
- # “:disable”不允许在任务菜单上进入该任务(菜单项变灰)
- # “:enable”允许在任务菜单上进入该任务
- # “:disable_menu”从任务菜单上移除该任务
- # “:enable_menu”在任务菜单上显示该任务
- # “:disable_map”不允许在地图上通过按键进入任务菜单
- # “:enable_map”允许在地图上通过按键进入任务菜单
- #
- # change_quest_background("bg_filename", bg_opacity, bg_blend_type)
- # 改变任务背景图片
- # bg_filename 背景图片的文件名,背景图片应放入游戏目录的Pictures文件
- # 夹内
- # bg_opacity 设置背景图片的不透明度。如果未包含该参数,则默认与位于
- # 第434行的设置项的值相同
- # bg_blend_type 设置背景图片的混合类型。如果未包含该参数,则默认与位于
- # 第437行的设置项的值相同
- #
- # change_quest_windows ("windowskin_filename", tone, opacity)
- # 改变任务窗口
- # windowskin_filename 窗口图片的文件名,窗口图片应放入游戏目录的
- # Graphics文件夹内
- # opacity 设置窗口图片的不透明度。如果未包含该参数,则默认
- # 与位于第423行的设置项的值相同
- # blend_type 设置窗口图片的混合类型。如果未包含该参数,则默认
- # 与位于第426行的设置项的值相同
- #
- # 在脚本命令中,有一些代码能够用于条件分支。我在此提醒,所有这些都是可选的。
- # 你也可以使用开关和变量检查,仅仅通过事件来监控任务的进度。不过,这些命令
- # 比事件更易于使用,它们是:
- #
- #
- # quest_revealed?(quest_id)
- # quest_id :你想写入的任务的编号(整数)
- # 它用于判断任务是否被激活
- # This is satisfied if the quest has been activated.
- #
- # quest_complete?(quest_id)
- # 它用于判断任务的所有主要目标是否都被完成
- # This is satisfied if all prime objectives of the quest are complete
- #
- # quest_failed?(quest_id)
- # 它用于判断任务的主要目标中是否有任意一个失败
- # This is satisfied if any prime objective of the quest is failed
- #
- # quest_rewarded?(quest_id)
- # 它用于判断任务奖励是否已被分配
- # This is satisfied if you have changed the reward status to true.
- #
- # objective_revealed?(quest_id, objective_id_1, ... objective_id_n)
- # objective_id_1, ..., objective_id_n :达成任务所需要的一系列目标的编号
- # (整数)
- # 可以只有一个,也可以是全部。
- # 它用于判断目标列表是否已被显示
- #
- # objective_active?(quest_id, objective_id_1, ... objective_id_n)
- # 它用于判断所有被列出的目标是否已被显示并且它们既没有完成也没有失败
- #
- # objective_complete?(quest_id, objective_id_1, ... objective_id_n)
- # 它用于判断所有被列出的目标是否都已完成
- #
- # objective_failed?(quest_id, objective_id_1, ... objective_id_n)
- # 它用于判断所有被列出的目标是否已经失败
- #
- # 如果你想从事件中调用任务菜单,应在脚本中使用下面的代码:
- #
- # call_quest_journal
- # call_quest_journal(quest_id)
- # quest_id : 你想打开任务窗口的任务所对应的编号
- #
- # 如果你没有指定任务编号(第198行),它只会按通常的情况打开任务窗口。如果你
- # 指定了任务编号(第199行),只要该任务已经显示出来,并能通过菜单进入,它就会打开该
- # 任务的窗口。
- #
- # 最后,在默认设置下,任务基于主要目标的完成情况而自动完成或失败。但是你也通过
- # 设置使得任务没有主要目标,在这种情况下,你只能通过以下代码,在脚本调用中手动使得
- # 任务完成、失败,或者(重)激活任务:
- #
- # manually_complete_quest(quest_id)
- # quest_id : 你想手动完成的任务编号
- # manually_fail_quest(quest_id)
- # quest_id : 你想手动使其失败的任务编号
- # manually_activate_quest(quest_id)
- # quest_id : 你想手动激活的任务编号
- #==============================================================================
复制代码 以下是英文原版:
- #==============================================================================
- # Quest Journal [VXA]
- # Version: 1.0.3
- # Author: modern algebra (rmrk.net)
- # Date: 24 September 2012
- #
- #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- # Description:
- #
- # This script provides a graphical interface for showing quest progress. It
- # is objective-based, meaning that you choose when to reveal objectives and
- # you can set it so that they show up as complete or failed. That said, this
- # script does not build quests for you; it is only a supplementary scene for
- # showing them. As such, you need to event all of the quests yourself and
- # update quest progress via script call. Therefore, pay close attention to
- # the instructions here and in the Editable Regions at lines 232 and 612.
- #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- # Instructions:
- #
- # Paste this script into its own slot or slots, above Main and below
- # Materials. If you are using the menu access feature, you should put any
- # other menu scripts above this one.
- #
- # All of the configuration is done in the QuestData module. While it is not
- # necessary, it is recommended that you separate the configuration module
- # from the rest of the script by cutting and pasting it into its own slot in
- # the Script Editor (as you will see if you have the demo). The reason for
- # this is that, if and when this script gets updated, you can preserve the
- # configuration section and only replace the other parts of the script. If
- # you wish to do that, you must cut everything from the first line down to
- # the final end of the module. The first lines of the body script should be
- # the equals bar right above # ** Game_Quest. Again, it's up to you whether
- # you do it.
- #
- # You can go to EDITABLE REGION A at line 232 to configure the default
- # settings for the script. All of these will work fine without modification,
- # of course, but even if do not want to configure now, you should familiarize
- # yourself with all the settings so that you can make the best use of your
- # script. I have included tons of settings so that you can make the Quest
- # Journal unique for your game, even down to the order in which each section
- # of the info window is drawn. A brief description of each setting is
- # included either to the right or directly above each constant.
- #
- # EDITABLE REGION B is the real heart of the script however - this is where
- # you fill in all of the details for the quests. Read the instructions at
- # line 612 very carefully!
- #
- # You can activate and access a quest with this code in the Script event
- # command:
- #
- # quest(quest_id)
- # quest_id : the integer ID of the quest you want to access
- #
- # From that, you can access or alter any relevant data stored in the quest,
- # like name, description, objectives, etc... Example:
- # quest(1).name = "Rest in Pieces"
- #
- # More relevantly, when it comes to controlling the progress of quests the
- # following codes can be used in a Script event command. The arguments are
- # the same for each command so I only explain them once. All of them are
- # pretty self-explanatory and using any of them will activate the quest
- # (unless you are using the MANUAL REVEAL setting at line 267).
- #
- # reveal_objective(quest_id, objective_id_1, ..., objective_id_n)
- # quest_id : the integer ID of the quest you want to access.
- # objective_id_1, ..., objective_id_n : a list of the IDs of the
- # objectives you want to operate on. It can be as few as one or as
- # many as all of them.
- # Will show the listed objectives in the Quest's information
- #
- # conceal_objective(quest_id, objective_id_1, ..., objective_id_n)
- # Will hide the listed objectives in the Quest's information
- #
- # complete_objective(quest_id, objective_id_1, ..., objective_id_n)
- # Changes the colour of the listed objectives to the completed colour.
- # The quest is completed once all prime objectives are.
- #
- # uncomplete_objective (quest_id, objective_id_1, ..., objective_id_n)
- # Changes the status of the listed complete objectives back to active
- #
- # fail_objective(quest_id, objective_id_1, ..., objective_id_n)
- # Changes the colour of the listed objectives to the failed colour.
- # The quest is failed once one prime objective is.
- #
- # unfail_objective(quest_id, objective_id_1, ..., objective_id_n)
- # Changes the status of the listed failed objectives back to active
- #
- # change_reward_status(quest_id, value)
- # value : either true or false. If excluded, defaults to true.
- # Totally optional, but this is just a personal switch which you can
- # turn on when the reward is given. You can then make it a condition
- # so you don't reward the players more than once. (see line 180)
- #
- # EXAMPLES:
- # reveal_objective(1, 0)
- # This would reveal the first objective of the quest with ID 1
- # complete_objective(6, 2, 3)
- # This would complete the third & fourth objectives of the quest with ID 6
- # change_reward_status(8)
- # This would set the reward switch to true for the quest with ID 8.
- #
- # Another new feature is the ability to set rewards that will show up in the
- # menu (see EDITABLE REGION B). In addition to that, you can use the following
- # code to automatically distribute the specified rewards for a quest if the
- # quest is complete and no reward has yet been given:
- #
- # distribute_quest_rewards(quest_id)
- # quest_id : the ID of the quest whose rewards you want to distribute
- #
- # Of course, it can only distribute the material rewards (items, weapons,
- # armors, gold, or exp). It won't distribute rewards you specify by string.
- # To that end though, you can also use this code in a conditional branch and
- # it will be satisfied only if it distributes the rewards. Thus, if you
- # wanted to add some special rewards or do things like that, you can just put
- # that in the branch for when it is true. This feature is not really
- # recommended, since I think it is better to do it by events.
- #
- # Other codes for the Script event command that can be useful are:
- #
- # reset_quest(quest_id)
- # quest_id : the integer ID of the quest you want to access.
- # This will re-initialize the quest, meaning all quest progress to
- # date will be lost
- #
- # delete_quest(quest_id)
- # Deactivates the quest and resets it
- #
- # conceal_quest(quest_id)
- # Deactivates the quest so it won't show up in the scene, but progress
- # is saved
- #
- # reveal_quest(quest_id)
- # Activates or reactivates the quest. This command is NECESSARY if
- # MANUAL_REVEAL at line 284 is true or it has previously been
- # concealed. Otherwise, it is sufficient just to operate on the quest
- #
- # change_quest_access(:symbol)
- # :symbol must be one of six options (include the colon!):
- # :disable - prevents access to the quest scene (greys out in menu)
- # :enable - enables access to the quest scene
- # :disable_menu - this removes the quest option from the menu
- # :enable_menu - this adds the quest option to the menu
- # :disable_map - this prevents access by key from the map
- # :enable_map - this allows access by key to the map
- #
- # change_quest_background("bg_filename", bg_opacity, bg_blend_type)
- # bg_filename : the filename of the picture for the background in
- # the Pictures folder
- # bg_opacity : the opacity of the background graphic. If
- # excluded, this defaults to the value of the setting at line 434.
- # bg_blend_type : the blend type of the background graphic. If
- # excluded, this defaults to the value of the setting at line 437.
- #
- # change_quest_windows ("windowskin_filename", tone, opacity)
- # windowskin_filename : the name of the Window graphic in the
- # System folder of Graphics
- # opacity : the opacity of the windows. If excluded,
- # this defaults to the value of the setting at line 423.
- # blend_type : the blend_type of the windows. If excluded,
- # this defaults to the value of the setting at line 426.
- #
- # Also, there are a few codes that can be used in the Script command of a
- # conditional branch. I note here that all of these are optional. You could
- # use switch and variable checks and monitor quest progress solely through
- # events. However, these commands make it a little easier and they are:
- #
- # quest_revealed?(quest_id)
- # quest_id : the integer ID of the quest you want to access.
- # This is satisfied if the quest has been activated.
- #
- # quest_complete?(quest_id)
- # This is satisfied if all prime objectives of the quest are complete
- #
- # quest_failed?(quest_id)
- # This is satisfied if any prime objective of the quest is failed
- #
- # quest_rewarded?(quest_id)
- # This is satisfied if you have changed the reward status to true.
- #
- # objective_revealed?(quest_id, objective_id_1, ... objective_id_n)
- # objective_id_1, ..., objective_id_n : a list of the IDs of the
- # objectives you want to operate on. It can be as few as one or as
- # many as all of them.
- # This is satisfied if the listed objectives have been revealed
- #
- # objective_active?(quest_id, objective_id_1, ... objective_id_n)
- # This is satisfied if all the listed objectives are revealed and
- # neither complete nor failed.
- #
- # objective_complete?(quest_id, objective_id_1, ... objective_id_n)
- # This is satisfied if all the listed objectives have been completed
- #
- # objective_failed?(quest_id, objective_id_1, ... objective_id_n)
- # This is satisfied if all the listed objectives have been failed
- #
- # If you want to call the Quest scene from an event, you use the following
- # code in a call script:
- #
- # call_quest_journal
- # call_quest_journal(quest_id)
- # quest_id : ID of the quest you want to open the scene on
- #
- # If you do not specify a quest_id (line 198) then it will simply open the
- # scene as it would normally. If you do specify a quest_id (line 199) then it
- # will open the scene on that quest so long as it has been revealed and it is
- # normally accessible through the quest menu.
- #
- # Finally, the default way this script operates is that quests automatically
- # complete or fail based on the status of the prime objectives. However, you
- # can set it so that there are no prime objectives, in which case you can only
- # complete, fail, or (re)activate a quest manually through the following code
- # in a script call:
- #
- # manually_complete_quest(quest_id)
- # quest_id : ID of the quest you want to manually complete
- # manually_fail_quest(quest_id)
- # quest_id : ID of the quest you want to manually fail
- # manually_activate_quest(quest_id)
- # quest_id : ID of the quest you want to manually activate
- #==============================================================================
复制代码 |
评分
-
查看全部评分
|