Skip to content

关于FTB任务的snbt文件提取翻译后会出现部分任务出错的问题 #20

@KazegaFuHua

Description

@KazegaFuHua

游戏版本:1.16.5
游玩的整合包:恒温计划1.0.8

在该整合包中,FTB任务里有一项可以兑换货币的任务,以下就以金币、银币、铜币来举例

使用翻译后的文件后,当领取到一定量的铜币后疑似会触发自动兑换(原文件并不会触发自动兑换,作者本身是让玩家手动点击兑换),然后疑似触发FTB任务的BUG,兑换成银币并不会减少铜币,然后刚兑换银币又反向自动兑换为铜币,总之就停不下来疯狂兑换(无中生有的兑换货币,越换越多导致死循环)

以上都只是猜测是这么回事,因为领取任务的一瞬间服务器就崩了,根本看不清发生了什么,但总之把这个兑换的任务的文件替换回原始文件就没有问题了

于是我开始找这个文件的问题,该文件在该整合包的config/ftbquests/quests/chapters/exchange.snbt位置,经过粗略比对,应该只是翻译后的文件中所有truefalse都被加上了引号变成了"true""false"的原因,当我去掉所有包裹着truefalse的引号就不存在该问题了

这虽然似乎是FTB任务模组的BUG但我已经尝试过跟新到1.16.5最新的FTB任务ftb-quests-forge-1605.3.7-build.165版本FTB官方依旧没有解决该问题(或许他们本身生成的文件就没有引号所以根本没想过要解决),所以希望翻译软件的作者能解决一下,在翻译过程中不要对truefalse加上引号

具体snbt未翻译原文如下

{
	id: "2B7BD783B8363268"
	group: "3EBBA7A7B8A3300E"
	order_index: 1
	filename: "exchange"
	title: "Bulk Item Exchange"
	default_quest_shape: ""
	default_hide_dependency_lines: false
	quests: [
		{
			icon: "kubejs:exalted_orb"
			disable_toast: true
			x: -3.0d
			y: 0.0d
			id: "24DFB8061AF8708A"
			tasks: [{
				id: "4C7BA8A5E961622B"
				type: "item"
				item: "kubejs:chaos_orb"
				count: 10L
				consume_items: true
			}]
			rewards: [
				{
					id: "11DB7E63D0500D4F"
					type: "item"
					team_reward: false
					auto: "no_toast"
					item: "kubejs:exalted_orb"
				}
				{
					id: "0690F7FC8A4F3885"
					type: "command"
					icon: "thermal:machine_cycle_augment"
					auto: "no_toast"
					command: "/ftbquests change_progress @p reset 24DFB8061AF8708A"
					player_command: false
				}
			]
		}
		{
			icon: "kubejs:mirror_of_kalandra"
			disable_toast: true
			x: -2.0d
			y: 0.0d
			id: "2118CE6F5A39DDA2"
			tasks: [{
				id: "1B46F31A6014BF9D"
				type: "item"
				item: "kubejs:exalted_orb"
				count: 20L
				consume_items: true
			}]
			rewards: [
				{
					id: "38EC62E8FAF2897B"
					type: "item"
					team_reward: false
					auto: "no_toast"
					item: "kubejs:mirror_of_kalandra"
				}
				{
					id: "7E5659A64E63BB0D"
					type: "command"
					icon: "thermal:machine_cycle_augment"
					auto: "no_toast"
					command: "/ftbquests change_progress @p reset 2118CE6F5A39DDA2"
					player_command: false
				}
			]
		}
		{
			icon: "kubejs:exalted_orb"
			disable_toast: true
			x: -2.0d
			y: 1.5d
			id: "26BF950370EE7516"
			tasks: [{
				id: "376EB1687FF75DC3"
				type: "item"
				item: "kubejs:mirror_of_kalandra"
				consume_items: true
			}]
			rewards: [
				{
					id: "3A47E178A29F9425"
					type: "item"
					team_reward: false
					auto: "no_toast"
					item: "kubejs:exalted_orb"
					count: 20
				}
				{
					id: "60ED7FA5939E2BC0"
					type: "command"
					icon: "thermal:machine_cycle_augment"
					auto: "no_toast"
					command: "/ftbquests change_progress @p reset 26BF950370EE7516"
					player_command: false
				}
			]
		}
		{
			icon: "kubejs:chaos_orb"
			disable_toast: true
			x: -3.0d
			y: 1.5d
			id: "1B02E30ADAC71055"
			tasks: [{
				id: "0D5094B84B48ABA6"
				type: "item"
				item: "kubejs:exalted_orb"
				consume_items: true
			}]
			rewards: [
				{
					id: "2142378878566AE4"
					type: "item"
					team_reward: false
					auto: "no_toast"
					item: "kubejs:chaos_orb"
					count: 10
				}
				{
					id: "4AC90BB0BECF68EC"
					type: "command"
					icon: "thermal:machine_cycle_augment"
					auto: "no_toast"
					command: "/ftbquests change_progress @p reset 1B02E30ADAC71055"
					player_command: false
				}
			]
		}
	]
}

翻译过后的文件如下

{
	id: "2B7BD783B8363268"
	group: "3EBBA7A7B8A3300E"
	order_index: 1
	filename: "exchange"
	title: "批量物品交换[--Bulk Item Exchange--]"
	default_quest_shape: ""
	default_hide_dependency_lines: "false"
	quests: [
		{
			icon: "kubejs:exalted_orb"
			disable_toast: "true"
			x: -3.0d
			y: 0.0d
			id: "24DFB8061AF8708A"
			tasks: [
				{
					id: "4C7BA8A5E961622B"
					type: "item"
					item: "kubejs:chaos_orb"
					count: 10L
					consume_items: "true"
				}
			]
			rewards: [
				{
					id: "11DB7E63D0500D4F"
					type: "item"
					team_reward: "false"
					auto: "no_toast"
					item: "kubejs:exalted_orb"
				}
				{
					id: "0690F7FC8A4F3885"
					type: "command"
					icon: "thermal:machine_cycle_augment"
					auto: "no_toast"
					command: "/ftbquests change_progress @p reset 24DFB8061AF8708A"
					player_command: "false"
				}
			]
		}
		{
			icon: "kubejs:mirror_of_kalandra"
			disable_toast: "true"
			x: -2.0d
			y: 0.0d
			id: "2118CE6F5A39DDA2"
			tasks: [
				{
					id: "1B46F31A6014BF9D"
					type: "item"
					item: "kubejs:exalted_orb"
					count: 20L
					consume_items: "true"
				}
			]
			rewards: [
				{
					id: "38EC62E8FAF2897B"
					type: "item"
					team_reward: "false"
					auto: "no_toast"
					item: "kubejs:mirror_of_kalandra"
				}
				{
					id: "7E5659A64E63BB0D"
					type: "command"
					icon: "thermal:machine_cycle_augment"
					auto: "no_toast"
					command: "/ftbquests change_progress @p reset 2118CE6F5A39DDA2"
					player_command: "false"
				}
			]
		}
		{
			icon: "kubejs:exalted_orb"
			disable_toast: "true"
			x: -2.0d
			y: 1.5d
			id: "26BF950370EE7516"
			tasks: [
				{
					id: "376EB1687FF75DC3"
					type: "item"
					item: "kubejs:mirror_of_kalandra"
					consume_items: "true"
				}
			]
			rewards: [
				{
					id: "3A47E178A29F9425"
					type: "item"
					team_reward: "false"
					auto: "no_toast"
					item: "kubejs:exalted_orb"
					count: 20
				}
				{
					id: "60ED7FA5939E2BC0"
					type: "command"
					icon: "thermal:machine_cycle_augment"
					auto: "no_toast"
					command: "/ftbquests change_progress @p reset 26BF950370EE7516"
					player_command: "false"
				}
			]
		}
		{
			icon: "kubejs:chaos_orb"
			disable_toast: "true"
			x: -3.0d
			y: 1.5d
			id: "1B02E30ADAC71055"
			tasks: [
				{
					id: "0D5094B84B48ABA6"
					type: "item"
					item: "kubejs:exalted_orb"
					consume_items: "true"
				}
			]
			rewards: [
				{
					id: "2142378878566AE4"
					type: "item"
					team_reward: "false"
					auto: "no_toast"
					item: "kubejs:chaos_orb"
					count: 10
				}
				{
					id: "4AC90BB0BECF68EC"
					type: "command"
					icon: "thermal:machine_cycle_augment"
					auto: "no_toast"
					command: "/ftbquests change_progress @p reset 1B02E30ADAC71055"
					player_command: "false"
				}
			]
		}
	]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions