⭐ 传说定时刷怪 ⭐
Legendary Timed Spawner 是一个适用于 Cobblemon 的数据包,它会在你探索世界时,让你在附近遇到传说宝可梦的刷新机会。刷新机制基于计时器和你所处的生物群系,因此根据你所在的不同位置,会有不同的宝可梦出现。
刷新列表中还包含了幻之宝可梦、究极异兽以及一些地区形态。宝可梦可以在主世界、下界和末地中刷新!
警告 (⚠️) 此数据包不会向你的游戏中添加新的宝可梦!它仅会使 Cobblemon 或你已安装的附加模组中已有的宝可梦进行刷新。如果你的游戏中没有某只宝可梦或其形态,你需要安装相应的附加模组来添加它。
? 它是如何工作的? ?
- 当计时器达到设定间隔时,数据包会进行一次宝可梦刷新的概率判定;
- 如果判定成功,数据包会选择一名在线玩家,并检查其所处的生物群系;
- 随后选择一个与该生物群系匹配的宝可梦,并在该玩家附近尝试刷新;
- 如果没有为该生物群系配置任何宝可梦,则跳过本次刷新;
- 当宝可梦刷新时,聊天栏会显示其名称、刷新位置附近的玩家以及该玩家所在的生物群系。
默认情况下,计时器设置为 60 分钟,每次计时器轮转时有 2% 的概率刷新一只宝可梦。刷新的宝可梦等级为 70。请注意,计时器轮转并不意味着一定会刷新宝可梦!
⚙️ 设置与命令 ⚙️
此数据包支持自定义配置,你可以更改一些设置!使用 /trigger lts_config 打开设置菜单,并在聊天栏中点击按钮:
- 你可以更改每次计时器轮转时宝可梦的刷新概率;
- 你可以更改两次轮转之间的时间间隔,范围从 1 分钟到 24 小时。更改时间将会重置倒计时;
- 你可以暂停计时器,并在稍后恢复;
- 你可以重置倒计时以重新开始;
- 你可以使用 强制刷新 (Force Spawn) 立即在一名随机在线玩家附近尝试刷新一只宝可梦。这将跳过概率判定,且不会重置计时器。
如果你拥有运行函数的权限,还可以使用以下命令:
- 你可以使用 /function lts:force_roll 立即执行配置的刷新概率判定并重置倒计时;
- 你可以使用 /function lts:force_spawn 在不进行概率判定的情况下,立即尝试刷新一只宝可梦。
注意:能够使用设置菜单的玩家不仅可以更改设置,还可以使用“强制刷新”按钮。这些设置对整个世界生效。
? 生物群系与刷新 ?
刷新列表包含 100 个宝可梦条目,其中包括传说宝可梦、幻之宝可梦、究极异兽以及伽勒尔形态。每只宝可梦都使用 Cobblemon 的生物群系标签来确定其可刷新的位置。
系统会在选定玩家的位置处检查生物群系。由于宝可梦会在附近生成,它可能会出现在生物群系的边界上。某些模组添加的生物群系在刷新公告中可能会显示为 未知 (Unknown)。
? 安装指南 ?
- 安装适用于 Minecraft Java 版 1.21.1 的 Cobblemon。
- 将数据包的 ZIP 文件放入世界的 datapacks 文件夹中。
- 进入世界并使用 /reload 命令,或者重启世界。
- 使用 /trigger lts_config 打开菜单并调整设置。
? 修改宝可梦与生物群系 ?
重要提示:修改数据包对新手来说可能具有挑战性。在更改文件之前请务必备份! ⚠️
若要自定义宝可梦,你需要将数据包的文件夹解压,并将其放置在世界目录下的 datapacks 文件夹中。请使用解压后的文件夹或 ZIP 文件之一,不要同时使用两者。解压后,请导航至以下路径:
LegendaryTimedSpawner/data/lts/function/select_biome.mcfunction
每只宝可梦都有一组对应的命令。例如,急冻鸟(Articuno)的条目如下所示:
scoreboard players set #eligible lts_data 0
execute if biome ~ ~ ~ #lts:reference/is_glacial run scoreboard players set #eligible lts_data 1
execute if biome ~ ~ ~ #lts:reference/is_snowy_taiga run scoreboard players set #eligible lts_data 1
execute if biome ~ ~ ~ #lts:reference/is_snowy_forest run scoreboard players set #eligible lts_data 1
execute if score #eligible lts_data matches 1 run data modify storage lts:data pool append value {"id":"articuno","n":"Articuno"}
第一行开始对该宝可梦进行检查。每一行 execute if biome 都会添加一个它可以被选中的生物群系组。只要其中一个生物群系组匹配即可。最后一行将该宝可梦添加到可能的刷新列表中。
- 移除一只宝可梦:删除其整组命令,从将 #eligible 设置为 0 的那一行开始,直到包含其宝可梦名称的那一行结束。
- 移除一个生物群系:从该宝可梦的组中删除相应的 execute if biome 行。如果你想保留该宝可梦的可选择性,请至少保留一行生物群系设置。
- 添加一个生物群系:复制现有的 execute if biome 行到该宝可梦的组中,放在其最后一行之前的位置,并将生物群系标签更改为现有的标签。
- 添加一只宝可梦:复制完整的一组命令,更改其中的生物群系行,然后更改最后一行中的 "id" 和 "n"。ID 必须是有效的 Cobblemon 宝可梦标识符;名称则是显示在聊天栏中的名字。
例如,要将名为 Mew 的宝可梦添加到现有的森林组中,请将以下三行作为单独的一组添加:
scoreboard players set #eligible lts_data 0
execute if biome ~ ~ ~ #lts:reference/is_forest run scoreboard players set #eligible lts_data 1
execute if score #eligible lts_data matches 1 run data modify storage lts:data pool append value {"id":"mew","n":"Mew"}
可用的参考标签位于 data/lts/tags/worldgen/biome/reference/。它们引用的是 Cobblemon 的生物群系标签,其中可能包含模组添加的生物群系。修改完成后,请保存文件并使用 /reload。如果宝可梦未出现,请检查 ID、标签拼写以及整个分组是否完整。
Note: 该数据包会检测生物群系,但目前不应用时间、天气、地下、水下或个体权重条件。
⏰ 更改默认计时器和概率 ⏰
你可以使用 /trigger lts_config 在游戏中更改活动计时器和概率。间隔可以从 1 分钟调整到 24 小时,概率可以从 0% 调整到 100%。
若要更改这些设置尚未保存时使用的默认值,请打开:
LegendaryTimedSpawner/data/lts/function/load.mcfunction
找到以下行:
execute unless score #interval lts_data matches 1200..1728000 run scoreboard players set #interval lts_data 72000
execute unless score #chance lts_data matches 0..1000 run scoreboard players set #chance lts_data 20
将间隔行的最后一个数字更改为你想要的刻数(ticks)。通常每分钟有 1,200 刻,因此 36,000 是 30 分钟,72,000 是 60 分钟。概率以十分之一百分比存储:20 为 2%,50 为 5%,1000 为 100%。
这些默认值不会覆盖世界中已保存的有效设置。请使用游戏内菜单更改现有世界的设置。
?️ 更改宝可梦等级 ?️
若要更改生成宝可梦的等级,请打开:
LegendaryTimedSpawner/data/lts/function/do_spawn.mcfunction
在第一行中找到 level=70,并将 70 替换为你想要的等级,范围从 1 到 100。保存文件并使用 /reload。
? 更改生成消息 ?
公告也位于 data/lts/function/do_spawn.mcfunction。其文本和颜色位于第二行的 tellraw 命令中。你可以编辑文本和颜色值,同时保持 JSON 标点符号完整。
保留 $(n) 作为宝可梦名称,保留 $(biome) 作为生物群系。包含 lts_target 的选择器显示所选玩家的名称。每行开头的第一个 $ 对于这些函数宏是必需的,因此请将其保留原位。编辑后保存并使用 /reload。
? 更改生成距离 ?
若要更改数据包搜索生成位置的距离,请打开:
LegendaryTimedSpawner/data/lts/function/spawn_at_player.mcfunction
找到两个 spreadplayers 命令。在这两个命令中,~ ~ 0 之后的 24 是最大搜索范围。在两个行中更改它,以保持下界和其他维度的一致性。下界的行还包含 under 128,以保持搜索在下界屋顶之下。合适的生成位置并不总是能找到,尤其是在困难地形或末地虚空附近。
遇到问题?你可以加入 Cobblemon 官方 Discord 服务器,搜索“Legendary Timed Spawner”并在那里提问,或者你也可以在 Discord 上私信我。
⭐ Legendary Timed Spawner ⭐
Legendary Timed Spawner is a datapack for Cobblemon that adds a chance for Legendary Pokémon to spawn around you while you're exploring your world! The spawns are based on a timer and the biome you're in, so different Pokémon can spawn depending on where you are.
The spawn list also includes Mythical Pokémon, Ultra Beasts and some regional forms. Pokémon can spawn in the Overworld, Nether and End!
Warning (⚠️) This datapack does not add Pokémon to your game! It only makes Pokémon that are already available in Cobblemon or your installed add-ons spawn. If a Pokémon or form isn't available in your game, you'll need an add-on that adds it.
? How does it work? ?
- Once the timer reaches its interval, the datapack rolls a chance for a Pokémon to spawn;
- If the roll is successful, a random online player is chosen and the datapack checks the biome they're in;
- A Pokémon that matches that biome is then chosen and the datapack tries to spawn it near the player;
- If there are no Pokémon configured for that biome, the spawn is skipped;
- When a Pokémon spawns, a message will appear in chat with its name, the player it spawned near and the player's biome.
By default, the timer is set to 60 minutes and there is a 2% chance of a Pokémon spawning each time the timer rolls. Pokémon spawn at level 70. Keep in mind that the timer rolling doesn't mean a Pokémon will always spawn!
⚙️ Settings and commands ⚙️
The datapack is configurable meaning you can change some settings! Use /trigger lts_config to open the settings menu and click the buttons in chat:
- You can change the chance of a Pokémon spawning each time the timer rolls;
- You can change the time between rolls from 1 minute to 24 hours. Changing the time will reset the countdown;
- You can pause the timer and resume it later;
- You can reset the countdown to start it again;
- You can use Force Spawn to try spawning a Pokémon immediately near a random online player. This skips the chance roll and doesn't reset the timer.
You can also use these commands if you have permission to run functions:
- You can use /function lts:force_roll to roll the configured chance immediately and reset the countdown;
- You can use /function lts:force_spawn to try spawning a Pokémon immediately without rolling the chance.
Note: Players who can use the settings menu can change its settings and use the Force Spawn button. The settings apply to the whole world.
? Biomes and spawning ?
The spawn list has 100 Pokémon entries, including Legendary Pokémon, Mythical Pokémon, Ultra Beasts and Galarian forms. Each Pokémon uses Cobblemon biome tags to determine where it can spawn.
The biome is checked at the selected player's position. The Pokémon is placed nearby, so it may appear across a biome boundary. Some modded biomes can display as Unknown in the spawn announcement.
? Installation ?
- Install Cobblemon for Minecraft Java 1.21.1.
- Place the datapack ZIP in your world's datapacks folder.
- Enter the world and use /reload, or restart the world.
- Use /trigger lts_config to open the menu and adjust the settings.
? Change the Pokémon and Biomes ?
Important Note: Modifying datapacks can be challenging for beginners. Make a backup before changing files! ⚠️
To customize the Pokémon, you'll need to have the datapack folder unzipped and placed in your world's datapacks folder. Use either the unzipped folder or the ZIP, not both. Once unzipped, navigate to the following location:
LegendaryTimedSpawner/data/lts/function/select_biome.mcfunction
Each Pokémon has a group of commands. For example, Articuno's entry looks like this:
scoreboard players set #eligible lts_data 0
execute if biome ~ ~ ~ #lts:reference/is_glacial run scoreboard players set #eligible lts_data 1
execute if biome ~ ~ ~ #lts:reference/is_snowy_taiga run scoreboard players set #eligible lts_data 1
execute if biome ~ ~ ~ #lts:reference/is_snowy_forest run scoreboard players set #eligible lts_data 1
execute if score #eligible lts_data matches 1 run data modify storage lts:data pool append value {"id":"articuno","n":"Articuno"}
The first line starts the check for that Pokémon. Each execute if biome line adds a biome group where it can be selected. Only one of those biome groups needs to match. The last line adds the Pokémon to the list of possible spawns.
- Remove a Pokémon: Delete its whole group, from the line that sets #eligible to 0 through the line containing its Pokémon name.
- Remove a biome: Delete the corresponding execute if biome line from that Pokémon's group. Keep at least one biome line if you want the Pokémon to be selectable.
- Add a biome: Copy an existing execute if biome line into the Pokémon's group, before its final line, and change the biome tag to an existing one.
- Add a Pokémon: Copy a complete group, change its biome lines, then change both "id" and "n" in the final line. The ID must be a valid Cobblemon Pokémon specification; the name is what appears in chat.
For example, to add a Pokémon called Mew to the existing forest group, add these three lines as a separate group:
scoreboard players set #eligible lts_data 0
execute if biome ~ ~ ~ #lts:reference/is_forest run scoreboard players set #eligible lts_data 1
execute if score #eligible lts_data matches 1 run data modify storage lts:data pool append value {"id":"mew","n":"Mew"}
The available reference tags are in data/lts/tags/worldgen/biome/reference/. They refer to Cobblemon's biome tags, which may include modded biomes. After making changes, save the file and use /reload. If a Pokémon does not appear, check the ID, the tag spelling and that its whole group is intact.
Note: This datapack checks the biome, but it does not currently apply time, weather, underground, underwater or individual weight conditions.
⏰ Change the Default Timer and Chance ⏰
You can change the active timer and chance in-game using /trigger lts_config. The interval can be adjusted from 1 minute to 24 hours, and the chance can be adjusted from 0% to 100%.
To change the defaults used when these settings have not yet been saved, open:
LegendaryTimedSpawner/data/lts/function/load.mcfunction
Find these lines:
execute unless score #interval lts_data matches 1200..1728000 run scoreboard players set #interval lts_data 72000
execute unless score #chance lts_data matches 0..1000 run scoreboard players set #chance lts_data 20
Change the last number of the interval line to the number of ticks you want. There are normally 1,200 ticks per minute, so 36,000 is 30 minutes and 72,000 is 60 minutes. The chance is stored in tenths of a percent: 20 is 2%, 50 is 5%, and 1000 is 100%.
These defaults do not overwrite valid settings already saved in a world. Use the in-game menu to change an existing world's settings.
?️ Change the Pokémon Level ?️
To change the level of spawned Pokémon, open:
LegendaryTimedSpawner/data/lts/function/do_spawn.mcfunction
Find level=70 in the first line and replace 70 with the level you want, from 1 to 100. Save the file and use /reload.
? Change the Spawn Message ?
The announcement is also in data/lts/function/do_spawn.mcfunction. Its text and colors are in the tellraw command on the second line. You can edit the text and color values, keeping the JSON punctuation intact.
Keep $(n) for the Pokémon's name and $(biome) for the biome. The selector containing lts_target shows the selected player's name. The first $ on each line is required for these function macros, so leave it in place. Save and use /reload after editing.
? Change the Spawn Distance ?
To change how far away the datapack searches for a spawn position, open:
LegendaryTimedSpawner/data/lts/function/spawn_at_player.mcfunction
Find the two spreadplayers commands. In both commands, the 24 after ~ ~ 0 is the maximum search range. Change it in both lines to keep the Nether and other dimensions consistent. The Nether line also has under 128 to keep the search below the Nether roof. A suitable position may not always be found, especially on difficult terrain or near the End void.
Have some issues? You can join the Official Cobblemon discord server, search for 'Legendary Timed Spawner' and ask your questions there, or alternatively, you can DM me on discord.
评论 0
登录后参与评分
还没有评论,来抢沙发吧