设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2419|回复: 15
打印 上一主题 下一主题

[有事请教] GameusQuestSystem 任务没看懂【要怎么调】

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1062
在线时间
189 小时
注册时间
2020-9-28
帖子
58
跳转到指定楼层
1
发表于 2023-5-21 11:02:14 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
30星屑
$gameParty.hasQuests([quest ids], filter)
*   此指令一次檢測隊伍是否開啟了某些任務,以及它們是否全部在某個類別中。請勿與上面的指令搞混。
*   過濾子可以是"progress"(進行中)、"completed"(已完成)或"failed"(已失敗)。
*   如果以上條件都滿足,則回傳true。
*   例如,可以使用在接取某任務前,確認該任務必須完成的一海票前置任務。
*
* $gameQuests.get(quest_id).currentStep
* 取得某個任務正進行到哪個階段數。可以藉由"控制變數"事件的腳本取得任務階段id
* $gameQuests.get(quest_id).currentStep === step_number
*   用於取得某個任務正進行到哪個階段。階段數從0開始。
*   注意:即使該任務並未開啟,此指令仍然會回傳數字!請與$gameParty.hasQuest(quest_id)並用!
*
* $gameQuests.get(quest_id).status === "status"
*   用於取得某個任務的狀態。
*   "status"可以是"progress"(進行中)、"completed"(已完成)或"failed"(已失敗)。
*  
* $gameQuests.totalQuests(filter)
*   用於取得某狀態下有多少任務。
*   過濾子可以是"progress"(進行中)、"completed"(已完成)或"failed"(已失敗)。
*   這個指令會取得該狀態所有類別的任務,不管隊伍是否擁有!
*
* $gameParty.totalQuests(filter)
*   與上面指令相同,但只會取得隊伍擁有的任務。


上面那些没看懂,要怎么弄啊,请高手回答一下??先谢谢了!

Lv3.寻梦者

梦石
0
星屑
1062
在线时间
189 小时
注册时间
2020-9-28
帖子
58
2
 楼主| 发表于 2023-6-19 10:51:44 | 只看该作者
到底有没有人知道啊?

点评

解决了吗?  发表于 2023-7-5 10:02
回复

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9847
在线时间
1884 小时
注册时间
2020-1-2
帖子
1089
3
发表于 2023-6-19 19:45:07 | 只看该作者
云端城主 发表于 2023-6-19 10:51
到底有没有人知道啊?

没想到这么久了你还在解决中
B站没人气的夏目漠漠,直播间:5378938实用插件教程点击红字传送
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
825
在线时间
78 小时
注册时间
2022-7-31
帖子
73
4
发表于 2023-6-27 18:30:34 | 只看该作者
本帖最后由 天下无尽 于 2023-6-27 18:33 编辑

====小白,最近正在研究GameusQuestSystem,以下为自己的看法,可能有错误====
$gameParty.hasQuests([quest ids], filter):如,$gameParty.hasQuests([1], completed)----这个方法会先判断任务1是否完成,然后返回True或者False.
$gameQuests.get(quest_id).currentStep:如,$gameQuests.get(1).currentStep----这个方法会获取任务1当前进行到的步骤(从0开始计算,建议在$gameParty.hasQuests([quest ids], filter)返回True时再执行函数)
$gameQuests.get(quest_id).status === "status",如:$gameQuests.get(1).status === "completed",判断任务1是否完成,其中"completed"可以替换为"progress"(进行中)、"completed"(已完成)或"failed"(已失败)
$gameQuests.totalQuests(filter),如:$gameQuests.totalQuests(completed),获取完成的任务有多少个
$gameParty.totalQuests(filter),这个不太清楚。
====
例如,有一个任务:
    任务1:步骤1,前往教堂;步骤2,和修女交谈。
    然后,可以在进入教堂的时候判断:
        逻辑:1.判断任务1是否在任务列表中,2.如果是,判断任务步骤,3.如果前面条件都满足,那么完成步骤1,进入步骤2.
        代码:
                ====注,在“$gameVariables.setValue(101,a);”一行中,这个101是对应的变量编号,在这里对应变量“临时”
====希望能有帮助====

a.png (28.51 KB, 下载次数: 97)

a.png
回复

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1062
在线时间
189 小时
注册时间
2020-9-28
帖子
58
5
 楼主| 发表于 2023-6-28 15:55:52 | 只看该作者
天下无尽 发表于 2023-6-27 18:30
====小白,最近正在研究GameusQuestSystem,以下为自己的看法,可能有错误====
$gameParty.hasQuests([ques ...

不知道是不是设置错了?我就想知道是怎么判定任务1 第1步的?

都还没有错。

任务1的 第1步进行中时,居然判定不了任务啦?任务1 进行不了第1步?
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
825
在线时间
78 小时
注册时间
2022-7-31
帖子
73
6
发表于 2023-6-29 20:57:51 | 只看该作者
本帖最后由 天下无尽 于 2023-6-29 21:04 编辑
云端城主 发表于 2023-6-28 15:55
不知道是不是设置错了?我就想知道是怎么判定任务1 第1步的?

都还没有错。


hmmmmmm,$gameQuests.get(quest_id).currentStep方法返回的是一个数字,默认从0开始计算,也就是说,如果任务进行到了第1步,返回的数字就是0——所以......直接用条件判断一个数字......?有点奇怪。而且,最近我对这段代码进行了修改,可以参考一下新代码。

屏幕截图 2023-06-29 210404.png (168.01 KB, 下载次数: 115)

屏幕截图 2023-06-29 210404.png
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
825
在线时间
78 小时
注册时间
2022-7-31
帖子
73
7
发表于 2023-6-29 21:00:33 | 只看该作者
云端城主 发表于 2023-6-28 15:55
不知道是不是设置错了?我就想知道是怎么判定任务1 第1步的?

都还没有错。

而且,如果条件分歧支持直接判断数字的话,你的任务进行到了步骤1,返回的数字是0,代表了false,会直接执行“否则”里的事件,如果真是这样,当然会显示未取得了,建议不要直接用分歧判断一个数字。
回复

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1062
在线时间
189 小时
注册时间
2020-9-28
帖子
58
8
 楼主| 发表于 2023-6-30 17:12:29 | 只看该作者
天下无尽 发表于 2023-6-29 20:57
hmmmmmm,$gameQuests.get(quest_id).currentStep方法返回的是一个数字,默认从0开始计算,也就是说,如果 ...

我是条件分支设置,没有影响任务100%,你的代码我没懂?对不起我是小白目了。
我把任务文件范例传下,你下载,做好了再传给我看看。谢谢啊!


链接:https://pan.baidu.com/s/1dws1gykxmYsjXibaK5unJA?pwd=ydo1
提取码:ydo1
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
825
在线时间
78 小时
注册时间
2022-7-31
帖子
73
9
发表于 2023-6-30 18:58:50 | 只看该作者
本帖最后由 天下无尽 于 2023-6-30 19:28 编辑
云端城主 发表于 2023-6-30 17:12
我是条件分支设置,没有影响任务100%,你的代码我没懂?对不起我是小白目了。
我把任务文件范例传下,你 ...


啊这,本人只是一个初中生,出于学业方面很多东西受限,还是直接发截图吧,貌似没有办法可以直接发一整个工程文件。
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
825
在线时间
78 小时
注册时间
2022-7-31
帖子
73
10
发表于 2023-6-30 19:23:42 | 只看该作者
本帖最后由 天下无尽 于 2023-6-30 19:30 编辑
云端城主 发表于 2023-6-30 17:12
我是条件分支设置,没有影响任务100%,你的代码我没懂?对不起我是小白目了。
我把任务文件范例传下,你 ...


我直接发那个地图文件代码吧:
JSON 代码复制下载
  1. {
  2. "autoplayBgm":false,"autoplayBgs":false,"battleback1Name":"","battleback2Name":"","bgm":{"name":"","pan":0,"pitch":100,"volume":90},"bgs":{"name":"","pan":0,"pitch":100,"volume":90},"disableDashing":false,"displayName":"","encounterList":[],"encounterStep":30,"height":13,"note":"","parallaxLoopX":false,"parallaxLoopY":false,"parallaxName":"","parallaxShow":true,"parallaxSx":0,"parallaxSy":0,"scrollType":0,"specifyBattleback":false,"tilesetId":1,"width":17,
  3. "data":[2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,2816,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  4. "events":[
  5. null,
  6. {"id":1,"name":"EV001","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"Actor1","direction":8,"pattern":1,"characterIndex":1},"list":[{"code":108,"indent":0,"parameters":["--判断是否接受了该委托--"]},{"code":355,"indent":0,"parameters":["//使用$gameParty.hasQuest(quest_id)判断"]},{"code":655,"indent":0,"parameters":["if(!($gameParty.hasQuest(1))){"]},{"code":655,"indent":0,"parameters":["    //如果没有,则设置临时变量的数值"]},{"code":655,"indent":0,"parameters":["    $gameVariables.setValue(1, 1);"]},{"code":655,"indent":0,"parameters":["}else{"]},{"code":655,"indent":0,"parameters":["    if($gameQuests.get(1).currentStep === 1){"]},{"code":655,"indent":0,"parameters":["        $gameMessage.setFaceImage('Actor1',1);"]},{"code":655,"indent":0,"parameters":["        $gameMessage.add(\"【勇者】\\n完成任务!\");"]},{"code":655,"indent":0,"parameters":["        $gameVariables.setValue(1, 3);"]},{"code":655,"indent":0,"parameters":["    }else{"]},{"code":655,"indent":0,"parameters":["        $gameVariables.setValue(1, 4);}"]},{"code":655,"indent":0,"parameters":["}"]},{"code":111,"indent":0,"parameters":[1,1,0,1,0]},{"code":101,"indent":1,"parameters":["Actor1",1,0,2]},{"code":401,"indent":1,"parameters":["【勇者】"]},{"code":401,"indent":1,"parameters":["你好,少年,来接受委托吧!"]},{"code":101,"indent":1,"parameters":["Actor1",0,0,2]},{"code":401,"indent":1,"parameters":["【霍尔德】"]},{"code":401,"indent":1,"parameters":["好!"]},{"code":356,"indent":1,"parameters":["Quest Add 1"]},{"code":0,"indent":1,"parameters":[]},{"code":411,"indent":0,"parameters":[]},{"code":111,"indent":1,"parameters":[1,1,0,3,0]},{"code":356,"indent":2,"parameters":["Quest Complete 1"]},{"code":0,"indent":2,"parameters":[]},{"code":411,"indent":1,"parameters":[]},{"code":111,"indent":2,"parameters":[1,1,0,4,0]},{"code":101,"indent":3,"parameters":["Actor1",1,0,2]},{"code":401,"indent":3,"parameters":["【勇者】"]},{"code":401,"indent":3,"parameters":["快去吧!"]},{"code":0,"indent":3,"parameters":[]},{"code":412,"indent":2,"parameters":[]},{"code":0,"indent":2,"parameters":[]},{"code":412,"indent":1,"parameters":[]},{"code":0,"indent":1,"parameters":[]},{"code":412,"indent":0,"parameters":[]},{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":8,"y":8},
  7. {"id":2,"name":"EV002","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"Actor3","direction":2,"pattern":1,"characterIndex":0},"list":[{"code":101,"indent":0,"parameters":["Actor3",0,0,2]},{"code":401,"indent":0,"parameters":["【将军】"]},{"code":401,"indent":0,"parameters":["你好。"]},{"code":108,"indent":0,"parameters":["--判断是否接受了该委托--"]},{"code":355,"indent":0,"parameters":["//使用$gameParty.hasQuest(quest_id)判断"]},{"code":655,"indent":0,"parameters":["if(!($gameParty.hasQuest(1) || ($gameQuests.get(1).status === \"progress\" && $gameQuests.get(1).currentStep === 1))){"]},{"code":655,"indent":0,"parameters":["    //如果没有,则这里直接用脚本对话。"]},{"code":655,"indent":0,"parameters":["    $gameMessage.setFaceImage('Actor3',0);"]},{"code":655,"indent":0,"parameters":["    $gameMessage.add(\"【将军】\\n没什么事情就不要来找我!\");"]},{"code":655,"indent":0,"parameters":["}else{//否则,判定获取步骤"]},{"code":655,"indent":0,"parameters":["    if($gameQuests.get(1).currentStep == 0){"]},{"code":655,"indent":0,"parameters":["        $gameMessage.setFaceImage('Actor3',0);"]},{"code":655,"indent":0,"parameters":["        $gameMessage.add(\"【将军】\\n你回去汇报,不用找我了。\");"]},{"code":655,"indent":0,"parameters":["        $gameVariables.setValue(1, 2);"]},{"code":655,"indent":0,"parameters":["    }"]},{"code":655,"indent":0,"parameters":["}"]},{"code":111,"indent":0,"parameters":[1,1,0,2,0]},{"code":356,"indent":1,"parameters":["Quest NextStep 1"]},{"code":0,"indent":1,"parameters":[]},{"code":412,"indent":0,"parameters":[]},{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":8,"y":4}
  8. ]
  9. }



====我的GameQuestSystem是我自己修改过的,在主菜单直接添加了任务选项,所以地图上没有打开任务界面的事件====

屏幕截图 2023-06-30 192907.png (487.58 KB, 下载次数: 115)

屏幕截图 2023-06-30 192907.png

屏幕截图 2023-06-30 192916.png (504 KB, 下载次数: 143)

屏幕截图 2023-06-30 192916.png

屏幕截图 2023-06-30 192927.png (104.45 KB, 下载次数: 119)

屏幕截图 2023-06-30 192927.png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-16 07:36

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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