Ultimate Quest Manager使用文档翻译

Ultimate Quest Manager

Ultimate Quest Manager is an asset to help you to create any type of quests for your game. It has an expandable logic for your needs. You can create unlimited sequences for a quest and unlimited objectives for a sequence. The whole system will be working dynamically after you create your quest in the Data Table. This system has a save game feature (quest data only) and it will be saving&loading all of the progress for a quest. Compass, dynamic markers, quest log, and a lot more are included in this pack.

Features(功能特性)

  • The system uses Data Tables(使用datatable进行数据管理)
  • Unlimited possibilities for a quest(无限的任务可能性)
  • Multiple objectives with multiple objective types(多目标及多目标类型)
  • Any type of objective is possible with Tags.(通过tag指定任意类型的目标)
  • Save & Load system implemented.(直接继承保存/读取系统)
  • Supports World Composition(支持多World组成)

Getting Started

Merging to Other Projects(合并到其他项目)

Ultimate Quest Manager is straightforward to use and integrate with other assets. It’s using Player State to keep the quest data in a component called Manager_Mission. If you are using a custom player state, just add this component to your player state class. Just make sure you added the BP_QuestManager to your persistent level before starting.

任务系统可以直接和其他资产合并,它通过在Player State中增加Manager_Mission组件来保存数据。如果使用自定义的Player State,需要在你得到Player State蓝图中增加这个组件。还要确保在游戏开始前在persistent level中添加了BP_QuestManager

The interaction system is only working with an actor-tag called QuestManager. If you don’t have your interaction system, make sure you added the tag to your pawn from the Class Defaults like the image below.

若要交互系统起作用,需要在actor-tag下面增加QuestManager标签。如果你没有自己的交互系统,需要如下图所示,确保在你的pawntags下添加QuestManager标签。

Here you can see the interaction event called by keyboard key E. You can use this event anywhere you like.

下图你可以看见按住E后的交互事件被调用了,你可以在任何地方调用该事件。

 

 

 

It should be all working after these setups.

完成以上设置后,系统应该就会正常运行了。

Changing The Defaults(修改默认值)

There are several variables that you might want to play with such as visual things, save game slot name, or the quest to start with. You can change all of these from the Manager_Mission component’s class defaults.

通过该虚拟类可以有如下设置,如:修改game slot name修改保存路径或者开始于哪个任务。你可以在Manager_Mission组件的class defaults修改他们。

 

 

 

 

It’s important to select a data table and a quest to start with. It will take the selected quest as a start point. You can select the quest you like while you are testing-debugging.

datatable中选择任务开始的数据很重要,通过该选项你可以选择任务开始的点,尤其是在测试的时候需要随意选择起点。

How To Create A Quest(如何创建任务)

This system is using the Data Table to keep information of a quest. You can use the example one as well as you can create a new one from the content browser by selecting Struct_QuestMaster structure as a base.

任务系统使用Data Table保存任务信息,你可以直接使用示例中的数据表,或者从quest_master为基础创建新的数据表。

 

This is how it looks like when you create a new row in the data table. There are a couple of things that are important to set such as Type, Unique Name, and Interaction Type under the Essentials section.

下图所示为数据表的结构。其中数据表中比较关键的设置为TypeUnique Name,和在Essentials下的Interaction Type

 

Unique Name is self-explanatory. Every quest needs to have a unique name.

Display Name is the text that will be displayed on the quest log

Description is also going to be readable on the quest log

Unique Name  为数据表中唯一的键值

Display Name  为显示在任务日志中的文字

Description      同样可以被任务日志读取,为描述信息

Essentials(要素)

In this section, you have to choose if this quest is going to be added directly to the quest log or the player needs to take it from a target. You can choose it from interaction type. Repeatable as it says if you want it to be repeatable from the completed quests or not.

interaction type:设置这条任务信息是直接加入到任务日志中,还是需要玩家从目标身上获取任务。

Repeatable:设置是否在完成的任务中重复

 

Quests Need To Be Completed: You can add Unique Names from other quests to this array, it will check if the listed quests are completed or not. If not, it will wait to add this quest until it got completed.

Quests Need To Be Completed:可以在Unique Names数组中添加其他任务,该任务只有在设置的其他任务都完成时才会完成。


Condition Tags: It’s completely optional but it allows you to add custom tags to add a quest to the log. For instance, you can add a condition tag called Level2, then when your character reaches level 2, you can call the function below;

 

 

  

When this is called, this quest will be added to the log with the given condition tag. It’s completely up to your imagination.

Condition Tags:可选项,它允许您添加自定义标记以将后续任务添加到日志中。例如,在达到某个条件后,调用Add Condition Tag添加一个名为Level2的条件标记,当tag成功被到QuestManager获取后, Condition TagsLevel2标记的任务将增加到日志中。

 

Quest Giver Display Name this is the text that will be displayed on the log as the target name. You may leave it empty.

Quest Giver Display Name:在日志中记录的获取任务的对象的名称,可以设为空

 

Target Name this one is important if you like to take the quest from a target. You can assign target names from the Manager_QuestTarget component that you need to add to your target actors.

Target Name如果你想从一个目标获取任务,这个选项很重要,您可以在目标Actor中添加Manager_QuestTarget组件,并指定其名称,任务信息将根据该名称进行获取。

Sequences(序列)

You can add unlimited sequences to a quest. Basically, a sequence is a part of the quest that holds the objectives that you need to do. Once you complete the given objectives, it will run the next sequence. If there is no sequence more, it will complete the quest.

您可以为任务添加无限序列。基本上,序列是任务的一部分,它包含您需要完成的目标。完成给定目标后,它将运行下一个序列。如果没有更多的序列,该任务将自动完成。

 

 

Title will be displayed on the in-game widget.

Description will be also displayed on the in-game widget

Title标题信息,显示在游戏任务面板中

Description描述信息,同样显示在游戏任务面板中

 

 

Failure Conditions where you can add custom tags such as Death or etc. Again it’s up to your imagination. Then you can trigger these conditions from any blueprint like the given example below.

If a condition matches, it will finish the quest and consider it is failed. You can choose to restart the quest, reset objective progress and select a random restart point just like I did in the demo map.

Failure Conditions在这里你可以增加任务失败的标记,如Death等,如下图所示,你可以在蓝图中任何地方调用Try Trigger Failure Condation,如果条件符合,相应的任务会结束并标记为失败,你还可以参照Demo关卡,选择重新开始任务,重置任务进度,或者随机开始点。

 

 

Objectives(目标)

Just like the sequences, you can add multiple objectives to a sequence. Any type and any amount. It also works with tags, so still, it’s up to your imagination.

和序列一样,你可以在序列中增加多个目标。目标也和tag运行原理一样,可以增加任意类型和数量,完全依赖你的想象力。

 

 

 

Objective Tag is a variable that will define the objective purpose. For instance, iit can be Collect, Kill, Reach, Interact, etc. But these are just examples. You can put anything to here and call where the action is completed in the game like the image below.

Objective Tag 该变量定义了该目标的意图,例如,它可以是Collect, Kill, Reach, Interact等。但是这些都只是示例,你可以给他设置任何信息,并在某些动作完成时调用它,就像下图所示那样。

 

 

Target Name once again you can set in Manager_QuestTarget
Once it’s triggered, it will find the objective with the given target and try to complete it if the count is zero.

Target Name当你在某个Manager_QuestTarget组件中设置了他,一旦触发,系统会自动搜索设置了Target Name的目标,并在计数器为0时完成该目标。

Rewards (奖励)

It has an expandable reward system. You can add multiple rewards then create your own logic in the player state where Manager_Mission is located.

系统支持一个可以拓展的奖励系统,你可以在player state中的Manager_Mission下创建自己的逻辑来增加多好奖励值。

Still using tags, also an additional name and a value. You can define the reward with a tag, define the reward name, and set a value to give. I’ve made a couple of examples in case you need more, check out the player state’s event graph or the image below.

Rewards的原理同样的使用tags,附加名称、附加值。你可以通过tagreward name、和给定的值定义reward。在player stateevent graph中有很多示例,下图也展示了它是怎样设置的。

 

In this example, I’ve added a Switch On Name so I can add different types of rewards. If it’s a reward with the tag of  “Experience”, it might keep adding XP on and on. If it’s a reward with the tag of “Item” I might call my inventory logic and request to add an item with the given name and with the given amount.

在这个例子中,通过Switch On Name来增加不同类型的奖励值,如果某个reward有“Experience”tag标签,系统将增加XP值,如果某个reward有“Item”tag标签,我可能会调用逻辑并请求增加某些东西。

Marker Info In General(图标信息)

Markers are highly customizable and dynamic as much as possible. There are several variables that you can play with. Most of them are self-explanatory.

图标是动态的且尽可能是可定制化的。你可以通过以下的属性进行定制设置:

You can display the marker where ever you like, keep it on the edge or not, etc.

你可以在任意地方显示图标,包括是否在屏幕边缘。


Take Location From Marker Target is an option to keep the marker on the Nearest Location always. If this is checked it will try to find the marker target with the target name and update it accordingly.

Take Location From Marker Target通过该选项可以设置是将标记始终保持在最近位置如果选中此项,它将尝试查找具有目标名称的标记目标,并相应地更新它。

 

You can select or create new markers by the given example material instances from the Marker Icon section.

通过示例中的Marker Icon材质示例,你可以选择或创建新的图标。

 

Display Between Distance is helpful if you like to display the marker in a range. If you keep the values 0, it will always be displayed. If you change the X value it will be hidden if the distance is lower than the X value. If you change the Y value it will be hidden if the distance is higher than the Y value.

Display Between Distance:该选项设置了图标显示的距离。如果值为0,图标将始终显示。X定义了最近距离,Y定义了最远距离。

 

Nearest Location is simply the target’s world location.

Nearest Location为目标的世界坐标

 

Offset value is useful if you like to add an offset to the marker from the target actor.

Offset定义了和targetactor的偏移量

 

Marker Target is not something that you can change, it will be updated dynamically.

Marker Target不能设置,该值是动态更新的

Editor Utilities(编辑器工具)

During the development, you will need to remove the saved game file over and over again to test it. So I created a simple widget that will delete it for you with a button. You can find it in the UserInterface folder, it’s called EUW_RemoveSavedGame. Right-click on it and click to Run Editor Utility Widget

在开发阶段,你需要移除游戏的保存数据,该界面可以在编辑器中单独运行,在编辑器的UserInterface文件夹中找到它,右键单击,点击Run Editor Utility Widget直接运行。

 

Now you can dock it somewhere in the viewport and delete the save game easily. If you decide to change the save game slot name from the Manager_Mission, make sure you also change it from the utility widget as well by changing the editable text on the top.

点击Delete Save Game按钮删除游戏存档。

 

 

 

posted @ 2022-09-15 17:17  小手一拿  阅读(121)  评论(0编辑  收藏  举报